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



>I keep getting compiler errors stating
>that parm 1 for the %DEC is incorrect.
>I am trying to convert a char representation
>of a number to a packed 15/0 number.

The documentation for %DEC is fairly clear on what it does.  V5R1:
"%DEC(numeric expression{:precision:decimal places})
 %DEC converts the value of the numeric expression
 to decimal (packed) format ..."

So yes, a character as the first parameter would not be right.  %DEC wants a
number.
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0925083552.htm#HDRB
BDEC

%DEC has a confusing name, that's all.  I'd have named it something akin to
'Num2Pack'.

For one method of converting character to number, check the FAQ at
http://faq.midrange.com  Search for 'character string' or 'character to
number' and you'll see at least one reference that should help.
  --buck


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.