I added an LDS as an emergency measure because of a DASD space issue, now I want to delete it.
Release: 11.7
Component: CA Dispatch
For this example we will use/delete an appended LDS with a low level qualifier of APPEND09.
First, we need to FREEZE the LDS file in order to stop any new data from being written to the file we want to delete. Unless you have sequential chaining specified, report and msgclass data is written across several LDS files, this is called interleaved chaining. By freezing the LDS, you prevent Dispatch from writing any new or additional data to that LDS file.
-Using the CADSJCL member DDEXLDSA job as a shell, create a job that executes the CADDUTIL utility program with the following append statement:
APD DDNAME = APD9 , FREEZE
Below is a sample of the JCL to be used:
//UTIL EXEC PGM=CADDUTIL,REGION=6M
//STEPLIB DD DISP=SHR,DSN=YOUR.DISPATCH.R117.CADSLOAD
//ROOT DD DISP=SHR,DSN=YOUR.DISPATCH.R117.LDS.ROOT
//APD9 DD DISP=SHR,DSN=YOUR.DISPATCH.R117.LDS.APPEND09
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
ROOT DDNAME = ROOT
APD DDNAME = APD9 , FREEZE
Next, once the LDS is frozen, you can then monitor the percentage of utilization for the APPEND09 file by issuing the STAT,X command. The output from the STAT,X command will show the number of blocks allocated, used, and the percentage of utilization (PCT=) for each of your LDS files.
Example:
09-Frozen -YOUR.DISPATCH.R117.LDS.APPEND09
Blocks Total=00090000 Used=000012645 Pct=014
As the batch maintenance jobs run and expire data that has exceeded it's defined retention, the percentage of utilization for the APPEND09 file will shrink. We will not allow deletion of an LDS file if there is still data in it. When the percentage of utilization for the APPEND09 file reaches zero (PCT=0), it can then be removed/deleted from the list of recognized CADZSPLx task appended LDS files.
Finally, to DELETE the file out of the CADZSPLx environment, you can execute your custom CADDUTIL utility job again with the following append statement:
APD DDNAME = APD9 , DELETE
Once deleted, it will no longer show up in the list of recognized LDS files when the STAT,X command is issued.
- When that LDS is no longer recognized by the CADZSPLx environment, it can then be deleted from the DASD pack it resides on using standard VSAM file delete JCL.