Need to copy all the members in a Panvalet PANLIB with Type JCL to a PDS file
search cancel

Need to copy all the members in a Panvalet PANLIB with Type JCL to a PDS file

book

Article ID: 277236

calendar_today

Updated On:

Products

Panvalet

Issue/Introduction

How can all the Type JCL Panvalet members in a PANLIB be copied to a PDS file?

Environment

Panvalet 14.6

Resolution

To copy all the PANLIB members of a specific Type such as JCL from a PANLIB to a PDS requires a 2-step PGP process. 
 
The first step reads the PANLIB for all members with TYPE JCL and creates the necessary  ++WRITE  WORK statements. 
The second step inputs the created ++WRITE WORK statements and processes them.
 
Here is a sample job:
//PANVPGP  EXEC PGM=PAN#2   
//STEPLIB  DD DSN=panvalet.CBA3LINK,DISP=SHR          
//PANDD1   DD DISP=SHR,DSN=hlq.mlq.PANLIB
//PANDD2   DD DUMMY      
//PANDD3   DD DUMMY            
//SYSPRINT DD SYSOUT=*  
//SYSPUNCH DD DSN=&&PVPGP,UNIT=SYSDA,SPACE=(CYL,(1,1)),        
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=80),DISP=(NEW,PASS)   
//SYSIN    DD *  
++USING PGP    
+-WRITE WORK,  
++PRINT 0-UP,TYPE=JCL    
/*          
//STEP02  EXEC PGM=PAN#1,PARM='OPEN=INP'    
//STEPLIB  DD DSN=panvalet.CBA3LINK,DISP=SHR          
//SYSPRINT DD SYSOUT=*      
//PANDD1   DD DISP=SHR,DSN=hlq.mlq.PANLIB          
//PDSOUT   DD DISP=SHR,DSN=hlq.mlq.PDS                  
//SYSIN    DD *          
++OPTION OUTPUT,PDSOUT  
//         DD DSN=&&PVPGP,DISP=(OLD,DELETE)                   
/*        
//