6. WIZARD File Maintenance

Contents

About this Chapter
Creating and Maintaining files
Maintaining File Types
File Attribute Control
Maintaining Dictionaries
Listing Dictionaries
Defining Applications

About this Chapter

This chapter deals primarily with WIZARD's file controls. WIZARD has processes for creating, deleting, and maintaining the files within your application accounts.

WIZARD expects the main files to have been created prior to the creation of screens and reports. If you attempt to paint a screen for which the master file does not exist, WIZARD will give you the option to create the file by calling up the File Maintenance routine (described below) without having to exit the screen formatter

Note: The W Menu

Many of the processes throughout the remainder of the manual are accessed from the W menu This menu is accessible by typing W at the Selection Prompt on any menu (provided you have security access to that menu), or from the standard user account menu (the menu WIZARD automatically places at the top of a new account). Another option is to use the LIST command from the menu.

Should you wish to add the W menu to your own menus, its process name is W. Note that if you are using a menu file other than MENU you will need to copy W and its sub-menus into the new menu file.

Most File Maintenance routines are available from the File Maintenance menu under the W menu.

Creating and Maintaining files

WIZARD allows you to simply and easily create and maintain your own data files. To do so, you should use WIZARD's file maintenance routine.

The file maintenance routine can be found on either of two menus in the user account:

  1. It is the last option on the account security menu, and
  2. It is found under the W menu's File Maint menu.

Both options run the same process.

This option brings up a WIZARD screen which will allow you to create a file and set WIZARD security levels for that file. The screen appears in a window as follows:

To use this screen, type the name of the file you wish to create or maintain in the first field.

The remainder of the options on this screen are explained below:

1 Description
Use this field to enter a short description or note about this file.

2 Security
This field contains the security level of this file. It must be a number from 0 (lowest) to 9 (highest).

Account
This field cannot be altered, but displays the home account of the file.

3 File Size
This field allows you to determine the size of the file (if you are creating it) or to view the current size of the file.

To access the File Size display, enter Y at this field. This displays a window as follows:

There are two ways to specify file size:

If you are entering details for a new file, it will be created when you file the current item.

If the File already exists then the fields 4 through 7 will be loaded with the actual values. Entry of /C (for Count) in the first field or /S (for Size) in the second field, WIZARD will count the number of items in the data level and will calculate the average size. It will then show the correct modulo and separation for the data level.

4 Type
You may specify this file's type. Types are stored in the WIZ.FILE.TYPES file, and maintained from the File Types screen in the W menu's maintenance menu.

WIZARD initially includes several File Types. They are:

CControl files.
MMaster files.
PProtected files.
TTransaction files.
WWorking or temporary files.
XCross reference files.

If you are not sure, you can use the Alternate access command (type = from the field) and WIZARD will give you a complete list to choose from.

5 Seq Ids
Use this field to specify the nature of the item keys for this file. If they are to be sequentially numbered (0, 1, 2, 3,...), enter Y, otherwise enter N. Sequential numbers are only created in WIZARD Screens when the # feature is turned on. If you need to use a Prefix then you must assign this in Entry Time Code Segment of the given Screen, as follows:

   PREFIX.ID="A"

This will create sequential Ids as (A1, A2, ...).

If you enter Y here a Window will open as follows:

6 Dict Control
This field controls how WIZARD will maintain this file's dictionaries. When you go to this field, a Window will open with a series of Y/N (Yes/No) fields. They are:

7 Applications that use this file
This field is a line item set which allows you to define which applications access this file.

Applications are defined from the Applications maintenance screen. That is found under the Advanced Tools menu of the W menu's File Maintenance menu.

8 User Help
You may enter some user help for this file in this field. If you want to enter a substantial amount of text, use /W when you get to this field to enter the WIZARD Word Processor.

9 Technical Documentation
You may also wish to add some more technical information about this file. You can do that here, and so keep it separate from the user help. Again, if you wish to enter a large amount of text type /W to enter the WIZARD Word Processor.

10 Audit Changes
WIZARD allows you to Audit and keep track of any changes to a File. It will do this in WIZARD Screens where you have the variable WAUDIT.ON = 1. See the Basic Help for WAUDIT.

If this field is Y for Yes then a Window will open allowing you to maintain the Audit details. The Window looks like:

11 WIZARD Screens
This field displays a number representing the number of WIZARD screens which access or update this file.

If there are some (i.e. this field has "1" or more displayed) you may see which screens they are by going to this field. A Window will open and display the screens accessing this file. The Window looks like this:

