.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PERLOS390 1" .TH PERLOS390 1 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide" .SH "NAME" README.os390 \- building and installing Perl for OS/390 and z/OS .SH "SYNOPSIS" .IX Header "SYNOPSIS" This document will help you Configure, build, test and install Perl on \s-1OS/390\s0 (aka z/OS) Unix System Services. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a fully ported Perl for \s-1OS/390\s0 Version 2 Release 3, 5, 6, 7, 8, and 9. It may work on other versions or releases, but those are the ones we've tested it on. .PP You may need to carry out some system configuration tasks before running the Configure script for Perl. .Sh "Tools" .IX Subsection "Tools" The z/OS Unix Tools and Toys list may prove helpful and contains links to ports of much of the software helpful for building Perl. http://www\-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html .Sh "Unpacking Perl distribution on \s-1OS/390\s0" .IX Subsection "Unpacking Perl distribution on OS/390" If using ftp remember to transfer the distribution in binary format. .PP Gunzip/gzip for \s-1OS/390\s0 is discussed at: .PP .Vb 1 \& http://www-1.ibm.com/servers/eserver/zseries/zos/unix/faq/bpxqp1.html .Ve .PP to extract an \s-1ASCII\s0 tar archive on \s-1OS/390\s0, try this: .PP .Vb 1 \& pax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar .Ve .PP or .PP .Vb 1 \& zcat latest.tar.Z | pax -o to=IBM-1047,from=ISO8859-1 -r .Ve .PP If you get lots of errors of the form .PP .Vb 1 \& tar: FSUM7171 ...: cannot set uid/gid: EDC5139I Operation not permitted. .Ve .PP you didn't read the above and tried to use tar instead of pax, you'll first have to remove the (now corrupt) perl directory .PP .Vb 1 \& rm -rf perl-... .Ve .PP and then use pax. .Sh "Setup and utilities for Perl on \s-1OS/390\s0" .IX Subsection "Setup and utilities for Perl on OS/390" Be sure that your yacc installation is in place including any necessary parser template files. If you have not already done so then be sure to: .PP .Vb 1 \& cp /samples/yyparse.c /etc .Ve .PP This may also be a good time to ensure that your /etc/protocol file and either your /etc/resolv.conf or /etc/hosts files are in place. The \s-1IBM\s0 document that described such \s-1USS\s0 system setup issues was \&\s-1SC28\-1890\-07\s0 \*(L"\s-1OS/390\s0 \s-1UNIX\s0 System Services Planning\*(R", in particular Chapter 6 on customizing the \s-1OE\s0 shell. .PP \&\s-1GNU\s0 make for \s-1OS/390\s0, which is recommended for the build of perl (as well as building \s-1CPAN\s0 modules and extensions), is available from the \&\*(L"Tools\*(R". .PP Some people have reported encountering \*(L"Out of memory!\*(R" errors while trying to build Perl using \s-1GNU\s0 make binaries. If you encounter such trouble then try to download the source code kit and build \s-1GNU\s0 make from source to eliminate any such trouble. You might also find \s-1GNU\s0 make (as well as Perl and Apache) in the red\-piece/book \*(L"Open Source Software for \s-1OS/390\s0 \s-1UNIX\s0\*(R", \s-1SG24\-5944\-00\s0 from \s-1IBM\s0. .PP If instead of the recommended \s-1GNU\s0 make you would like to use the system supplied make program then be sure to install the default rules file properly via the shell command: .PP .Vb 1 \& cp /samples/startup.mk /etc .Ve .PP and be sure to also set the environment variable _C89_CCMODE=1 (exporting _C89_CCMODE=1 is also a good idea for users of \s-1GNU\s0 make). .PP You might also want to have \s-1GNU\s0 groff for \s-1OS/390\s0 installed before running the `make install` step for Perl. .PP There is a syntax error in the /usr/include/sys/socket.h header file that \s-1IBM\s0 supplies with \s-1USS\s0 V2R7, V2R8, and possibly V2R9. The problem with the header file is that near the definition of the \s-1SO_REUSEPORT\s0 constant there is a spurious extra '/' character outside of a comment like so: .PP .Vb 2 \& #define SO_REUSEPORT 0x0200 /* allow local address & port \& reuse */ / .Ve .PP You could edit that header yourself to remove that last '/', or you might note that Language Environment (\s-1LE\s0) \s-1APAR\s0 \s-1PQ39997\s0 describes the problem and \s-1PTF\s0's \s-1UQ46272\s0 and \s-1UQ46271\s0 are the (R8 at least) fixes and apply them. If left unattended that syntax error will turn up as an inability for Perl to build its \*(L"Socket\*(R" extension. .PP For successful testing you may need to turn on the sticky bit for your world readable /tmp directory if you have not already done so (see man chmod). .Sh "Configure Perl on \s-1OS/390\s0" .IX Subsection "Configure Perl on OS/390" Once you've unpacked the distribution, run \*(L"sh Configure\*(R" (see \s-1INSTALL\s0 for a full discussion of the Configure options). There is a \*(L"hints\*(R" file for os390 that specifies the correct values for most things. Some things to watch out for include: .IP "\(bu" 4 A message of the form: .Sp .Vb 2 \& (I see you are using the Korn shell. Some ksh's blow up on Configure, \& mainly on older exotic systems. If yours does, try the Bourne shell instead.) .Ve .Sp is nothing to worry about at all. .IP "\(bu" 4 Some of the parser default template files in /samples are needed in /etc. In particular be sure that you at least copy /samples/yyparse.c to /etc before running Perl's Configure. This step ensures successful extraction of \s-1EBCDIC\s0 versions of parser files such as perly.c, perly.h, and x2p/a2p.c. This has to be done before running Configure the first time. If you failed to do so then the easiest way to re-Configure Perl is to delete your misconfigured build root and re-extract the source from the tar ball. Then you must ensure that /etc/yyparse.c is properly in place before attempting to re-run Configure. .IP "\(bu" 4 This port will support dynamic loading, but it is not selected by default. If you would like to experiment with dynamic loading then be sure to specify \-Dusedl in the arguments to the Configure script. See the comments in hints/os390.sh for more information on dynamic loading. If you build with dynamic loading then you will need to add the \&\f(CW$archlibexp\fR/CORE directory to your \s-1LIBPATH\s0 environment variable in order for perl to work. See the config.sh file for the value of \f(CW$archlibexp\fR. If in trying to use Perl you see an error message similar to: .Sp .Vb 2 \& CEE3501S The module libperl.dll was not found. \& From entry point __dllstaticinit at compile unit offset +00000194 at .Ve .Sp then your \s-1LIBPATH\s0 does not have the location of libperl.x and either libperl.dll or libperl.so in it. Add that directory to your \s-1LIBPATH\s0 and proceed. .IP "\(bu" 4 Do not turn on the compiler optimization flag \*(L"\-O\*(R". There is a bug in either the optimizer or perl that causes perl to not work correctly when the optimizer is on. .IP "\(bu" 4 Some of the configuration files in /etc used by the networking APIs are either missing or have the wrong names. In particular, make sure that there's either an /etc/resolv.conf or an /etc/hosts, so that \&\fIgethostbyname()\fR works, and make sure that the file /etc/proto has been renamed to /etc/protocol (\s-1NOT\s0 /etc/protocols, as used by other Unix systems). You may have to look for things like \s-1HOSTNAME\s0 and \s-1DOMAINORIGIN\s0 in the \*(L"//'\s-1SYS1\s0.TCPPARMS(\s-1TCPDATA\s0)'\*(R" \s-1PDS\s0 member in order to properly set up your /etc networking files. .Sh "Build, Test, Install Perl on \s-1OS/390\s0" .IX Subsection "Build, Test, Install Perl on OS/390" Simply put: .PP .Vb 3 \& sh Configure \& make \& make test .Ve .PP if everything looks ok (see the next section for test/IVP diagnosis) then: .PP .Vb 1 \& make install .Ve .PP this last step may or may not require UID=0 privileges depending on how you answered the questions that Configure asked and whether or not you have write access to the directories you specified. .Sh "Build Anomalies with Perl on \s-1OS/390\s0" .IX Subsection "Build Anomalies with Perl on OS/390" \&\*(L"Out of memory!\*(R" messages during the build of Perl are most often fixed by re building the \s-1GNU\s0 make utility for \s-1OS/390\s0 from a source code kit. .PP Another memory limiting item to check is your \s-1MAXASSIZE\s0 parameter in your \&'\s-1SYS1\s0.PARMLIB(BPXPRMxx)' data set (note too that as of V2R8 address space limits can be set on a per user \s-1ID\s0 basis in the \s-1USS\s0 segment of a \s-1RACF\s0 profile). People have reported successful builds of Perl with \s-1MAXASSIZE\s0 parameters as small as 503316480 (and it may be possible to build Perl with a \s-1MAXASSIZE\s0 smaller than that). .PP Within \s-1USS\s0 your /etc/profile or \f(CW$HOME\fR/.profile may limit your ulimit settings. Check that the following command returns reasonable values: .PP .Vb 1 \& ulimit -a .Ve .PP To conserve memory you should have your compiler modules loaded into the Link Pack Area (\s-1LPA/ELPA\s0) rather than in a link list or step lib. .PP If the c89 compiler complains of syntax errors during the build of the Socket extension then be sure to fix the syntax error in the system header /usr/include/sys/socket.h. .Sh "Testing Anomalies with Perl on \s-1OS/390\s0" .IX Subsection "Testing Anomalies with Perl on OS/390" The `make test` step runs a Perl Verification Procedure, usually before installation. You might encounter \s-1STDERR\s0 messages even during a successful run of `make test`. Here is a guide to some of the more commonly seen anomalies: .IP "\(bu" 4 A message of the form: .Sp .Vb 5 \& comp/cpp.............ERROR CBC3191 ./.301989890.c:1 The character $ is not a \& valid C source character. \& FSUM3065 The COMPILE step ended with return code 12. \& FSUM3017 Could not compile .301989890.c. Correct the errors and try again. \& ok .Ve .Sp indicates that the t/comp/cpp.t test of Perl's \-P command line switch has passed but that the particular invocation of c89 \-E in the cpp script does not suppress the C compiler check of source code validity. .IP "\(bu" 4 A message of the form: .Sp .Vb 4 \& io/openpid...........CEE5210S The signal SIGHUP was received. \& CEE5210S The signal SIGHUP was received. \& CEE5210S The signal SIGHUP was received. \& ok .Ve .Sp indicates that the t/io/openpid.t test of Perl has passed but done so with extraneous messages on stderr from \s-1CEE\s0. .IP "\(bu" 4 A message of the form: .Sp .Vb 5 \& lib/ftmp-security....File::Temp::_gettemp: Parent directory (/tmp/) is not safe \& (sticky bit not set when world writable?) at lib/ftmp-security.t line 100 \& File::Temp::_gettemp: Parent directory (/tmp/) is not safe (sticky bit not \& set when world writable?) at lib/ftmp-security.t line 100 \& ok .Ve .Sp indicates a problem with the permissions on your /tmp directory within the \s-1HFS\s0. To correct that problem issue the command: .Sp .Vb 1 \& chmod a+t /tmp .Ve .Sp from an account with write access to the directory entry for /tmp. .IP "\(bu" 4 Out of Memory! .Sp Recent perl test suite is quite memory hunrgy. In addition to the comments above on memory limitations it is also worth checking for _CEE_RUNOPTS in your environment. Perl now has (in miniperlmain.c) a C #pragma to set \s-1CEE\s0 run options, but the environment variable wins. .Sp The C code asks for: .Sp .Vb 1 \& #pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON)) .Ve .Sp The important parts of that are the second argument (the increment) to \s-1HEAP\s0, and allowing the stack to be \*(L"Above the (16M) line\*(R". If the heap increment is too small then when perl (for example loading unicode/Name.pl) tries to create a \*(L"big\*(R" (400K+) string it cannot fit in a single segment and you get \*(L"Out of Memory!\*(R" \- even if there is still plenty of memory available. .Sp A related issue is use with perl's malloc. Perl's malloc uses \f(CW\*(C`sbrk()\*(C'\fR to get memory, and \f(CW\*(C`sbrk()\*(C'\fR is limited to the first allocation so in this case something like: .Sp .Vb 1 \& HEAP(8M,500K,ANYWHERE,KEEP,8K,4K) .Ve .Sp is needed to get through the test suite. .Sh "Installation Anomalies with Perl on \s-1OS/390\s0" .IX Subsection "Installation Anomalies with Perl on OS/390" The installman script will try to run on \s-1OS/390\s0. There will be fewer errors if you have a roff utility installed. You can obtain \s-1GNU\s0 groff from the Redbook \s-1SG24\-5944\-00\s0 ftp site. .Sh "Usage Hints for Perl on \s-1OS/390\s0" .IX Subsection "Usage Hints for Perl on OS/390" When using perl on \s-1OS/390\s0 please keep in mind that the \s-1EBCDIC\s0 and \s-1ASCII\s0 character sets are different. See perlebcdic.pod for more on such character set issues. Perl builtin functions that may behave differently under \&\s-1EBCDIC\s0 are also mentioned in the perlport.pod document. .PP Open Edition (\s-1UNIX\s0 System Services) from V2R8 onward does support #!/path/to/perl script invocation. There is a \s-1PTF\s0 available from \&\s-1IBM\s0 for V2R7 that will allow shell/kernel support for #!. \s-1USS\s0 releases prior to V2R7 did not support the #! means of script invocation. If you are running V2R6 or earlier then see: .PP .Vb 1 \& head `whence perldoc` .Ve .PP for an example of how to use the \*(L"eval exec\*(R" trick to ask the shell to have Perl run your scripts on those older releases of Unix System Services. .PP If you are having trouble with square brackets then consider switching your rlogin or telnet client. Try to avoid older 3270 emulators and \s-1ISHELL\s0 for working with Perl on \s-1USS\s0. .Sh "Floating Point Anomalies with Perl on \s-1OS/390\s0" .IX Subsection "Floating Point Anomalies with Perl on OS/390" There appears to be a bug in the floating point implementation on S/390 systems such that calling \fIint()\fR on the product of a number and a small magnitude number is not the same as calling \fIint()\fR on the quotient of that number and a large magnitude number. For example, in the following Perl code: .PP .Vb 4 \& my $x = 100000.0; \& my $y = int($x * 1e-5) * 1e5; # '0' \& my $z = int($x / 1e+5) * 1e5; # '100000' \& print "\e$y is $y and \e$z is $z\en"; # $y is 0 and $z is 100000 .Ve .PP Although one would expect the quantities \f(CW$y\fR and \f(CW$z\fR to be the same and equal to 100000 they will differ and instead will be 0 and 100000 respectively. .PP The problem can be further examined in a roughly equivalent C program: .PP .Vb 15 \& #include \& #include \& main() \& { \& double r1,r2; \& double x = 100000.0; \& double y = 0.0; \& double z = 0.0; \& x = 100000.0 * 1e-5; \& r1 = modf (x,&y); \& x = 100000.0 / 1e+5; \& r2 = modf (x,&z); \& printf("y is %e and z is %e\en",y*1e5,z*1e5); \& /* y is 0.000000e+00 and z is 1.000000e+05 (with c89) */ \& } .Ve .Sh "Modules and Extensions for Perl on \s-1OS/390\s0" .IX Subsection "Modules and Extensions for Perl on OS/390" Pure pure (that is non xs) modules may be installed via the usual: .PP .Vb 4 \& perl Makefile.PL \& make \& make test \& make install .Ve .PP If you built perl with dynamic loading capability then that would also be the way to build xs based extensions. However, if you built perl with the default static linking you can still build xs based extensions for \s-1OS/390\s0 but you will need to follow the instructions in ExtUtils::MakeMaker for building statically linked perl binaries. In the simplest configurations building a static perl + xs extension boils down to: .PP .Vb 6 \& perl Makefile.PL \& make \& make perl \& make test \& make install \& make -f Makefile.aperl inst_perl MAP_TARGET=perl .Ve .PP In most cases people have reported better results with \s-1GNU\s0 make rather than the system's /bin/make program, whether for plain modules or for xs based extensions. .PP If the make process encounters trouble with either compilation or linking then try setting the _C89_CCMODE to 1. Assuming sh is your login shell then run: .PP .Vb 1 \& export _C89_CCMODE=1 .Ve .PP If tcsh is your login shell then use the setenv command. .SH "AUTHORS" .IX Header "AUTHORS" David Fiander and Peter Prymmer with thanks to Dennis Longnecker and William Raffloer for valuable reports, \s-1LPAR\s0 and \s-1PTF\s0 feedback. Thanks to Mike MacIsaac and Egon Terwedow for \s-1SG24\-5944\-00\s0. Thanks to Ignasi Roca for pointing out the floating point problems. Thanks to John Goodyear for dynamic loading help. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1INSTALL\s0, perlport, perlebcdic, ExtUtils::MakeMaker. .PP .Vb 1 \& http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html .Ve .PP .Vb 1 \& http://www.redbooks.ibm.com/abstracts/sg245944.html .Ve .PP .Vb 1 \& http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html#opensrc .Ve .PP .Vb 1 \& http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/ .Ve .PP .Vb 1 \& http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/ceea3030/ .Ve .PP .Vb 1 \& http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/CBCUG030/ .Ve .Sh "Mailing list for Perl on \s-1OS/390\s0" .IX Subsection "Mailing list for Perl on OS/390" If you are interested in the \s-1VM/ESA\s0, z/OS (formerly known as \s-1OS/390\s0) and POSIX-BC (\s-1BS2000\s0) ports of Perl then see the perl-mvs mailing list. To subscribe, send an empty message to perl\-mvs\-subscribe@perl.org. .PP See also: .PP .Vb 1 \& http://lists.perl.org/showlist.cgi?name=perl-mvs .Ve .PP There are web archives of the mailing list at: .PP .Vb 2 \& http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/ \& http://archive.develooper.com/perl-mvs@perl.org/ .Ve .SH "HISTORY" .IX Header "HISTORY" This document was originally written by David Fiander for the 5.005 release of Perl. .PP This document was podified for the 5.005_03 release of Perl 11 March 1999. .PP Updated 28 November 2001 for broken URLs. .PP Updated 12 November 2000 for the 5.7.1 release of Perl. .PP Updated 15 January 2001 for the 5.7.1 release of Perl. .PP Updated 24 January 2001 to mention dynamic loading. .PP Updated 12 March 2001 to mention //'\s-1SYS1\s0.TCPPARMS(\s-1TCPDATA\s0)'.