VintageBigBlue.org

 

Message - hwt001


Nov 28, 2018

 

HWT001 How to copy a sequential file to a PDS

To copy a sequential file to a PDS using TSO the following commands can be used.

The source dataset is seqds and the destination dataset is pdsnew in sys2.proclib.

READY
pds seqds cop 'sys2.proclib(pdsnew)'
PDS484W COPY IS IN PROGRESS
DATA SET UTILITY - GENERATE
PAGE 0001
PROCESSING ENDED AT EOD

READY



Another possibility is the following:

READY

ALLOC FI(SYSUT1) DA('sequential-dataset') SHR
ALLOC FI(SYSUT2) DA('output-pds(new-mbr)') SHR
ALLOC FI(SYSIN) DUMMY
ALLOC FI(SYSPRINT) DA(*)
CALL 'SYS1.LINKLIB(IEBGENER)'



To do it in batch use this JCL as an example.

// JOB - etc
// EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=sequential-dataset
//SYSUT2 DD DISP=SHR,DSN=output-pds(new-mbr)


Be careful that when SYSUT2 specifies a PDS that you also specify the member name.
Otherwise the PDS directory will be destroyed.

This JCL can also copy a sequential to sequential or PDS member to PDS member. The
type of files is specified in the DD statements and IEBGENER will handle what ever
is specified there. 


Contact Us
This Site's Privacy Policy
Google's privacy policies

S
e
n
i
o
r
T
u
b
e
.
o
r
g