The RDSTMT macro causes SDF to
read in a program statement from SYSSTMT (For the system file SYSSTMT the same assignment applies as was made for the system file SYSDTA. With regard to continuation lines, continuation characters and notes, the same rules apply to statement input from SYSSTMT as to command input from SYSCMD.)
analyze the statement read in, and
pass the results of the analysis to the program.
This presupposes that an activated syntax file contains the definition of the program and its statements. The input length for a statement read via RDSTMT is 16364 bytes.
Operation | Operands | |||||||
RDSTMT | PROGRAM = name ,OUTPUT = addr / (r1) [ ,STMT = *ALL / (name,...) / *ADDR(addr/(r)) ] [ ,PREFER = *ALL / name / *ADDR(addr/(r)) ] [ ,DEFAULT = *NO / (addr,...) ] [ ,MESSAGE = *NO / addr / (r3) ] [ ,PROT = YES / NO ] [ ,BUFFER = *NO / addr / (r) ] [ ,INVAR = *NO / addr / (r) ] [ ,SPIN = NO / YES ] [ ,ERRSTMT = STEP / NEXT ] [ ,CALLID = *NO / addr / (r7) ] [ ,CCSNAME = *NO / *EXTEND / name ]
|
PROGRAM = name
Internal name of the program that generates 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.
OUTPUT = addr / (r1)
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 it, SDF stores the analysis results.
STMT =
specifies which statements are permitted as input.
*ALL
All statements are permitted.
(name,...)
Only the statements whose internal names are 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.
PREFER =
Relevant only for guided dialog; specifies whether a particular statement is expected as the next input.
*NO
No particular statement is expected. SDF asks the user via the statement menu which statement is to be entered.
name
Internal name of the statement most likely to be entered. SDF does not display a statement menu in which the user selects the statement to be entered, but instead immediately displays the form listing the operand values for the expected statement. The user may of course enter another statement instead of the one expected.
Example:
Following MODIFY-OPERAND, SDF-A expects MODIFY-VALUE as the next statement. 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.
*ADDR(addr/(r))
Address of an area, 8 bytes long, containing the internal name of the expected statement. The name must be left-justified and padded with blanks as necessary (X’40’).
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 programgenerated 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 entered MODIFY statements SDF-A replaces the value *UNCHANGED 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 structures with operands to be defaulted are attached. On the other hand, the user likewise enters several list elements to which structures with operands to be defaulted are attached. SDF first tries to match the structures entered by the user to those specified in the conversion description by means of the values introducing the structures. If an unambiguous allocation cannot be made on the basis of the values introducing the structures 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 on the basis of the list position of the introductory value.
*NO
SDF is not to replace the entered operand values 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 (addr21,...) in the program. Only one conversion description can be specified per statement. A conversion description contains, among other things, the internal statement name and information as to 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).
MESSAGE =
specifies whether SDF is to issue a message when requesting statement input. In guided dialog this message is integrated into the statement menu.
*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. This 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 TRSTMT macro, this parameter is a flag (set=NO, reset=YES). No logging buffer is available.
YES
SDF is to log input and messages to SYSOUT.
NO
SDF is not to perform any logging. The following behavior may be expected:
Result of analysis | ||
PROT=YES | PROT=NO | |
No error | Input statement | – / – |
Syntax error | 1. Input statement | Spin-off message |
BUFFER =
The statement log and the error messages can be written into an area provided by the user.
NO
No buffer area is provided.
addr / (r)
Address of an area or a register in which the log of the entered statements and the messages are written, regardless of what was specified for PROT. The area must be aligned on a word boundary. The first halfword must contain the total length of the area. SDF writes the actual length of the output log to the second halfword. The log records are then written to the area as variable-length records.
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.
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.
*NO
The INVARIANT-INPUT form of the statement is not stored.
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. The 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 |
SPIN =
Specifies which statement, in batch mode, SDF is to read and analyze next.
NO
SDF is to read and process the next statement in the statementsequence.
YES
SDF is to skip all statements until the next STEP statement (or, as the case may be, until the END statement) and, if there is a STEP statement, continue processing with the statement following it.
ERRSTMT =
defines which statement terminates the spin-off mechanism if SDF senses a syntax error for the read statement.
STEP
SDF initiates spin-off until STEP or END is recognized. The return code is X’1C’, X’34’,...
NEXT
SDF does not initiate spin-off. The next statement is read on the next RDSTMT call. The return code is then X’50’.
CALLID =
This function applies to the OPNCALL and CLSCALL macros.
CALLID specifies the program context (=syntax file hierarchy opened by an OPNCALL macro) in which the statement must be read and analyzed. 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 OPNCALL macro.
*NO
The current syntax file hierarchy (context) of the task is used for analyzing the statement. This can, for example, be the syntax file hierarchy opened for the task at LOGON.
addr / (r7)
Address of the call check field or register containing this address. The area must be aligned on a word boundary.
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.
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 return code in the right-aligned byte and specifications regarding the assignment of SYSSTMT in the leftmost byte. EQUATE statements for all these can be generated with the aid of the CMDANALY macro.
X’00’ X’04’ X’08’ X’0C’ X’10’ X’14’ X’18’ X’1C’ x’28’ X’2C’ X’34’ X’38’ X’3C’ X’44’ X’4C’ | Normal termination Unrecoverable system error Operand error in the macro Transfer area too small Error in end-of-file (EOF) or in statement, end-of-file (EOF) was detected Error in statement, a command was then detected Statement is correct but the default values provided by the program are errored Error in statement, STEP was detected Buffer too small, logging aborted END statement has been read Error in statement, the next statement to be processed is //END SDF not available Program not known in syntax file Syntax file not found The program is not executable above the 16-Mbyte boundary, since SDF is |
X’50’ X’5C’ X’64’ | Error in statement, spin-off not initiated Not enough space in INVAR buffer, INVARIANT-INPUT truncated XHCS error |
Assignment of SYSSTMT:
X’01’ X’02’ X’03’ X’04’ X’05’ X’06’ | SYSSTMT = terminal SYSSTMT = file SYSSTMT = card reader SYSSTMT = floppy disk SYSSTMT = SYSCMD in S procedure SYSSTMT = S variable |