How to copy a Spool file to a z/OS dataset?
search cancel

How to copy a Spool file to a z/OS dataset?

book

Article ID: 226945

calendar_today

Updated On:

Products

Spool

Issue/Introduction

Looking for a way to copy a file from CA Spool spool to a z/OS dataset that would contain the pure data of the file.

The ESFSPTP utility creates a header so the output is not only the file data.         

Environment

Release : 14.0

Component : CA Spool

Resolution

A JCL like below can be used to copy a file from Spool to a dataset:

//LIST    EXEC PGM=IEBGENER                               
//SYSPRINT DD SYSOUT=*                                    
//SYSUT1   DD SUBSYS=(ESF,Fnnnn,file-name,destination)  
//SYSUT2   DD DISP=(,CATLG,DELETE),SPACE=(TRK,(1,1),RLSE),
//         DSN=PREFIX.TEST.Fnnnn,                        
//         UNIT=SYSDA                                     
//SYSIN    DD DUMMY      

Where:
ESF is the CA Spool subsystem
nnnn is the file number
file-name is the file name as it appears in the CA Spool spool