Thanks for the input - those are great points... I have some of the constants in a table already (along with the credentials, tokens, etc.)
But if the URL changes, it's likely the version changes, so I end up changing the service pgm anyway using UPDSRVPGM
I'm more concerned with things like a procedure called getAccessToken(). I have that same proc name in several APIs.
(YES, I should have created these with a prefix - I do that now, but didn't 10 years ago).
I also have a lot of "template" fields and structures defined that are rather large.
Keep in mind that these are for our internal use.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Brad Stone
Sent: Thursday, October 16, 2025 10:06 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Service Programs & Copy Source
I personally would add them the the existing /copy source, and make a
new/additional signature in the service program with the binder language so
old programs will use the old signature until recompiled.
As for your constants, etc like endpoints, other values, I used to make
them constants in source but remember if they change it will require a
recompile of everything. So instead I make "control files" with a name and
value and make a simple getControlValue() function that does a simple SQL
on the control file to get the value... like this:
endpoint = getControlValue('AMAZON_BASE_URL');
This way if anything changes it's a simple file update. I used to use data
areas before that and that turned into a headache with so many contants
that could change in the future for some functions with Google, Microsoft,
UPS, etc.
Greg Wilburn
Director of IT
301.895.3792 ext. 1231
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.