ALTERING GDG Definition:
Some times there are situtations where we need to change the attributes of GDG. These types of tasks can be performed using ALTER command. We will use IDCAMS utitlity to alter GDG attributes.
In last section, I have create MYLIB.LIB.TEST GDG with NOEMPTY SCRATCH subparameters, now I want to change them to EMPTY NOSCRATCH respectively.
Here is the JCL that will do this:
//MYJOB JOB (WE345),'KRISHNA' //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * ALTER MYLIB.LIB.TEST EMPTY NOSCRATCH /* //
In this example, the ALTER statement is used to modify the features of the GDG called MYLIB.LIB.TEST. Any generations that may exist for that GDG will now contain the modified features as well. Any new generations that are created for this GDG will now be created based on these new features.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!