|
View previous topic :: View next topic
|
| Author |
Message |
rmd3003
New User
Joined: 03 Jul 2006 Posts: 55
|
|
|
|
I have this job and I want to modify it to print a little differently:
| 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('MYGDG.BASE.TEST') ALL
//*
//STEP0200 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&L,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INCLUDE COND=(01,8,CH,EQ,C'GDG BASE',OR,
04,7,CH,EQ,C'NONVSAM',OR,
37,8,CH,EQ,C'CREATION')
INREC IFTHEN=(WHEN=(1,8,CH,EQ,C'GDG BASE',OR,4,7,CH,EQ,C'NONVSAM'),
BUILD=(17,44,+0,TO=PD,LENGTH=4,81:SEQNUM,4,ZD)),
IFTHEN=(WHEN=(37,8,CH,EQ,C'CREATION'),
BUILD=(44X,X'01',55,6,UFF,PD,LENGTH=3,81:SEQNUM,4,ZD))
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(45:45,4,DT1,EDIT=(TTTT-TT-TT))) |
Right now I get something like this:
| Code: |
MYGDG.BASE.TEST 1900-01-00
2009-01-01
MYGDG.BASE.TEST.G1201V00 1900-01-00
2010-04-25
MYGDG.BASE.TEST.G1202V00 1900-01-00
2010-04-26
MYGDG.BASE.TEST.G1203V00 1900-01-00
2010-04-27 |
Is there a way to print like this?
| Code: |
MYGDG.BASE.TEST 2009-01-01
MYGDG.BASE.TEST.G1201V00 2010-04-25
MYGDG.BASE.TEST.G1202V00 2010-04-26
MYGDG.BASE.TEST.G1203V00 2010-04-27 |
Thank you. |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| How about posting a portion of your input? |
|
| Back to top |
|
 |
rmd3003
New User
Joined: 03 Jul 2006 Posts: 55
|
|
|
|
| CICS Guy wrote: |
| How about posting a portion of your input? |
I'm not sure what "INPUT" you are talking about? This job prints GDG info. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| I want to modify it to print a little differently: |
What are the "rules" for printing differently. Do you want the date from the second record of each pair in each case, or the highest date, or what?
It really would help if you showed an example of the input records you are operating on (that is, the GDG info resulting from the LISTCAT statement in &&L). |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
| rmd3003 wrote: |
| CICS Guy wrote: |
| How about posting a portion of your input? |
I'm not sure what "INPUT" you are talking about? This job prints GDG info. |
rmd3003,
If your intention is to get the listing of create dates of your GDG's you need to sum the creation date values at pos 45 as the name and creation dates on different lines from the listcat output.
Remove the SORT FIELDS=COPY line and add these 2 lines
| Code: |
SORT FIELDS=(81,4,CH,A),EQUALS
SUM FIELDS=(45,4,PD)
|
Also remember that your output LRECL is 84 which has the seqnum at the end. You can remove them changing your OUTREC statement to the following.
| Code: |
OUTREC BUILD=(1,44,45,4,DT1,EDIT=(TTTT-TT-TT),80:X)
|
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|