perlos390.html 42.2 KB
Newer Older
1 2 3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
4 5
<head>
  <title>perlos390 - perldoc.perl.org</title>
6 7
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta http-equiv="Content-Language" content="en-gb">
8 9 10
  <link rel="search" type="application/opensearchdescription+xml" title="Search perldoc.perl.org" href="/static/search.xml"/>
  <link href="static/css-20100830.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen">
  <link href="static/exploreperl.css" rel="stylesheet" rev="stylesheet" type="text/css">
11 12
</head>

13 14 15 16 17 18 19
<body onLoad="perldoc.startup();" onPageShow="if (event.persisted) perldoc.startup();">
    <div id="page">
      
      <div id="header">
	<div id="homepage_link">
	  <a href="index.html"></a>
	</div>
20 21 22 23 24 25 26 27 28
	<div id="strapline">
	  Perl Programming Documentation
	</div>
	<div id="download_link" class="download">
	  <a href="http://www.perl.org/get.html">Download Perl</a>
	</div>
	<div id="explore_link" class="download">
	  <a id="explore_anchor" href="#">Explore</a>
	</div>
29
      </div>
30 31 32 33
      
      <div id="body">
        <div id="left_column">
          <div class="side_group">
34 35
            
	    <div class="side_panel doc_panel">
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
              <p>Manual</p>
              <ul>
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">History / Changes</a>
                <li><a href="index-licence.html">License</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Reference</p>
              <ul>
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Special Variables</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
54
                <li><a href="index-internals.html">Internals</a>
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
                <li><a href="index-platforms.html">Platform Specific</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Modules</p>
              <ul>
		<li>
		
                
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		
                  
		
		
                    <a href="index-modules-A.html">A</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-B.html">B</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-C.html">C</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-D.html">D</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-E.html">E</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-F.html">F</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-G.html">G</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-H.html">H</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-I.html">I</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-L.html">L</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-M.html">M</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-N.html">N</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-O.html">O</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-P.html">P</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-S.html">S</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-T.html">T</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-U.html">U</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-X.html">X</a>
                    
                
              </ul>
            </div>
277 278 279 280 281 282 283 284
            
	      <div class="side_panel doc_panel">
		<p>Tools</p>
		<ul>
		  <li><a href="preferences.html">Preferences</a>
		</ul>
	      </div>
            
285 286 287 288 289 290 291 292 293
          </div>
        </div>
        <div id="centre_column">
          <div id="content_header">
            <div id="title_bar">
              <div id="page_name">
                <h1>perlos390</h1>
              </div>
              <div id="perl_version">
294
                Perl 5 version 26.0 documentation
295
              </div>
296
              <div class="page_links" id="page_links_top">
297 298
                <a href="#" onClick="toolbar.goToTop();return false;">Go to top</a>
		
299 300
              </div>
	      <div class="page_links" id="page_links_bottom">
301
		
302
                  <a href="#" id="page_index_toggle">Show page index</a> &bull;
303
		
304 305 306 307 308 309 310
                <a href="#" id="recent_pages_toggle">Show recent pages</a>		
	      </div>
	      <div id="search_form">
		<form action="search.html" method="GET" id="search">
		  <input type="text" name="q" id="search_box" alt="Search">
		</form>
	      </div>
311 312 313 314 315 316 317 318 319 320 321
            </div>
            <div id="breadcrumbs">
                
    <a href="index.html">Home</a> &gt;
    
      
        <a href="index-platforms.html">Platform specific</a> &gt;
      
    
    perlos390
  
322

323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
            </div>
          </div>
          <div id="content_body">
	    <!--[if lt IE 7]>
 <div class="noscript">
   <p>
     <strong>It looks like you're using Internet Explorer 6. This is a very old
     browser which does not offer full support for modern websites.</strong>
   </p>
   <p>
     Unfortunately this means that this website will not work on
     your computer.
   </p>
   <p>
     Don't miss out though! To view the site (and get a better experience from
     many other websites), simply upgrade to
     <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet
Explorer 8</a>
     or download an alternative browser such as
     <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>,
     <a href="http://www.apple.com/safari/download/">Safari</a>, or
     <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
   </p>
   <p>
     All of these browsers are free. If you're using a PC at work, you may
     need to contact your IT administrator.
   </p>
 </div>
