PERLOS400(1perl)

πŸ“¦
version 5.44.0 Β· 2 versions
, in arch rolling

✨ NAME ✨

perlos400 β€” Perl version 5 on OS/400, babes πŸ’–

Okay so real talk: this doc needs to be updated, but genuinely nobody knows what it should say anymore. If you've got thoughts, please drop your comments at <https://github.com/Perl/perl5/issues>. Like, pls. We're begging πŸ₯Ί


🌸 DESCRIPTION 🌸

This page spills the tea on all the various features of IBM's OS/400 operating system that mess with how Perl version 5 (from here on out, just Perl, bestie) gets compiled and/or runs.

By far the easiest way to build Perl for OS/400 is to use PASE β€” the Portable Application Solutions Environment. More deets over here: <http://www.iseries.ibm.com/developer/factory/pase/index.html>. This environment lets you use AIX APIs while you're programming, and it serves up a runtime that lets AIX binaries execute directly on the PowerPC iSeries. Iconic behavior, honestly πŸ‘‘

πŸ› οΈ Compiling Perl for OS/400 PASE

The recommended way to build Perl for OS/400 PASE is to build the Perl 5 source code (release 5.8.1 or later) under AIX.

The trick? You gotta hand a special parameter to the Configure shell script when you run it on AIX:

sh Configure -DPASE ...

The default installation directory of Perl under PASE is /QOpenSys/perl. You can absolutely change that if you need to, with the Configure parameter -Dprefix=/some/dir.

Starting from OS/400 V5R2 the IBM Visual Age compiler is supported on OS/400 PASE, so it's lowkey possible to build Perl natively on OS/400. That said, the easier way is still to compile in AIX, exactly like we just described πŸ’…

Now, if you don't want the compiled Perl in AIX to install into /QOpenSys (say, because you're packaging it up before copying it over to PASE), there's a Configure parameter for that: -Dinstallprefix=/tmp/QOpenSys/perl. This makes make install install everything into that directory, while the installed files still think they are (will be) in /QOpenSys/perl. Sneaky. Love that for them.

And if you're building natively on PASE? Please do the build under the /QOpenSys directory, because Perl is simply happier when it's built on a case sensitive filesystem πŸ¦‹

πŸ“¦ Installing Perl in OS/400 PASE

If you're compiling on AIX, just do a make install on the AIX box. Once the install finishes, tar up the /QOpenSys/perl directory. Then transfer the tarball over to the OS/400 using FTP with these commands:

> binary
> site namefmt 1
> put perl.tar /QOpenSys

Once you've got it there, just bring up a PASE shell and extract the tarball. Periodt.

If you're compiling in PASE instead, then make install is literally the only thing you need to do. No notes.

The default path for the perl binary is /QOpenSys/perl/bin/perl. You're gonna want to symlink /QOpenSys/usr/bin/perl to this file so you don't have to go modify your path like a peasant ✨

πŸš€ Using Perl in OS/400 PASE

Perl in PASE may be used in the same manner as you would use Perl on AIX. Same vibe, different address.

Scripts starting with #!/usr/bin/perl should work if you've got /QOpenSys/usr/bin/perl symlinked to your perl binary. But β€” and this is the important part β€” this will not work if you've done a setuid/setgid or if you have the environment variable PASE_EXEC_QOPENSYS="N". If you're on V5R1, you'll need to grab the latest PTFs to have this feature at all. Scripts starting with #!/QOpenSys/perl/bin/perl should always work, no drama, no conditions πŸ’œ

πŸ’€ Known Problems

When you're compiling in PASE, there is no oslevel command. Awkward. So you may want to create a script called oslevel that echoes the level of AIX that your version of PASE runtime supports. Unsure what that is? Consult your documentation, or just use "4.3.3.0".

If you've got test cases that fail, check whether spool files exist. The test case might be trying to use a syscall that isn't implemented in PASE. To dodge the SIGILL, try setting the PASE_SYSCALL_NOSIGILL environment variable, or have a handler for the SIGILL. If you can compile programs for PASE, run the config script and edit config.sh when it gives you the option. And if you wanna remove fchdir() β€” which isn't implement in V5R1, fyi β€” just change the line that says:

d_fchdir='define'

to:

d_fchdir='undef'

...and then compile Perl. The places where fchdir() is used have alternatives for systems that do not have fchdir() available, so you're covered 🫢

πŸ¦• Perl on ILE

So there does exist a port of Perl to the ILE environment. But babes... this port is based on quite an old release of Perl β€” Perl 5.00502 (August 1998). (As of July 2002 the latest release of Perl is 5.8.0, and even 5.6.1 has been out since April 2001, just for context on how vintage we're talking here.) If you genuinely need to run Perl on ILE though, you may need this older port: <http://www.cpan.org/ports/#os400>. Heads up: any Perl release later than 5.00502 has not been ported to ILE. Tragic.

If you need to use Perl in the ILE environment, you may want to consider using Qp2RunPase() to call the PASE version of Perl instead. Just saying πŸ‘€


πŸ‘‘ AUTHORS πŸ‘‘

  • Jarkko Hietaniemi <jhi@iki.fi>
  • Bryan Logan <bryanlog@us.ibm.com>
  • David Larson <larson1@us.ibm.com>

That's the whole thing, bestie! This page came to you courtesy of perl v5.44.0, dated 2026-10-17, and it lives under PERLOS400(1perl). Stay slaying on that iSeries πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms