Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 1: Describing a PROCESS command syntax z/OS TSO/E Programming Services SA32-0973-00 |
|
This example expands upon Example 1: Describing a PROCESS command syntax. This example shows how the parse macro instructions could be used within a Command Processor to describe the syntax of a PROCESS command to the Parse Service Routine. A sample Command Processor that includes the parse macros used in this example is shown in z/OS TSO/E Programming Guide. The sample PROCESS 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 PROCESS 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 PROCESS 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 PRDSECT. Figure 1. Example 1 -
using parse macros to describe command operand syntax
Figure 2 shows the IKJPARMD DSECT created by the expansion of the parse macro instructions. Figure 2. Example 1
- The PRDSECT DSECT created by parse
If a terminal user entered the PROCESS command described in this
example in the form:
the Parse Service Routine would
prompt the terminal user with:
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 PRDSECT DSECT. Figure 3 shows the PDL returned by the parse service routine. The symbolic addresses within the PRDSECT 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 1 - The
PRDSECT DSECT and the PDL
|
Copyright IBM Corporation 1990, 2014
|