SMF WORK, SASWORK MULTWORK, and NOMULT Statements
This article describes the WORK, SASWORK MULTWORK, and NOMULT statements, and includes information on the format and specification of the statements, plus tips and hints.
WORK
This statement is optional.
The Work statement enables sites that experience either SAS WORK space allocation problems or out of work space conditions during DAYnnn or INCRnnn (where nnn is the job step number), daily or incremental update processing, to allocate multiple WORK files.
You can allocate multiple WORK files for use during the daily and incremental update job step. The maximum number of WORK files you can allocate varies by product. These additional work files are used along the single work data set allocated by default using the JCLDEF parameters WORKUNIT and WORKSPACE.
Because the individual space allocation requirement for each WORK file is typically much smaller, it is more likely to be satisfied.
To take advantage of multiple WORK files support, edit
prefix.MICS.PARMS(cccOPS)
and insert a WORK statement as shown below:WORK n data_set_allocation_parameters
n
the number of WORK data sets
Default:
One (0)
Maximum:
Nine (9).data_set_allocation_parameters
one or more data set allocation parameters
Example:
STORCLAS or SPACE separated by spaces.You can also specify the WORK parameter as the following:
WORK n XXX pppp ssss
n
the number of WORK data sets
XXX
TRK or CYL
pppp
the primary allocation
ssss
the secondary allocation
Note:
When allocating any number of SAS WORK data sets, be aware that one additional SAS WORK data set is automatically allocated to facilitate sorting. For example, if you allocate six SAS WORK data sets, you will actually get seven.If you omit the data_set_allocation_parameters or the WORK parameter, the work data sets are allocated according to the values you specified for the WORKUNIT and WORKSPACE parameters in prefix.MICS.PARMS(JCLDEF). Use the data_set_allocation_parameters to override this default, either to alter the space allocation or to use System Managed Storage (SMS) parameters to control data set placement and characteristics.
If you allocate insufficient space for the WORK data sets, DAYnnn and/or INCRnnn processing will fail and can only be restarted from the beginning.
If internal step restart is active, you can override the WORK data set allocation parameters at execution-time using the //PARMOVRD facility. For more information about execution-time override of dynamic data set allocation parameters, see the Dynamic Allocation Parameter Overrides (//PARMOVRD).
Specify data set allocation parameters, separated by blanks, according to SAS LIBNAME statement syntax. If you need multiple lines, repeat the WORK keyword on the continuation line.
WORK accepts the engine/host options documented in the SAS Companion for the z/OS environment, including STORCLAS, UNIT, SPACE, BLKSIZE, DATACLAS, MGMTCLAS, and VOLSER.
Important! Do not specify the DISP parameter.
Example 1:
WORK n STORCLAS=MICSTEMP SPACE=(XXX,(pppp,ssss),RLSE)
n
the number of WORK data sets
STORCLAS
specifies a storage class for a new data set
Limits:
8 charactersSPACE
specifies how much disk space to provide for a new data set being allocated
XXX
TRK or CYL
pppp
the primary allocation
ssss
the secondary allocation
RLSE
specifies that free-space should be released when the data set is closed
Example 2:
WORK n XXX pppp ssss
n
the number of WORK data sets
XXX
TRK or CYL
pppp
the primary allocation
ssss
the secondary allocation
Example 3 (multiple lines):
WORK n STORCLAS=MICSTEMP UNIT=SYSDA WORK SPACE=(xxxx,(pppp,ssss),,,ROUND))
n
the number of WORK data sets
STORCLAS
specifies a storage class for a new data set
Limits:
8 charactersUNIT
specifies the generic unit for a new data set
Limits:
8 charactersSPACE
specifies how much disk space to provide for a new data set being allocated
XXX
TRK or CYL
pppp
the primary allocation
ssss
the secondary allocation
Note:
Since there is some performance impact when using multiple WORK files, you should specify the minimum number of WORK data sets to meet your work space requirements. As a start, try incrementing the number gradually beginning from the default.WORK Considerations
How Much Space Should You Allocate?
- First Time Implementation of Multiple Work Files
- If this is the first time you are implementing multiple work files for this product in this unit, reviewprefix.MICS.PARMS(JCLDEF)and find the WORKSPACE parameter. It will resemble the following sample statement:
- WORKSPACE TRK 500 250
- The value shows the current SAS WORK space allocation for the unit as a single data set. It also serves as the default value used in the unit's DAYnnn daily update (and/or INCRnnn incremental update) step unless you provide a WORK parameter.
- To achieve the equivalent work space allocation of WORKSPACE TRK 500 250 using multiple WORK data sets that will collectively share the work space requirements of the daily and/or incremental update step, code one of the following:
- WORK 2 SPACE=(TRK,(250,125)) WORK 5 SPACE=(TRK,(100,50))
- To determine the total work space, multiply the number of WORK files (n) by the primary (pppp) and secondary (ssss) values specified.
- Note:To simplify the example, only the SPACE parameter is shown above. You can follow either with data set allocation parameters like UNIT or STORCLAS as required for your site.
- Adjusting Allocation for Existing Multiple WORK Files
- If you have previously implemented multiple WORK file support for this product in this unit, and you want to change either the number of WORK files or the space allocations, examineprefix.MICS.PARMS(cccOPS)and find the existing WORK statement.
- If the existing WORK statement only specifies the number of WORK files but does not contain the following space allocation informationWORK 5then each of the multiple WORK files is allocated using the values from the WORKSPACE parameter ofprefix.MICS.PARMS(JCLDEF), as described earlier under First Time Implementation of Multiple Work Files.To increase workspace, you can increase the number of WORK files (for example, change WORK 5 to WORK 6,7,8, or 9), or increase the space allocation in the WORKSPACE parameter. Alternativelly, you can do both.To decrease workspace, you can decrease the number of WORK files (for example, change WORK 5 to WORK 4,3,2, or 1), or decrease the space allocation in the WORKSPACE parameter. Alternativelly, you can do both.You can also specify the multiple WORK file space allocation by adding the space allocation values directly to the WORK statement. This removes the link to theprefix.MICS.PARMS(JCLDEF)WORKSPACE parameter for multiple WORK file space allocation. This method is recommended as it serves to clearly document, in one place, how multiple WORK files are allocated.
- If the existing WORK statement does include space allocation as shown in the following examplesWORK 5 TRK 200 100orWORK 5 SPACE=(TRK,(200,100)) STORCLAS=MICSTEMPsimply change the values to meet your needs.If you need more workspace, you can increase the number of WORK files (for example, change WORK 5 to WORK 6,7,8, or 9), increase the space allocation (for example, change TRK 200 100 to TRK 250 120), or do both.To decrease work space, you can decrease the number of WORK files (for example, change WORK 5 to WORK 4,3,2, or 1), decrease the space allocation (for example, change TRK 200 100 to TRK 150 80), or do both.
If internal step restart is NOT active (RESTART NO) and you change the WORK parameter, you must:
Run cccPGEN
- Run JCLGENU for DAILY (to regenerate DAILY) and, if incremental update is enabled, INCRccc
When internal step restart is active, (RESTART YES) and you change WORK and run cccPGEN, then changes take effect immediately. There is no need to run JCLGENU.
SASWORK
This statement is optional.
The WORK DD statement in the
MICS
procedures allocates a temporary data set where SAS keeps its temporary data files and other items that SAS uses during processing of the current job.By default, the allocated space is defined in the member
prefix.MICS.PARMS(JCLDEF)
with the WORKSPACE and WORKUNIT parameters, then generated into all the JCL procedures for a given unit.With the SASWORK statement you can override this unit-wide definition to specify the space allocation individually for the current step.
The format of the SASWORK statement is:
SASWORK data_set_allocation_parameters
data_set_allocation_parameters
one or more data set allocation parameters
Example:
STORCLAS or SPACE (separated by spaces)You can also specify the SASWORK parameter as the following:
SASWORK XXX pppp ssss
XXX
TRK or CYL
pppp
the primary allocation
ssss
the secondary allocation
If you omit the data_set_allocation_parameters or the SASWORK statement, the WORK data set is allocated according to the values that you specified for the WORKUNIT and WORKSPACE parameters in
prefix.MICS.PARMS(JCLDEF)
. Use the data_set_allocation_parameters to override this default, either to alter the space allocation or to use System Managed Storage (SMS) parameters to control data set placement and characteristics.Specify data set allocation parameters, separated by blanks, according to SAS LIBNAME statement syntax. If you need multiple lines, repeat the SASWORK keyword on the continuation line.
Example:
SASWORK STORCLAS=MICSTEMP SPACE=(XXX,(pppp,ssss))
STORCLAS
Specifies a storage class for a new data set.
Limits:
8 charactersSPACE
Specifies how much disk space to provide for a new data set being allocated.
XXX
TRK or CYL.
pppp
the primary allocation
ssss
the secondary allocation
If you change the SASWORK parameter, you must:
- Run cccPGEN
- Run JCLGENU for DAILY (to regenerate DAILY) and, if incremental update is enabled, INCRccc
MULTWORK and NOMULT
Multiple work files usage impacts performance. This product provides these optional parameters so you can restrict multiple work files usage to only those files having excessive space requirements.
Note:
You can only use one of these optional parameters with the WORK statement, NOT both.MULTWORK parameter
Restricts the use of multiple WORK files to ONLY those listed after the MULTWORK keyword.
MULTWORK fff fff ... fff
fff
the unique three character identifier
If you need multiple lines, repeat the MULTWORK on the continuation line.
NOMULT parameter
Forces the use of multiple WORK files for all files EXCEPT specified after the NOMULT keyword.
NOMULT fff fff ... fff
fff
the unique three character identifier
If you need multiple lines, repeat the NOMULT on the continuation line.
If no MULTWORK or NOMULT parameters are specified, the following files create multiple work files by default:
AVL CON CO2 MUA MUG MUX OEX OPI OP2 PUR SFT STF PGM STP STQ STR WDA WDB WDC WR1 XCP XCQ XCS ST4 STX ST6 _JS JOB _TS _ST SPL _OE OEP ATP SF6 _TP _SA REX REN MUB
And the following files do not create multiple work files by default but are still eligible for multiple work support:
INI IN2 JBB JBC S25 T25 STC TP4 PU2 WRT
The implementation of internal restart support in this component requires the creation of a number of temporary files not defined in sharedprefix.MICS.GENLIB(SMFGENIN). Of these files, the following are eligible for multiple work support:
BAT Batch Activity Information Area
- _JS - Temporary Batch User Suspend File
- _OE - Temporary Open Edition/MVS Program File
- _SA - Temporary System Address Space Activity File
- _ST - Temporary System Task Program Activity File
- _TP - Temporary APPC/MVS/TP Activity File
- ATP - Temporary APPC/MVS Transaction File
- JOB - Temporary Batch User Job Activity FIle
- MUA - Temporary Measured Usage Address Space #1 File
- MUB - Temporary Measured Usage Address Space #2 File
- MUG - Temporary Measured Usage Global File
- MUX - Temporary Measured Usage Segment File
- OEP - Temporary Open Edition Process Activity File
- OEX - Temporary Open Edition Process Segment File
- PGM - Temporary Batch User Program Activity File
- PUR - Temporary Purge Record File
- REN - Temporary Multisystem Enclave Activity File
- REX - Temporary Multisystem Enclave Segment File
- SFT - Temporary APPC/MVS Transaction Interim File
- SF6 - Temporary System Address Space Suspend File
- STF - Temporary Step/Interval Record File
- STP - Temporary Step/Interval Record File
- STQ - Temporary Step/Interval Record File
- STR - Temporary Step/Interval Record File
- ST4 - Temporary Step (Subtype 4) Record File
- ST6 - Temporary Step (Subtype 6) Record File
- WDA - Temporary Workload Device Activity File
- WDB - Temporary Workload Device Activity File
- WDC - Temporary Workload Device Activity File
- WR1 - Temporary Output Writer Record File
- XCP - Temporary EXCP Section File
- XCQ - Temporary EXCP Section File
- XCS - Temporary EXCP Section File
OPS Operations Information Area
- AVL - Temporary Operations Availability File
- CON - Temporary Operations Configuration File
- CO2 - Temporary Operations Configuration File
- OPI - Temporary Operations Incident File
- OP2 - Temporary Operations Incident File
The following temporary files are not eligible for multiple work support:
BAT Batch Activity Information Area
- INI - Temporary Initiation Record File
- IN2 - Temporary Initiation Record File
- JBB - Temporary Job End Record File
- JBC - Temporary Job End Record File
- PU2 - Temporary Purge Record File
- STC - Temporary Step/Interval Continuation Record File
- S25 - Temporary MDS Mount (JES3) Record File
- TP4 - Temporary Step (Subtype 4) Record File
- T25 - Temporary MDS Mount (JES3) Record File
- WRT - Temporary Output Writer Record File
Change the Number of Work Files
You can change the number of work files used in the
MICS MQSeries Analyzer
processing in Step DAY051, follow the checklist provided below for each unit.Follow these steps:
- Update the WORK statement in prefix.MICS.PARMS(cccOPS), where (ccc) is the component identifier, to specify the number of work data sets required.Example:WORK n STORCLAS=MICSTEMP SPACE=(XXX,(pppp,ssss))
- n
- the number of WORK data sets
- STORCLAS
- Specifies a storage class for a new data set.
- Limits:8 characters
- SPACE
- Specifies how much disk space to provide for a new data set being allocated.
- XXX
- TRK or CYL
- pppp
- the primary allocation
- ssss
- the secondary allocation
- If this is the first time that you implement multiple work files for this product, then continue with Step 2.If you are just changing the number currently in use, or simply the space definitions, then proceed to Step 3 of this checklist.Browse sharedprefix.MICS.PROTOLIB(DYcccnnn) and sharedprefix.MICS.PROTOLIB(cccINCR) where
- (nnn)
- the job step number
- (ccc)
- the product ID for this product
- If you find a WORK symbolic, divide the primary and secondary allocation values from the WORK symbolic by the number of work files that is specified in Step 1 (value of n on the WORK statement coded in Step 1).Coding the resulting values yields the same aggregate space allocation as you use with a single WORK file. To double your available WORK space, carry out the division, double the results and use the values in the WORK definition above.
- If you do not find a WORK symbolic in PROTOLIB, examine prefix.MICS.PARMS(JCLDEF) for eachMICSunit that contains this product. Find the WORKSPACE keyword. The space allocation that is specified is used for a single SAS WORK file. Perform the same division as described in the previous paragraph to determine the quantity that will yield equivalent total allocation with multiple WORK files. Then adjust the values upward to meet your needs.
- Submit the job in prefix.MICS.CNTL(cccPGEN).
- If you specified RESTART YES in the product's cccOPS, you are done.Otherwise, continue with Steps 5, 6, and 7.
- Edit prefix.MICS.PARMS(JCLGENU) so that it contains a single line that reads:DAILYor, if incremental update is enabled for this product in this unit database, specify:DAILY INCRccc
- ccc
- the product ID
- Submit the job in prefix.MICS.CNTL(JCLGENU). Ensure that there are no error messages in MICSLOG or SYSTSPRT, that the MICSLOG contains the normal termination message, BAS10999I, and that the job completes with a condition code of zero.
- The following operational job(s) have changed:DAILYINCRccc (if incremental update is enabled)
If your site has implemented the operational
MICS
processes in a scheduling product, refresh the JCL in that product. Consult the scheduling product's administrator for the exact processes that are involved in updating that product's representation of the MICS
jobs.