To continue reading for free, register below or login
To read more you must become a member of Search400.com
');
// -->

Use the %DEC BIF with translation to convert the string to a packed number after converting the commas to blanks. The following example is from the WebSphere(R) Development Studio ILE RPG Reference at the IBM Web site and handles the currency symbol $ and the cheque protect symbol * as well as the thousands separator:
D data s 20a inz('$1,234,567.89')
D num s 21p 9
Eval num = %dec(%xlate('$*,' : ' ' : data) : 21 : 9) ==================================
MORE INFORMATION ON THIS TOPIC
==================================
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
|