Phase 6: Implement CDAM Direct Write
This phase details the CDAM requirements from an implementation point of view. For further detailed information about the Compressed Dataset Access Method and its parameters, see the CDAM chapter in the Control-D and Control-V User Guide.
Some of the questions we will be answering in this phase are:
-
What is CDAM?
-
How does CDAM work?
-
What options do I have to create report output?
-
How do I implement the CDAM Direct Write option?
Inputs
Before you start this phase you should have tested your report decollating missions (Phase 3).
Outputs
At the end of this phase you will have:
-
Created JCL Procedures that use the CDAM Direct Write facility.
-
Updated the relevant report decollating mission definitions for CDAM Direct Write.
Compressed Dataset Access Method (CDAM) Overview
There are two sources from which Control-D can decollate report output: The spool (known as Post-Spool processing) and CDAM datasets (known as Pre-Spool processing). The workflow for both methods is summarized below. In this phase, we will detail the actions required to achieve the second workflow (that is, creating reports directly to CDAM datasets from batch jobs, using the Pre-Spool method).
Create Reports to the Spool (Post-Spool)
This is the standard method of creating report output. Using this method, your batch jobs create output directly to the spool volume. Using report decollating missions, Control-D can retrieve output from any class whether it be Held or Non-Held. Control-D then processes the report as specified in the report decollating mission parameters, deletes the original output from the spool (if in Non-Held class), creates a compressed dataset for the report output, and creates user and $SYSDATA entries in the Active User Report List file so that the report can be accessed, printed, archived, and so on.
Figure 34 Creating Report to the Spool Workflow (Post-Spool)
Create Reports Directly to CDAM Files (Pre-Spool)
Using this method, you create report output directly to compressed datasets from batch jobs. Parameters in the JCL of the job invoke the CDAM Subsystem, which creates a compressed dataset for the report output. A report decollating mission can be automatically scheduled to process the created CDAM file. The CDAM file is then decollated as specified in the report decollating mission parameters and creates user and $SYSDATA entries in the Active User Report List file so that the report can be accessed.
Figure 35 Creating Reports Directly to CDAM Files Workflow (Pre-Spool)
Benefits of CDAM Direct Write
All Control-D features (for example, online viewing, printing, archiving) are available using either of the two CDAM creation methods. The benefits of writing directly to CDAM datasets rather than to the spool, are summarized below:
-
Redundant read and/or write operations are eliminated (that is, using the Post Spool method, output is written to the spool, then written to a CDAM dataset). This duplication is eliminated using the Pre-Spool method.
-
The elapse time of jobs creating large report outputs is reduced by 10% or more. This benefit is achieved because of an increase in performance when writing to CDAM datasets rather than to the system spool.
-
The reports are written in compressed format, saving between 30% to 70% of required space.
-
CDAM datasets are protected using the installation security package, avoiding potential security infringements that can occur on the spool.
-
The spool is no longer used as a report repository and can be reduced in size, releasing valuable disk space.
-
The danger of the spool reaching 100% utilization is greatly reduced.
CDAM Installation Options
Several parameters are defined during the installation process that affect the operation of Compressed Dataset Access Method (CDAM).
The parameters are defined in the CTDPARM member of the IOA PARM library.
CTDPARM Installation Parameters Member
BROWSE -- IOAP.PROD.PARM(CTDPARM) - 01.03 ------ LINE 00000010 COL
COMMAND ===> SCROLL ==
CTDPARC *
AMBLK#=100, CDAM - NUMBER OF BLOCKS *
AMBLKSZ=23476, CDAM - BLOCK SIZE (3380 DISKS) *
AMFSIZE=1000, # OF RECORDS - ACTIVE MISSION FILE *
AMNAME=CDAM, CDAM - NAME *
AMPREF=CTDP.U3, CDAM - COMPRESSED DSN DEFAULT PREFIX *
AMPREFD=CTDP.R3, CDAM - MONITOR COMPRESSED DSN PREFIX *
JB1PREF=CTDP.J3, CDAM - DEF PREFIX OF JOBSDSN1 FILES *
AMUNIT=SYSALLDA, CDAM - UNIT *
AMVOL=, CDAM - VOLUMES (READ THE GUIDE) *
BKPUTIL=FDRCAT, BACKUP/RESTORE UTILITY *
CDQNAME=D3ETROLD, QNAME FOR ENQ REQUESTS TO DATABASE *
These parameters control the following CDAM functions:
-
The default initial size of allocation request for a CDAM dataset.
-
The name of the CDAM Subsystem.
-
The default prefix of CDAM datasets created from the spool output (Post-Spool method).
-
The default prefix of CDAM datasets created directly from batch jobs (Pre-Spool method).
-
The default prefix of CDAM datasets created using parameter ALLOCOPT.
-
The volumes and/or units to use for CDAM dataset allocation.
The CDAM Subsystem
The CDAM subsystem is the component of Control-D that actually performs the creation of compressed datasets. The CDAM subsystem is used by the Control-D monitor and by your batch jobs to read and write the compressed reports. CDAM should always be active after installing Control-D.
Multi-CPU Support
The CDAM subsystem must be active on every CPU from which you want to create compressed datasets. The CDAM subsystem should remain active 24 hours a day. It should be activated as part of the IPL procedures (for details, see the Control-D and Control-V chapter in the INCONTROL for z/OS Administrator Guide). If you want to create CDAM datasets or perform online viewing in a multi-CPU environment, you must ensure that the CDAM subsystem is active on all CPUs involved.
Figure 36 CDAM Subsystem
Control the CDAM Subsystem
If you need to activate the CDAM subsystem manually, you can use the following operator command:
S IOASINIT,OPTIONS=D
This command executes a start routine for the CDAM subsystem. The name of the subsystem is defined in parameter AMNAME of member CTDPARM.
Though normally it should not be necessary, if you need to deactivate the CDAM subsystem, you can issue the following operator command:
S IOASTERM,OPTIONS=D
The CDAM subsystem should and can be active from this phase on. It is also important that you test the allocation of CDAM datasets before you reach the production implementation phase. We suggest that you set up test jobs for this purpose.
You should now ensure that the CDAM subsystem is installed and functioning correctly on all required CPUs.
Set Up CDAM Direct Write
In this section, we will detail the requirements for implementing the CDAM Direct Write facility. To use this facility you must make some minor changes to the JCL of the batch jobs that create report output. To gain the benefits of CDAM Direct Write, you need to change the philosophy behind the way you create report output. Rather than writing reports to the spool, you will now be bypassing the spool and creating the report output directly to a compressed dataset (Pre-Spool method).
JCL Requirements
To achieve this we must change the JCL from the old philosophy of writing to the spool to the new philosophy of writing to compressed datasets. The Compressed Dataset Access Method controls the allocation of the CDAM datasets automatically, using the defined installation parameters. The first example shows how reports are written to the spool and the second example highlights the requirements to create output to a compressed dataset.
JCL and Allocation Messages for Spool Output
In this example, we will create two reports to spool into two different classes.
JCL Write to the Spool Example
//M90SPOOL JOB ,CARD//*
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=IOAP.PROD.SAMPREPS(REPORT1)
//SYSUT2 DD SYSOUT=P
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//*
//STEP2 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=IOAP.PROD.SAMPREPS(REPORT2)
//SYSUT2 DD SYSOUT=D
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
The allocation messages from the job show us the JES datasets created to the spool.
JES Allocation Messages
IEF236I ALLOC. FOR M90SPOOL STEP1IEF237I 192 ALLOCATED TO SYSUT1
IEF237I JES2 ALLOCATED TO SYSUT2
IEF237I DMY ALLOCATED TO SYSIN
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF142I M90SPOOL STEP1 - STEP WAS EXECUTED - COND CODE 0000
IEF285I IOAP.PROD.SAMPREPS KEPT
IEF285I VOL SER NOS= MVS002.
IEF285I JES2.JOB04208.SO000101 SYSOUT
IEF285I JES2.JOB04208.SO000102 SYSOUT
IEF373I STEP /STEP1 / START 00125.1115
IEF374I STEP /STEP1 / STOP 00125.1115 CPU 0MIN 00.16SEC SRB
JCL and Allocation Messages for CDAM Output
To create reports directly to CDAM datasets the following JCL is required:
Direct Write to CDAM Method Sample JCL
//M90CDAM JOB ,CARD//*
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=IOAP.PROD.SAMPREPS(REPORT1)
//SYSUT2 DD SUBSYS=(CDAM,'SYSOUT=P')
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//*
//STEP2 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=IOAP.PROD.SAMPREPS(REPORT2)
//SYSUT2 DD SUBSYS=(CDAM,'SYSOUT=D')
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
The allocation messages issued show the name of the CDAM file created and the volume on which it was created.
Direct Write to CDAM Allocation Messages
IEF236I ALLOC. FOR M90CDAM STEP1IEF237I 192 ALLOCATED TO SYSUT1
IEF237I CDAM ALLOCATED TO SYSUT2
IEF237I DMY ALLOCATED TO SYSIN
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I 254 ALLOCATED TO SYS00002
IEF237I 246 ALLOCATED TO SYS00001
IEF142I M90CDAM STEP1 - STEP WAS EXECUTED - COND CODE 0000
IEF285I IOAP.PROD.SAMPREPS KEPT
IEF285I VOL SER NOS= MVS002.
IEF285I SYS00125.T112043.RA000.M90CDAM.R0000001 SUBSYSTEM
IEF285I JES2.JOB04216.SO000101 SYSOUT
IEF285I CTDPDBV.PROD.UCAT KEPT
IEF285I VOL SER NOS= INST01.
IEF285I CTDP.U3.M90CDAM.J04216.D1251120.S01.N000100 CATALOGED
IEF285I VOL SER NOS= WORK02.
IEF373I STEP /STEP1 / START 00125.1120
IEF374I STEP /STEP1 / STOP 00125.1120 CPU 0MIN 00.44SEC SRB
CDAM Parameters
There are two ways to create CDAM files:
-
During execution of a decollation mission.
-
Directly from the job, using the SUBSYS command.
When CDAM files are being created, default values defined in member CTDPARM are used unless they are overridden. The way in which they can be overridden depends on the way in which the CDAM file is being created:
-
When the CDAM file is being created by a decollation mission, the default values can be overridden by parameters specified in PRINT/CDAM lines in the mission.
-
When the CDAM file is being created by a SUBSYS command, default values can be overridden by parameters specified in the SUBSYS statement.
There are two types of parameters that are associated with the CDAM subsystem and files:
-
Sysout Control Parameters
-
CDAM Control Parameters
These are described immediately below.
Sysout Control Parameters
Sysout control parameters can be used to assign sysout attribute information to the compressed reports. These can then be used when the report is printed by Control-D. Examples of such parameters are CHARS, FCB, and SYSOUT.
Below are examples of sysout control parameter overrides in a SUBSYS statement, and in the PRINT/CDAM line of a decollation mission.
Example - Sysout Control Parameters in a SUBSYS Statement
//DDNAME DD SUBSYS=(CDAM,'SYSOUT=T,CHARS=SP10')
Example - Sysout Control Parameters in a Decollation Mission (In the PRINT/CDAM Line)
You can also use parameter PRINT/CDAM of the report decollating mission definition to specify or override the attributes for the reports to be printed. For example:
ON DSN = PGMSTEP=STEP1,DDNAME=SYSUT2
PRT COPIES LVL USER DEST MAX COPIES
PRINT/CDAM PARMS = SYSOUT=P,CHARS=SP12
PRINT/CDAM PARMS =
WHEN LINE - COL - PRINT REF NXT CT AND/OR
STRING =
DO USER = * LVL LINE 006 COL 016 - 019 S A T
SYNONYM = CONCAT =
DO NAME = BILLING REPORT LINE COL -
DO PRINT = LASINV5 MUST =
DO
CDAM Control Parameters
CDAM control parameters are used to control the functions performed by the CDAM subsystem. There are two types of control parameters:
-
Allocation parameters
-
Retrieval parameters
Allocation Parameters
When Control-D allocates a CDAM dataset, it uses dataset allocation control parameters (such as PREFIX, BLOCK, UNIT, EAVUSE).
Below is an example of allocation parameter override in a SUBSYS statement.
Example - Allocation Parameters in a SUBSYS Statement
//DDNAME DD SUBSYS=(CDAM,'PREFIX=GL10,UNIT=PROD')
In the above example, the CDAM dataset is created with a prefix of GL10, which overrides the default prefix specified in member CTDPARM. The CDAM dataset will be allocated on the PROD units, again overriding the default value specified.
Retrieval Parameters
Retrieval control parameters are used to specify retrieval information for CDAM datasets, that is, which CDAM you want to decollate. The parameters enable you to retrieve exactly the CDAM file or files you want to decollate.
Retrieval parameter overrides can be specified in the decollating mission parameters using the DSN and ON DSN fields. The types of parameters you can specify include JOBNAME, DDNAME, PGMSTEP. An example is shown below.
Example - Retrieval Parameters in a Decollating Mission (in an ON DSN Statement)
WHEN IN QUEUE N CLS TIME FROM UNTIL INTERVAL PRIORITY
DSN LAST=YES
===========================================================================
OUT
SHOUT WHEN TO URG
MSG
===========================================================================
DEF COPIES 01 LVL 95 USER UNIDENT DEST MAX COPIES
===========================================================================
ON DSN = PGMSTEP=STEP1,DDNAME=SYSUT2
PRT COPIES LVL USER DEST MAX COPIES
PRINT/CDAM PARMS =
WHEN LINE - COL - PRINT REF NXT CT AND/OR
STRING =
DO
You should now update all relevant report decollating mission definitions with the appropriate CDAM retrieval parameters.
CDAM Dataset Naming Conventions
You must code parameter SUBSYS onto every JCL DD statement that produces report output that you want to handle. The subsystem automatically allocates and creates the CDAM dataset. The dataset name generated for each CDAM file is described in the CDAM chapter of the Control-D and Control-V User Guide. You can set the default prefix of the CDAM dataset name in member CTDPARM in the IOA PARM library, or override it using the PREFIX allocation parameter, when using the Pre-Spool method.
Scheduling Based on CDAM Dataset Creation
You can combine the creation of a CDAM dataset with the scheduling of a report decollating mission definition to the Active Missions file to process the output created in the CDAM dataset. You do this by using the sample Control-D Exit CTDX018.
The exit is invoked by the CDAM subsystem during output processing whenever the CDAM control parameter EXIT is set to YES in the DD statement SUBSYS parameters. For example:
//DDNAME DD SUBSYS=(CDAM,'EXIT=YES')
There is a sample exit (CTDX018O) in the IOA SAMPEXIT library that details how this is achieved.
Some examples of when this option can be used are
-
for ad hoc jobs
-
for user controlled jobs
-
if a site does not want to define scheduling information for report decollating missions
Recommendations
The CDAM Direct Write facility will give maximum benefits to jobs that create large volume reports. The benefits are scaled according to the size of the output. For example, if you implement the top 20% of jobs creating large outputs, you will receive about 80% of the benefits of the CDAM Direct Write facility.
For the initial pilot implementation we suggest that you follow this recommendation by targeting the jobs that produce large volumes of output and modify these jobs to write directly to compressed datasets, or implement all reports using this method.
Prepare JCL for Production
We recommend that you make the required JCL changes to your batch jobs during this phase. We suggest that you create test versions of your JCL procedures that contain the required parameters to write to CDAM. One of the actions you will take when Control-D goes "live" will be to copy the test procedures into production for the first night's run using Control-D.
You should now set up the required test JCL procedures for jobs using the CDAM direct write facility.
Review
During this phase you have learned how the Compressed Dataset Access Method allocates datasets directly from batch jobs, reviewed the CDAM installation parameters, reviewed the CDAM sysout and control parameters, and identified how to set up and test the CDAM Direct Write facility.
Before you continue, you should have:
-
Prepared JCL procedures to be used for the production implementation of Control-D.
-
Updated the relevant report decollating mission definitions to decollate reports directly from CDAM datasets.