# IEBGENER

IEBGENER is used to copy a record from a sequential dataset or convert a dataset from PS to PDS or PDS to PS dataset

Copy operation can be performed on all types of records having different various record length

IEBGENER can use either a Physical Sequential (PS) dataset, a Partitioned Dataset (PDS) member, or a Partitioned Dataset Extended (PDSE) member as input and a new or existing PS file or PDS or PDSE member as an output

**EXAMPLE:**

**Copying Data Between Two Sequential Datasets:**

```
//IEBGENER JOB (12345),CLASS=A, MSGCLASS=X,NOTIFY=&SYSUID 
//STEP1 EXEC PGM=IEBGENER 
//SYSUT1 DD DSN=T12345.FILE1.PS, DISP=SHR 
//SYSUT2 DD DSN=T12345.FILE2.PS, DISP=SHR 
//SYSPRINT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
//SYSIN DD DUMMY
```

**Explanation**:

**EXEC Statement:**

* Executes the IEBGENER program, which compares two datasets.

**DD Statements:**

* SYSUT1 DD:
  * DSN=T12345.FILE1.PS: Specifies the name of the input dataset.
* SYSUT2 DD:
  * DSN=T12345.FILE2.PS: Specifies the name of the output dataset.
* SYSPRINT DD:
  * Directs the output and informational messages to the standard output (SYSOUT=\*).
* SYSOUT DD:
  * Also directs general system output to SYSOUT=\* (standard system output).

This program uses the IEBGENER utility to copy data from the input dataset (T12345.FILE1.PS) to the output dataset (T12345.FILE2.PS). It reads the data from SYSUT1 and writes it to SYSUT2



