Hi,
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
1122334455AA01 2010000000000011100
1122334455AA01 2011000000000222200
1122334455AA01 2012000000000333300
1122334455AA01 2013000000000044400
1234567890BB02 2010000000000055500
1234567890BB02 2012000000000666600
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
2010 16-30
2011 32-46
2012 48-62
2013 64-78
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?
Kind regards,
Mike