View Only
Expand all | Collapse all

IBM i API Prototypes in RPG free

  • 1.  IBM i API Prototypes in RPG free

    Posted Wed December 16, 2020 04:36 PM
    Hi Everyone,
    I'm putting together a set of /INCLUDE members that contains the Prototypes for IBM i APIs.
    The C language has these in the H file in QSYSINC but for 30 years IBM has failed to add them to QCPYSRC (or even QRPGLESRC) in QSYSINC.
    Over the last 30 years, I've been prototyping the ones I've used and now I am, as needed, converting them to the free format RPG syntax.

    I'm trying to figure out if I should just post them on my website for download or if there's a public place that IBM sponsors where everyone can get into it without being a member of this club or group or a customer of company xyz?

    I've got most of the commonly used APIs already prototyped and many have been converted to free format. I am currently working on the more complex Message QMH* APIs.
    I see this as a living document until everything that people actually use has been published.

    As an example, here's the correct QCMDEXC prototype in free format:

    dcl-pr qcmdexc extpgm('QCMDEXC');
    cmdString char(32702) Const OPTIONS(*VARSIZE);
    cmdLength packed(15:5) Const;
    IGC char(3) Const OPTIONS(*NOPASS);

    -Bob Cozzi

  • 2.  RE: IBM i API Prototypes in RPG free

    Posted Thu December 17, 2020 02:16 PM
    Edited by David Gibbs Thu December 17, 2020 02:16 PM

    FWIW: There has been an effort to create RPG prototypes on the midrange wiki.

    David Gibbs
    Owner / Administrator

    I'm riding in the American Diabetes Association's Tour de Cure to raise money for diabetes research, education, advocacy, and awareness. You can make a tax-deductible donation to my ride by visiting

    You can see where my donations come from by visiting my interactive donation map ... https:/ (it's a geeky thing).

  • 3.  RE: IBM i API Prototypes in RPG free

    IBM Champion
    Posted Thu December 17, 2020 05:45 PM

    Perhaps a GitHub repository ?

    Great place for all general code samples to live.

    Richard Schoen

  • 4.  RE: IBM i API Prototypes in RPG free

    Posted Thu December 17, 2020 05:53 PM
    I was thinking more along the lines of an easy to get to resource. I know GIT is the current "cool" thing but such a tiny percentage of actual shops have staff that even know what that is. But I'm all for it if there a CL command we can build that says:

    GetFromGit SRCMBR(QUSROBJD) SRCFILE(MYLIB/QCPYSRC) RMTLOC('/blah,blah,blah,blah') ...

    I'm not a fan of making people learn "Garage Linux" just to load source. But if there's an ease CL command to pull it down. Let's go with that.


  • 5.  RE: IBM i API Prototypes in RPG free

    IBM Champion
    Posted Thu December 17, 2020 06:13 PM