Re: java prototype fixed to free

Jon Paris <[email protected]> Fri, 20 Mar 2026 12:42:11 -0400
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
The converter in Code for i produced this for me:

       Dcl-PR init O EXTPROC(*JAVA: 'MAIL4RPG2': *CONSTRUCTOR);
         ssluser        Char(30)   CONST;
         sslpass        Char(30)   CONST;
         key            Char(10)   CONST;
         logfile                   LIKE(FILENAME) CONST;
       End-PR;


I used both the basic built-in conversion and also Cozzi's converter - both produced basically the same results.

It is almost correct, but for some reason, it leaves "O" in place instead of converting it to "Object". Made me wonder if "O" was valid but it won't compile and the manual says "Object" so ...

If it failed for you, your version is either out of date or you had a syntax error in your original  D specs. I can't tell because all formatting was lost in your post.


Jon Paris
[email protected]



> On Mar 20, 2026, at 11:03 AM, eric bothes <[email protected]> wrote:
> 
> i did try the tooling first but would not convert. used cvtrpgfree and code for i tooling.
> 
> On 3/20/2026 10:33 AM, Jon Paris wrote:
>> Also why are you not using the LIKE keyword on the logfile name definition?  It is also unlilkely to be varchar I suspect.
>> 
>> Did you use a tool to do this?  It is built into Code for i and there is also the Cozzi plug-in which has larger scope.  Don't attempt to do it by hand it is a waste of time and, as you have demonstrated, error prone.
>> 
>> 
>> Jon Paris
>> [email protected]
>> 
>> 
>> 
>>> On Mar 19, 2026, at 4:18 PM, eric bothes <[email protected]> wrote:
>>> 
>>> Just wanted to check with the group to see if this conversion is correct
>>> 
>>> this
>>> 
>>> Dinit PROEXTPROC(*JAVA:'Mail4RPG2':*CONSTRUCTOR)
>>> D  ssluser           30a CONST
>>> D  sslpass         30a CONST
>>> D  key           10a CONST
>>> D  logfile LIKE(filename) CONST
>>> 
>>> becomes
>>> 
>>> dcl-pr init object(*JAVA:'Mail4RPG2') extproc(*JAVA:'Mail4RPG2':*CONSTRUCTOR);
>>> ssluser varchar(30) CONST;
>>> sslpass varchar(30) CONST;
>>> key varchar(10) CONST;
>>> logfile varchar(512) CONST;
>>> end-pr;
>>> 
>>> -- 
>>> This is the RPG programming on IBM i (RPG400-L) mailing list
>>> To post a message email: [email protected]
>>> To subscribe, unsubscribe, or change list options,
>>> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
>>> or email: [email protected]
>>> Before posting, please take a moment to review the archives
>>> at https://archive.midrange.com/rpg400-l.
>>> 
>>> Please contact [email protected] for any subscription related questions.
>>> 
> -- 
> This is the RPG programming on IBM i (RPG400-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/rpg400-l.
> 
> Please contact [email protected] for any subscription related questions.
> 

-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.