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



James,

If you would have bothered to read the documentation for V5R3 (the release you wrote you were targeting), you would have known that the first argument can be a character, numeric, date, time or timestamp expression and that for a character expression the second and third parameter are required.

Joep Beckeringh


James HH. Lampert schreef:
No, they take character strings alright. Using your original examples:

D DecField S 5 2
C Eval MyDecField = %Dec( '123.45' : 5 : 2 ) C Eval MyDecField = %Dec( ' 1.23' : 5 : 2 ) C Eval MyDecField = %Dec( '1.23' : 5 : 2 ) C Eval MyDecField = %Dec( '1.2' : 5 : 2 ) C Eval MyDecField = %Dec( '123' : 5 : 2 )

Passing a character string as the first argument to %dec doesn't even compile. It just gives an "invalid argument" message. As I said, I did actually try it.

It might work in a compiler more recent than the V4R2 compiler I tried it on, but I didn't care to bother hooking up to the IBM test box while just sticking my nose into the office on a Sunday.

If it does work on something post-V4R2, what revision does it come in at?

--
JHHL



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.