Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 4: Describing a LIST command syntax z/OS TSO/E Programming Services SA32-0973-00 |
|
This example expands upon Example 4: Describing a LIST command syntax. This example shows how the parse macro instructions could be used to describe the syntax of a sample LIST command that has the following syntax:
Figure 1 shows the sequence of parse macro instructions that describe this sample LIST command to the Parse Service Routine. The parse macro instructions used in this example build the parameter control list (PCL) describing the syntax of the LIST command operands. The macro instructions also create the DSECT that you use to map the parameter descriptor list returned by the parse service routine. In this example, the name of the DSECT is PARSELST. Note: Only the macros IKJIDENT, IKJKEYWD, and IKJPOSIT return
a label in the DSECT.
Figure 1. Example 4 - Using Parse Macros to Describe Command Operand Syntax
Figure 2 shows the PARSELST DSECT created by the expansion of the parse macro instructions. Note: Only the macros IKJIDENT, IKJKEYWD, and IKJPOSIT return
a label in the DSECT.
Figure 2. Example 4 - The PARSELST DSECT
In this example, if the terminal user entered the LIST command
incorrectly as:
the Parse Service Routine
would prompt the terminal user with:
The user might respond with:
The Parse Service Routine
would then prompt with:
The user might respond with:
This sequence resulted in the syntactically correct command of:
The Parse Service Routine would then build a parameter descriptor list (PDL) and place the address of the PDL into the fullword pointed to by PPLANS. The Parse Service Routine then returns to the caller and the caller uses the address of the PDL as a base address for the PARSELST DSECT. Figure 3 shows the PDL returned by the Parse Service Routine. The symbolic addresses of the PARSELST DSECT are shown to the left of the PDL at the points within the PDL to which they apply. A description of the fields within the PDL is shown on the right. Note: Only the macros IKJIDENT, IKJKEYWD, and IKJPOSIT return
a label in the DSECT.
Figure 3. Example 4 - The PARSELST DSECT and the PDL
|
Copyright IBM Corporation 1990, 2014
|