Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Task-specific default values

&pagelevel(3)&pagelevel

When entering commands/statements, users can omit operands whose default values meet their requirements. For frequently used commands/statements they are free to define more appropriate operand values within their dialog task. These task-specific default values are used in interactive input instead of the defaults defined in the syntax files.

Defining task-specific default values

Task-specific default values can only be defined within a dialog task through interactive input or in a procedure. To define them, you enter the command/statement with all operand values which are to be defined as defaults. The command or statement name must begin with an exclamation mark (!). Only the syntax of the input is checked, and the input is stored as a definition of task-specific default values. The omission of mandatory operands is ignored.
At each subsequent entry of the command/statement, the task-specific default values are used instead of the original ones.

The following restrictions apply when defining task-specific default values:

  • Definition is not possible in batch mode.

  • Task-specific default values cannot be defined for secret operands unless the value is to be one of the following:

    • an operand value defined with OUTPUT=*SECRET-PROMPT (generally the operand value *SECRET)

    • an operand value defined with SECRET=*NO.

  • They cannot be defined for SDF-P control flow commands (e.g. IF, FOR) and for ISP commands.

  • No more than 10 definitions can be stored for one command/statement.

  • No more than 100 definitions may be stored in all.

Definition in the dialog

With the input !<command> <operands> in command mode, the user can define taskspecific default values for the operands of the command <command> that are specified with <operands> . Similarly, with the input !<statement> <operands> in program mode, taskspecific default values can be defined for the statement <statement> of the loaded program. The user can also switch to temporarily guided dialog to define the default values. In this case, the command/statement name must end with a question mark. Only the operand values that have actually changed are stored as task-specific default values.
As with the normal input of commands/statements, abbreviations are allowed.

Definition in procedures

Task-specific default values can also be defined in procedures, but the definition is only effective for interactive input. To avoid unintentional side effects, only the default values defined in the syntax files are effective in procedure mode.
Procedures enable the user to automate or simplify the definition of task-specific default values. When defined in a logon procedure, the default values are already available at the beginning of the interactive task. Users can prepare procedures for various requirements, which define the desired number of default values and can be called up as necessary.

The definition for a command begins with “/“, the definition for a statement with “//“. Otherwise, defining the values is the same as with interactive input. A command name can be preceded by a label. Definitions are not allowed within the procedure header.

The definition for a statement can also be made in command mode, i.e. the program need not be loaded. For syntax analysis, the program entered as the SDF option DEFAULT-PROGRAM-NAME is used (see the MODIFY-SDF-OPTIONS command). The definition is also stored for use with this program.

Syntax errors during definition of default values trigger error recovery.

Definition at the program interface

The CMDTST and TRCMD macros enable the definition of task-specific default values. With all other SDF macro calls, the definition of default values is rejected as a syntax error.

Evaluation of the definitions

When a command/statement is entered, SDF checks whether there are task-specific default values stored for it and, if so, inserts these values into the entered string. It then analyzes the syntax of the input.

A change of syntax files (e.g. when the version of a subsystem is changed) can mean that stored default values do not match the current syntax, in which case the input is rejected. If this happens, the user must delete the errored definition.

If in the definition lower-ranking operands are specified outside the structure (STRUCTURE-IMPLICIT notation), the structure-initiating operand value does not automatically become the task-specific default value.
For example, the definition !CREATE-FILE ACCESS=*READ does not automatically make the higher-ranking operand PROTECTION=*PARAMETERS the default value.

Several definitions can be stored for one command/statement. All definitions stored for the command/statement are evaluated in the order in which they were defined.
For one and the same operand, the last-defined default value is used each time.
To add a new default value to the definition of operands of a structure level or to modify an individual default value, it is sufficient to store a new definition with this default value.

Administering task-specific default values

The SHOW-INPUT-DEFAULTS command enables users to find out details of all currently defined task-specific default values. Output is to SYSOUT or SYSLST and can be restricted to specific commands, statements and programs. The definitions can be output with an input serial number, which allows the specific deletion of individual definitions. At program level the standard statement of the same name is available with the same functionality.

The RESET-INPUT-DEFAULTS command allows users to delete task-specific default values. If no operands are specified, the default values of all commands are deleted. Users can also delete the definitions of selected commands/statements, and individual definitions can be singled out for deletion via the input serial number.

 

Examples

Example 1

%  BLS0517 MODULE 'SDAMAIN' LOADED                                       (1)
%  SDA0001 'SDF-A' VERSION '04.1E10' STARTED                             (1)
%//open mode=? ————————————————————————————————————————————————————————  (1)
%  CMD0090 EXPLANATION OF OPERAND ‘MODE‘:
*UPDATE() or *CREATE() or *READ or *INIT() -DEFAULT-: *UPDATE
%//!open mode=*read ———————————————————————————————————————————————————  (2)
%//open mode=? ————————————————————————————————————————————————————————  (3)
%  CMD0090 EXPLANATION OF OPERAND ‘MODE‘:
*UPDATE() or *CREATE() or *READ or *INIT() -DEFAULT-: *READ
%//

                                                                                          

(1)

The SDF-A utility is started. The operand values of the MODE operand of the OPEN-SYNTAX-FILE statement are then queried. *UPDATE is displayed as the default value.

(2)

