Use these steps to create an executable command:
There are 3 possible command entry combinations:
. . . Raw Command = Entered text from command line
. . . Raw Command = Text associated with PF/PA key.
. . . IF first token in command line represents an CA IDMS DML or CA IDMS DMLO verb (either directly or as part of an equate phrase), assign command line text to PF key:
Raw command = Entered text from command line.
. . . ELSE
. . . IF first token in command line is 'NULL', Clear any text associated with PF key
. . . ELSE
. . . Raw command = Concatenation of (PF text and command line text)
Note: This also provides one of the techniques for assigning (and clearing) text to a PF key; i.e., enter text on the command line and press the desired PF key. Another method of changing PF key associates is by using the SHOW PFKEYS command to access the PF Keys Display screen.
The raw command created above is scanned for any words which have been EQUATEd to phrases. All such words are expanded. If any words within the expanded text present EQUATE phrases, they also are expanded -- until no further expansion is possible.
The final step in preparing an executable command is the resolution of any symbols requiring variable substitution contained in the raw command text. Note that there are four categories of variable symbols-only two of which are resolved at this time:
CA IDMS DMLO replaces variable symbols by tokens which appear at the end of the raw command text. The number and placement of those tokens which are necessary to create a valid command depend on the type of variables which appear in the raw command.
CA IDMS DMLO processes MACRO variables such that the first "&" variable, regardless of its number, receives the first token available. The second "&" variable, again regardless of its number, receives the second available token. For example, CA IDMS DMLO processes the following raw commands identically:
OBT NEXT &1 IN &2 VENDOR VENDOR-AREA OBT NEXT &4 IN &5 VENDOR VENDOR-AREA
The resultant command in both cases would be:
OBT NEXT VENDOR IN VENDOR-AREA
Note: Use of "&" variables precludes multiple use of a token in a command. That is, the appearance of &1 twice in a command is always regarded as a requirement for two different tokens to be substituted rather than for a single token in two places.
Use of positional variables, on the other hand, provides a direct correlation between the number of the "@" variable, and the position of the token available of substitution. That is, the appearance of @4 within a raw command requires that there be at least four tokens for use in replacing "@" variables. Also, because the variable number and the position of the replacement are fixed, the same variable can be used more than once. Consider the following raw command example:
OBT FIR LR-VENDOR WHERE @1 = @2 OR @1 = @3 VENDOR-ID 123 456
The resultant command is:
OBT FIR LR-VENDOR WHERE VENDOR-ID = 123 OR VENDOR-ID = 456
Both types of variable symbols can appear in the same raw command. In this case, tokens associated with "&" symbols must precede tokens associated with "@" symbols. For example:
OBT FIR &1 WHERE @1 = @2 or @1 = @3 LR-VENDOR VENDOR-ID 123 456
would be interpreted as follows:
OBT FIR LR-VENDOR WHERE VENDOR-ID = 123 OR VENDOR-ID = 456
|
Copyright © 2014 CA.
All rights reserved.
|
|