Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

IO with EBCDIC files in an ASCII environment?

by Streebgreebling (Initiate)
on Jun 10, 2003 at 09:45 UTC ( [id://264597]=perlquestion: print w/replies, xml ) Need Help??

Streebgreebling has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

I'm trying to read and write to an EBCDIC file (CCSID 37) while running in an ASCII (CCSID 819) environment. (PASE environment on an iSeries 400 system) Perl5.80

The PerlIO doc states that I should be able to use an EBCDIC encoding with the 'open' pragma to do the business. So, I've been trying values such as:

use open ':cp37';
and getting back: Unknown PerlIO layer class ':cp37'

or even trying:

use open ':encoding(cp37)';
and getting back: Recursive call to Perl_load_module in PerlIO_find_layer

This is a new area for me and would appreciate any guidance Thanks!

  • Comment on IO with EBCDIC files in an ASCII environment?

Replies are listed 'Best First'.
Re: IO with EBCDIC files in an ASCII environment?
by PodMaster (Abbot) on Jun 10, 2003 at 10:12 UTC
    Try
    use Config; use Encode 'perlio_ok'; print "Is cp37 is supported? " , perlio_ok('cp37'), $/; die Config->myconfig; __END__ Is cp37 is supported? 1 Summary of my perl5 (revision 5 version 8 subversion 0) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultip +licity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CON +SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IM +P LICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -DNDEBUG -O1', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"G:\ +Perl\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib" "C: +\Program Files\Microsoft Visual Studio\VC98\lib" "G:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netap +i 32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib +odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool +.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib n +e tapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32. +lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -l +ibpath:"G:\Perl\lib\CORE" -machine:x86'
    I also suggest you read Encode::PerlIO.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.

Re: IO with EBCDIC files in an ASCII environment?
by Streebgreebling (Initiate) on Jun 10, 2003 at 13:19 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://264597]
Approved by rob_au
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-18 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found