On Mon, 14 Oct 2024 at 06:16, Dave <dfx1@xxxxxxxxxxxxxx> wrote:
Has there been any discussion on using AI to code RPG applications?
Would be grateful if anyone could point me to the thread as I didn't find
anything.
There was a thread or two some time ago. The upshot then was that LLMs
were not particularly suited for working with RPG/DDS (subfiles!)
LLMs are highly sensitive to their training data, and there simply
isn't that much publicly scrapable RPG/DDS content.
As Jim notes, IBM are working on an initiative to solicit code from
the RPG community, specifically to train up an LLM that understands
IBM i and RPG.
I think it's important to repeat that the 'intelligence' part of the
AI marketing train does not refer to the correctness of the responses,
but rather to the LLMs ability to /convince you/ that the response is
correct.
I myself haven't really come up with a use case that resonates with
me. I might be interested to tell an LLM to write me some wrappers for
APIs I haven't already got in my stable. Let's try Virtual Terminal
APIs. I asked Gemini 'Please write ILE RPG wrappers for the Virtual
Terminal APIs'. It wants to know which specific one, which OS (?!?!),
what functionality (what even is a wrapper?), and whether I want
procedural or classes & methods (whaaaaa?) OK, I guess it's fair to
ask 'which one', but why not all of them, one after the other? So, I
responded with 'Please write a procedural wrapper for the QTVOPNVT
API. ILE RPG only runs on IBM i; the specific version is 7.4. The
functionality is to open a path to a virtual terminal.'
This is what Gemini provided:
<code>
*ENTRY(QTVOPNVT_WRAPPER)
*PARM(VTNAME : *CHAR(8))
*PARM(PATHNAME : *CHAR(256))
*PARM(OPNMODE : *CHAR(1))
*PARM(RC : *INT(10))
*END-ENTRY
DCL-PROC QTVOPNVT;
DCL-PI *N QTVOPNVT(VTNAME : *CHAR(8))
(PATHNAME : *CHAR(256))
(OPNMODE : *CHAR(1))
RETURNS(*INT(10));
END-PROC;
BEGIN
// Call the QTVOPNVT API
RC = QTVOPNVT(VTNAME: VTNAME, PATHNAME: PATHNAME, OPNMODE: OPNMODE);
// Check for errors
IF RC <> 0;
// Handle errors (e.g., display a message, log the error)
ENDIF;
END;
</code>
...and here ends my patience for this. Never mind that the syntax is
gibberish; the API has 9 required parameters; none of which is a path
name or open mode. It returns a 16 byte handle, not an INT.
https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/QTVOPNVT.html
So... what would you use an LLM to help you with?
--buck
As an Amazon Associate we earn from qualifying purchases.