Skip to content

Commit 821a824

Browse files
committed
Update README.os390 for 5.36
1 parent ee0cc93 commit 821a824

File tree

1 file changed

+151
-41
lines changed

1 file changed

+151
-41
lines changed

README.os390

+151-41
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,60 @@ This is a ported Perl for z/OS. It has been tested on z/OS 2.4 and
1717
should work fine with z/OS 2.5.
1818
It may work on other versions or releases, but those are
1919
the ones it has been tested on.
20-
There are many ways you can build Perl for z/OS. This document
21-
will describe how to build a 64-bit Dynamic EBCDIC Perl as well as a
22-
64-bit Dynamic ASCII Perl.
2320

24-
You may need to carry out some system configuration tasks before
25-
running the Configure script for Perl.
21+
The native character set for z/OS is EBCDIC, but it can also run in ASCII mode.
22+
Perl can support either, but you have to compile it explicitly for one or the
23+
other. You could have both an ASCII perl, and an EBCDIC perl on the same
24+
machine. If you use ASCII mode and an ASCII perl, the Encode module shipped
25+
with perl can be used to translate files from various EBCDIC code pages for
26+
handling by perl, and then back on output
27+
28+
This document describes how to build a 64-bit Dynamic Perl, either ASCII or
29+
EBCDIC. You can interactively choose other configurations, as well as many
30+
other options in the Configure script that is run as part of the build
31+
process. You may need to carry out some system configuration tasks before
32+
running Configure, as detailed below.
2633

2734
=head2 Tools
2835

29-
You will want to get GNU make 4.1 or later. GNU make can be downloaded from a port
30-
that Rocket Software provides.
31-
You will need the z/OS c99 compiler from IBM.
32-
You can also obtain a z/OS native git client port that Rocket Software
33-
provides. This is optional - you can use git on another platform and
34-
transfer the code via ftp to z/OS
35-
For EBCDIC only, you will need gunzip client port that Rocket Software provides
36-
to unzip the zipped tarball you upload to z/OS
36+
You will want to get GNU make 4.1 or later. GNU make can be downloaded from a
37+
port that Rocket Software provides. You will need the z/OS c99 compiler from
38+
IBM (though xlc in c99 mode without optimization turned on works in EBCDIC).
39+
40+
If you want the latest development version of Perl, you will need git.
41+
You can use git on another platform and transfer the result via sftp or ftp to
42+
z/OS. But there is a z/OS native git client port available through Rocket
43+
Software.
44+
45+
You may also need the gunzip client port that Rocket Software provides to unzip
46+
any zipped tarball you upload to z/OS.
3747

3848
=head2 Building a 64-bit Dynamic ASCII Perl
3949

40-
Using the native git on z/OS, clone Perl:
50+
For building from an official stable release of Perl, go to
51+
L<https://www.perl.org/get.html> and choose any one of the
52+
"Download latest stable source" buttons. This will get you a tarball. The
53+
name of that tarball will be something like 'perl-V.R.M,tar,gz', where V.R.M is
54+
the version/release/modification of the perl you are downloading. Do
55+
56+
gunzip perl-V.R.M.tar.gz
57+
58+
Then one of:
59+
60+
tar -xvf perl-V.R.M.tar
61+
62+
pax -r -f perl-V.R.M.tar
63+
64+
Either of these will create the source directory. You can rename it to
65+
whatever you like; for these instructions, 'perl' is assumed to be the name.
66+
67+
If instead you want the latest unstable development release, using the native
68+
git on z/OS, clone Perl:
4169

4270
git clone https://github.com/Perl/perl5.git perl
4371

44-
Change into the perl directory and tag all the code as ASCII:
72+
Either way, once you have a 'perl' directory containing the source, cd into it,
73+
and tag all the code as ASCII:
4574

4675
cd perl
4776
chtag -R -h -t -cISO8859-1 *
@@ -54,25 +83,35 @@ deploying it to F</usr/local/perl/ascii>:
5483
./Configure -Dprefix=/usr/local/perl/ascii -des -Dusedevel \
5584
-Duse64bitall -Dusedl
5685

86+
If you are building from a stable source, you don't need "-Dusedevel".
87+
(If you run Configure without options, it will interactively ask you about
88+
every possible option based on its probing of what's available on your
89+
particular machine, so you can choose as you go along.)
90+
5791
Run GNU make to build Perl
5892

5993
make
6094

