ASCII to EBCDIC edits

General discussion on the JZOS batch launcher and toolkit
Post Reply
mwilliam
Posts: 37
Joined: Mon Oct 11, 2004 3:21 pm

ASCII to EBCDIC edits

Post by mwilliam »

ASCII to EBCDIC edits

Hello,
I am currently working for a client who uses AFC security instead of RACF, therefore we are not setup to use the OMVS command in our TSO sessions. However, via batch jobs, we can use OPUT & OGET commands to transfer files between HFS and MVS. For the ASCII files, does anyone know of any standard MVS utilities that can translate between ASCII and EBCDIC? Normally, I’ll write a utility in C (or REXX) to do the conversion, however this time, I don’t want re-invent the wheel if I can help it.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

iconv is a shell utility to convert ascii-ebcdic.

Our free Co:Z toolkit has some nice utilities (fromdsn and todsn) which not only copy datasets <-> hfs files but handle codepage conversion. They are easy to run under batch jobs using DTLSPAWN:

// EXEC DTLSPAWN
//OUT DD DSN=OUT.DATA,....
//STDIN DD *
cat /dir/hfs.ascii.txt |
todsn -s ISO8859-1 //DD:OUT
//

If you want "standard" utilities, you are stuck with BPXBATCH, OCOPY, iconv and cp which are much more cumbersome to use.
Post Reply