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