Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

SET-PROCEDURE-OPTIONS

&pagelevel(3)&pagelevel

Define procedure attributes

Component:

SDF-P-BASYS

Functional area:

Procedures                                                                                                       

Domain:

PROCEDURE

Privileges:

STD-PROCESSING
OPERATING
HARDWARE-MAINTENANCE
SAT-FILE-EVALUATION
SAT-FILE-MANAGEMENT
SECURITY-ADMINISTRATION

Function

The SET-PROCEDURE-OPTIONS command enables the user to define the attributes of an S procedure. It is an optional command. If used, it must be the first command in the procedure head; if it is not used, the attributes are defined in accordance with the SDF-P default values.
The following options can be set in the SET-PROCEDURE-OPTIONS command (the SDF-P default values are given in parentheses):

  • permissible procedure call (CALLER=*ANY)

  • implicit declaration of S variables (IMPLICIT-DECLARATION=*YES)

  • scope of logging (LOGGING=*YES)

  • interruption of the procedure (INTERRUPT-ALLOWED=*YES)

  • format of the procedure (INPUT-FORMAT=*FREE-RECORD-LENGTH)

  • replacement of variables within data records (DATA-ESCAPE-CHAR=*NONE)

  • SYSFILE context of the current procedure level (SYSTEM-FILE-CONTEXT=*STD)

  • error recovery when there is a mixture of input data and commands (DATA-ERROR-HANDLING=*YES)

  • setting for job variable replacement (default in interactive mode: JV-REPLACEMENT=*AFTER-BUILTIN-FUNCTION; in S procedures JV-REPLACEMENT=*NO)

  • setting for error handling (ERROR-MECHANISM=*SPIN-OFF-COMPATIBLE)

  • suppression of selected SDF-P messages (SUPPRESS-SDP-MSG=*NONE)

If the SET-PROCEDURE-OPTIONS command is not specified explicitly, the SDF-P defaults apply. Defaults for the command which have been modified in the activated syntax file apply to the procedure only when the SET-PROCEDURE-OPTIONS command is specified explicitly.

The procedure attributes can be changed by means of the MODIFY-PROCEDURE-OPTIONS command. The “SDF-P message suppression” option can be modified at any time, but the other settings can only be changed if the chargeable SDF-P subsystem is in operation (see the MODIFY-PROCEDURE-OPTIONS command). 

Format

SET-PROCEDURE-OPTIONS                                                                                                                     

CALLER = *ANY / *CALL / *INCLUDE

,IMPLICIT-DECLARATION = *YES / *NO

,LOGGING-ALLOWED = *PARAMETERS(...) / *YES / *NO /


*PARAMETERS(...)



|

CMD = *YES / *NO



|

,DATA = *YES / *NO

,INTERRUPT-ALLOWED = *YES / *NO

,INPUT-FORMAT = *FREE-RECORD-LENGTH / *BY-SDF-OPTION

,DATA-ESCAPE-CHAR = *NONE / '&&' / '#' / '*' / '@' / '$' / *STD

,SYSTEM-FILE-CONTEXT = *STD / *SAME-AS-CALLER / *OWN

,DATA-ERROR-HANDLING = *YES / *NO

,JV-REPLACEMENT = *NONE / *AFTER-BUILTIN-FUNCTION

,ERROR-MECHANISM = *SPIN-OFF-COMPATIBLE / *BY-RETURNCODE

,SUPPRESS-SDP-MSG = *NONE / list-poss(2000): <alphanum-name 7..7>

,TRANSLATION-CCS = *STD / *EDF03IRV / *CURRENT

Operands

CALLER =
This defines how the procedure may be called.

CALLER = *ANY
The procedure can be called using the commands CALL-PROCEDURE and INCLUDE-PROCEDURE. The latter command is only available if the chargeable subsystem SDF-P is loaded. Invocation as an INCLUDE procedure is described in the “SDF-P” manual [34].

CALLER = *CALL
The procedure can only be called by means of the CALL-PROCEDURE command.

CALLER = *INCLUDE
The procedure can only be called by means of the INCLUDE-PROCEDURE command (which in turn is only possible if the subsystem SDF-P is loaded). 

IMPLICIT-DECLARATION = *YES / *NO
This specifies whether S variables may be declared implicitly.
Implicit declaration means that S variables are created automatically when they are assigned for the first time, and corresponds to explicit declaration using DECLARE-VARIABLE and preset values:
A simple S variable without an initial value and without definition of the variable type is created in class 5 memory. This S variable is known only within the procedure (see section"SDF-P-BASYS").
S variables which are used as procedure parameters (see the DECLARE-PARAMETER command) are also declared explicitly. They too are created within the procedure only.
If implicit declaration is not permitted, S variables must be created explicitly before they are first assigned. The attributes of the S variables can be defined at this point. Only variables of type ANY are permitted with SDF-P-BASYS.

LOGGING-ALLOWED =
This determines whether logging of procedure execution is permitted. The specification applies only to the current procedure level.
Whether logging is actually performed is determined by the caller in the CALL-PROCEDURE command.

LOGGING-ALLOWED = *PARAMETERS(...)
Logging is permitted. However, the user can grant the requisite authorization separately for commands and data records:

CMD = *YES / *NO
This specifies whether commands can be logged.

DATA = *YES / *NO
This specifies whether data records can be logged.

LOGGING-ALLOWED = *YES
Logging is permitted without restrictions.

LOGGING-ALLOWED = *NO
Logging is not permitted.

INTERRUPT-ALLOWED = *YES / *NO
This specifies whether the procedure may be interrupted by means of the [K2] key or the HOLD-PROCEDURE command. The interrupted procedure can be resumed by means of the RESUME-PROCEDURE command.
If interruption is not permitted, a query to this effect is output after the interrupt request. If the user insists upon an interruption, the system terminates the job immediately.

