Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 2: Describing an EDIT command syntax z/OS TSO/E Programming Services SA32-0973-00 |
|
This example expands upon Example 2: Describing an EDIT command syntax. This example shows how the parse macro instructions could be used within a Command Processor to describe the syntax of an EDIT command to the Parse Service Routine. The sample EDIT command we are describing to the parse service routine has the following format:
Figure 1 shows the sequence of parse macro instructions that describe the syntax of this EDIT 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 EDIT 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 defaults to IKJPARMD. Note: Only the macros IKJIDENT, IKJKEYWD, and IKJPOSIT return a label
in the DSECT.
Figure 1. Example 2 -
using parse macros to describe command operand syntax
Figure 2 shows the IKJPARMD 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 2
- The IKJPARMD DSECT created by parse
If a terminal user entered the EDIT command described in this example
in the form:
the Parse Service Routine would
prompt for the blocksize as follows:
The user at the terminal might respond with:
The Parse Service Routine would then complete the scan of the command parameters, build a parameter descriptor list (PDL), place the address of the PDL into the fullword pointed to by PPLANS, and return to the calling program. The calling routine uses the address of the PDL as a base address for the IKJPARMD DSECT. Figure 3 shows the PDL returned by the Parse Service Routine. The symbolic addresses within the IKJPARMD DSECT are shown to the left of the PDL at the points within the PDL to which they apply, and the meanings of the fields within the PDL are explained to the right of the PDL. Note: Only the macros IKJIDENT, IKJKEYWD, and IKJPOSIT return a label
in the DSECT.
Figure 3. Example 2 - The
IKJPARMD DSECT and the PDL
|
Copyright IBM Corporation 1990, 2014
|