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


  • Subject: RE: Numeric from Alpha
  • From: Chris Bipes <rpg@xxxxxxxxxxxxxxx>
  • Date: Tue, 13 Jun 2000 12:51:33 -0700

I would build a file that hold the Numeric field as a cross-reference.
Basically read the entire file and testn on the field(s).  Write the unique
key?? and the numeric key.  Add a trigger to update this cross-reference
file whenever the file is modified.  Now just search/sort/select/report off
the cross-reference file.



Christopher K. Bipes     mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst   mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.         http://www.cross-check.com
6119 State Farm Drive    Phone: 707 586-0551 x 1102
Rohnert Park CA  94928 Fax: 707 586-1884

If consistency is the hobgoblin of little minds, only geniuses work here.
Karen Herbelin - Readers Digest 3/2000


-----Original Message-----
From: MacWheel99@aol.com [mailto:MacWheel99@aol.com]
Sent: Tuesday, June 13, 2000 11:36 AM
To: MIDRANGE-L@midrange.com
Subject: Numeric from Alpha


We have Alpha numeric fields in which our users sometimes insert pure
numbers 
then ask for some reports based on their numbers input ... excluding records

with valid alpha, whose numeric manipulations would cause a decimal data 
error.  There is no coding substructure that would tell me when some alpha 
field is supposed to be purely numeric.

My current scenario is BPCS item master in which a string of numbers with 
certain leading digits are being used for a particular purpose & the users 
what to see where there are gaps in the numbers assigned so far.

I have a plan for how to tackle this & what I am looking for is if my idea
is 
good enough, or if there is a better or simpler algorithm in RPG/400 and/or 
embedded SQL that won't do excessive machine cycles to identify data in an 
alpha field that really is all numeric in certain portions of the field & 
disregard the rest.

My plan is data structure overlay field with an array
test each element of the alpha field
Yes/No can I find it in a look up match vs. digits zero to nine array
any miss & that record is ignored

Al Macintyre  ©¿©
http://www.cen-elec.com MIS Manager Programmer & Computer Janitor
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 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.