OUTREC with a searched value?
Posted: Thu Aug 13, 2015 12:47 pm
Hi All,
my INPUT is a fixed lenght file. The records contain a table occurs 4 times:
code pic 9(3)
myvalue pic x(2)
in OUTPUT if the code = 001 i need the text value, when other i need zero. I know the position of the table into the record, but I don't know the position of the 001 code into the table.
Example of input file:
..001AA007BB003DD009AA...
..008CC002CC001BB007DD...
..003DD005AA002CC006BB...
Example of the output that i want:
...AA..
...BB..
...00..
Question1: in your opinion, how can I do it?
Question2: in my sort I already have an OUTREC to format the other part of the output record, may I do all this at once in the same step of my outrec or i must create a new step?
Please, help me, thank you
my INPUT is a fixed lenght file. The records contain a table occurs 4 times:
code pic 9(3)
myvalue pic x(2)
in OUTPUT if the code = 001 i need the text value, when other i need zero. I know the position of the table into the record, but I don't know the position of the 001 code into the table.
Example of input file:
..001AA007BB003DD009AA...
..008CC002CC001BB007DD...
..003DD005AA002CC006BB...
Example of the output that i want:
...AA..
...BB..
...00..
Question1: in your opinion, how can I do it?
Question2: in my sort I already have an OUTREC to format the other part of the output record, may I do all this at once in the same step of my outrec or i must create a new step?
Please, help me, thank you