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