I/O considerations for files shared in a job
The system uses the same input/output area for all programs sharing the file, so the order of the operations is sequential regardless of which program does the operation.
For example, if Program A is reading records sequentially from a database file and it reads record 1 just before calling Program B, and Program B also reads the file sequentially, Program B reads record 2 with the first read operation. If Program B then ends and Program A reads the next record, it receives record 3. If the programs were not sharing the file, Program A would read record 1 and record 2, and Program B would read record 1.
For device files, the device remains in the same state as the last I/O operation.
For display and ICF files, programs other than the first program that opens the file can acquire more display or program devices or release display or program devices already acquired to the open data path. All programs sharing the file have access to the newly acquired devices, and do not have access to any released devices.
Parent topic:
Shared files