• Subject: RE: just curious - Number of Parms(numeric zip codes and other crimes against nature)
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Fri, 28 Jul 2000 08:57:39 -0700

I was taught a very simple rule on when to use a numeric--"Will it be used
in computations; does it represent a quantity; or does it show order?  If
yes to any of the above, use a number, otherwise use a character variable."
I think we could debate the order criterion at length, although numbers are
pretty darned easy to increment.

I've seen ZIP codes stored as numeric because "It takes up less space," or
"It's easier to format ZIP +4 with edit words."  Same thing with phone
numbers.  The real fun is using Query or RPG to join files by ZIP code when
you have character in one and numeric in the other.  

> -----Original Message-----
> From: Gary Guthrie [mailto:GaryGuthrie@home.com]
> Sent: Thursday, July 27, 2000 9:48 PM
> To: RPG400-L@midrange.com
> Subject: Re: just curious - Number of Parms
> 
> 
>> 
> Limiting the conversation momentarily to the USA, Zip Codes often are
> defined as numeric. In fact, in the not so distant past, they were
> defined as 5 digits in length. Of course, 9 is a more 
> appropriate length
> now. But, all of a sudden your company decides to do business 
> outside of
> the USA -- hmm, now we need alpha characters, too! And, 
> there's nothing
> that prevents USA standards to change to allow alpha characters.
> 
> This having been said, I submit that it's best to leave numeric
> definitions to those entities that indicate quantitative data 
> and avoid
> the type of problems mentioned.
> 
> Thoughts?
> 
> Gary Guthrie
> REAL Solutions Technical Support
> NEWS/400 Technical Editor
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.