View previous topic :: View next topic
|
Author |
Message |
raki_new
New User
Joined: 10 Feb 2009 Posts: 26 Location: chennai
|
|
|
|
hi all,
i have a PS file which has records with indicators 'A ' & 'AB'. i need to write 2 seperate headers for these 2 sets of records in the report. the thing is that the file has first all 'A ' records and then followed by all 'AB' records. so first we have to write a header for 'A ' records and the when it encounters a 'AB' record, it must write another header and then continue with the report. how to do this funtionality. kindly help me.
example of the input file:
Code: |
001A 1111111111111111111111
002A 1111111111111111111111
003A 1111111111111111111111
004A 1111111111111111111111
005A 1111111111111111111111
001AB1111111111111111111111
002AB1111111111111111111111
003AB1111111111111111111111
004AB1111111111111111111111
005AB1111111111111111111111 |
thanks,
Raki |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
In working-storage define a "hold" indicator.
In the procedure code, read a record and if the input indicator is not = the hold indicator write the header and move the input indicator to the hold indicator. Write the report. Continue until end of file. |
|
Back to top |
|
|
|