×
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.
On 07-Feb-2012 09:54 , Willie J. Moore wrote:
We have a size field (alph) that is 10 characters long. Data has been
entered like '123-098' or '12345-987'. This file and field has been
in production for over 30 years. Being free form, you have no idea
what has been entered. In fact I have found the following entered
'not to big' in the size field!
What I need to do is scan the size field for an '-'. Then do a move
specifying the starting and ending field position in to a new
numeric field.
The scan I have got down. What I am having problems with is the
'move'. How do I move from the size field into to new size field
with a starting and ending position?
Thanks in advance for any and all suggesting and examples.
Why a MOVE operation? Why not just assign the numeric field the
value of the %dec of the portion [e.g. the %subst] of the data within
the alphanumeric field which is the character string representation of
the numeric value?
No example offered, because the desired effect is ill-defined; i.e.
at a minimum, no mention of what should be the decimal value for the two
sample ALPH values with the dash. The digits preceding the dash, the
digits following the dash, all of the consecutive digits, or perhaps
something else [in the "alph" field alphanumeric value] should represent
the [new "size" field] numeric value? And with free-form data as a
given in the scenario, there are many variations where a dash could be
present yet an obviously valid string representation of a number may or
may not precede or follow that dash, for which a desired outcome is also
not noted.
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
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.