|
For one, you only bring in the procs you need, two it's self documenting what you are getting out of the copybook, three you can use /undefine afterward to prevent the same proc definition from being pulled from another copybook. Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Sent: Tuesday, August 08, 2006 9:19 AM To: RPG programming on the AS400 / iSeries Subject: RE: Compiler directive Can you be more specific on what it saves me from? Generally speaking, you should try not to have duplicate export procedure in the system. If this is the rule, then what would it saves me from? -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Holden Tommy Sent: Tuesday, August 08, 2006 9:15 AM To: RPG programming on the AS400 / iSeries Subject: RE: Compiler directive Since I use the first solution in my shop the only con I see is have to add all the /define statements, but that is also what saves you in the end.... Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Sent: Tuesday, August 08, 2006 9:13 AM To: RPG programming on the AS400 / iSeries Subject: RE: Compiler directive Let me be a bit more specific: Let say I've a program that needs to use proc1 and proc3 of MYSVC service program, the first method will allow me to copy just the proc1 and proc3 prototypes that I needed but it requires three line of code to do the copy: /Define proc1 /Define proc3 /Include Qrpglesrc,MYSVCPRO The second method only requires one statement but the proc2 prototype will also be included: /Include Qrpglesrc,MYSVCPRO Any pros and cons for the above two? -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Sent: Tuesday, August 08, 2006 8:38 AM To: RPG programming on the AS400 / iSeries Subject: RE: Compiler directive
From everyone's reply, seems like /if does not allow testing condition
with 'or/and'. Thanks. Can I take a poll on how you structure your prototype copy book of service program that contains more than one export procedures: Do you do this: /If defined (proc1) d proc1 PR d piParm1 10 /Endif /If defined (proc2) d proc2 PR d piParm2 10 /Endif /If defined (proc3) d proc2 PR d piParm2 10 /Endif Or do you do this: d proc1 PR d piParm1 10 d proc2 PR d piParm2 10 d proc2 PR d piParm2 10 -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Is there a way to test for two conditions in the /if defined() statement? Something like below: /If defined(Copy_proc_prototype) or defined(Copy_SRVPGM_Prototype_All) -- 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. -- 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.
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.