The default value is changed to *READ for this particular task.

(3)

When the operand values are queried again, *READ is now displayed as the default value.

Example 2

/show-file-attr creation-date=*today ——————————————————————————————————  (1)
%        84 :2OSG:$USER1.DATEI.3
%         3 :2OSG:$USER1.PROC.JV
%:2OSG: PUBLIC:      2 FILES RES=        87 FRE=       21 REL=       18 PAGES
/reset-input-defaults *all ————————————————————————————————————————————  (2)
/call-proc proc.default-1,log=*yes ————————————————————————————————————  (3)
%          1  1 /CMD-DEF-1:
%          1  1 /  !SHOW-FILE-ATTR  INF=*MIN
%          2  1 /!CRE-FILE       SUP=*PRIV(VOL=WORK01,DEV-TYPE=D3490-30)
%          3  1 /!CRE-FILE        SUP=*PUBLIC
%          4  1 /CMD-DEF-2:
%          4  1 /  !PRINT-DOC       LINE-SPACING=*BY-EBCDIC-CONTR
%          5  1 /PROG-DEF-1:
%          5  1 / MOD-SDF-OPT      DEFAULT-PROG=SDF-A
%//!OPEN-SYNTAX-FILE MODE=*READ
%//!SHOW            OBJ=*CMD(NAME=*ALL),ATT-INFO=*NO
%          8  1 /PROG-DEF-2:
%          8  1 / MOD-SDF-OPT      DEFAULT-PROG=SORT
%//!SORT-RECORDS     KEEP-EQUAL-SEQUENCES=*YES
%         10  1 /END:
%         10  1 /   IF-BLOCK-ERROR
%         12  1 /end-if
%         13  1 /MOD-SDF-OPT      DEFAULT-PROG=*NONE
%         14  1 /SHOW-INPUT-DEFAULTS *CMD
/!SHOW-FILE-ATTR INFORMATION=*MINIMUM
/!CRE-FILE SUPPORT=*PRIVATE-DISK(VOLUME=WORK01,DEVICE-TYPE=D3490-30)
/!CRE-FILE SUPPORT=*PUBLIC-DISK
/!PRINT-DOC LINE-SPACING=*BY-EBCDIC-CONTROL
%         15  1 /WRITE-TEXT 'SDF-A Default-Werte:'
SDF-A Default-Werte:
%         16  1 /SHOW-INPUT-DEFAULTS *STMT(PROG=SDF-A)
//!OPEN-SYNTAX-FILE MODE=*READ
//!SHOW OBJECT=*COMMAND(NAME=*ALL),ATTACHED-INFORMATION=*NO
//!OPEN-SYNTAX-FILE MODE=*READ
//!SHOW OBJECT=*COMMAND(NAME=*ALL),ATTACHED-INFORMATION=*NO
%         17  1 /WRITE-TEXT 'SORT Default-Werte:'
SORT Default-Werte:
%         18  1 /SHOW-INPUT-DEFAULTS *STMT(PROG=SORT)
//!SORT-RECORDS KEEP-EQUAL-SEQUENCES=*YES
//!SORT-RECORDS KEEP-EQUAL-SEQUENCES=*YES
%             1 /EXIT-PROCEDURE ERROR=*NO
/shid *all, input-serial-number=*yes ——————————————————————————————————  (4)
/"   8 :" !SHOW-FILE-ATTR INFORMATION=*MINIMUM
/"   9 :" !CRE-FILE SUPPORT=*PRIVATE-DISK(VOLUME=WORK01,DEVICE-TYPE=D3490-30)
/"  10 :" !CRE-FILE SUPPORT=*PUBLIC-DISK
/"  11 :" !PRINT-DOC LINE-SPACING=*BY-EBCDIC-CONTROL
//"  12 :" !OPEN-SYNTAX-FILE MODE=*READ
//"  13 :" !SHOW OBJECT=*COMMAND(NAME=*ALL),ATTACHED-INFORMATION=*NO
//"  14 :" !SORT-RECORDS KEEP-EQUAL-SEQUENCES=*YES
/show-file-attr creation-date=*today ——————————————————————————————————  (5)
%S NNN NW              84 :2OSG:$USER1.DATEI.3
%S NNN NW 3 :2OSG:$USER1.PROC.JV

                                                                                                                                                                                                        

(1)

SHOW-FILE-ATTRIBUTES displays all files created on the current day. These are output implicitly with INFORMATION=*NAME-AND-SPACE (default value of the command).

(2)

RESET-INPUT-DEFAULTS resets all task-specific default values set so far.

(3)

The procedure PROC.DEFAULT-1 is called. In the procedure, task-specific default values for commands and for statements of the SDF-A and SORT programs are set (cf. procedure execution). The procedure ends with output of the task-specific default values. Note: The programs are not called. The default values of the statements are set in command mode. Before they are set, the corresponding program is set by means of the MODIFY-SDF-OPTION command (operand DEFAULT-PROGRAM-NAME).

(4)

SHOW-INPUT-DEFAULTS (alias SHID) then displays all task-specific default values with the input serial number again.

(5)

When the SHOW-FILE-ATTRIBUTES command is entered again, all files created on the current day are displayed. These are now output with the task-specific default value INFORMATION=*MINIMUM (cf. default value with the input serial number 8).