COBOL/400, DB2/400

555 pts.
Tags:
COBOL/400
DB2/400
Hi Group,

I have a Physical file. It has 3 members, memb1, memb2 and memb3. In my cobol/400 program i need to access all the 3 members and put data into them. What is the select statement for the multimember PF? How to declare the file section for multi member PF?

TheĀ  COBOL/40o pgm should be written in such a way that based on condition1 i need to write data into memb2. BAsed on another condition i need to write data into memb3.

How to do this??

Please help in this regard.

Regards,

M



Software/Hardware used:
COBOL/400.

Answer Wiki

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

Have you tried OVRDBF, giving a different name to each different member and using those names in your COBOL program?

Glad Tom (and IBM – LOL) agrees with me.

Discuss This Question: 4  Replies

 
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
  • CharlieBrowne
    Or have you tried creating a LF of the file and including all 3 members?
    41,380 pointsBadges:
    report
  • mvrkrishna
    I did not use OVRDBF or Logical file. Is there any other way to handle this? For example: In RPG we can specify the member name in the file declaration. Do we have the similar concept in COBOL/400??
    555 pointsBadges:
    report
  • TomLiotta
    From the i 7.1 Information Center, ILE COBOL Language Reference, the File Name topic says:
    • For database files, the member name cannot be specified in the program. If a member other than the first member is to be specified, the Override with Database File (OVRDBF) CL command must be used at execution time to specify the member name.
    You need to run a OVRDBF command either before calling your COBOL program or in your COBOL program before opening the file. COBOL is not controlled by IBM as much as RPG is. Putting extensions into the COBOL language probably takes more effort, so this kind of detail isn't put in unless a number of customers request it. (Just a thought of mine.) Tom
    125,585 pointsBadges:
    report
  • mvrkrishna
    [...] 10. Check out TomLiotta’s approved answer on COBOL/400 and DB2/400. [...]
    0 pointsBadges:
    report

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