Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

OPNCALL Create program context

&pagelevel(5)&pagelevel

OPNCALL creates a program context and opens the syntax files specified by the user. If *STD (= default) is specified, the syntax file used by the system context is opened again. The macro returns the context identifier (= CALLID) to the user.

OPNCALL can be used to open a program context corresponding to the system context, in which user programs can activate their own user syntax files without affecting the current user syntax file in the system context. The user syntax file of the program is opened in parallel to the user syntax file of the system concept.

Operation

Operands

OPNCALL

CALLID = addr / (r) ]

[ ,TASKTYP = ANYTASK / TERMINAL / BATCH / ALL ]

[ ,SFSYSTM = *STD / filename ]

[ ,SFGROUP = *STD / filename ]



[ ,MF =]


CALLID =
Address of the identifier of the opened context, which is determined by further macro calls.

addr / (r)
Address of a 4-byte field or a register in which SDF passes the context identifier. The caller must specify the context identifier when referring to the program context. This field must be aligned on a word boundary.

TASKTYP =
Specifies the environment in which the caller is working when the CMDTST and TRCMD macros are called. SDF checks whether the specified statements or commands are allowed in the defined environment. If not, they are rejected by SDF.

ANYTASK
SDF does not check whether the inputs are allowed.

TERMINAL
SDF accepts only the statements and commands which are defined in the syntax files of the context with DIALOG-ALLOWED=*YES or DIALOG-PROC-ALLOWED=*YES (see the PROCMOD operand of the CMDTST and TRCMD macros).

BATCH
The statements must be defined with BATCH-ALLOWED=*YES or BATCH-PROC-ALLOWED=*YES.

ALL
SDF checks for both dialog and batch tasks to ascertain whether the statements are allowed. If a statement is not allowed for either type of task, it is rejected by SDF.

In the case of subsequent CMDTST or TRCMD calls, the following process can be expected:

  • in the case of PROCMOD=ANY, all statements and commands are rejected

  • in the case of PROCMOD=NO, statements and commands defined with DIALOG-ALLOWED=*NO or BATCH-ALLOWED=*NO are rejected

  • in the case of PROCMOD=YES, statements and commands which are defined with DIALOG-PROC-ALLOWED=*NO or BATCH-PROC-ALLOWED=*NO are rejected.

  • in the case of PROCMOD=ALL (only TRCMD) all statements and commands which are only permitted in interactive mode (defined with DIALOG-PROC/BATCH-PROC/BATCH-ALLOWED=*NO) are rejected.

SFSYSTM =
Specifies the system syntax files which are activated in the program context being created.

*STD
The system syntax files of the system context are activated in the program context. If system administration switches these system syntax files, the system syntax files of the program context are modified accordingly.

filename
Name of the system syntax file to be activated. The specified system syntax file in the program context can be switched only after a CLSCALL. It applies to the user task which issued the OPNCALL macro. Another user task can access this syntax file only after it has issued its own OPNCALL macro.

SFGROUP =
Specifies the group syntax file to be activated.

*STD
The group syntax file of the system context is activated. This is assigned to the profile ID of the user task.

*NO
No group syntax file is activated in the program context.

filename
Name of the group syntax file which is to be opened in the program context.

MF =

Defines special requirements for macro expansion (see the “Executive Macros” manual [8 (Related publications)] for details).

L
Only the data part of the macro expansion (operand list) is generated. This requires that no operand types with executable code appear in the macro. The data part generated has the address specified in the name field of the macro.

(E,(1)) / (E,opaddr)
Only the instruction part of the macro expansion is generated. The associated data part (operand list) is referenced by the address “opaddr”. This either appears in register 1 or is specified directly.

Register usage
Register 1: address of the parameter list

Return information and error flags
Register 15 contains a return code in the right-most byte.

X’00’

X’44’

X’54’

normal execution

syntax file not found

maximum permissible number of contexts exceeded