7. Creating Wizard Screens

Contents

About This Chapter
Introduction to the Screen Generator
How To Start Learning Wizard
The Program Name
The Program Type
The Main File Name
Cursor positioning while formatting
Editing Outside Your Screen Limits
Formatting commands
   A : Add a field
      Data-Types
   AF : Additional Files
   C : Change a field
      Change the Data-Type, Data length, or Depth
   D : Delete a field
   DG : Delete Line Graphics
   DU : DUplicate field(s)
   E : Edit details for a field
      Data Location
         The Data File Name
         The Data Attribute Number
      Link File Name
      Derived Calculation
      Default Value
         Constant value
         Related File value
         Calculation
      Data Validation
         Numeric Range
         Data Length
         Pattern Match
         Related File
         Not on Related File
      Field Mode
      Skip Condition
      Field Help (<F1> or ?)
      Interactive 2 Line Help
   EC : Edit BASIC Code Segments
      ECG: Edit Global Code Segments
      ECF: Edit Field Code Segments
      EBI: Edit Before Field Codes
      EIC: Edit Input Conv. Codes
      EOC: Edit Output Conv. Codes
      EAI: Edit After Input Codes
      EAF: Edit After Field Codes
   ED : Edit help for a field
   EF : Edit Screen's Features
      EF : Edit Features (Reports)
   EG : Edit Global parameters
   EH : Edit Field Help
   EP : Edit field parameters
   EPA: Edit all field parameters
   <Esc> key Exit Wizard
   FI : Save the changes to the screen
   FS : Save Without Exiting
   GC : Global Colours
   GR : Draw Graphics
   L : Insert a line item set
      Linking Line Item Sets
   M : Move one or more fields
   P : Page the current Screen
   R : Reuse a field
   RS : ReSequence field order
   S : Start report section
   T : Insert some text
   VF : View Fields
Generating a Wizard Screen
Running Your Wizard Screen

About This Chapter

At the heart of the Wizard system is the ability to create data entry screens and reports. This chapter explains how to create data entry screens. The latter section of the chapter covers the various commands available to the developer, and is primarily designed as a reference.

If you are a first time Wizard user, you should start at the beginning of this chapter.

Once you get to the command section, the most important commands are:

AAdd fields to the screen;
EEdit the details of fields;
TAdd text to a screen;
LAdd a Line-Item-Set
EFChange the features of a screen.

With only these five commands you can paint quite powerful screens and get started with Wizard. (Remember you can always get help by pressing <F1> or ? <Return>.)

We also recommend that, from time to time, you use the FS command from the main command line in Wizard. This saves changes to your work without exiting the formatter.

In the following pages we will discuss each of the formatter commands. To enable you to refer to these command details quickly they are in alphabetical order. This means that the discussion may refer to commands you have not read yet. A good example is the DG Command and the GR Command - we first discuss how to delete Graphics lines before we discuss how to draw them.

The Formatter can be invoked in a number of ways:

  1. Press <Return> at the Wizard Screens option on the W menu, or
  2. Type FS (optionally followed by the name of the Screen) at TCL, or
  3. Type ED at the Selection menu prompt when a Wizard screen is selected. (This requires that this feature is enabled, see Logon Security)

Introduction to the Screen Generator

Wizard asks simple fill-in-the-blank questions to gather together all of the information necessary for Wizard to generate your program. This information is called a "Program Definition". Once you have created your program definition, the Wizard generator will generate your program.

A Program Definition is made up of Field Definitions and Text Strings. You design a data entry "Screen" or "Report" by using the Wizard Screens routines and the formatting commands to add, change, delete, and move Field Definitions and Text Strings.

The formatting commands allow you to place the Field Definitions and Text Strings on your terminal screen exactly where you want them. The position of the Field Definitions and Text Strings will determine what your data entry SCREEN or REPORT looks like when it is used.

The process required to generate a screen involves four stages. You (the user) are actively involved in only one of these stages, the first. These stages are:

Screen Painter
The screen formatter allows you to design your screens and reports and to specify which features you would like to have included. It also allows you to change existing screen definitions. The Screen Painter produces a Program Definition.

Program Definition
The Program Definition resides in the WVD file. It is an item which contains all the information Wizard needs to build the final program. Without the Program Definition there is no way of linking the generated code with the Screen Formatter

Screen Generator
The Program Definition is used by this process to create your Screen Program which is (generally) stored in the W2 file, and its name is prefixed by W.., e.g. W.ECUST.

Screen Program
This is the final program which you run from either TCL or from the Menus.

How To Start Learning Wizard

Remember to keep using both the ? and ?? commands to get help when you need to learn more.

On your SCREENS or your REPORTS, you can use the M Command to move fields around or the R Command to re-use fields from other SCREENS or REPORTS.

You can use the L Command to add groups of multi-valued fields. We refer to a group of multi-valued fields as a Line Item Set or LIS.

You can use the RS Command to Resequence the order of execution of the fields.

You can use the EF Command and EG Command to select or omit a large number of Features and Global options.

You can use the S Command and DU Command to add features such as footings and headings to your REPORTS.

The ECCommand allows you to add or Edit Code Segments that will become part of your program definition. Code segments are modules of Basic Code, so you need to know something about Basic to use this feature.

The Program Name.

The Program Name will be the name that you use to execute (run) your program. You cannot use a name that already exists in the account's Master Dictionary, (MD or VOC), and if you enter the name of an existing screen, you will go straight into the formatter.

You may choose to use a naming scheme or convention. For instance, you may want to begin all data Entry screens with E and all Report names with R.

For example, a data Entry screen to Enter CUSTomer data could be named ECUST and a Report to print CUSTomer data could be named RCUST.

When generated, the code for your screen will be stored in your program file (the default is W2) with the name you entered prefixed by "W.". For example, if you call your screen ECUST, the generated code will be called W.ECUST.

The recommended procedure for developing an application is to first create the Menus and then use the Menu System to call the appropriate development tool. When a Menu process is designated as a type W or S, the Menu System ED command will hand over to the Wizard Screen (and Report) Painter.

Alternatively, it can be invoked from TCL with the FS (Format Screen) Command.

The Program Type.

The PROGRAM TYPE tells Wizard what type of program to generate from the program definition that you enter (or modify). There are two program types, these being:

DProgram type D (Data entry) tells Wizard to generate a data entry screen program in which you enter data at the Data picture positions. The data picture positions are also where the data is displayed. They are usually just to the right of, or below, the data labels.
RProgram type R (Report) tells Wizard to generate a Report program. Wizard can generate a "columnar" report or a "forms-type report.

The Main File Name

When using Wizard, you are always creating a data entry SCREEN or an output REPORT of some type.

Almost every SCREEN or REPORT retrieves data from one or more files. Every file has a unique name. Every file is made up of items. (Sometimes called records). Every item has a unique name which we refer to as an ITEM-ID. (Sometimes called a "key"). Every item is divided into one or more ATTRIBUTES. (Sometimes called fields). Attributes can contain actual data, which in turn could be item-ids of items in other files.

If the SCREEN or REPORT retrieves data from only one file, then that file is called the main file. If the SCREEN or REPORT retrieves data from more than one file, then the main file contains attributes that are used as ITEM-IDS to retrieve ITEMS in another file.

Ultimately, the main file is the file which Wizard uses as the default for newly created fields. If you do not edit the details for a field (see the E command), when you file the screen and generate it Wizard will use this file as the file for fields you have not explicitly specified, and Wizard will select arbitrary Attribute Numbers for each field.

If you are creating a Wizard screen from scratch, Wizard will ask you for a file name. The file must exist, and if you enter a file name which does not exist Wizard will allow you to enter a different name, exit, or go straight into the File Maintenance screen to create that file. When Wizard accepts the file you can then proceed to paint the screen.

Cursor positioning while formatting.

Most Wizard formatting commands will ask you to move the "cursor". The cursor is the spot on the screen that shows you where the next character will be displayed on the terminal screen. If you have a choice, we recommend a Blinking Block Cursor over any other choices.

Wizard's Screen Formatter frequently asks you to move the cursor to some position on the screen. If a field already exists, you may want to move its position, or you may want to change some information regarding it. You tell CUSTOM Wizard which field you want to work with by positioning the cursor on top of that field.

You are able to move the cursor to any position on the screen by using the Numeric Pad on your keyboard. The following diagram illustrates the movements:

In addition to these keys, you may also move the cursor around using the arrow keys on your keyboard.

Just using these keys will restrict you to moving one space at a time. To move around a little quicker, you may use the following numeric keys:

5This key will move the cursor in the same direction as the last direction key (from above), but will move it 5 steps each time it is pressed.
0The zero key will move the cursor 10 steps in the direction of the last cursor direction key.

The <Return> Key

When you have painted a Wizard screen you may also make successive fields active by pressing the <Return> key. Thus if you have just edited the first field on the screen, you may press <<Return>> from the command prompt. If you then enter an E command you will find the cursor waiting on the second field in the screen.

The / Key

Pressing / and <Return> will select the previous field.

Field Numbers

The quickest way of selecting an field and performing a command is to append the field's number to the command. Thus, for example, E1 selects the Edit command for field 1 on the screen.

Note: Screen Numbering

You should be aware that if you use any of the last three options, Wizard numbers fields internally from top left to bottom right - regardless of whether you have resequenced the fields or not.

Cursor Position Indicator

In the bottom left corner of the formatting screen you will see the Cursor Position Indicator. The left-hand number is the horizontal position, usually called the column. The right-hand number is the vertical position, usually called the row. This indicator will always show you where you are. The formatting area is limited to 66 rows deep and 240 columns wide.

Editing Outside Your Screen Limits

Wizard allows you to format a REPORT up to 240 columns wide and 66 rows deep. You are always looking at a portion of the formatting area, or window, that is 80 columns wide and 22 rows deep.

As you move the cursor to the right of the 80th column of a window, Wizard pages the display. The new view starts at the 40th column of the previous view.

As you move lower than the 22nd row of a window, Wizard displays a new view. The new view starts at the 11th row of the previous view.

Wizard data entry SCREENs can normally only be as wide and as deep as your terminal screen. There are, however, two ways to get around this limitation:

Screens up to 132 columns
Many terminals and terminal emulators now include the facility to display up to 132 columns on the screen. To make use of this, you will need to ensure that your screen executes the S132 command prior to displaying anything. It should also execute S80 upon completion to return the screen to its normal state.

For these two commands to work, your terminal type needs to be included in attribute 4 of the ProcFlavour item in the WizControl file. This is a multi-valued list of terminal types (the IDs must match IDs in the WIZ.TERM file).

Additionally, it may be necessary to modify the S80 and S132 procs in order to enable them to switch your particular terminal type.

Multiple Screens
When you want to include a large amount of data in a screen, it may be more efficient to break it up into several smaller screens, which can be linked together by use of the Linked Screens field in the EG screen.

Formatting commands.

