There is a sample in the Librarian documentation on how to copy all members into a PDS, see Copying selected Members.
However, there are no samples provided for copying all members into a sequential file.
How to copy Librarian members into a sequential file and separate them from each other ?
Component: Librarian
For z/OS change the OSJOB output DDname to a sequential file.
For z/VSE change the JOBSTR DLBL to a sequential file.
To place separator lines between the members, use -INS FIRST or -INS LAST statements or both.
Note:
Librarian stores the members in a compress format. The extracted Librarian members will be uncompressed and require more DASD space.
The samples below copies all members of a Librarian Master file into a sequential file and inserts at the beginning of each member 'header for member MEMBERNAME' and at the end of each member 'trailer for member'.
The EXEC option on the -SEL control card writes a copy of each module for which it is specified to the file.
The TEMP option prevents the Master file member from being updated permanently.
The VAR option makes Librarian's Audit Trail Variables available to this step, in this case the ¢MODNAME variable. The cent symbol is represented by a X'4A'.
//*jobcard JOB //* //*-------------------------------------------------------------------* //*--- STEP1: create OSJOB file with control cards ---* //*-------------------------------------------------------------------* //STEP1 EXEC PGM=AFOLIBR,PARM='NRJS,NJTA' //SYSPRINT DD SYSOUT=* //OSJOB DD DSN=&&TEMP1,DISP=(,PASS),DCB=BLKSIZE=800, // UNIT=SYSDA,SPACE=(TRK,(1,1)) //MASTER DD DSN=yourhlq.origin.master,DISP=SHR //SYSIN DD * -OPT GPO -SEL NAME=,EXEC,VAR,TEMP -INS FIRST header for member ¢MODNAME -INS LAST trailer for member -END /* //*-------------------------------------------------------------------* //*--- STEP2: perform unload to PS file (OSJOB) ---* //*-------------------------------------------------------------------* //STEP2 EXEC PGM=AFOLIBR,PARM='NRJS,NJTA' //SYSPRINT DD SYSOUT=* //LIST DD SYSOUT=* //OSJOB DD DSN=yourhlq.psmaster.unload,DISP=(,CATLG,DELETE), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=6640), // UNIT=3390,SPACE=(CYL,(5,5)),STORCLAS=storclas //MASTER DD DSN=yourhlq.origin.master,DISP=SHR //SYSIN DD DSN=*.STEP1.OSJOB,DISP=(OLD,DELETE) /* //
z/VSE -
* $$ JOB JNM=
* $$ LST CLASS=
* $$ PUN CLASS=
// JOB LIBR2SEQ
// OPTION LOG
// LIBDEF PHASE,SEARCH=(
// ASSGN SYS004,DISK,VOL=VOLSER,SHR
// DLBL MASTER,'LIBR.MASTER'
// EXTENT SYS004,VOLSER,1,0,RELTRK,NTRCKS
// ASSGN SYS008,DISK,VOL=VOLSER,SHR
// DLBL JOBSTR,'LIBR.WORK.FILE',0,SD
// EXTENT SYS008,VOLSER,1,0,RELTRK,NTRCKS
// EXEC LIBRPROG,SIZE=768K
-OPT GPO
-SEL NAME=,EXEC,VAR,TEMP
-INS FIRST
HEADER FOR MEMBER ¢MODNAME
-INS LAST
TRAILER FOR MEMBER
-END
/*
// ASSGN SYS008,IGN
// ASSGN SYS004,DISK,VOL=VOLSER,SHR
// DLBL MASTER,'LIBR.MASTER'
// EXTENT SYS004,VOLSER,1,0,RELTRK,NTRCKS
// ASSGN SYS008,DISK,VOL=VOLSER,SHR
// DLBL JOBSTR,'LIBR.SEQ.FILE',0,SD
// EXTENT SYS008,VOLSER,1,0,RELTRK,NTRCKS
// DLBL IJSYSIN,'LIBR.WORK.FILE',,SD
// EXTENT SYSIPT,VOLSER
ASSIGN SYSIPT,DISK,VOL=VOLSER,SHR
// EXEC LIBRPROG,SIZE=768K
/*
CLOSE SYSIPT,SYSRDR
/*
/&
* $$ EOJ
For additional information on the available control statements, see Control Commands in the Reference Guide.