Keep your Watch for changes the Free RPG/i5 (AS400) Tools web blog. on the
Free RPG/i5 (AS400) Tools web blog. for all the latest information on your favorite RPG/i5 Tool.
RPG/i5 Tools - FREE RPG/i5 (AS400) software downloads.  This site has examples (source) of many utilities that use APIs and procedures.  Most of them are written with Free Format RPG IV/ILE and take advantage of RPG/i5 (AS400) service programs.
RPG/i5(AS400) WebRing
Add this web site to your favorites Download Free Utilities Upload Your RPG/i5 (AS400) Utility Order CD-Rom About RPG/i5 Tools RPG/i5 Frequently Asked Questions Today's top RPG/i5 headlines Other Links Contact Us
The Free RPG/i5 (AS400) Tools Mission

These tools are intended to be used for your reference & are licensed as freeware. They are not meant to be end all, be all utilities. You may use these tools in anyway you wish. Commercial or other non-personal use is ok, just as long as you leave the copyright & author information intact.

Most of them have been written using Free Format RPG IV/ILE (RPG Free) & many of them utilize my own service program ( ISTPRCR ). This service program is contains several common procedures that I have written. Some of the procedures that are included are:
  1. Center - Center text in a variable
  2. ObjText - Retrieve the text of an object
  3. LCase - Convert Text to lower case (Using the system language)
  4. UCase - Convert Text to upper case (Using the system language)
  5. ExecuteCommand - Run an RPG/i5(AS400) command using the QCAPCMD API
  6. CheckCommand - Validate & return the proper syntax of a command using the QCAPCMD API
  7. SystemValue - Return an oprerating system value using the QWCRSVAL API
  8. SndPgmMsg - Send a Program Message using the QMHSNDPM API
  9. SndUsrMsg - Send a User Message using the QMHSNDM API
  10. MbrText - Retrieve a member's text using the QUSRMBRD API
  11. RtvSysName - Retrieve the RPG/i5(AS400) system name using the QWCRNETA API
  12. FileInfo - Retrieve physical file information (records, size, etc..) using the QUSRMBRD API
These are just some of the procedures that are included with each download. Plus more are always being added.

These RPG source samples/examples are designed to be generic in nature & very little hard coding has been used. In all cases I have used RPG IV & in most I have used Free Format RPG.

I have tried to take advantage of the AS400 system APIs & built in RPG IV/ILE functions (BIFS) wherever possible. You are encouraged to modify the source to suit your needs & to learn from my mistakes. If you do make any enhancements, by all means upload ). them back to this site, I will be glad to post them. Also, If you have any suggestions for new tools or enhancements, please send them to me as well.

Please remember, the primary purpose of this site is not just to give away free software. It is to share knowledge! That knowledge is primarily directed at the RPG/i5 (AS400) platform & RPG, but as you can see from my other downloads section, I am willing to share any knowledge that is helpful.

I would highly reccomend that you download the CMPANYSRC command. This command will make a lot easier to use the Free RPG/i5 (AS400) Tools . This command can also be very useful in your own environment when trying to establish standards for compiling objects.

Just a Note: If you have some time on your hands (Like I wish I did) & you would like to make an enhancement to one of these tools. The indent utility is in desperate need of an upgrade. It needs to be able to indent Free Format RPG & there are a few tweaks it could use for the other forms of RPG as well dealing with longer field names & things like the eval statement. I haven't had the time to do this myself, so if you are interested I would be willing to offer a free membership to anyone who does it. Please send me an e-mail if you are interested.

Please keep in mind, (as it is with all freeware/shareware) this software is supported by you (hence the reason I give you the source). I will be more than happy to answer your e-mails (if I can), but I do have a day job. So please do not be disappointed if your e-mails don't get answered right away.

