LDISP={SHR | OLD | DNEW | MOD | NEW | NEWR | NEWA},{KEEP | CATLG | DELETE},{KEEP |CATLG | DELETE}
This parameter defines the disposition of the local dataset. It is broken up into three parameters.
The following table lists the dataset status options:
| Transfer Direction | Option | Short Description |
|---|---|---|
| Send or Receive | SHR
|
Requests shared access to the dataset. |
| Receive | OLD
|
Requests exclusive access to the dataset. |
DNEW
|
Deletes the file if it already exists, and then re-creates the file; creates the file If the file does not exist. | |
MOD
|
Appends data to the end of the dataset. | |
NEW
|
Creates dataset. If dataset already exists, returns error. | |
NEWR
|
Creates dataset. If dataset already exists, replaces the dataset. | |
NEWA
|
Creates dataset. If dataset already exists, appends data to the end of the dataset. |
The following table lists the normal disposition options:
| Transfer Direction | Option | Short Description |
|---|---|---|
| Send | KEEP
|
Keeps the dataset after the transfer is completed successfully. If a dataset is created, do not catalog the dataset.
Note: Use this option with great care.
|
| Receive new dataset | CATLG
|
Catalogs the dataset If a dataset is created. If a dataset is not created, keeps the dataset. |
| Send | DELETE
|
Deletes the dataset after the transfer is completed successfully. |
The following table lists the error disposition options:
| Transfer Direction | Option | Short Description |
|---|---|---|
| Send | KEEP
|
Keeps the dataset after the transfer is completed successfully. If a dataset is created, do not catalog the dataset.
Note: Use this option with great care.
|
| Receive new dataset | CATLG
|
Catalogs the dataset If a dataset is created. If a dataset is not created, keeps the dataset. |
| Send | DELETE
|
Deletes the dataset after the transfer is completed unsuccessfully. |
This parameter works like the mainframe LDISP parameter. You only need to specify the first parameter for a RECEIVE transfer.
The EFFECT parameter might override the LDISP and RDISP parameters. Whichever parameter defined last in the batch job takes precedence.
DELETE cannot be processed. The dataset deletion is performed in the Dynamic deallocation routine. If the dataset has not been allocated, it cannot be deleted. For example, if a request fails because the dataset is not available, the dynamic allocation fails; therefore, the dataset cannot be deleted because it is not allocated.