IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORT+LISTCAT to print GDG info


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 55

PostPosted: Thu Jun 24, 2010 1:10 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 24, 2010 1:28 am
Reply with quote

How about posting a portion of your input?
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 55

PostPosted: Thu Jun 24, 2010 1:29 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jun 24, 2010 1:54 am
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jun 24, 2010 3:00 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top