Joined: 10 Jan 2005 Posts: 12 Topics: 4 Location: Hyderabad
Posted: Wed Apr 06, 2005 4:49 am Post subject: Need to report how long particular ID is zero
Can any one suggest how to achieve my task.
I have a file(gdg) which is having 21 version.
I need to find ID's whenever there is an counter field is zero in each file and I have to report how long that particular ID field is zero.For this i don't have any date field in my file so I have to take creation date of file(each version).
I am able to report all ID's whenever counter is zero by giving base as input by usnig SORT.
Can any one suggest how to do this by using SORT or EASYTRIEVE.
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Wed Apr 06, 2005 7:38 am Post subject:
Pappu,
you can easily tag the creation date of the GDG to the end of every record and report the zero counter report ids. here is a topic about getting the create dates of all the gdg versions.
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
Posted: Wed Apr 06, 2005 1:11 pm Post subject:
Kolusu,
There are some minor errors in the job which you have at the specified link.
1. No files with DDNAME OUT has been defined in STEP0200.
2. You missed to give OPTION EQUALS in CTL2. Because of that, GDG version names are not getting printed correctly.
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Thu Apr 07, 2005 9:22 am Post subject:
Pappu,
The following JCL will give you the desired results. Step0100 gets the listcat information and step0200 creates dynamic control cards with the gdg version creation date which will be used in the next step.
The above job will create 21 control cards which will look like this
Code:
INREC FIELDS=(1,438,C'date of gen of 1')
Now you can use this control cards to read your gdg versions. I am assuming that your RPT-ID is at position 1 for 10 bytes and you have the counter at 40th position for 5 bytes of zd format.
We use the control cards created above and concatenate with your actual control cards for finding the rpt-ids with zero count.
//GDG21 DD DSN=GDG.VERSION(0),
// DISP=SHR
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(GDG01) USING(G001)
COPY FROM(GDG02) USING(G002)
//G001CNTL DD DSN=&G01,DISP=OLD
// DD *
INCLUDE COND=(40,5,ZD,EQ,0)
OUTFIL FNAMES=OUT,
OUTREC=(1,10, $ RPT-ID
C' RPT ID IS ZERO SINCE ', $ MESSAGE
439,10) $ GDG VER DATE
//G002CNTL DD DSN=&G02,DISP=OLD
// DD *
INCLUDE COND=(40,5,ZD,EQ,0)
OUTFIL FNAMES=OUT,
OUTREC=(1,10, $ RPT-ID
C' RPT ID IS ZERO SINCE ', $ MESSAGE
439,10) $ GDG VER DATE
....include all your control cards for all gens here as shown above
//G021CNTL DD DSN=&G21,DISP=OLD
// DD *
INCLUDE COND=(40,5,ZD,EQ,0)
OUTFIL FNAMES=OUT,
OUTREC=(1,10, $ RPT-ID
C' RPT ID IS ZERO SINCE ', $ MESSAGE
439,10) $ GDG VER DATE
Joined: 10 Jan 2005 Posts: 12 Topics: 4 Location: Hyderabad
Posted: Mon Apr 11, 2005 2:42 am Post subject:
Kolusu,
I have tried your code, first I got ABEND S013 because no TOOL in DD found in step200 so I included this in step200
//TOOLIN DD *
SORT FROM(CON) USING(CTL2)
After the inclusion of the above code I am getting abend ABENDU0016.
and getting following message in spool.
OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
NO KEYWORDS FOUND ON CONTROL STATEMENT
NO KEYWORDS FOUND ON CONTROL STATEMENT
NO KEYWORDS FOUND ON CONTROL STATEMENT
NO KEYWORDS FOUND ON CONTROL STATEMENT
NO KEYWORDS FOUND ON CONTROL STATEMENT
Joined: 10 Jan 2005 Posts: 12 Topics: 4 Location: Hyderabad
Posted: Mon Apr 11, 2005 3:27 am Post subject:
Kolusu,
Sorry for giving you trouble I am able to fix above mentioned problem.Actual proble is I missed out continuation in outrec.Now I getting another abend for which the error message is
WER189A CON DCB RECFM REQUIRED in DFSMSG.
Joined: 10 Jan 2005 Posts: 12 Topics: 4 Location: Hyderabad
Posted: Mon Apr 11, 2005 7:36 am Post subject:
Kolusu,
I have coded the CON dd statement as you mentioned above.Just to come out from this abend I just included DCB parameters like RECFM=FB and LRECL=133.so now job abended with OUTREC FIELD OUTSIDE RANGE.
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I GDG01 : RECFM=FB ; LRECL= 438; BLKSIZE= 27594
WER230A OUTREC FIELD OUTSIDE RANGE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000".
Joined: 10 Jan 2005 Posts: 12 Topics: 4 Location: Hyderabad
Posted: Mon Apr 11, 2005 9:05 am Post subject:
Kolusu,
I have included my jcl and messages below .
ID is 11 bytes and starts at 17th position. and counter start at 109 and it's comp-3 variable and length is 5 bytes.
Code:
//JOBCARD
//STEP0100 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=&L,
// DISP=(,PASS),
// SPACE=(CYL,(5,5),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSTSIN DD *
LISTCAT ENT('MY.GDG.BASE') ALL
//*
//*STEP0200 EXEC PGM=ICETOOL
//STEP0200 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&L,DISP=(OLD,PASS)
//T1 DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE)
//T2 DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE)
//CON DD DSN=&T1,DISP=OLD,VOL=REF=*.T1
// DD DSN=&T2,DISP=OLD,VOL=REF=*.T2
//TGEN1 DD DSN=&T01,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TGEN2 DD DSN=&T02,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TGEN3 DD DSN=&T03,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TGEN4 DD DSN=&T04,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TGEN5 DD DSN=&T05,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//TOOLIN DD *
SORT FROM(CON) USING(CTL2)
//CTL2CNTL DD *
OPTION EQUALS
INREC FIELDS=(1,49,50,2,CHANGE=(1,C'19',C'0',
C'20',C'1',
C'21',C'2'),NOMATCH=(C'0'),
52,5,80:X,81,8)
SORT FIELDS=(81,8,ZD,A)
SUM FIELDS=(50,6,ZD)
OUTREC FIELDS=(1,49,50,6,ZD,PD,LENGTH=4,80:X)
OUTFIL FNAMES=TGEN1,STARTREC=2,ENDREC=2,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN2,STARTREC=3,ENDREC=3,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN3,STARTREC=4,ENDREC=4,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN4,STARTREC=5,ENDREC=5,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN5,STARTREC=6,ENDREC=6,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
/*
//STEP0300 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//GDG01 DD DSN=MY.GDG.BASE(-4),DISP=SHR
//GDG02 DD DSN=MY.GDG.BASE(-3),DISP=SHR
//GDG03 DD DSN=MY.GDG.BASE(-2),DISP=SHR
//GDG04 DD DSN=MY.GDG.BASE(-1),DISP=SHR
//GDG05 DD DSN=MY.GDG.BASE(0),DISP=SHR
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(GDG01) USING(G001)
COPY FROM(GDG02) USING(G002)
COPY FROM(GDG03) USING(G003)
COPY FROM(GDG04) USING(G004)
COPY FROM(GDG05) USING(G005)
//G001CNTL DD DSN=&T01,DISP=OLD
// DD *
INCLUDE COND=(109,5,PD,EQ,0)
OUTFIL FNAMES=OUT
OUTREC FIELDS=(17,11,
C' RPT ID IS ZERO SINCE ',439,10)
//G002CNTL DD DSN=&T02,DISP=OLD
// DD *
INCLUDE COND=(109,5,PD,EQ,0)
OUTREC FIELDS=(17,11,
C' RPT ID IS ZERO SINCE ',439,10)
OUTFIL FNAMES=OUT
//G003CNTL DD DSN=&T03,DISP=OLD
// DD *
INCLUDE COND=(109,5,PD,EQ,0)
OUTFIL FNAMES=OUT
OUTREC FIELDS=(17,11,
C' RPT ID IS ZERO SINCE ',439,10)
//G004CNTL DD DSN=&T04,DISP=OLD
// DD *
INCLUDE COND=(109,5,PD,EQ,0)
OUTFIL FNAMES=OUT
OUTREC FIELDS=(17,11,
C' RPT ID IS ZERO SINCE ',439,10)
//G005CNTL DD DSN=&T05,DISP=OLD
// DD *
INCLUDE COND=(109,5,PD,EQ,0)
OUTFIL FNAMES=OUT
OUTREC FIELDS=(17,11,
C' RPT ID IS ZERO SINCE ',439,10)
/*
Tool message
Code:
TOOLMSG:
SYT000I SYNCTOOL RELEASE 1.4D - COPYRIGHT 2003 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED
SORT FROM(CON) USING(CTL2)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0001"
DFMessage:
Code:
DFSMSG:
CTL2CNTL :
OPTION EQUALS
INREC FIELDS=(1,49,50,2,CHANGE=(1,C'19',C'0',
C'20',C'1',
C'21',C'2'),NOMATCH=(C'0'),
52,5,80:X,81,8)
SORT FIELDS=(81,8,ZD,A)
SUM FIELDS=(50,6,ZD)
OUTREC FIELDS=(1,49,50,6,ZD,PD,LENGTH=4,80:X)
OUTFIL FNAMES=TGEN1,STARTREC=2,ENDREC=2,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN2,STARTREC=3,ENDREC=3,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN3,STARTREC=4,ENDREC=4,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN4,STARTREC=5,ENDREC=5,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
OUTFIL FNAMES=TGEN5,STARTREC=6,ENDREC=6,
OUTREC=(C' INREC FIELDS=(1,438,C',
C'''',
50,4,DT1,EDIT=(TTTT-TT-TT),
C'''',
C')',
80:X)
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=CON,SORTDD=CTL2,DYNALLOC
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER164B 24,612K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,012K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER189A CON DCB RECFM REQUIRED
WER108I CON : RECFM= ; LRECL= ; BLKSIZE=
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
When I included DCB parameters in CON DD I am getting below message in DFSMSG
Code:
G001CNTL :
INCLUDE COND=(109,5,PD,EQ,0)
OUTREC FIELDS=(17,11,
C' RPT ID IS ZERO SINCE ',439,10)
OUTFIL FNAMES=OUT
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=GDG01,SORTDD=G001,COPY
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER164B 8,884K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,012K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I GDG01 : RECFM=FB ; LRECL= 438; BLKSIZE= 27594
WER230A OUTREC FIELD OUTSIDE RANGE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
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