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

How to use SPLICE option for this problem


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

New User


Joined: 01 Nov 2006
Posts: 9

PostPosted: Wed Nov 22, 2006 9:08 pm
Reply with quote

I have records in a input file as

Code:

1111111111 ABC 1234.50
1111111111 DEF 5678.90
1111111111 GHK 6789.90
2222222222 ABC 1234.50
2222222222 DEF 5678.90
2222222222 GHK 6789.90


fIRST ten characters are key 1111111111
sencond field is of 3 chars ABC
third filed is of 7 chars 1234.50
and I want output as

Code:

1111111111 ABC 1234.50 DEF 5678.90 GHK 6789.90
2222222222 ABC 1234.50 DEF 5678.90 GHK 6789.90


Can I do this with ICETOOL Using SPLICE? Kindly give me the JCL code to do this

Thanks
Venkata Perumala
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 22, 2006 9:40 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE. You won't get the correct results without the April, 2006 PTF. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/22)
//OUT DD DSN=...  output file (FB/46)
//TOOLIN DD *
 SPLICE FROM(IN) TO(OUT) ON(1,10,CH) -
   WITHEACH WITH(24,11) WITH(36,11) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,
     OVERLAY=(47:SEQNUM,8,ZD,RESTART=(1,10))),
   IFTHEN=(WHEN=(47,8,ZD,EQ,+2),
     BUILD=(1,10,24:12,11)),
   IFTHEN=(WHEN=(47,8,ZD,EQ,+3),
     BUILD=(1,10,36:12,11))
  OUTFIL FNAMES=OUT,BUILD=(1,46)
/*
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts CICS vs LE: STORAGE option CICS 0
Search our Forums:

Back to Top