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



Thanks Martin, Barbara

I tried the two-byte *CHAR definition today and it worked fine except for
the need to substring it.  I'll try the *CL prototype definition tomorrow.

----- Original Message ----- 
From: "Barbara Morris" <bmorris@xxxxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Sent: Wednesday, February 25, 2004 8:20 PM
Subject: Re: Calling a procedure that returns an indicator field from
aCLprogram


> Nelson Smith wrote:
> >
> > Does anyone know a way to call a procedure from a CL program that
returns an
> > indicator (true/false) field?  I've tried *CHAR, *DEC, and *LGL for the
> > Return Value parameter, but none of them work.
> >
>
> If the procedure is RPG IV:
>
> - For V5R1+, define the RPG prototype with EXTPROC(*CL:'PROCNAME').
> Define it as *LGL or *CHAR(1) in the CL.
>
>       D rpgproc       pr        1n    extproc(*CL : 'RPGPROC')
>
> - For prior to V5R1 (or for V5R1+ if you don't want to put *CL on your
> EXTPROC), define the return value as 1N or 1A in the RPG, define the
> return value in CL as char(2), and use %sst to get the first byte.
>
>       dcl &retval2 type(*char) len(2)
>       dcl &retval  type(*char) len(1)
>
>       callprc rtnval(&retval2)
>       chgvar &retval %sst(&retval2 1 1)
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>



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.