{
    "mode": "man",
    "parameter": "PERLOS390",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/PERLOS390/1/json",
    "generated": "2026-06-03T03:35:11Z",
    "synopsis": "This document will help you Configure, build, test and install Perl on OS/390 (aka z/OS) Unix\nSystem Services.",
    "sections": {
        "NAME": {
            "content": "perlos390 - building and installing Perl for OS/390 and z/OS\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "This document will help you Configure, build, test and install Perl on OS/390 (aka z/OS) Unix\nSystem Services.\n",
            "subsections": [
                {
                    "name": "This document needs to be updated, but we don't know what it should say.  Please submit",
                    "content": ""
                },
                {
                    "name": "comments to <https://github.com/Perl/perl5/issues>.",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This is a fully ported Perl for OS/390 Version 2 Release 3, 5, 6, 7, 8, and 9.  It may work\non other versions or releases, but those are the ones we have tested it on.\n\nYou may need to carry out some system configuration tasks before running the Configure script\nfor Perl.\n",
            "subsections": [
                {
                    "name": "Tools",
                    "content": "The z/OS Unix Tools and Toys list may prove helpful and contains links to ports of much of\nthe software helpful for building Perl.\n<http://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html>\n"
                },
                {
                    "name": "Unpacking Perl distribution on OS/390",
                    "content": "If using ftp remember to transfer the distribution in binary format.\n\nGunzip/gzip for OS/390 is discussed at:\n\nhttp://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html\n\nto extract an ASCII tar archive on OS/390, try this:\n\npax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar\n\nor\n\nzcat latest.tar.Z | pax -o to=IBM-1047,from=ISO8859-1 -r\n\nIf you get lots of errors of the form\n\ntar: FSUM7171 ...: cannot set uid/gid: EDC5139I Operation not permitted\n\nyou did not read the above and tried to use tar instead of pax, you'll first have to remove\nthe (now corrupt) perl directory\n\nrm -rf perl-...\n\nand then use pax.\n"
                },
                {
                    "name": "Setup and utilities for Perl on OS/390",
                    "content": "Be sure that your yacc installation is in place including any necessary parser template\nfiles. If you have not already done so then be sure to:\n\ncp /samples/yyparse.c /etc\n\nThis may also be a good time to ensure that your /etc/protocol file and either your\n/etc/resolv.conf or /etc/hosts files are in place.  The IBM document that described such USS\nsystem setup issues was SC28-1890-07 \"OS/390 UNIX System Services Planning\", in particular\nChapter 6 on customizing the OE shell.\n\nGNU make for OS/390, which is recommended for the build of perl (as well as building CPAN\nmodules and extensions), is available from the \"Tools\".\n\nSome people have reported encountering \"Out of memory!\" errors while trying to build Perl\nusing GNU make binaries.  If you encounter such trouble then try to download the source code\nkit and build GNU make from source to eliminate any such trouble.  You might also find GNU\nmake (as well as Perl and Apache) in the red-piece/book \"Open Source Software for OS/390\nUNIX\", SG24-5944-00 from IBM.\n\nIf instead of the recommended GNU make you would like to use the system supplied make program\nthen be sure to install the default rules file properly via the shell command:\n\ncp /samples/startup.mk /etc\n\nand be sure to also set the environment variable C89CCMODE=1 (exporting C89CCMODE=1 is\nalso a good idea for users of GNU make).\n\nYou might also want to have GNU groff for OS/390 installed before running the \"make install\"\nstep for Perl.\n\nThere is a syntax error in the /usr/include/sys/socket.h header file that IBM supplies with\nUSS V2R7, V2R8, and possibly V2R9.  The problem with the header file is that near the\ndefinition of the SOREUSEPORT constant there is a spurious extra '/' character outside of a\ncomment like so:\n\n#define SOREUSEPORT    0x0200    /* allow local address & port\nreuse */                    /\n\nYou could edit that header yourself to remove that last '/', or you might note that Language\nEnvironment (LE) APAR PQ39997 describes the problem and PTF's UQ46272 and UQ46271 are the (R8\nat least) fixes and apply them.  If left unattended that syntax error will turn up as an\ninability for Perl to build its \"Socket\" extension.\n\nFor successful testing you may need to turn on the sticky bit for your world readable /tmp\ndirectory if you have not already done so (see man chmod).\n"
                },
                {
                    "name": "Configure Perl on OS/390",
                    "content": "Once you have unpacked the distribution, run \"sh Configure\" (see INSTALL for a full\ndiscussion of the Configure options).  There is a \"hints\" file for os390 that specifies the\ncorrect values for most things.  Some things to watch out for include:\n\nShell\n\nA message of the form:\n\n(I see you are using the Korn shell.  Some ksh's blow up on Configure,\nmainly on older exotic systems.  If yours does, try the Bourne shell instead.)\n\nis nothing to worry about at all.\n\nSamples\n\nSome of the parser default template files in /samples are needed in /etc.  In particular be\nsure that you at least copy /samples/yyparse.c to /etc before running Perl's Configure.  This\nstep ensures successful extraction of EBCDIC versions of parser files such as perly.c and\nperly.h.  This has to be done before running Configure the first time.  If you failed to do\nso then the easiest way to re-Configure Perl is to delete your misconfigured build root and\nre-extract the source from the tar ball.  Then you must ensure that /etc/yyparse.c is\nproperly in place before attempting to re-run Configure.\n\nDynamic loading\n\nDynamic loading is required if you want to use XS modules from CPAN (like DBI (and DBD's),\nJSON::XS, and Text::CSVXS) or update CORE modules from CPAN with newer versions (like\nEncode) without rebuilding all of the perl binary.\n\nThis port will support dynamic loading, but it is not selected by default.  If you would like\nto experiment with dynamic loading then be sure to specify -Dusedl in the arguments to the\nConfigure script.  See the comments in hints/os390.sh for more information on dynamic\nloading.  If you build with dynamic loading then you will need to add the $archlibexp/CORE\ndirectory to your LIBPATH environment variable in order for perl to work.  See the config.sh\nfile for the value of $archlibexp.  If in trying to use Perl you see an error message similar\nto:\n\nCEE3501S The module libperl.dll was not found.\nFrom entry point dllstaticinit at compile unit offset +00000194\nat\n\nthen your LIBPATH does not have the location of libperl.x and either libperl.dll or\nlibperl.so in it.  Add that directory to your LIBPATH and proceed.\n\nIn hints/os390.sh, selecting -Dusedl will default to *also* select -Duseshrplib.  Having a\nshared plib not only requires LIBPATH to be set to the correct location of libperl.so but\nalso makes it close to impossible to run more than one different perl that was built this way\nat the same time.\n\nAll objects that are involved in -Dusedl builds should be compiled for this, probably by\nadding to all ccflags\n\n-qexportall -qxplink -qdll -Wc,XPLINK,dll,EXPORTALL -Wl,XPLINK,dll\n\nOptimizing\n\nDo not turn on the compiler optimization flag \"-O\".  There is a bug in either the optimizer\nor perl that causes perl to not work correctly when the optimizer is on.\n\nConfig files\n\nSome of the configuration files in /etc used by the networking APIs are either missing or\nhave the wrong names.  In particular, make sure that there's either an /etc/resolv.conf or an\n/etc/hosts, so that gethostbyname() works, and make sure that the file /etc/proto has been\nrenamed to /etc/protocol (NOT /etc/protocols, as used by other Unix systems).  You may have\nto look for things like HOSTNAME and DOMAINORIGIN in the \"//'SYS1.TCPPARMS(TCPDATA)'\" PDS\nmember in order to properly set up your /etc networking files.\n"
                },
                {
                    "name": "Build, Test, Install Perl on OS/390",
                    "content": "Simply put:\n\nsh Configure\nmake\nmake test\n\nif everything looks ok (see the next section for test/IVP diagnosis) then:\n\nmake install\n\nthis last step may or may not require UID=0 privileges depending on how you answered the\nquestions that Configure asked and whether or not you have write access to the directories\nyou specified.\n"
                },
                {
                    "name": "Build Anomalies with Perl on OS/390",
                    "content": "\"Out of memory!\" messages during the build of Perl are most often fixed by re building the\nGNU make utility for OS/390 from a source code kit.\n\nBuilding debugging-enabled binaries (with -g or -g3) will increase the chance of getting\nthese errors. Prevent -g if possible.\n\nAnother memory limiting item to check is your MAXASSIZE parameter in your\n'SYS1.PARMLIB(BPXPRMxx)' data set (note too that as of V2R8 address space limits can be set\non a per user ID basis in the USS segment of a RACF profile).  People have reported\nsuccessful builds of Perl with MAXASSIZE parameters as small as 503316480 (and it may be\npossible to build Perl with a MAXASSIZE smaller than that).\n\nWithin USS your /etc/profile or $HOME/.profile may limit your ulimit settings.  Check that\nthe following command returns reasonable values:\n\nulimit -a\n\nTo conserve memory you should have your compiler modules loaded into the Link Pack Area\n(LPA/ELPA) rather than in a link list or step lib.\n\nIf the c89 compiler complains of syntax errors during the build of the Socket extension then\nbe sure to fix the syntax error in the system header /usr/include/sys/socket.h.\n"
                },
                {
                    "name": "Testing Anomalies with Perl on OS/390",
                    "content": "The \"make test\" step runs a Perl Verification Procedure, usually before installation.  You\nmight encounter STDERR messages even during a successful run of \"make test\".  Here is a guide\nto some of the more commonly seen anomalies:\n\nSignals\n\nA message of the form:\n\nio/openpid...........CEE5210S The signal SIGHUP was received.\nCEE5210S The signal SIGHUP was received.\nCEE5210S The signal SIGHUP was received.\nok\n\nindicates that the t/io/openpid.t test of Perl has passed but done so with extraneous\nmessages on stderr from CEE.\n\nFile::Temp\n\nA message of the form:\n\nlib/ftmp-security....File::Temp::gettemp: Parent directory (/tmp/)\nis not safe (sticky bit not set when world writable?) at\nlib/ftmp-security.t line 100\nFile::Temp::gettemp: Parent directory (/tmp/) is not safe (sticky\nbit not set when world writable?) at lib/ftmp-security.t line 100\nok\n\nindicates a problem with the permissions on your /tmp directory within the HFS.  To correct\nthat problem issue the command:\n\nchmod a+t /tmp\n\nfrom an account with write access to the directory entry for /tmp.\n\nOut of Memory!\n\nRecent perl test suite is quite memory hungry. In addition to the comments above on memory\nlimitations it is also worth checking for CEERUNOPTS in your environment. Perl now has (in\nminiperlmain.c) a C #pragma to set CEE run options, but the environment variable wins.\n\nThe C code asks for:\n\n#pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))\n\nThe important parts of that are the second argument (the increment) to HEAP, and allowing the\nstack to be \"Above the (16M) line\". If the heap increment is too small then when perl (for\nexample loading unicode/Name.pl) tries to create a \"big\" (400K+) string it cannot fit in a\nsingle segment and you get \"Out of Memory!\" - even if there is still plenty of memory\navailable.\n\nA related issue is use with perl's malloc. Perl's malloc uses \"sbrk()\" to get memory, and\n\"sbrk()\" is limited to the first allocation so in this case something like:\n\nHEAP(8M,500K,ANYWHERE,KEEP,8K,4K)\n\nis needed to get through the test suite.\n"
                },
                {
                    "name": "Installation Anomalies with Perl on OS/390",
                    "content": "The installman script will try to run on OS/390.  There will be fewer errors if you have a\nroff utility installed.  You can obtain GNU groff from the Redbook SG24-5944-00 ftp site.\n"
                },
                {
                    "name": "Usage Hints for Perl on OS/390",
                    "content": "When using perl on OS/390 please keep in mind that the EBCDIC and ASCII character sets are\ndifferent.  See perlebcdic.pod for more on such character set issues.  Perl builtin functions\nthat may behave differently under EBCDIC are also mentioned in the perlport.pod document.\n\nOpen Edition (UNIX System Services) from V2R8 onward does support #!/path/to/perl script\ninvocation.  There is a PTF available from IBM for V2R7 that will allow shell/kernel support\nfor #!.  USS releases prior to V2R7 did not support the #! means of script invocation.  If\nyou are running V2R6 or earlier then see:\n\nhead `whence perldoc`\n\nfor an example of how to use the \"eval exec\" trick to ask the shell to have Perl run your\nscripts on those older releases of Unix System Services.\n\nIf you are having trouble with square brackets then consider switching your rlogin or telnet\nclient.  Try to avoid older 3270 emulators and ISHELL for working with Perl on USS.\n"
                },
                {
                    "name": "Floating Point Anomalies with Perl on OS/390",
                    "content": "There appears to be a bug in the floating point implementation on S/390 systems such that\ncalling int() on the product of a number and a small magnitude number is not the same as\ncalling int() on the quotient of that number and a large magnitude number.  For example, in\nthe following Perl code:\n\nmy $x = 100000.0;\nmy $y = int($x * 1e-5) * 1e5; # '0'\nmy $z = int($x / 1e+5) * 1e5;  # '100000'\nprint \"\\$y is $y and \\$z is $z\\n\"; # $y is 0 and $z is 100000\n\nAlthough one would expect the quantities $y and $z to be the same and equal to 100000 they\nwill differ and instead will be 0 and 100000 respectively.\n\nThe problem can be further examined in a roughly equivalent C program:\n\n#include <stdio.h>\n#include <math.h>\nmain()\n{\ndouble r1,r2;\ndouble x = 100000.0;\ndouble y = 0.0;\ndouble z = 0.0;\nx = 100000.0 * 1e-5;\nr1 = modf (x,&y);\nx = 100000.0 / 1e+5;\nr2 = modf (x,&z);\nprintf(\"y is %e and z is %e\\n\",y*1e5,z*1e5);\n/* y is 0.000000e+00 and z is 1.000000e+05 (with c89) */\n}\n"
                },
                {
                    "name": "Modules and Extensions for Perl on OS/390",
                    "content": "Pure Perl (that is non XS) modules may be installed via the usual:\n\nperl Makefile.PL\nmake\nmake test\nmake install\n\nIf you built perl with dynamic loading capability then that would also be the way to build XS\nbased extensions.  However, if you built perl with the default static linking you can still\nbuild XS based extensions for OS/390 but you will need to follow the instructions in\nExtUtils::MakeMaker for building statically linked perl binaries.  In the simplest\nconfigurations building a static perl + XS extension boils down to:\n\nperl Makefile.PL\nmake\nmake perl\nmake test\nmake install\nmake -f Makefile.aperl instperl MAPTARGET=perl\n\nIn most cases people have reported better results with GNU make rather than the system's\n/bin/make program, whether for plain modules or for XS based extensions.\n\nIf the make process encounters trouble with either compilation or linking then try setting\nthe C89CCMODE to 1.  Assuming sh is your login shell then run:\n\nexport C89CCMODE=1\n\nIf tcsh is your login shell then use the setenv command.\n"
                }
            ]
        },
        "AUTHORS": {
            "content": "David Fiander and Peter Prymmer with thanks to Dennis Longnecker and William Raffloer for\nvaluable reports, LPAR and PTF feedback.  Thanks to Mike MacIsaac and Egon Terwedow for\nSG24-5944-00.  Thanks to Ignasi Roca for pointing out the floating point problems.  Thanks to\nJohn Goodyear for dynamic loading help.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "INSTALL, perlport, perlebcdic, ExtUtils::MakeMaker.\n\nhttp://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html\n\nhttp://www.redbooks.ibm.com/redbooks/SG245944.html\n\nhttp://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html#opensrc\n\nhttp://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/\n\nhttp://publibz.boulder.ibm.com:80/cgi-bin/bookmgrOS390/BOOKS/ceea3030/\n\nhttp://publibz.boulder.ibm.com:80/cgi-bin/bookmgrOS390/BOOKS/CBCUG030/\n",
            "subsections": [
                {
                    "name": "Mailing list for Perl on OS/390",
                    "content": "If you are interested in the z/OS (formerly known as OS/390) and POSIX-BC (BS2000) ports of\nPerl then see the perl-mvs mailing list.  To subscribe, send an empty message to\nperl-mvs-subscribe@perl.org.\n\nSee also:\n\nhttps://lists.perl.org/list/perl-mvs.html\n\nThere are web archives of the mailing list at:\n\nhttps://www.nntp.perl.org/group/perl.mvs/\n"
                }
            ]
        },
        "HISTORY": {
            "content": "This document was originally written by David Fiander for the 5.005 release of Perl.\n\nThis document was podified for the 5.00503 release of Perl 11 March 1999.\n\nUpdated 12 November 2000 for the 5.7.1 release of Perl.\n\nUpdated 15 January  2001 for the 5.7.1 release of Perl.\n\nUpdated 24 January  2001 to mention dynamic loading.\n\nUpdated 12 March    2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.\n\nUpdated 28 November 2001 for broken URLs.\n\nUpdated 03 October  2019 for perl-5.33.3+\n\n\n\nperl v5.34.0                                 2025-07-25                                 PERLOS390(1)",
            "subsections": []
        }
    },
    "summary": "perlos390 - building and installing Perl for OS/390 and z/OS",
    "flags": [],
    "examples": [],
    "see_also": []
}