-
The overhead of executing TSO under DIF is fairly high. Occasional use might be acceptable, but the TSO command is not recommended for high-volume use.
-
Since the SYSTSPRT and SYSTSIN DD statements are required by TSO, the TSO interface requires that DIF command processing be single-threaded to ensure the output from the TSO command is returned to the correct caller
The MVSFUNC command was originally added to DIF to enhance command processing for the SCC Explorer GUI action command interface. However, the MVSFUNC command can be used like any other DIF command and is available from all DIF command interfaces.
The DIF MVSFUNC provides access to many of the common z/OS interfaces and can be called outside of a TSO environment. Many of the functions are executed directly by DIF. However, the MVSFUNC IDCAMS, DFDSS, and FDRCOPY commands execute the requested product within the DIF address space.
Syntax:
MVSFUNC ALLOCATE {limited allocation parameters}
MVSFUNC DFDSS/DSS {dss-control-statements}
MVSFUNC FDRCOPY {FDR-control-statements}
MVSFUNC FREE {limited free parameters}
MVSFUNC HDELETE {dsname}
MVSFUNC HSENDCMD {command}
MVSFUNC IDCAMS {idcams-control-statements}
MVSFUNC MIGRATE {dsname} [options]
MVSFUNC RECALL {dsname}
MVSFUNC SCRATCH {dsname}
-
Command output - Command output from the MVSFUNC command is returned to the caller. For example, if the command is issued from an SCC Explorer GUI client, the messages produced by the command will be returned to the GUI and displayed in the action log. Likewise, if an operator issues an MVSFUNC command, the messages will be returned to the console.
-
Parameters to each function - In most cases, the MVSFUNC parameters to each function are simply passed through to the associated application. The exceptions are the MVSFUNC ALLOCATE and FREE commands. The ALLOCATE command can take the parameters in the table on the following page. The FREE command is honors the DATASET, DDNAME, DSNAME, and FILE parameters. The parameters are used to build the text units on an SVC 99 call.
| ALLOC Parameter | Sample | Description |
|---|---|---|
CATALOG |
CAT |
DISP=(...,CATLG) |
CYLINDERS |
CYL |
Space request is in CYL |
DATASET |
DA(dataset.name) |
Data Set name Note: No member
names - use
MEMBER |
DDNAME |
DD(filename) |
File name |
DELETE |
DEL |
DISP=(...,DELETE) |
DIRECTORY |
DIR(40) |
Number of directory blocks |
DSNAME |
DSN(dataset.name) |
Data set name Note: No member
names - use
MEMBER |
FILE |
FILE(filename) |
File name |
FREE |
FREE |
Free the file after close (FREE=CLOSE) |
KEEP |
KEEP |
DISP=(...,KEEP) |
MEMBER |
MEMBER(name) |
PDS Member name or GDG number |
MOD |
MOD |
DISP=MOD |
NEW |
NEW |
DISP=NEW |
OLD |
OLD |
DISP=OLD |
REUSE |
REUSE |
Free any existing allocation to the file before allocate |
SHR |
SHR |
DISP=SHR |
SPACE |
SPACE(pri,sec) |
Space values for primary and secondary requests |
TRACKS |
TRACKS |
Space request is in TRACKS |
UNCATALOG |
UNCAT |
DISP=(...,UNCATLG) |
UNIT |
UNIT(unitname) |
Unitname |
VOLUME |
VOL(volname) |
Volume name |
Limited Parameter Buffer: The DIF command interface has a limited command buffer imposed by console command processing. Typically, the parameter field available to an MVSFUNC command is limited to around 100 characters. To get around the console command buffer limitation, MVSFUNC has been designed to work with the REXX command stack.
Instead of directly issuing an MVSFUNC command, a REXX procedure can be requested instead. The REXX procedure can place the MVSFUNC command on the stack with an "*" for the command parameters. The REXX procedure can then place the control cards required for the function on the command stack.
/********************************************/
/* CREATE CARDS NEEDED FOR DFDSS RELEASE */
/********************************************/
QUEUE 'MVSFUNC DFDSS *'
QUEUE 'RELEASE INCLUDE('SDSN')'
QUEUE ' DYNAM('SVOL')'
EXITThe REXX procedures have access to symbolic field names used by rule processing via the #GET and #SET special function calls. Commands are added to the REXX stack with the QUEUE command. Messages produced with the SAY instruction will be passed back to the caller.
More complete examples can be found in the SCC ISPF library: DTS.R71.ISPFLIB. Examine the CEXPUTnn members for working examples.
Security: The MVSFUNC command runs under the security context of the caller. If executed from the MON-Explorer interface, the logon userid/password from the Explorer GUI is used for the security environment.
Also, the MVSFUNC command honors the DIF TSO parameter, except for the MON-Explorer GUI. If TSO=NO is specified on the DIF PARM statement or an INITOPT command, DIF will not perform MVSFUNC commands. However, requests originating from the Explorer GUI will be executed using the security context of the caller. For more information, examine “TSO” on page 6-20.
INITOPT TSO=YES
MVSFUNC ALLOC FI(LPALIB) DA(SYS1.LPALIB) SHR
START ACC
ENABLE OPTION ACCVSAM
START SRS
ENABLE OPTION SRSVSAM
STATUS
MVSFUNC FREE FI(LPALIB)
INITOPT TSO=NO