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

How to achieve this requirement using SPLICE operator...


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

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Sep 04, 2009 8:24 pm
Reply with quote

Hi,

My input:

Code:

001725282 1 16 AS01
001725282 1 16 NEDS
001748075 1 04 DNEU
001748075 1 04 NEDS
001748075 1 05 AS01
001748075 1 05 DNEU
001748075 1 05 NEDS
001748075 1 05 ASAP


Required output:
Code:

001725282 1 16 AS01 NEDS           
001748075 1 04 DNEU NEDS           
001748075 1 05 AS01 DNEU NEDS ASAP 


Thanks in advance
Regards
R KARTHIK
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Sep 04, 2009 8:50 pm
Reply with quote

I achieved this using following code

Code:

//TOOLIN   DD    *                                                 
SPLICE FROM(IN) TO(OUT) ON(1,14,CH) KEEPNODUPS -                   
 WITHEACH WITH(21,4) WITH(26,4) WITH(31,4) WITH(36,4) USING(CTL1)   
/*                                                                 
//CTL1CNTL DD *                                                     
  INREC IFOUTLEN=80,                                               
    IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,14))),     
    IFTHEN=(WHEN=(81,8,ZD,EQ,1),BUILD=(1,14,16:16,4)),             
    IFTHEN=(WHEN=(81,8,ZD,EQ,2),BUILD=(1,14,21:16,4)),             
    IFTHEN=(WHEN=(81,8,ZD,EQ,3),BUILD=(1,14,26:16,4)),             
    IFTHEN=(WHEN=(81,8,ZD,EQ,4),BUILD=(1,14,31:16,4)),             
    IFTHEN=(WHEN=(81,8,ZD,EQ,5),BUILD=(1,14,36:16,4))               
/*                                                                 
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 Join multiple records using splice DFSORT/ICETOOL 5
No new posts Urgent requirement for MF (Exp - 4 to... Mainframe Jobs 0
This topic is locked: you cannot edit posts or make replies. Splice JCL into one record for DD sta... SYNCSORT 2
This topic is locked: you cannot edit posts or make replies. Splice multiple records into single r... DFSORT/ICETOOL 9
No new posts Relational operator compare date rang... CLIST & REXX 14
Search our Forums:

Back to Top