View previous topic :: View next topic
Author
Message
manuwankenobi New User Joined: 02 Mar 2006Posts: 32 Location: FRANCE
Hi all,
My input file is a list of GDS from IDCAMS listcat
(two first lines only for column positioning)
Code:
1 2 3 4 5
123456789012345678901234567890123456789012345678901
NONVSAM--PRF.DSE0105.SQL.SYSPRINT.G1712V00
NONVSAM--PRF.DSE0105.SQL.SYSPRINT.G1713V00
NONVSAM--PRF.DSE0105.SQL.SYSPRINT.G1714V00
NONVSAM--PRF.DSE0105.SQL.SYSPRINT.G1715V00
NONVSAM--PRF.DSE0105.SQL.SYSPRINT.G1716V00
I have to get the GDG base name and to sum the number of GDS belonging to the base giving the output record below
GDS position 1 to 44, sum of GDS in position 49 length 3,ZD
(two first lines only for column positioning)
Code:
1 2 3 4 5
123456789012345678901234567890123456789012345678901
PRF.DSE0105.SQL.SYSPRINT 005
I tried this :
Code:
//TOOLIN DD *
COPY FROM(IN1) TO(TMP2) USING(CTL4)
INCLUDE COND=(1,14,CH,EQ,C' NONVSAM')
INREC PARSE=(%00=(STARTAFT=C'NONVSAM--',ENDBEFR=C'.G',FIXLEN=44)),
BUILD=(%00,49:C'001')
SORT FIELDS=(1,44,CH,A)
SUM FIELDS=(49,3,ZD)
OUTFIL FNAMES=TMP2,OUTREC=(1,44,C' ',49,3)
I works fine, but if the string '.G' is found anywhere in the filename before the GDS number it won't work !
So the question is : is there a way to parse only the gdg base (the length of gdg base is varying) ?
Thanks for all.
Back to top
manuwankenobi New User Joined: 02 Mar 2006Posts: 32 Location: FRANCE
Sorry,
A card (//CTL4CNTL DD *) is missing in my code :
Code:
//TOOLIN DD *
COPY FROM(IN1) TO(TMP2) USING(CTL4)
//CTL4CNTL DD *
INCLUDE COND=(1,14,CH,EQ,C' NONVSAM')
INREC PARSE=(%00=(STARTAFT=C'NONVSAM--',ENDBEFR=C'.G',FIXLEN=44)),
BUILD=(%00,49:C'001')
SORT FIELDS=(1,44,CH,A)
SUM FIELDS=(49,3,ZD)
OUTFIL FNAMES=TMP2,OUTREC=(1,44,C' ',49,3)
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
Back to top
manuwankenobi New User Joined: 02 Mar 2006Posts: 32 Location: FRANCE
Kolusu,
Thank you for the answer.
I always check the document with dfsort's tricks and the application programming guide before asking a question here, the trick you are speaking about is not the one that I need.
I do not want to find the GDG base limit, I want to find the number of GDS currently used (it can be less than the limit).
Maybe there is a way to get all the GDS name into %00 (INREC PARSE=(%00=(STARTAFT=C'NONVSAM--',ENDBEFR=C' ',FIXLEN=44)) ) and remove 8 characters from right to left beginning at the last nonblank character ???
Regards
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
manuwankenobi,
The following DFSORT JCL will give you the desired results
Code:
//STEP0100 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=&L,
// DISP=(,PASS),
// SPACE=(CYL,(1,1),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSTSIN DD *
LISTCAT ENT('YOUR GDG BASE NAME') NAME
//*
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&L,DISP=(OLD,DELETE)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,8,CH,EQ,C'GDG BASE',OR,
4,7,CH,EQ,C'NONVSAM')
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,EQ,C'GDG BASE'),
PUSH=(81:17,44))
OUTFIL REMOVECC,NODETAIL,BUILD=(80X),
SECTIONS=(81,44,
TRAILER3=(81,44,3X,COUNT-1=(M11,LENGTH=3)))
/*
Back to top
manuwankenobi New User Joined: 02 Mar 2006Posts: 32 Location: FRANCE
Thank you very much,
I do not have the PTF needed to try yor code (I will have it in a few weeks !!!).
Waiting for the PTF I'll do the job with REXX...
Best regards.
Back to top
Please enable JavaScript!