Utility control statements and syntax rules

The control statements used by the MFS Language utility are divided into two major categories: definition statements and compilation statements.

The control statements used by the MFS Language utility are divided into two major categories:

  • Definition statements are used to define message formats, device formats, partition sets, and operator control tables.
  • Compilation statements are those used to control the compilation and SYSPRINT listings of the definition statements.

Use the definition and compilation control statements to identify a particular function performed by the utility and to specify various options.

The definition and compilation control functions are:

  • SYSPRINT LISTING CONTROL

    The following parameters are provided to format the compilation listing: XREF, SUBS, COMP, DIAG, and LINECNT.

  • SYSIN and SYSLIB RECORD STACKING and UNSTACKING

    Control statements are provided to allow one or more SYSIN or SYSLIB records to be processed and kept in processor storage for reuse later in the compilation. These statements are an alternative to the COPY facility for groups of statements that are repeated.

    MFLD and DFLD statements can be repetitively generated if preceded by a DO statement and followed by an ENDDO statement. Repetitive DFLD generation supports increments to line and column position information.

  • ALPHA CHARACTER GENERATION

    The ALPHA statement allows specification of additions to the set of characters as alphabetic.

  • COPY

    The COPY statement allows members of partitioned data sets to be copied into the input stream of the utility preprocessor.

The control statements are written in assembler-like language with the following standard format:

Control statement syntax for the MFS Language utility

label          operation          operand          comments      

label
Identifies the statement; if it is shown as optional, it can be omitted. When included, the name must begin in the first position of the statement (column 1) and must be followed by one or more blanks. It can contain from one to eight alphanumeric characters (one to six, for the FMT label), the first of which must be alphabetic.
operation
Identifies the type of control statement. It normally begins in column 10 and must be preceded and followed by one or more blanks.
operand
Is made up of one or more parameters, which can be positional or keyword parameters. A positional parameter in MFS control statements always appears in the first position of the operand, normally starting in column 16. The position of a keyword parameter is not important. The parameters within one operand are separated by commas. In the syntactical description of the control statements, parameters preceded by commas are thus identified as keyword parameters. The operand field itself must be preceded and followed by one or more blanks.
comments
Can be written in a utility control statement, but they must be separated from the last parameter of the operand field by one or more blanks. (If the statement does not include an operand, the comment should be separated from the statement by at least one blank.) A comment line begins with an asterisk in column 1.

Continuation is accomplished by entering a nonblank character in column 72. If the current line is a comment, then the continuation line can begin in any column.

Other considerations are as follows:

  • There is no limit on the number of continuation lines.
  • There is no limit on the number of characters in the operand field. Individual operand items cannot exceed 256 characters, excluding trailing and embedded second quote characters.
  • If a nonstandard character is detected in a literal, a severity 4 warning message is issued. The nonstandard character is retained in the literal.
  • If the current line is a control statement, the continuation line must begin in column 16.
  • A single ampersand is needed to generate one ampersand character in the literal.

In addition to the definition and compiler statement specifications, several parameters can be specified in the EXEC statement PARM keyword to control the current compilation for the preprocessor and phase 1; one parameter can be specified for phase 2.

The five special rules that follow use actual MFS code as examples.

  1. If you code a statement such that an equal sign or a left parenthesis immediately precedes a comma, you can omit the comma.

    ,FTAB=(,FORCE) could be coded as ,FTAB=(FORCE)

  2. If you code a statement such that an equal sign immediately precedes a single item enclosed in parentheses, you can omit the parentheses.

    ,FTAB=(,FORCE) could be coded as ,FTAB=,FORCE

  3. You can apply both Rule 1 and Rule 2, in either order, to a single item.

    ,FTAB=(,FORCE) could be coded as ,FTAB=FORCE

  4. Under no condition can you specify a keyword without specifying at least one parameter immediately after that keyword.

    Neither ,FTAB= nor ,FTAB=,LDEL='**' is permitted.

  5. Blanks are required between labels and statement type names, and between statement type names and their parameters; they are not permitted elsewhere unless explicitly represented by the symbol ␢.

    DEV ,PAGE is correct, but DEV,PAGE and ,FTAB= (,MIX) are incorrect.

Syntax errors

The MFS Language utility attempts to recover from syntax errors in source statements. No guarantee exists for the correctness of the assumptions made in the recovery, and these assumptions can differ in different releases of IMS™. Assumptions made during recovery are based on (1) what is expected when the incorrect item is encountered; (2) what could appear to the right of the item preceding the incorrect item; and (3) what could appear to the left of the incorrect item.

During the process of error recovery, the following notation can be used in the diagnostic messages:

;
Indicates that the end of the source statement was encountered. The position marker points to the position immediately following the last source item scanned.
$L$
Refers to a literal operand item.
$V$
Refers to an identifier operand item (alphabetic character optionally followed by alphanumeric characters).
$I$
Refers to a numeric operand item.
$A$
Refers to an alphanumeric operand item (numeric character optionally followed by alphanumeric characters).
$D$
Refers to a delimiter operand item.

Most error recovery messages have a severity code of 4, indicating a warning level error. When an item is deleted, or the syntax scan is aborted, the statement cannot be validly processed and a severity code of 8 is generated.

Invalid sequence of statements

The language utility preprocessor routines that process MSG, FMT, PDB, or TABLE definition statements are organized hierarchically. A routine for a given level processes a statement at that level, reads the next statement, then determines which routine will next receive control.

If the statement just read is the next lower level statement (for example, a DIV statement following a DEV statement), the next lower level routine (for example, the DIV statement processor) is called.

If the statement just read is not the next lower level statement, control can be passed to one of the following three routines:

  • The next lower level routine to assume the missing statement (for example, the DIV processor if a DEV statement is followed by a DPAGE statement)
  • The same level routine if the statement just read is of the same level as the processor (for example, a series of DFLD statements)
  • The next higher level routine (the calling routine) if the statement just read is not the same or the next lower level (for example, a DEV statement following a DFLD statement, an invalid statement, or a statement out of sequence)

Thus, if the hierarchic structure of a MSG, FMT, PDB, or TABLE definition is invalid or a statement operator is misspelled, case (3) will result in control being returned to successively higher level routines. At the highest level, only a FMT, MSG, TABLE, PDB, or END statement will be accepted by the preprocessor. Therefore, all statements before the next FMT, PDB, MSG, TABLE or END statement will be flushed (that is, not processed) and flagged with the appropriate error message.