Setting Up Multiple Database Facility

It is possible to have more than one ActionWare database on your iSeries (AS/400). The data libraries are completely separate and may have the same database layout or completely different layouts. They share the same live authority code and therefore share the Licensed user configuration between all databases.

There are two ways to create additional databases.

  1. A duplicate database library of an existing production database, complete with design and data.

  2. A new database library from your distribution tape that initially contains our sample design and data. After creation you can create a brand new design, delete the sample data and load data of your own.

Once created, your new database library will be accessed by a separate command.

You can update certain data areas within each database to have separate word processing folders and auxiliary libraries, if needed. The multiple databases can share the same subsystem and regeneration source library (if they are at the same version and level).

Our standard set of libraries are AW4 (the program library), AW4L (the database library) and AW4G (the regeneration library). A multiple database environment is defined as an environment having one AW4 library, multiple database libraries (AW4L and equivalents), and one AW4G for each set of database libraries on a particular version.

We use data areas to point (link) a database library to it's word processing folders, it's regeneration library, it's auxiliary libraries, the library which controls the subsystem running the monitor program (usually AW4), and other functions which normally do not require attention when creating an additional multiple database. It is important that these data areas be correctly defined. Instructions for setting up these data areas are detailed at the end of this document. Contact our Support Desk if you have questions regarding these values in your environment.

1. Creating An Exact Duplicate Production Library

Overview

The principle of this operation is to create a new ActionWare database library that has the same files as the original database library. This means that you must have enough disk space in order to duplicate the entire library.

The instructions below will create the new library by saving the original database library and restoring it using a new library name. Our standard production library is AW4L and the new library name used in the example below is AWxxx. You can choose any valid library name you like, but you must ensure that it is not the name of a library which already exists on your iSeries (AS/400).

Instructions

Step 1 Create a save file, on a command line key and than press enter:

CRTSAVF FILE(QTEMP/xxx) TEXT('SAVE FILE FOR AW4L')

(If you create the save file in QTEMP it will be deleted when you sign off your session. Create it some other library if you do not want to delete it when you signoff.)

Step 2 Save library AW4L to the save file, on a command line key and than press enter:

SAVLIB LIB(AW4L) DEV(*SAVF) SAVF(QTEMP/xxx)

Step 3 Restore the saved library using a new library name, on a command line key and than press enter:

RSTLIB SAVLIB(AW4L) DEV(*SAVF) SAVF(QTEMP/xxx) RSTLIB(AWxxx)

(runs for about 15 mins)