61-
Run tests to ensure Perl is working correctly. Currently, there are 33 failing tests out of 2479
95+
Run tests to ensure Perl is working correctly. Currently, there are about a
96+
dozen failing tests out of nearly 2500
6297

63-
make tests
98+
make test_harness
6499

65100
Install Perl into F</usr/local/perl/ascii>:
66101

67102
make install
68103

69104
=head2 Building a 64-bit Dynamic EBCDIC Perl
70105

71-
Using the native git on a platform other than z/OS, (e.g. Mac, Windows, Linux) clone Perl:
106+
You will need a working perl on some box with connectivity to the destination
107+
machine. On z/OS, it could be an ASCII perl, or a previous EBCDIC one.
108+
Many machines will already have a pre-built perl already running, or one can
109+
easily be downloaded from L<https://www.perl.org/get.html>.
72110

73-
git clone https://github.com/Perl/perl5.git perl
111+
Follow the directions above in "Building a 64-bit Dynamic ASCII Perl" as far as
112+
getting a populated 'perl' directory. Then come back here to proceed.
74113

75-
Change into the perl directory and modify the source so it is suitable for building on z/OS
114+
The downloaded perl will need to be converted to 1047 EBCDIC. To do this:
76115

77116
cd perl
78117
Porting/makerel -e
@@ -94,31 +133,87 @@ Unzip and untar the zipped tar file on z/OS:
94133

95134
cd /tmp
96135
gunzip perl-V.R.M.tar.gz
136+
137+
Then one of:
138+
97139
tar -xvf perl-V.R.M.tar
98140

99-
You now have the source code for the EBCDIC Perl on z/OS and can proceed to build it. This is analagous to how you
100-
would build the code for ASCII, but note: you B<should not> tag the code but instead leave it untagged.
141+
pax -r -f perl-V.R.M.tar
101142

102-
Configure the build environment as 64-bit, Dynamic, ASCII, development,
143+
You now have the source code for the EBCDIC Perl on z/OS and can proceed to
144+
build it. This is analagous to how you would build the code for ASCII, but
145+
note: you B<should not> tag the code but instead leave it untagged.
146+
147+
Configure the build environment as 64-bit, Dynamic, native, development,
103148
deploying it to F</usr/local/perl/ebcdic>:
104149

105150
export PATH=$PWD:$PATH
106151
export LIBPATH=$PWD:$PATH
107152
./Configure -Dprefix=/usr/local/perl/ebcdic -des -Dusedevel \
108153
-Duse64bitall -Dusedl
109154

155+
If you are building from a stable source, you don't need "-Dusedevel".
156+
(If you run Configure without options, it will interactively ask you about
157+
every possible option based on its probing of what's available on your
158+
particular machine, so you can choose as you go along.)
159+
110160
Run GNU make to build Perl
111161

112162
make
113163

114-
Run tests to ensure Perl is working correctly. Currently, there are 99 tests failing out of 1949
164+
Run tests to ensure Perl is working correctly.
165+
166+
make test_harness
115167

116-
make tests
168+
You might also want to have GNU groff for OS/390 installed before
169+
running the "make install" step for Perl.
117170

118171
Install Perl into F</usr/local/perl/ebcdic>:
119172

120173
make install
121174

175+
EBCDIC Perl is still a work in progress. All the core code works as far as we
176+
know, but various modules you might want to download from CPAN do not. The
177+
failures range from very minor to catastrophic. Many of them are simply bugs
178+
in the tests, with the module actually working properly. This happens because,
179+
for example, the test is coded to expect a certain character ASCII code point;
180+
when it gets the EBCDIC value back instead, it complains. But the code
181+
actually worked. Other potential failures that aren't really failures stem
182+
from checksums coming out differently, since C<A>, for example, has a different
183+
bit representation between the character sets. A test that is expecting the
184+
ASCII value will show failure, even if the module is working perfectly. Also
185+
in sorting, uppercase letters come before lowercase letters on ASCII systems;
186+
the reverse on EBCDIC.
187+
188+
Some CPAN modules come bundled with the downloaded perl. And a few of those
189+
have yet to be fixed to pass on EBCDIC platforms. As a result they are skipped
190+
when you run 'make test'. The current list is:
191+
192+
Archive::Tar
193+
Config::Perl::V
194+
CPAN::Meta
195+
CPAN::Meta::YAML
196+
Digest::MD5
197+
Digest::SHA
198+
Encode
199+
ExtUtils::MakeMaker
200+
ExtUtils::Manifest
201+
HTTP::Tiny
202+
IO::Compress
203+
IPC::Cmd
204+
JSON::PP
205+
libnet
206+
MIME::Base64
207+
Module::Metadata
208+
PerlIO::via-QuotedPrint
209+
Pod::Checker
210+
podlators
211+
Pod::Simple
212+
Socket
213+
Test::Harness
214+
215+
See also F<hints/os390.sh> for other potential gotchas.
216+
122217
=head2 Setup and utilities for Perl on OS/390
123218

