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
Attempting to zip a file and return to the Mainframe
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.
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.