×
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 tried using %decpos on a template variable, and it wouldn't let me:
editCode = $GetUsageAmountEditCode( %decPos( dsT_Inv_State.SBeg ) );
RNF0655: Item SBEG was defined with TEMPLATE and cannot be used in this context.
RNF0655: Item DST_INV_STATE was defined with TEMPLATE and cannot be used in this context.
dsT_Inv_State is indeed a template data structure, but I don't understand why this won't work. Unlike %len, which returns the length of a field which can fluctuate if it's a varchar, I don't see how %decpos could be anything but the decimal precision of the field at compile time. Am I missing something here? We're at IBM i 7.1.
In this particular case, I have two amount fields defined like the SBeg subfield mentioned above. I wanted to get the %decpos of the field that the amount fields are being defined like, instead of arbitrarily picking one (what if one goes away with a future change, then this procedure call will have to change as well).
And in case anyone's wondering what in the world I'd do with an edit code in a variable since %editC doesn't support a variable as the second parameter (sigh), I have another procedure that translates it into an %editC with the hardcoded edit code.
Thanks,
Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform
[cid:image002.jpg@01CD16F9.25D27630]
web: www.customcall.com<
http://www.customcall.com/> | email: kurt.anderson@xxxxxxxxxxxx<mailto:kurt.anderson@xxxxxxxxxxxx>
A Division of Enghouse Systems Ltd.<
http://www.enghouse.com/> (TSX:ESL)
As an Amazon Associate we earn from qualifying purchases.