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



Charles,
I changed the subprocedure prototype to use EXTPROC(*CL) as you
suggested and now all is right with the world.

D EXISTS PR 1 extproc(*CL: 'EXISTS')
D POBJECT 10 CONST
D POBJECTTYPE 10 CONST
D POBJECTILIB 10 CONST OPTIONS(*NOPASS)


Thanks so much for your help!


Terry Anderson
Programming Manager
Citation Corporation
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell 1.251.363.4975



------------------------------

message: 3
date: Tue, 4 Dec 2007 11:10:13 -0500
from: "Wilt, Charles" <WiltC@xxxxxxxxxx>
subject: RE: Strange behavior when calling subprocedure from CL.

*BYVAL is not the right answer.

It would be if the OP was using VALUE instead of CONST.

The problem is the differences between RPG 1 byte variables
and CL 1 byte variables. Look in the archives for more
info, but you need to use EXTPROC(*CL).

EXTPROC(*CL:name)
Specifies an external procedure that is written in ILE CL,
or an RPG procedure to be called by ILE CL. Use *CL if your
program uses return values or parameters passed by value
with data types that CL handles differently from RPG. For
example, use *CL when prototyping an RPG procedure that is
to be called by a CL procedure when the return value is 1A.


HTH,
Charles



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.