The TRSTMT macro causes SDF to
analyze a program statement stored in the program itself, and
pass the results of the analysis to the program.
Additional statements may result from the analysis of the transferred statement, due to the fact that a system exit may replace the transferred statement by several statements. Dealing with these additional statements is the responsibility of the program.
An activated syntax file must contain the definition of the program and its statements.
Operation | Operands | |||||||
TRSTMT | PROGRAM = name ,INPUT = *NO / addr / (r1) ,OUTPUT = addr / (r2) [ ,STMT = *ALL / (name,...) / *ADDR(addr/(r)) ] [ ,DIALOG =NO / YES / ERROR ] [ ,MESSAGE = *NO / addr / (r3) ] [ ,PROT = *NO / *YES / addr / (r4) ] [ ,INVAR = *NO / addr / (r) ] [ ,DEFAULT = *NO / (addr,...) ] [ ,ERROR = NO / YES ] [ ,CALLID = *NO / addr / (r7) ] [ ,EXECUTE = NO / YES ] [ ,PROCMOD = ANY / NO / YES ] [ ,CCSNAME = *NO / *EXTEND / name ] [ ,INPUTSAV = *NO / YES ]
|
PROGRAM = name
Internal name of the program that is executed by the macro. This name is stored in the program definition in the syntax file (see ADD-PROGRAM). It is at least one byte and at most eight bytes long.
INPUT =
specifies which statement SDF is to analyze.
*NO
SDF is not to analyze any statement stored in the program, but is instead to analyze an additional statement provided by a system exit.
addr / (r1)
SDF is to analyze the statement whose address is specified or whose address is contained in the specified register. SDF expects the statement in the form of a variablelength record in the usual BS2000 format. The record area must be aligned on a halfword boundary.
OUTPUT = addr / (r2)
Address of the standardized transfer area, or a register that contains this address. The area must begin on a word boundary. Prior to calling the RDSTMT macro the program must ensure that the first two bytes of this area contain the maximum length possible for the area (see section “Format of the standardized transfer area up to SDF V4.0”). In this area SDF stores the analysis results.
STMT =
Specifies which statements are permitted as input.
*ALL
All statements are permitted.
(name,...)
Only the statements with the internal names specified are permitted. The internal statement name is stored in the statement definition in the syntax file (see ADD-STMT). It is at least one byte and at most eight bytes long.
The standard SDF statements are always permitted, regardless of the specification made here.
*ADDR(addr/(r))
Address of the list of permissible statements. This list must be generated beforehand with the CMDALLW macro.
DIALOG =
Specifies whether SDF is to conduct a dialog when analyzing statements. This operand is relevant only when the program is executing in an interactive task.
NO
SDF is not to conduct a dialog.
YES
SDF is to present the statement given to it by the program to the user in dialog for possible modification, provided this is compatible with the current SDF specifications for the dialog (see MODIFY-SDF-OPTIONS and SET-GLOBALS).
ERROR
SDF is to conduct a dialog only when it has detected a syntax error. If the statement contains a semantic error, the program can initiate a semantic error dialog by means of CORSTMT.
MESSAGE =
Specifies whether SDF is to issue a message when presenting the statement to the user for checking and possible modification (relevant only for DIALOG !=
NO). SDF integrates this message into the form.
*NO
SDF is not to issue a message.
addr / (r3)
Address of the message text to be issued, or a register that contains this address. The text is expected in the form of a variable-length record with a maximum length of 400 characters. However, only the first 80 characters are displayed on SDF-formatted screens. If the text contains screen control characters, the menu mask may be destroyed. The record area must be aligned on a halfword boundary.
PROT =
specifies whether SDF is to log input and messages to SYSOUT. If they are not written to SYSOUT, the user of the program should be informed of this in the program documentation. In contrast to the RDSTMT macro, this parameter has been implemented as an integer (byte field). A logging buffer is available.
*NO
SDF is not to perform any logging.
YES
SDF is to log input and messages to SYSOUT.
addr / (r4)
Address of a buffer, or a register that contains this address. SDF is to write input and messages to be logged into this buffer. The buffer must begin on a halfword boundary. The length of the buffer is contained in bytes 0 and 1, the length of the record to be logged is contained in bytes 2 and 3.
If the buffer is not empty, the first record is generally the log of the input command. Subsequent records contain messages. If no input log is available, or if the input log cannot be output, two slashes (“//”) are written into the output area.
The PROT parameter has the following effect:
Result of analysis | PROT parameter | |
YES (or addr / reg) | NO | |
No error | Input statement |
|
Syntax error | 1. Input statement |
|
INVAR =
Specifies whether the INVARIANT-INPUT form of the statement is stored. This means that the statement is stored with all the user-defined operands, all operands having default values and all operands currently allowed for this task. INVARIANT-INPUT is thus the largest input form for a statement available to a user who has certain privileges and who is working in the selected dialog mode. In contrast to LOGGING=INVARIANT-FORM (see MODIFY-SDF-OPTIONS), this form does not mask out keywords and secret operands.
INVAR = *NO
The INVARIANT-INPUT form of the statement is not stored.
INVAR = addr / (reg)
Specifies the address of a buffer into which SDF writes the INVARIANT-INPUT form of the statement. The buffer must be aligned on a word boundary and the first halfword (HW) must contain the length of the buffer. SDF stores the INVARIANT-INPUT form as a record of variable length beginning with the second halfword. he contents of the buffer are then as follows:
1st HW
2nd HW
3rd HW
buflen | reclen | filler | invariant-input |
buflen | Length of the buffer |
reclen | Length of the record written by SDF |
filler | Filler |
invariant-input | INVARIANT-INPUT form of the statement, starting at the seventh byte |
DEFAULT =
specifies whether the following values are to be replaced by SDF with values dynamically generated by the program:
operand values entered or
operand default values
The operands, or operand values, must have been defined accordingly in the syntax file (see ADD OPERAND..., OVERWRITE-POSSIBLE=*YES,... and ADD-VALUE...,VALUE=<c-string> (OVERWRITE-POSSIBLE=*YES),...). The program-generated value must be a valid operand value. In guided dialog, the values generated by the program are displayed by SDF in the form.
Example:
In the MODIFY statements issued to SDF-A, the value *UNCHANGED is replaced by the current value.
If the operands to be given default values are in a structure introduced by a value defined with LIST-ALLOWED=*YES (see ADD-VALUE), the following situation may arise:
The conversion description contains several list elements to which a structure with operands to be defaulted is attached. At the same time, the user likewise enters several list elements to which a structure with operands to be defaulted is attached.
SDF first tries to match the structures entered by the user to those specified in the conversion description by means of the value introducing the structure. If an unambiguous allocation cannot be made on the basis of the value introducing the structure because none of the values entered matches any of the ones in the conversion description or because the user has entered the matching value more than once, the allocation is then made based on the list position of the introductory value.
*NO
SDF is not to replace the operand values entered by values generated dynamically by the program.
(addr,...)
In one or more of the possible statements, SDF is to replace entered operand values by values generated dynamically by the program. The conversion descriptions for these statements (see section “Format of the standardized transfer area up to SDF V4.0”) are located at the specified addresses (addr51,...) in the program. A conversion description contains, among other things, the internal statement name and information regarding which of the operand values entered are to be changed and what values they are to be changed to. The areas for the conversion descriptions which are passed for the default values of the program must be aligned on a word boundary. The same is true of the output area of the macros (OUTPUT operand).
ERROR =
Specifies how the message text specified with the MESSAGE operand is to be issued.
NO
SDF is to issue the message text as a message.
YES
SDF is to issue the message text as an error message.
CALLID =
Defines the context to be used by SDF for analyzing the command.
*NO
The currently active syntax file hierarchy is used.
addr / (r7)
Address of a 4-byte field or register containing this address. The caller transfers the callid of the context to be used. This field must be aligned on a word boundary.
EXECUTE = NO/YES
Specifies whether standard SDF statements are to be executed.
EXECUTE is irrelevant if the TRSTMT macro does not refer to a new syntax file hierarchy (CALLID=*NO), e.g. if the current syntax file hierarchy is used. In this case, the standard SDF statements are always executed by TRSTMT, provided they exist in the current hierarchy. The operand belongs to the multihierarchical attribute introduced with the preceding CALLID operand. If TRSTMT refers to a hierarchy opened in parallel (CALLID=addr7/r(7)), the standard SDF statements are executed if EXECUTE=YES.
PROCMOD =
Defines the environment in which the user works. SDF performs a check, as a result of which it rejects commands which are illegal in the specified environment and are not accepted by SDF. The operand refers to the option of opening several syntax hierarchies. It is only important if the macro call refers to a new syntax file hierarchy opened in addition to the current one. If no CALLID has been defined (CALLID=*NO), PROCMOD is irrelevant. For instance, the value ANY is set automatically and reference is made to the current procedure mode.
ANY
No check is made. Statements, however, are always analyzed.
YES
Statements are handled as if they were read from a procedure file. For instance, they are analyzed if they have been defined in the syntax file with DIALOG-PROC-ALLO-WED=YES and if the program runs in interactive mode, or if BATCH-PROC-ALLO-WED=YES in batch jobs.
NO
Statements are handled as if they were read from a primary level, e.g. from terminal input or from a batch job. They are analyzed if they have been defined in the syntax file with DIALOG-ALLOWED=*YES and if the program runs in interactive mode, or if BATCH-ALLOWED=*YES in batch jobs.
CCSNAME =
Specifies the name of the character set used for the correction dialog on 8-bit terminals and for conversion from lowercase to uppercase letters. Each terminal uses a certain character set. A coded character set (CCS) is the unique representation of the characters in a character set in binary form. Each coded character set is defined by its coded character set name, or CCSN (see the “XHCS” manual [11 (Related publications)]). This parameter has no effect on message output.
*NO
Standard 7-bit code is used for I/O operations.
*EXTEND
Standard 8-bit code is used for I/O operations.
name
Specifies the name of a special 8-bit code for I/O operations. The name must be 8 bytes long.
INPUTSAV =
Specifies whether a history of past inputs is to be saved in the form of a list that can be subsequently accessed again via the built-in RESTORE mechanism (see the MODIFY-SDF-OPTIONS and RESTORE-SDF-INPUT statements).
*NO
The inputs are not saved.
*YES
Inputs are saved in a buffer.
MF =
Defines special requirements for macro expansion (see the “Executive Macros” manual [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
The format of the transfer area is described in section “Format of the standardized transferarea up to SDF V4.0”.
Register 15 contains a return code and a flag for the existence of additional statements in the right-aligned and left-aligned bytes, respectively. EQUATE statements for all these can be generated with the aid of the CMDANALY macro.
X’00’ X’04’ X’08’ X’0C’ X’18’ X’1C’ X’20’ X’24’ X’28’ X’2C’ X’38’ X’3C’ X’44’ X’48’ X’4C’ | Normal termination Unrecoverable system error Operand error in the macro Transfer area too small The statement is correct but the default values provided by the system are errored Error in statement Error dialog not possible Error dialog rejected Error or logging area too small END statement has been read SDF not available Program not known in syntax file Syntax file not found SDF command/statement executed The program is not executable above the 16-Mbyte boundary, since SDF is not |
X’5C’ | Not enough space in INVAR buffer, INVARIANT-INPUT truncated |
X’64’ | XHCS error |
Indicators of additional statements (created by a system exit):
X’00’ X’01’ | There are no further statements There are further statements |