Confirm the above restore ended successfully (you should receive a message stating how many objects were restored and how many were not restored. You should have 0 objects not restored. Review the job log for further details.

Step 4 Add the libraries AWxxx and AW4 to your library list, on a command line key and than press enter:

ADDLIBLE AWxxx

and, on a command line key and than press enter:

ADDLIBLE LIB(AW4) POSITION(*AFTER AWxxx)

Step 5 Initialize the new database, on a command line key and than press enter:

INZDBL AWxxx AW4L

This step will create the commands used to access the new database and it's main menu. Running this step also updates certain data areas vital to the new database.

A prompt screen appears with 4 parameters containing defaults.

Change the first two parameters to (with xxx being your chosen database name):

AWxxx and AWxxxm

Do not change the 3rd and 4th parameters, press enter

(runs for about 1 minute)

When finished a screen appears informing you the initialization is complete. Users can access this new database by keying command AWxxx from any command line. This whole process can be repeated as many times as necessary.

Step 6 If this database was created for testing or training purposes you may wish to reduce the records to a reasonable count to save on disk space. To do this create a filter that leaves 150-500 records and use overlay to mass delete the rest.

Data Areas:

To update data areas starting at the ActionWare Main Menu for your new database library.

Use Option 6 - Tools Menu, press enter.

Use Option 2 - Work with Data Areas, Press Enter.

Word Processing considerations for Data Areas:

If you have a requirement that your new database library, no matter how it was created, have separate word processing folders:

The data areas to change are: CMPFLR and SHLFLR. CMPFLR is the base folder for documents created thru the word processing functions. Documents will be stored in a sub folder of the folder described here. The sub folder name will be the PID of the record from which word processing was accessed. SHLFLR is the folder where shell documents are stored. It is possible to share SHLFLR among databases without conflict since these documents are used to create the actual document that will be stored on line.

Auxiliary Library Creation:

An auxiliary library is a library that is added to the library list above the database library. ActionWare supports up to ten axillary libraries for each database library. These libraries are used to house your custom programs that run with ActionWare. If you have a requirement that your new database library, have separate auxiliary libraries, change data area LIBAUX. Update this data area with the name of the library housing your custom programs. This data area is 100 in length and allows entry of a library name starting in position 1, 11, 21 etc. You may enter up to ten library names.

Regeneration Library

Multiple databases share a regeneration library. The standard regen library is AW4G and the data area that points to it is LIBSRC. If you create a new database library from either above described method this data area will exist and have a value of AW4G.

2. Creating A New Production Library

Overview

The principle of this operation is to create a new ActionWare database library by restoring library AW4L from the distribution CD to the new library on the iSeries (AS/400). The new library name used in this example is AWxxx.

Once created this new database library will contain our sample design and sample records. Once created you should delete our sample records and create your own design.

Instructions

Step 1 Create the new database library by loading the ActionWare distribution CD into the CD drive, on a command line key and than press enter:

RSTLIB AW4L OPT01 RSTLIB(AWxxx)

(runs for about 15 mins)

Step 2 Confirm the above restore ended successfully then on a command line key and than press enter:

ADDLIBLE AWxxx

and, on a command line key and than press enter:

ADDLIBLE LIB(AW4) POSITION(*AFTER AWxxx)

Step 3 on a command line key and than press enter::

INZDBL AWxxx AW4L

Step 4 A prompt screen appears with 4 parameters containing defaults.

Change the first two parameters to (with xxx being your chosen database name):

AWxxx and AWxxxm

Do not change the 3rd and 4th parameters, press enter.

(runs for about 1 minute)

Step 5 When finished a screen appears informing you the initialization is complete.

Step 6 The job is complete. Users can access this new database by keying command AWxxx from any command line. This whole process can be repeated as many times as necessary.

Step 7 You can delete our sample data. See related topic:

Copying A Database Design

If you would like to copy the design from your current live database library the instructions are as follows:

Step 1 Copy the design, on a command line key and than press enter::

CPYF FROMFILE(AW4L/FIEL) TOFILE(AWxxx/FIEL) MBROPT(*REPLACE)

Step 2 Perform a full regeneration on your new database library

For information on regeneration see related topic:

Data Areas

To update data areas starting at the ActionWare Main Menu for your new database library.

Use Option 6 - Tools Menu, press enter.

Use Option 2 - Work with Data Areas, Press Enter.

Word Processing considerations for Data Areas:

If you have a requirement that your new database library, no matter how it was created, have separate word processing folders:

The data areas to change are: CMPFLR and SHLFLR. CMPFLR is the base folder for documents created thru the word processing functions. Documents will be stored in a sub folder of the folder described here. The sub folder name will be the PID of the record from which word processing was accessed. SHLFLR is the folder where shell documents are stored. It is possible to share SHLFLR among databases without conflict since these documents are used to create the actual document that will be stored on line.

Auxiliary Library Creation:

An auxiliary library is a library that is added to the library list above the database library. ActionWare supports up to ten axillary libraries for each database library. These libraries are used to house your custom programs that run with ActionWare. If you have a requirement that your new database library, have separate auxiliary libraries, change data area LIBAUX. Update this data area with the name of the library housing your custom programs. This data area is 100 in length and allows entry of a library name starting in position 1, 11, 21 etc. You may enter up to ten library names.

Regeneration Library

Multiple databases share a regeneration library. The standard regen library is AW4G and the data area that points to it is LIBSRC. If you create a new database library from either above described method this data area will exist and have a value of AW4G.