Repository navigation
This is the first release of Bob Cozzi's IBM i *SRVPGM named CGIHELPER. A 3rd generation IBM i Web/CGI helper service program for Developers who need to communicate with web browsers via RPG IV.
It is a much lighter weight CGI service program than earlier options like CGIDEV2 or COZTOOLS CGILIB. This version uses fully contemporary RPG IV free-format code and logic to accomplish things that previously took dozens of lines of code and API calls.
A save file (SAVF) and the full source are both available on this release.
Download the save file, upload it to your IBM i server, then restore the CGIHELPER library (all source is included).
Then use one of the sample/demo programs in the QUSRSRC source file to see patterns for utilizing this service program.
If you want to browse the source code, I've uploaded it as well.
The DSPMSGQ program is a particularly good example.
The save file is listed below and can be download directly to your PC.
Then use FTP to upload it to your IBM i server, likely to QGPL.
Then restore the library using the RSTLIB command. Something like this:
RSTLIB CGIHELPER DEV(*SAVF) SAVF(QGPL/CGIHELPER) ALWOBJDIF(ALL) MBROPT((ALL)
The full source code is in the standard source file names, for example: RPG IV code is int the QRPGLESRC source file, while /copy and /include members are stored in the QCPYSRC source file.
Added a new cgi_ENCODHTML that calls cgi_ENCODEURI with the "HTML" parameter. Also now escapes embedded \n symbols to provide better support for output of source code to an HTML page.