NAME of a TEXT FILE IN COBOL ILE

5 pts.
Tags:
COBOL/400
ILE COBOL
I have a text file text01 member of QDDSSRC and a COBOL ILE member of  QCBLESRC. What is the name I need to write in the SELECT IN-FILE ASSIGN TO because I wrote DISK-TEXT01 but when I open it I have the error 35?

Software/Hardware used:
COBOL ILE as/400

Answer Wiki

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

Discuss This Question: 3  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
  • RegnadKcin57
    The File Status 35, FS35, has an associated run-time error message logged, but that was left unstated.  Regardless, the issue is almost surely that no such file TEXT01 exists.  The file is, according to the description, the file QDDSSRC.  The member of that file to be accessed is named TEXT01.  Three may be a way to specify the member name in the ASSIGN clause, perhaps using QDDSSRC(TEXT01) or something similar, but I am not aware.  Here are two potential solutions, according to "redirecting files" in the documentation:

    1> Specify the name TEXT01.  However that means the compiler will not find the file, nor will run-time.  Resolve that by issuing the following CL request prior to both the compile and the call of the program:
      OVRDBF TEXT01 TOFILE(QDDSSRC) MBR(TEXT01) OVRSCOPE(an_appropriate_choice) /* the library name for the TOFILE() defaults to *LIBL, so adjust as appropriate; the appropriate override scope during compile, per ILE, may be different than for run-time */

    2> Specify the name QDDSSRC.  However that still leaves naming the member.  At run-time, prior to calling the program, the following CL request can ensure the proper member is opened when the OPEN occurs:
      OVRDBF QDDSSRC TOFILE(*FILE) MBR(TEXT01) OVRSCOPE(an_appropriate_choice)
    95 pointsBadges:
    report
  • TomLiotta

    I have a text file text01 created in pf QDDSSCR...

    If you have a PF named QDDSSCR, then you cannot "have a text file" in it. A file will not contain another file.

    Instead, TEXT01 will be a member of QDDSSCR. (We'd normally assume that the actual name of the file is "QDDSSRC".)

    Most PFs can have many members. When you open a file with more than a single member, it's usually necessary to tell your program which member first.

    From ILE COBOL Language Reference manual:

    • 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.

    Tom

    125,585 pointsBadges:
    report
  • MDratwa
    What you have is a member in file QDDSRC.  In the COBOL select statement would be the file name.  You would need a CL program (with OVRDBF to the correct member in QDDSSRC (if not the first member)) or put an override statement in the COBOL program (using "QCMDEXC" call) before opening the file.  If you put in an override in the COBOL program, you will not have to code a "DLTOVR" because when the COBOL program closes, the override will be dropped.
    785 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