Note the several of these utilities compile into *MODULE or *SRVPGM objects, which then need to be added into a binding directory. I have a binding directory called UTILITY in library QGPL, which I use as a global binding directory for my utilities. You can obviously use your own binding directory (or explcitly define the *MODULE's and *SRVPGM's in your compilation commands), but note that several of the utilities explicitly refer to BNDDIR(QGPL/UTILITY) in their compile preprocessor comment lines.
Many of the utilities use the compile preprocessor which I wrote a while back and which was published in the System i Network magazine. If you have not installed this compile preprocessor, I suggest you do so. If you prefer not to, each source member contains some comments at the top of the source which describe the compilation command to use to compile the source member - these comments are identified with '*O:'. There may also be some pre- or post-compile commands, which are identified with '*C:'. The PRCSRC member is a good example.
The Web Access User Validator (WWWVALID) is a service program which can be added to any existing CGI program, to AUTOMATICALLY provide the following:
These additional options can be added to your existing CGI programs with only a few lines of code, and with no changes to HTTP server configuration.
WWWVALID can be downloaded from https://sourceforge.net/projects/wwwvalid/.
This utility can be used to send a command (or series of commands) to another job. The other job will execute them immediately, using that jobs authority. This can be used to view objects in another jobs QTEMP library. Note that this only works up to V5R2, after which IBM stopped allowing the TRCJOB command to specify an exit program :-(. You'll also need the Program Status Data Structure copybook (RPGLE source) to compile SNDCMDR and RCVCMDR.
CMD source for SNDCMD command
PNLGRP source for SNDCMDH command help text panel group
RPGLE source for SNDCMDR program
RPGLE source for RCVCMDR program
I'm no longer hosting this utility, since it has been published in the SystemiNetwork magazine and is available on their website. You will need a ProVIP membership to get it though.
Link to SystemiNetwork article (with code download)
This is the code for a CRTMIPGM command which allows you to create an MI program from statements in an MI source file. The command includes full help text etc., and all parameters are supported.
Source for CRTMIPGM command
Source for CRTMIPGMH command help text
Source for CRTMIPGMR command processing program
This simple module can be used to retrieve a procedure's name. It uses the QWVRCSTK API. It can be bound into a separate 'utility' service program so that it's usable by any procedure in any program in your application.
Source for PROCNAME module
Source for PROCNAME_P prototype copybook
This simple program is used in conjunction with a control file to determine which FTP operations (GET, PUT, DEL etc.) can be used by people accessing your System i. All FTP operations are automatically logged. The FTP exit program must be registered as an FTP exit program with the WRKREGINF command.
Source for FTPEXITR program
Source for FTPEXITP physical file
This simple procedure allows you to generically process a (typically CL) source member. You simply pass the procedure the name of the source file, source member and a procedure pointer to a user-written procedure. ReadSource() reads every record in the source member, concatenates them where required (following CL continuation rules) and passes the statement to the user-written procedure. A test wrapper program is included.
RPGLE source for PRCSRC module
RPGLE source for PRCSRC_P prototype copybook
RPGLE source for TESTPRCSRC program
This simple procedure is a wrapper to the QCAPCMD API. Rather than include the (relatively complex) QCAPCMD code directly in your program(s), you simply call the cl() procedure. You can pass an error code (same as the QUSEC structure) or not (in which case it simply calls system(). A test wrapper program is included. You'll also need the API error structure (QUSEC_T) copybook (RPGLE source) to compile the CMDPRC module.
RPGLE source for CMDPRC module
RPGLE source for CMDPRC_P prototype copybook
RPGLE source for TESTCMDPRC program
SSIFTP is (as the name suggests) a simple FTP client, designed specifically for copying objects (such as save files), source members and IFS files to and from a System i. It's simply a batch (.BAT) file, which you copy onto your PC.
Once you have SSIFTP.BAT on your PC, you can create shortcuts to it and in the Target field in the shortcut properties, you can pass parameters to SSIFTP to automate (or at least semi-automate) common FTP tasks such as copying save files from the System i onto your PC (prior to zipping them up and sending them to customers) or copying source members from your PC (such as the source members on this page) onto your System i so you can compile them.
Here's how you do it:
"C:FTPSSIFTPSSIFTP.BAT -m myas400 -u rory -p rorypass -w N -l C:FTPTemp"This means that when I click on the shortcut, I don't need to specify the machine, user, password or local directory.
The Data Queue Server is some open-source software I wrote to enable others to easily make use of data queues to perform asynchronous processing. It's simply a zip file (DQ.ZIP) which contains a bunch of text files, including a readme.
DQ was last updated on July 29th 2009.
Data Queue Server (DQ.ZIP)
In the March 8, 2007, issue of this newsletter, I wrote about a utility called Add Temporary Triggers (ADDTMPTRG) that adds temporary triggers to a file. You can find the original article at the following link: http://systeminetwork.com/article/add-temporary-trigger-utility.
I subsequently wrote a follow-up article where I provided an updated copy of the ADDTMPTRG utility at the following link: http://systeminetwork.com/article/add-temporary-trigger-utility-part-2.
I'm posting a link here because I was asked about this utility recently. You need a ProVIP membership to read the article and/or download the code.