Each line of the prompt definitions must be given a VAR TYPE code. This code indicates to the system the kind of processing that is required for the specified prompt. These processes are indicated by one of the following VAR TYPE codes:

S - Single Value Input

This is a prompt which is used to input a value related to the update file. This value is either part of the record key or one of the fields defined in the layout of the update file.

For instance, the user has defined the UPDATE FILE as F.TEST. They would now like to specify an input that will update an attribute on the record retrieved from the F.TEST file. The line defining this prompt would begin with S as the VAR TYPE.

N - No Input Field

The system has retrieved a record from the UPDATE FILE and the user would like to display an attribute off this file. The line defining this prompt would be a N type. NOTE that this differs from a S type in that the specified attribute is not input it is simply displayed on the screen.

R -Reference Only Field

There will be occasions where the user wishes to display data off a cross referenced file. This data will be displayed if defined as a D type variable (see below). However, the user must first define a field to be used as the key to the cross reference file.

Where the field to the cross-reference file is to be displayed on the screen, the user would define it as the appropriate VAR TYPE, such as S or N type. However, where the cross reference key is NOT to be displayed, it is defined as an R type. This would create the logic to retrieve the record from the cross reference file prior to processing the associated D types. The attribute associated with R type definition must be on the UPDATE FILE layout.

Note that this particular code is now redundant as a result of the introduction of the 'NULL' conversion. If the user enters NULL for the CONVERSION, it will also generate the cross reference read, as with the R type. However, it will allow prompt definition for the key to the cross reference file to be ANY VAR TYPE. Obviously, this is a more flexible approach and is the recommended method. The R type is only retained for the sake of compatibility with previous releases of PARADYME.

W - Window

Window definition takes place on another screen which is called at this point. Details on how this works are given later on in this chapter.

I - Input to temporary variable

This is a prompt for a 'scratch' variable which is used as, for example, a flag in your program but is not associated with a file.

For instance, the user wished to specify an option that will lead to a further process. This is not a value that needs to be stored permanently to file and so does not need to be defined on a file layout. This means that the S type would be inappropriate. An I type would be ideal for this situation.

V - Variable Value

This is a variable or expression which is displayed at the appropriate time. It may refer to any variable, expression or PARADYME variable present in the program. For instance, it could be used with the system variable DATE() to display the current date.

D - Display Value

This is a value that is displayed off the cross referenced file that was last used by a prompt definition.

As mentioned above, the key to the record is made up of 'S' type variables alone.

During the course of prompt definition, the user may wish to change the sequence in which certain prompts are processed. This can be done dy deleting the a given line and re-entering it in the new desired position. However, this is cumbersome, laborious and prone to error. So, in addition to the above codes, 2 other entries are permitted for the prompt definition. These are:-

C (opy details)

The user should position the cursor on the line they wish to move. On typing 'C' for attribute/expression, the system will COPY all the details on that line, TOGETHER with all validation code associated with that line and all insert definitions associated with the prompt to an internal buffer.

Note that the original set of parameters remain on the screen. If the user wishes to remove these, they should use the [CLEAR] function key to remove the line.

The system prints 'Copied' on the bottom line of the screen to confirm that the copy has been processed.

L (oad details)

Having saved a set of parameters, the user can re-insert them into the prompt definitions by moving to the position where the user would like the code LOADED and entering 'L' in the VAR TYPE field. The system will then LOAD in the previously saved prompt definitions. It will also load the validation code, adjusting the prompt sequence from its original value to the prompt sequence number of the new position. It will also load the insert parameters and again adjust the prompt sequence number.

Note that the system OVERWRITES any parameters that are already present on the line where the parameters are loaded. If the user does not want to replace existing definitions, but wants the definitions loaded in addition to existing definitions, they should use the INSERT key to create a blank line prior to 'LOADING' the copied definitions.

Also note that the definitions are copied in to a temporary buffer which is blanked out every time the user selects option 5. This buffer is overwritten every time the user uses the 'C' function but is not cleared after a LOAD. It means that the user can load the same definition as many times as they want.