The CMDSTA macro causes the program to be provided with information on
the activated syntax files and
the specifications in effect for command/statement input and processing.
Operation | Operands | |||||||
CMDSTA | OUTAREA = addr / (r) ,CALLID = *NO / addr / (r) ,FORM = SHORT / LONG / USER
|
OUTAREA=addr / (r)
Address of a transfer area, or register containing this address. The information is written to this area. The area may be generated with the CMDMEM macro. This field must be aligned on a halfword boundary.
CALLID =
Refers to a context (= syntax file hierarchy) which was opened by an OPNCALL macro.
The name of the syntax file hierarchy (CALLID) must have the 4-byte value returned by SDF to the field which was designated by the CALLID operand in the Open Context macro. This function applies to the OPNCALL and CLSCALL macros and is reserved for BS2000 development.
*NO
The currently activated syntax file hierarchy is used.
addr / (r)
Address of a 4-byte field or register containing this address. The caller transfers the CALLID to the context (= syntax file hierarchy) to be used. This field must be aligned on a word boundary.
FORM =
The form (short or long or additionally with all user syntax files) in which the output information is to be written to the transfer area OUTAREA.
SHORT
Output consists only of the activated basic system syntax files (without the activated subsystem syntax files), the activated group syntax file, the most recently activated user syntax file and the current options for entering and processing commands and statements. A short-form output consists of 530 bytes.
LONG
as SHORT; but in addition all information relevant to the subsystem syntax files is output. In this case, the first two bytes of the transfer area must define the length of the transfer area. The transfer area for long-form output must be larger than 530 bytes. The amount of subsystem information in the output depends on the space available in the transfer area. If the subsystem information overflows the transfer area, the corresponding return code is returned.
USER
as LONG; but in addition information relevant to all activated user syntax files is output.
MF =
Defines special requirements for macro expansion (see the manual “Executive Macros” [8 (Related publications)] for details).
L
Only the data part of the macro expansion (operand list) is generated. This requires that no operand types with executable code appear in the macro. The data part generated has the address specified in the name field of the macro.
(E,(1)) / (E,opaddr)
Only the instruction part of the macro expansion is generated. The associated data part (operand list) is referenced by the address “opaddr”. This either appears in register 1 or is specified directly.
Return information and error flags
Register 15 contains a return code in the right-most byte. EQUATE statements for this can be generated by means of the CMDANALY macro.
X’00’ | Normal termination |
X’04’ | Unrecoverable error |
X’08’ | Operand error in the macro |
X’0C’ | Insufficient space in transfer area |
X’38’ | SDF not available |
X’4C’ | The program is not executable above the 16-Mbyte boundary, since SDF is not loaded. Please notify system administration. |
The transfer area has the following structure:
Byte | Contents | ||
0 |
| ||
1 | Scope of user guidance (see SET-GLOBALS ...,GUIDANCE=... | ||
| |||
2 | Type of input logging (see SET-GLOBALS ...,LOGGING=... | ||
X'04' | |||
3 to 56 | Name of the activated basic system syntax file |
Byte | Contents | |
57 to 68 | Version number of the activated basic system syntax file (see SET-GLOBALS VERSION= ...) | |
69 to 122 | Name of the group syntax file activated for the task | |
123 to 134 | Version number of the group syntax file activated for the task (see SET-GLOBALS VERSION= ...) | |
135 to 188 | Name of the user syntax file last activated | |
189 to 200 | Version number of the user syntax file last activated (see SET-GLOBALS VERSION= ...) | |
201 to 230 | Name of the program which the command processor uses for analysis of the entered statements in test mode | |
231 to 234 | Current SDF version, format is nn.n | |
235 | Function key assignment (see SET-GLOBALS...,FUNCTION-KEYS= and | |
X'04' | ||
236 to 237 | Number of inputs to be stored | |
238 | Security-relevant settings, see MODIFY-SDF-OPTIONS... | |
bit 0=0 | CHECK-PRIVILEGES = *NO | |
239 to 243 | Reserved | |
244 to 245 | Number of activated user syntax files | |
238 to 531 | Reserved for future extensions |
If aliases are substituted when MODIFY-SDF-OPTIONS is executed, the syntax file names are stored in the CMDSTA transfer area with <cat-id> and <user-id>.
For FORM=LONG, the transfer area is extended as follows:
Byte | Contents |
239 | Reserved |
240 to 243 | Address of the list of all the user syntax files activated for the task |
244 to 245 | Number of activated user syntax files |
246 to 531 | Reserved for future extensions |
532 to 533 | Number of activated subsystem syntax files |
534 to 587 | Name of the first activated subsystem syntax file |
588 to 599 | Version number of the first activated subsystem syntax file |
600 to 653 | Name of the second activated subsystem syntax file |
654 to 665 | Version number of the second activated subsystem syntax file |
. |
The transfer area has been extended as follows for FORM=USER:
Byte | Contents |
(following the information on subsystem syntax files) | Name of the first activated user syntax file (54 bytes) |
Version number of the first activated user syntax file (2 bytes) | |
Name of the second activated user syntax file (54 bytes) | |
Version number of the second activated user syntax file (2 bytes) | |
. . . |