|
from: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
subject: Re: How to get the dollar value from this text string?
Still a lot less intuitive for the average RPGer that a %ScanR and %Subst
though.
On Jul 31, 2020, at 3:54 AM, Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>wrote:
Agreed Jon, I think I will challenge Birgita on that one:
Here i my one-liner solution: Remove any characters until the last blank,
Picup the number and remove the filal ~
**free
dcl-s instr varchar(256);
dcl-s dolar packed( 15: 2);
inStr = 'NTE*OTH*#OH- HANDLING CHARGES GSYE9R03/WHT/ / 4T/-
2.29~';
exec sql values rtrim(regexp_replace (:instr, '.* '),'~') into
:dolar;
return;
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.