Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "PERLOS390 1" | |
132 | .TH PERLOS390 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | README.os390 \- building and installing Perl for OS/390 and z/OS | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | This document will help you Configure, build, test and install Perl | |
138 | on \s-1OS/390\s0 (aka z/OS) Unix System Services. | |
139 | .SH "DESCRIPTION" | |
140 | .IX Header "DESCRIPTION" | |
141 | This is a fully ported Perl for \s-1OS/390\s0 Version 2 Release 3, 5, 6, 7, | |
142 | 8, and 9. It may work on other versions or releases, but those are | |
143 | the ones we've tested it on. | |
144 | .PP | |
145 | You may need to carry out some system configuration tasks before | |
146 | running the Configure script for Perl. | |
147 | .Sh "Tools" | |
148 | .IX Subsection "Tools" | |
149 | The z/OS Unix Tools and Toys list may prove helpful and contains links | |
150 | to ports of much of the software helpful for building Perl. | |
151 | http://www\-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html | |
152 | .Sh "Unpacking Perl distribution on \s-1OS/390\s0" | |
153 | .IX Subsection "Unpacking Perl distribution on OS/390" | |
154 | If using ftp remember to transfer the distribution in binary format. | |
155 | .PP | |
156 | Gunzip/gzip for \s-1OS/390\s0 is discussed at: | |
157 | .PP | |
158 | .Vb 1 | |
159 | \& http://www-1.ibm.com/servers/eserver/zseries/zos/unix/faq/bpxqp1.html | |
160 | .Ve | |
161 | .PP | |
162 | to extract an \s-1ASCII\s0 tar archive on \s-1OS/390\s0, try this: | |
163 | .PP | |
164 | .Vb 1 | |
165 | \& pax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar | |
166 | .Ve | |
167 | .PP | |
168 | or | |
169 | .PP | |
170 | .Vb 1 | |
171 | \& zcat latest.tar.Z | pax -o to=IBM-1047,from=ISO8859-1 -r | |
172 | .Ve | |
173 | .PP | |
174 | If you get lots of errors of the form | |
175 | .PP | |
176 | .Vb 1 | |
177 | \& tar: FSUM7171 ...: cannot set uid/gid: EDC5139I Operation not permitted. | |
178 | .Ve | |
179 | .PP | |
180 | you didn't read the above and tried to use tar instead of pax, you'll | |
181 | first have to remove the (now corrupt) perl directory | |
182 | .PP | |
183 | .Vb 1 | |
184 | \& rm -rf perl-... | |
185 | .Ve | |
186 | .PP | |
187 | and then use pax. | |
188 | .Sh "Setup and utilities for Perl on \s-1OS/390\s0" | |
189 | .IX Subsection "Setup and utilities for Perl on OS/390" | |
190 | Be sure that your yacc installation is in place including any necessary | |
191 | parser template files. If you have not already done so then be sure to: | |
192 | .PP | |
193 | .Vb 1 | |
194 | \& cp /samples/yyparse.c /etc | |
195 | .Ve | |
196 | .PP | |
197 | This may also be a good time to ensure that your /etc/protocol file | |
198 | and either your /etc/resolv.conf or /etc/hosts files are in place. | |
199 | The \s-1IBM\s0 document that described such \s-1USS\s0 system setup issues was | |
200 | \&\s-1SC28\-1890\-07\s0 \*(L"\s-1OS/390\s0 \s-1UNIX\s0 System Services Planning\*(R", in particular | |
201 | Chapter 6 on customizing the \s-1OE\s0 shell. | |
202 | .PP | |
203 | \&\s-1GNU\s0 make for \s-1OS/390\s0, which is recommended for the build of perl (as | |
204 | well as building \s-1CPAN\s0 modules and extensions), is available from the | |
205 | \&\*(L"Tools\*(R". | |
206 | .PP | |
207 | Some people have reported encountering \*(L"Out of memory!\*(R" errors while | |
208 | trying to build Perl using \s-1GNU\s0 make binaries. If you encounter such | |
209 | trouble then try to download the source code kit and build \s-1GNU\s0 make | |
210 | from source to eliminate any such trouble. You might also find \s-1GNU\s0 make | |
211 | (as well as Perl and Apache) in the red\-piece/book \*(L"Open Source Software | |
212 | for \s-1OS/390\s0 \s-1UNIX\s0\*(R", \s-1SG24\-5944\-00\s0 from \s-1IBM\s0. | |
213 | .PP | |
214 | If instead of the recommended \s-1GNU\s0 make you would like to use the system | |
215 | supplied make program then be sure to install the default rules file | |
216 | properly via the shell command: | |
217 | .PP | |
218 | .Vb 1 | |
219 | \& cp /samples/startup.mk /etc | |
220 | .Ve | |
221 | .PP | |
222 | and be sure to also set the environment variable _C89_CCMODE=1 (exporting | |
223 | _C89_CCMODE=1 is also a good idea for users of \s-1GNU\s0 make). | |
224 | .PP | |
225 | You might also want to have \s-1GNU\s0 groff for \s-1OS/390\s0 installed before | |
226 | running the \*(L"make install\*(R" step for Perl. | |
227 | .PP | |
228 | There is a syntax error in the /usr/include/sys/socket.h header file | |
229 | that \s-1IBM\s0 supplies with \s-1USS\s0 V2R7, V2R8, and possibly V2R9. The problem with | |
230 | the header file is that near the definition of the \s-1SO_REUSEPORT\s0 constant | |
231 | there is a spurious extra '/' character outside of a comment like so: | |
232 | .PP | |
233 | .Vb 2 | |
234 | \& #define SO_REUSEPORT 0x0200 /* allow local address & port | |
235 | \& reuse */ / | |
236 | .Ve | |
237 | .PP | |
238 | You could edit that header yourself to remove that last '/', or you might | |
239 | note that Language Environment (\s-1LE\s0) \s-1APAR\s0 \s-1PQ39997\s0 describes the problem | |
240 | and \s-1PTF\s0's \s-1UQ46272\s0 and \s-1UQ46271\s0 are the (R8 at least) fixes and apply them. | |
241 | If left unattended that syntax error will turn up as an inability for Perl | |
242 | to build its \*(L"Socket\*(R" extension. | |
243 | .PP | |
244 | For successful testing you may need to turn on the sticky bit for your | |
245 | world readable /tmp directory if you have not already done so (see man chmod). | |
246 | .Sh "Configure Perl on \s-1OS/390\s0" | |
247 | .IX Subsection "Configure Perl on OS/390" | |
248 | Once you've unpacked the distribution, run \*(L"sh Configure\*(R" (see \s-1INSTALL\s0 | |
249 | for a full discussion of the Configure options). There is a \*(L"hints\*(R" file | |
250 | for os390 that specifies the correct values for most things. Some things | |
251 | to watch out for include: | |
252 | .IP "\(bu" 4 | |
253 | A message of the form: | |
254 | .Sp | |
255 | .Vb 2 | |
256 | \& (I see you are using the Korn shell. Some ksh's blow up on Configure, | |
257 | \& mainly on older exotic systems. If yours does, try the Bourne shell instead.) | |
258 | .Ve | |
259 | .Sp | |
260 | is nothing to worry about at all. | |
261 | .IP "\(bu" 4 | |
262 | Some of the parser default template files in /samples are needed in /etc. | |
263 | In particular be sure that you at least copy /samples/yyparse.c to /etc | |
264 | before running Perl's Configure. This step ensures successful extraction | |
265 | of \s-1EBCDIC\s0 versions of parser files such as perly.c, perly.h, and x2p/a2p.c. | |
266 | This has to be done before running Configure the first time. If you failed | |
267 | to do so then the easiest way to re-Configure Perl is to delete your | |
268 | misconfigured build root and re-extract the source from the tar ball. | |
269 | Then you must ensure that /etc/yyparse.c is properly in place before | |
270 | attempting to re-run Configure. | |
271 | .IP "\(bu" 4 | |
272 | This port will support dynamic loading, but it is not selected by | |
273 | default. If you would like to experiment with dynamic loading then | |
274 | be sure to specify \-Dusedl in the arguments to the Configure script. | |
275 | See the comments in hints/os390.sh for more information on dynamic loading. | |
276 | If you build with dynamic loading then you will need to add the | |
277 | \&\f(CW$archlibexp\fR/CORE directory to your \s-1LIBPATH\s0 environment variable in order | |
278 | for perl to work. See the config.sh file for the value of \f(CW$archlibexp\fR. | |
279 | If in trying to use Perl you see an error message similar to: | |
280 | .Sp | |
281 | .Vb 2 | |
282 | \& CEE3501S The module libperl.dll was not found. | |
283 | \& From entry point __dllstaticinit at compile unit offset +00000194 at | |
284 | .Ve | |
285 | .Sp | |
286 | then your \s-1LIBPATH\s0 does not have the location of libperl.x and either | |
287 | libperl.dll or libperl.so in it. Add that directory to your \s-1LIBPATH\s0 and | |
288 | proceed. | |
289 | .IP "\(bu" 4 | |
290 | Do not turn on the compiler optimization flag \*(L"\-O\*(R". There is | |
291 | a bug in either the optimizer or perl that causes perl to | |
292 | not work correctly when the optimizer is on. | |
293 | .IP "\(bu" 4 | |
294 | Some of the configuration files in /etc used by the | |
295 | networking APIs are either missing or have the wrong | |
296 | names. In particular, make sure that there's either | |
297 | an /etc/resolv.conf or an /etc/hosts, so that | |
298 | \&\fIgethostbyname()\fR works, and make sure that the file | |
299 | /etc/proto has been renamed to /etc/protocol (\s-1NOT\s0 | |
300 | /etc/protocols, as used by other Unix systems). | |
301 | You may have to look for things like \s-1HOSTNAME\s0 and \s-1DOMAINORIGIN\s0 | |
302 | in the \*(L"//'\s-1SYS1\s0.TCPPARMS(\s-1TCPDATA\s0)'\*(R" \s-1PDS\s0 member in order to | |
303 | properly set up your /etc networking files. | |
304 | .Sh "Build, Test, Install Perl on \s-1OS/390\s0" | |
305 | .IX Subsection "Build, Test, Install Perl on OS/390" | |
306 | Simply put: | |
307 | .PP | |
308 | .Vb 3 | |
309 | \& sh Configure | |
310 | \& make | |
311 | \& make test | |
312 | .Ve | |
313 | .PP | |
314 | if everything looks ok (see the next section for test/IVP diagnosis) then: | |
315 | .PP | |
316 | .Vb 1 | |
317 | \& make install | |
318 | .Ve | |
319 | .PP | |
320 | this last step may or may not require UID=0 privileges depending | |
321 | on how you answered the questions that Configure asked and whether | |
322 | or not you have write access to the directories you specified. | |
323 | .Sh "Build Anomalies with Perl on \s-1OS/390\s0" | |
324 | .IX Subsection "Build Anomalies with Perl on OS/390" | |
325 | \&\*(L"Out of memory!\*(R" messages during the build of Perl are most often fixed | |
326 | by re building the \s-1GNU\s0 make utility for \s-1OS/390\s0 from a source code kit. | |
327 | .PP | |
328 | Another memory limiting item to check is your \s-1MAXASSIZE\s0 parameter in your | |
329 | \&'\s-1SYS1\s0.PARMLIB(BPXPRMxx)' data set (note too that as of V2R8 address space | |
330 | limits can be set on a per user \s-1ID\s0 basis in the \s-1USS\s0 segment of a \s-1RACF\s0 | |
331 | profile). People have reported successful builds of Perl with \s-1MAXASSIZE\s0 | |
332 | parameters as small as 503316480 (and it may be possible to build Perl | |
333 | with a \s-1MAXASSIZE\s0 smaller than that). | |
334 | .PP | |
335 | Within \s-1USS\s0 your /etc/profile or \f(CW$HOME\fR/.profile may limit your ulimit | |
336 | settings. Check that the following command returns reasonable values: | |
337 | .PP | |
338 | .Vb 1 | |
339 | \& ulimit -a | |
340 | .Ve | |
341 | .PP | |
342 | To conserve memory you should have your compiler modules loaded into the | |
343 | Link Pack Area (\s-1LPA/ELPA\s0) rather than in a link list or step lib. | |
344 | .PP | |
345 | If the c89 compiler complains of syntax errors during the build of the | |
346 | Socket extension then be sure to fix the syntax error in the system | |
347 | header /usr/include/sys/socket.h. | |
348 | .Sh "Testing Anomalies with Perl on \s-1OS/390\s0" | |
349 | .IX Subsection "Testing Anomalies with Perl on OS/390" | |
350 | The \*(L"make test\*(R" step runs a Perl Verification Procedure, usually before | |
351 | installation. You might encounter \s-1STDERR\s0 messages even during a successful | |
352 | run of \*(L"make test\*(R". Here is a guide to some of the more commonly seen | |
353 | anomalies: | |
354 | .IP "\(bu" 4 | |
355 | A message of the form: | |
356 | .Sp | |
357 | .Vb 5 | |
358 | \& comp/cpp.............ERROR CBC3191 ./.301989890.c:1 The character $ is not a | |
359 | \& valid C source character. | |
360 | \& FSUM3065 The COMPILE step ended with return code 12. | |
361 | \& FSUM3017 Could not compile .301989890.c. Correct the errors and try again. | |
362 | \& ok | |
363 | .Ve | |
364 | .Sp | |
365 | indicates that the t/comp/cpp.t test of Perl's \-P command line switch has | |
366 | passed but that the particular invocation of c89 \-E in the cpp script does | |
367 | not suppress the C compiler check of source code validity. | |
368 | .IP "\(bu" 4 | |
369 | A message of the form: | |
370 | .Sp | |
371 | .Vb 4 | |
372 | \& io/openpid...........CEE5210S The signal SIGHUP was received. | |
373 | \& CEE5210S The signal SIGHUP was received. | |
374 | \& CEE5210S The signal SIGHUP was received. | |
375 | \& ok | |
376 | .Ve | |
377 | .Sp | |
378 | indicates that the t/io/openpid.t test of Perl has passed but done so | |
379 | with extraneous messages on stderr from \s-1CEE\s0. | |
380 | .IP "\(bu" 4 | |
381 | A message of the form: | |
382 | .Sp | |
383 | .Vb 5 | |
384 | \& lib/ftmp-security....File::Temp::_gettemp: Parent directory (/tmp/) is not safe | |
385 | \& (sticky bit not set when world writable?) at lib/ftmp-security.t line 100 | |
386 | \& File::Temp::_gettemp: Parent directory (/tmp/) is not safe (sticky bit not | |
387 | \& set when world writable?) at lib/ftmp-security.t line 100 | |
388 | \& ok | |
389 | .Ve | |
390 | .Sp | |
391 | indicates a problem with the permissions on your /tmp directory within the \s-1HFS\s0. | |
392 | To correct that problem issue the command: | |
393 | .Sp | |
394 | .Vb 1 | |
395 | \& chmod a+t /tmp | |
396 | .Ve | |
397 | .Sp | |
398 | from an account with write access to the directory entry for /tmp. | |
399 | .IP "\(bu" 4 | |
400 | Out of Memory! | |
401 | .Sp | |
402 | Recent perl test suite is quite memory hunrgy. In addition to the comments | |
403 | above on memory limitations it is also worth checking for _CEE_RUNOPTS | |
404 | in your environment. Perl now has (in miniperlmain.c) a C #pragma | |
405 | to set \s-1CEE\s0 run options, but the environment variable wins. | |
406 | .Sp | |
407 | The C code asks for: | |
408 | .Sp | |
409 | .Vb 1 | |
410 | \& #pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON)) | |
411 | .Ve | |
412 | .Sp | |
413 | The important parts of that are the second argument (the increment) to \s-1HEAP\s0, | |
414 | and allowing the stack to be \*(L"Above the (16M) line\*(R". If the heap | |
415 | increment is too small then when perl (for example loading unicode/Name.pl) tries | |
416 | to create a \*(L"big\*(R" (400K+) string it cannot fit in a single segment | |
417 | and you get \*(L"Out of Memory!\*(R" \- even if there is still plenty of memory | |
418 | available. | |
419 | .Sp | |
420 | A related issue is use with perl's malloc. Perl's malloc uses \f(CW\*(C`sbrk()\*(C'\fR | |
421 | to get memory, and \f(CW\*(C`sbrk()\*(C'\fR is limited to the first allocation so in this | |
422 | case something like: | |
423 | .Sp | |
424 | .Vb 1 | |
425 | \& HEAP(8M,500K,ANYWHERE,KEEP,8K,4K) | |
426 | .Ve | |
427 | .Sp | |
428 | is needed to get through the test suite. | |
429 | .Sh "Installation Anomalies with Perl on \s-1OS/390\s0" | |
430 | .IX Subsection "Installation Anomalies with Perl on OS/390" | |
431 | The installman script will try to run on \s-1OS/390\s0. There will be fewer errors | |
432 | if you have a roff utility installed. You can obtain \s-1GNU\s0 groff from the | |
433 | Redbook \s-1SG24\-5944\-00\s0 ftp site. | |
434 | .Sh "Usage Hints for Perl on \s-1OS/390\s0" | |
435 | .IX Subsection "Usage Hints for Perl on OS/390" | |
436 | When using perl on \s-1OS/390\s0 please keep in mind that the \s-1EBCDIC\s0 and \s-1ASCII\s0 | |
437 | character sets are different. See perlebcdic.pod for more on such character | |
438 | set issues. Perl builtin functions that may behave differently under | |
439 | \&\s-1EBCDIC\s0 are also mentioned in the perlport.pod document. | |
440 | .PP | |
441 | Open Edition (\s-1UNIX\s0 System Services) from V2R8 onward does support | |
442 | #!/path/to/perl script invocation. There is a \s-1PTF\s0 available from | |
443 | \&\s-1IBM\s0 for V2R7 that will allow shell/kernel support for #!. \s-1USS\s0 | |
444 | releases prior to V2R7 did not support the #! means of script invocation. | |
445 | If you are running V2R6 or earlier then see: | |
446 | .PP | |
447 | .Vb 1 | |
448 | \& head `whence perldoc` | |
449 | .Ve | |
450 | .PP | |
451 | for an example of how to use the \*(L"eval exec\*(R" trick to ask the shell to | |
452 | have Perl run your scripts on those older releases of Unix System Services. | |
453 | .PP | |
454 | If you are having trouble with square brackets then consider switching your | |
455 | rlogin or telnet client. Try to avoid older 3270 emulators and \s-1ISHELL\s0 for | |
456 | working with Perl on \s-1USS\s0. | |
457 | .Sh "Floating Point Anomalies with Perl on \s-1OS/390\s0" | |
458 | .IX Subsection "Floating Point Anomalies with Perl on OS/390" | |
459 | There appears to be a bug in the floating point implementation on S/390 | |
460 | systems such that calling \fIint()\fR on the product of a number and a small | |
461 | magnitude number is not the same as calling \fIint()\fR on the quotient of | |
462 | that number and a large magnitude number. For example, in the following | |
463 | Perl code: | |
464 | .PP | |
465 | .Vb 4 | |
466 | \& my $x = 100000.0; | |
467 | \& my $y = int($x * 1e-5) * 1e5; # '0' | |
468 | \& my $z = int($x / 1e+5) * 1e5; # '100000' | |
469 | \& print "\e$y is $y and \e$z is $z\en"; # $y is 0 and $z is 100000 | |
470 | .Ve | |
471 | .PP | |
472 | Although one would expect the quantities \f(CW$y\fR and \f(CW$z\fR to be the same and equal | |
473 | to 100000 they will differ and instead will be 0 and 100000 respectively. | |
474 | .PP | |
475 | The problem can be further examined in a roughly equivalent C program: | |
476 | .PP | |
477 | .Vb 15 | |
478 | \& #include <stdio.h> | |
479 | \& #include <math.h> | |
480 | \& main() | |
481 | \& { | |
482 | \& double r1,r2; | |
483 | \& double x = 100000.0; | |
484 | \& double y = 0.0; | |
485 | \& double z = 0.0; | |
486 | \& x = 100000.0 * 1e-5; | |
487 | \& r1 = modf (x,&y); | |
488 | \& x = 100000.0 / 1e+5; | |
489 | \& r2 = modf (x,&z); | |
490 | \& printf("y is %e and z is %e\en",y*1e5,z*1e5); | |
491 | \& /* y is 0.000000e+00 and z is 1.000000e+05 (with c89) */ | |
492 | \& } | |
493 | .Ve | |
494 | .Sh "Modules and Extensions for Perl on \s-1OS/390\s0" | |
495 | .IX Subsection "Modules and Extensions for Perl on OS/390" | |
496 | Pure pure (that is non xs) modules may be installed via the usual: | |
497 | .PP | |
498 | .Vb 4 | |
499 | \& perl Makefile.PL | |
500 | \& make | |
501 | \& make test | |
502 | \& make install | |
503 | .Ve | |
504 | .PP | |
505 | If you built perl with dynamic loading capability then that would also | |
506 | be the way to build xs based extensions. However, if you built perl with | |
507 | the default static linking you can still build xs based extensions for \s-1OS/390\s0 | |
508 | but you will need to follow the instructions in ExtUtils::MakeMaker for | |
509 | building statically linked perl binaries. In the simplest configurations | |
510 | building a static perl + xs extension boils down to: | |
511 | .PP | |
512 | .Vb 6 | |
513 | \& perl Makefile.PL | |
514 | \& make | |
515 | \& make perl | |
516 | \& make test | |
517 | \& make install | |
518 | \& make -f Makefile.aperl inst_perl MAP_TARGET=perl | |
519 | .Ve | |
520 | .PP | |
521 | In most cases people have reported better results with \s-1GNU\s0 make rather | |
522 | than the system's /bin/make program, whether for plain modules or for | |
523 | xs based extensions. | |
524 | .PP | |
525 | If the make process encounters trouble with either compilation or | |
526 | linking then try setting the _C89_CCMODE to 1. Assuming sh is your | |
527 | login shell then run: | |
528 | .PP | |
529 | .Vb 1 | |
530 | \& export _C89_CCMODE=1 | |
531 | .Ve | |
532 | .PP | |
533 | If tcsh is your login shell then use the setenv command. | |
534 | .SH "AUTHORS" | |
535 | .IX Header "AUTHORS" | |
536 | David Fiander and Peter Prymmer with thanks to Dennis Longnecker | |
537 | and William Raffloer for valuable reports, \s-1LPAR\s0 and \s-1PTF\s0 feedback. | |
538 | Thanks to Mike MacIsaac and Egon Terwedow for \s-1SG24\-5944\-00\s0. | |
539 | Thanks to Ignasi Roca for pointing out the floating point problems. | |
540 | Thanks to John Goodyear for dynamic loading help. | |
541 | .SH "SEE ALSO" | |
542 | .IX Header "SEE ALSO" | |
543 | \&\s-1INSTALL\s0, perlport, perlebcdic, ExtUtils::MakeMaker. | |
544 | .PP | |
545 | .Vb 1 | |
546 | \& http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html | |
547 | .Ve | |
548 | .PP | |
549 | .Vb 1 | |
550 | \& http://www.redbooks.ibm.com/abstracts/sg245944.html | |
551 | .Ve | |
552 | .PP | |
553 | .Vb 1 | |
554 | \& http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html#opensrc | |
555 | .Ve | |
556 | .PP | |
557 | .Vb 1 | |
558 | \& http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/ | |
559 | .Ve | |
560 | .PP | |
561 | .Vb 1 | |
562 | \& http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/ceea3030/ | |
563 | .Ve | |
564 | .PP | |
565 | .Vb 1 | |
566 | \& http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/CBCUG030/ | |
567 | .Ve | |
568 | .Sh "Mailing list for Perl on \s-1OS/390\s0" | |
569 | .IX Subsection "Mailing list for Perl on OS/390" | |
570 | If you are interested in the \s-1VM/ESA\s0, z/OS (formerly known as \s-1OS/390\s0) | |
571 | and POSIX-BC (\s-1BS2000\s0) ports of Perl then see the perl-mvs mailing list. | |
572 | To subscribe, send an empty message to perl\-mvs\-subscribe@perl.org. | |
573 | .PP | |
574 | See also: | |
575 | .PP | |
576 | .Vb 1 | |
577 | \& http://lists.perl.org/showlist.cgi?name=perl-mvs | |
578 | .Ve | |
579 | .PP | |
580 | There are web archives of the mailing list at: | |
581 | .PP | |
582 | .Vb 2 | |
583 | \& http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/ | |
584 | \& http://archive.develooper.com/perl-mvs@perl.org/ | |
585 | .Ve | |
586 | .SH "HISTORY" | |
587 | .IX Header "HISTORY" | |
588 | This document was originally written by David Fiander for the 5.005 | |
589 | release of Perl. | |
590 | .PP | |
591 | This document was podified for the 5.005_03 release of Perl 11 March 1999. | |
592 | .PP | |
593 | Updated 28 November 2001 for broken URLs. | |
594 | .PP | |
595 | Updated 12 November 2000 for the 5.7.1 release of Perl. | |
596 | .PP | |
597 | Updated 15 January 2001 for the 5.7.1 release of Perl. | |
598 | .PP | |
599 | Updated 24 January 2001 to mention dynamic loading. | |
600 | .PP | |
601 | Updated 12 March 2001 to mention //'\s-1SYS1\s0.TCPPARMS(\s-1TCPDATA\s0)'. |