How to create a file in CA Spool with a customized file name and OUTPUT values?
search cancel

How to create a file in CA Spool with a customized file name and OUTPUT values?

book

Article ID: 37959

calendar_today

Updated On:

Products

Spool

Issue/Introduction

Question:

How to create a file in CA Spool with a customized file name and OUTPUT values?

Introduction:

When running the z/OS IEBGENER utility, the OUTPUT specifications are passed to CA Spool, but we cannot change the name of the file:

//MYJOB    JOB (12345),CLASS=A,MSGCLASS=X
//STEP1     EXEC PGM=IEBGENER                                      
//OUTPUT   OUTPUT COPIES=1,DEST=FOLLOWME,                         
//         USERLIB=(USER2.FONT300,                           
//         USER2.FDEFLIB,USER2.PDEFLIB)                
//SYSUT1   DD DSN=REPORT.FILE,DISP=SHR 
//SYSUT2    DD SYSOUT=(C,,STD),OUTPUT=*.OUTPUT                     
//SYSPRINT DD SYSOUT=*                                            
//SYSIN      DD DUMMY        

With the CA Spool ESFPRINT utility, we can specify an OWNER which allows for setting the file name as needed, but the OUTPUT statement is then ignored:

//MYJOB    JOB (12345),CLASS=A,MSGCLASS=X                                           
//STEP1 EXEC PGM=ESFPRINT,                                          
// PARM='DDNAME(SYSUT1) DEST(FOLLOWME) PRMODE(PAGE) OWN(MYFILE)'    
//STEPLIB  DD DISP=SHR,DSN=CAI.CBQ4LOAD
//OUTPUT   OUTPUT DEFAULT=YES,COPIES=1,DEST=FOLLOWME,                         
//         USERLIB=(USER2.FONT300,                           
//         USER2.FDEFLIB,USER2.PDEFLIB)                
//SYSUT1    DD DSN=REPORT.FILE,DISP=SHR 

Answer:

The following sample z/OS JCL that uses the IEBGENER utility shows the use of the SUBSYS interface to achieve your goal: 

//MYJOB     JOB (12345),CLASS=A,MSGCLASS=X                                           
//STEP1      EXEC PGM=IEBGENER                                      
//OUTPUT   OUTPUT COPIES=1,DEST=FOLLOWME,                         
//         USERLIB=(USER2.FONT300,                           
//         USER2.FDEFLIB,USER2.PDEFLIB)                
//SYSUT1    DD DSN=REPORT.FILE,DISP=SHR 
//SYSUT2    DD SUBSYS=(ESFX,C,MYFILE),OUTPUT=*.OUTPUT
//SYSPRINT DD SYSOUT=* 
//SYSIN DD DUMMY 
 
The SUBSYS= JCL statement refers to the SUBID for CA Spool (ESFX in the sample) and the MYFILE keyword will be used for the file name. 

When using this sample file MYFILE will be created in CA Spool with the attributes as defined with the OUTPUT statement.

Additional Information:

Refer to the CA Spool System Guide , Chapter 8: SUBSYS Interface, item DD Statement SUBSYS Parameter for a list of the sub-parameters that can be specified while creating a CA Spool file.

 

Environment

Release: CMASLI00200-11.7-Spool-Print Management-Interface for HP Laser
Component: