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



Rory, you must of missed it, I did say I'm on IBM i 7.1

Paul, here's the code:

// Get the Tax Reporting Flag
D $getTAXFlag PR 1a

DCL VAR(&TAXFLAG) TYPE(*CHAR) LEN(1)
CALLPRC PRC($GETTAXFLAG) RTNVAL(&TAXFLAG)

Thanks,
Kurt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Morgan, Paul
Sent: Tuesday, October 11, 2011 2:18 PM
To: RPG programming on the IBM i / System i
Subject: RE: 1 byte return parameter to CL

Kurt,

Could you post the procedure definition, the callprc in the CL and the CL variable definition?

Thanks,
Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson
Sent: Tuesday, October 11, 2011 2:36 PM
To: RPG programming on the IBM i / System i (rpg400-l@xxxxxxxxxxxx)
Subject: 1 byte return parameter to CL

I have a procedure that returns a 1A value and is called by a CL. The CL's variable is defined as *CHAR and LEN(1). The procedure prototype does not have ExtProc(*CL). So, why is the program working? I've debugged it and saw that it is getting the correct value.

I went in and changed the variable in CL to be 2 bytes, per a number of postings I found on the web as a workaround, and instead of getting 'junk' in the 2nd position of the CL variable, I get it in the first. Which seems to be the opposite of what the various sites say to do.
One site example:
http://www.itjungle.com/mgo/mgo011003-story01.html

So now I'm left wondering, is ExtProc(*CL) no longer required for 1-byte return variables on procedures that will be called by CL in IBM i 7.1? If so, very cool. If not, I'm baffled.

Thanks,
Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-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.