124219
This may also be a good time to ensure that your F</etc/protocol> file
@@ -170,6 +265,13 @@ settings. Check that the following command returns reasonable values:
170265

171266
ulimit -a
172267

268+
To conserve memory you should have your compiler modules loaded into the
269+
Link Pack Area (LPA/ELPA) rather than in a link list or step lib.
270+
271+
If the compiler complains of syntax errors during the build of the
272+
Socket extension then be sure to fix the syntax error in the system
273+
header /usr/include/sys/socket.h.
274+
173275
=head2 Testing Anomalies with Perl on OS/390
174276

175277
The "make test" step runs a Perl Verification Procedure, usually before
@@ -248,24 +350,30 @@ To run the 64-bit Dynamic Perl environment, update your PATH and LIBPATH
248350
to include the location you installed Perl into, and then run the perl you
249351
installed as perlV.R.M where V/R/M is the Version/Release/Modification level
250352
of the current development level.
251-
If you are running the ASCII/EBCDIC Bi-Modal Perl environment, you also need to set up
252-
your ASCII/EBCDIC Bi-Modal environment variables, and ensure
253-
any Perl source code you run is tagged appropriately as ASCII or EBCDIC
254-
using chtag -t -c<CCSID>:
353+
If you are running the ASCII/EBCDIC Bi-Modal Perl environment, you also need to
354+
set up your ASCII/EBCDIC Bi-Modal environment variables, and ensure any Perl
355+
source code you run is tagged appropriately as ASCII or EBCDIC using
356+
"chtag -t -c<CCSID>":
357+
358+
=over
255359

256-
=head3 For ASCII Only:
360+
=item For ASCII Only:
257361

258-
export _BPXK_AUTOCVT=ON
259-
export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG),POSIX(ON)"
260-
export _TAG_REDIR_ERR="txt"
261-
export _TAG_REDIR_IN="txt"
262-
export _TAG_REDIR_OUT="txt"
362+
export _BPXK_AUTOCVT=ON
363+
export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG),POSIX(ON)"
364+
export _TAG_REDIR_ERR="txt"
365+
export _TAG_REDIR_IN="txt"
366+
export _TAG_REDIR_OUT="txt"
263367

264-
=head3 For ASCII or EBCDIC:
368+
=item For ASCII or EBCDIC:
265369

266-
export PATH=/usr/local/perl/ascii:$PATH
267-
export LIBPATH=/usr/local/perl/ascii/lib:$LIBPATH
268-
perlV.R.M args
370+
export PATH=/usr/local/perl/ascii:$PATH
371+
export LIBPATH=/usr/local/perl/ascii/lib:$LIBPATH
372+
perlV.R.M args
373+
374+
=back
375+
376+
If tcsh is your login shell then use the setenv command.
269377

270378
=head1 AUTHORS
271379

@@ -275,9 +383,10 @@ Thanks to Mike MacIsaac and Egon Terwedow for SG24-5944-00.
275383
Thanks to Ignasi Roca for pointing out the floating point problems.
276384
Thanks to John Goodyear for dynamic loading help.
277385

278-
Mike Fulton and Karl Williamson have provided updates for UTF8, DLL, 64-bit and ASCII/EBCDIC Bi-Modal support
386+
Mike Fulton and Karl Williamson have provided updates for UTF8, DLL, 64-bit and
387+
ASCII/EBCDIC Bi-Modal support
279388

280-
=head2 Other sites
389+
=head1 OTHER SITES
281390

282391
L<https://github.com/ZOSOpenTools/perlport/> provides documentation and tools
283392
for building various z/OS Perl configurations and has some useful tools in the
@@ -303,5 +412,6 @@ This document was podified for the 5.005_03 release of Perl 11 March 1999.
303412

304413
This document was originally written by David Fiander for the 5.005
305414
release of Perl.
415+
306416
=cut
307417

0 commit comments

Comments
 (0)