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

To concatenate records with same record Id to single Rec


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

New User


Joined: 08 Oct 2008
Posts: 1
Location: Chennai

PostPosted: Wed Jan 28, 2009 10:13 am
Reply with quote

Hi,

I have an Input Dataset as follows:

Input:

000001ABCD
000001DFRE
000001FDRE
000002GGTY
000003DERS
000003FRTE

The expected output dataset:

000001ABCDDFREFDRE
000002GGTY
000003DERSFRTE

Is it possible in ICETOOL/ICEMAN/DFSORT? Please help.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jan 28, 2009 4:17 pm
Reply with quote

Hi,

Check if this works:
Code:
//STEP050  EXEC PGM=ICETOOL                 
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG    DD SYSOUT=*                                             
//*                                                               
//IN   DD *                                                       
000001ABCD                                                         
000001DFRE                                                         
000001FDRE                                                         
000002GGTY                                                         
000003DERS                                                         
000003FRTE                                                         
//OUT  DD  SYSOUT=*                                               
//*                                                               
//TOOLIN   DD    *                                                 
SPLICE FROM(IN) TO(OUT) ON(1,6,CH) KEEPNODUPS -                   
 WITHEACH WITH(11,4) WITH(15,4) WITH(19,4) WITH(22,4) USING(CTL1) 
/*                                                                 
//CTL1CNTL DD *                                                   
  INREC IFOUTLEN=80,                                               
    IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,6))),     
    IFTHEN=(WHEN=(81,8,ZD,EQ,1),BUILD=(1,6,7:7,4)),               
    IFTHEN=(WHEN=(81,8,ZD,EQ,2),BUILD=(1,6,11:7,4)),               
    IFTHEN=(WHEN=(81,8,ZD,EQ,3),BUILD=(1,6,15:7,4)),
    IFTHEN=(WHEN=(81,8,ZD,EQ,4),BUILD=(1,6,19:7,4)),
    IFTHEN=(WHEN=(81,8,ZD,EQ,5),BUILD=(1,6,22:7,4)) 
/*                                                   

OUT:
Code:
---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8-
********************************* TOP OF DATA **********************************
000001ABCDDFREFDRE                                                             
000002GGTY                                                                     
000003DERSFRTE                                                                 
******************************** BOTTOM OF DATA ********************************
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top