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



Reggie,

The downside to that is that your program becomes full of both DEFINE and
COPY statements. If you include the IF NOT DEFINED, DEFINE and ENDIF
statements into the copybook, your program is much neater, since it only
includes the COPY statements - all the definition stuff is hidden within
each copybook.

Of course, this only really works if each copybook is granular enough to
contain a single definition (or at least a set of related definitions)
- that's the way we have it set up. To make it easier to comprehend, when
the program source is compiled, a compile preprocessor runs and changes each
/COPY line as follows

/COPY,QRPGLESRC CPYMBR1 Member text

where Member text (which starts at position 50) is the text for the CPYMBR1
source member. Here's an example:

D/COPY QRPGLECPY,XCMD_P XCMD prototype
D/COPY QRPGLECPY,Y1I1DSP *FILE FilDS File informati
D/COPY QRPGLECPY,Y1PGDSP PSDS definition (including
D/COPY QRPGLECPY,SYSTEM system() prototype
D/COPY QRPGLECPY,QCAPCMD_P Execute a command (QCAPCMD
D/COPY QRPGLECPY,QCMD_P Command processor (QCMD) p
D/COPY QRPGLECPY,QUSRJOBI_P Retrieve Job Information

That way, even if the copybook member name isn't particularly meaningful,
the text will give more information.

Rory

On 8/1/07, Reggie Acosta - El Monte <racosta@xxxxxxxxxxxxxxx> wrote:

Robert,

Add /DEFINE compiler directive before the /INCLUDE COPYBOOK directive as
follows:

/DEFINE Include_dsFileFormat
/INCLUDE COPYBOOK

HTH,
Reggie Acosta

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.