Monday 11 March 2013

TSO EXEC and EXECUTIL command


EXEC:

EXEC is used to explicitly execute a CLIST or REXX(also called as EXECs) exec.
CLIST and REXX can be executed implicitly if the libraries containing the CLIST and REXX are assigned to the DDNAMEs SYSPROC or SYSEXEC.

For "shortnames", the last qualifier must be CLIST and must be omitted

EXEC 'fullname(member)' 'parameters'
EXEC 'fullname(member)' 'parameters' CLIST
EXEC shortname(member) 'parameters'
EXEC shortname(member) 'parameters' CLIST

For "shortnames", the last qualifier must be EXEC and must be omitted; for the two examples without the "EXEC" keyword at the end, the first line of the exec must contain a comment containing the word REXX (/*REXX*/):

EXEC 'fullname(member)' 'parameters'
EXEC 'fullname(member)' 'parameters' EXEC
EXEC shortname(member) 'parameters'
EXEC shortname(member) 'parameters' EXEC

·  The 'parameters' may be omitted from the command line if no parameters are to
be passed to the CLIST or REXX exec.
·  The CLIST keyword at the end of the command line should only be specified for
CLISTs.
·  The EXEC keyword at the end of the command line should only be specified for
REXX execs.


Implicitly calling CLIST or EXEC:

CLISTs and REXX execs may be executed implicitly.
While calling the CLIST or REXX(EXEC) implicitly the EXEC command is not used , instead
member name of the exec is used as if it were a command.
This requires that the CLIST or REXX execs reside in libraries which are assigned to the
ddnames SYSPROC or SYSEXEC.

The libraries assigned to SYSPROC may contain CLISTS and/or REXX execs.
The libraries assigned to SYSEXEC may contain only REXX execs.

The record format of the libraries may be fixed (F B) or variable (V B), but must match the record format of any existing libraries already assigned to the ddname. The record length may be up to 255 for fixed format or 259 for variable format, but for fixed format the record length must match any existing libraries already assigned to the ddname.

SYSPROC is pre-allocated to numerous system libraries. If you add any
libraries to SYSPROC, be sure to include the existing system libraries when reallocating
SYSPROC.

SYSEXEC may be pre-allocated to various system libraries. If you add any
libraries to SYSEXEC, be sure to include the existing system libraries when reallocating
SYSEXEC. All libraries allocated to SYSEXEC should match in record format (and
record length for fixed format).

Also, SYSEXEC will not be searched for any REXX execs unless SYSEXEC searching is activated.
This is done by using the command EXECUTIL.

Following is the syntax for executing the CLIST or REXX implicitly

membername parameters

OR

%membername parameters

The parameters are optional and may be omitted.

% -->   The system normally checks several libraries before the exec libraries; the % informs the system to check only the exec libraries. The %is optional and may be omitted; however, use of % results in slightly improved performance.



EXECUTIL TSO command:

EXECUTIL determines whether or not the ddname SYSEXEC is searched for implicit
execs. By default, only the ddname SYSPROC is searched for implicit execs. (SYSEXEC
may contain only REXX execs; SYSPROC may contain CLISTS and REXX execs.)
EXECUTIL may be executed at any time to activate or deactivate searching of
SYSEXEC.

Turn searching on: EXECUTIL SEARCHDD(YES)
Turn searching off: EXECUTIL SEARCHDD(NO)

No comments:

Post a Comment