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

Document ID : KB000027868
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary:

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. 


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.

Additional documentation can be reviewed in the MVS System Management Manual Panvalet Group Processor pages 3-21 through 3-29A (sample JCL) and the User Manual pages 4-26 through 4-29 for the ++OPTION command and pages 4-47 through 4-49 for the ++WRITE command.

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