Re: If you were inventing CoBOL...
From: Peter Lacey (lacey_at_mb.sympatico.ca)
Date: 02/05/05
- Next message: Clark F. Morris, Jr.: "Floating point and insularity was Re: cobol data format!!! urgent!!!"
- Previous message: William M. Klein: "Re: If you were inventing CoBOL..."
- Maybe in reply to: William M. Klein: "Re: If you were inventing CoBOL..."
- Next in thread: Richard: "Re: If you were inventing CoBOL..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 04 Feb 2005 20:27:28 -0600
j6vflbl6vy6g8o001@sneakemail.com wrote:
>
> Sure, and I said that in my original post, i.e. "... with a series of
> 88-level items...". But, consider how much work that takes!
>
> For example, I work a lot with phone numbers, especially in doing
> conversions, where the data quality coming in is usually suspect. So I
> have to identify "valid" phone numbers from invalid. Here's some
> formats I consider valid:
>
> * Formats Considered Valid:
> * -------------------------
> * (999) 999-9999
> * (999)999-9999
> * 999-999-9999
> * 999.999.9999
> * 999 999-9999
> * 999/999-9999
> * 9999999999
>
For this particular case, it would be just as easy to extract the
numeric characters, from right to left, placing them in a receiving
field from right to left; then examine the 3, 3, & 4 digit portions
(using REDEFINE). The first can be blank or numeric, the other two must
be numeric.
I'm not claiming anything for this method except to say: there are
almost always several different ways to attack a problem.
PL
- Next message: Clark F. Morris, Jr.: "Floating point and insularity was Re: cobol data format!!! urgent!!!"
- Previous message: William M. Klein: "Re: If you were inventing CoBOL..."
- Maybe in reply to: William M. Klein: "Re: If you were inventing CoBOL..."
- Next in thread: Richard: "Re: If you were inventing CoBOL..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|