RPG

Goto Main Page
Goto Documents

RPG Documents

RPG RAW XML Interface

RPG interfaces

XMLSERVICE APIs (included)

XMLSERVICE library includes language transports for popular REST and DB2 connections, which fulfills needs for most internet services applications.

  • XMLSERVICE/XMLCGI.PGM— RPG CGI HTTP/REST method GET or POST (traditional web service interface)
    • http://myibmi/cgi-bin/xmlcgi.pgm?db2=x@uid=x@pwd=x@ipc=x@ctl=x@xmlin=x@xmlout=x
  • XMLSERVICE/XMLSTOREDP.SRVPGM — RPG DB2 stored procedure (IBM i’s premier DB2 for i)
    • DB2 drivers local/remote with stored procedure IN/OUT capabilities (traditional DB2 interface)
       
      iPLUG4K  (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CHAR(4064),  OUT XMLOUT CHAR(4064))
      iPLUG32K (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(32000), OUT XMLOUT CLOB(32000)) 
      iPLUG65K (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(65K),   OUT XMLOUT CLOB(65K)) 
      iPLUG512K(IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(512K),  OUT XMLOUT CLOB(512K)) 
      iPLUG1M  (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(1M),    OUT XMLOUT CLOB(1M)) 
      iPLUG5M  (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(5M),    OUT XMLOUT CLOB(5M)) 
      iPLUG10M (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(10M),   OUT XMLOUT CLOB(10M)) 
      iPLUG15M (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(15M),   OUT XMLOUT CLOB(15M))
      
    • DB2 drivers local/remote without stored procedure IN/OUT capabilities (loop fetch required)
      iPLUGR4K  (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CHAR(4064))
      iPLUGR32K (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(32000)) 
      iPLUGR65K (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(65K)) 
      iPLUGR512K(IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(512K)) 
      iPLUGR1M  (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(1M)) 
      iPLUGR5M  (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(5M)) 
      iPLUGR10M (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(10M)) 
      iPLUGR15M (IN IPC CHAR(1024), IN CTL CHAR(1024), IN XMLIN CLOB(15M))
      
  • XMLSERVICE/XMLSTOREDP.SRVPGM — optional custom transport (programmers only)
    • if included XMLSERVICE transports do not fill your need, please feel free to create your own (sockets, data queues, ftp, etc.). Multiple entry APIs exist in XMLSERVICE that you may find useful:
      xmlstoredp.srvpgm - *SRVPGM interface for calls
      
        Native stored procedure call target (iPLUG4K - iPLUG15M):
           D iPLUG4K         PR             1N   extproc(*CL:'iPLUG4K')
           D pIPC                        1024A
           D pCtl                        1024A
           D pXmlIn                          *
           D pXmlOut                         *
      
         RPG call target:
           D runClient       PR             1N
           D   pIPCSP                    1024A
           D   pCtl                      1024A
           D   pIClob                        *
           D   szIClob                     10i 0
           D   pOClob                        *
           D   szOClob                     10i 0
      
         PASE call target (also use RPG when CCSID issues):
           D runASCII        PR             1N
           D   pIPCSP2                       *
           D   szIPCSP2                    10i 0
           D   pCtlSP2                       *
           D   szCtlSP2                    10i 0
           D   pIClob2                       *
           D   szIClob2                    10i 0
           D   pOClob2                       *
           D   szOClob2                    10i 0
           D   ccsidPASE2                  10i 0
           D   ccsidILE2                   10i 0
      
      

Author(s)

Tony “Ranger” Cairns - IBM i PHP / PASE