Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Perl on IBM AS/400?

by donaldm314 (Pilgrim)
on Mar 28, 2001 at 07:50 UTC ( #67738=perlquestion: print w/replies, xml ) Need Help??

donaldm314 has asked for the wisdom of the Perl Monks concerning the following question:

Anyone have experience with perl on an AS/400?

We are an AIX, Windows NT, AS/400 shop and would like to use perl to start applications in a platform-independent manner. Or semi-platform independent....

The AIX and NT part is easy. Perl on the AS/400 seems a lot more 'out there.'

Replies are listed 'Best First'.
Re: Perl on IBM AS/400?
by Dragonfly (Priest) on Mar 28, 2001 at 14:52 UTC
    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.

Re: Perl on IBM AS/400?
by dusk (Friar) on Mar 28, 2001 at 08:35 UTC
    There is a binary distribution of perl for AS/400 from CPAN here.
Re: Perl on IBM AS/400?
by busunsl (Vicar) on Mar 28, 2001 at 11:02 UTC
    I worked with Perl on AS/400 several years ago.
    It was pretty slow by then, due to the underlying 'filesystem' and library handling (it was version 3.1 of OS/400).

    You should extensively test everything you do with the filesystem, but apart from that, afaik OS/400 is POSIX compliant.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://67738]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2023-02-01 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?