Antoine,

I think the "too long" comes from one of two arguments.
One, obsolete reference to somethings called "Factor 1", "Factor 2" and 
"Result Field" from the olden days of fixed format RPG.
Two, the maximum size of a variable name in a D spec without using 
continuation characters.  Understanding that there is no consistent 
continuation rule, (among all of RPG's specifications), understandably 
frustrates some people.

Some might have you limit variable names to 10 characters to keep in the 
mindset of RPG/400 or RPGIII.  Some, might insist on 6 because their still 
in the mindset of RPGII.  (And these pathetic personnel still prefix the 
variable names with a variable type like CMCOS for the month-to-date sales 
cost from the RCM file.)



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





antoine.contal@xxxxxxx 
Sent by: rpg400-l-bounces+rob=dekko.com@xxxxxxxxxxxx
12/29/2004 08:56 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: Re: Long Constant Names










Alan,

When you write 'I'm not convinced about the utility of too-long names, or 
too many of
them anyway.', you introduce two interesting concepts.

First, what is too long for a variable?

This thread's context would suggest the 15-char limit is the boundary 
between what's good and what's too long. Why is 15 characters the right 
limit? Why not 14? 16? Or 18 if we want a multiple of 3?

Secondly, you imply quantity may be factor.

I hadn't thought about that, but you could be right. When people say they 
want to prevent long names, they think about programs with many long 
names. Then, they start talking about a hard limit that each variable has 
to abide to. Yet, maybe
we approach this from the wrong angle. What about a rule stating that 90% 
of variables must be within the 15-char limit but the remaining 10% can be 
somewhat longer? Wouldn't it be a rule closer to human common sense?

You conclude with 'it won't matter too very much'. Well, I also have to 
maintain programs with 6-char variables, and I can tell you it takes much 
more time for me to understand these programs, compared to the others with 
15-char variables.

Regards.

--
Antoine CONTAL



  
  
                                                Pour :   RPG programming 
on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> 
                                                cc :    
                                                Objet :  Re: Long Constant 
Names 
             Alan C   
             <steelville@xxxxxxxxxxx>   
             Envoyé par :   
             rpg400-l-bounces@xxxxxxxxxxxx   
  
  
             29/12/2004 02:05   
             Veuillez répondre à RPG   
             programming on the AS400 /   
             iSeries   
  
  




My inclinations are like this:

It is good practice to have a naming convention just to cut down the
time involved in naming things.

I'm not convinced about the utitility of too-long names, or too many of
them anyway.  Depending on what conventions are in use, and how much
they are faithfully followed, the longer the names are the more
variation is possible for finding what you're looking for, or finding
the variable you coded. It's one thing I didn't like when I did Cobol.
You can get lost trying to remember if you went top down in cateogory,
or regarded top-down categories at all,

Three-letter abbreviations like the IBM command-naming practice helps in
the mnemonics.

So my practice lines up maybe with Duane's in this, Michael's in keeping
the names not-too-long, jstevens with the 3-character practice, so I
guess I agree with just about everybody!

That said, whatever you wind up having to do on this one, it won't
matter too very much, and you'll get used to it of course! :-)

-- Alan


>it makes a difference when doing global find and change type changes.
>It cuts down on the number of false finds.
>
>in my experience constants are frequently grouped together.  all the
>codes for a status field is the classic example.  In such a case I
>think you have to have a naming convention.
>
>I find I spend a lot of time naming things.  almost to the point that
>I cant code it until I have named it.  having a naming convention that
>is reasonable simplifies that process.
>
>-Steve
>
>

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



Les informations contenues dans ce message sont confidentielles et peuvent 
constituer des informations privilegiees. Si vous n etes pas le 
destinataire de ce message, il vous est interdit de le copier, de le faire 
suivre, de le divulguer ou d en utiliser tout ou partie. Si vous avez recu 
ce message par erreur, merci de le supprimer de votre systeme, ainsi que 
toutes ses copies, et d en avertir immediatement l expediteur par message 
de retour.
Il est impossible de garantir que les communications par messagerie 
electronique arrivent en temps utile, sont securisees ou denuees de toute 
erreur ou virus. En consequence, l expediteur n accepte aucune 
responsabilite du fait des erreurs ou omissions qui pourraient en 
resulter.
--- ----------------------------------------------------- ---
The information contained in this e-mail is confidential. It may also be 
legally privileged. If you are not the addressee you may not copy, 
forward, disclose or use any part of it. If you have received this message 
in error, please delete it and all copies from your system and notify the 
sender immediately by return e-mail.
E-mail communications cannot be guaranteed to be timely secure, error or 
virus-free. The sender does not accept liability for any errors or 
omissions which arise as a result.
$!2$!


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



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.