Thanks, Kolusu. The descriptions are coming correctly.
Additionally, I have incuded logic to remove records which are not having error records. Its easily done and adjuted header record too. Iam trying to find the missing 2nd character in the resultant file.
Code:
fileA no date ind msgcod msg1
100054,000, ,20070503,N, BBBB ,a1hieved ydt
100054,000, ,20070503,N, AAAA ,k2256 is missing
100054,000 ,20071503,N, CCCC ,r2sult set to NO
2ND CHAR - 1,2,2 ... i understood the logic. I will try for it.
my reqd format in my post is below :
Code:
9----+----0----+----1----+----2----+----3----+-
fileA no date ind msgcod msg1
100054,000, ,20070503,N, BBBB ,achieved ydt
AAAA ,k1256 is missing
100054,000 ,20071503,N, AAAA , k1256 is missing
CCCC , result set to NO
i.e. If Error message is repeatetive then entire record should be written only once and error message and error code alone are written for the repeatetive valid occurence of error.
By matching "file-a" field am trying to move spaces for more than one occurence of detail record and write only error code and error description. you can also provide if you have any easier option than this.
Thanks, Kolusu. My requirement is satisfied now, though one concern.
But Iam getting the following order.
Code:
AAAA ,k1256 is missing
100054,000, ,20070503,N, BBBB , achieved ydt
CCCC , result set to NO
100054,000 ,20071503,N, AAAA , k1256 is missing
I tried to do sorting. either it arranges by spaces or thru ascending order of file-a fields... the logical result is fine. But the display should be like required format. Iam bit confused to re-arrange it so that first line contains detailed followed by repeatetion of messages.
New record should start at the begining and then followed by its own messages.
required :
Code:
100054,000, ,20070503,N, BBBB ,achieved ydt
AAAA ,k1256 is missing
100054,000 ,20071503,N, AAAA , k1256 is missing
CCCC , result set to NO
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Fri May 25, 2007 6:06 pm Post subject:
radkrish,
Please post your JCL - we would like to see if you changed something which affected the sort sequence. I believe that Kolusu's control cards would work the way you want.
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue May 29, 2007 2:17 pm Post subject:
Quote:
you are right! i followed your previous code. As I was concentrating much on control card 2 for this problem, I didn't check 3.
Now it works well, Kolusu.
Thanks for all your replies.
Rakrish,
My shop has defaulted to OPTION EQUALS. So I never had to code it explicitly. So I keep forgetting to code it. I only look into the code when someone complains that it is not working.
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Wed May 30, 2007 6:38 am Post subject:
Quote:
Sorry kolusu
The scenario is like Left outer join.
For the same kind of requirement i got this from this forum only
jajularamesh,
I was aware of the JOIN feature of syncsort, but I was wondering about the left outer join. Even with join feature you would still need 2 passes of the data. DFSORT does NOT support join feature and radkrish has only DFSORT at his shop.
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