A : Add a field.

The A command allows you to Add one or more new Field Definitions to your Program Definition. (Sometimes Field Definitions are just called "fields".)

Each Field Definition tells Wizard how to process data for one attribute (field). Usually, the first Field Definition in a SCREEN is used to enter the item-id (key).

Entering The Add-Field Mode

The main idea here is to specify Field Definitions by entering a Data Label and a Data Picture for each Field Definition.

To begin adding fields to your screen, press A and then <Return> at the Screen Formatter Command Prompt. Now you are in Add mode, and you remain in this mode until you Exit (pressing <Esc> or <F10>).

Using Add Field Mode

The Wizard Screen Formatter will remain in Add mode until you Exit it, and so you may continue to add fields until you want to stop or add a Line Item Set (see the L command) or set the field parameters for one of the fields (see the E command).

Wizard, in Add mode, repeatedly runs through a series of steps. These are:

  1. Move the cursor to the position at which you wish to display the Data Label for the current field. Once there, press <Return> or simply begin typing the data label. (For more information, refer to the section on moving the cursor.)
  2. Wizard asks you to enter the data label. This is the label for the field and should be in some way descriptive of the field. For example, you may enter

       Name :
    

    Wizard will automatically number fields on your screen if you precede the label with one or more # characters. Thus, the label:

       ## Name :
    

    Will appear in the final screen as

        4 Name :
    

    (Assuming that it is the fourth numbered field on your screen.)

    Numbering fields allows users to jump directly to that field from another by typing / followed by the number, or from the Acceptance Prompt by typing the number alone.

  3. Next, Wizard asks you to move the cursor to the position at which you wish to display the data picture. Move the cursor with the numeric pad and then press <Return> or simply begin entering the details for the data picture.
  4. Wizard next asks for the Data Type for this field. The prompt displays the three most commonly used data types:

    NNumeric data only. This does not allow even "." or "-" signs.
    AAlphabetic data only (no numbers or special characters).
    XAny characters (excepting control characters).

    For comprehensive information, refer to the Data Types documentation.

  5. If you enter a data type of variable length (not all are), Wizard will ask you for the number of characters you wish to have in this field. If you enter a number greater than the space available on the screen, Wizard will ask again.

    Alternatively, you may enter the length of a variable length data type when you select the data type by following it with a ";" and the length. Thus:

       X;16
    

    Specifies a field of 16 characters width which allows any data to be entered.

Following this step, Wizard will display the data picture on the screen and return to step 1 (above). This loop will continue until you Exit. If you exit part way through entering a field, that field will be removed.

Important Note: Whenever you enter an A command, Wizard will remain in the A command until you enter an <Esc> to exit the command.

Data-Types

Refer to Chapter 13 for more details on how data types work and how you can create your own data types.

AF : Additional Files

Entry of AF will open the Additional Files Window, this can also be done from the EG Screen, E Screen, EP Screen and all EC type Screens.

When you use Code Segments you will sometimes need to OPEN files that are not associated with any of the fields in the Screen. Wizard will always OPEN all files that are associated with the fields in a Screen. You may need to open a control file to check the users security etc. All files opened in a Wizard Screen will have an extension of ".FV", if the File name is PARTS then Wizard will:

   OPEN "PARTS" TO PARTS.FV ELSE ...

The following Window will open to allow you to enter Additional files for you to subsequently use in Code Segments:

Additional Files are entered by the Line Item Set or LIS:

File Id
Enter the Id or Name of the file that you wish to open, if the file is invalid you will be asked if you wish to create the file now, if you do then Wizard will take you into the Wizard File Maintenance Screen.

Type
This field will show if the File is a Major, Linked or Added file. If it is Major or Linked you may not delete it by entering /D.

Description
This field describes the File.

C : Change a field.

The C command allows you to Change a Field Definition. (Sometimes, Field Definitions are just called fields.)

Field Definitions are made up of two main elements, the Data Label and the Data Picture.

The Data Label
The Data Label is the text prompt usually displayed to the left of or above the data picture.

The Data Picture
The Data Picture is the point where data entry or display occurs for the field.

From the Wizard command prompt you enter C to change a field. Then you move the cursor to the field you wish to change using the screen formatter When the cursor is over the appropriate field, press <Return>. If you select a Data Label you will then be changing a label, if a Data Picture then you will be changing the field parameters.

After selecting the label (if you select a picture instead of a label, refer to the next section), Wizard will prompt you to enter a new label. To change the label Wizard will prompt in the Acceptance prompt area, the old value will be displayed and you may use the cursor keys (left and right) to edit the old label. You may backspace to clear and then enter a new label. To Exit, press <Return> (to leave the existing label), or backspace to clear and then press <Space> and <Return> to delete the current label altogether.

Change the Data-Type, Data length, or Depth

The C command can also be used to change the parameters of the data portion of the field - the data picture To achieve this, do the following.

