×
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.
Now it's coming back... THANK YOU.
I started down this path a year ago. WAY too much work. I'll just call a "wrapper" RPG program (or rewrite the CLLE as RPG) and be done with it.
So much for an "Integrated Language Environment" - IMHO they forgot CL.
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of dlclark@xxxxxxxxxxxxxxxx
Sent: Monday, October 07, 2019 2:42 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Calling an ILE Procedure from CLLE
"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 10/07/2019
01:58:37 PM:
I have an RPGLE procedure that I need to call from a CLLE program.
The issue is the length (and type) of the parameters in the RPG
procedure - they are all VARCHAR and range in size from 50 to 1024.
For now, I have it "working" by defining the CL variables as the
"maximum size".
If your RPG procedure expects VARCHAR then you cannot pass a CL
*CHAR variable value and expect it to always work correctly. Instead, you
should pass a variable defined similar to the following. This is the CL
equivalent of a VARCHAR field. It is a CL data structure where the first
2 characters are a binary length value. This matches the memory layout of
an RPG VARCHAR(2) variable. If you need VARCHAR(4) then increase the
2-byte CL prefix to 4 bytes.
DCL VAR(&RTNMESG) TYPE(*CHAR) LEN(1026)
DCL VAR(&RTN_MDLEN) TYPE(*UINT) LEN(2) STG(*DEFINED) DEFVAR(&RTNMESG
1)
DCL VAR(&RTN_MDATA) TYPE(*CHAR) LEN(1024) STG(*DEFINED)
DEFVAR(&RTNMESG 3)
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.