I have a requirement where i have header records, trigger records and trailer record.
Trigger records have different triggers along with customer IDs.
My requirement is i have to separate triggers with values 41 and 42 (There are triggers with values 10 to 42) sort by Customer ID and eliminate triggers which have same customer ID for 41 and 42.
What i have planned is
1. Separate the headers and trailers.
2. Separate records with other than 41 and 42 into one file
3 .Separate records with 41 and 42 into one file, sort by customer id and sum fields = none.
4. Now my problem is how do i update the correct trailer count when i am merging back the files.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
It might help if you post a few sample input records showing relevant fields and the expected output using "Code" tags.
Also the sort product version info which could be found in your SYSOUT.
Input/Output file attributes.
Starting position,length and format of relevant fields.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
surya anem,
Which sort product you are having? DFSORT? Syncsort? Or something else?
Quote:
The trigger records have triggers (41,42) in teh position 74 and length of 4 bytes
If you're planning to achieve it using your sort product, it requires the knowledge of the 'format' of the fields. How does '41' and '42' occupy 4 bytes? Mention the starting position,length and format of all relevant fields.
Are you trying to split the file into two based on the 'trigger' value - One file having 'trigger' 41/42 and the other with the rest with header and trailer records in both the output files?
Assumptions:
1) File length is 730
2) The value 0041 and 0042 is present in position 74, length 4
3) Maximum records in the file - 999999999
4) the customer id is in position 81, length 10
Note:
1) field in bold has 0041 & 0042
2) field underlined is Customer id
Hi Arun,
I provided the sort card to OP initially and since you sugggested that:
Quote:
May be not. The sort card posted above may create different output during multiple runs for the same input data
So I wanted your opinion on the sort card and if it is wrong then we would definitely require your help in correcting it so that we could find the correct solution for the problem
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Your solution does NOT have the EQUALS parameter without which the order of records having equally keyed control fields can be unpredictable. You may not get the same output records for different runs with the same input