385 pts.
 Why this error code in COBOL program: CPD7914
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...

Software/Hardware used:
ASKED: March 24, 2011  6:00 PM
UPDATED: March 25, 2011  2:08 PM

Answer Wiki:
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.
Last Wiki Answer Submitted:  March 24, 2011  6:45 pm  by  CharlieBrowne   32,825 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,825 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

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

 107,985 pts.

 

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.

 645 pts.