Copying an entire Panlib to a PDS when the Members Contain ++INCLUDEs
search cancel

Copying an entire Panlib to a PDS when the Members Contain ++INCLUDEs

book

Article ID: 27868

calendar_today

Updated On:

Products

Panvalet

Issue/Introduction

The need frequently arises  to copy all the members from a PANLIB to a PDS and the members must be expanded when they contain ++INCLUDE statements. 


                            

Environment

Release: V14.6
Component:

Resolution

Instructions: 

To successfully copy all members from a PANLIB to a PDS where the members contain ++INCLUDEs located throughout the members the following steps should be performed:

STEP 1: Allocate a PDS large enough to hold all members to be copied from the PANLIB.

STEP 2: Execute PGP (Panvalet Group Processor) to build a SYSPUNCH file that contains ++WRITE WORK, MBRNAME with an 'E' located in column 72 of each command. Specification of the 'E' in column 72 will allow the ++INCLUDE references to be expanded during later PAN#1 processing.

Sample JCL to be used:

//JOB CARD
//EXEC PGM=PAN#2
//PANDD1 DD DSN=your.panlib,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DSN=your.syspunch.file,DISP=(NEW,CATLG),UNIT=SYSDA,
//            DCB=(BLKSIZE=80,LRECL=80),SPACE=.....
//SYSIN    DD *
++CONTROL nnnn     (only if needed at your site)
++USING PGP
+-WRITE WORK,                                                         E
++PRINT 0-UP
++PRINT 1-UP
/*

Upon completion, the SYSPUNCH file will contain a ++WRITE WORK,MBRNAME with an 'E' in column 72 for every member located in the PANLIB.
SYSPRINT will contain a report that represents a directory listing of all members located in the PANLIB.


STEP 3: This requires activity outside of PANVALET to modify the SYSPUNCH file that was created. Write a program (possibly using SAS) that will add an
++OPTION OUTPUT, PDSDD
before every
++WRITE WORK,MBRNAME
CA-PANVALET DOES NOT automate this process for you.

NOTE: This step is needed because CA-Panvalet begins a new member when an ++OPTION is encountered, and will expand ++INCLUDEs due to the 'E' that is located in column 72 of each ++WRITE command. Without it you get just one PDS member.



STEP 4
: Execute PAN#1 to perform the copy of the members from the PANLIB to the PDS. CA-Panvalet will read the SYSPUNCH file as the input commands to be acted upon.

Sample JCL to be used:

//JOB CARD
//EXEC    PGM=PAN#1
//PANDD1  DD DSN=DSN=your.panlib,DISP=SHR
//SYSPRINT DD SYSOUT=*
//PDSDD    DD DSN=your.pds,DISP=OLD
//SYSIN    DD  DSN=your.syspunch.file,DISP=OLD

Additional Information

See the CA Panvalet TechDocs System Management  Group Processor (sample JCL). 
Also see the Using articles for the ++OPTION command and the ++WRITE command.