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
I see:
And:
R DCPHYRAnd:
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
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.