Some of the more popular utilities you will find here are:
  1. CALCDATE - Calculate Date with RPG Date Fields
  2. CHGCURUSR - Change the currently signed on user
  3. CMPANYSRC - Compile Any Source Member
  4. CVTRPGEND - Convert RPG End Statements
  5. CVTSPLF - Convert an RPG/i5 (AS400) Spool File to PDF or HTML document.
  6. DLTOSPLF - Delete old Spool Files
  7. FTPGEN - Generate FTP Script to Allow Re-Upload
  8. FTPSRC - Download Source Members VIA FTP
  9. GETFFD - Get/Display Field Field Layout
  10. POPMSG - Display Message in a Popup Window
  11. RECORDS - Show Number of Records in a File
  12. RTVSRC - Retrieve Source from ILE Modules
  13. SETDBG - Set Source Debug Screen to 132 Columns
  14. SQL - Run any SQL Command
  15. SRDESC - Save & Restore Member Text
  16. WRKDBF - Work with Database File V10.11.03

Proceed to Free Downloads


Show your support of RPG/i5 (AS400) open source & use these links on your website to link to us.

Have you become a member yet?
When you become a member of the Free RPG/i5 (AS400) Tools club, you get the privilege of being able to download the newest tools before anyone else. Plus by becoming a member you will be eligible to receive a %50 discount on next year's membership dues.
You can become a member for only $14.95 by pressing the Order Now button.
Order Your Free RPG/i5 (AS400) Tools Membership


Remember you can get even more when you get a copy of the Free RPG/i5 (AS400) Tools on CD-ROM. Any new tools that are added will only be available for download by Free RPG/i5 (AS400) Tools members until the next volume of the CD-ROM comes out next year. That means that if you are not a member & an new tool is added, you may have to wait an entire year before you can download it!. Plus just think of the time you will save not having to download all of the tools one at a time. You can get your CD & membership for only $24.95 by pressing the Order CD button.
Order Free RPG/i5 (AS400) Tools Subscription & CD-Rom


Press the Proceed to Downloads button to get a list of Free RPG/i5 (AS400) Tools that can be downloaded.
Proceed to Free Download Page
Upload RPG/i5 (AS400) Utilities

Enter File to Upload

Enter your name(If you want credit)

Enter your e-mail address

Enter the Utility description

The only required field is the file itself. If you really want me to publish it, you need to enter everything. Whatever you put in the name field will be placed with the utility on my web site. Your e-mail address will not be made public. I will only use it to forward inquiries from people who download your utility.

You may upload any software that you have the right to freely distribute. I would prefer that you upload RPG/i5 (AS400) source, but if you have or find some truly unique or outstanding software that is not from the AS400 (from any platform) that may be of interest to people using the RPG/i5 (AS400) system then by all means upload it.

Also if you include your website address in the description I will place a link in the text. Also I will include a link to it on the Free RPG/i5 (AS400) Tools web blog .
Order the Free RPG/i5 (AS400) Tools on CDROM

Don't feel like downloading 70+ tools. Don't have the time.
Now you can get a copy of all the Free RPG/i5 (AS400) Tools on your very own CD-ROM. For just $24.95 plus $4.95* shipping & handling, you can order a copy of all the utilities.
Also by ordering the cd, you will be eligible to receive 50% discount on next year's membership renewal. Plus you will then be able to download any new tools that become available during the year without having to wait for next year's CD to be released.

Just press the Buy Now button at the bottom & follow the PAYPAL instructions to pay for your purchase.

You will receive your CD in about a week or so. It will include a userid & password that will allow you access to the newest utilities that are not yet available to non-members.

If you would prefer to only subscribe to the Free RPG/i5 (AS400) Tools as a member & not receive the Free RPG/i5 (AS400) Tools CD-Rom. You can do so HERE for only $14.95

iSeries CPU Serial Number
* US continental shipping only, Please contact us for international shipping charges.
The Free RPG/i5 (AS400) Tools Frequently Asked Questions

Q: How do you return (output or In/out) values from an RPG program in a stored procedure to an external system (ie.. PHP or java)?
A: Although I'm sure there are many techniques, the one I use is to select the stored procedure results in a SQL & display them. You can use a second stored procedure as sort of a wrapper procedure. Click at: HERE to see an example.