<![endif]-->
	    <noscript>
	      <div class="noscript">
	      <p>
                <strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled,
	        or are running a non-JavaScript capable web browser.</strong>
	      </p>
	      <p>
		To get the best experience, please enable JavaScript or download a modern web browser such as <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer 8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, or <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
              </p>
	      </div>
	    </noscript>
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378

	    <div id="recent_pages" class="hud_container">
	      <div id="recent_pages_header" class="hud_header">
		<div id="recent_pages_close" class="hud_close"><a href="#" onClick="recentPages.hide();return false;"></a></div>
		<div id="recent_pages_title" class="hud_title"><span class="hud_span_top">Recently read</span></div>
		<div id="recent_pages_topright" class="hud_topright"></div>
	      </div>
	      <div id="recent_pages_content" class="hud_content">
	      </div>
	      <div id="recent_pages_footer" class="hud_footer">
		<div id="recent_pages_bottomleft" class="hud_bottomleft"></div>
		<div id="recent_pages_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
		<div id="recent_pages_resize" class="hud_resize"></div>
	      </div>
	    </div>
  
379 380 381 382 383 384
	    <div id="from_search"></div>
            <h1>perlos390</h1>


  <!--    -->
<ul><li><a href="#NAME">NAME</a><li><a href="#SYNOPSIS">SYNOPSIS</a><li><a href="#DESCRIPTION">DESCRIPTION</a><ul><li><a href="#Tools">Tools</a><li><a href="#Unpacking-Perl-distribution-on-OS%2f390">Unpacking Perl distribution on OS/390</a><li><a href="#Setup-and-utilities-for-Perl-on-OS%2f390">Setup and utilities for Perl on OS/390</a><li><a href="#Configure-Perl-on-OS%2f390">Configure Perl on OS/390</a><li><a href="#Build%2c-Test%2c-Install-Perl-on-OS%2f390">Build, Test, Install Perl on OS/390</a><li><a href="#Build-Anomalies-with-Perl-on-OS%2f390">Build Anomalies with Perl on OS/390</a><li><a href="#Testing-Anomalies-with-Perl-on-OS%2f390">Testing Anomalies with Perl on OS/390</a><li><a href="#Installation-Anomalies-with-Perl-on-OS%2f390">Installation Anomalies with Perl on OS/390</a><li><a href="#Usage-Hints-for-Perl-on-OS%2f390">Usage Hints for Perl on OS/390</a><li><a href="#Floating-Point-Anomalies-with-Perl-on-OS%2f390">Floating Point Anomalies with Perl on OS/390</a><li><a href="#Modules-and-Extensions-for-Perl-on-OS%2f390">Modules and Extensions for Perl on OS/390</a></ul><li><a href="#AUTHORS">AUTHORS</a><li><a href="#SEE-ALSO">SEE ALSO</a><ul><li><a href="#Mailing-list-for-Perl-on-OS%2f390">Mailing list for Perl on OS/390</a></ul><li><a href="#HISTORY">HISTORY</a></ul><a name="NAME"></a><h1>NAME</h1>
385
<p>perlos390 - building and installing Perl for OS/390 and z/OS</p>
386 387 388
<a name="SYNOPSIS"></a><h1>SYNOPSIS</h1>
<p>This document will help you Configure, build, test and install Perl
on OS/390 (aka z/OS) Unix System Services.</p>
389 390
<p><b>This document needs to be updated, but we don't know what it should say.
Please email comments to <a href="http://search.cpan.org/perldoc/mailto:perlbug@perl.org">perlbug@perl.org</a>.</b></p>
391 392 393
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>This is a fully ported Perl for OS/390 Version 2 Release 3, 5, 6, 7,
8, and 9.  It may work on other versions or releases, but those are
394
the ones we've tested it on.</p>
395 396 397 398 399
<p>You may need to carry out some system configuration tasks before
running the Configure script for Perl.</p>
<a name="Tools"></a><h2>Tools</h2>
<p>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.
400
<a href="http://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html">http://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html</a></p>
401 402 403
<a name="Unpacking-Perl-distribution-on-OS%2f390"></a><h2>Unpacking Perl distribution on OS/390</h2>
<p>If using ftp remember to transfer the distribution in binary format.</p>
<p>Gunzip/gzip for OS/390 is discussed at:</p>
404
<pre class="verbatim"><ol><li>  http://www.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html</li></ol></pre><p>to extract an ASCII tar archive on OS/390, try this:</p>
405 406
<pre class="verbatim"><ol><li>   <span class="w">pax</span> -o <span class="w">to</span>=<span class="w">IBM</span>-<span class="n">1047</span><span class="cm">,</span><span class="w">from</span>=<span class="w">ISO8859</span>-<span class="n">1</span> -<span class="w">r</span> &lt; <span class="w">latest</span>.<span class="w">tar</span></li></ol></pre><p>or</p>
<pre class="verbatim"><ol><li>   <span class="w">zcat</span> <span class="w">latest</span>.<span class="w">tar</span>.<span class="w">Z</span> | <span class="w">pax</span> -o <span class="w">to</span>=<span class="w">IBM</span>-<span class="n">1047</span><span class="cm">,</span><span class="w">from</span>=<span class="w">ISO8859</span>-<span class="n">1</span> -<span class="w">r</span></li></ol></pre><p>If you get lots of errors of the form</p>
407
<pre class="verbatim"><ol><li> <span class="j">tar:</span> <span class="w">FSUM7171</span> ...<span class="co">:</span> <span class="w">cannot</span> <span class="w">set</span> <span class="w">uid</span>/<span class="w">gid</span><span class="co">:</span> <span class="w">EDC5139I</span> <span class="w">Operation</span> <a class="l_k" href="functions/not.html">not</a> <span class="w">permitted</span></li></ol></pre><p>you didn't read the above and tried to use tar instead of pax, you'll
408
first have to remove the (now corrupt) perl directory</p>
409
<pre class="verbatim"><ol><li>   <span class="w">rm</span> -<span class="w">rf</span> <span class="w">perl</span>-...</li></ol></pre><p>and then use pax.</p>
410 411 412
<a name="Setup-and-utilities-for-Perl-on-OS%2f390"></a><h2>Setup and utilities for Perl on OS/390</h2>
<p>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:</p>
413
<pre class="verbatim"><ol><li>  <span class="w">cp</span> /<span class="w">samples</span>/<span class="w">yyparse</span>.<span class="w">c</span> /<span class="w">etc</span></li></ol></pre><p>This may also be a good time to ensure that your /etc/protocol file
414 415
and either your /etc/resolv.conf or /etc/hosts files are in place.
The IBM document that described such USS system setup issues was
416
SC28-1890-07 "OS/390 UNIX System Services Planning", in particular
417 418 419
Chapter 6 on customizing the OE shell.</p>
<p>GNU make for OS/390, which is recommended for the build of perl (as
well as building CPAN modules and extensions), is available from the
420 421
<a href="#Tools">Tools</a>.</p>
<p>Some people have reported encountering "Out of memory!" errors while
422 423 424
trying to build Perl using GNU make binaries.  If you encounter such
trouble then try to download the source code kit and build GNU make
from source to eliminate any such trouble.  You might also find GNU make
425 426
(as well as Perl and Apache) in the red-piece/book "Open Source Software
for OS/390 UNIX", SG24-5944-00 from IBM.</p>
427 428 429
<p>If instead of the recommended GNU 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:</p>
430
<pre class="verbatim"><ol><li>    <span class="w">cp</span> /<span class="w">samples</span>/<span class="w">startup</span>.<span class="w">mk</span> /<span class="w">etc</span></li></ol></pre><p>and be sure to also set the environment variable _C89_CCMODE=1 (exporting
431 432
_C89_CCMODE=1 is also a good idea for users of GNU make).</p>
<p>You might also want to have GNU groff for OS/390 installed before
433
running the "make install" step for Perl.</p>
434 435 436
<p>There is a syntax error in the /usr/include/sys/socket.h header file
that IBM supplies with USS V2R7, V2R8, and possibly V2R9.  The problem with
the header file is that near the definition of the SO_REUSEPORT constant
437 438
there is a spurious extra '/' character outside of a comment like so:</p>
<pre class="verbatim"><ol><li> <span class="c">#define SO_REUSEPORT    0x0200    /* allow local address &amp; port</span></li><li>                                      <span class="w">reuse</span> *<span class="q">/                    /</span></li></ol></pre><p>You could edit that header yourself to remove that last '/', or you might
439
note that Language Environment (LE) APAR PQ39997 describes the problem
440
and PTF's UQ46272 and UQ46271 are the (R8 at least) fixes and apply them.
441
If left unattended that syntax error will turn up as an inability for Perl
442
to build its "Socket" extension.</p>
443 444 445
<p>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).</p>
<a name="Configure-Perl-on-OS%2f390"></a><h2>Configure Perl on OS/390</h2>
446 447
<p>Once you've unpacked the distribution, run "sh Configure" (see INSTALL
for a full discussion of the Configure options).  There is a "hints" file
448 449 450 451 452
for os390 that specifies the correct values for most things.  Some things
to watch out for include:</p>
<ul>
<li>
<p>A message of the form:</p>
453
<pre class="verbatim"><ol><li> <span class="s">(</span><span class="w">I</span> <span class="w">see</span> <span class="w">you</span> <span class="w">are</span> <span class="w">using</span> <span class="w">the</span> <span class="w">Korn</span> <span class="w">shell</span>.  <span class="w">Some</span> <span class="w">ksh&#39;s</span> <span class="w">blow</span> <span class="w">up</span> <span class="w">on</span></li><li> <span class="w">Configure</span><span class="cm">,</span> <span class="w">mainly</span> <span class="w">on</span> <span class="w">older</span> <span class="w">exotic</span> <span class="w">systems</span>.  <span class="w">If</span> <span class="w">yours</span> <span class="w">does</span><span class="cm">,</span> <span class="w">try</span> <span class="w">the</span></li><li> <span class="w">Bourne</span> <span class="w">shell</span> <span class="w">instead</span>.<span class="s">)</span></li></ol></pre><p>is nothing to worry about at all.</p>
454 455 456 457
</li>
<li>
<p>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
458
before running Perl's Configure.  This step ensures successful extraction
459
of EBCDIC versions of parser files such as perly.c and perly.h.
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474
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.</p>
</li>
<li>
<p>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
$archlibexp/CORE directory to your LIBPATH environment variable in order
for perl to work.  See the config.sh file for the value of $archlibexp.
If in trying to use Perl you see an error message similar to:</p>
475
<pre class="verbatim"><ol><li> <span class="w">CEE3501S</span> <span class="w">The</span> <span class="w">module</span> <span class="w">libperl</span>.<span class="w">dll</span> <span class="w">was</span> <a class="l_k" href="functions/not.html">not</a> <span class="w">found</span>.</li><li>   <span class="w">From</span> <span class="w">entry</span> <span class="w">point</span> <span class="w">__dllstaticinit</span> <span class="w">at</span> <span class="w">compile</span> <span class="w">unit</span> <span class="w">offset</span> +<span class="n">00000194</span></li><li>   <span class="w">at</span></li></ol></pre><p>then your LIBPATH does not have the location of libperl.x and either
476 477 478 479
libperl.dll or libperl.so in it.  Add that directory to your LIBPATH and
proceed.</p>
</li>
<li>
480
<p>Do not turn on the compiler optimization flag "-O".  There is
481 482 483 484 485 486
a bug in either the optimizer or perl that causes perl to
not work correctly when the optimizer is on.</p>
</li>
<li>
<p>Some of the configuration files in /etc used by the
networking APIs are either missing or have the wrong
487
names.  In particular, make sure that there's either
488 489 490 491 492
an /etc/resolv.conf or an /etc/hosts, so that
gethostbyname() works, and make sure that the file
/etc/proto has been renamed to /etc/protocol (NOT
/etc/protocols, as used by other Unix systems).
You may have to look for things like HOSTNAME and DOMAINORIGIN
493
in the "//'SYS1.TCPPARMS(TCPDATA)'" PDS member in order to
494 495 496 497 498
properly set up your /etc networking files.</p>
</li>
</ul>
<a name="Build%2c-Test%2c-Install-Perl-on-OS%2f390"></a><h2>Build, Test, Install Perl on OS/390</h2>
<p>Simply put:</p>
499 500
<pre class="verbatim"><ol><li>    <span class="w">sh</span> <span class="w">Configure</span></li><li>    <span class="w">make</span></li><li>    <span class="w">make</span> <span class="w">test</span></li></ol></pre><p>if everything looks ok (see the next section for test/IVP diagnosis) then:</p>
<pre class="verbatim"><ol><li>    <span class="w">make</span> <span class="w">install</span></li></ol></pre><p>this last step may or may not require UID=0 privileges depending
501 502 503
on how you answered the questions that Configure asked and whether
or not you have write access to the directories you specified.</p>
<a name="Build-Anomalies-with-Perl-on-OS%2f390"></a><h2>Build Anomalies with Perl on OS/390</h2>
504
<p>"Out of memory!" messages during the build of Perl are most often fixed
505 506
by re building the GNU make utility for OS/390 from a source code kit.</p>
<p>Another memory limiting item to check is your MAXASSIZE parameter in your
507
'SYS1.PARMLIB(BPXPRMxx)' data set (note too that as of V2R8 address space
508 509 510 511 512 513
limits can be set on a per user ID basis in the USS segment of a RACF
profile).  People have reported successful builds of Perl with MAXASSIZE
parameters as small as 503316480 (and it may be possible to build Perl
with a MAXASSIZE smaller than that).</p>
<p>Within USS your /etc/profile or $HOME/.profile may limit your ulimit
settings.  Check that the following command returns reasonable values:</p>
514
<pre class="verbatim"><ol><li>    <span class="w">ulimit</span> -<span class="w">a</span></li></ol></pre><p>To conserve memory you should have your compiler modules loaded into the
515 516 517 518 519
Link Pack Area (LPA/ELPA) rather than in a link list or step lib.</p>
<p>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.</p>
<a name="Testing-Anomalies-with-Perl-on-OS%2f390"></a><h2>Testing Anomalies with Perl on OS/390</h2>
520
<p>The "make test" step runs a Perl Verification Procedure, usually before
521
installation.  You might encounter STDERR messages even during a successful
522
run of "make test".  Here is a guide to some of the more commonly seen
523 524 525 526
anomalies:</p>
<ul>
<li>
<p>A message of the form:</p>
527
<pre class="verbatim"><ol><li> <span class="w">io</span>/<span class="w">openpid</span>...........<span class="w">CEE5210S</span> <span class="w">The</span> <span class="w">signal</span> <span class="w">SIGHUP</span> <span class="w">was</span> <span class="w">received</span>.</li><li> <span class="w">CEE5210S</span> <span class="w">The</span> <span class="w">signal</span> <span class="w">SIGHUP</span> <span class="w">was</span> <span class="w">received</span>.</li><li> <span class="w">CEE5210S</span> <span class="w">The</span> <span class="w">signal</span> <span class="w">SIGHUP</span> <span class="w">was</span> <span class="w">received</span>.</li><li> <span class="w">ok</span></li></ol></pre><p>indicates that the t/io/openpid.t test of Perl has passed but done so
528 529 530 531
with extraneous messages on stderr from CEE.</p>
</li>
<li>
<p>A message of the form:</p>
532
<pre class="verbatim"><ol><li> <span class="w">lib</span>/<span class="w">ftmp</span>-<span class="w">security</span>....<span class="w">File::Temp::_gettemp</span><span class="co">:</span> <span class="w">Parent</span> <span class="w">directory</span> <span class="s">(</span><span class="q">/tmp/</span><span class="s">)</span></li><li> <span class="w">is</span> <a class="l_k" href="functions/not.html">not</a> <span class="w">safe</span> <span class="s">(</span><span class="w">sticky</span> <span class="w">bit</span> <a class="l_k" href="functions/not.html">not</a> <span class="w">set</span> <a class="l_k" href="functions/when.html">when</a> <span class="w">world</span> <span class="w">writable</span>?<span class="s">)</span> <span class="w">at</span></li><li> <span class="w">lib</span>/<span class="w">ftmp</span>-<span class="w">security</span>.<span class="w">t</span> <span class="w">line</span> <span class="n">100</span></li><li> <span class="w">File::Temp::_gettemp</span><span class="co">:</span> <span class="w">Parent</span> <span class="w">directory</span> <span class="s">(</span><span class="q">/tmp/</span><span class="s">)</span> <span class="w">is</span> <a class="l_k" href="functions/not.html">not</a> <span class="w">safe</span> <span class="s">(</span><span class="w">sticky</span></li><li> <span class="w">bit</span> <a class="l_k" href="functions/not.html">not</a> <span class="w">set</span> <a class="l_k" href="functions/when.html">when</a> <span class="w">world</span> <span class="w">writable</span>?<span class="s">)</span> <span class="w">at</span> <span class="w">lib</span>/<span class="w">ftmp</span>-<span class="w">security</span>.<span class="w">t</span> <span class="w">line</span> <span class="n">100</span></li><li> <span class="w">ok</span></li></ol></pre><p>indicates a problem with the permissions on your /tmp directory within the HFS.
533
To correct that problem issue the command:</p>
534
<pre class="verbatim"><ol><li>     <a class="l_k" href="functions/chmod.html">chmod</a> <span class="w">a</span>+<span class="w">t</span> /<span class="w">tmp</span></li></ol></pre><p>from an account with write access to the directory entry for /tmp.</p>
535 536 537
</li>
<li>
<p>Out of Memory!</p>
538
<p>Recent perl test suite is quite memory hungry. In addition to the comments
539 540 541 542
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 CEE run options, but the environment variable wins.</p>
<p>The C code asks for:</p>
543
<pre class="verbatim"><ol><li> <span class="c">#pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))</span></li></ol></pre><p>The important parts of that are the second argument (the increment) to HEAP,
544
and allowing the stack to be "Above the (16M) line". If the heap
545
increment is too small then when perl (for example loading unicode/Name.pl) tries
546 547
to create a "big" (400K+) string it cannot fit in a single segment
and you get "Out of Memory!" - even if there is still plenty of memory
548
available.</p>
549
<p>A related issue is use with perl's malloc. Perl's malloc uses <code class="inline"><span class="i">sbrk</span><span class="s">(</span><span class="s">)</span></code>
550 551 552 553

to get memory, and <code class="inline"><span class="i">sbrk</span><span class="s">(</span><span class="s">)</span></code>
 is limited to the first allocation so in this
case something like:</p>
554
<pre class="verbatim"><ol><li>  HEAP(8M,500K,ANYWHERE,KEEP,8K,4K)</li></ol></pre><p>is needed to get through the test suite.</p>
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570
</li>
</ul>
<a name="Installation-Anomalies-with-Perl-on-OS%2f390"></a><h2>Installation Anomalies with Perl on OS/390</h2>
<p>The installman script will try to run on OS/390.  There will be fewer errors
if you have a roff utility installed.  You can obtain GNU groff from the
Redbook SG24-5944-00 ftp site.</p>
<a name="Usage-Hints-for-Perl-on-OS%2f390"></a><h2>Usage Hints for Perl on OS/390</h2>
<p>When using perl on OS/390 please keep in mind that the EBCDIC and ASCII
character sets are different.  See perlebcdic.pod for more on such character
set issues.  Perl builtin functions that may behave differently under
EBCDIC are also mentioned in the perlport.pod document.</p>
<p>Open Edition (UNIX System Services) from V2R8 onward does support
#!/path/to/perl script invocation.  There is a PTF available from
IBM for V2R7 that will allow shell/kernel support for #!.  USS
releases prior to V2R7 did not support the #! means of script invocation.
If you are running V2R6 or earlier then see:</p>
571
<pre class="verbatim"><ol><li>    <span class="w">head</span> <span class="q">`whence perldoc`</span></li></ol></pre><p>for an example of how to use the "eval exec" trick to ask the shell to
572 573 574 575 576 577 578 579 580 581
have Perl run your scripts on those older releases of Unix System Services.</p>
<p>If you are having trouble with square brackets then consider switching your
rlogin or telnet client.  Try to avoid older 3270 emulators and ISHELL for
working with Perl on USS.</p>
<a name="Floating-Point-Anomalies-with-Perl-on-OS%2f390"></a><h2>Floating Point Anomalies with Perl on OS/390</h2>
<p>There appears to be a bug in the floating point implementation on S/390
systems such that calling int() on the product of a number and a small
magnitude number is not the same as calling int() on the quotient of
that number and a large magnitude number.  For example, in the following
Perl code:</p>
582
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$x</span> = <span class="n">100000.0</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$y</span> = <a class="l_k" href="functions/int.html">int</a><span class="s">(</span><span class="i">$x</span> * <span class="n">1e-5</span><span class="s">)</span> * <span class="n">1e5</span><span class="sc">;</span> <span class="c"># &#39;0&#39;</span></li><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$z</span> = <a class="l_k" href="functions/int.html">int</a><span class="s">(</span><span class="i">$x</span> / <span class="n">1e+5</span><span class="s">)</span> * <span class="n">1e5</span><span class="sc">;</span>  <span class="c"># &#39;100000&#39;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;\$y is $y and \$z is $z\n&quot;</span><span class="sc">;</span> <span class="c"># $y is 0 and $z is 100000</span></li></ol></pre><p>Although one would expect the quantities $y and $z to be the same and equal
583 584
to 100000 they will differ and instead will be 0 and 100000 respectively.</p>
<p>The problem can be further examined in a roughly equivalent C program:</p>
585
<pre class="verbatim"><ol><li>    #include &lt;stdio.h&gt;</li><li>    #include &lt;math.h&gt;</li><li>    main()</li><li>    {</li><li>    double r1,r2;</li><li>    double x = 100000.0;</li><li>    double y = 0.0;</li><li>    double z = 0.0;</li><li>    x = 100000.0 * 1e-5;</li><li>    r1 = modf (x,&amp;y);</li><li>    x = 100000.0 / 1e+5;</li><li>    r2 = modf (x,&amp;z);</li><li>    printf("y is %e and z is %e\n",y*1e5,z*1e5);</li><li>    /* y is 0.000000e+00 and z is 1.000000e+05 (with c89) */</li><li>    }</li></ol></pre><a name="Modules-and-Extensions-for-Perl-on-OS%2f390"></a><h2>Modules and Extensions for Perl on OS/390</h2>
586
<p>Pure pure (that is non xs) modules may be installed via the usual:</p>
587
<pre class="verbatim"><ol><li>    <span class="w">perl</span> <span class="w">Makefile</span>.<span class="w">PL</span></li><li>    <span class="w">make</span></li><li>    <span class="w">make</span> <span class="w">test</span></li><li>    <span class="w">make</span> <span class="w">install</span></li></ol></pre><p>If you built perl with dynamic loading capability then that would also
588 589 590 591 592
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 OS/390
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:</p>
593
<pre class="verbatim"><ol><li>    <span class="w">perl</span> <span class="w">Makefile</span>.<span class="w">PL</span></li><li>    <span class="w">make</span></li><li>    <span class="w">make</span> <span class="w">perl</span></li><li>    <span class="w">make</span> <span class="w">test</span></li><li>    <span class="w">make</span> <span class="w">install</span></li><li>    <span class="w">make</span> -f <span class="w">Makefile</span>.<span class="w">aperl</span> <span class="w">inst_perl</span> <span class="w">MAP_TARGET</span>=<span class="w">perl</span></li></ol></pre><p>In most cases people have reported better results with GNU make rather
594
than the system's /bin/make program, whether for plain modules or for
595 596 597 598
xs based extensions.</p>
<p>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:</p>
599
<pre class="verbatim"><ol><li>    <span class="w">export</span> <span class="w">_C89_CCMODE</span>=<span class="n">1</span></li></ol></pre><p>If tcsh is your login shell then use the setenv command.</p>
600 601 602 603 604 605 606 607
<a name="AUTHORS"></a><h1>AUTHORS</h1>
<p>David Fiander and Peter Prymmer with thanks to Dennis Longnecker
and William Raffloer for valuable reports, LPAR and PTF feedback.
Thanks to Mike MacIsaac and Egon Terwedow for SG24-5944-00.
Thanks to Ignasi Roca for pointing out the floating point problems.
Thanks to John Goodyear for dynamic loading help.</p>
<a name="SEE-ALSO"></a><h1>SEE ALSO</h1>
<p><a href="http://search.cpan.org/perldoc/INSTALL">INSTALL</a>, <a href="perlport.html">perlport</a>, <a href="perlebcdic.html">perlebcdic</a>, <a href="ExtUtils/MakeMaker.html">ExtUtils::MakeMaker</a>.</p>
608
<pre class="verbatim"><ol><li> <span class="j">http:</span><span class="q">//</span><span class="w">www</span>.<span class="w">ibm</span>.<span class="w">com</span>/<span class="w">servers</span>/<span class="w">eserver</span>/<span class="w">zseries</span>/<span class="w">zos</span>/<span class="w">unix</span>/<span class="w">bpxa1toy</span>.<span class="w">html</span></li><li></li><li> <span class="w">http</span><span class="co">:</span><span class="q">//</span><span class="w">www</span>.<span class="w">redbooks</span>.<span class="w">ibm</span>.<span class="w">com</span>/<span class="w">redbooks</span>/<span class="w">SG245944</span>.<span class="w">html</span></li><li></li><li> <span class="w">http</span><span class="co">:</span><span class="q">//</span><span class="w">www</span>.<span class="w">ibm</span>.<span class="w">com</span>/<span class="w">servers</span>/<span class="w">eserver</span>/<span class="w">zseries</span>/<span class="w">zos</span>/<span class="w">unix</span>/<span class="w">bpxa1ty1</span>.<span class="w">html</span><span class="c">#opensrc</span></li><li></li><li> <span class="w">http</span><span class="co">:</span><span class="q">//</span><span class="w">www</span>.<span class="w">xray</span>.<span class="w">mpe</span>.<span class="w">mpg</span>.<span class="w">de</span>/<span class="w">mailing</span>-<span class="w">lists</span>/<span class="w">perl</span>-<span class="w">mvs</span>/</li><li></li><li> <span class="w">http</span><span class="co">:</span><span class="q">//publibz</span>.<span class="w">boulder</span>.<span class="w">ibm</span>.<span class="w">com</span><span class="co">:</span><span class="n">80</span>/<span class="w">cgi</span>-<span class="w">bin</span>/<span class="w">bookmgr_OS390</span>/<span class="w">BOOKS</span>/<span class="w">ceea3030</span>/</li><li></li><li> <span class="w">http</span><span class="co">:</span><span class="q">//publibz</span>.<span class="w">boulder</span>.<span class="w">ibm</span>.<span class="w">com</span><span class="co">:</span><span class="n">80</span>/<span class="w">cgi</span>-<span class="w">bin</span>/<span class="w">bookmgr_OS390</span>/<span class="w">BOOKS</span><span class="q">/CBCUG030/</span></li></ol></pre><a name="Mailing-list-for-Perl-on-OS%2f390"></a><h2>Mailing list for Perl on OS/390</h2>
609
<p>If you are interested in the z/OS (formerly known as OS/390)
610 611 612
and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
To subscribe, send an empty message to perl-mvs-subscribe@perl.org.</p>
<p>See also:</p>
613
<pre class="verbatim"><ol><li>    <span class="j">http:</span><span class="q">//</span><span class="w">lists</span>.<span class="w">perl</span>.<span class="w">org</span>/<span class="w">list</span>/<span class="w">perl</span>-<span class="w">mvs</span>.<span class="w">html</span></li></ol></pre><p>There are web archives of the mailing list at:</p>
614
<pre class="verbatim"><ol><li>    http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/</li><li>    http://archive.develooper.com/perl-mvs@perl.org/</li></ol></pre><a name="HISTORY"></a><h1>HISTORY</h1>
615 616 617 618 619 620 621
<p>This document was originally written by David Fiander for the 5.005
release of Perl.</p>
<p>This document was podified for the 5.005_03 release of Perl 11 March 1999.</p>
<p>Updated 28 November 2001 for broken URLs.</p>
<p>Updated 12 November 2000 for the 5.7.1 release of Perl.</p>
<p>Updated 15 January 2001 for the 5.7.1 release of Perl.</p>
<p>Updated 24 January 2001 to mention dynamic loading.</p>
622
<p>Updated 12 March 2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.</p>
623 624 625 626




627 628 629 630 631
  <div id="page_index" class="hud_container">
    <div id="page_index_header" class="hud_header">
      <div id="page_index_close" class="hud_close"><a href="#" onClick="pageIndex.hide();return false;"></a></div>
      <div id="page_index_title" class="hud_title"><span class="hud_span_top">Page index</span></div>
      <div id="page_index_topright" class="hud_topright"></div>
632
    </div>
633
    <div id="page_index_content" class="hud_content">
634 635
      <ul><li><a href="#NAME">NAME</a><li><a href="#SYNOPSIS">SYNOPSIS</a><li><a href="#DESCRIPTION">DESCRIPTION</a><ul><li><a href="#Tools">Tools</a><li><a href="#Unpacking-Perl-distribution-on-OS%2f390">Unpacking Perl distribution on OS/390</a><li><a href="#Setup-and-utilities-for-Perl-on-OS%2f390">Setup and utilities for Perl on OS/390</a><li><a href="#Configure-Perl-on-OS%2f390">Configure Perl on OS/390</a><li><a href="#Build%2c-Test%2c-Install-Perl-on-OS%2f390">Build, Test, Install Perl on OS/390</a><li><a href="#Build-Anomalies-with-Perl-on-OS%2f390">Build Anomalies with Perl on OS/390</a><li><a href="#Testing-Anomalies-with-Perl-on-OS%2f390">Testing Anomalies with Perl on OS/390</a><li><a href="#Installation-Anomalies-with-Perl-on-OS%2f390">Installation Anomalies with Perl on OS/390</a><li><a href="#Usage-Hints-for-Perl-on-OS%2f390">Usage Hints for Perl on OS/390</a><li><a href="#Floating-Point-Anomalies-with-Perl-on-OS%2f390">Floating Point Anomalies with Perl on OS/390</a><li><a href="#Modules-and-Extensions-for-Perl-on-OS%2f390">Modules and Extensions for Perl on OS/390</a></ul><li><a href="#AUTHORS">AUTHORS</a><li><a href="#SEE-ALSO">SEE ALSO</a><ul><li><a href="#Mailing-list-for-Perl-on-OS%2f390">Mailing list for Perl on OS/390</a></ul><li><a href="#HISTORY">HISTORY</a></ul>
    </div>
636 637 638 639
    <div id="page_index_footer" class="hud_footer">
      <div id="page_index_bottomleft" class="hud_bottomleft"></div>
      <div id="page_index_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
      <div id="page_index_resize" class="hud_resize"></div>
640 641 642
    </div>
  </div>

643 644 645 646 647 648 649

	    &nbsp;
          </div>
          <div id="content_footer">
          </div>
        </div>
        <div class="clear"></div>
650
      </div>
651
      
652 653 654 655 656 657 658 659 660
    <div id="footer">
      <div id="footer_content">
        <div id="footer_strapline">
          perldoc.perl.org - Official documentation for the Perl programming language
        </div>
        <div id="footer_links">
          <div id="address">
            <p class="name">Contact details</p>
            <p class="address">
661
	      Site maintained by <a href="mailto:jj@jonallen.info">Jon Allen (JJ)</a><br>
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697
	    </p>
            <p class="contact">
              Documentation maintained by the <a href="http://lists.cpan.org/showlist.cgi?name=perl5-porters">Perl 5 Porters</a>
            </p>
          </div>
          <ul class="f1">
            <li>Manual
              <ul class="f2">
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">Changes</a>
              </ul>
            <li>Reference
              <ul class="f2">
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Variables</a>
              </ul>
            <li>Modules
              <ul class="f2">
                <li><a href="index-modules-A.html">Modules</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
              </ul>
            <li>Misc
              <ul class="f2">
                <li><a href="index-licence.html">License</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platforms</a>
              </ul>          </ul>
          <div class="clear"></div>
        </div>
      </div>
      <div id="footer_end">
698
      </div>
699
    </div>
700
      
701
    </div>
702 703
      <script language="JavaScript" type="text/javascript" src="static/exploreperl.js"></script>
      <script language="JavaScript" src="static/combined-20100403.js" type="text/javascript"></script>
704 705 706 707 708
<script language="JavaScript" type="text/javascript">
  perldoc.setPath(0);
  perldoc.pageName    = 'perlos390';
  perldoc.pageAddress = 'perlos390.html';
  perldoc.contentPage = 1;
709 710
  explorePerl.render();
  explorePerl.addEvents('explore_anchor');
711 712 713
</script>
    
  </body>
714
</html>