Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@SDFTEST - Syntax check by SDF

&pagelevel(3)&pagelevel

The @SDFTEST statement is used to check whether a line range contains syntactically correct SDF commands or syntactically correct SDF statements.

A program name can be set for the check of the SDF syntax of SDF statements.

If the SDF option GUIDANCE=MIN|MED|MAX is set then in interactive mode the user is taken to the SDF correction dialog if incorrect SDF syntax is detected.
In batch mode SDF syntax error messages will be logged to SYSLST. If job switch 8 is set at the start of EDT, these messages will be logged to SYSOUT instead of SYSLST.

If the user aborts the correction dialog or if the dialog is not possible then the error message EDT4310 is output if the SDF syntax is incorrect.

If the SDF syntax is correct or has been corrected then the text is taken over into the work file. The format in which the statement is taken over is determined by the SDF LOGGING option (see the description of the /MODIFY-SDF-OPTIONS command and the description in the SDF User Guide [6]).

The current SDF settings apply. These can be modified with /MODIFY-SDF-OPTIONS.

Operation

Operands

F mode, L mode

@SDFTEST

[lines[,...] ] [PROGRAM [= progname [INTERNAL | EXTERNAL] ] ]

lines

One or more line ranges in which the SDF syntax of SDF commands and, if required, also of SDF statements is to be checked.

If lines is not specified then the SDF syntax of all the SDF commands and, if required, SDF statements in the work file is checked.

PROGRAM=

Causes the SDF syntax of SDF statements to be analyzed.

If PROGRAM is not specified then only the SDF syntax of SDF commands is analyzed.

progname

Name of the program whose statements are to be subjected to a syntax check in accordance with the SDF syntax file hierarchy.

If progname is not specified then the predefined name set by the @PAR SDF-PROGRAM statement is used. If no name has been preset then the @SDFTEST statement is rejected with the message EDT5320. If the program name is not known in the current SDF syntax file hierarchy then the @SDFTEST statement is rejected with the message EDT5321.

INTERNAL

The program name is the maximum 8-character internal name. The internal name can be ascertained using SDF-A if it does not correspond to the name of the program.

EXTERNAL

The program name is the maximum 30-character external name (e.g. LMS, SDF-A or HSMS).

If neither INTERNAL nor EXTERNAL is specified as the name type then the name type set as the default value in the @PAR SDF-NAME-TYPE statement is used. When EDT starts, the name type INTERNAL is set as the default.

EDT differentiates between 3 types of record content:

  1. Records which start with one (and only one) '/' in column 1:

    These are checked for command syntax in accordance with the SDF syntax file hierarchy. Admissibility in terms of privileges and system environment is determined by the current user and the current environment.

  2. Records which start with '//':

    These are passed to SDF for a statement check if PROGRAM has been specified.

  3. Other data lines:

    Records which do not start with either '/' or '//' are ignored.

Lines which start with '/' and have a continuation character ('-') as their final character are chained with the next line provided that this also starts with '/'. The two lines are then passed to SDF together when the @SDFTEST statement is executed. The continuation lines do not have to be present in any of the specified line ranges. It is sufficient for the first line to be present in one of the specified line ranges. If PROGRAM is specified then this procedure also applies to lines that start with '//'.

The checked command or statement overwrites the old command or statement in the work file together with all the continuation lines. If the command or statement is modified during the SDF check (for example because LOGGING=INVARIANT was set in a preceding /MODIFY-SDF-OPTIONS command) then the affected lines are reformated and split into multiple continuation lines if necessary. The continuation character is set in the 72nd column. If necessary, the following lines are renumbered. Line numbers are assigned using the procedure Insertion between two lines (see section “Line number assignment”). If it is not possible to insert the lines generated by SDF then the statement is aborted with the message EDT5364 or EDT5365.

In F mode, the message EDT0285 is issued after all the checks have been performed if no errors have occurred or if processing was continued after an error. In L mode, the SDF output for statements (but not for commands) is sent to SYSOUT.

If a checked command or statement contains errors and the correction dialog is unsuccessful, EDT outputs the message EDT4310. In interactive mode, the user is also asked whether the check is to be continued.

%

%

EDT4310 SDF: SYNTAX ERROR IN LINE (&00)

EDT0911 CONTINUE PROCESSING? REPLY (Y=YES; N=NO)?

If the user responds N to the message in interactive mode then the @SDFTEST statement is interrupted with the message EDT5324 and, in F mode, the incorrect line is displayed at the topmost position in the window. In contrast, if the user responds Y then the syntax check continues with the next line which has not yet been examined. In batch mode, the syntax check is always continued.

If the work file containing the lines to be checked has a character set other than EDF03IRV then it is necessary to take note of certain special characteristics of SDF use. In particular, characters which do not belong to the EBCDIC kernel are naturally only permitted in literals or comments. Furthermore, SDF always conducts the correction dialog in the character set defined using /MODIFY-TERMINAL-OPTIONS and also always interprets the byte
sequences passed to it in this character set.

Consequently, before passing the statements or commands to SDF, EDT converts them into the character set defined with /MODIFY-TERMINAL-OPTIONS if the currently set GUIDANCE-MODE does not make it possible to conduct a correction dialog. If this operation is unsuccessful, then the @SDFTEST statement is rejected with the message EDT5327.

If no correction dialog is possible then EDT uses other (less constraining) rules for the conversion. If the work file has an EBCDIC character set then this is used without conversion. If the work file possesses an ISO character set then the corresponding EBCDIC reference character set is used. In all other cases, EDT uses the character set UTFE. If conversion is not possible, then the @SDFTEST statement is aborted with the message EDT5327.

If SDF returns data then this is converted into the work file's character set. If this is not possible, then the @SDFTEST statement is aborted with the message EDT5453.

If the statement is interrupted with [K2] and the EDT session is continued with /INFORM-PROGRAM then the processing of the statement is aborted and message EDT5501 is output.

Note

If GUIDANCE=EXPERT is set then in interactive mode EDT displays any errors reported by SDF only in the form EDT4310. To permit a more precise error analysis, it is advisable to set
GUIDANCE=MIN, MED or MAX.

Passwords and other operands which have been defined using OUTPUT=SECRET-PROMPT are replaced by P if the GUIDANCE setting is MIN, MED or MAX.

SDF does not recognize incorrect operands in ISP commands.

If the character set UTFE has been set in /MODIFY-TERMINAL-OPTIONS then the screen layout for the SDF correction dialog is shifted if characters not present in EDF03IRV occur. This is due to the fact that SDF does not currently support Unicode. However, it does not usually cause any functional restrictions.

Commands and statements may not exceed a maximum length of 16379 bytes either on input or on output. Otherwise, the @SDFTEST statement is rejected with the message EDT5325 or EDT5326.