Hi There,
I have one issue. Program is writing into PF with incorrect RRN.
This is what it is happening.
My PF has only 2 fields... Customer No (6 Char) & Comments (70 Char).
RPGLE program takes the input for Comment (Char 70) field only and writing into this file. In this program user is adding comments to the existing customer then RPG chains with entered customer no and delete all existing records firstly and then write all input value i.e. present in comment field from screen in to mentioned PF.
Now what is happening is when multiple comments are present on screen then while writing into PF it should write with next RRN, so if first record written with RRN (123) then next record should get written with RRN (124) ideally however second record is writing with RRN 122 therefore comments lines are misplacing when it gets read subroutine to display on screen.
For example..
User input on screen like below..
Comment line 1
Comment line 2
Comment line 3
It writes in PF
RRN Comment
123 Comment line 2
124 Comment line 1 -> while writing this was the first record gets written in PF
125 Comment line 3
This when I read this file to show user comments on screen then Comment line 2 shows first then Comment line 1 and so on.. thus sequence is misplaced while displaying them on display screen.
I tried to RGZPFM but did not work.
Is there a way to this issue... Please let me know.
Thanks,
NIL
I have one issue. Program is writing into PF with incorrect RRN.
This is what it is happening.
My PF has only 2 fields... Customer No (6 Char) & Comments (70 Char).
RPGLE program takes the input for Comment (Char 70) field only and writing into this file. In this program user is adding comments to the existing customer then RPG chains with entered customer no and delete all existing records firstly and then write all input value i.e. present in comment field from screen in to mentioned PF.
Now what is happening is when multiple comments are present on screen then while writing into PF it should write with next RRN, so if first record written with RRN (123) then next record should get written with RRN (124) ideally however second record is writing with RRN 122 therefore comments lines are misplacing when it gets read subroutine to display on screen.
For example..
User input on screen like below..
Comment line 1
Comment line 2
Comment line 3
It writes in PF
RRN Comment
123 Comment line 2
124 Comment line 1 -> while writing this was the first record gets written in PF
125 Comment line 3
This when I read this file to show user comments on screen then Comment line 2 shows first then Comment line 1 and so on.. thus sequence is misplaced while displaying them on display screen.
I tried to RGZPFM but did not work.
Is there a way to this issue... Please let me know.
Thanks,
NIL
Comment