Allocating IMS spool data sets
Message processing programs can require their own printed output to be separate from any system-wide SYSOUT (spooled) output. JES2 and JES3 provide SYSOUT data set support. IMS provides for spooled output data sets, as well as a print utility (DFSUPRT0), which can be scheduled during execution of the online system.
IMS spool data sets are on direct access storage devices (DASD). When allocating IMS spool data sets, use the IEBGENER utility to ensure that they are properly initialized (empty).
When allocating IMS spool data sets, code the combination of DISP=(NEW,CATLG) and DSORG=PS on the DD statement.
//FORMAT EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DSN=IMS spool data set name,DISP=(,CATLG),
// UNIT=SYSDA,SPACE=space info
//SYSUT1 DD DUMMY
//SYSIN DD DUMMY
Allocate space for IMS spool data sets as required, but do not specify secondary allocation. You need DCB parameters DSORG=PS and RECFM=UM. If not supplied, these parameters are set automatically. You can specify block size in the DD statement, but it can be adjusted downward by the system, if larger than the system definition specification.
Records written to this data set are standard z/OS® variable-length blocked (VBM) records. The designation of the undefined record format (UM) specification reduces the buffer space requirement in the IMS control region. The minimum block size is 20 bytes, which is sufficient for one print line. The maximum block size is the track size of the device on which the data set is allocated.
Recommendation: Allocate at least two data sets.
IMS uses EXCP to maintain the end-of-file (EOF) mark on the subsequent track of the spool data sets to support online access (TSO browsing).
Restriction: EXCP does not support partitioned data sets extended (PDSEs), extended format data sets, or z/OS UNIX System Services file system data sets.
You can enable a spool SYSOUT data set to use extended address volumes (EAVs) that are available in z/OS V1.12 or later. When allocating a SYSOUT data set on an EAV volume, the data set becomes EAS eligible and can have Format 8 or 9 DSCBs. Having Format 8 or 9 DSCBs implies that the data set can have extents referencing 28-bit cylinder numbers.
To enable a spool SYSOUT data set to use EAVs, specify an EAV volume on the VOLSER parameter when allocating the data set.
Defining spool line groups
You specify, in system definition, a LINEGRP macro to be dedicated to IMS spool output. Associated with the LINEGRP macro are LINE, TERMINAL, and NAME macro specifications. The specification requirements for one such group are illustrated in the following table.
Macro | Coding | Comments |
---|---|---|
LINEGRP | DDNAME = (SPOOL1, SPOOL2) UNITYPE = SPOOL | Two IMS spool data sets |
LINE | BUFSIZE = 1200 | Buffer size in bytes |
TERMINAL | AUTOSCH | Optional, specified if automatic scheduling |
NAME | RPT10 | Use LTERM names that show nature of output |
The sample IMS procedure generated by SMP/E processing in IMS.SDFSPROC includes sample DD statements for SPOOL definitions. You must modify these DD statements to reflect the actual SPOOL definitions in your system definition. The ddnames are those given in the LINEGRP macro, and the data set names are of the form IMS.SYSnn. The order of the ddnames in the Stage 1 input stream determines the incremented value of nn. If, in the example shown in the table above, the LINEGRP macro is the first spool line group, the data set name for the ddname SPOOL2 is IMS.SYS02.
The sample DFSWT000 procedure generated by SMP/E processing in IMS.SDFSPROC is intended to be tailored to the print operation for the data sets that are implied in each line group. You must modify this procedure to reflect the actual SPOOL definitions in your system definition. If you define multiple line groups, you can copy this procedure so that each line group has a unique DFSWTnnn procedure. Referring to the same example, a member of the IMS.JOBS data set named IMSWT000 invokes DFSWT000, because it is the first individual job to print output for a spool line group.
The ddnames are those given in the LINEGRP macro, and the data set names are of the form IMS.SYSnn. The order of the ddnames in the Stage 1 input stream determines the incremented value of nn. If, in the example shown in the table above, the LINEGRP macro is the first spool line group, the data set name for the ddname SPOOL2 is IMS.SYS02.
For spool lines, the logical record length (LRECL) specification must be the maximum segment length desired +8, and the block size must be at least equal to LRECL+10. Assign a nonzero value to LRECL. Message segments are truncated at a value of LRECL+4. For example, if the buffer size you specify in the LINE macro is 132, block size can be 116, and LRECL 106. The total size of the data sets must be at least as large as the largest possible message. If the physical block size of the data set is larger than the buffer size specified in the LINE macro during IMS system definition, IMS adjusts the block size (BLKSIZE) downward to the specified BUFSIZE -10.
When all IMS spool data sets defined for a line group are full, IMS shuts down the line and sends a message (DFS998I) to the master terminal that the physical terminal is inoperative. If you specify the AUTOSCH option in the TERMINAL macro during system definition, a spool print program is scheduled as each data set is filled.
UNITYPE = DISK or SPOOL terminals support
Terminals with UNITYPE = DISK or SPOOL support large format data sets that are larger than 65535 track size and are allocated as DSNTYPE=LARGE.
Terminals with UNITYPE = DISK or SPOOL support data sets allocated in the cylinder managed area of extended address volumes (EAV).
Estimating the spooled requirements
To estimate the IMS spooled requirements for your system:
- Determine the LTERM names that the application programs use. There might be output that is unique to a particular program or an agreement among several programs to use the LTERM for their online printed output.
- Obtain estimates of the volume of output so that you can make appropriate space allocations for the DASD data sets.
- Assess the maximum output buffer size to handle the output without unnecessary buildup.
- Obtain some indication of the turnaround requirements for the output and whether the output is to be accumulated or produced in small batches. This information helps you decide how many data sets are needed to support the operation of each group of output (at least two data sets are recommended) and how to schedule the printing operation.
Allocating required IMS.SYSnn data sets
You allocate 1 to 99 DASD data sets with appropriate space specifications. One of the factors that determines the availability of the data set for printing is the size of the primary space. You can either allocate sufficient primary space with any additional output planned to spill to alternative data sets, or you can allocate secondary space for unusual amounts of output.
Allocate and catalog these data sets along with your other online system data sets. The data set names are in the form IMS.SYSnn, beginning with IMS.SYS01.
Implementing spool line groups in an XRF environment
To properly implement spool data sets in an XRF complex, note the following considerations:
- Separate spool data sets must be used for the active and alternate IMS subsystems.
- The appropriate DD statements must be added to the execution procedures for the active and alternate IMS subsystems.
- Separate JOBS data sets must be used for the active and alternate IMS subsystems.
- Separate IMSRDR procedures must be used for the active and alternate IMS subsystems (use the PRDR= execution parameter).
- The IMSRDR procedures used for the active and alternate IMS subsystems must reference the appropriate JOBS data set.
- The IMSWTnnn members of the JOBS data sets must reference the appropriate spool data sets. Depending upon the names chosen for the spool data sets, the SYS2= parameter in the DFSWTnnn procedure can be used to access the correct data sets.