Can an AS/400 COBOL pgm have a logical & physical file open and referenced at the same time

15 pts.
Tags:
COBOL
Logical Files
Physical File
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 ?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following