Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@RUN - Call user routine

&pagelevel(3)&pagelevel

The @RUN statement is used to execute a routine written by the user (user routine) (see Subroutine Interfaces User Guide [1]).

Operation

Operands

F mode, L mode

@RUN

ENTRY=entry [,MODLIB=modlib] [,UNLOAD] [,string]

entry

modlib

Entry point for the user routine.

Name of the library containing the module which contains the entry point.
The library must exist. Otherwise, the statement is rejected with the error
message EDT5372.

If no module containing the entry point is found in the specified library, the
system first searches in the alternative libraries BLSLIBnn then in the
private task library and system task library $TASKLIB.

If no library is specified, the system first searches in the private task library
and then in the system task library $TASKLIB.

If the search fails, the error message EDT5372 is issued.

UNLOAD

Specifies that the load unit which contains the entry point is to be unloaded
following return to EDT. The UNLOAD operand has the same effect as a
separate @UNLOAD UNIT=entry statement, i.e. it only causes an unload
if the specified entry point is also the name of a load unit (see below). If, for
example, the entry point has been found in an already loaded load unit with
a different name then it is not possible to execute UNLOAD. In this case, the
message EDT1907 is output.

string

String that is passed to the called program.

The implementation of external user routines and the way parameters are passed to them are explained in more detail in “User Routines - @RUN” [1].

If no initialization routine is defined for the user routine then the statement is rejected with the message EDT5469. If the associated initialization routine sends a return code then the statement is rejected with the message EDT5470 if the initialization routine does not support the version and the message EDT5471 if the initialization routine reports a different error.

If the execution of the @RUN statement results in a separate load operation then a UNIT name which is the same as the specified entry point is notified to the dynamic binder loader .

This UNIT name can be specified in the @UNLOAD statement in order to unload all the load units that were loaded together with the entry point. The @RUN statement's UNLOAD operand also refers to this UNIT name. If the entry point is found inside another load unit, @RUN does not therefore result in a separate load operation and the entry point can only be unloaded together with this load unit.

The @RUN statement is one of the EDT statements with security implications (see also section “Access protection”). Under certain privileged IDs, the @RUN statement is rejected. This also applies to uninterruptible system procedures in interactive mode (read from SYSDTA with RDATA, execute EDT start procedure) unless the @RUN statement is issued by the protected procedure itself (SYSDTA=SYSCMD).

Note

The entry operand, which accepts names of up to 32 characters in length, is casesensitive.

Caution

The format of the statement and interface used to call the routine are different in Unicode and compatibility mode.