Enter C at the Wizard Screen Formatter command prompt to select the Change option. Then, move the cursor to the data picture of the field you wish to change. If you want to change the depth (or related) parameter of a Line Item Set (refer to the L command , move to the Line Counter field's data picture. When the cursor is positioned over that field, press <Return>.

Wizard will next ask you to enter the Data-Type You may enter whichever Data-Type you wish this field to be changed to, or press <Return> without entering anything to keep the existing Data-Type. For more information on Data-Types, see above.

If the Data-Type is a variable length Data-Type, Wizard will ask you how many characters you want in the field. Enter a number or, as before, simply press <Return> if you want to retain the same number of characters in the field.

Line Item Set Parameters

If the cursor is on the Data Picture of the Index Field (the first field) of a Line Item Set, then Wizard (after having asked you the previous questions) will ask three more questions pertaining specifically to Line Item Sets.

First Wizard will ask you for a new depth for this Line Item Set. You may enter a number or else press <Return> to retain the current depth. Note that you cannot enter a depth which will not fit onto the screen as it is currently set up. You may move other fields to make more space (refer to the M command).

Second, Wizard will ask you for the Maximum Depth of this Line Item Set. You can enter a number for the maximum possible depth of the Line Item Set. Note that entering 0 means that there is no limit to the number of lines the user may enter into the Line Item Set. Pressing <Return> retains the current setting.

Third, Wizard asks you for the new Exit Field from this Line Item Set. The default here is 1 (i.e. the most common value), but you may enter a number greater than this if you so desire.

For more information on the exit field, refer to the appropriate part of the manual on the L command.

D : Delete a field.

You may use the D command to delete an entire field, or delete only the data label. At the Screen Formatter Command Prompt enter D and press <Return>.

Using the numeric keypad on your keyboard, or the arrow keys, move the cursor to the field you wish to delete all or part of. Once you have positioned the cursor, press <Return>.

Next, Wizard will want to know which part to delete. You may enter any of the following:

LDelete the Label of this field. The cursor need not be placed over the Label, any part of the field will do.
FDelete the entire field (label and picture).

Just pressing <Return> will do nothing (as would pressing <Esc>). You cannot delete only the Picture - this would leave only text.

DG : Delete Line Graphics

The DG command allows you to delete line graphics from a screen (see the GR Command).

To delete lines, type DG from the Screen Formatter's command prompt.

Wizard will then ask you to move the cursor to the line you wish to delete, and then press <Return>. Doing so will delete the selected line.

If you move the cursor onto the intersection of two lines, both those lines will be deleted.

The DG command allows only one operation each time it is invoked, and then it returns you to the Screen Formatter's command prompt. To delete another line, you must again type DG.

DU : DUplicate field(s).

The DU command allows you to duplicate (copy) entire fields, parts of fields, or text from one place on the formatting screen to another. This command is typically used in Reports to copy field(s) from the Detail section to a Heading or Footing section. (See also the S Command).

To use the duplicate facility, type DU at the Wizard Screen Formatter command prompt, and then press <Return>. You will then have three options:

BDuplicate a Box. A box may contain one or more entire fields, one or more Data Labels, one or more Data Pictures, text, or any combination of fields, labels, pictures, and text.
FDuplicate one Field.
<Return>Duplicate a Box. (same as B).

If you choose a Box, Wizard guides you through the process of specifying the dimensions of the box. Otherwise, Wizard asks you to move the Cursor to the Field that you wish to duplicate.

Wizard then asks you to move the Cursor to the new location on the screen where you want to place the field(s) or text you selected.

Finally, Wizard duplicates the selected field(s) or text to the new location.

E : Edit details for a field.

The E command allows you to Edit (change) the various Details of a field definition such as the data location, derived calculation default value, data validation etc.

To enter the field edit mode, type E and press <Return> at the Wizard Command Prompt. Now you move the cursor to the field you wish to edit.

Alternatively, you may type E followed by a field number. The Screen Generator numbers fields starting with 1 from the top left corner. The field number may not match the number ultimately given to a field when the screen is generated if you have re-sequenced the fields.

You are now in Field Edit mode. The screen display becomes:

Below this, in a box, is displayed the user-defined two line help (which displays when the user enters incorrect data or if the interactive help function is active).

The name of the Field Definition that you are Editing is shown at the top of the screen.

The cursor will sit at the prompt at the bottom of the screen. Here several options are available. They are:

<Return>leave the E command and save any changes that you made since you entered the E command.
<Esc>leave the E command WITHOUT saving any changes that you made since you entered the E command. If you have made some changes then you will be asked if you want to Lose those Changes.
Field NumberEdit a particular Detail.
? or <F1>Get a pop-up menu for you to select help. For help with any particular Detail, enter the menu number of the Detail.

Field Name

Every Field Definition has a Field Name. The Field Name is used to refer to the Field Definition when you use various options of the E command, or when you use the EC command to enter a Code Segment.

The Field Name is constructed from the Data Label when you Add a new Field Definition or Change a Data Label. If the Field Definition does not have a Data Label, or if the Field Name is the same as a Field Name that already exists, Wizard will construct a Field Name by concatenating a sequential number onto the end of the Field Name. If there is no label or you delete the label then Wizard will use the program definition name: e.g. "ECUST.1".

Sometimes you may want to change the Wizard constructed Field Name to make it shorter or more meaningful. You can use the EP command to change the Field Name.

If, after changing a Field Name with the EP command or you Change/Delete the Data Label, Wizard will construct the Field Name again.

Data Location

The Data Location specifies the location of the data which is processed by a field. If you do not specify a Data Location for a field, Wizard automatically assigns one. Wizard assigns the next unused attribute in the main file. This assignment takes place when you save your program definition. If you specify a Data Location before you save your program definition, then Wizard will not assign one.

You can change the Data Location at any time, even after you have saved your program definition.

However, if you change the Data Location after data has been entered into a file (i.e. by using the generated screen), then the old data will not be accessible.

Wizard will ask you if the data for this field is to be stored in a permanent file or if it should be only a temporary Working Storage field. You enter either:

FThis tells Wizard that the data for this field is located in a FILE.
WThis tells Wizard that the data for this field is located in temporary working storage.
Working Storage Fields

A Working Storage field is used to hold data that is not retrieved from or stored in a file. For example, if you have a field with a Calculation and you do not want the calculated value to be stored (saved) in a file, then change the Data Location to Working Storage.

We recommend that you use this option sparingly. Generally, it is best to store calculations so that they can easily be retrieved in Reports.

The Data File Name

If you have told Wizard that you want the data for this field to be stored in a file, Wizard will next ask you for the name of the file you wish to store that data in. You have several possible options, these are:

<Return>
Entering <Return> will use the default file for this screen (or, if there is already a file name specified for this field, <Return> will retain that file name).

A File Name
Entering a file name will tell Wizard that this field is to get data from and store data in the file you specify. Note that Wizard will need some way of determining the Item ID for this data. Some field on the screen must have the ID in it; either by having its data location as this file and Attribute 0 (zero), or by having some other field which has data which has a Link File name equal to this file (see below).

Multiple Files

A Wizard data entry screen allows you to retrieve and update information from more than one file.

You can specify a field definition with a File Name other than the main File Name if the other file is related to the main file

A file is related to the main file if the item-id (key) to the other file is located in the main file.

Parallel Files And Linked Files

Related files are either parallel or linked. If the main file and the other file have the same item-id (key), then we say that these files are parallel. This can be useful to split up especially large items (records) into two files.

To specify parallel files, change the Data Location File Name to any File Name other than the main File Name. It is that simple.

If one of the fields in the main file is also the item-id (key) to some other file, then we say that these files are linked. We also say that the main file links to the other file.

See the section on Link File Name to find out how to specify that one file links to another. In recent data base literature, this is known as specifying a foreign key.

The Data Attribute Number

Finally, Wizard will ask you for the Attribute number in which you wish to store or retrieve the data. The location may be specified in one of several ways. Note that a space will delete any existing data location specification. The possibilities are outlined below.

Note: AMC (which stands for Attribute Mark Count) means the same as Attribute number.

Data Locations in Screens
When you run a data entry screen the screen is displayed, and allows you to change, the data from the Data Locations that you pecified.

Data Locations in Reports
When you run a report, the report displays on the CRT, or prints on the printer, the data from the Data Locations that you specified. Typically, reports do not store data in files. However, if this is required, use code segments.

Multi-Value Or Sub-Value Data
Wizard programs can retrieve information from particular multi-values or sub-values. VMC (which stands for Value Mark Count) means the same as multi-value number. SVMC (which stands for Secondary Value Mark Count) means the same as sub-value number.

How To Specify A Particular Multi-Value
When Wizard asks for the attribute number, enter the attribute number, followed by a comma, followed by the multi-value number. For example, 4,3 means attribute number 4, multi-value 3.

How To Specify A Particular Sub-Value
When Wizard asks for the Attribute number, enter the attribute number, followed by a comma, followed by the multi-value number, followed by a comma, followed by the sub-value number. For example, 4,3,2 means attribute number 4, multi-value 3, sub-value 2.

The Cleanup-Recover Routine
If you specify a Data Location after Wizard has assigned one, Wizard will not automatically make the old attribute available. It does not know if that attribute is being used in another program. But you can make unused attributes available by running the cleanup-recover routine.

This process is available from the File Maintenance menu under the W menu.

Link File Name.

The Link file field may contain a file name other than the Main file name. If you do specify a file name for the Link File, Wizard will use the data in this field as the Item ID for the file specified as the Link File. Any fields which subsequently refer this Linked file will use the data from the Linked file.

Wizard will ask for a link file name when you select this option. You may enter a file name or a <space> to delete any existing file name in the field.

Link File Example

Let us consider an example where the main file is a CHEQUE file containing one record for each cheque you write. There is also a VENDOR file containing one record for each vendor you buy from.

Now let us say that you want to create an Invoice Payment data entry Screen This Screen will allow you to retrieve and update data from both files. Sometimes we will use the term "access" to mean "retrieve and/or update".

The first few fields of the Invoice Payment Screen are specified as:

Data LabelFile NameAMCLink File Name
Cheque NumberCHEQUE0 
Date CHEQUE1 
Vendor CodeCHEQUE2VENDOR
Vendor NameVENDOR1 
Vendor StreetVENDOR2 
Vendor City VENDOR3 
Bank NameCHEQUE3 

The first three fields and the last field access data that is stored in the CHEQUE file. The third field, Vendor Code, has a link file name of VENDOR. This specifies that the Vendor Code will be used as an item-id (record key) to access a record in the VENDOR file.

In other words, we have specified that the Vendor Code field links the CHEQUE file to the VENDOR file.

How The Invoice Payment Screen Works

When a Vendor Code is entered or displayed, the Invoice Payment Screen retrieves the vendor record and displays the Vendor Name, Street, and City. If data is changed in these fields, the data will be changed in the VENDOR file.

Displaying Data From The Vendor File

If you only want to display the Vendor Name, Street, and City (that is, not allow data to be entered into these fields), set the Field Mode of each field to Display Only.

Displaying Data From Other Files

Note that this method of LINKING to other files can also be used in many other commonly used situations. For example:

In a Customer Screen, you can have a STATE CODE field with a link file name of STATES followed by a STATE NAME field with a Data Location file name of STATES.

In an Order Entry Screen, you can have a PART NUMBER field with a link file name of INVENTORY followed by a part description field with a Data Location file name of INVENTORY.

Derived Calculation

In response to the Wizard's prompt asking for a Derived Calculation you may enter a calculation. A derived calculation specifies that a field in a Wizard program will contain the result of the calculation. It can be any valid Pick-Basic expression, and it typically uses Wizard Field Names as variables.

A derived calculation can be used in a Wizard Screen or a Wizard Report In a Wizard Screen a derived calculation is calculated and displayed whenever any Wizard Field in the calculation is changed. In a Wizard Report, this is calculated just before a Field is printed.

Derived Calculation Example

Let us consider a Wizard Screen with a field named EXTENSION. If you want EXTENSION to be calculated as the field QUANTITY multiplied by the field PRICE, you would specify a calculation of:

   QUANTITY * PRICE

Note: Wizard will automatically set the Field Mode selection to Display Only since this is nearly always what you will want.

When you run your generated program, EXTENSION will be calculated and displayed whenever QUANTITY or PRICE is changed.

If you do not want the calculation to be stored in a file, you may change the 'Data Location to working storage.

The TOTAL Function

You can also use the Wizard function called TOTAL in a calculation. The TOTAL function totals a multi-valued field.

For example, if EXTENSION was a multi-valued field, then the calculation TOTAL(EXTENSION) would calculate the total of all the values in the EXTENSION field.

Note: The TOTAL function has only one parameter (the Field Name of a multi-valued Wizard field).

Division And Rounding

Using division in a Wizard Screen calculation can result in non-integer values being stored in file data. You would usually not want this because all numbers in a multi-value database are stored as integers. Dollar amounts are typically stored as cents.

For example, if you were calculating

   DOLLAR.AMOUNT / QUANTITY

You would want to round the answer to a whole number (of cents) by substituting the following calculation:

   ICONV((DOLLAR.AMOUNT/QUANTITY),MR0)

Notes

Default Value

Any Wizard field may have a default value. When you select this option from the E menu, several options are displayed. You are asked to choose, as a default value for this field, between one of the following options:

   System Date
   System Time
   Constant Value
   Related File Value
   Calculation
   Clear Default

To select an option, use your cursor keys or else type the first letter of the option. When the appropriate option is selected, press <Return>.

Note: If you want to regenerate a Wizard Screen that contains a Default Value that was created prior to June 1988, you need to use the Wizard E command on the fields that have DEFAULT VALUES. The E command will display the Detail Menu Screen. Then press the <Return> key to return to the Enter Command prompt. This will update the default value parameter.

You can find out if you have any Screens with default values by listing attribute 121 in the WVD file.

A default value is automatically copied into an empty field of a Wizard data entry Screen just before the data entry operator would normally enter data into the field. The main idea is to save some typing.

The Default Value is only copied if the field is empty (i.e. it will not be copied into fields for existing items).

If you set the Field Mode to Display Only the data entry operator will not be allowed to change the default value.

Default And Skip

You can specify that after a Default occurs, the current Wizard field will be skipped. That is, the data entry operator will not be allowed to change the default data immediately after the default occurs. The data entry operator can, however, go back to the field to change it.

For example, you could have several consecutive Wizard fields with File Related Default and skip specified. Let us say that the fields brought in address information into an Order Entry Screen. What would happen is that all the fields would be filled in and then the data entry operator could go back to change any data that needed to be changed.

Default and Skip is specified by specifying any Default and then specifying the D option for Skip Condition.

The System Date Default

The System Date default causes the system (current) date to be copied into a field. Typically, a field with a System Date default has a date Data-Type such as D2- or D2/.

You can create a date stamp field by specifying a field with a default value of System Date and a Field Mode of No Display.

The System Time Default

The System Time default causes the system (current) time to be copied into a field. Typically, a field with a System Time default has a time Data-Type such as MT or MTH.

Constant value.

If you want to use a constant value as a default, you will need to specify a constant default value. This section outlines what you can do.

You may specify a constant default value for a particular field of a Wizard Screen when the field frequently contains the same (constant) value.

Constant Default Value Example

For example, let us say you want to create a data entry Screen that enters data into a Customer file, and most of your customers are in Illinios.

You would specify a constant default value of IL for the STATE field. (Do not use quote signs when entering the Constant value.)

How the STATE field works

The constant default value appears in the STATE field just before the data entry operator would normally enter the state. If the data entry operator wants to use the default, they just press the <Return> key. For those customers who are not located in Illinios, the data entry operator overrides the default by entering the correct state.

If all of your customers are in Illinios, you could specify a Field Mode of Display only or No display.

Constants may, of course, also be numbers. Once again, you should not enter quotes around the number.

Related File value

You may wish to use a value in another file. To do this, you need to specify three things in order for your program to retrieve a value from a Related file, these are:

  1. The name of the Related file.
  2. The attribute number in the Related file that contains the value.
  3. The field name of the field (in this program definition) that will contain the item-id to retrieve the value from the Related file.

A "related file default value" specifies that a value in a related file will be copied into a field in a Wizard Screen just before the data entry operator would normally enter data into the field.

Notice that the Default and Skip option is automatically turned on. This is necessary to make the related file default value operate correctly.

A Related File Default Value Example

For example, let us say you are designing an Order Entry Screen. The main file is ORDERS. One of the fields on the screen asks for the Customer Code and another asks for the Customer Discount Code.

The Customer Discount Code is frequently the same as attribute 5 in the CUSTOMER file. So you would specify a related file default value for the Customer Discount Code field as follows:

   Related File..... CUSTOMER
   Attribute number. 5
   Field Name ...... (the Field Name of the Customer Code field, CUSTOMER.CODE)

The Customer Code field will contain the item-id (record key) to retrieve the default value from the CUSTOMER file.

How The Order Entry Screen Works

  1. The data entry operator enters data into various fields, including the Customer Code field.
  2. Just before the data entry operator would normally enter data into the Customer Discount Code field, the discount code from the CUSTOMER file is copied into the field and displayed. Execution proceeds to the next field.
  3. If the data entry operator wants to change the default discount code, the uses the / command to back up to the previous field and then enters a different code.

Related File Default Or Data Location?

You specify a related file default value for a particular field of a Wizard Screen when the field frequently, but not always, contains the same value as a field in a related file. In other words, you want the data entry operator to be able to change the value in this field without changing the value in the related file.

You specify a related file Data Location for a particular field of a Wizard Screen when the field always contains the same value as a field in a related file. So, if data is entered into or changed in the field, then the data is actually being entered into or changed in the related file. In this case, the data is only stored in one location.

Calculation

If you want to use a calculation as the default value for a field, you should use this option. This section outlines how to enter a default calculation.

A calculation default value specifies that a mathematical expression will be calculated and the result copied into a field in a Wizard Screen Just like the other Default specifications (and unlike a Derived Calculation this happens just before the data entry operator would normally enter data into the field.

A calculation default value can be any valid Pick-Basic expression, and can include Wizard Field Names as variables.

See the previous explanation of derived calculations for more information about calculations.

Data Validation.

The E (Edit field details) mode allows you to specify some data validations which Wizard will perform on any data entered into a specific field. You have six options which will be displayed when you select this option from the E Screen, these are:

   Numeric Range
   Data Length
   Pattern Match
   Related File
   Not on Related File
   Clear Validation

Use the cursor keys to select the desired validation, or press the first character on the line. When the option you want is selected, press <Return>.

A data validation specifies that when the data entry operator enters data into this field, the data will be validated (checked for accuracy). If the data is valid, it will be accepted. If the data is invalid, then your program will immediately notify the operator with an error message and re-prompt for data in the same field.

Note: Data validations are extremely versatile and should cater to your needs in the vast majority of cases. Nonetheless, should you require a more sophisticated data validation refer to the User Input Conversion code segment (under the EC command elsewhere in this manual).

Numeric Range

Should you wish to check that the data entered into a field falls within a certain (numeric) range, you should use this data validation Upon selecting this option, Wizard will ask you to enter some numbers. These are:

  1. The Minimum number in the range of acceptable entries. Enter a number (it may be negative) and then press <Return>. Wizard will next prompt you for
  2. The Maximum number in the range of acceptable entries. Enter another number (it may, once again, be negative, but it MUST be larger than the first number) and then press <Return>.

At either of these prompts Exit will take you out without altering anything.

The numeric range Validation specifies that the data entry operator will only be allowed to enter a value into a field that is within a particular range of numbers.

Validation: Numeric Range Example

For example, let us say you are designing an Employee Entry Screen. One of the fields on the Screen asks for the employee's age. The employees are always at least 16 years old and rarely more than 70 years old. So, for the AGE field, you would specify a Minimum number of 16 and a Maximum number of 70.

Then, if the user tries to enter a number outside this range (say 116) an error message will be printed at the bottom of the screen and will subsequently be returned to this field and Wizard will await a valid entry.

Data Length.

You may wish to check the length of the data input by the user, and restrict it to a certain size. This is necessary since, although a field has a limited size on the screen, the user may (by pressing the key defined as the Margin Release key or using the /ED command) enter data which is longer than the display for that field on the screen.

To specify a length check, Wizard will prompt you for the following information:

  1. The Minimum data length for the field.
  2. The Maximum data length for the field.

The data length Validation specifies that the data entry operator will only be allowed to enter data into a field that is within a particular minimum and maximum length.

Validation: Data Length Example

For example, let us say you are designing a Document Entry Screen. The first field on the Screen asks for the document identifier. Document identifiers are composed of letters and numbers, and are always between 7 and 10 characters long. So, for the IDENTIFIER field, you would specify a Minimum Data Length of 7 and a Maximum Data Length of 10.

If the user then fails to enter a value with a length between these values, Wizard will display an error message at the bottom of the screen and await a valid entry for the field.

Pattern Match

Sometimes you may wish to validate the user's input into a field against some form of pattern, such as, for example, a telephone number of three digits, a dash, and then four digits. This option allows you to do so.

Two types of pattern can be specified, and multiple patterns may be entered (once you have selected a pattern validation you will, after each pattern, be asked if you want to add another pattern). These two types of pattern are:

VA Variable pattern, or
CA Constant pattern.

These pattern types are explained in detail below. Once you have selected one of these, you will be asked to enter a pattern.

Variable Patterns

Variable patterns are made up of a series of particular codes. Basically, a pattern may be a combination of any (or all) of the following:

NThe data is to be numeric.
AThe data is to be alphabetic - i.e A to Z or a to z, but no other character.
XThe data can be any character on the keyboard.

These codes may each be preceded by a number which tells Wizard how many of each character type we are to expect. So 5N means that data is validated against 5 numerics.

Further, specific symbols can also be inserted into a pattern, such as - or /, so you may wish to pattern match a date against 2N/2N/4N, which would accept 06/08/1999, for example.

Some examples of variable pattern matches are:

5Nmeans accept a data value which is 5 numeric characters.
8Xmeans accept a data value which is any 8 characters.
2Ameans accept a data value which is 2 alphabetic characters.
0Nmeans accept a data value which is any number of numeric characters.
3N-4Nmeans accept a data value which is 3 numeric characters, followed by a dash, followed by 4 numeric characters.

Constant Patterns

Constant patterns are more restrictive than variable patterns. What the user enters must match the pattern exactly. Some examples will serve to illustrate the point:

Ymeans only accept a data value which is a Y.
YESmeans only accept a data value which is a YES.
#means only accept a data value which is a #.

Hint: If you use this pattern on the item-id field of a screen, the screen will only allow new items (records) to be entered. We call this an add only screen. Also, make sure the # option is turned on with the EF command.

Multiple Patterns

After entering either of these pattern types, Wizard will then ask you whether you wish to add another pattern. Each subsequent pattern may be either Variable or Constant type.

Note that multiple patterns are OR-ed, i.e. the data entered needs to match only one of them to be acceptable.

Multiple Pattern Matching Examples

The following two Variable Patterns could be used to validate US telephone numbers:

   3N-4N 3N-3N-4N

The following four Constant Patterns could be used to validate YES or NO answers:

   Y N YES NO
Related File.

You may wish to validate input into a field against data in another file. To do so you can use this validation option.

Wizard will ask you to enter the name of a related file. If you enter a valid file name, when data is entered into this field Wizard will look in that file to see if an item exists with the ID entered into this field. If it exists, this data is acceptable.

Related File Example

For example, let us say you are designing a Customer Entry Screen. One of the fields on the Screen asks for the two-character state code. The item-ids (record keys) of the STATES file are the state codes. So, for the STATE CODE field, you would specify a Related File Name of STATES.

A portion of the STATES file looks like:

Item-Id1. State Name
AKAlaska
ALAlabama
AZArizona

(This example would only make use of the Item-Id.) Only an entry which matches one of these items in the STATES file would be accepted.

Not on Related File.

Sometimes you may wish to ensure that data entered does not yet exist in another file (the opposite to ensuring it does exist as described above). To do this use the "Not on Related File" validation.

Wizard will ask you for the file name. If you then enter a valid file name, when the screen runs Wizard will check to ensure that the data entered into this field does not exist as an ID (record key) in the file.

Field Mode.

The Field Mode determines how a field is to be handled whether it should allow input by the user or not; whether it should allow the user to change data once it has been accepted, and so on. When you select this option you are presented with several possible alternatives. Only one per field may be active at any one time. Your options are:

   Display Only
   Mandatory Entry
   Input Once
   No Display
   Break-control
   Total

For Screens:

Display Only

Selecting this option will mean that no data can be entered into this field. Any data in this field (which may be the result of a calculation or a code segment or as description from a related file, etc.), will be displayed.

Mandatory Entry

Selecting this option will ensure that there is data entered into the field. If the user attempts to enter a null (by just pressing <Return>) at this field, an error message will be displayed at the bottom of the screen. Even if the user by-passes the field (using / and field number, Wizard will not allow them to file the item until there is some data in this field.

Input Once

This option will not allow the user to change data once it has been entered and accepted (Filed). If the item is an Old Item (i.e. it already exists rather than being entered anew by the user) and the field already had data in it, then the field can not be changed.

No Display

A No Display field will not display the data portion of a field. If you do not want the label to appear, the label can be deleted. No data can be entered into this field.

For Reports:

Break-Control

The Break-control field mode specifies that, when a report is run, a control break will occur each time the value of the field changes. A control break causes a Break Footing Section to be printed. For more information, see the Start Report Section command.

Total

The Total field mode specifies that when a report is run, this field will accumulate the total of a particular attribute as items (records) are displayed. If the Total field is in a break footing section, the Total field will display the sub-total since the last control- break. If the Total field is in a report footing section, the Total field will display the grand total for the entire report.

Skip Condition.

Sometimes you may have several fields in sequence which are dependant upon an earlier field, and if you enter a null there is consequently no need to enter data in several subsequent fields. Thus you may want to skip these fields if a null is entered.

There are two possible entries, these being:

  1. The number of fields you want to skip. The skip condition detail specifies the number of fields to skip over if there is no data in the current field and no data is entered into the current field. (That is, the data entry operator presses the <Return> key.)
  2. The letter D, which tells Wizard to Default and Skip this field. The skip condition can also specify Default and Skip. See also the previous explanation of default and skip in the section about default values.

    Note that if you use Default and Skip on an Item ID field (so that a default item is always edited by this screen), you will also need to include the following piece of code in your Entry Time code segment. The code is:

       ID.SOURCE = 2
    

    If you do not include this code, you will not be able to exit the screen!!!

A Skip Condition Example

For example, let us say a data entry screen contained these two fields:

   ADDRESS LINE 1 ____________________________
   ADDRESS LINE 2 ____________________________

You would set the skip condition detail for the ADDRESS LINE 1 field to 1. Then, if the data entry operator did not enter any data for ADDRESS LINE 1, (and ADDRESS LINE 1 had no data in it), then ADDRESS LINE 2 would be skipped.

Field Help (<F1> or ?)

Wizard allows you to enter any amount of text to describe a give Field on any Screen. The text is stored in the WIZHELP file (by default) and data entry is by means of the Wizard Word Processor.

Wizard will automatically assign a unique Id for the Help Text which is a combination of the Screen Id and the Field Name. Therefore, if the Screen's Id (or WVD Id) is ENTER.ACCOUNTS and one of the Field Names in this Screen is ACCOUNT.NUMBER, then the Default Help Id would be ENTER.ACCOUNTS.ACCOUNT.NUMBER.

This means that if you have a Field ACCOUNT.NUMBER in many Screens, then you will have many Help Items with the same details describing the Field.

You may change this to a more specific Id like ACCOUNT.ID and this could be the same Help Id used when ever you have a Screen with an ACCOUNT.NUMBER field.

See the EH Command, Edit Field Help, for details on how to enter this Help.

Interactive 2 Line Help

2 Line Help or Interactive Help is displayed at the bottom of your Screen in the Acceptance Prompt area. This help is displayed if the data entry operator enters invalid data in a given field or if the Interactive Help flag is on. This flag may be switched on/off by entry of /H at any Field.

Wizard will automatically generate 2 Line Help as you update details such as Default Value, Derived Calculation, Field Mode, etc.

When you change this 2 Line Help the Wizard Screen Editor window will open.

You may enter all the help on one line or over many lines, Wizard will reformat the Help to fit on only two lines. Note You cannot format these two lines, Wizard will put as much text on the first line as it can and the remainder will go on the second line. If you enter more text than can fit on two lines, Wizard will truncate the second line.

2 Line Help Special Features

If you start your field description with a colon (:), then the Wizard Generated 2 Line Help will be concatenated on to the end of Your 2 Line Help rather than inserted before Wizard's help.

If you start your 2 Line Help with an equal sign (=), then your 2 Line Help will replace the Wizard generated field description.

EC: Edit BASIC Code Segments.

Code Segments allow developers to enhance the functionality of Wizard screens and reports by allowing them to incorporate BASIC code directly into the body of a Wizard program. This permits unlimited flexibility and removes the limitations otherwise inherent in any 4GL.

There are a number of code segments available for you to use, depending upon what you want to do. When you edit code segments, you (by default) use Wizard's Screen Editor (although you may choose your own preferred editor).

Detailed description and examples for the code segments appears in Appendix 2 of the manual, and you should refer to that section if you require specific information.

ECG: Edit Global Code Segments

The ECG Command allows you to Edit the Global Code Segments. A window will open and allow you to Edit the following Code Segments as follows:

ECF: Edit Field Code Segments

The ECF Command will allow you to Edit a given Field's Code Segments. You may enter ECF with a field number or just ECF and then move to the appropriate field. A window will open to allow you to edit the following Code Segments:

EBI: Edit Before Field Codes

The EBI Command allows you to Edit the Before Field Code Segment for all Fields on the Screen.

EIC: Edit Input Conv. Codes

The EIC Command allows you to Edit the Input Conversion Code Segment for all fields on the Screen.

EOC: Edit Output Conv. Codes

The EOC Command allows you to Edit the Output Conversion Code Segment for all Fields in the Screen.

EAI: Edit After Input Codes

The EAI Command allows you the Edit the After Input Code Segment for all Fields in the Screen.

EAF: Edit After Field Codes

The EAF Command allows you to Edit the After Field Code Segment for all Fields in the Screen.

ED: Edit help for a field.

To edit the 2 Line Help (or Interactive Help), type ED at the Wizard Screen Formatter command prompt and then press <Return>. Wizard will then ask you to move the cursor to the field for which you wish to edit the help. Once you have moved the cursor there (using the numeric keypad or the arrow keys), press <Return>.

Note that when you use the ED Command you cannot see the Wizard generated 2 Line Help. To see this use the E Command.

EF: Edit Screen's Features.

The EF Command, Edit Screen Features, presents you with the following options for the current screen. Note that this screen is itself a Wizard screen so the standard Wizard commands will work. This screen appears in a window as follows:

Wizard allows you to select or omit various features from a generated program. The fewer the features, the smaller the program.

Enter a Y to select a feature or an N (or nothing) to omit a feature.

Hint:

Only enter Y for the features that you want turned on and do not enter N. ie. For the features that you do not want, make them blank or null by entry of a <Space>, as this makes the screen easier to read.

The fields on this field are:

1 Preselect Item IDs
Preselect Item IDs allows you to pass an item-id when a screen is run. The Wizard Menu System allows you to pass data from the Menu to any routine, in this case you would pass the item-id.

You could also run the routine by EXECUTEing or CHAINing to the Screen or from TCL. This is done by typing the item-id immediately following the screen name. If you have a data entry screen named INPUT-CUST, and you wish to enter or change data for customer number 123, then type:

   INPUT-CUST 123

Note: If the Screen has No Id field and you set the Preselect Item IDs then Wizard will automatically use the Item Id that you pass and immediately read the Item. When you file, delete or Exit the Item then Wizard will Exit the Screen. In this case you should also set the Erase the Screen when an Item is Filed to N.

2 Allow the operator to File items
The Allow the operator to File items allows you to control the filing of data. An N or space answer to this selection prevents updating of files affected by the generated screen program

3 Allow the operator to Delete items
The Allow the operator to Delete items allows you to control the deletion of data. A Y answer allows the screen operator to delete the item on the screen. An N or a space answer prevents the ability to delete the data shown on the generated screen.

4 Allow the operator to go to a specific page
This allows the operator to use the /PG command. The /PG command causes the next page of a line item set to be displayed. The /PG command followed by a page number causes the specified page to be displayed. The /PG command is entered from the Index field of the line-item set.

5 Activate the '.' and '...' features
This feature provides a data entry short-cut for certain types of data that can be duplicated from screen to screen. If you wish to use these functions, enter a Y.

Entering a single dot .
If a single value, Wizard replaces the dot with the value from the previous item, current field. If in a LIS, Wizard enters the value from the current item, current field, previous value.

Entering a triple dot ...
This duplicates the entire previous item.

WARNING

The triple dot ... will copy the entire previous item, including data that is not displayed on the current Screen which may include history or security type data such as Opening and Closing account balance and outstanding payments etc..

If you wish to allow the single dot . and disable the triple dot ... then you will need some Command Time Code Segment code:

   IF WCOM='...' THEN WCOM='.'; I$='.'

ALSO NOTE:

This feature will work for both New Items and Old Items.

6 Allow the '$' feature
This causes Wizard to select item-ids (keys) from a SELECT or SSELECT list. If $ is entered into an item-id field (usually field 1), Wizard selects the next item-id from the current SELECT or SSELECT list. In addition to entering $ you may enter /S or /SS which will Select or Sort Select the Major file.

The /S and /SS may optionally be followed by a valid Access statement. For example:

   /SS BY DATE WITH BALANCE > "0"

Both DATE and BALANCE need to be DICTionary items in the Major file.

7 Allow the '#' feature
If # is entered into an item-id field (usually field 1), Wizard enters the next sequential number as the item-id. (The Next Sequential Number is stored in the Wizard file WIZ.NEXTID using the Major files name as the Id). The next sequential number for a given File can be set to a particular value by entering the /# command at the field. Wizard will control the Sequential Ids that are allocated, if the data entry operator Exits the Screen without saving the item then Wizard will put that Id back so that it can be used next time.

8 Display the Data Picture for the operator
This causes Wizard to display the Data Picture of each field. The Data Pictures are displayed for all fields in a new item and for all unused fields in an existing item. If you do not want to display the Data Pictures, then enter an N or <Space>.

9 Acceptance Prompt
This feature has been provided to allow you to turn off the Acceptance Prompt. Typically this would be Y for 99.9% of your Screens but you may wish to use this feature. When this feature is off, then after the last field on the screen, Wizard will go directly to File time and then file the item. You may enter /FI from any field to file the item. Entry of <Escape>, <F10> or /EX from any field other than the first field will work the same as if you were at Acceptance Prompt. (If at the first field then Exit the Screen). Mandatory fields are still checked at File Time to ensure that data is in these fields.

10 Include comment lines in the program
This causes Wizard to include PICK/BASIC comment statements in the generated source code. Only use this feature to view the actual code produced by Wizard. When you have finished viewing the code with Comments then turn this feature off to save space.

11 Erase the screen when an item is filed
When data entry for an item is completed, the item is filed, and the cursor is re-positioned to accept the next item id. Many people like to have the screen erased at this point. However, others may not want this feature, which causes the generated data-entry screen to print more than is necessary. If this feature is not used, the old data is erased after you enter the next Item Id.

12 Activate the Editor command '/ED'
This feature allows the data entry operator to enter the /ED command at any field in a data entry Screen to activate the Wizard Editor.

13 Remove extra blanks from the program
This feature removes the leading blanks from a generated Screen program. The PICK/BASIC statements will be unformatted and the program will be smaller. Typically this will be Y unless you also turn on Include comment lines.

14 Recalculate when an Old Item is selected
This feature performs all calculations after a data entry operator enters an item-id that retrieves an old item (an item that already exists). You should use this feature when all of the following conditions occur:

  1. The data entry Screen contains a Line Item Set.
  2. The Line Item Set contains Linked fields. (Fields that are located in a related file).
  3. A calculation is performed on one or more of the Linked fields.

This feature will slow down the retrieval time of an old item because all related items will also be retrieved to make correct calculations. (Normally, only items that are displayed are retrieved).

15 Activate the '//' Jump Screen feature
If you activate this feature, the user will be allowed to use the // command from any field within the screen. This allows the user to jump from this screen into any other process. If only // is typed, a list of available options will be given and the user will be allowed to select one of them.

To use this option, you must have first run the system option available from the menus to Build the Menu Access List (this option is found in the Account Setup menu). Following this, you need to set up the jump list, which you can do by going to the Wizard generator menu (type W), then enter the Setup menu and use one of the Jump-List setup screens.

16 Make this Screen display in a pop-up window
This option allows you to display small screens within a box. Selecting this option will stop the entire screen from being cleared. Wizard will only overlay the screen with the current routine. The Acceptance Prompt for this screen will still appear on the bottom two lines of the screen.

EF: Edit Features (Reports)

When you select the EF Command option from the Wizard command prompt in a report screen, you are presented with a Wizard screen which allows you to set features for Wizard reports The screen appears as follows:

Wizard allows you to select or omit various report features. You may change the features of a report whether it was designed with the "custom" formatter or the "instant reports" formatter.

Enter a Y to select a feature or an N (or nothing) to omit a feature. The functions of the various fields on the screen are described below.

1 Activate the Report Browsing capability
This allows the user of a report to scan forward or backward, as well as left and right, through a report from a terminal. This makes it possible to view a report of any width (up to 240 characters) from a terminal.

A report may be browsed when it is first run, or may be browsed at a later time. Browsing automatically saves the last report run in a special Browse file.

Report browsing is a valuable feature, however, it does require more running time than reports without the feature. If you do not want report browsing, enter an N.

2 Suppress the report Page Header
This allows you to suppress the printing of the Page Heading of a report. If you do not want the Page Heading to print, enter a Y to suppress it.

3 Suppress the report Column Header
This allows you to suppress the printing of the Column Header of a report with a columnar detail structure. If you do not want the Column Header to print, enter Y to suppress it.

4 Suppress the report Detail
This allows you to suppress the printing of the Detail section of a Columnar Detail or Forms Detail report. It is sometimes desirable to see the results of a report without detail. If you do not want the Detail portion to print, enter Y to suppress it.

5 Double Space after each item
This tells Wizard to put a blank line after the printing of the detail for each item. This often makes a report more readable.

6 New Page after each item
This tells Wizard to put each item (Record) on a new Page. Unless you have any BREAK HEADING fields then Wizard will print the next item on the same page as the current one.

7 Allow a choice of Detail or Summary
This tells Wizard to prompt:

   Do you want a Summary ONLY Report  (Y/N)

The default is N

If the answer is N then the report will be produced as you have defined it. If the answer is Y then only the REPORT HEADING, PAGE HEADINGs, BREAK HEADINGs, BREAK FOOTINGs, PAGE FOOTINGs and REPORT FOOTING will be printed if these sections are in your report. All of the code segments will be executed, including the GLOBAL DETAIL and FIELD CODE for all detail Fields. If you have any user code in the Detail area like:

   P$={any text to be printed}; GOSUB 18000

Then you will need to prefix this with:

   IF NOT(WSUMMARY) THEN

For example:

   IF NOT(WSUMMARY) THEN P$={any text}; GOSUB 18000

8 save the Report each time it is run
This tells Wizard to save the Report to the Browse Port File using the WVD Id as the report Id, which allows you to review this report at a later date. Each time the Report is run the last report is lost. If you wish to save the Report then run the Wizard program WSaveReport. When you wish to review this Report then run the Wizard program WReviewReport.

9 SORTing Items
Wizard can produce a report in which the records (items) in the report are sorted by the data in any field (attribute).

To produce a sorted report, you specify one or more sort criteria. Each sort criteria consists of a SORT Field Name and a Type (see the picture above).

For the SORT Field Name, enter the name of the Wizard field you wish to specify as a sort field.

For each SORT Field Name, enter the Type of sort: A for ascending, or D for descending sort

Be sure to enter the sort criteria in their order of importance from most important to least important. For instance: REGION, STATE, COUNTY, CITY would be a logical order.

10 SELECTing Items
Wizard can produce a report which contains a selected group of the records (items) in a file.

To produce a selected report, you specify one or more selection criteria Each selection criteria consists of a SELECT Field Name, a SELECT Operator, and one or more SELECT Values (see the picture above).

For the SELECT Field Name, enter the name of the Wizard field you wish to specify as a sort field.

For each SELECT Field Name, enter one of the following SELECT Operators:

=to specify that your Wizard Report selects records (items) in which the value in the SELECT field equals the SELECT value. If more than one SELECT value is specified, a record will be selected if the SELECT field equals any of the SELECT values. (SELECT values are explained in the next section.)
#to specify that your Wizard Report selects records (items) in which the value in the SELECT field does not equal the SELECT value. If more than one SELECT value is specified, a record will be selected if the SELECT field does not equal any of the SELECT values.
>to specify that your Wizard Report selects records (items) in which the value in the SELECT field is greater than the SELECT value.
<to specify that your Wizard Report selects records (items) in which the value in the SELECT field is less than the SELECT value.
>=to specify that your Wizard Report selects records (items) in which the value in the SELECT field is greater than or equal to the SELECT value.
<=to specify that your Wizard Report selects records (items) in which the value in the SELECT field is less than or equal to the SELECT value.

For each SELECT Field Name, enter a value (or more than one value separated by commas) to compare against the SELECT field. For example:

1000For each record (item), compare the SELECT field against the value 1000.
2-10-93For each record (item), compare the SELECT field against the date 2-10-93.
2/10/93Same as the previous example. Any date format is allowed.
CAFor each record (item), compare the SELECT field against the value CA.
C]For each record (item), compare the SELECT field against any value that begins with C. The right bracket (]) at the end of the value means "begins with".
[AFor each record (item), compare the SELECT field against any value that ends with A. The left bracket ([) at the beginning of the value means "ends with".
[CA]For each record (item), compare the SELECT field against any value that contains CA. Enclosing the value in brackets ([]) means "contains".
CA,AZFor each record (item), compare the SELECT field against the value CA or the value AZ. The comma (,) means "or". Using a comma only makes sense for the equal (=) and not equal (#) SELECT operators.
714],213]For each record (item), compare the SELECT field against any value that begins with 714 or any value that begins with 213.

EG : Edit Global parameters.

The Global Parameters screen allows you to specify certain information that applies to the entire generated program.

The Global Parameters screen looks like this:

The fields in this screen have the following meanings:

1 Program Type
The Program Type specifies the type of program you are creating with Wizard. This parameter is initially set by the program designer when Wizard is entered to create a new program.

D type programs are data entry programs. R type programs are reports.

2 Program Structure
The Program Structure specifies whether the program is a Main program, a Subroutine, or a Second Screen. Unless you use the EG screen to modify this field, all programs are defaulted to be Main programs (type M.)

The three types of screen are:

MThe M (Main Program) structure is the default structure and creates code which can be run from the command line.
SThe S (Subroutine) type causes a Wizard screen to be generated as an external subroutine. If the S type structure is used then the calling program must pass data, typically the item-id to the S structure program as a parameter in a CALL statement.
SSThe SS structure is a Second Screen subroutine. This subroutine is designed to share all the main data variables with your primary screen. See the Linked Screens discussion below.

3 Program File Name
The Program File Name specifies the name of the file in which to store the generated source code (the default is W2).

4 Main Data File Name
This field specifies the name of the Major file where data is accessed by your generated Wizard program. This parameter is initially set by the program designers when they start to design a new Wizard program.

5 Split Screen Row
This field specifies the row from which Wizard will clear to the end of the Screen. You would use this when you have more than one Wizard Screen (see Linked Screens). The Main Screen would CALL a second whose Structure would be SS and would have a Split Screen Row.

When you run a Split Screen Row program, the terminal display is erased from the Split Screen Row to the bottom of the screen. The same area is erased when you exit the screen.

You would paint the fields starting at the Split Screen Row.

6 Help File Name
This field specifies the name of the file in which to store generated documentation (the default is WIZHELP).

When a program is generated, Wizard also generates documentation for each field in a data entry screen program. If you have added Field Descriptions or Help (with the ED Command, E Command or the EH Command), then Wizard adds those descriptions to the generated documentation.

7 Concatenation Char
This is used when you specify a Multi-Field Item-Id. A Multi-Field Item-Id allows you to generate a screen in which the item-id is composed of the data in more than one field. All you need to do is specify (with the E command more than one field with an item-id of 0 (zero)).

If you specify a Multi-Field Item-Id, the Concatenation Character is used between the parts of the item-id.

If you specify a Multi-Field Item-Id you must also specify a Concatenation Character.

8 Program Description
This is used as the heading for the box in which the screen is displayed if that feature is selected, refer to the EF Command for Wizard Pop-up box Screens.

9 Write Attribute Defs
If Y, then Wizard will automatically create Attribute Definitions and stores them into the WIZ.DICTS file and into the dictionaries of the Main and Linked files when a Data Entry Screen is saved. The definitions in WIZ.DICTS can be re-used when painting other Screens and includes all field Code Segment code.

If you specify N for Write Attribute Defs then no attribute definitions will be created. Be careful with this because Sorts and Selects in Wizard Reports use these attribute definitions.

10 Global Colours

11 Additional Files
For more information on setting up additional files, refer to the AF command.

12 Linked Screens

EH: Edit Field Help

In addition to the two-line or Interactive user help discussed above under the E command, Wizard allows you to enter more substantial help for each field. This type of help is displayed in response to the user pressing their <Help> key at the particular field for which they want help.

To maintain this sort of help for the screen, you can use the EH command from the Screen Formatter's command prompt. If you add a field number to the EH command, Wizard will display a window with that field's help immediately, otherwise you will be asked to select the field whose help you want to maintain.

The window which is displayed is the standard Wizard Word Processor window. The Help is stored in the file WIZHELP, unless you change this using the EG Command.

The Help Id consists of the Screen Name (WVD Id) concatenated with a dot and the Field's Name. If the Screen Name is ENTER.ACCOUNT and the Field's Name is ACCOUNT.NUMBER then the Help Id in WIZHELP would be ENTER.ACCOUNT.ACCOUNT.NUMBER. This can be changed to a common Id like ACCOUNT.NUMBER and used in all Screens where you have a Field Account Number. This is done with the E Command.

Note that field help can also be edited from the screen itself once it has been generated by pressing <F5> or U and <Return> from the field, provided that you have adequate security clearance.

EP: Edit field parameters.

Typing the EP Command at the Wizard command prompt will display the field parameters screen. This screen allows you to edit some of the parameters for the given field directly (many of the parameters can be set from other screens). This screen pops up in a window when a specific field is selected, and appears as follows:

The parameters of this screen are described below.

1 Field Name
The field name is the name Wizard uses internally to refer to the field. The default name is generated by Wizard from the field label, so if the field's label is Customer No. the Field Name would be CUSTOMER.NO. This is usually all right, but sometimes you have fields with the same label, so Wizard then generates a name using the label and adding a unique number, eg. CUSTOMER.NO2. If there is no label then Wizard will generate a default which is the Screen Name followed by a number.

Because this can be rather meaningless or very long, you can change the field name to something more meaningful. To do this, go to this field in the screen and type in the name you would prefer.

Note that when you do this or if you use the C Command to change the label, Wizard proceeds to alter any references to this Field Name in your code segments which means you should be careful changing fields called DATE, READ, TO, FROM, etc.

2 Type
Each field has a field type. These field types are as follows:

SThe S type field is the standard. The data in this field will occupy an entire attribute of the item.
VThe data stored in a V type field will be Multi valued. It can either be part of a Line Item Set or an individual item.
SVThe SV type field stores its data in a sub multi value delimited field. This can be either part of a Line Item Set or simply an individual item.
VMCThe VMC field type is the counter field for a Multi Value delimited Line Item Set.
SVMCThe SVMC field type is the counter field for a Sub Multi Value delimited Line Item Set.
FILENAMEA field of type FILENAME will use the data entered into this field to set the current Main File. Changing a FILENAME field will change the current Main File.

3 VMC Dets
If the type is a VMC or SVMC then when you enter this field a window will open to allow you to enter additional details that relate to Line Item Sets. The window looks like this:

4 Input Conversion
Both the Input Conversion and the Output Conversion are normally determined by the Wizard Data Type that you specify when you create the field, or by the Data Validation or Derived Calculation which you enter.

The Input Conversion is generally used to validate the input data and convert it into the format in which it will be stored in the file by Wizard. If the Input Conversion of the data results in a null, the entry is considered to be invalid, an error message will be printed and the cursor will not move on to the next field.

You can bypass all other Input Conversions by entering your own here. Enter /W to open a window to allow multiple Input Conversions.

Note that the validity of any conversions you enter is not checked by Wizard, so BE CAREFUL!

5 Output Conversion
The output conversion is similar in some respects to the Input Conversion (see previous). The Output Conversion changes the Internal format of the variable for display purposes. Again, you can change the Output Conversion.

6 Justification
A field's justification determines whether its data will be displayed against the left or right end of the data picture. Money fields are often right justified (indicated by the letter R in this field, L here means left justified). The justification also determines where the cursor will be positioned for data entry. This means that, if the field is going to be R, when the cursor prompts for input, it will appear to the right of the data picture and keys will scroll left as they are typed. If you use an L, the cursor appears to the left of the data picture (actually under the first position), and moves to the right as data is entered.

You may prefer to have numeric fields display right justified but entered from the left of the data picture, nearest the label. To achieve this, you should use L in this field and include an output conversion of MRn (where n is the number of decimal places of the field), or an equivalent form.

Field Colours

These fields are for Field related colours, you may access the Global Colours by typing the GC Command at the Command line of this Screen.

7 & 9 Label Colours
The Label is the name of the field like ## Customer No., the ## is the field number and can be set with the GC Command.

8 & 10 Picture Colours
Entering a colour in this field will change the colour of the text displayed when you type in data or for the data picture.

EPA: Edit all field parameters.

Use this command to view/maintain some of the more common parameters for all fields. You would use this command when you have finished painting all the fields on a Wizard Screen and now need to assign the linked files and attributes and for assigning Display only or Mandatory fields. The Screen looks like this:

<Esc> key: Exit Wizard.

The Escape command is always available. You Escape by pressing the key marked <Esc> on your keyboard, you do not need to press the <Return> key. The alternative here is pressing <F10> - which is equivalent to the <Esc> key. Wherever the <Esc> key is mentioned in these notes, <F10> will perform in exactly the same way.

<Esc> always takes you back to a previous command message. (that is <Esc> will move back one level.) The changes you made since that command will not be saved in most cases.

You can Escape (exit) from Wizard Screen Generator entirely by doing the following:

  1. Press <Esc> until you are returned to the main Wizard Screen Generator command prompt. Then press <Esc> once more.
  2. Wizard will ask you whether you want to save what you have done. You respond by typing Y or N. If you press <Esc> here you will be returned to the Screen Generator command prompt.
  3. Wizard will finally ask you if you want to generate the screen. Once again you can respond with either Y or N. A Y will cause Wizard to generate your screen.

FI: Save the changes to the screen.

When you have finished editing your screen, you can save the screen, together with any changes you may have made during the period you have been working on the screen, by using the FI command from the main Wizard Screen Generator command prompt.

Once you have typed FI and pressed <Return>, the screen definition item will be saved in the WVD file. After this, Wizard will ask you whether you want to generate the screen. To this question you may respond with either Y or N.

FS: Save Without Exiting

The FS Command allows you to save your changes without exiting the screen formatter It is good practice to save changes periodically to guard against system failures, accidents, etc.

The FS command works from Wizard's primary command prompt only.

GC: Global Colours

Entry of GC will open the Global Colours Window. This can also be done from the EG Screen and EP Screen.

GR: Draw Graphics

The GR Command allows you to add some amount of line graphics to your Wizard screens. Using line graphics can make some screens easier to follow for users.

To draw lines, enter the GR command from Wizard's Screen Formatter command prompt. Wizard will then ask you to do two things:

  1. Move cursor to start of line.
    Move the cursor to the position on the screen where you would like the line to begin and then hit <Return>.
  2. Move cursor to end of line.
    Move the cursor to the position on the screen where you would like the line to end and then hit <Return>.

Note: Each line can only be either horizontal or vertical. If you move the cursor to some position other than one on the same row as the start or in the same column as the start, Wizard will exit graphics mode and return to the command prompt.

Once you have selected the start and end line positions, Wizard will ask you what type of line to draw. There are two line types currently supported:

0Type 0 is the default line type. It is a normal line graphics line, similar to those which appear at the border of Wizard menus, etc.
1Type 1 is a solid reverse line the width of 1 character.

Once you have selected a line type, Wizard will display the line.

If the line intersects with others, Wizard will determine the appropriate intersect character and use it. While using the Screen Formatter, line drawing will be relatively slow as Wizard recalculates intersections each time the lines are re-displayed. When the screen is generated, however, you will find that these graphics display quickly.

To delete graphics, refer to the DG Command.

L: Insert a line item set.

The L Command tells Wizard that you want either to add a new Line Item Set to the screen or else you want to add extra fields to an existing Line Item Set.

A Line Item Set is a group of fields that are used to hold data such as the line items in a purchase order. The first field of a Line Item Set is a dummy field (it is not stored) that we refer to as an index field. It is used by the data entry operator to select a particular line of a Line Item Set.

A line item set will normally look something like this:

   4 Ln  Field 1     Field 2
   ##### ___________ ____________
   ##### ___________ ____________
   ##### ___________ ____________
   ##### ___________ ____________

Try selecting Edit Menus in the Account Setup menu (the top menu once you have installed Wizard into an account) - or alternatively, type ED0 at any menu. This screen contains a Line Item Set. Notice how the Index Field of the Line Item Set can be used to go back to a previous line after the line has been entered.

Creating A New Line Item Set

At the Wizard command prompt in the Screen Formatter type L and hit <Return>. Wizard will ask you if you are starting a new Line Item Set. As you want to create a new one (see below if you wish to add extra fields to an existing field) you may simply press <Return>.

Wizard will now ask a series of questions to determine how you want to set up this Line Item Set. These are:

How many lines of this Line Item Set will be displayed?
Enter the number of lines to display. In other words, the number of values per field that will be displayed (for each field in the Line Item Set).

Let us say that your answer is 5. This does not mean that data entry is limited to 5 values per field (although it may be limited, see below). In fact, you may enter hundreds of lines of data if required. However, only 5 lines will be displayed at any one time while the data entry operator is entering data.

What is the maximum depth for this Line Item Set?
You may wish to allow the user to enter no more than, say, 12 lines. To do this, enter 12 here and press <Return>. If you do not enter a number but just press <Return>, there will be no limit to the number of lines the user may enter (this also occurs if you enter 0).

If the maximum depth of the Line Item Set equals the number of lines displayed, then the Line Item Set will not scroll.

This can be especially useful if, for example, you wish to display a Line Item Set with an entry for each month of the year. Then all you have to do is make the maximum depth and the display depth both 12. You may also wish to disable the /D and the /E functions (to insert or delete a line of this Line Item Set), to do this you use the EP Command on the Line Item Set Counter field and go to the VMC Dets field. Another window will open, from here go to the Ins & Del field and enter N.

Which field do you want to exit the Line Item Set from?
Normally, entering a null (just pressing <Return>) in the first field after the line counter of a Line Item Set will exit that Line Item Set (moving either to the next field of the Line Item Set or, if the Line Item Set is at the end of the screen, to the Acceptance Prompt).

In some cases, however, you may not wish to exit until a null has been entered into both the first and second fields in the Line Item Set. In this case you would enter 2 here.

This same procedure applies if you wish to increase the number of null fields before exiting - simply increase the number you enter. Entering a null (just pressing <Return>) is equivalent to entering 1 - the default.

Move the cursor to the Data Label location by using the numeric pad Then press the <Return> key.
Move the cursor to the location for the label of the Line counter field. Note that the line counter data picture will have a width of five (This consideration may be important in designing your screen layout).

Once you have moved the cursor using the numeric keypad or the cursor keys (the arrow keys on your keyboard), press <Return> and then enter the label.

Move the cursor to the Data Picture location by using the numeric pad. Then press the <Return> key.
Unlike other data fields, Wizard will NOT ask you for the data type This is predetermined for Line Item Sets and is a numeric field of width 5.

Line Item Set Data Fields

After completing the Index field, Wizard will ask you for the field specifications for the balance of the fields in the Line Item Set. You may specify one or more fields.

This is done in exactly the same way as for the A (Add a Field) command. After you have added the rest of the fields that you want to add to the Line Item Set, press the <Esc> key to return to the command line.

Adding New Fields To An Existing Line Item Set

Note: Before you select the L command to add new fields to an existing Line Item Set, you should move the cursor to a field after the Index field (i.e. the Line Counter), but within that Line Item Set. This can be done using the <Return> or / commands at the Screen Formatter prompt.

At the Screen Formatter commands prompt, type L and then type N (No - you do not want to start a new Line Item Set).

Wizard then asks exactly the same questions as it asks for (A)dding a field. As with the A command, Wizard will remain in the L command until you press the <Esc> key to exit the command.

Changing The Depth Of A Line Item Set

See the C command.

Sub-Values

A Wizard Line Item Set (or LIS) can also handle sub-valued data. Generally, sub-values should only be used if a simpler way to handle the data cannot be designed.

Wizard treats sub-value LIS in exactly the same way as it treats value line item sets You create sub-valued LIS in the same way as for valued LIS, after painting all of the fields use the EPA Command and change the Type field for VMC to SVMC and for V to SV.

Linking Line Item Sets

For some applications you may want to Link a sub-value LIS to a value LIS so that each value in the first LIS can be blown out to sub-values in a Second LIS.

A Wizard Line Item Set can also handle sub-valued data. Generally, sub-values should only be used if a simpler way to handle the data cannot be designed.

Wizard treats sub-value line item sets in exactly the same way as it treats value line item sets For some applications (as in the following example) you may want to link a sub-value line item set to a value line item set (so that each value can be blown out to sub-values). To do this you need to incorporate some code in your program. This code is included after the following example.

Let us say that you have a Line Item Set that holds purchase order data. Each line contains a part number, a description, etc. Now you want to have multiple shipment dates and quantities for each line. Here is how to set up the Line Item Set:

  1. Create a Line Item Set with a Depth of 3 to 4 (these fields will hold the part number, description, etc.)
  2. Following the first Line Item Set create a second Line Item Set with any depth that you want (these fields will hold the shipment dates, quantities, etc.)
  3. Use the EP command on each field of the second Line Item Set to change the Field Types. Change the Field Type of VMC to SVMC, and change all Field Types of V to SV.

    At this point, the two line item sets are independent. For the purposes of this program we want to link the second line item set to the first. Suppose our screen looks like this:

       Purchase Order : ######
        
       1 Ln   Part No.   Description
       ####   ________   _____________________
       ####   ________   _____________________
       ####   ________   _____________________
        
       2 Ln   Qty    Ship date
       ####   ####   DD MMM YYYY
       ####   ####   DD MMM YYYY
       ####   ####   DD MMM YYYY
    

    What we want from this screen is that the sub-value line item set (No. 2) should display data dependent upon the value line item set (No. 1). To do this several steps are necessary.

    1. In EP for each field, change the Type to SVMC or SV where appropriate.
    2. From the E command set the data location for all fields to the appropriate attribute number.
    3. In the Entry Time code segment, add:

         001 LinkLIS<2,1> = 3
         002 LinkLIS<2,2> = 0
         003 LinkLIS<2,3> = LF(2)
         004 LinkLIS<3,1> = 0
         005 LinkLIS<3,2> = 2
      

      This code tells Wizard that you want to Link the first Line Item Set to the second Line Item Set.

      Each attribute of LinkLIS is the Group number and the three Multi-values have the following meaning:

      MVDescription
      1This is the Group number of the Forward Link, usually 3 for Group 2 and 0 for Group 3. Always null for Group 1.
      2This is the Group number of the Backward Link, usually 2 for Group 3 and 0 for Group 2. Always null for Group 1.
      3

      This is the controlling Field Number which switches from the First LIS to the Second LIS, and then returns to the following field of the First LIS on completion of data entry in the Second LIS.

      Usually LF(2) for Group 2 and null for Groups 1 and 3.

      Note: The LF(Group Number) is the Last Field of a given LIS.

M: Move one or more fields.

The M Command allows you to move entire fields, parts of fields, or text from one place on the formatting screen to another. To select the Move function, type M and press <Return> at the Wizard command prompt.

When you select Move, you have four possible options:

B: Move a Box
Moving a box is the default, (that is if you press <Return> Wizard will assume that you want to move a box). A Box will move more than one field or picture, or will move text etc. Note that the only way to move text around the screen is by using this option.

F: Move a Field
You can move an entire field (that is, the label and its data picture) around by selecting this option. If you use it on a Line Item Set the entire column will move.

L: Move a Label
This option will move the label of the field only, (that is the data picture will remain where it is).

P: Move a Picture
This option will move a data picture only. If you select the picture of a field in a Line Item Set the entire column will be moved.

When you select one of these options, Wizard will ask you to select which field, label or picture you wish to move. To do this, you move using the numeric pad or arrow keys to move the cursor onto that which you wish to move.

If you wish to move a box, however, you will have to specify the top left hand corner of the box and then the bottom right hand corner. For each, you move the cursor using the numeric pad and then press <Return>>

Wizard then asks you to move the Cursor to the new location on the screen where you want to place the field(s) or text you have selected. If you are moving a box, you move the cursor to the location for the new top-left corner of the box.

Having specified all these, Wizard will first ask you if you are sure that you want to do this. Any response other than Y will abort the move process.

Finally, Wizard moves the selected field(s) or text to the new location. If, however, Wizard cannot do the move (because of insufficient space), you will be given an error message.

P: Page the current Screen

The P Command allows you to move the entire Screen Up, Down, Left and Right. If you enter P then you will be prompted for Up, Down, Left or Right. You may enter PR for Page Right or PD for Page Down, etc.

When you wish to move the Screen to the Left or Right it will move 40 columns to the Left or Right. When you wish to move the Screen Up or Down the Screen will move 11 rows Up or Down.

R : Reuse a field.

The R Command allows you to Reuse Field Definitions from one Program Definition to another Program Definition. This can save you some time in creating a new program. Generally, an R command is used instead of an A (Add) command when you have already defined a field in the form you want.

When To Use R

Let us say that you have already created a Customer data entry screen. In that screen you have defined fields for Customer Name, Street, City, State, Zip and Phone.

Now you are creating a Customer Order Entry screen which will use the same fields. Rather than define the same fields again, you may simply Reuse the fields created for the Customer screen.

If you want to create a Customer Report, you can Reuse fields from the Customer screen, or the Customer Order screen, or any other Screen or Report you might have already created.

Using The R Command

At the Wizard command prompt, press R followed by <Return>. Wizard then enters the "Re-Use mode, and asks you whether the fields you are adding are to access the main file If you type N (for "no"), Wizard will ask you for the name of the file from which you wish to ReUse a field definition

Wizard next asks if you would like to see a list of Field Definitions. If you answer Y, Wizard will display a list of the names of all the Field Definitions for the file specified by the first question. You may select the Field Definition you wish to Reuse, then the list is displayed in a Multi-Select lookup window.

ie. You may select multiple definitions. The order in which you select the items is the order in which they will be returned, as if you had typed the Ids one after the other.

If you answer N, Wizard will ask you for the Field Name of the Field definition you wish to Reuse. (It is generally easier to answer Y!)

Wizard will instruct you to: Move the Cursor to the place where you wish to put the label by using the numeric pad and then press <Return>.

After you have positioned the cursor to the proper place on the screen Wizard will display the Data Label at that position.

Wizard will then instruct you to move the Cursor to the data display location, and press <Return>. Wizard will display the Data Picture at that location.

If you Selected more than one item from the Lookup then Wizard will prompt you to move the cursor to the place for the next field, and so on until there are no more items in the Select list.

At this point you have completed the Reuse command for one particular field. Wizard then again asks if you would like to see a list of Field Definitions If you are through Reusing Field Definitions from the specified file, then enter an <Esc> to return to the command line.

RS: ReSequence field order.

A data entry program is typically executed from left to right, top to bottom. The order of execution is called the run-time order. The RS Command allows you to change the run-time order.

If you enter the RS Command, Wizard presents you with a special screen for Resequencing the run-time order.

For example, Wizard could display:

   1 NAME
   2 CITY
   3 STREET
   4 POST.CODE
   5 STATE

Enter the number of the Field Definition that you want to re-sequence, or <Return> if OK, or <Esc> to exit:

What you do is enter the number of the field you want to resequence. The list displayed by Wizard is numbered in the order Wizard will execute the fields.

If, in the above example, we wished to place the POST.CODE field last (where STATE currently is), we would enter 4 at the prompt. Wizard will then ask us which sequence number we would like this field to have. In our example, we would enter 5. After pressing <Return>, the list will look like this:

   1 NAME
   2 CITY
   3 STREET
   4 STATE
   5 POST.CODE

If this is what you wanted, press <Return> to save the changes, otherwise press Exit, or else continue resequencing the fields.

S: Start report section.

You use report sections to define where you want information to be printed on a Custom Report. A Report Section is an area of the formatting screen that starts with a Report Section Marker and ends with the next Report Section Marker or the last row of the formatting screen.

A Report Section may include field definitions text, or the special formatting @ commands. Using this method, any information in a database may be printed at any desired place on the report you design.

A Columnar Detail Section causes data to be printed in a columnar format. Usually, a Columnar Detail Section only contains Field Definitions rather than text or special formatting @ commands

A Forms-Type Detail Section causes data to be printed as on a form, one item per page.

In all custom reports you may use any or all of the following sections:

  1. Report Heading Section
  2. Report Footing Section
  3. Page Heading Section
  4. Page Footing Section
  5. Break Heading Section
  6. Break Footing Section
  7. Columnar Detail Section
  8. Forms Detail
  9. End of Report marker

Report Section Ordering

The report sections may be specified in any order on the formatting screen. Wizard knows their proper order when it is generating the program. Not having to order the sections in a particular way makes it easy to add new sections to a report at the bottom of the screen.

(There is a single exception to this lack of ordering principle. The exception regards Break Footings, and is discussed in the Break Footing help section.)

Adding A Report Section

When you want to add a report section to the formatting screen, you follow these steps:

  1. Enter the (S)tart section command.
  2. Move the cursor to an unused line on the formatting screen, (ensure there are unused lines to allow you to enter the details).
  3. Select the report section you want from the Report Section Menu.

These actions will cause Wizard to display a section marker on the formatting screen at the line you selected. Now you may enter text and/or field definitions below (on lines following) the section marker The text or field definitions that follow a section marker are part of that section. The type of section specifies how and where the information will be displayed on the report.

T: Insert some text.

The T Command allows you to add (or delete) Text to your Wizard Program Definition. In Wizard data entry Screens, the T Command is frequently used to add a title. In Wizard reports, the T command is used to add various heading and footing information.

You may add text to any blank area of the formatting screen. Text can include any characters that you can enter from the keyboard.

After you have typed T and pressed <Return> at the Wizard Screen Formatter command prompt, Wizard will ask you to move the cursor to the position on the screen where you want to enter some text. You do this using the numeric keypad or the arrow keys Once there, press <Return> and type in the text you wish to have there, and then press <Return>.

Deleting Text

Note that to delete text you have to overtype the text that already exists with spaces. Further, if you want to change any details in text, you need to retype that text over the old text.

Text Example:

Adding a Data Label to a Field Description that does not have one:

  1. Enter the T command
  2. Position the cursor over the Data Picture Then press the <Return> key.
  3. Position the cursor to the location on the screen where you want to enter the new Data Label Then press the <Return> key.
  4. Enter the new Data Label.

Movint Text

You may move text from one place on the formatting screen to another. This is accomplished by using the M(ove) command, and then using the B(ox) option, or simply typing MB for Move Box.

VF: View Fields

The VF Command allows you to view all the Field names on the Screen. If you select a Field then the cursor is positioned at that field.

Generating a Wizard Screen

Once you have painted a Wizard screen or full screen report, you need to generate it. This will be done automatically if you answered Y in response to the question "Do you want to generate your program" after you filed the screen.

There are two other ways you can generate your Wizard screens:

WGEN ScreenName
If you type from TCL, WGEN followed by the name of the Wizard screen you want to generate, that screen will be generated and catalogued.

WIZ.GEN.ALL
You can generate more than one Wizard screen using the WIZ.GEN.ALL command (again, from TCL). If you do a SELECT of the WVD items (the screen names) you want to generate before typing WIZ.GEN.ALL then only those screens will be generated, otherwise all WVD items will be generated.

WIZ.GEN.ALL presents you with two options:

  1. Select
    The first option will select the WVD file items (Wizard screen definitions) afresh and generate them. Use this if you have just done a SELECT.
  2. Resume
    The second WIZ.GEN.ALL option allows you to resume a WIZ.GEN.ALL that you may have broken out of, or that may have fallen over.

Note that, if you have a large number of screens to generate, WIZ.GEN.ALL can take a long time to complete, and it can degrade system performance. For this reason, if you have many screens to generate, we recommend that you run this process in the evening or when few people are using the system.

Running Your Wizard Screen

You can use (run) a Wizard generated Screen by doing the following:

  1. From TCL you may run the program by just typing the name of the program (which invokes a PQ Proc).
  2. Also from TCL you may type the name of the generated program, which is the name of the screen preceded by W. for example, if your screen is called ECUST, you would type in W.ECUST and press <Return>.

    If you do this you will have to hit <Return> again, as all Wizard screens accept an initial input of a variable called COMMAND.

  3. Finally, you may add the screen to a menu and run the screen by selecting the option on the menu. To find out how to do this, refer to the section on Menus.

When you run a Wizard screen, that screen will be painted. The data pictures will only appear if you selected that option in the EF Edit Features option. When the screen has been displayed, you will be shown the data picture for the first field, and the cursor will appear at that field. You are now ready to go.

If you need more information on using Wizard screens, refer to the section on using Wizard.