INPUT-FORMAT =
This specifies the length in which the input records for the procedure are to be evaluated and the positions at which a continuation character is possible.

INPUT-FORMAT = *FREE-RECORD-LENGTH
Input records are evaluated in their full length. The continuation character is located in the last column that does not contain a blank.
The maximum length of an input record is 4096 characters (4 K).

INPUT-FORMAT = *BY-SDF-OPTION
Input records are evaluated up to and including column 72; any subsequent characters are ignored. The location of the continuation character is determined by the current SDF setting (output by means of the SHOW-SDF-OPTIONS command; setting via the CONTINUATION operand of the MODIFY-SDF-OPTIONS command).

DATA-ESCAPE-CHAR = *NONE / '&&' / '#' / '*' / '@' / '$' / *STD
This specifies whether variables are to be replaced and expressions evaluated in data records.
It is possible to define the character with which the relevant variables or expressions begin. Permissible characters are &, #, *, @ and $. Specifying & is equivalent to specifying *STD (as on command level). If the character & is to be specified explicitly, it must be entered twice.

SYSTEM-FILE-CONTEXT =
This specifies the system file context with which the procedure is to execute.

SYSTEM-FILE-CONTEXT = *STD
A separate system file context is created. The system file SYSDTA is assigned automatically to the system file SYSCMD (i.e. to the procedure file) and the assignments made by the caller are assumed for the other system files. Modifications to assignments apply solely to the current procedure level. When a procedure is terminated, the system files are again given the assignments made by the caller.

SYSTEM-FILE-CONTEXT = *SAME-AS-CALLER
The procedure executes in the system file context of the caller.
Modifications to assignments within the current procedure level thus always affect the system file context of the caller.

SYSTEM-FILE-CONTEXT = *OWN
A separate system file context is created. The assignments made by the caller are adopted for all system files (including SYSDTA). Modifications to assignments are only valid within the current procedure level. When a procedure is terminated, the system files are again given the assignments made by the caller.
The specification *OWN corresponds to what was previously valid for non-S procedures.

DATA-ERROR-HANDLING =
This specifies whether SDF-P error recovery is to be activated in the following cases:

  • data (without a leading slash or with a leading double slash) is found at a point where commands are expected

  • &<variable> or only & occurs within data, and <variable> is not known either as an S variable or as a builtin function.

DATA-ERROR-HANDLING = *YES
SDF-P error recovery is triggered in the cases specified above.

DATA-ERROR-HANDLING = *NO
SDF-P error recovery is not triggered in the cases specified above.

JV-REPLACEMENT =
This specifies whether job variable replacement is to be carried out.

JV-REPLACEMENT = *NONE
Job variables are not replaced. Only S variables or builtin functions are replaced. This setting guarantees that builtin functions can be introduced compatibly (i.e. their names will not overlap with JV names already assigned by the user).

JV-REPLACEMENT = *AFTER-BUILTIN-FUNCTION
Job variables are replaced. Replacement occurs in the following sequence: first S variable, then builtin function and finally job variable. Incompatibilities during job variable replacement due to like-named builtin functions can be avoided by specifying the user ID along with the JV names. Moreover, the desired job variable replacement can also be achieved through the builtin function JV.

ERROR-MECHANISM =
Specifies whether SDF-P error handling is triggered in compatible fashion with the previous spin-off mechanism or on a nonzero subcode1.

ERROR-MECHANISM = *SPIN-OFF-COMPATIBLE
SDF-P error handling is triggered in compatible fashion with the previous spin-off mechanism. Subcode1 is not taken into consideration.
This setting ensures that the error behavior of S procedures created in BS2000 Version 10.0A remains compatible.

ERROR-MECHANISM = *BY-RETURNCODE
SDF-P error handling is triggered on a nonzero subcode1. Spin-off is not taken into consideration. Error handling in the procedure must be based on the possible command return codes of the commands contained in the procedure.

SUPPRESS-SDP-MSG =
Determines whether the output of certain SDF-P messages (message class SDP) is to be suppressed. The option applies only to the calling procedure (it is not propagated).

SUPPRESS-SDP-MSG = *NONE
Message output is not suppressed; all SDF-P messages are output.

SUPPRESS-SDP-MSG = list-poss(2000): <alphanum-name 7..7>
Set of SDF-P messages which are to be suppressed.

TRANSLATION-CCS = 
Determines which character set (CCS, Coded Character Set) the built-in functions UPPER-CASE and LOWER-CASE use for conversion to uppercase and lowercase letters.

TRANSLATION-CCS = *STD
The standard character set EDF03IRV is used. When an optional Rep is employed for SDF-P-BASYS, *STD has a system-global effect like *CURRENT.

TRANSLATION-CCS = *EDF03IRV
Forces the use of the standard character set EDF03IRV.

TRANSLATION-CCS = *CURRENT
The character set which is currently set for the task’s input stream is used. The command is rejected in the following cases:

  • The character set used is not supported or is not known.

  • The character set is not EDF03IRV and the XHCS subsystem is not loaded.

  • The character set is a 16-bit character set (only 8-bit character sets are supported). 

Return codes

The SET-PROCEDURE-OPTIONS command can only be used as the first command in the procedure head of an S procedure. SDF-P detects errors in the procedure head during preanalysis and terminates the procedure call.
The command return codes can only occur if the command is used outside the procedure head.

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No error


1

CMD0202

Syntax error


1

SDP0118

Command in incorrect context


3

CMD2203

Incorrect syntax file


32

CMD0221

System error (internal error)


130

SDP0099

No further address space available