Joined: 24 Dec 2002 Posts: 32 Topics: 6 Location: U.K
Posted: Mon May 23, 2005 11:21 am Post subject:
Yes, you have got it right, I want the output records to be ordered according to the key. _________________ "Hold fast to dreams, for if dreams die, life is a broken winged bird that cannot fly."
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon May 23, 2005 1:04 pm Post subject:
Naren,
Here's a DFSORT/ICETOOL job that will do what you asked for. You'll need DFSORT's Dec, 2004 PTF to use the new IFTHEN, OVERLAY, KEEPBASE and VLENOVLY functions.
_________________ 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
On using the SPLICE from T3 to OUT, I am not getting the expected result. Cols 5 & 6 in OUT contain XX, 1X AND 2X. In CTL5 you have mentioned 2X, 11 and 22. It would be extremely helpful if you can verify my T3 file and let me know if I have done some mistake in my analysis.
Thanks,
Naren _________________ "Hold fast to dreams, for if dreams die, life is a broken winged bird that cannot fly."
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue May 24, 2005 5:29 pm Post subject:
Naren,
What you're saying makes no sense to me. You say "On using the SPLICE from T3 to OUT, I am not getting the expected result". But you also say you don't have the Dec, 2004 PTF installed yet. So how can you be running the SPLICE operator when it uses KEEPBASE and VLENOVLY which you can't use yet because you don't have the PTF?
You told me in an earlier post that your "key" starts in position 25, is 8 bytes long and consists of these four fields:
represents, but it doesn't look like the keys you described and for which the job is set up.
Also, T3 is a MOD data set used as the output for TWO operators. I have no idea which operator your T3 records resulted from. Again, if it's the output of the SPLICE operator, how did you use KEEPBASE and VLENOVLY when you don't have the PTF installed yet?
I don't really understand what it is you're doing or what you want me to analyze. I tested the job using input I created based on what you told me about the input. The job gave the expected output. If you want me to try the job with different input, you're going to have to supply that input in its exact form to me. _________________ 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
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue May 24, 2005 5:38 pm Post subject:
Naren,
BTW, I assumed that your 8-byte key starts in position 25 counting the 4-byte RDW. That is, it looks like this:
Code:
1 5 25
|RDW|......|key|
|-4-|--20--|-8-|
If it really starts in position 29 when counting the RDW and looks like this:
Code:
1 5 29
|RDW|......|key|
|-4-|--24--|-8-|
then I'd have to adjust the job for that difference. _________________ 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
Joined: 24 Dec 2002 Posts: 32 Topics: 6 Location: U.K
Posted: Wed May 25, 2005 3:41 am Post subject:
Frank,
I was trying to understand the code which you had given me. Since you have used some new functions, I had looked for them in the Application Programming Guide and tried to understand what exactly they are doing in code you gave me. And since the PTF is not yet installed, I tried to figure out the output manually (On Paper). (i.e by writing down some input records, then figuring out what each step was doing and writing the output from each step)
The key which i mentioned is right and it starts from 25 (excluding the RDW, but that we had figured out) i.e
The output which I had mentioned is the resultant of the both the operators SELECT and SPLICE.
But as you say you got the right ouput (Unique records from File1 + Unique Records from File2 + Records common in both, but taken from File2), I might have done some mistake while analysing the code manually. I will try the code when the PTF gets installed on 29th.
Thanks for your help,
Naren _________________ "Hold fast to dreams, for if dreams die, life is a broken winged bird that cannot fly."
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed May 25, 2005 10:12 am Post subject:
Yes, I used the X'01' in position 5 as the indicator that a new group was starting. _________________ 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
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue May 31, 2005 10:07 am Post subject:
Thanks for the feedback. I'm glad I could help. _________________ 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
Joined: 24 Dec 2002 Posts: 32 Topics: 6 Location: U.K
Posted: Thu Jun 02, 2005 11:17 am Post subject:
Frank,
There is one more interesting development that has come in my requirement. I have a workaround for that, but i was just wondering if it can be possible using DFSORT. So, if u can help us out it would be great.
The orinal req. is same but with one more addition. The addition is that when we are merging the 2 files, giving priority to records from file 2(which are also present in file 1), we need to extract some info (a date field) from the record in File1 and overlay it on the same record from file 2, and put it in the output file. If this is confusing, here is an example which explains it....
As you can see above Pol2 was common in both but taken from File2, and only the date has to be taken from Pol2 record from file1. So in the Output file, date4 was replaced by date2 for Pol2 record. As you can see above, date is not present in the ROOT record but in the next record.
The date field is defined as PIC S9(4) COMP and the Position is 56 (excluding RDW).
Thanks,
Naren _________________ "Hold fast to dreams, for if dreams die, life is a broken winged bird that cannot fly."
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jun 02, 2005 11:54 am Post subject:
So you want the date from the X'02' record in file1 for matching groups? Can it be the entire X'02' record in file1, or does it have to be just the date from the X'02' record in file1 and the rest of the fields from the X'02' record in file2? _________________ 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
Joined: 24 Dec 2002 Posts: 32 Topics: 6 Location: U.K
Posted: Thu Jun 02, 2005 12:31 pm Post subject:
It has to be just the date from the X'02' record in file1 and the rest of the fields from the X'02' record in file2 for the matching group only. _________________ "Hold fast to dreams, for if dreams die, life is a broken winged bird that cannot fly."
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jun 02, 2005 1:15 pm Post subject:
Naren,
I think I've come up with a way to do it, but it will take me a little time to work it out. I'll post the solution later today. _________________ 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
_________________ 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
Joined: 24 Dec 2002 Posts: 32 Topics: 6 Location: U.K
Posted: Mon Jun 06, 2005 6:28 am Post subject:
Hi Frank,
Thanks again for all the help. It is also working perfectly, but had to modify it slightly to get the records in the same order as in the input file. (I used the sequence number in sort rather then the Binary values).
Cheers,
Naren _________________ "Hold fast to dreams, for if dreams die, life is a broken winged bird that cannot fly."
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
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