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. If no module containing the entry point is found in the specified library, the If no library is specified, the system first searches in the private task library If the search fails, the error message |
UNLOAD | Specifies that the load unit which contains the entry point is to be unloaded |
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.