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
 

 

To concatenate records with same record Id to single Rec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: To concatenate records with same record Id to single Rec
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

Senior Member


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

PostPosted: Wed Jan 28, 2009 4:17 pm    Post subject:
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    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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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