The best time to cleanup the CSD is during an upgrade, but manually copying the groups over from the old CSD to the new one can be time consuming. I wrote a little Assembler program to help me do this a bit faster.
This is the process I follow:
- Firstly create the new CSD, initialize it and create the CEE groups according to the manual.
- Get all the GROUP LIST's from the CSD and add them to the JCL (CSDCNVTJ)..
- The JCL APPEND's the lists from the old CSD to the new CSD.
- The JCL will do a DFHCSDUP LIST LIST(xxx) against the new CSD. This will display all the GROUPS in the LIST and show you which GROUPS does not exist.
- The Assembler program CSDCNVT will read the output from the LIST command and create a DFHCSDUP command file.
- Using the output from the CSDCNVT program as input to DFHCSDUP, all the Groups that does not exist in the new CSD will be copied from the old CSD.
- This will leave the unused/unrefferenced groups in the old CSD.
Attached below is the Source code for CSDCNVT (CSDCNVT.ASM) and the JCL (CSDCNVTJ.JCL) .
Hope it helps.
If you use this please leave a comment and let us know if it was useful.
If you make some alterations and improvements please post them back here.
Disclaimer: I'm not an Assembler guru. So don't poke fun at my code. This process worked for me but ymmv. The program CSDCNVT is supplied as is. No warranties, guarantees comes with it. I may or may not work for you. Same goes for the JCL.
One question under the CSDCNVTJ jcl.
In many steplibs you have mentioned as "STEPLIB DD DISP=SHR,DSN=*CICSHLQ*.SDFHLOAD ". Is the SDFHLOAD corresponding to the New CICS region or else it is for OLD cics region. Could you please clarify .
This is best safest method for CSD migrations. I really admire the way the it has been coded.