FSI Version 1, Release 2 implements the use of VDEFINE instead of the VGET and VPUT methods used with
the previous release. In addition the VDEFINE function there is also a DISPLAY function.
VDEFINE is used to define program variables to FSI. A FSI variable is identified by a name consisting of one to eight characters. FSI variables can be a maximum length of 255 bytes long. The VDEFINE API function call specifies the variable name, the variable type (character or numeric), the data length and the data to set the variable to.
The $VDEFINE assembler macro is provided to invoke the VDEFINE function.
$VDEFINE( variable name , data address, variable type, data length, copy option )
Variable name is the name of the variable. It must be one to eight characters long. It can be specified as the address of an eight byte name (padded with blanks) or it can be specified as a constant.
Data address is the pointer to the variable in the program.
Variable type is a full word integer value indicating the data type. 1 = Numeric, 2 = Character
Data length is the length of the data string. It can be specified as the address of a full word containing the data length or it can be specified as a constant value.
The copy option is a full word integer value but is currently ignored.
This will set the value of the variable 'PF03' to an eight byte character string called MYPF03.
You can accomplish the same thing using the $VPUT macro without constants:
VNAME DC CL8'PF03'
VLEN DC F'3'
VDATA DC C'END'
VTYPE DC F'2'
To code the parameter list directly you would use:
PLST DC A(VNAME)
VZERO DC F'0'
DISPLAY is used to display a panel on the terminal and get a response from the terminal user. The DISPLAY function call specifies the name of the panel to display, an optional error message and an optional cursor position. If the error message is specified, the error message must be defined in the MLIB data set. If a cursor field is specified, the cursor will be placed into the screen field specified.
The $DISPLAY assembler macro is provided to invoke the DISPLAY function.
$DISPLAY( panel name , error message, cursor field )
Each of the parameters can either be specified as the name of an eight byte area (padded with blanks) or it can be specified as a constant.
PANEL DC CL8'SAMP01'
ERMSG DC CL8'SAMP0101'
CSRFLD DC CL8'USERID'