Q: How do I chain to a file in RPG Free Format without defining a KLIST?
A: There Two methods:
  • Define a data-structure (equal to the key list) & use the %KDS bif to chain to the file.
  • List each field on the chain statement ie.. chain (field1:field2:field3) filename;


Q: How can I make all output from a specific program be listed under a single user?
A: Since the output is generated for the user that is currently running the job, the only way would be to submit the job for the specific user. Another way would be to change the user that is currently signed on. This can be accomplished by using the QSYGETPH api (to retrieve the specific userid inforation) & the QWTSETP api to actually change the current user that is signed on. I have created a utility to automate this, you can download it at: Free RPG/i5 (AS400) Tools

Q: How do I show the interactive source debugger screen in 132 column mode like it does when you debug a program VIA a service job?
A: You have to add an environment variable (ILE_DEBUGGER_1) with a value of ALLOW_WIDE_SCREEN. This is set for each job & will only remain active until you sign off. You can also remove the variable go back to 80 column mode. I have created a command that will toggle this variable back & forth. You can download it at: Free RPG/i5 (AS400) Tools

Q: How do I convert non-Free RPG to RPG Free?
A: IBM hasn't given us any free (good) solutions & I have not found any myself, but I have found a couple of other options:
  • There is an option in the WebSphere Development Studio Editor to convert RPG C-Specs to Free Format.
  • Linoma Software has a pretty good tool to convert RPG to Free Format (I have used it myself). You can download a free trial here .
  • I have also found a very useful resource here . Craig Rutledge's website has always been a good resource for me.
  • I will add more as I find them, otherwise I would say your best be is to re-write them.


Q: How do create/use a FTP script on the RPG/i5 (AS400)?
A: Essentially the FTP command on the AS400 works the same way it does on any other platform. All of the FTP functions are the same. You just need to understand how/where the FTP command gets/uses the script file(s). By default the FTP command on the AS400 will expect to find a file called INPUT that it will use for it's script and a file called OUTPUT that it will use for an output log. If the OUTPUT file does not exist, it will create it in QTEMP.
What you want to do in order to create a script for the FTP command is:
  1. Create a source member to use as a FTP script.
  2. Create a source member to use as a FTP log.
  3. Add FTP commands to your script member (an example can be found HERE ).
  4. Override the INPUT file/member to your script member
    OBRDBF FILE(INPUT) TOFILE(QGPL/QFTPTXT) MBR(YourMember)
  5. Override the OUTPUT file/member to your log member
    OBRDBF FILE(OUTPUT) TOFILE(QGPL/QFTPTXT) MBR(YourMember)
  6. Run the FTP Command (Pointing at the appropriate system)
You can look at your log file/member to debug any problems. I have created a tool that will automate this process.
It uses mostly CL, but it does have an RPG component that prompts for the target system. This tools also utilizes the edtsrc tool to create/build the script member.

Q: How do I keep Windows XP from treating Zip files as folders? (Ok so this has nothing to do with the i5(AS400), It just annoys the crap out of me!)
A: Turn it off:
  1. Select Run from the Start Menu.
  2. Type regsvr32 /u %windir%\system32\zipfldr.dll at the prompt, and click Ok.
  3. The change will take effect immediately, but you may have to restart Windows for all traces of the built-in ZIP support to disappear.
If, at any time, you wish to re-enable Windows XP's built-in ZIP support, just follow these steps:
  1. Select Run from the Start Menu.
  2. Type regsvr32 %windir%\system32\zipfldr.dll at the prompt, and click Ok.
  3. The change will take effect immediately, but you may have to restart Windows for all features of the built-in ZIP support to be available.
This and many more windows tips can be found at: Annoyances.org

Q: How do I verify the contents of a field is numeric in RPG Free without using the TEST(N) opcode?
A: Since the TEST(N) is not supported in RPG Free, the best way I have found to accomplish the same thing is to, use the %Check BIF. You can do this with the following code:
if %Check('0123456789':YourField:1) <> 0;
   "DO SOME CODE";
endif;

In this example, "YourField" is the variable name and the "012345679" are the valid characters. The function will start searching from position one. If any character is found that does not exist in the valid character list, it will return the position of the invalid character. The example assumes that any value other than zero is invalid without regard to what/where it is.

