|
Hi John,
CUGLS001_getLastPeriod() CUGLS001_getLastClosedPeriod() CUGLS001_getPeriodStatus() CUGLS001_getPeriodStatusDesc()
This is much easier to read than your abbreviations, IMHO.
Once I load them up with meaningful parameters:
statusText = CUGLS001_getPeriodStatusDesc( currentCompany: CUGLS001_getLastClosedPeriod( currentCompany ));
I quickly end up in a mess of continuation lines, making the code difficult to follow.
For example:
CUGLS001_getPeriodStatusDesc( currentCompany
: periodName
: periodStatusDesc
: someOtherParm ); CUGLS001_getPeriodStatusDesc( ThisYear(periodNo).CompanyName
: ThisYear(periodNo).periodStatusDesc ); CUGLS001_getPeriodStatusDesc(
ThisYear(periodNo).CompanyInfo.CompanyName
: ThisYear(periodNo).PeriodStatus.Description );I've thought about using procedure pointers to create a shorter alias name within the consuming source member. This would allow me to keep the "CUGLS001" prefix in the main service program, and simply drop it in those 99% of situations where "getLastPeriod()" itself would not create a naming conflict.
D getLastPeriod PR ExtProc('CUGLS001_GETLASTPERIOD')
D parm1 1A
D parm2 1AUnfortunately, RPG doesn't offer us a "LikePrototype" keyword, so I then end up having to maintain multiple versions of the same procedure prototype; one for the service program proper, and another for each aliased procedure name.
I'm now looking for fresh ideas. What are the rest of you doing to tackle this problem?
Mainly, just three things:
a) Use free format RPG.
b) If it doesn't fit, put each parameter on it's own line.
c) Try to keep your names as short as possible without using
cryptic abbreviations.As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.