Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Mon Aug 18, 2008 10:40 am Post subject:
shashank.sharma,
The following DFSORT JCL will give you the desired results. We create 3 symbols from file1 and later use them to populate the file 2 records. The first constant 'AAA' is updated on the first record of file 2 and the second constant 'BBB' is updated on the second record of file 2 and the third constant 'CCC' is updated on the third record of the file2 and the cycle repeats for every 3 records till the end of the file. I assumed your file is FB recfm and 80 bytes in length
You commented out the T1 data set, so you are using the T1 SYSOUT. That won't work because the job is writing to T1 and reading back from T1. When you try to read back from the T1 SYSOUT data set, you get the S001 ABEND. You need to use the T1 data set instead of the T1 SYSOUT.
However, once you fix that you'll find that what you're trying to do with SPLICE won't work. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Last edited by Frank Yaeger on Mon Aug 18, 2008 4:36 pm; edited 1 time in total
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Mon Aug 18, 2008 4:32 pm Post subject:
rajen wrote:
Hi Kolusu,
It may sound like strange question but i am trying accomplish the same using SPLICE operator. Below is the jcl i have tried but it abends.
Could you please guide me where I am doing wrong?
Rajen,
Sigh! Did you even notice that you commented the temp file T1 declaration and are routing the records to sysout? You are getting an abend when the splice is trying to read the dataset t1 and t1 is a sysout dataset.
And what are you trying to accomplish here? Do you just want the contents of file1 to be populated in the first 3 records?
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Aug 18, 2008 6:40 pm Post subject:
Quote:
However, Is there a way to achieve the same results using SPLICE operator?
Kolusu showed you a very efficient way to do what you asked for.
If you could achieve the same results with SPLICE, it would require a copy pass of file1, a copy pass of file2, and a sort pass of file1 + file2. This would be less efficient than Kolusu's method which only requires a copy pass of file1 and a copy pass of file2 without the sort pass.
Please explain why you want to do this with SPLICE instead of the more efficient way Kolusu showed you. If we understood what you were trying to accomplish and why you thought you needed to use SPLICE, then maybe we could help you accomplish it or understand why SPLICE isn't the best way to do it. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Well Frank,
I totally agree with you that Kolusu's solution is best tuned as always...
When I saw this post, All I was trying to do is trying different method to achieve the same result. It was just an attempt to look at things differently.
So with this data I could think of only 1 SPLICE option. I had no specific requirement to achieve the same with SPLICE but as I said before I was trying accomplish same using different method.
It was in the best interest of providing different methods for solution and I really apologize if it meant anything different.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum