The syntax description of SDF commands and statements is contained in the syntax files (see “SDF syntax files” in the “SDF Dialog Interface” manual [15]):
Commands begin with a slash which in dialog mode is set by the system. SDF expects command input from the logical system file SYSCMD.
SDF statements, i.e. statements intended for programs with SDF interface, begin with two slashes which in dialog mode are set by the system. SDF expects statement input from the logical system file SYSSTMT, which has the same assignment as system file SYSDTA.
Input data, i.e. data, parameters and statements read in by programs without SDF interface, are not analyzed by SDF. Such programs expect input data from the logical system file SYSDTA.
Commands/statements consist of the following elements:
command/statement name
operand names
possible operand values (keywords and variable values)
additional help texts explaining the command/statement and its operands.
Command/statement names, operand names and keyword values are contained as keywords in the syntax description. Keywords are specified as such (see section "Input compression"). Variable operand values are described by means of data types (see table "Data types" (SDF syntax representation)). The data type defines the character set and the rules used to form an operand value. SDF checks whether the specification for a variable operand value lies within the range of permissible values as defined by the data type. A variable value may also be defined as a dedicated (constant) value of a data type. Then instead of the data type the syntax description gives the appropriate constants (such as the names of the S variable streams in the ASSIGN-STREAM command: STREAM-NAME = SYSVAR / SYSMSG / SYSINF).
Keywords usually consist of several portions (or subnames) connected by hyphens. As a rule, the respective names are taken from the ordinary English-language environment. They are chosen in such a way that analogous facts are described by means of identical keywords throughout the command set. Commands always start with a verb. They are followed by the associated object to which the activity is to be applied, e.g. MODIFY-FILE-ATTRIBUTES causes the attributes of a file to be modified.
There are also pairs of opposite activities; for example:
CREATE-XY and DELETE-XY for the creation/deletion of an object XY.
Commands are assigned to different domains (application areas), depending on their respective uses. A command may occur in more than one domain.
Every operand has a name and at least one possible value. Operands may be hierarchically subordinate to an operand value. In this case this operand value initiates a structure which contains all the lower-ranking operands. The operands of a structure are enclosed in parentheses. Further structures may be initiated within a structure, this phenomenon is referred to as structure nesting.
Example of a structure
Format (excerpt from SHOW-FILE-ATTRIBUTES):
|
Input:
/show-file-attributes select=*by-attributes(file-structure=(*sam,*isam))
The FILE-STRUCTURE operand defines a specific file attribute and is subordinate to the operand value (the structure) *BY-ATTRIBUTES.
Concurrent specification of several operand values (in the form of a list) may be permissible. Operand values permitted as list elements are enumerated following “listposs(n):” (see table "Metasyntax" (SDF syntax representation)), where n indicates the maximum number of list elements allowed.
Example of a list
Format:
FILE-STRUCTURE = *ANY / list-poss(5): *PAM / *SAM / *ISAM / *BTAM / *NONE |
Input:
/show-file-attributes select=*by-attributes(file-structure=(*sam,*isam))
The FILE-STRUCTURE operand defines the file attributes SAM and ISAM
Most operands are preset with a default value (in the example *ANY). This operand value is used if no explicit specification is made (see "Default values").