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
 

 

How to use SPLICE option for this problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to use SPLICE option for this problem
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 Moderator


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

PostPosted: Wed Nov 22, 2006 9:40 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

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    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 Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 3 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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