Once you have set up the details of the file to your satisfaction, you may file the item from the Acceptance Prompt (by simply pressing <Return>). If the file does not exist, WIZARD will confirm that you want to create the file. If you proceed, WIZARD will attempt to create the file and report on its success.

Maintaining File Types

WIZARD allows you to classify your files by allocating them to various types. File types help control certain aspects of file manipulation and operation (as described below).

File types are maintained from the File Maintenance menu on the W menu. Selecting File Types from that menu brings up a screen like this:

This screen allows you to add, change, or delete file types from the system.

You may create new file types if you wish, although WIZARD includes as standard the following file types:

CControl
MMaster
PProtected
TTransaction
WWorking/temporary
XCross reference

File Attribute Control

We refer to an attribute (or field) number as an AMC (attribute mark count).

When you are creating a data entry screen, WIZARD allows you to specify the AMC for each field. If you do not specify an AMC, then WIZARD will automatically assign the next available AMC. For each file, WIZARD keeps track of all AMC's specified by you or assigned by WIZARD.

Three programs are available from the File Maintenance menu that will allow you and WIZARD to control the allocation of attributes:

  1. Reserve Specific Attributes.
  2. Restore Reserved Attributes.
  3. Cleanup-recover Unused Attributes.

1 Reserve Specific Attributes

If you write a non-WIZARD program and use previously unused attributes, keep a list of the AMC's. When you are finished writing your program, select the Reserve Specific Attributes menu choice. Then enter the File Name, and the AMC's you have used. By doing this, you will prevent WIZARD from automatically assigning the same AMC's in WIZARD programs.

2 Restore Reserved Attributes

If you have reserved specific attributes, as discussed above, and you then re-write, or delete, your non-WIZARD program you will want to restore the attributes that you are no longer using. From the menu, select the Restore Reserved Attributes choice and enter the file name and the AMC's. The previously reserved attributes will be removed from the reserved list.

3 Cleanup-Recover Unused Attributes

When you delete a WIZARD program, or restore reserved attributes WIZARD does not automatically put the AMC's back on their available AMC lists. This is done to ensure that no AMC is made available when it is actually being used.

When you run this menu selection, WIZARD will examine ALL your WIZARD programs and ALL your reserved-AMC lists to recreate ALL your available-AMC lists (one available-AMC list per file).

Maintaining Dictionaries

In addition to allowing you to create files, WIZARD allows you to maintain the dictionary items within a file.

WIZARD typically distinguished between two different types of dictionaries: WIZARD dictionaries and non-WIZARD dictionaries.

WIZARD dictionaries are created by the screen formatter when you file a new screen - if you have set the Write Attribute Definitions flag to Y in the EG (Global) screen of the formatter. A dictionary is usually then created for each field on that WIZARD screen.

To maintain a file's dictionaries, run the Maintain Dicts option from the File Maintenance menu of the W menu

Entering this process brings up the following screen which creates both WIZARD and file dictionaries. These are created as standard PICK dictionaries and a certain amount knowledge is assumed, if you have a problem with understanding a given field please refer to your PICK manual.

The Screen looks like:

Listing Dictionaries

Should you require a printed list of the dictionaries of one or more files, you can run the List Dicts option, found under the File Maintenance menu of the W menu.

When you select this option you will be asked for a file name. Enter the name of the file whose dictionaries you want to see listed.

If you want to list dictionaries of more than one file, keep entering the names of the files (followed by <Return>). When you have entered all the files whose dictionaries you want listed, press <Return> alone.

Following this, you will be asked whether you want the list output to the Printer or your Terminal (the default device). Select your desired option.

Finally you will be asked if you wish to proceed with the listing. This is your last chance to bail out should you change your mind. Pressing <Return> at this point will return to the menus without listing any dictionaries.

Defining Applications

Perhaps the first problem any systems designer faces is how they are to set up their new application. Most multi-value databases give you several options.

You can create different accounts for different component applications, or you can create one account for all the applications. Each method has its own advantages and disadvantages.

Should you wish to keep every component of your application within the one database account, WIZARD can help keep the various components separate. Users can be directed into the appropriate area by the Menu and Security system.

WIZARD also helps at the design level. The Applications Maintenance screen (is accessed from the Documentation menu off the W menu) allows you to associate files and processes with a defined application.

Selecting this option displays the following screen:

This allows you to define various applications.

Applications are defined by a code which you select and enter into the first field on this screen.

For each application, you can enter documentation (use /W in either help field to enter help using the WIZARD Word Processor.

At the bottom of this screen you can enter a list of files which are aligned to this application. The file names must already exist in the WIZ.FILES file, which means that you must have entered details for them using the File Security screen.