× 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.



David,

Why stick with an RPGII naming convention when programming in ILE RPGIV?

Personally, I'd consider a CLIENT module. Then in keeping with Adam's
suggestion, and prefixing the procedure with the module to prevent name
clashes...

CLIENT_CheckName.

Though I prefer procedures that return Boolean values to be named so they
read well in an if statement..

CLIENT_HasValidName()

Notice that not only do you remove the "noise" of a xxx999 module name, but
it becomes obvious what module your procedures should go into.
CheckCompanyName becomes COMPANY_CheckName (or COMPANY_HasValidName).

Now in six months when you say, hey I need to see is a client has a valid
name, it's easy to see that you'd want to look in the CLIENT module instead
of trying to figure out if you put the procedure into module CHR000, or
STR000 or TXT000. In fact, more likly when you're in doing something with
clients, you'd copy the CLIENT prototypes in automatically. Then if you're
using WDSCi or RDi, a refresh of the outline would show you the procedures
available.

To reiterate....

You're beginning a new paradigm of development. Don't tie yourself down
with old and unnecessary rules.

Charles


On Tue, Jun 23, 2009 at 8:34 AM, David FOXWELL <David.FOXWELL@xxxxxxxxx>wrote:

Thanks again to all who responded.

Now I might sound a bit picky here but here goes.

Checking that a field has only characters A-Z is not dependant on a client,
so I suddenly had the following brainwave :

Create a new module.

Copy Barbara's code into a function like CheckClientName or something. For
a company name I'll add CheckCompanyName and change the constant containing
the accepted characters.

Profit from the simplicity of this module to persuade the boss to let us
integrate it as our first service program.

I'm already realising, however, that the names of the functions and the
module aren't that easy to think up, bearing in mind that it could be used
universally.

So putting Client into the names of the functions might not be a good idea.
What about the module name? I have to respect a rule of 3 characters and 3
numbers. Should I call it CHR000 or STR000 or TXT000?

Thanks


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.