Can you delete a file from a class using the CA DADS Plus for CICS batch utility program DADM?

Document ID : KB000051053
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The DADM batch utility program does not have an option that allows you to delete a particular file from a class of files stored in the CA DADS Plus for CICS DADS01 control file. Currently the only way to remove a file or files from a class is to sign on to CICS and use the CA DADS Plus online menu's.

This option has been requested by several clients and may be added to a future release of CA Dads Plus for CICS.

Solution:

If signing on to each release of CICS to remove a file or files from a class is not an option you may want to consider the following DADM batch JCL listed below.

In the sample JCL below a class TEST is DELETED and then ADDED to the DADS01 control file containing three VSAM files FILE001, FILE002 and FILE003.

Let's assume that your current DADS01 control file contains a class TEST which contains five files FILE001, FILE002, FILE003, FILE004 and FILE005.

Let's assume that you need to remove files FILE004 and FILE005 from the class.

The JCL below executes batch utility program DADM to DELETE class TEST, then ADD class TEST and attach files FILE001, FILE002 and FILE003 to the class.

Using this method allows you to setup your JCL for each DADS01 file that needs to be changed and test the changes before they are made in your production environment.

You can then schedule your changes when CICS is brought down for scheduled maintenance.

If the CA DADS Plus control file is allocated to CICS you must close the control file before running the DADM utility program.

The DADM batch utility is outlined in the CA DADS Plus for CICS User Guide Chapter Batch Maintenance Dynamic Allocation.

//DELCLASS JOB (124100000),'XXXX',CLASS=A,MSGLEVEL=(1,1),
//             MSGCLASS=X,NOTIFY=XXXXXX
//*
//DELCLASS EXEC PGM=DADM,REGION=1024K
//STEPLIB  DD DSN=DADSPL40.P0507.SMP.LOADLIB,DISP=SHR
//DADS01   DD DSN=DADSPL40.DADS01,DISP=SHR
//SYSPRINT DD SYSOUT=*,DCB=(LRECL=133,RECFM=FBA,BLKSIZE=133)
//SYSIN    DD *
  DELETECLASS NAME(TEST)
  ADDCLASS NAME(TEST) -
   MEMBERS(FILE001,FILE002,
           FILE003)
/*
//