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



On 8/25/2016 7:54 AM, Jonathan Mason wrote:

I have a program that has been modified to replace a file defined for
output with a different file as shown in the following F-specs:

FF0011 O E Disk JDE1
F ExtDesc('F0011PF') ExtFile(*ExtDesc)
..
However, when I attempt to compile the program I receive an RNF7030
Undefined field error for every field from the file that is being
populated. ...

If I change the specification for F03B13Z1PF to be Input with Add and
force the import of the field definitions then the program compiles
normally.

RPG has a "feature" where it only generates the O specs for a record if the record appears on a WRITE statement, or if there are any subprocedures in the module. If it's an output only file, the fields get defined when the O specs get generated.

(I'm never sure if this feature was intended as an optimization, or if it was more of an oversight when RPG first got externally-described files back in System-38 days.)

If you don't want to add a WRITE operation to the record, you could add an O spec for the record:

OmyFmt e

or a blank P spec:

P

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.