× 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 agreed.  This technique is almost like copy book without compiler
directive.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Cozzi
Sent: Tuesday, August 08, 2006 8:58 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Compiler directive

The only benefit of this style is that you can redefine your prototypes
in multiple source members and avoid name collision. That is, assuming
you also use the /IF NOT DEFINED(procX) in those other source members.
But in my experience, it is a rare exception where defining a prototype
in two or more places is a requirement. In those rare situations, I do
use this technique--but to do it for everything seems like a bit of
overkill and a lot of clutter.

-Bob Cozzi
www.iSeriesTV.com
Ask your Manager to watch iSeriesTV.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, August 08, 2006 8:48 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Compiler directive

Your first example seems to follow the technique outlined by Tommy
Holden in http://archive.midrange.com/rpg400-l/200608/msg00217.html

Your second example looks like a dearth of compiler directives.

I'd say there is a third technique.
 /If not defined (proc1)
 /define proc1
d  proc1          PR 
d   piParm1                     10 
 /Endif
 /If not defined (proc2)
 /define proc2
d  proc2          PR 
d   piParm2                     10 
 /Endif
 /If not defined (proc3)
 /define proc3
d  proc3          PR 
d   piParm2                     10 
 /Endif 

The trick is that they work differently.  With a little understanding
you can appreciate all three.  Don't know as if I would mix the concepts
in a shop though.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/08/2006 09:38 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

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 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.