Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us