Copying a UNIX File to a PS File

EXAMPLE:

Copying a UNIX System Services (USS) File to a Sequential Dataset

//IEBGENER JOB (12345), CLASS=A, MSGCLASS=X,NOTIFY=&SYSUID
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD PATH='/mth9/input1/transfer.mon',
//          FILEDATA=TEXT,PATHOPTS=ORDONLY

//SYSUT2 DD DSN=T12345.FILE2.PS, DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY

Explanation:

  • EXEC Statement: Executes the IEBGENER utility, which is used for copying datasets.

  • DD Statements:

    • SYSUT1 DD: Defines the input source as a UNIX file located at /mth9/input1/transfer.mon. The file data is defined as TEXT, meaning the file will be read as text, and the file will be accessed in a read-only mode (ORDONLY)

    • SYSUT2 DD: Specifies the output dataset as a physical sequential (PS) dataset T12345.FILE2.PS

    • SYSPRINT DD: Directs informational messages and logs to the system output (SYSOUT=*), which is the standard output.

    • SYSIN DD: Uses DUMMY, meaning that no input control statements are needed for this operation.

This job copies the contents of a UNIX file (/mth9/input1/transfer.mon) to an existing PS dataset (T12345.FILE2.PS).

Last updated

Was this helpful?