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 More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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