I hope someone can help me with my dilemma. I have a sequential file that is fixed blocked and lrecl=34.
In position 1-15 you find the key. In position 16-19 there is year and position 20-34 is a numeric fieldvalue.
Here's the layout of the file
What I want is that for all unique keys (containing max 4 records in the file) take the value in the record from position 20-34 and put it in a new output record with the condition that if value in position 16-19 should land in:
Value in pos 16-19 Output file position
So the output file (lrecl=79,recfm=fb) should look like this if you use the six records in the input file above:
1122334455AA01 000000000011100 000000000222200 000000000333300 000000000044400
1234567890BB02 000000000055500 000000000666600
Is it possible to accomplish this?