Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

CORSTMT Initiate semantic error dialog

&pagelevel(4)&pagelevel

The CORSTMT macro causes SDF to conduct a dialog with the user in which the user corrects semantic errors in a statement. Immediately beforehand, SDF has analyzed the statement and passed it to the program as being syntactically correct.
Secret operand values that were entered in blanked input fields by the user must be repeated during the correction process.

Prerequisites for the semantic error dialog are:

  • The program is running in an interactive task and an error dialog was permitted in the syntax analysis, i.e.:

    • temporary or permanent guided dialog must be set

    • the SDF option PROCEDURE-DIALOGUE=YES must be set in procedures

    • if CORSTMT is called after TRSTMT, DIALOG=ERROR must be set for TRSTMT

  • The same syntax file is available as when the statement was first analyzed (no intervening change of syntax files).

If these prerequisites are not satisfied, SDF rejects the dialog (error code X’20’).

Operation

Operands

CORSTMT

INOUT = addr / (r1)

,MESSAGE = addr / (r3)

[ ,DEFAULT = *NO / (addr,...) ]

[ ,INVAR = *NO / addr / (r) ]

[ ,CALLID = *NO / addr / (r7) ]

[ ,CCSNAME = *NO / *EXTEND / name ]



[, MF =]


INOUT=addr / (r1)
Address of the standardized transfer area, or a register that contains this address. The area must begin on a word boundary. It contains the results of analysis of the incorrect statement, passed previously to the program by SDF. The program has identified the operand values it has found to be errored. SDF does not accept changes in input values made by the program. Following the error dialog and renewed analysis, SDF stores the modified analysis results back into this area (see section “Format of the standardized transfer area up to SDF V4.0").

MESSAGE=addr / (r3)
Address of the text to be output for the error dialog, or a register that contains this address. In guided dialog, this text is integrated into the statement menu. The text is expected in the form of a variable-length record, and may occupy up to four lines on the terminal. If the text contains screen control characters, the menu mask may be destroyed.
This area must be aligned on a halfword boundary.

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 MODIFY statements entered, SDF-A replaces the value UNCHANGED by the current value. If the operands to be defaulted are in a structure whose introductory value is defined by LIST-ALLOWED=*YES (see ADD-VALUE), the following may occur:
The conversion description contains several list elements to which a structure with operands to be defaulted is attached. At the user end, the user also enters several list elements to which a structure with operands to be defaulted is attached. SDF attempts first to match the structures entered by the user to those specified in the conversion description via the value that introduces the structure. If this value does not allow an unambiguous allocation because none of the values entered matches any of those in the conversion description, or because the user has entered the matching value several times, the allocation is made via the position in the list of the value introducing the structure.

*NO
The operand values entered are not replaced by values generated dynamically by the program.

(addr,...)
In one or more of the possible statements, operand values entered are to be replaced by values generated dynamically by the program. The conversion descriptions for these statements are located at the specified addresses (addr21,...) 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).

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 / (r)
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

buflenLength of the buffer
reclenLength of the record written by SDF
fillerFiller
invariant-input

INVARIANT-INPUT form of the statement, starting at the seventh byte



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.

*NO
The current syntax file hierarchy (context) of the task is used for analyzing the statement.

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 (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 on "Format of the standardized transfer area up to SDF V4.0".

Register 15 contains a return code in the right-aligned byte. EQUATE statements for this can be generated with the CMDANALY macro.

X’00’

X’04’

X’08’

X’0C’

X’10’

X’14’

X’18’

X’1C’

X’20’

X’24’

X’2C’

X’34’

X’38’

X’44’

X’4C’

Normal termination

Unrecoverable system error

Operand error in the macro

Transfer area too small

End-of-file (EOF), or error in statement, end-of-file (EOF) was then detected

Error in statement, a command was then detected

Statement is correct but the default values provided by the system are errored

Error in statement, STEP was then detected

Error dialog not possible

Error dialog rejected by user (Exit function activated)

END statement has been read

Error in statement, END was then detected

SDF not available

Syntax file not found

The program is not executable above the 16-Mbyte boundary, since SDF is

not loaded. Please notify the system administration.

X’5C’

X’64’

Not enough space in INVAR buffer, INVARIANT-INPUT truncated

XHCS error