Loading...
RPG/i5 (AS400) Links:
Other Links:


This page contains links to sites that operate independent of Free RPG/i5 (AS400) Tools & we are not responsible for their content. Although we attempt to maintain a high standard for the sites we partner with, occasionally things change without our knowledge. Please inform us if a link is broken or the content of a website no longer fits the description that is represented here.

Show your support of RPG/i5 (AS400) open source & use these links on your website to link to us.
Free Software Downloads
RPG/i5 (AS400) Utilities
calcdate - Calculate Dates chgallown - Change Owner for All Objects Owned
chgcurusr - Change Current User chgdate - Change a Date
cleanqpa - Clean up QPADEV* Devices cleanup - Remove All Objects with No Source
clrdtaq - Clear Data Queue clrfiles - Clear All Files in a Library
clrmbrs - Clear All Members in a File cmpanysrc - Compile Any Source
cmpmsgf - Compare message Files cpylibaut - Copy library objects and authority
crtusp - Create user space ctrdta - Center text in data field
cvtbpcs - Convert BPCS Menus to Custom Menus cvtdspdta - Convert Display Data
cvthex - Convert a Field s Contents to Hex cvtrpgend - Convert RPG End Statements
cvtsplf - Convert Spool File to HTML or PDF dedup - Remove Duplicate Records from a File
dltobjsrc - Delete Object and Source Member dltosplf - Delete Old Spool Files
dltrrn - Delete Records x Relative Record Number dspdata - Display All Records in a File
dspusrspc - Display User Space edtcde - Apply Edit Code to Variable
edtsrc - Edit Source Member expdds - Export File Layout to DDS
ftpfile - Send/Receive Files VIA FTP ftpgen - Generate FTP Script
fts - File Transfer Support getajob - Retrieve Active Job Attributes
getdbr - Display Database Relations getffd - Retrieve File Field Descriptions
getfile - Get File Information getjob - Get Current User Jobs
getjobd - Get a Job Description getlsiz - Retrieve the Size of a Library
getmbrtxt - Get Member Text getmsgf - Output Message File to DB File
getobjd - Get Object Description RPG Program getoutq - Create File for Outq Entries
getoutqd - Get Output Queue Description getpanl - Get Password Analysis Data
getpass - Get Current Users Password getpfa - Get Physical File Attibutes
getpgmi - Get Program Information getsysnam - Get System Name
getsysval - Get System Value impexp - Import/Export Save File
indent - Indent CL Program istsetup - iSeries Tools Setup Process
jrnlpf - Stop/Start Journaling for a File libsize - Calculate the Size of a Library
lstlibs - List Librarys on System lstobj - List Objects to a Data File
monmsgq - Monitor Message Queue - Users movpfm - Move Physical File Member
newlib - Create New Library with Source Files pfjrnl - Create Journal Source Member - F Member
popmsg - Display Popup Message prglibs - Purge Old Librarys
prtad - Print AS/Set Action Diagram pulldown - Interactive Operations Menu Bar
rbldfil - Rebuild Physical & Attached Logicals rbldlgl - Rebuild Logicals Attached to a Physical
records - Display Number of Records in a File rmvdepl - Remove Dependent Logicals
rmvobj - Remove Object Regardless of type rpltxt - Replace Text in a Variable
rtvcurpgm - Retrieve Current Program Name rtvmsgd - Retrieve Message Description
rtvprvcmd - Retrive Previous Command rtvsrc - Retrieve Source from ILE Modules
rtvuspi - Retrieve user space initialization savedata - Save PF Data to Source File
scan - Scan a Variable for Text scnrplsrc - Scan & Replace Text in Source Members
setdbg - Set Current ILE Debugger Mode setenv - Environment Libraries
sql - CL program to run sql statment. srdesc - Save/Restore Member Descriptions
stsmsg - Message Processing Program swsrqcl - Switch System Request Command Line
unmatch - Print Unmatched Source & Objects updsplf - Update Spool File Attributes
whereisit - Where is an Object/File being

