I do not do anything like this. I use a single source file, in my case,
QSRCF so for each service program I have

xxNAME - Top Level Binding instruction
xxNAME_B - Bindery
xxNAME_M01 to Mxx Modules.
xxNAME_PR - Prototypes

I have everything in one file. I would like to shoot the guy at IBM who
came up with QRPGSRC, QCLSRC, etc, etc. What a waste of time.

The problem I see with the method is publishing the source code. What
happens if you just want to publish prototypes?




On Tue, Sep 12, 2017 at 2:40 PM, Dan <dan27649@xxxxxxxxx> wrote:

So, I'm on a runaway train now with service programs, taking time off-hours
(I'm a contractor) to learn all of this stuff, and now stumbling onto
conditional compiler directives.

I've always disliked the idea of keeping prototypes in their own source
file, usually QPROTOSRC. So, while I was searching for information on how
to use /DEFINE, /IF DEFINED, etc., I found Jon and Susan's article at
http://ibmsystemsmag.com/ibmi/developer/rpg/iseries-extra--
using-conditional-compiler-directiv/?page=2
and opened up "Code Sample 1" (pasted below), which appears to be an answer
to avoiding QPROTOSRC files. My question: Is anyone actually using this
technique? If anyone has considered using it, but decided not to, can you
explain why?

- Dan

* Source member EndOfMonth
* Ignore H-spec if only processing prototypes
/If Not Defined(OnlyProtos)
H DatFmt(*ISO) NoMain
/EndIf

D EndOfMonth Pr D DatFmt(*ISO)
D WorkDate D DatFmt(*ISO) Value

* If prototypes is all we want, then
* skip straight to end of file
/If Defined(OnlyProtos)
/EOF
/EndIf

P EndOfMonth B
D PI D DatFmt(*ISO)
D WorkDate D DatFmt(*ISO) Value

* Working variables
D DayNo S 3P 0

* Advance the input date (WorkDate) by one month

C AddDur 1:*M WorkDate

* Subtract day number from result to reach last
* day of previous month

C Extrct WorkDate:*D DayNo
C SubDur DayNo:*D WorkDate

C Return WorkDate

P EndOfMonth E
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].