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



Robert,

For definitions that will only appear in a source member once (i.e. not
several times, locally within each subprocedure, for instance), I use the
following format:

/IF NOT DEFINED(xyz)
/DEFINE xyz
/COPY,QRPGLESRC other members
d-specs here
/ENDIF

If there is a structure which I want to define locally in several different
subprocedures, I use the following:

At the global level, I include the following:

/COPY,QRPGLESRC,xyz

and at the procedure level, I include the following:

/COPY,QRPGLESRC,xyz_L ("L" stands for Local)

where xyz is as follows

/IF NOT DEFINED(xyz)
/DEFINE xyz
/COPY,QRPGLESRC xyz_L
/ENDIF

and xyz_L is as follows:

/IF NOT DEFINED(xyz_L)
/DEFINE xyz_L
d-specs here
/ENDIF

Typically the definition-token ('xyz', 'xyz_L') is the name of the source
member. I'd really like IBM to allow the following nomenclature:

/IF NOT DEFINED(*MBR)

where *MBR is the name of the source member. But they don't...

Rory

On 8/1/07, Robert Munday <rwmunday@xxxxxxxxxxxxx> wrote:


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

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.