{
    "mode": "man",
    "parameter": "perlos390",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/perlos390/1/json",
    "generated": "2026-10-22T15:30:47Z",
    "synopsis": "This document will help you Configure, build, test and install Perl on z/OS Unix System\nServices.",
    "sections": {
        "NAME": {
            "content": "perlos390 - building and installing Perl for z/OS (previously called OS/390)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "This document will help you Configure, build, test and install Perl on z/OS Unix System\nServices.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is a ported Perl for z/OS. It has been tested on z/OS 2.4 and should work fine with z/OS\n2.5.  It may work on other versions or releases, but those are the ones it has been tested\non.\n\nThe native character set for z/OS is EBCDIC, but it can also run in ASCII mode.  Perl can\nsupport either, but you have to compile it explicitly for one or the other.  You could have\nboth an ASCII perl, and an EBCDIC perl on the same machine.  If you use ASCII mode and an\nASCII perl, the Encode module shipped with perl can be used to translate files from various\nEBCDIC code pages for handling by perl, and then back on output\n\nThis document describes how to build a 64-bit Dynamic Perl, either ASCII or EBCDIC.  You can\ninteractively choose other configurations, as well as many other options in the Configure\nscript that is run as part of the build process.  You may need to carry out some system\nconfiguration tasks before running Configure, as detailed below.\n",
            "subsections": [
                {
                    "name": "Tools",
                    "content": "You will want to get GNU make 4.1 or later. GNU make can be downloaded from a port that\nRocket Software provides.  You will need the z/OS c99 compiler from IBM (though xlc in c99\nmode without optimization turned on works in EBCDIC).\n\nIf you want the latest development version of Perl, you will need git.  You can use git on\nanother platform and transfer the result via sftp or ftp to z/OS.  But there is a z/OS native\ngit client port available through Rocket Software.\n\nYou may also need the gunzip client port that Rocket Software provides to unzip any zipped\ntarball you upload to z/OS.\n"
                },
                {
                    "name": "Building a 64-bit Dynamic ASCII Perl",
                    "content": "For building from an official stable release of Perl, go to <https://www.perl.org/get.html>\nand choose any one of the \"Download latest stable source\" buttons.  This will get you a\ntarball.  The name of that tarball will be something like 'perl-V.R.M,tar,gz', where V.R.M is\nthe version/release/modification of the perl you are downloading. Do\n\ngunzip perl-V.R.M.tar.gz\n\nThen one of:\n\ntar -xvf perl-V.R.M.tar\n\npax -r -f perl-V.R.M.tar\n\nEither of these will create the source directory.  You can rename it to whatever you like;\nfor these instructions, 'perl' is assumed to be the name.\n\nIf instead you want the latest unstable development release, using the native git on z/OS,\nclone Perl:\n\ngit clone https://github.com/Perl/perl5.git perl\n\nEither way, once you have a 'perl' directory containing the source, cd into it, and tag all\nthe code as ASCII:\n\ncd perl\nchtag -R -h -t -cISO8859-1 *\n\nConfigure the build environment as 64-bit, Dynamic, ASCII, development, deploying it to\n/usr/local/perl/ascii:\n\nexport PATH=$PWD:$PATH\nexport LIBPATH=$PWD:$PATH\n./Configure -Dprefix=/usr/local/perl/ascii -des -Dusedevel \\\n-Duse64bitall -Dusedl\n\nIf you are building from a stable source, you don't need \"-Dusedevel\".  (If you run Configure\nwithout options, it will interactively ask you about every possible option based on its\nprobing of what's available on your particular machine, so you can choose as you go along.)\n\nRun GNU make to build Perl\n\nmake\n\nRun tests to ensure Perl is working correctly. Currently, there are about a dozen failing\ntests out of nearly 2500\n\nmake testharness\n\nInstall Perl into /usr/local/perl/ascii:\n\nmake install\n"
                },
                {
                    "name": "Building a 64-bit Dynamic EBCDIC Perl",
                    "content": "You will need a working perl on some box with connectivity to the destination machine.  On\nz/OS, it could be an ASCII perl, or a previous EBCDIC one.  Many machines will already have a\npre-built perl already running, or one can easily be downloaded from\n<https://www.perl.org/get.html>.\n\nFollow the directions above in \"Building a 64-bit Dynamic ASCII Perl\" as far as getting a\npopulated 'perl' directory.  Then come back here to proceed.\n\nThe downloaded perl will need to be converted to 1047 EBCDIC.  To do this:\n\ncd perl\nPorting/makerel -e\n\nIf the Porting/makerel step fails with an error that it can not issue the tar command,\nproceed to issue the command interactively, where V.R.M is the version/release/modification\nof Perl you are uploading:\n\ncd ../\ntar cf -  --format=ustar perl-V.R.M | gzip --best > perl-V.R.M.tar.gz\n\nUse sftp to upload the zipped tar file to z/OS:\n\nsftp <your system>\ncd /tmp\nput perl-V.R.M.tar.gz\n\nUnzip and untar the zipped tar file on z/OS:\n\ncd /tmp\ngunzip perl-V.R.M.tar.gz\n\nThen one of:\n\ntar -xvf perl-V.R.M.tar\n\npax -r -f perl-V.R.M.tar\n\nYou now have the source code for the EBCDIC Perl on z/OS and can proceed to build it. This is\nanalagous to how you would build the code for ASCII, but note: you should not tag the code\nbut instead leave it untagged.\n\nConfigure the build environment as 64-bit, Dynamic, native, development, deploying it to\n/usr/local/perl/ebcdic:\n\nexport PATH=$PWD:$PATH\nexport LIBPATH=$PWD:$PATH\n./Configure -Dprefix=/usr/local/perl/ebcdic -des -Dusedevel \\\n-Duse64bitall -Dusedl\n\nIf you are building from a stable source, you don't need \"-Dusedevel\".  (If you run Configure\nwithout options, it will interactively ask you about every possible option based on its\nprobing of what's available on your particular machine, so you can choose as you go along.)\n\nRun GNU make to build Perl\n\nmake\n\nRun tests to ensure Perl is working correctly.\n\nmake testharness\n\nYou might also want to have GNU groff for OS/390 installed before running the \"make install\"\nstep for Perl.\n\nInstall Perl into /usr/local/perl/ebcdic:\n\nmake install\n\nEBCDIC Perl is still a work in progress.  All the core code works as far as we know, but\nvarious modules you might want to download from CPAN do not.  The failures range from very\nminor to catastrophic.  Many of them are simply bugs in the tests, with the module actually\nworking properly.  This happens because, for example, the test is coded to expect a certain\ncharacter ASCII code point; when it gets the EBCDIC value back instead, it complains.  But\nthe code actually worked.  Other potential failures that aren't really failures stem from\nchecksums coming out differently, since \"A\", for example, has a different bit representation\nbetween the character sets.  A test that is expecting the ASCII value will show failure, even\nif the module is working perfectly.  Also in sorting, uppercase letters come before lowercase\nletters on ASCII systems; the reverse on EBCDIC.\n\nSome CPAN modules come bundled with the downloaded perl.  And a few of those have yet to be\nfixed to pass on EBCDIC platforms.  As a result they are skipped when you run 'make test'.\nThe current list is:\n\nArchive::Tar\nConfig::Perl::V\nCPAN::Meta\nCPAN::Meta::YAML\nDigest::MD5\nDigest::SHA\nEncode\nExtUtils::MakeMaker\nExtUtils::Manifest\nHTTP::Tiny\nIO::Compress\nIPC::Cmd\nJSON::PP\nlibnet\nMIME::Base64\nModule::Metadata\nPerlIO::via-QuotedPrint\nPod::Checker\npodlators\nPod::Simple\nSocket\nTest::Harness\n\nSee also hints/os390.sh for other potential gotchas.\n"
                },
                {
                    "name": "Setup and utilities for Perl on OS/390",
                    "content": "This 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 describes such USS\nsystem setup issues is \"z/OS UNIX System Services Planning\"\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": "Useful files for trouble-shooting",
                    "content": "If your configuration is failing, read hints/os390.sh This file provides z/OS specific\noptions to direct the build process.\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\ninstead.)\n\nis nothing to worry about at all.\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\nThe instructions above will create a dynamic Perl. If you do not want to use dynamic loading,\nremove the -Dusedl option.  See the comments in hints/os390.sh for more information on\ndynamic loading.\n\nOptimizing\n\nOptimization has not been turned on yet. There may be issues if Perl is optimized.\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\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 compiler complains of syntax errors during the build of the Socket extension then be\nsure 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\nOut of Memory (31-bit only)\n\nOut of memory problems should not be an issue, unless you are attempting to build a 31-bit\nPerl.\n\nIf you are building a 31-bit Perl, the constrained environment may mean you need to change\nmemory options for Perl.  In addition to the comments above on memory limitations it is also\nworth checking for CEERUNOPTS in your environment. Perl now has (in miniperlmain.c) a C\n#pragma for 31-bit only to set CEE run options, but the environment variable wins.\n\nThe 31-bit 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\nsbrk() 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": "Usage Hints for Perl on z/OS",
                    "content": "When using Perl on z/OS please keep in mind that the EBCDIC and ASCII character sets are\ndifferent.  See perlebcdic 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\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": "Modules and Extensions for Perl on z/OS (Static Only)",
                    "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 static linking you can still build XS\nbased extensions for z/OS but you will need to follow the instructions in ExtUtils::MakeMaker\nfor building statically linked perl binaries.  In the simplest configurations building a\nstatic 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"
                },
                {
                    "name": "Running Perl on z/OS",
                    "content": "To run the 64-bit Dynamic Perl environment, update your PATH and LIBPATH to include the\nlocation you installed Perl into, and then run the perl you installed as perlV.R.M where\nV/R/M is the Version/Release/Modification level of the current development level.  If you are\nrunning the ASCII/EBCDIC Bi-Modal Perl environment, you also need to set up your ASCII/EBCDIC\nBi-Modal environment variables, and ensure any Perl source code you run is tagged\nappropriately as ASCII or EBCDIC using \"chtag -t -c<CCSID>\":\n\nFor ASCII Only:\nexport BPXKAUTOCVT=ON\nexport CEERUNOPTS=\"FILETAG(AUTOCVT,AUTOTAG),POSIX(ON)\"\nexport TAGREDIRERR=\"txt\"\nexport TAGREDIRIN=\"txt\"\nexport TAGREDIROUT=\"txt\"\n\nFor ASCII or EBCDIC:\nexport PATH=/usr/local/perl/ascii:$PATH\nexport LIBPATH=/usr/local/perl/ascii/lib:$LIBPATH\nperlV.R.M args\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\nMike  Fulton and Karl Williamson have provided updates for UTF8, DLL, 64-bit and ASCII/EBCDIC\nBi-Modal support\n",
            "subsections": []
        },
        "OTHER SITES": {
            "content": "<https://github.com/ZOSOpenTools/perlport/> provides documentation  and  tools  for  building\nvarious  z/OS  Perl  configurations  and has some useful tools in the 'bin' directory you may\nwant to use for building z/OS Perl yourself.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "Updated 24 December 2021 to enable initial ASCII support\n\nUpdated 03 October  2019 for perl-5.33.3+\n\nUpdated 28 November 2001 for broken URLs.\n\nUpdated 12 March    2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.\n\nUpdated 24 January  2001 to mention dynamic loading.\n\nUpdated 15 January  2001 for the 5.7.1 release of Perl.\n\nUpdated 12 November 2000 for the 5.7.1 release of Perl.\n\nThis document was podified for the 5.00503 release of Perl 11 March 1999.\n\nThis document was originally written by David Fiander for the 5.005 release of Perl.\n\nperl v5.38.2                                 2026-08-18                                 PERLOS390(1)",
            "subsections": []
        }
    },
    "summary": "perlos390 - building and installing Perl for z/OS (previously called OS/390)",
    "flags": [],
    "examples": [],
    "see_also": []
}