Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.92k stars 549 forks source link

OS/390 Perl porting bug #5890

Closed p5pRT closed 16 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#16975 (status was 'resolved')

Searchable as RT16975$

p5pRT commented 22 years ago

From mark.mustoe@us.nestle.com

Below is a bug report from the OS/390 Perl 5.6.1 port.

I am sending it again via this email client\, as I am not sure it was properly allowed out through our firewall.

Please see the attached txt file for the details.

Thanks for any consideration!

  \<\<perlbug.txt>>

Mark Mustoe Host Technical Support Nestlé USA ITSS 480-929-9818 Voice 480-921-7136 Fax

p5pRT commented 22 years ago

From mark.mustoe@us.nestle.com

To​: perlbug@​perl.org Subject​: OS/390 Perl porting bug Reply-To​: mark.mustoe@​us.nestle.com

This is a bug report for perl from mark.mustoe@​us.nestle.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

#! /local/bin/perl5.6.1 -w   use strict;

############################################################### ## This snipet was put together after experiencing problems ## trying to access elements of an array. This code works ## fine on other Unix distros. This is being developed on ## OS/390 R9 (aka MVS USS). Warning... I'm a newb\, but have ## asked plenty of Qs and read all I could find. The fact ## that it works on other Unix platforms causes me to suspect ## the platform or port. ## ## Thanks in advance for any consideration! ## ## In the next section are the actual reponses rcv'd when ## running this perl script... ## ############################################################### ## /TEST/tmp​: >perl003 ## Global symbol "@​arr" requires explicit package name at ./perl003 ## line 19. ## Global symbol "$arr[0" requires explicit package name at ./perl003 ## line 21. ## Execution of ./perl003 aborted due to compilation errors. ## /TEST/tmp​: > ###############################################################

@​arr = ("a"\, "b"\, "c");

print "Value of var is $arr0Ù\n";


Flags​:   category=core   severity=low


Site configuration information for perl v5.6.1​:

Configured by AAAAAAA at Fri Jan 18 14​:41​:42 EST 2002.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration​:   Platform​:   osname=os390\, osvers=09.00\, archname=os390   uname='os390 sc55 09.00 02 9672 '   config_args='-des -Dprefix=/usr/local'   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef   useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=undef use64bitall=undef uselongdouble=undef   Compiler​:   cc='c89'\, ccflags ='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC'\,   optimize=' '\,   cppflags=''   ccversion=''\, gccversion=''\, gccosandvers=''   intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=4321   d_longlong=undef\, longlongsize=\, d_longdbl=define\, longdblsize=16   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=4   alignbytes=8\, usemymalloc=n\, prototype=define   Linker and Libraries​:   ld='ld'\, ldflags ='-Wl\,EDIT=NO -L/usr/local/lib'   libpth=/usr/local/lib /lib /usr/lib   libs=-lm -lc   perllibs=-lm -lc   libc=\, so=a\, useshrplib=false\, libperl=libperl.a   Dynamic Linking​:   dlsrc=dl_none.xs\, dlext=none\, d_dlsymun=undef\, ccdlflags=''   cccdlflags='-W 0\,dll'\, lddlflags=''

Locally applied patches​:


@​INC for perl v5.6.1​:   /usr/local/lib/perl5/5.6.1/os390   /usr/local/lib/perl5/5.6.1   /usr/local/lib/perl5/site_perl/5.6.1/os390   /usr/local/lib/perl5/site_perl/5.6.1   /usr/local/lib/perl5/site_perl   .


Environment for perl v5.6.1​:   HOME=/tmp/mark   LANG=En_US.IBM-1047   LANGUAGE (unset)   LD_LIBRARY_PATH (unset)   LIBPATH=/lib​:/usr/lib​:.   LOGDIR (unset)   PATH=/bin​:.​:/local/bin​:/usr/lpp/java/IBM/J1.3/bin​:/tmp/mark   PERL_BADLANG (unset)   SHELL=/bin/sh

p5pRT commented 21 years ago

From @jhi

(adding a comment from Peter Prymmer which has already been sent to Mark Mustoe)

Yes I think it is a character issue and the two problems are​: OS/390 and the [ and ] characters. I could be wrong but I suspect that the user is using a TSO editor (perhaps ISPF - but I am not certain) to prepare the perl script. It gets the encoding for [ and ] incorrect from a cp 1024 perspective\, but the TSO editor displays them as [ and ] just fine. The matter seems kind of obvious from the HTML display of the print statement in the perl program cited.

Note too the user's $HOME is cited as /tmp/mark - they have apparently not really set up the HFS for Unix users and/or that particular user does not login to USS\, rather to TSO. If they log in to USS and use either vi (which ships with z/OS within USS) or emacs (available
from the tools & toys web page maintained by IBM) to prepare the perl program with the cp 1047 encodings for the statement​:

print "Value of var is $arr[0]\n";

they should then be all set. Another option would be to prepare on another platform and to ftp the perl program into the USS Hierarchical File System (HFS).

It is not a bug in perl\, rather it is incorrect user preparation of perl program input (shell script writers who started out as TSO programmers often run into this very same problem for OS/390 or z/OS).

Peter Prymmer

p5pRT commented 21 years ago

@jhi - Status changed from 'new' to 'open'

p5pRT commented 16 years ago

p5p@spam.wizbit.be - Status changed from 'open' to 'resolved'