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
 
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 Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts Splice more than 50 occurances rajatbagga DFSORT/ICETOOL 1 Wed Oct 11, 2017 9:36 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm

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