Created On: 28 March 2012
Problem:
Is there a way for one program (Program A) to open files, accept input from a screen, then call a second program (Program B) for file processing without Program A closing the files and Program B reopening files?
Resolution:
Declaring the file FD as external in both programs accomplish the desired task:
FD custom-file external.
01 custom-record ....etc
This way the file can be opened and closed in ProgramA and read, write, etc. in ProgramB. ProgramB can not open again the file because it will generate an error.
FD custom-file external.
01 custom-record ....etc
This way the file can be opened and closed in ProgramA and read, write, etc. in ProgramB. ProgramB can not open again the file because it will generate an error.
Incident #2191524
Old KB# 35719