1PERLOS400(1)           Perl Programmers Reference Guide           PERLOS400(1)
2
3
4

NAME

6       perlos400 - Perl version 5 on OS/400
7
8       This document needs to be updated, but we don't know what it should
9       say.  Please submit comments to <https://github.com/Perl/perl5/issues>.
10

DESCRIPTION

12       This document describes various features of IBM's OS/400 operating
13       system that will affect how Perl version 5 (hereafter just Perl) is
14       compiled and/or runs.
15
16       By far the easiest way to build Perl for OS/400 is to use the PASE
17       (Portable Application Solutions Environment), for more information see
18       <http://www.iseries.ibm.com/developer/factory/pase/index.html> This
19       environment allows one to use AIX APIs while programming, and it
20       provides a runtime that allows AIX binaries to execute directly on the
21       PowerPC iSeries.
22
23   Compiling Perl for OS/400 PASE
24       The recommended way to build Perl for the OS/400 PASE is to build the
25       Perl 5 source code (release 5.8.1 or later) under AIX.
26
27       The trick is to give a special parameter to the Configure shell script
28       when running it on AIX:
29
30         sh Configure -DPASE ...
31
32       The default installation directory of Perl under PASE is
33       /QOpenSys/perl.  This can be modified if needed with Configure
34       parameter -Dprefix=/some/dir.
35
36       Starting from OS/400 V5R2 the IBM Visual Age compiler is supported on
37       OS/400 PASE, so it is possible to build Perl natively on OS/400.  The
38       easier way, however, is to compile in AIX, as just described.
39
40       If you don't want to install the compiled Perl in AIX into /QOpenSys
41       (for packaging it before copying it to PASE), you can use a Configure
42       parameter: -Dinstallprefix=/tmp/QOpenSys/perl.  This will cause the
43       "make install" to install everything into that directory, while the
44       installed files still think they are (will be) in /QOpenSys/perl.
45
46       If building natively on PASE, please do the build under the /QOpenSys
47       directory, since Perl is happier when built on a case sensitive
48       filesystem.
49
50   Installing Perl in OS/400 PASE
51       If you are compiling on AIX, simply do a "make install" on the AIX box.
52       Once the install finishes, tar up the /QOpenSys/perl directory.
53       Transfer the tarball to the OS/400 using FTP with the following
54       commands:
55
56         > binary
57         > site namefmt 1
58         > put perl.tar /QOpenSys
59
60       Once you have it on, simply bring up a PASE shell and extract the
61       tarball.
62
63       If you are compiling in PASE, then "make install" is the only thing you
64       will need to do.
65
66       The default path for perl binary is /QOpenSys/perl/bin/perl.  You'll
67       want to symlink /QOpenSys/usr/bin/perl to this file so you don't have
68       to modify your path.
69
70   Using Perl in OS/400 PASE
71       Perl in PASE may be used in the same manner as you would use Perl on
72       AIX.
73
74       Scripts starting with #!/usr/bin/perl should work if you have
75       /QOpenSys/usr/bin/perl symlinked to your perl binary.  This will not
76       work if you've done a setuid/setgid or have environment variable
77       PASE_EXEC_QOPENSYS="N".  If you have V5R1, you'll need to get the
78       latest PTFs to have this feature.  Scripts starting with
79       #!/QOpenSys/perl/bin/perl should always work.
80
81   Known Problems
82       When compiling in PASE, there is no "oslevel" command.  Therefore, you
83       may want to create a script called "oslevel" that echoes the level of
84       AIX that your version of PASE runtime supports.  If you're unsure,
85       consult your documentation or use "4.3.3.0".
86
87       If you have test cases that fail, check for the existence of spool
88       files.  The test case may be trying to use a syscall that is not
89       implemented in PASE.  To avoid the SIGILL, try setting the
90       PASE_SYSCALL_NOSIGILL environment variable or have a handler for the
91       SIGILL.  If you can compile programs for PASE, run the config script
92       and edit config.sh when it gives you the option.  If you want to remove
93       fchdir(), which isn't implement in V5R1, simply change the line that
94       says:
95
96       d_fchdir='define'
97
98       to
99
100       d_fchdir='undef'
101
102       and then compile Perl.  The places where fchdir() is used have
103       alternatives for systems that do not have fchdir() available.
104
105   Perl on ILE
106       There exists a port of Perl to the ILE environment.  This port,
107       however, is based quite an old release of Perl, Perl 5.00502 (August
108       1998).  (As of July 2002 the latest release of Perl is 5.8.0, and even
109       5.6.1 has been out since April 2001.)  If you need to run Perl on ILE,
110       though, you may need this older port:
111       <http://www.cpan.org/ports/#os400> Note that any Perl release later
112       than 5.00502 has not been ported to ILE.
113
114       If you need to use Perl in the ILE environment, you may want to
115       consider using Qp2RunPase() to call the PASE version of Perl.
116

AUTHORS

118       Jarkko Hietaniemi <jhi@iki.fi> Bryan Logan <bryanlog@us.ibm.com> David
119       Larson <larson1@us.ibm.com>
120
121
122
123perl v5.32.1                      2021-03-31                      PERLOS400(1)
Impressum