Thanks in advance!
- - - - - - - - - - - - - - - - - - - -
Don Johnson
TSO-REXX list archives are available on the web
http://www.marist.edu/htbin/wlvindex?tso-rexx
Once upon a time, I had to send data from multiple LPARs to a Sybase SQL
Server on NT. I had to reformat the EBCDIC data into fields, attach a
length attribute & X'00' to each, convert it to ASCII, and prefix it all
with a total length before transmitting it using REXX Sockets. I included
the EBCDIC-ASCII tables from the TCP/IP documentation then current, so that
my client would be able to easily make any adjustments required. I used
REXX's TRANSLATE() of course.
I also had to play with the big endian / little endian for those length
pieces, but I can't recall those details. As I recall, I built my output
"records" one field at a time, performing the operations outlined above, on
each one. We all try to perform operations on a less frequent, more global
scale whenever possible, but for some reason that I can't recall, I did it
this way. I do recall that I didn't feel too bad about it, because the
S/360 - S/390 architectures' TRANSLATE instruction is so powerful, and I
felt that TRANSLATE() had everything required by the machine instruction,
that any overhead would be negligible.
The manual I would use today is:
SC31-7187-03
IBM TCP/IP for MVS: Application Programming Interface Reference
or it's equivalent. I looked for the translation table contents, but I
didn't see today what I used back then.
Have fun; I had a blast.
Michael Bradley
When I need to do this, I transmit the file to a pc using IND$FILE and
specifying EBCDIC to ASCII and no crlf. I then DL the ascii file in
binary mode. Long, but it has worked in the past.
Mickey
/* REXX */
.
.
out_data = EBCDIC_to_ASCII(in_data)
.
.
return
EBCDIC_to_ASCII: Procedure
parse arg EBCDIC_data
ASCII_table = '000102030405060708090A0B0C0D0E0F'X||,
'101112131415161718191A1B1C1D1E1F'X||,
'202122232425262728292A2B2C2D2E2F'X||,
'303132333435363738393A3B3C3D3E3F'X||,
'204142434445464748499C2E3C282B7C'X||,
'2651525354555657585921242A293B5F'X||,
'2D2F62636465666768697C2C255F3E3F'X||,
'707172737475767778603A2340273D22'X||,
'806162636465666768698A8B8C8D8E8F'X||,
'906A6B6C6D6E6F7071729A9B9C9D9E9F'X||,
'A07E737475767778797AAAABAC5BAEAF'X||,
'B0B1B2B3B4B5B6B7B8B9BABBBC5DBEBF'X||,
'7B414243444546474849CACBCCCDCECF'X||,
'7D4A4B4C4D4E4F505152DADBDCDDDEDF'X||,
'5CE1535455565758595AEAEBECEDEEEF'X||,
'30313233343536373839FAFBFCFDFEFF'X
ASCII_data = translate(EBCDIC_data, ASCII_table)
return ASCII_data
Bryan Balfour
--- Don Johnson <don.j...@EFFEM.COM> wrote:
> Is there any known REXX routine for performing EBCDIC to ASCII
> translation
> easily? I have a mainframe file that I would like to ship via SMTP
> to mail
> users as a .txt file, and while I have the base64 encoding working, I
> also
> need the PC character format as well.
>
> Thanks in advance!
>
> - - - - - - - - - - - - - - - - - - - -
> Don Johnson
>
=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
I don't have rexx, but when I am sending data from the M/F to my PC, I often
mail it to myself. I first uuencode it on the host, next plonk that file in
the middle of the appropriate mail headers and then send it off using SMTP.
When decoded on the PC, it is magically ASCII. I have never looked closely
how it works, but it does - presumably the uuencode does the conversion.
Anyway, here is a JCL that I use regularly.
//C870440E JOB (IQCASQE000),'EMAIL',MSGCLASS=X,
// CLASS=C,NOTIFY=&SYSUID
//*
//DELETE EXEC PGM=IEFBR14
//DD1 DD DSN=FSTRDBA.C870440.UUENCODE,DISP=(MOD,DELETE,DELETE)
//DD2 DD DSN=FSTRDBA.C870440.MAILMESG,DISP=(MOD,DELETE,DELETE)
//*
//*
//ENCODE EXEC PGM=UUENCODE,PARM='-P TRANP90.CSV'
//SYSIN DD DISP=SHR,DSN=FSTRDBA.C870440.SASOUT.TRANP90
//SYSPRINT DD DSN=FSTRDBA.C870440.UUENCODE,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(TRK,(20,2)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)
//*
//*
//MAILIT EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FSTRDBA.C870440.INSTREAM(TRANHDRS),DISP=SHR
// DD DSN=FSTRDBA.C870440.UUENCODE,DISP=SHR
// DD DSN=FSTRDBA.C870440.INSTREAM(TRANDONE),DISP=SHR
//SYSUT2 DD SYSOUT=(A,TCPSMTP)
Regards
PJR
Peter Robinson
Senior Performance DBA
Application & Production Support
IBM-GSA Enterprise Services
Brisbane, Australia
* BG07, PO Box 435, Brisbane 4001
> ' (07) 3887-8129 or 0418-400-959
> 7 (07) 3221-0173
> * pete...@au1.ibm.com
peter.j....@telstra.com.au
Where did you turn up the utility UUENCODE? If it's homegrown would you like to
share it
as it looks handy?
It appears from checking the cd-rom manuals that Unix System Services as a
UUENCODE command but not so freindly as to run easily as this in plain old
batch.
Best Regards,
Sam Knutson
Landmark Systems Corporation http://www.landmark.com
*-> I don't speak for Landmark Systems Corporation *->
Phone: (703) 464-1615
mailto:sknu...@Landmark.com
My Personal Web Site: http://www.his.com/~dragon
CBT Tape Home Page: http://www.cbttape.org
You wrote:
>From: "Robinson, Peter [IBM GSA]" <Peter.J....@CORPMAIL.TELSTRA.COM.AU>
>Subject: Re: EBCDIC to ASCII translation
Peter
--
Peter S Tillier pet...@eq1152.demon.co.uk
Peter....@BTinternet.com
Fax2Email 0870 052 2717
Opinions expressed are my own and not necessarily those of my employer.
Shmuel (Seymour J.) Metz
> -----Original Message-----
> From: Sam Knutson [SMTP:sknu...@LANDMARK.COM]
> Sent: Friday, October 22, 1999 9:15 AM
> To: TSO-...@VM.MARIST.EDU
> Subject: Re: EBCDIC to ASCII translation
>
> Hi,
>
> Where did you turn up the utility UUENCODE? If it's homegrown would you
> like to
> share it
> as it looks handy?
>
> It appears from checking the cd-rom manuals that Unix System Services as a
> UUENCODE command but not so freindly as to run easily as this in plain old
> batch.
>
Seymour Metz wrote:
> Subject:
> Re: EBCDIC to ASCII translation
> Date:
> Fri, 22 Oct 1999 10:54:18 -0400
> From:
> "Metz, Seymour"
>
>
>
> You might want to ask on the MVS-OE list (subscribe at
> ?). UUENCODE is fairly old and most people these
> days prefer MIME for attachments, but if you want to use it the code is
> readily available.
>
My question is: Where is it readily available. I'd like to see source
code for UUENCODE to run under MVS. Can anyone help me find out about
it? Thanks very much, in advance.
Regards, Sam Golob
--
my email ids: sbg...@ibm.net and/or sbg...@aol.com
Check out http://www.cbttape.org for CBT Tape information
and downloads of files. "Sponsored by NaSPA"
("Advertised as 24x7 access" !!!! )
For the newest CBT Tape files (which are subject to change),
look at ftp://ftp.cbttape.org/pub/cbttape/adhoc .
(These are interim versions - between tape releases.)
I've found that this one is in-house and not for distribution. The
translation for a file to UUENCODEd format is dead easy so it should not be
too hard to write in rexx.
PJR
> >Subject: Re: EBCDIC to ASCII translation
> >