Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CMDSTA List information on activated syntax files

&pagelevel(5)&pagelevel

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



[ ,MF =]


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.

The size of the transfer area has been increased as of SDF V2.0A. See "CMDMEM Generate transfer area for status information" for further details.

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

Bit 0 = 0
Bit 0 = 1
Bit 1 = 0
Bit 1 = 1
Bit 2 = 0
Bit 2 = 1
Bit 3 = 0
Bit 3 = 1
Bit 4 = 0
Bit 4 = 1
Bit 5 = 0
Bit 5 = 1
Bit 6 = 0
Bit 6 = 1
Bit 7 = 0
Bit 7 = 1

UTILITY-INTERFACE = NEW-MODE
UTILITY-INTERFACE = OLD-MODE
PROCEDURE-DIALOGUE = NO
PROCEDURE-DIALOGUE = YES
CONTINUATION = NEW-MODE
CONTINUATION = OLD-MODE
CMD-STATISTICS = NO
CMD-STATISTICS = YES
MENU-LOGGING = NO
MENU-LOGGING = YES
MODE = EXECUTION
MODE = TEST
No spin-off for CMDRST (read statement)
Spin-off for CMDRST
INPUT-HISTORY = OFF
INPUT-HISTORY = ON

1

Scope of user guidance (see SET-GLOBALS ...,GUIDANCE=...
and MODIFY-SDF-OPTIONS ...,GUIDANCE=...)

X'04'
X'05'
X'06'
X'07'
X'08'

NO
EXPERT
MAXIMUM
MINIMUM
MEDIUM

2

Type of input logging (see SET-GLOBALS ...,LOGGING=...
and MODIFY-SDF-OPTIONS ...,LOGGING=...)

X'04'             INPUT-FORM
X'05'             ACCEPTED-FORM
X'06'             INVARIANT-FORM

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
MODIFY-SDF-OPTIONS..., FUNCTION-KEYS=....)

X'04'             OLD-MODE
X'05'             STYLE-GUIDE-MODE

236 to 237

Number of inputs to be stored
(see SET-GLOBALS..., NUMBER-OF-INPUTS=... and MODIFY-SDF-OPTIONS...
INPUT-HISTORY=*ON(NUMBER-OF-INPUTS=...))

238

Security-relevant settings, see MODIFY-SDF-OPTIONS...
,MODE=*TEST(...),...,INPUT-HISTORY=*ON(...)

bit 0=0
bit 0=1
bit 1=0
bit 1=1

CHECK-PRIVILEGES = *NO
CHECK-PRIVILEGES = *YES
PASSWORD-PROTECTION = *NO
PASSWORD-PROTECTION = *YES

239 to 243

Reserved

244 to 245

Number of activated user syntax files

238 to 531

Reserved for future extensions

Bit 6 in byte 0 (spin-off for CMDRST) cannot be used by a user program since CMDRST always executes a return after a spin-off. For this reason, this flag is always reset for user programs. This feature is reserved for system programming.

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:

ByteContents
239Reserved
240 to 243Address of the list of all the user syntax files activated for the task
244 to 245Number of activated user syntax files
246 to 531Reserved for future extensions
532 to 533Number of activated subsystem syntax files
534 to 587Name of the first activated subsystem syntax file
588 to 599Version number of the first activated subsystem syntax file
600 to 653Name of the second activated subsystem syntax file
654 to 665Version number of the second activated subsystem syntax file


.
.


The transfer area has been extended as follows for FORM=USER:

ByteContents
(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)

.

.

.