Crimson Solutions - Net.Data, RPG, RPGLE, software testing Crimson Solutions - Net.Data, RPG, RPGLE, software testing Crimson Solutions - Net.Data, RPG, RPGLE, software testing


My server logs show that many people are coming to this site with general questions about AS400s, so I've added a few pages in which I discuss some of the topics people are searching for.

How can I do scripting on an AS400 ?

There are effectively three scripting languages available on the AS400. Two of them are native, and the third is perhaps a little better known. We'll start with the native ones.


REXX is a scripting language which can run on the AS400 either in base OS400, or as part of a CGI implementation. It is fairly easy to learn and also easy to implement, however it has one serious drawback which renders it useless for many purposes. What's the problem ? Well, there is no interface from REXX into the DB2 database. Yes, that's right, you can can't access your data with it. So why use it ? It has some useful functions which can't be achieved easily in a compiled language, like you can effectively do the equivalent of a javascript "eval" statement, so it can be useful for self modifying scripts. But that's about it really.


Now we come to NetData. This is the IBM scripting language for the web. It's very easy to learn, does interface into the database (hurrah!), and has all the CGI functions you'll need. It's a little more strict than other scripting languages, requiring much of the actual processing of data to be performed in user-defind functions, but this does actually benefit you in the end as you are then forced to keep the presentation layer slightly apart from the application layer. The only disadvantages over compiling RPG CGI programs are that it does run a little slower than the compiled versions (obviously) and that Netdata is now ONLY supported on AS400s. However, support for the language is planned to continue, and I would personally recommend use of it. It's about ten times as quick as RPG to develop in, and perfect for the web.


Yes, you read right, PHP is now available for the AS400. However, it's not provided as part of the operating system like REXX and NetData are, and you have to go download the binaries. Also it runs under AIX, so it's not part of the standard OS400 architecture that supports your RPG and CL programs. It does however support the DB2 database on your 400, so it's of more use than REXX, plus it's a de-facto web standard scripting language so finding developers is a bit easier.

This article was submitted by me, Vince Lewis. I hope that the hints and tips above prove useful to you

Back to FAQs

© 2005 Crimson Solutions