× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That file doesn't have more than one record format or members?  Not sure, 
but looking at the error message and it seems it may be that it's thinking 
you are chaining to one record format, when you should be using TA930R 
format?  Shot in the dark I may be totally out to lunch here.

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
Tel: 709-576-8132
Email: rpower@xxxxxxxxxx
Website: http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. - 
Sir Winston Churchill




"Rich Dotson" <rich_dotson@xxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
16/12/2004 02:13 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
CPF5123 - 3 key fields not valid.






I am receiving the following CPF message when I am trying to Chain to a 
file:

Message ID . . . . . . :   CPF5123
Message . . . . :   3 key fields not valid.
Cause . . . . . :   The number of key fields specified for member TAP930 
file
  TAP930 in library OSBDATA is greater than 1, which is the maximum number
  allowed.

The file (TAP930) has three key fields defined.  There is only 1 copy of 
this file on the system.   I checked the open files and it had the file in 

the library OSBDATA open.  Here is the DSPFD output:

Number of key fields  . . . . . . . . . . . :              3
Record format . . . . . . . . . . . . . . . :            TA930R
  Key field . . . . . . . . . . . . . . . . :            TFBANK
    Sequence  . . . . . . . . . . . . . . . :            Ascending
    Sign specified  . . . . . . . . . . . . :            SIGNED
    Zone/digit specified  . . . . . . . . . :            *NONE
    Alternative collating sequence  . . . . :            No
  Key field . . . . . . . . . . . . . . . . :            TFREGION
    Sequence  . . . . . . . . . . . . . . . :            Ascending
    Sign specified  . . . . . . . . . . . . :            SIGNED
    Zone/digit specified  . . . . . . . . . :            *NONE
  Key field . . . . . . . . . . . . . . . . :            TFPRODTYP
    Sequence  . . . . . . . . . . . . . . . :            Ascending

Here is the 'F' spec:

FTAP930    IF   E           K Disk

Here is the /Free code where the error is occuring:

Chain (DMBK : CFBRGN : DMType) TAP930;

I checked the fields I am using to chain with (DMBK, CFBRGN and DMType) 
and 
they have the same attributes as the fields in TAP930.    I did an EVAL on 

each of the fields while in debug and they all contained valid data that 
matched a record that exists in TAP930.  There are no overrides in the 
job.

What else would cause the CPF5123 error?

Thanks,
Rich...

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 

http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.