PERLOS400(1)
π NAME π
perlos400 β Perl version 5 on OS/400
okay bestie, real talk first: this doc needs to be updated, and honestly? we don't even know what it should say. like, the vibe is stale. so if you have thoughts, please submit comments to <https://github.com/Perl/perl5/issues>. we're begging. π₯Ί
πΈ DESCRIPTION πΈ
This one describes all the various features of IBM's OS/400 operating system that will affect how Perl version 5 (from here on out just Perl, bestie, we're close like that) gets compiled and/or runs.
ngl, by far the easiest way to build Perl for OS/400 is to use PASE (the Portable Application Solutions Environment). more info over at <http://www.iseries.ibm.com/developer/factory/pase/index.html>. this environment lets you use AIX APIs while you're programming, and it provides a runtime that lets AIX binaries execute directly on the PowerPC iSeries. it's giving "have your cake and eat it too" energy. π
π 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β¨ is giving 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 modify this if needed 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 actually possible to build Perl natively on OS/400. the easier way, though? compile in AIX, like we just described. no cap.
If you don't want to install the compiled Perl in AIX into /QOpenSys (like, say you're packaging it before copying it to PASE), you can use this Configure parameter: -Dinstallprefix=/tmp/QOpenSys/perl. this makes the make install install everything into that directory, while the installed files still think they are (will be) in /QOpenSys/perl. delulu? maybe. iconic? absolutely. π
If you're building natively on PASE, pleaseeee do the build under the /QOpenSys directory, because Perl is so much happier when it's built on a case sensitive filesystem. respect the filesystem, she has feelings. π¦
π Installing Perl in OS/400 PASE π
If you're compiling on AIX, simply do a make install on the AIX box. once the install finishes, tar up the /QOpenSys/perl directory. then transfer the tarball to the OS/400 using FTP with these commands:
> binary
> site namefmt 1
> put perl.tar /QOpenSys
Once you have it on, simply bring up a PASE shell and extract the tarball. ez.
If you're compiling in PASE, then make install is the only thing you'll need to do. that's it. that's the whole task. periodt.
The default path for the perl binary is /QOpenSys/perl/bin/perl. you'll want to symlink /QOpenSys/usr/bin/perl to this file so you don't have to modify your path. do it for her. π«Ά
β Using Perl in OS/400 PASE β
Perl in PASE may be used in the same manner as you would use Perl on AIX. same girl, different font.
Scripts starting with #!/usr/bin/perl should work if you have /QOpenSys/usr/bin/perl symlinked to your perl binary. this will not work if you've done a setuid/setgid or if you have the environment variable PASE_EXEC_QOPENSYS="N". if you have V5R1, you'll need to get the latest PTFs to have this feature. Scripts starting with #!/QOpenSys/perl/bin/perl should always work, though. she's reliable like that. π
π Known Problems π
When compiling in PASE, there is no oslevel command. so you may want to create a script called oslevel that echoes the level of AIX that your version of PASE runtime supports. if you're unsure, consult your documentation or just use "4.3.3.0". when in doubt, pick the number and move on.
If you have test cases that fail, check for the existence of spool files. the test case may be trying to use a syscall that isn't implemented in PASE. to avoid 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. if you want to remove fchdir(), which isn't implemented in V5R1, simply 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 not stranded, bestie, there's a way out. πΈ
π§ Perl on ILE π§
There exists a port of Perl to the ILE environment. this port, however, 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.) if you need to run Perl on ILE, though, you may need this older port: <http://www.cpan.org/ports/#os400>. note that any Perl release later than 5.00502 has not been ported to ILE. not a single one. π
If you need to use Perl in the ILE environment, you may want to consider using Qp2RunPase() to call the PASE version of Perl. that's the glow-up route. β¨
π AUTHORS π
- Jarkko Hietaniemi
<jhi@iki.fi> - Bryan Logan
<bryanlog@us.ibm.com> - David Larson
<larson1@us.ibm.com>
π that's the whole page bestie!! go forth and build Perl on OS/400, you absolute main character. π¦β¨
signing off from perl v5.42.3, dated 2026-08-03, on page PERLOS400(1) π π
π¦ where this page comes from
- fedora 43: perl-doc 5.42.3-524.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- fedora 44: perl-doc 5.42.3-525.fc44 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms