Copying Between Sequential Datasets and PDS Members Using IEBGENER
EXAMPLE 1:
Copying a PDS Member to a Sequential Dataset using IEBGENER
Explanation:
EXEC Statement:
Executes the IEBGENER utility to copy data.
DD Statements:
SYSUT1 DD:
DSN=T12345.FILE1.PDS(MEMBER1): Specifies the input file as a PDS member (MEMBER1) from the PDS dataset (T12345.FILE1.PDS).
SYSUT2 DD:
DSN=T12345.FILE2.PS: Specifies the output dataset as a sequential (PS) dataset (T12345.FILE2.PS).
SYSPRINT DD:
Directs messages and logs to the system output (SYSOUT=*).
SYSOUT DD:
Directs general system output to standard system output (SYSOUT=*).
This program uses IEBGENER to copy a specific member (MEMBER1) from a partitioned dataset (T12345.FILE1.PDS) to a sequential dataset (T12345.FILE2.PS). It reads the content of the PDS member from SYSUT1 and writes it to the sequential dataset specified in SYSUT2
EXAMPLE 2:
Copying a Sequential Dataset to a PDS Member
Explanation:
EXEC Statement:
Executes the IEBGENER utility to copy data.
DD Statements:
SYSUT1 DD:
DSN=T12345.FILE1.PS: Specifies the name of the input dataset (T12345.FILE1.PS), which is a sequential dataset (PS).
SYSUT2 DD:
DSN=T12345.FILE2.PDS(MEMBER1): Specifies the output location as a PDS member (MEMBER1) in the partitioned dataset (T12345.FILE2.PDS).
SYSPRINT DD:
Directs informational messages and logs to system output (SYSOUT=*).
SYSOUT DD:
Handles general system output, also directed to the default system output (SYSOUT=*)
This program uses the IEBGENER utility to copy data from a sequential dataset (T12345.FILE1.PS) to a member (MEMBER1) of a partitioned dataset (T12345.FILE2.PDS). It reads the content from the sequential dataset specified in SYSUT1 and writes it into the specified PDS member in SYSUT2
Last updated
Was this helpful?