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



Hi Alan


Have you defined the KMT with the usage parameter? Without using it, the DS is not guaranteed to match the record completely - something like that.


That's basically what the recovery part of the message is telling us.


If that doesn't make sense, come on back and show us the definition of the DS.


Cheers
Vern


On Thu, 28 Mar, 2024 at 4:46 PM, Alan (cfuture) Cassidy <cfuture@xxxxxxxxxxx> wrote:


To: rpg programming on ibm i

I got one here where the compiler thinks the external data structure has no subfields.
In context:
NOTE:
KMT is an externally described data structure based on the same file that the MT data structure ia based on.
CS15L00105 is a logical file based on that same PF, and its only record format is CS15R05K. I want

KMT = MT ;
CHAIN (<Key-field list>) CS15L00105
UPDATE CS15R05K KMT


The Update statement gets this diagnostic error:

Message . . . . : The data structure KMT is not allowed for the operation.
Cause . . . . . : For operation codes CHAIN, READ, READC, READE, READP,
READPE, and UPDATE, the data structure does not consist of the input
fields
of the specified file or record format. For operation code WRITE, the
data
structure does not consist of the output fields of the specified record
format. For operation code EXFMT, the data structure does not consist
of all
the fields fields of the specified record format. The data structure is
ignored.
Recovery . . . : For an input or update operation, define the data
structure using *INPUT or *ALL for the usage parameter of LIKEREC or
EXTNAME. For an WRITE operation, use *OUTPUT or *ALL for the usage
parameter. For an EXFMT operation, use *ALL for the usage parameter.
Compile again.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.