|
If you have a common routine or declaration, you can put the /copy in multiple members. It will not compile the code if the defined name is already defined. /IF NOT DEFINED(APIDS) /DEFINE APIDS ************************************************************* * Definition for error code data structure ************************************************************* * Api Error Data Structure (Copy of QUSEC, but renamed) D ApiErr DS D AeBytesProv 10I 0 Inz(%Size(ApiErr)) D AeBytesAvl 10I 0 D AeMsgId 7A D AeErrNum 1A D AeMsgDta 256A /ENDIF You could use this (as I do) in multiple copy members. Once the compiler loads it once, it will skip it from there after. John Brandt -----Original Message----- From: Richard B Baird [mailto:rbaird@xxxxxxxxxxxxxxxxxxxxx] Sent: Friday, June 13, 2003 4:50 PM To: RPG programming on the AS400 / iSeries Subject: /if, /define, binder language Bob, I'm a little fuzzy on the /IF and /DEFINE declarations. I remember seeing them discussed before, and I think they have something to do with optionally defining portions of a copybook to your program...... am i right? what does it buy you other than the memory needed to define these specific specs? by defining all prototypes of a SP to your program, does it bind all functions from the SP even if you don't use them? in otherwords, if you have 20 functions in a service program with an associated prototype copybook, and you include the entire copybook in your main module, does it bind all functions to the program? and conversely only including the prototypes of the functions you actually use cause only those functions to be bound to the program? or not? ;) thanks, Rick -------original message---------- <snip> /IF NOT DEFINED(STREAM_FILES) /DEFINE STREAM_FILES D fOpen PR * ExtProc('fopen') D fileName * Value Options(*STRING) D fmode * Value Options(*STRING) D O_READ_ONLY C Const('r') _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.489 / Virus Database: 288 - Release Date: 6/10/03 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.489 / Virus Database: 288 - Release Date: 6/10/03
As an Amazon Associate we earn from qualifying purchases.
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.