Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Notes

&pagelevel(4)&pagelevel

If a command implemented by means of a procedure is to be generally available:

  • the procedure must be shareable and

  • the user ID under which the procedure file is cataloged must be specified as part of the file name in the command definition (see ADD-CMD).

In the operand list that SDF passes to the procedure the operands may be defined as keyword operands or as positional operands. In the case of a keyword operand, a different name may be passed than the one that appears in the command syntax (see ADD-OPERAND ...,RESULT-OPERAND-NAME=).

Operand definitions

Command input

Parameter list
passed to the
procedure

//ADD-OPER OP1,...,RES-OPER-N=*POS(1)
//ADD-OPER OP2,...,RES-OPER-N=*POS(2)
//ADD-OPER OP3,...,RES-OPER-N=*SAME
//ADD-OPER OP4,...,RES-OPER-N=PARAM

/CMD W,X,Y,Z
/CMD W,OP4=Z,
OP3=Y,OP2=X

('W','X',OP3='Y',
PARAM='Z')

Several operands for a command may be concatenated to form a single operand and passed to the procedure in this form (see ADD-OPERAND ...,RESULT-OPERAND-NAME=,CONCATENATION-POS=).

Operand definitions

Command input

Parameter list
passed to the
procedure

//ADD-OPER OP1,...,RES-OPER-N=*POS(2),
CONC-POS=2
//ADD-OPER OP2,...,RES-OPER-N=*POS(2)
CONC-POS=1
//ADD-OPER OP3,...,RES-OPER-N=*POS(1)

/CMD X,Y,Z

/CMD X,OP3=Z,
OP2=Y

('Z','YX')

//ADD-OPER OP1,...,RES-OPER-N=OP2,
CONC-POS=2
//ADD-OPER OP2,...,RES-OPER-N=*SAME
CONC-POS=1
//ADD-OPER OP3,...,RES-OPER-N=*POS(1)

/CMD X,Y,Z

/CMD X,OP3=Z,
OP2=Y

('Z',OP2='YX')

An operand for which there is only one permissible value may be so defined that, while it does get passed to the procedure, it does not appear in the command syntax (see ADD-OPERAND ...,PRESENCE=*INTERNAL-ONLY). If the operand constitutes the only operand in a structure, then the structure will also be invisible in the command syntax. This can be used, among other things, for passing branch destinations to the procedure, to which processing within the procedure may branch depending on input alternatives (see “Example 1: Assembly command”).

On the other hand, an operand which, for example, is needed only for structuring the command syntax, and not for the implementation, may be suppressed when operands are passed to the procedure (see ADD-OPERAND ..., PRESENCE=*EXTERNAL-ONLY). ADD-VALUE ...,VALUE=<c-string>(...,OUTPUT=...,...),... can be used to direct SDF to convert defined single values to other values before passing them on to the procedure or to suppress transfer of the values. For example, it can be specified that SDF is to pass on the value ’ISD’ to the procedure instead of the value ’YES’ defined for the input (see example 1).

ADD-VALUE ...,OUTPUT=NORMAL(STRING-LITERALS=...) can be used to specify whether SDF is to recode an operand value before passing it on to the procedure (<c-string> to <x-string> or vice versa).

ADD-VALUE ...,STRUCTURE=*YES(SIZE=...,...),... is used to determine whether a structure will be integrated into the operand form at the MINIMUM and MEDIUM level of guided dialog or whether SDF will display a separate subform for this structure.

Normally, the default values of the ADD statements can be used extensively when defining a command. However, these statements also provide a number of means for tailoring a command definition to the user’s individual requirements. Further information on this can be found in the descriptions of the ADD statements.