Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

CMDCST Initiate semantic error dialog

&pagelevel(5)&pagelevel

The CMDCST 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 CMDCST is called after CMDTST, DIALOG=*ERROR must be set for CMDTST

  • 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’).

Figure 11: Effects of the CDMCST macro

Operation

Operands

CMDCST

INOUT = <var: pointer>

,MESSAGE = <var: pointer>

,DEFAULT = *NO / <var: pointer>

,INVAR = *NO / <var: pointer>

,CALLID = *NO / <var: pointer>

,CCSNAME = *NO / *EXTEND / <c-string 1..8> / <var: char:8>

,MF = C / D / L / M / E

INOUT=<var: pointer>
Address of the standardized transfer area, which 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”).

MESSAGE=<var: pointer>
Address of the text to be output for the error dialog. In guided dialog, this text is integrated into the statement menu.This area must be aligned on a halfword boundary and have the following format:

2 bytes:   Absolute length of record (n+4)
2 bytes:   (Reserved)
n bytes:   Message text

The maximum text length is 400 characters. Only the first 280 characters are displayed on an SDF-formatted screen. The menu mask can be destroyed If the text contains screen control characters.

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 entered, SDF-A replaces the value *UNCHANGED by the current value.

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

<var: pointer>
Address of a list aligned on a word boundary which contains addresses containing conversion descriptions for statements. A formatted transfer area of the type “structure” is used as conversion description (see section “Format of the standardized transferarea”). Only one conversion description can be specified for each statement. 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 list of addresses of conversion description is structured as follows:

2 bytes: Number of conversion descriptions in the list (n)
2 bytes: (Reserved)
4 bytes: Address of the first conversion description

. . .

4 bytes: Address of the nth conversion description

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).

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.

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.

<var: pointer>
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 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:

2 bytes:   Maximum length of the buffer
2 bytes:   Output length written by SDF (n+4)
2 bytes:   (Reserved)
n bytes:   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.

<var: pointer>
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.

<c-string 1..8> / <var: char:8>
Specifies the name of a special 8-bit code for I/O operations. The name must be 8 bytes long and can be passed as a c-string constant or as a string variable.

Description of the MF, PARAM, MACID and PREFIX parameters: see the “Executive Macros” manual [8 (Related publications)] for details.

Return information and error flags

The format of the transfer area is described on "Format of the standardized transfer area". The format used for the transfer area up to SDF V4.0 can be found in chapter “Appendix”.

Information on the INVARIANT-INPUT form of a statement can be found under the description of the CMDRST macro on "CMDRST Read and analyze statement".

The return code is passed in the standard header of the parameter list.

Standard header


cc: Subcode 2 (SC2)
bb: Subcode 1 (SC1)
aaaa: Maincode
(SC2)SC1MaincodeMeaning
00000000Normal termination
00200004Unrecoverable system error

010008Parameter error:
00










wrong parameter list

01INOUT
03DEFAULT
04MESSAGE
06INVAR
07CALLID
0040000CTransfer area too small
00400010End-of-file (EOF), or error in statement, end-of-file (EOF) was
then detected
00400014Error in statement, a command was then detected
00400018Statement is correct but the default values provided by the
system are errored
0040001CError in statement, //STEP was then detected
00400020Error dialog not possible
00400024Error dialog rejected by user
0040002CEND statement was read
00400034Error in statement, END was then detected
00400040Specified CALLID not found
00400044Syntax file in DSSM catalog not found
0040005CNot enough space in INVAR buffer, INVARIANT-INPUT
truncated
00400064XHCS error during statement entry

Migration from CORSTMT to CMDCST

Migration from CORSTMT to CMDCST is only necessary when the user wishes to use the new functions of CMDCST, CMDRST and CMDTST. In this case the same points must be borne in mind as for CMDRST (see “Migration from RDSTMT to CMDRST” (CMDRST Read and analyze statement)).

The macro return code is transferred in the standard header of the parameter list. The maincode of CMDCST is equivalent to the values which for CORSTMT were transferred in the right-most byte in register 15. The creation of equates for return codes with the CMDANALY macro is no longer necessary because they are automatically created with CMDCST MF=D. The following list shows the old (CORSTMT) and new (CMDCST) field names:

CORSTMT

CMDCST

&P.NOERR
&P.SYERR
&P.PAERR
&P.TRUNC
&P.EOF
&P.SCMD
&P.DFLT
&P.STEP
&P.DIMP
&P.DREJ
&P.END
&P.EERR
&P.NOPRG
&P.INCID
&P.NOFND
&P.ITRC
&P.XHCS

&PREFIX.MDCSUCCESSFUL
&PREFIX.MDCSYSTEM_ERROR
&PREFIX.MDCPARAMETER_ERROR
&PREFIX.MDCAREA_TOO_SMALL
&PREFIX.MDCEOF
&PREFIX.MDCSTMTERROR_CMD
&PREFIX.MDCWRONG_DEFAULTS
&PREFIX.MDCSTMTERROR_STEP
&PREFIX.MDCDIALOG_IMPOSSIBLE
&PREFIX.MDCDIALOG_REJECTED
&PREFIX.MDCEND_STMT
&PREFIX.MDCSTMTERROR_END
&PREFIX.MDCPROGRAM_NOT_IN_SYNTAX_FILE
&PREFIX.MDCINVALID_CALLID
&PREFIX.MDCSYNTAX_FILE_NOT_FOUND
&PREFIX.MDCINVARIANT_INPUT_TRUNCATED
&PREFIX.MDCXHCS_ERROR