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
As an Amazon Associate we earn from qualifying purchases.