LDISP={SHR | OLD | DNEW | MOD | NEW | NEWR | NEWA},{KEEP | CATLG | DELETE},{KEEP|CATLG|DELETE}

This parameter defines the disposition of the local data set. It is broken up into three parameters.

The following table lists the data set status options:

Transfer Direction Option Short Description
Send or Receive SHR Requests shared access to the data set.
Receive OLD Requests exclusive access to the data set.
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 data set.
NEW Creates data set. If data set already exists, returns error.
NEWR Creates data set. If data set already exists, replaces the data set.
NEWA Creates data set. If data set already exists, appends data to the end of the data set.

The following table lists the normal disposition options:

Transfer Direction Option Short Description
Send KEEP Keeps the data set after the transfer is completed successfully. If a data set is created, do not catalog the data set.
Note: Use this option with great care.
Receive new data set CATLG Catalogs the data set If a data set is created. If a data set is not created, keeps the data set.
Send DELETE Deletes the data set after the transfer is completed successfully.

The following table lists the error disposition options:

Transfer Direction Option Short Description
Send KEEP Keeps the data set after the transfer is completed successfully. If a data set is created, do not catalog the data set.
Note: Use this option with great care.
Receive new data set CATLG Catalogs the data set If a data set is created. If a data set is not created, keeps the data set.
Send DELETE Deletes the data set 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.

Note: In some conditions, the error disposition of DELETE cannot be processed. The data set deletion is performed in the Dynamic deallocation routine. If the data set has not been allocated, it cannot be deleted. For example, if a request fails because the data set is not available, the dynamic allocation fails; therefore, the data set cannot be deleted because it is not allocated.