Files Uploaded by Others
blankweb - Blank Web Page datetime - Date and Timestamp formatter. Written in RPGLE, but using mostly Java prototyped calls.
dlrwords - Convert money amount into word phrase. Written in RPGLE Free Format using prototypes and service procedures. dspscratr - Display Screen Attributes
ftpsrc - FTP Source Members from an iSeries/i5 (AS400) Source File getdtefmt - Get Date Format
grpjobatn - Group Job Attention Program isrscht - AS/400 based chat utility that mimics internet based chat rooms.
metapad - METAPAD - Windows Notepad Replacement popkiller - Popup Killer - Block Popups in IE
sendpcf - Send File VIA EMail spamarest - SpamArrest - Spam E-MAil Blocker
startpro - Start PRO Windows Startup Editor wrkdbf - Edit iSeries(AS400) Database Files
xpsearch - Fix Windows XP Text Search


Upload Your RPG/i5 (AS400) Utility to Share

The Free RPG/i5 (AS400) Tools Annual Membership Subscription

If you just want the ability to download great new tools before anyone else & you don't need a copy of all the utilities on CD, You can now purchase just a yearly subscription for only $14.95. With this subscription you will receive a user & password that will allow you to download new tools as soon as they are posted. All you have to do is enter your RPG/i5 serial number below & push the buy now button. You will then be presented with a PayPal screen to pay for your purchase. Once your purchase is confirmed, you will receive your userid & password VIA e-mail within Two business days.
iSeries CPU Serial Number
About FREE RPG/i5 (AS400) Tools.

These iSeries/i5 (AS400) Tools are a collection of tools that I have gathered over the past 20+ years. Some of them can trace their roots all the way back to the S/34. Many of them were written the the AS400 was the AS400 and not the i5 as they are calling it today. I have steadily improved and added to all of them as the AS400 grew into the iSeries and now to the i5.
Most of them I have written myself, some of them were written by friends & co-workers. These tools are provided for free & are distributed as source only. You'll need some knowledge of ILE & service programs in order to compile many of these programs. I have included a readme file with each tool that gives basic instructions on how to compile the software, but each environment is different & you may need to make some modifications (depending on your AS400/OS400 operating system version) to make the tools work for you. Some of these tools are very specific for a single AS400 need, but most are pretty broad. I have always tried to make the code as generic as possible (using variables instead of hardcoding) when I wrote them. I usually try to use APIs & I almost never use CL (I have nothing against CL, I just prefer RPG on the AS400). Over the years I have tried to keep the tools updated with the latest code changes(ie..RPG ILE, BIFs, AS400, iSeries, i5), but some of the tools are just not worth spending the time. I have tried to name the commands with different than OS/400 commands(ie.. GET instead of RTV) to avoid any conflicts.
Many of these tools duplicate the functions that were once done by the old TAATOOL (which were free on the AS400) utilities. Because those tools are now licensed, I have since replaced their function (at least the ones I was using) with my own utilities. In some cases, the tool names are still the same as the ones that TAATOOL used & therefore could cause issues if you still have those tools on your AS400 system.
Please remember that these tools are meant as reference & to help you create your own software. They can of course be used as is, but please make sure that you understand what they are doing before you try to use them. No one is perfect & programs can have bugs, protect your system at all times with backups!

Most of the tools/programs on this site are for the iSeries (AS400), but some are for other platforms such as Windows & DOS. They are for the most part related in some way to the iSeries (AS400), but not always. Any tool/utility that I put on the site for the iSeries (AS400) is always in source. In some cases I have found software that I just have found particularly useful and put on the site.
You are welcome to upload any software you wish. I would prefer it to be iSeries (AS400) related & to be in source not object (so others can learn from it). Please remember if you do upload something, if you don't give me your name & other pertinent information I won't be able to give you credit for it.

Show your support for FREE RPG/i5 (AS400) open source & use these links on your website to link to us.

This site is protected by the bad robot trap!

Those 206 new emails don't mean you've suddenly become very popular.  Try SpamArrest Now!
Try Sticky Password Manager
See what this server is running.


Free RPG Tools Custom Search