Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl on IBM AS/400?

by Dragonfly (Priest)
on Mar 28, 2001 at 14:52 UTC ( #67796=note: print w/ replies, xml ) Need Help??


in reply to Perl on IBM AS/400?

I did a project requiring Perl on the AS/400 (isn't it iSeries now?) last summer. The project was a success, but I must say that I didn't find trying to get Perl running correctly to be a pleasant experience, although this may have been due to a lack of experience working on the AS/400 on my part.

You might want to consider looking at the alternatives. The Perl port on CPAN listed above is for version 5.005, and it looked to me as though the port was not being supported very well. If you are serious about doing some kind of CGI programming on the AS/400, you might want to look at Brad Stone's BVS Tools site and the book, e-RPG, which although spendy might bring you more success in this endeavor.

Some of the problems I ran into included but are not limited to

  • STDIN, STOUT, and STDERR are environmental variables on the AS/400, which interfere with some Perl scripts. This problem is easily solved, if memory serves.

  • the fork() call is not supported at all.

  • there is no help to be found on the mailing lists because there are only two other people in the world that have succeeded in getting Perl to run on the AS/400, and one of them is the port maintainer, and the other one is you.

  • Apparently many AS/400 programmers, after getting burned by IBM during the Java-is-the-Messiah zealotry era, are now reluctant to attempt to use languages not native to the AS/400. Therefore asking for technical help can be similar to asking a Porsche 944 owner to help you rebuild the CV joints on your Mazda by ordering spare parts under their warranty.

  • My memory is a bit fuzzy here but if I recall correctly each Perl script had to have a compiled PGM file in the system library. It took me forever to set these up correctly. They went soemthing like this, though:
    CALL PGM(PERLDIST/PERL) PARM('/home/test.pl') CRTCLPGM PGM(TEST) SRCFILE(*LIBL/QCLSRC) CRTCLPGM PGM(CGIBIN/TESTER) SRCFILE(QGPL/QCLSRC)
    Again, this was probably due to user ignorance rather than technical problems. I wrote those commands, they are from some notes I took during the project, and yet I to this day have absolutely no idea what they mean. They worked, though, I guess, because they paid me.

  • The HTTP server on the AS/400 series was not standard (although I think that since then they have ported Apache?). The configuration of said server is done through a web interface, and it is not very usable compared to just editing httpd.conf. Also, it must be used to set up any CGI programs and directories you wish to run.

  • All this stuff runs under a Unix EMULATOR! I don't care what they call it, I am firmly convinced of this fact and nothing you can say will make me think any differently. ;-)

That said, I wish you luck, becase it was actually, in retrospect, sort of fun, like the nitrous during a knee operation. I know that I learned quite a bit.

On the other hand, if you look at IBM lately, they seem to be pulling out all the stops in support of good old Linux/Apache/etc, and you might find that it is a more feasible option to go with a standardized web server platform in the long run.


Comment on Re: Perl on IBM AS/400?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://67796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-07-11 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (224 votes), past polls