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



Alan,

I find that hard to believe. How would the procedure do that? If a CLLE
program calls the procedure and passes a parameter by value, the value is
copied to the stack and the procedure receives that copy. What you imply
is that the procedure would somehow 'know' whether a passed parameter is
an actual varying length field or that it is a fixed character field that
needs to to be converted first.

Now, if you call from RPGLE the compiler will know from the prototype that
the procedure expects a varying length field, so it can add code to
convert the parameter to a varying length field.

I don't think that what Mike wants is possible. My solution would be to
have an extra procedure, especially for use from CLLE, with a fixed length
parameter. All it has to do is call the other procedure; then the
conversion will be automatically added by the RPGLE compiler.

Joep Beckeringh



Alan Campin <alan0307d@xxxxxxxxx>

29-09-2014 07:08

Subject:

Re: Passing a Char to a Varchar in RPGLE Procedure Interface

The procedure will do it for you. If you are passing by value, when you
pass a char it will automatically map to varchar. The only other thing
that
you need to do is to include the option *Trim to cause the value to be
trimmed when it is passed so you get the actual length.

This mechinism would work from CLLE or RPGLE.


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.