Hi guys, need a little bit of clarification on how subfiles are handled by the cobol compiler as I am more of a RPG person.
Now heres how the flow is:-
1.) Subfile records displayed
2.) User takes option 2 against a record
3.) A normal record format is displayed with more details
4.) User takes F6 on this screen and a new subfile is displayed which has related information
Now the problem I am facing is, once i return to the first subfile and try to do a rewrite on the subfile record, i get an error (Cobol File Status 24). This is only when i go to the second subfile and come back.
I am guessing this is because I am trying to update a record which is no longer locked? The reason for me to go along these lines is that, in cobol we associate the subfile rrn field to the file rather than individual subfile record formats like in RPG. So this might have reset all the indicators and locks of the first subfile when I do my operations with the second one. Is this correct or the reason might be something else.
Do let me know. If needed i can post the code but the person who has written this program has done an extremely good job of using GOTOs which is currently affecting the flow when we try to add in the new functionalities.
Now heres how the flow is:-
1.) Subfile records displayed
2.) User takes option 2 against a record
3.) A normal record format is displayed with more details
4.) User takes F6 on this screen and a new subfile is displayed which has related information
Now the problem I am facing is, once i return to the first subfile and try to do a rewrite on the subfile record, i get an error (Cobol File Status 24). This is only when i go to the second subfile and come back.
I am guessing this is because I am trying to update a record which is no longer locked? The reason for me to go along these lines is that, in cobol we associate the subfile rrn field to the file rather than individual subfile record formats like in RPG. So this might have reset all the indicators and locks of the first subfile when I do my operations with the second one. Is this correct or the reason might be something else.
Do let me know. If needed i can post the code but the person who has written this program has done an extremely good job of using GOTOs which is currently affecting the flow when we try to add in the new functionalities.
Comment