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



I have taken over development of some programs which were designed to use copybook members to define a data structure and allow me to segment a flat file into fields to be written to a database file. I have a multi-member copybook with the following:

/If Defined(Include_dsFileFormat)
D dsFileFormat DS 300

D field names go here

/EndIf

There are a smattering of program examples which include code such as:

/If Not Defined(Prototype)
H NoMain Option(*NoDebugIo:*SrcStmt)
/EndIf

/Include COPYBOOK

/If Defined(Prototype)
/EOF
/EndIf


The author is not available to me at the moment and other programmers in the area have not seen this type of process. If I remove the /If Defined() statements from the copybook, the program compiles properly, but if I leave them in, I get a compile listing showing that each of the member elements was excluded.

What would be the proper method of coding my RPG main program so that the copybook would pull in only the element described?


Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Nashville, TN



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.