Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort & merge all the generations of GDG W/O affecting HD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
nithyaroslin

New User


Joined: 29 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Wed Nov 10, 2010 3:49 pm    Post subject: Sort & merge all the generations of GDG W/O affecting HD
Reply with quote

Hi,

I have a requirement as follows.

The input for sort is the GDG base. Each generation is as follows.

File1
Code:

UHDR20101101
ZZZZ00001
BBBB00002
ZZZZ00001
UTRL000005


File2
Code:

UHDR20101102
ZZZZ00001
AAAA00002
UTRL000004


The expected output is as follows.
Code:

UHDR20101101
BBBB00002
ZZZZ00001
UTRL000005
UHDR20101102
AAAA00002
ZZZZ00001
UTRL000004


The keypoints to attain this particular output file are
1. The trailer and header should not be affected.
2. The duplicate records found within that particular header and trailer only should be removed. If the same record is found in another file, it should not be disturbed.
3. sort the records within that particular header and trailer in increasing order.
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Wed Nov 10, 2010 10:28 pm    Post subject: Reply to: Sort & merge all the generations of GDG W/O af
Reply with quote

nithyaroslin,

Assuming that the GDG generations all have an LRECL of 80 and FB recfm, the following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL     
//TOOLMSG  DD SYSOUT=*           
//DFSMSG   DD SYSOUT=*           
//IN       DD DSN=Your GDG base,DISP=SHR
//OUT      DD SYSOUT=*                                             
//TOOLIN   DD *                                                   
  SELECT FROM(IN) TO(OUT) ON(81,4,CH) ON(1,10,CH) FIRST USING(CTL1)
//CTL1CNTL DD *                                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(84:C'2')),                     
  IFTHEN=(WHEN=GROUP,BEGIN=(1,4,CH,EQ,C'UHDR'),                   
     END=(1,4,CH,EQ,C'UTRL'),PUSH=(81:ID=3)),                     
  IFTHEN=(WHEN=(1,4,CH,EQ,C'UHDR'),OVERLAY=(84:C'1')),             
  IFTHEN=(WHEN=(1,4,CH,EQ,C'UTRL'),OVERLAY=(84:C'3'))             
                                                                   
  OUTFIL FNAMES=OUT,BUILD=(1,80)                                   
//*
Back to top
View user's profile Send private message
nithyaroslin

New User


Joined: 29 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Thu Nov 11, 2010 11:02 am    Post subject: Reply to: Sort & merge all the generations of GDG W/O af
Reply with quote

Wow.... icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif

Thankyou very much! It's working!!!! The grouping concept is really wonderful... Thanks again!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us