Posted: Sun May 04, 2003 5:51 pm Post subject: Automatic bump up of GDG limits with REXX
Hello all
I need to do two things
#1 List all the limits of existing GDGs in a report format like this
Code:
GDG BASE NAME MAX LIMIT
************** **********
A.B.C 3
E.D.F 6
.....
All I have, is list of GDG bases (A.B.C, E.D.F..etc.,) in a dataset. Can we do a LISTCAT ALL and extract the max limits of all datasets with REXX?
#2 Then, if the max limit of generation is less than 5 then I need to ALTER the limit to 5.
Can this be done with REXX? I'm not proficient with REXX. All your pointers are very much appreciated.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sun May 04, 2003 8:09 pm Post subject:
Mukunda,
If you are not restricting yourself for a rexx solution, then the following DFSORT/ICETOOL jcl will give you the desired results. If you have syncsort at your shop then change the pgm name to synctool.
Code:
//STEP010 EXEC PGM=IKJEFT01
//*
//SYSTSPRT DD DSN=&L,
// DISP=(,PASS),
// SPACE=(CYL,(25,10),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSTSIN DD *
LISTCAT LEVEL('GDG BASE NAME') ALL
//******************************************************************
//STEP020 EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&L,DISP=(OLD,DELETE)
//T1 DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(25,10),RLSE)
//T2 DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(25,10),RLSE)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
// DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
SORT FROM(CON) USING(CTL2)
//CTL1CNTL DD *
OUTFIL FNAMES=T1,
INCLUDE=(1,8,CH,EQ,C'GDG BASE'), $ INCLUDE GDGBASE RECORDS
OUTREC=(17,36, $ GDG BASE NAME
X, $ PAD WITH SPACES
1,8, $ GDG BASE
C' LIMIT ', $ PAD WITH SPACES
3C'0', $ 3 ZEROES FOR SUMMING THE LIMIT
SEQNUM,8,ZD) $ SEQNUM FOR SUMMING
OUTFIL FNAMES=T2,
INCLUDE=(8,5,CH,EQ,C'LIMIT'), $ INCLUDE LIMIT RECORDS
OUTREC=(46X, $ PAD WITH SPACES
8,5, $ CHARACTER LIMIT
X, $ PAD WITH SPACES
17,15,ZD,EDIT=(TTT), $ ACTUAL GDGLIMIT
SEQNUM,8,ZD) $ SEQNUM FOR SUMMING
//CTL2CNTL DD *
SORT FIELDS=(56,8,CH,A) $ SORT ON SEQNUM
SUM FIELDS=(53,3,ZD) $ SUM ON THE LIMIT
OUTFIL FNAMES=OUT,
HEADER1=('GDG BASE NAME MAX LIMIT',/,
'************* *********'),
OUTREC=(1,36,53,3,25X)
/*
Thank you very much, Kolusu
I still have few questions.
Do we need to give the 'GDG BASE NAME' every time? I just want to give a dataset containing a list of GDG bases as input and generate a report for all these bases.
Also can we ALTER the GDG base limits with similar technique?
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Mon May 05, 2003 5:32 pm Post subject:
Mukunda,
You need to generate listcat info for each gdg base you have.There are many ways to do this. The example shown above is using LEVEL for generating the listcat info for the gdg's.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum