RPG IV

1 program Added 2025-10-22T15:16:26Z Model: openai/gpt-4oTemp: 0.4 Evidence Report issue View issues
Aliases: RPGLE, RPG/ILE
Provenance: commit df9cd3eb50 · authored 2025-10-22T17:16:26+02:00 · model openai/gpt-4o

Sources mentioning this language

2 sources · pl_id: pl/rpgle
LLM (this repo) · 1Linguist

Extensions claimed by this language

2 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.rpglelinguistprimary78.7K files
.sqlrpglelinguistsecondary24.9K files

Related languages

RPGLE (1.00)RPG (0.57)IBM RPG (0.48)RPG III (0.28)RPG II (0.19)

Real programs from Software Heritage

5 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
routeParms.rpgle · 3035 B · ext .rpgle · SWH occurrences unknown
via swh_study:rpgle (judge:claude-sonnet-4.6; rules:rpgle-reclass; rules:**FREE-directive)
swh:1:cnt:6b8bb106f451e1dc3a6ebc4c70336b0ca24d2cb2;origin=https://github.com/BezouwenR/ILEastic;path=/examples/routeParms.rpgle
Open in SWH · Raw bytes (SWH)
Reviews (1 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 rpgle-judge/1 → pl/rpgle (high) 2026-07-10
RPG IV / ILE RPG (free-form) · fully-free · program
Show source
**FREE

///
// Multiple Routes Example
//
// This example shows how to add multiple end points with differnt URLs.
//
// Here we add one end point using paramter names in the form {parmName}
// point /date which returns the current date.
//
// Start it:
// SBMJOB CMD(CALL PGM(routeParms)) JOB(ILEASTIC) JOBQ(QSYSNOMAX) ALWMLTTHD(*YES) CCSID(37)        
//
// The web service can be tested with the browser by entering the following URL:
// http://my_ibmi:44010/simpletest 
// http://my_ibmi:44010/simpletest/123 
// http://my_ibmi:44010/simpletest/123/list
// http://my_ibmi:44010/simpletest/123/list/abc

//
// @info: It requires your RPG code to be reentrant and compiled for 
//        multithreading. Each client request is handled by a seperate thread.
///

ctl-opt copyright('Sitemule.com  (C), 2020');
ctl-opt decEdit('0,') datEdit(*YMD.) main(main);
ctl-opt debug(*yes) bndDir('ILEASTIC');
ctl-opt thread(*CONCURRENT);
ctl-opt ccsid(*CHAR:37);

/include ./headers/ileastic.rpgle

// -----------------------------------------------------------------------------
// Program Entry Point
// -----------------------------------------------------------------------------     
dcl-proc main;

    dcl-ds config likeds(il_config);
    
    config.port = 44010; 
    config.host = '*ANY';

    // The resource paths must be entered as a regular expression.
    //
    // ^ means that a matching request must start here
    // $ means that a matching request must end here
    // Paramter names are in the form {parmName}
    //
    // If none of these endpoints are satified 
    // it will return 404 NOT FOUND.
    il_addRoute(config : %paddr(test1) : IL_ANY : '/simpletest/{myId}/list/{myNumber}$');
    il_addRoute(config : %paddr(test1) : IL_ANY : '/simpletest/{myId}/list$');
    il_addRoute(config : %paddr(test2) : IL_ANY : '/simpletest/{myId}$');
    il_addRoute(config : %paddr(test2) : IL_ANY : '/simpletest$');
  
    il_listen(config);
 
end-proc;

// -----------------------------------------------------------------------------
// Servlet callback implementation
// -----------------------------------------------------------------------------     
dcl-proc test1;

    dcl-pi *n;
        request  likeds(IL_REQUEST);
        response likeds(IL_RESPONSE);
    end-pi;
    
    il_responseWrite(response : 'Test1');
    il_responseWrite(response : ' myId:');
    il_responseWrite(response : il_getResourceParmStr (request: 'myId' : '000'));
    il_responseWrite(response : ' myNumber:');
    il_responseWrite(response : il_getResourceParmStr (request: 'myNumber' : '9999'));
end-proc;
dcl-proc test2;

    dcl-pi *n;
        request  likeds(IL_REQUEST);
        response likeds(IL_RESPONSE);
    end-pi;
    
    il_responseWrite(response : 'Test2');
    il_responseWrite(response : ' myId:');
    il_responseWrite(response : il_getResourceParmStr (request: 'myId' : '000'));
    il_responseWrite(response : ' myNumber:');
    il_responseWrite(response : il_getResourceParmStr (request: 'myNumber' : '9999'));

end-proc;
SAX2.rpgle · 13603 B · ext .rpgle · SWH occurrences unknown
via swh_study:rpgle (judge:claude-sonnet-4.6; rules:rpgle-reclass)
swh:1:cnt:fb687e99428d1d0bb9329ea4b129289f6921f05a;origin=https://github.com/kiyolee/libxml2;path=/os400/libxmlrpg/SAX2.rpgle
Open in SWH · Raw bytes (SWH)
Reviews (1 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 rpgle-judge/1 → pl/rpgle (high) 2026-07-10
RPG IV / ILE RPG (fixed-format) · fixed-format · copybook-prototype-header
Show source
      * Summary: SAX2 parser interface used to build the DOM tree
      * Description: those are the default SAX2 interfaces used by
      *              the library when building DOM tree.
      *
      * Copy: See Copyright for the status of this software.
      *
      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.

      /if not defined(XML_SAX2_H__)
      /define XML_SAX2_H__

      /include "libxmlrpg/xmlversion"
      /include "libxmlrpg/parser"
      /include "libxmlrpg/xlink"

     d xmlSAX2GetPublicId...
     d                 pr              *   extproc('xmlSAX2getPublicId')        const xmlChar *
     d  ctx                            *   value                                void *

     d xmlSAX2GetSystemId...
     d                 pr              *   extproc('xmlSAX2getSystemId')        const xmlChar *
     d  ctx                            *   value                                void *

     d xmlSAX2SetDocumentLocator...
     d                 pr                  extproc('xmlSAX2SetDocumentLocator')
     d  ctx                            *   value                                void *
     d  loc                                value like(xmlSAXLocatorPtr)

     d xmlSAX2GetLineNumber...
     d                 pr            10i 0 extproc('xmlSAX2GetLineNumber')
     d  ctx                            *   value                                void *

     d xmlSAX2GetColumnNumber...
     d                 pr            10i 0 extproc('xmlSAX2GetColumnNumber')
     d  ctx                            *   value                                void *

     d xmlSAX2IsStandalone...
     d                 pr            10i 0 extproc('xmlSAX2IsStandalone')
     d  ctx                            *   value                                void *

     d xmlSAX2HasInternalSubset...
     d                 pr            10i 0 extproc('xmlSAX2HasInternalSubset')
     d  ctx                            *   value                                void *

     d xmlSAX2HasExternalSubset...
     d                 pr            10i 0 extproc('xmlSAX2HasExternalSubset')
     d  ctx                            *   value                                void *

     d xmlSAX2InternalSubset...
     d                 pr                  extproc('xmlSAX2InternalSubset')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *
     d  ExternalID                     *   value options(*string)               const xmlChar *
     d  SystemID                       *   value options(*string)               const xmlChar *

     d xmlSAX2ExternalSubset...
     d                 pr                  extproc('xmlSAX2ExternalSubset')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *
     d  ExternalID                     *   value options(*string)               const xmlChar *
     d  SystemID                       *   value options(*string)               const xmlChar *

     d xmlSAX2GetEntity...
     d                 pr                  extproc('xmlSAX2GetEntity')
     d                                     like(xmlEntityPtr)
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *

     d xmlSAX2GetParameterEntity...
     d                 pr                  extproc('xmlSAX2GetParameterEntity')
     d                                     like(xmlEntityPtr)
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *

     d xmlSAX2ResolveEntity...
     d                 pr                  extproc('xmlSAX2ResolveEntity')
     d                                     like(xmlParserInputPtr)
     d  ctx                            *   value                                void *
     d  publicId                       *   value options(*string)               const xmlChar *
     d  systemId                       *   value options(*string)               const xmlChar *

     d xmlSAX2EntityDecl...
     d                 pr                  extproc('xmlSAX2EntityDecl')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *
     d  type                         10i 0 value
     d  publicId                       *   value options(*string)               const xmlChar *
     d  systemId                       *   value options(*string)               const xmlChar *
     d  content                        *   value options(*string)               xmlChar *

     d xmlSAX2AttributeDecl...
     d                 pr                  extproc('xmlSAX2AttributeDecl')
     d  ctx                            *   value                                void *
     d  elem                           *   value options(*string)               const xmlChar *
     d  fullname                       *   value options(*string)               const xmlChar *
     d  type                         10i 0 value
     d  def                          10i 0 value
     d  defaultValue                   *   value options(*string)               const xmlChar *
     d  tree                               value like(xmlEnumerationPtr)

     d xmlSAX2ElementDecl...
     d                 pr                  extproc('xmlSAX2ElementDecl')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *
     d  type                         10i 0 value
     d  content                            value like(xmlElementContentPtr)

     d xmlSAX2NotationDecl...
     d                 pr                  extproc('xmlSAX2NotationDecl')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *
     d  publicId                       *   value options(*string)               const xmlChar *
     d  systemId                       *   value options(*string)               const xmlChar *

     d xmlSAX2UnparsedEntityDecl...
     d                 pr                  extproc('xmlSAX2UnparsedEntityDecl')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *
     d  publicId                       *   value options(*string)               const xmlChar *
     d  systemId                       *   value options(*string)               const xmlChar *
     d  notationName                   *   value options(*string)               xmlChar *

     d xmlSAX2StartDocument...
     d                 pr                  extproc('xmlSAX2StartDocument')
     d  ctx                            *   value                                void *

     d xmlSAX2EndDocument...
     d                 pr                  extproc('xmlSAX2EndDocument')
     d  ctx                            *   value                                void *

      /undefine XML_TESTVAL
      /if defined(LIBXML_SAX1_ENABLED)
      /define XML_TESTVAL
      /elseif defined(LIBXML_HTML_ENABLED)
      /define XML_TESTVAL
      /elseif defined(LIBXML_WRITER_ENABLED)
      /define XML_TESTVAL
      /elseif defined(LIBXML_DOCB_ENABLED)
      /endif
      /if defined(XML_TESTVAL)
     d xmlSAX2StartElement...
     d                 pr                  extproc('xmlSAX2StartElement')
     d  ctx                            *   value                                void *
     d  fullname                       *   value options(*string)               const xmlChar *
     d  atts                           *                                        const xmlChar *(*)

     d xmlSAX2EndElement...
     d                 pr                  extproc('xmlSAX2EndElement')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *

      /undefine XML_TESTVAL
      /endif

     d xmlSAX2StartElementNs...
     d                 pr                  extproc('xmlSAX2StartElementNs')
     d  ctx                            *   value                                void *
     d  localname                      *   value options(*string)               const xmlChar *
     d  prefix                         *   value options(*string)               const xmlChar *
     d  URI                            *   value options(*string)               const xmlChar *
     d  nb_namespaces                10i 0 value
     d  namespaces                     *   value                                const xmlChar *(*)
     d  nb_attributes                10i 0 value
     d  nb_defaulted                 10i 0 value
     d  attributes                     *                                        const xmlChar *(*)

     d xmlSAX2EndElementNs...
     d                 pr                  extproc('xmlSAX2EndElementNs')
     d  ctx                            *   value                                void *
     d  localname                      *   value options(*string)               const xmlChar *
     d  prefix                         *   value options(*string)               const xmlChar *
     d  URI                            *   value options(*string)               const xmlChar *

     d xmlSAX2Reference...
     d                 pr                  extproc('xmlSAX2Reference')
     d  ctx                            *   value                                void *
     d  name                           *   value options(*string)               const xmlChar *

     d xmlSAX2Characters...
     d                 pr                  extproc('xmlSAX2Characters')
     d  ctx                            *   value                                void *
     d  ch                             *   value options(*string)               const xmlChar *
     d  len                          10i 0 value

     d xmlSAX2IgnorableWhitespace...
     d                 pr                  extproc('xmlSAX2IgnorableWhitespace')
     d  ctx                            *   value                                void *
     d  ch                             *   value options(*string)               const xmlChar *
     d  len                          10i 0 value

     d xmlSAX2ProcessingInstruction...
     d                 pr                  extproc(
     d                                      'xmlSAX2ProcessingInstruction')
     d  ctx                            *   value                                void *
     d  target                         *   value options(*string)               const xmlChar *
     d  data                           *   value options(*string)               const xmlChar *

     d xmlSAX2Comment...
     d                 pr                  extproc('xmlSAX2Comment')
     d  ctx                            *   value                                void *
     d  value                          *   value options(*string)               const xmlChar *

     d xmlSAX2CDataBlock...
     d                 pr                  extproc('xmlSAX2CDataBlock')
     d  ctx                            *   value                                void *
     d  value                          *   value options(*string)               const xmlChar *
     d  len                          10i 0 value

      /if defined(LIBXML_SAX1_ENABLED)
     d xmlSAXDefaultVersion...
     d                 pr            10i 0 extproc('xmlSAXDefaultVersion')
     d  version                      10i 0 value
      /endif                                                                    LIBXML_SAX1_ENABLED

     d xmlSAXVersion   pr            10i 0 extproc('xmlSAXVersion')
     d  hdlr                               likeds(xmlSAXHandler)
     d  version                      10i 0 value

     d xmlSAX2InitDefaultSAXHandler...
     d                 pr                  extproc(
     d                                      'xmlSAX2InitDefaultSAXHandler')
     d  hdlr                               likeds(xmlSAXHandler)
     d  warning                      10i 0 value

      /if defined(LIBXML_HTML_ENABLED)
     d xmlSAX2InitHtmlDefaultSAXHandler...
     d                 pr                  extproc(
     d                                      'xmlSAX2InitHtmlDefaultSAXHandler')
     d  hdlr                               likeds(xmlSAXHandler)

     d htmlDefaultSAXHandlerInit...
     d                 pr                  extproc('htmlDefaultSAXHandlerInit')
      /endif

      /if defined(LIBXML_DOCB_ENABLED)
     d xmlSAX2InitDocbDefaultSAXHandler...
     d                 pr                  extproc(
     d                                      'xmlSAX2InitDocbDefaultSAXHandler')
     d  hdlr                               likeds(xmlSAXHandler)

     d docbDefaultSAXHandlerInit...
     d                 pr                  extproc('docbDefaultSAXHandlerInit')
      /endif

     d xmlDefaultSAXHandlerInit...
     d                 pr                  extproc('xmlDefaultSAXHandlerInit')

      /endif                                                                    XML_SAX2_H__
getcust.rpgle · 2706 B · ext .rpgle · SWH occurrences unknown
via swh_study:rpgle (judge:claude-sonnet-4.6; rules:rpgle-reclass; rules:**FREE-directive)
swh:1:cnt:fb62561ffae8014262d62cd96e8def238f2a7f44;origin=https://github.com/averan/averan;path=/getcust.rpgle
Open in SWH · Raw bytes (SWH)
Reviews (1 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 rpgle-judge/1 → pl/rpgle (high) 2026-07-10
RPG IV / ILE RPG (fully free-form) · fully-free · program
Show source
     **free
       ctl-opt DFTACTGRP(*NO) ACTGRP('AZANDRES') PGMINFO(*PCML:*MODULE);
       //  Testing metodo GET simple en RPG usando IWS como Framework
       //
       //  Servicio:
       //  http://x.x.x.x:10555/web/services/GETCUST/123
       //
       //  Para compilar:
       //  *>  CRTBNDRPG PGM(GETCUST) SRCFILE(*LIBL/QRPGLESRC) DBGVIEW(*LIST)
       //
       //  Para ver el PCML, sacar PGMINFO de arriba y compilar asi:
       //  CRTBNDRPG  GETCUST SRCFILE(*LIBL/QRPGLESRC) DBGVIEW(*LIST) -
       //             PGMINFO(*PCML) INFOSTMF('getcust.pcml')
       //

       dcl-f CUSTFILE disk keyed usage(*INPUT) prefix('CUST.') UsrOpn;

       dcl-ds CUST ext qualified extname('CUSTFILE') end-ds;

       // *ENTRY PLIST
       dcl-pi *N;
         CustNo  like(Cust.Custno);
         Name    like(Cust.Name  );
         Street  like(Cust.Street);
         City    like(Cust.City  );
         State   like(Cust.State );
         Postal  like(Cust.Postal);
         Contact like(Cust.Contact);
         Title  like(Cust.Title);
         Balance like(Cust.Balance);
       end-pi;

       dcl-pr QMHSNDPM ExtPgm;
         MessageID   char(7)     Const;
         QualMsgF    char(20)    Const;
         MsgData     char(32767) Const options(*varsize);
         MsgDtaLen   int(10)     Const;
         MsgType     char(10)    Const;
         CallStkEnt  char(10)    Const;
         CallStkCnt  int(10)     Const;
         MessageKey  char(4);
         ErrorCode   char(32767) options(*varsize);
       end-pr;

       dcl-pr system int(10) ExtProc(*dclcase);
         command pointer value options(*string);
       end-pr;

       dcl-ds err qualified;
         bytesProv   int(10) inz(0);
         bytesAvail  int(10) inz(0);
       end-ds;

       dcl-s MsgDta  varchar(1000);
       dcl-s MsgKey  char(4);

       if not %open(CUSTFILE);
         monitor;
           open CUSTFILE;
         on-error;
           system('DSPJOBLOG OUTPUT(*PRINT)');
         endmon;
       endif;

       chain CustNo CUSTFILE;
       if not %found;
         msgdta = 'Cliente no encontrado.';
         QMHSNDPM( 'CPF9897'
                 : 'QCPFMSG   *LIBL'
                 : msgdta
                 : %len(msgdta)
                 : '*ESCAPE'
                 : '*PGMBDY'
                 : 1
                 : MsgKey
                 : err );
       else;
           Custno = Cust.Custno;
           Name   = Cust.name;
           Street = Cust.Street;
           City   = Cust.City;
           State  = Cust.State;
           Postal = Cust.Postal;
           Contact = Cust.Contact;
           Title   = Cust.Title;
           Balance = Cust.Balance;
       endif;

       *inlr = *on;
     **end-free
jsonread2.rpgle · 9282 B · ext .rpgle · SWH occurrences unknown
via swh_study:rpgle (judge:claude-sonnet-4.6; rules:rpgle-reclass)
swh:1:cnt:4f96182b891079bf2064526f528935e81f8e4107;origin=https://github.com/ITMentalist/ibmi-2;path=/yajl/qrpglesrc/jsonread2.rpgle
Open in SWH · Raw bytes (SWH)
Reviews (1 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 rpgle-judge/1 → pl/rpgle (high) 2026-07-10
RPG IV / ILE RPG (hybrid-free) · hybrid-free · program
Show source
     H DFTACTGRP(*NO) ACTGRP(*NEW) OPTION(*SRCSTMT)                                                 
     H BNDDIR('YAJL')                                                                               
                                                                                                    
     FQSYSPRT   O    F  132        PRINTER                                                          
                                                                                                    
      /include yajl_h                                                                               
                                                                                                    
     D list_t          ds                  qualified                                                
     D                                     template                                                 
     D   inv                          5a                                                            
     D   date                         8s 0                                                          
     D   name                        25a                                                            
     D   amount                       9p 2                                                          
     D   weight                       9p 1                                                          
                                                                                                    
     D result          ds                  qualified                                                
     D   success                      1n                                                            
     D   errmsg                     500a   varying                                                  
     D   list                              likeds(list_t) dim(999)                                  
                                                                                                    
     D i               s             10i 0                                                          
     D j               s             10i 0                                                          
     D dateUSA         s             10a                                                            
     D errMsg          s            500a   varying inz('')                                          
                                                                                                    
     D docNode         s                   like(yajl_val)                                           
     D list            s                   like(yajl_val)                                           
     D node            s                   like(yajl_val)                                           
     D val             s                   like(yajl_val)                                           
     D key             s             50a   varying                                                  
                                                                                                    
     D prt             ds                  likeds(list_t)                                           
      /free                                                                                         
                                                                                                    
         docNode = yajl_stmf_load_tree( '/tmp/example.json' : errMsg );                             
         if errMsg <> '';                                                                           
            // handle error                                                                         
         endif;                                                                                     
                                                                                                    
         node = YAJL_object_find(docNode: 'success');                                               
         result.success = YAJL_is_true(node);                                                       
                                                                                                    
         node = YAJL_object_find(docNode: 'errmsg');                                                
         result.errmsg = YAJL_get_string(node);                                                     
                                                                                                    
         list = YAJL_object_find(docNode: 'list');                                                  
                                                                                                    
         i = 0;                                                                                     
         dow YAJL_ARRAY_LOOP( list: i: node );                                                      
                                                                                                    
            j = 0;                                                                                  
            dow YAJL_OBJECT_LOOP( node: j: key: val);                                               
               exsr load_subfield;                                                                  
            enddo;                                                                                  
                                                                                                    
         enddo;                                                                                     
                                                                                                    
         for i = 1 to YAJL_ARRAY_SIZE(list);                                                        
            prt = result.list(i);                                                                   
            except print;                                                                           
         endfor;                                                                                    
                                                                                                    
         *inlr = *on;                                                                               
                                                                                                    
         begsr load_subfield;                                                                       
                                                                                                    
            select;                                                                                 
            when key = 'invoice';                                                                   
               result.list(i).inv = yajl_get_string(val);                                           
            when key = 'date';                                                                      
               dateUSA = yajl_get_string(val);                                                      
               result.list(i).date = %dec(%date(dateUSA:*usa):*iso);                                
            when key = 'name';                                                                      
               result.list(i).name = yajl_get_string(val);                                          
            when key = 'amount';                                                                    
               result.list(i).amount = yajl_get_number(val);                                        
            when key = 'weight';                                                                    
               result.list(i).weight = yajl_get_number(val);                                        
            endsl;                                                                                  
                                                                                                    
         endsr;                                                                                     
                                                                                                    
                                                                                                    
      /end-free                                                                                     
                                                                                                    
     OQSYSPRT   E            PRINT                                                                  
     O                       PRT.INV              5                                                 
     O                       PRT.DATE            17 '    -  -  '                                    
     O                       PRT.NAME            44                                                 
     O                       PRT.AMOUNT    L     56                                                 
     O                       PRT.WEIGHT    L     67                                                 
TAXRCPTPGM.rpgle · 3902 B · ext .rpgle · SWH occurrences unknown
via swh_study:rpgle (judge:claude-sonnet-4.6; rules:rpgle-reclass)
swh:1:cnt:d7ffb6e923e4e01f3dd27fdad8ada7fca49044a1;origin=https://github.com/LBBNetwork/InventoryMangler400;path=/QRPGLESRC/TAXRCPTPGM.rpgle
Open in SWH · Raw bytes (SWH)
Reviews (1 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 rpgle-judge/1 → pl/rpgle (high) 2026-07-10
RPG IV / ILE RPG (fixed-format) · fixed-format · program
Show source
     FTAXRCPT   UF A E           K DISK
     FASSETS    UF A E           K DISK
     FTAXSCR    CF   E             WORKSTN
     DSTRADD           S              1P 0
     DPHYSDON          S              1P 0
      *----------------------------------------------------------
      *This program handles the donor specific things for the CCC
      *
      *Program starts with two launch parameters, STRASTID and ENDASTID
      *When run it will attach every asset ID from STR to END to the
      *specific donor ID in the master ASSETS file
      *
      *The DONOR file will be a keyed index that just houses the donor
      *information.
      *The key will be the DONORID, a numeric ID matching the same length
      *as ASSETID in ASSETS
      *
      *The DONOR file should also have extra fields for one-time non-tang
      *ible donations; a month's free rent, $1,000 cash donation, etc
      *----------------------------------------------------------
     C                   DOU       STRADD = 1
     C                   EXFMT     TAXSTART
     C
     C                   IF        *IN01 = *ON
     C                   SETON                                        71
     C                   EVAL      STRADD = 1
     C                   EVAL      PHYSDON = 1
     C                   ELSEIF    *IN02 = *ON
     C                   SETON                                        70
     C                   EVAL      STRADD = 1
     C                   EVAL      PHYSDON = 0
     C                   ELSEIF    *IN12 = *ON
     C                   EXSR      DIE
     C                   ENDIF
     C                   ENDDO
     C
     C                   EXSR      ADDDATA
      *----------------------------------------------------
     C     ADDDATA       BEGSR
     C                   EXFMT     TAXADD
     C
     C                   IF        *IN05 = *ON
     C                   EXSR      VALIDATE
     C                   EXSR      WRITERCD
     C                   ELSEIF    *IN06 = *ON
     C                   EXSR      VALIDATE
     C                   EXSR      WRITERCD
     C*                  EXSR      PRTRCPT
     C                   ELSEIF    *IN12 = *ON
     C                   EXSR      DIE
     C                   ENDIF
     C
     C                   EXSR      VALIDATE
     C                   EXSR      WRITERCD
     C                   EXSR      DIE
     C                   ENDSR
      *----------------------------------------------------------
     C     GETLSTRCPT    BEGSR
     C                   ENDSR
      *----------------------------------------------------------
     C     VALIDATE      BEGSR
     C                   ENDSR
      *---------------------------------------------------------
     C     WRITERCD      BEGSR
     C*                  OPEN      TAXRCPT
     C
     C                   MOVE      1             TAXNBR
     C                   MOVEL     INDNAME       TAXNAME
     C                   MOVEL     INDCITY       TAXCITY
     C                   MOVEL     INDST         TAXSTREET
     C                   MOVEL     INDZIP4       TAXZIP
     C                   MOVEL     INDTEL        TAXTEL
     C
     C                   IF        PHYSDON = 1
     C*JUMP INTO A LOOP FOR THE MASTER ASS1T FILE HERE
     C                   MOVEL     'NA'          TAXNTITM
     C                   MOVEL     0             TAXNTVALU
     C                   ELSE
     C                   MOVEL     INNTDESC      TAXNTITM
     C                   MOVEL     INNTVALUE     TAXNTVALU
     C                   ENDIF
     C
     C                   WRITE     TAXREC
     C                   CLOSE     TAXRCPT

     C                   ENDSR
      *----------------------------------------------------------
     C     DIE           BEGSR
     C                   MOVEL     *ON           *INLR
     C                   RETURN
     C                   ENDSR

Programs collected by LLM agents experimental · unverified

Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.

Simple RPG IV Program

Provenance: commit df9cd3eb50 · authored 2025-10-22T17:16:26+02:00 · model openai/gpt-4o · Temp 0.4
code.rpgle · added: 2025-10-22T15:16:26Z
H DFTACTGRP(*NO) ACTGRP('MYACTGRP')
FMYFILE   IF   E           K DISK
D* Define variables
D Name            S             10A
C* Read the file
C     MYFILE    IF   E
C     READ      MYFILE
C     DOW       NOT %EOF(MYFILE)
C* Process each record
C     EVAL      Name = %TRIMR(Name)
C     WRITE     MYFILE
C     READ      MYFILE
C     ENDDO
C     SETON                                        LR

Contribute — propose a file extension

Tell us where to find evidence about RPG IV (mapped to pl/rpgle). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/RPG IV/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← RPG III RPGLE →