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
 
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 Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 6 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

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