Why this error code in COBOL program: CPD7914

385 pts.
Tags:
AS/400 errors
COBOL
COBOL/400
Need help getting pass this error message. using this input file definition * Beginning of data *****************************   R DCREFR                                           DCCODE         3          ALIAS(DC_CODE)         DCMEANING     50          ALIAS(DC_MEANING)  Which is called by this DSS file definition:                                         UNIQUE                                                     REF(DCREF)                     R DCPHYR                                                     DCCODE    R                                                DCMEANING R                                              K DCCODE                                        A*     DCPHY                                               A          R RDCPHY                                        A            DCCODE         3          TEXT('Dccode')      A                                      COLHDG('Dccode')    A                                      ALIAS(DCCODE)       A            DCMEANING     50          TEXT('Dcmeaning')   A                                      COLHDG('Dcmeaning')  A                                      ALIAS(DCMEANING)    A          K DCCODE                                       and a file defined in the COBOL source code as:  SELECT  CODE-FILE     ASSIGN        DATABASE-DCPHY                                  ORGANIZATION  INDEXED                                         RECORD KEY    EXTERNALLY-DESCRIBED-KEY                        ACCESS        DYNAMIC.                 From the Data Division:  FD  CODE-FILE.                     01  CODE-RECORD.                       COPY DDS-ALL-FORMATS OF DCPHY. Gets me this error message: That I'm messing the meaning of  Message ID . . . . . . . . . :   CPD7914 Message . . . . :   File contains more than one record.                       Cause . . . . . :   A physical file or a join logical file must contain only    one record.                                                                 Recovery  . . . :   Change the file to contain only one record. Then try the    request again.   Thanks for any help...

Answer Wiki

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

You should not need the ALIAS keyword since it is the same as the field name.
I get an error when I try to create a PF like that.

Discuss This Question: 2  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
  • TomLiotta
    I see:
      R DCREFR
    And:
                R DCPHYR
    And:
     A          R RDCPHY
    It seems likely that DCPHYR uses DCREFR for reference, though it's not certain from how the question is organized. It's not clear at all how RDCPHY is related to either of the others nor how DATABASE-DCPHY is related to the three potential DDS source items. (It looks as if DATABASE-DCPHY relates to RDCPHY, but I can't be certain.) What we need to see is the file description object. The DDS source isn't useful for this. Run DSPFD FILE( DCPHY ) TYPE(*RCDFMT) and show us the record format portion of the output. That should give us some info about what the system sees. Tom
    125,585 pointsBadges:
    report
  • MDratwa
    try something like this: FD CODE-FILE. 01 RECORD-DCPHYR. COPY DDR-DCPHYR OF DCPHY. 01 RECORD-RDCPHY. COPY DDR-RDCPHY OF DCPHY. DDR - will replace any non-COBOL chars (check with COBOL manual for complete description of copy DDS options. The 2 "01"s gives a way to handle the different record formats.
    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