![]() | ||
| Forms | ![]() ![]() ![]() ![]() | GENERATE |
GENERATE command in record or table screens
uses the record or table schema to give the equivalent of default
FIELD commands for every field. GENERATE in
a Menu screen produces the equivalent of a default CALL to
every previously defined Record or Table screen. Commands are not physically
created and thus cannot be edited.
The EXCLUDE and INCLUDE clauses allow
fields to be nominated which are affected or not by the
GENERATE and allow specific FIELD commands
to be combined with a GENERATE command. When a
FIELD command is specified for a variable, the variable should
be EXCLUDED from the GENERATE otherwise it
appears on the screen twice. Key fields must be the first fields in a screen
definition.
Syntax
The syntax for the GENERATE command is:Clauses:
GENERATE EXCLUDE | INCLUDE
COMMON
DATAVARS
SCREENS screen, ...
SORTIDS
VARS variable, ...
General Clauses:
ACTIVITIES permissions
AT [r][,c]
CLEAR 'c'
DATA HILITE | VIDEO options
LABELS n
PAD [n][,m]
PROMPT HILITE | VIDEO options
The general clauses on the GENERATE command apply to all of
the fields generated by the command. The AT clause refers to
the position of the first field.EXCLUDE
Omits classes of variables or specific variables from the
GENERATE. When EXCLUDE is specified, any
variable (screen) not EXCLUDED is INCLUDED
automatically.INCLUDE
Includes classes of variables or specific variables in the
GENERATE. When INCLUDE is specified, any
variables (or screens) not INCLUDEd are
EXCLUDED.COMMON
Specifies all common variables.
DATAVARS
Specifies all data fields.
SORTIDS
Specifies all key fields (sort ids).
SCREENS
Specifies screen names to be
INCLUDEd or
EXCLUDEd in menu screens.VARS
Specifies a list of named variables.
For example, to specify particular options for three fields and
then bring in all the remaining fields in the EMPLOYEE record:
RECORD EMPLOYEE / COMPANY.EMPLOYEE
TEXT 'This is the Demographic Record' UNDERLINE CENTER AT +2
FIELD ID PROMPT 'Employee ID:' DATA VIDEO INVERSE
FIELD NAME PROMPT 'Name of Employee' REQUIRED
FIELD SSN PICTURE 'ddd-dd-dddd'
GENERATE EXCLUDE VARS ID NAME SSN
ENDRECORD



