Release : 14.6
You can insert the member name prior to the member data when written to a sequential file or add the delimiter /& at the end of the member. Or you can use both.
1. Run a PGP job with a '+-WRITE WORK' model command. This will create a SYSPUNCH file containing the initial control statements for each member in the file.
See example.
//STEP1 EXEC PGM=PAN#2,PARM='OPEN=INP'
//PANDD1 DD DSN=your.panlib,DISP=SHR
//PANDD2 DD DUMMY
//PANDD3 DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DSN=your.temp.workfile,DISP=(,CATLG),
// DCB=(BLKSIZE=80,LRECL=80),UNIT=SYSDA,SPACE=(TRK,(80,5))
//SYSIN DD *
++USING PGP
+-WRITE WORK,??????????
++PRINT 0-UP
//
2. Manually or using a clist, programmatically insert a '++INSERT mbrname' prior to each
++WRITE WORK statement in the SYSPUNCH file.
Each ++INSERT statement must reflect the respective member name on the following line.
See example
++INSERT WORK,COBTEST
++WRITE WORK,COBTEST,/&
++INSERT WORK,COBTEST1
++WRITE WORK,COBTEST1,/&
3) Once the SYSPUNCH file has been altered to include ++INSERT WORK and ++WRITE
WORK statements for each member, you can then execute the final step to copy
all listed members to a pre-allocated sequential file with a member name
marker in between each set of data. See example:
//STEP2 EXEC PGM=PAN#2,PARM='OPEN=INP'
//PANDD1 DD DSN=your.panlib,DISP=SHR
//PANDD2 DD DSN=your.output.seqfile,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DISP=(OLD,KEEP),DSN=your.temp.workfile
//