Previous Topic: COMMAND ClauseNext Topic: NEXTMDL Clause


FORMAT Clause

The FORMAT clause signals both the start and end of a single format of a command. Most CP commands have multiple formats. We show the full syntax of the FORMAT clause below.

FORMAT Start Syntax


FORMAT [{CLASS=cccccccc,}]             {-}
       [{REPEATS}]

FORMAT End Syntax

FORMAT END

Verb Descriptions (FORMAT Clause)

CLASS=cccccccc

Identifies the VM privilege class of this command. You can specify up to 32 classes. This is useful for commands, such as QUERY, that have the same format for several privilege classes.

CLASS defaults to A-Z and 0-6. Therefore, do not specify CLASS if any privilege class user (all users) can use the command. Also remember not to accidentally specify CLASS=ALL or CLASS=ANY as these are interpreted literally as classes A, L, L or A, N, Y. See the supplied DIAL model for an example of a command format that applies to all privilege classes.

REPEATS

Indicates that this format can occur more than once. Use REPEATS on the FORMAT clause when only a particular command format repeats. For example, following is an excerpt from the supplied CPTRAP model:

COMMAND CPTRAP
 
   FORMAT CLASS=C,REPEATS
      OPERAND TYPENUM,2,TRAN=HEX
      OPERAND GROUP=ENTRYTYP
   FORMAT END
 
ENTRYTYP GROUP TYPE=OPTIONAL
             .
             .
             .
         GROUP END
COMMAND END

In the above example, REPEATS indicates this format of the CPTRAP command repeats. Use REPEATS on the COMMAND clause when you can repeat all the formats for a command.

END

Signals the end of this format for the command.

FORMAT CLASS=AG
   .
   .
   .
FORMAT END