Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Rules for entering SDF-P commands interactively

&pagelevel(4)&pagelevel

Input line structure

In general, the same syntax rules apply to commands as when they are used in a procedure, with the exception of the initial slash and the end-of-line character.

The initial slash at the beginning of the input line can be omitted.

This applies both when entering individual SDF-P commands and in command blocks.

End of line

Input lines can be terminated with the (send) key or with a logical end of line ( key). The following generally applies: as soon as the key is pressed, input is considered to be terminated.

The way in which an input line must be terminated depends on various factors:

  • If input consists of a single line only, it is terminated with .
    The command is analyzed and immediately executed.

  • If several associated input lines are to be entered together but the commands are not embedded in a command block, each input line must be terminated with a logical end of line character ( key). The key must not be pressed until the last input line has been terminated.

  • If several associated input lines are to be entered together and the commands are embedded in a command block, each line can be terminated with .As each line is entered, its contents are then preanalyzed and buffered but not yet executed. As soon as an error is detected (for example, an incorrect sequence of control flow commands), the block is canceled. The entire command block is not executed until the command block has been terminated with the block termination command (and ).
    If command blocks are entered interactively, the block identifier appears in the operating system prompt. The normal operating system prompt does not reappear until the block is terminated or canceled due to an error.

Data and statements

In order for it to be possible within command blocks to differentiate between data and commands, data must be entered as arguments of the SEND-DATA command (see "SEND-DATA Transfer data record to program ").

If a line is to contain a statement, it must begin with two slashes “//” or it must be entered as the argument of a SEND-STMT command.

Before the program is called, /ASSIGN-SYSDTA *SYSCMD must be set so that the program reads the data or statements from the dialog block.

Expression replacement

Expression replacement is possible in both guided and unguided dialog. However, actual replacement does not occur until the command is executed.

In contrast to & replacement in S procedures, the expression to be replaced is left unchanged if an error is detected during evaluation.

Example

/WRITE-TEXT '&(1 // 2)'

The expression 1 // 2 is invalid because numbers must not be concatenated. In an S procedure, error handling is initiated in this case; in a dialog, the character string &(1 // 2) is output unchanged.

Job variable replacement is also active by default in the dialog.

Interrupt/cancel

The or key can be used to cancel input within a command block at any time. The normal operating system prompt then reappears.

Command block execution can be interrupted at any time with the key and resumed with RESUME-PROCEDURE.

Guided/unguided dialog

When SDF-P commands are entered individually in interactive mode, guided dialog can be used.

Commands can be entered in command blocks in unguided dialog only; even the “command?” entry is buffered. Guided dialog is not initiated until command execution. Preset entries are then taken into account.

Guided dialog is active in dialog blocks only if it has been switched on with the command MODIFY-SDF-OPTIONS PROCEDURE-DIALOGUE=*YES.

Expression replacement can be used in guided dialog.