15 pts.
 Can an AS/400 COBOL pgm have a logical & physical file open and referenced at the same time
In the COBOL program, using calls to IO modules, can the same file be opened with a physical fiile definition and a logical file definition at the same time? Or can it be opened as a physical file and then read by logical key and updated with physical key? Or does the file have to be opened as input, read by logical, closed and then opened as i/o by physical ?

Software/Hardware used:
ASKED: October 9, 2008  8:40 PM
UPDATED: August 21, 2010  9:54 AM

Answer Wiki:
It has been a while since I did Cobol but you can do this by renaming the record format to on of the files. I don't remember the command but redefine sounds right. ======================================================= A COBOL program has no problem opening both a physical file and any or all of its associated logical files. There is no need to rename formats. (I'm not aware of any facility for renaming formats in COBOL, though memory areas may be 'redefined' with additional names. Also, COPY statements may replace text with other text.) Tom
Last Wiki Answer Submitted:  August 21, 2010  9:54 am  by  Oasys66   30 pts.
All Answer Wiki Contributors:  Oasys66   30 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _