Attempting to zip a file and return to the Mainframe

General discussion of the Co:Z Toolkit
Post Reply
walteg
Posts: 3
Joined: Fri Dec 05, 2008 10:18 am

Attempting to zip a file and return to the Mainframe

Post by walteg »

I have a need to be able to send a file to Linux, zip it and return it to the mainframe. I have setup a batch job, but when I download the file and unzip it, it contains garbadge. Here is the job I am using. Could you look at it and tell me what I am doing wrong?

Both the indata and outdata are MVS datasets.

fromdsn -b -t iso8859-1 //DD:INDATA \
| zip - - \
| todsn -b DD:OUTDATA

Thanks for your time
Gene
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

If you specify -b (binary), then -t is ignored. If you add the -LI switch then you will see informational-level messages like this:

fromdsn: Binary (-b) was specified; targetCodePage=ISO8859-1 is ignored

This messages should probably be a N (notice) level, so that you would have seen it at the default message level.

I'm not sure really what you are trying to do, but I assume that your input dataset has EBCDIC text records in it and you want to create a zip file that has ASCII (ISO8859-1) data. To do this, just remove the "-b" switch from what you have. Also note that if you don't specify "-t", then the default will be to use the default code page on the target (linux) box where fromdsn is running. If it's codepage is ISO8859-1, then you don't need any switches on fromdsn.
walteg
Posts: 3
Joined: Fri Dec 05, 2008 10:18 am

Post by walteg »

I swear I tried that before, but it works now. You were exactly right on what I was trying to do.

Thanks
Gene
Post Reply