Page 1 of 1

PKUNZIP in mainframe

PostPosted: Tue Oct 07, 2008 11:17 pm
by satlab
Hi,

I am using pkunzip to retrieve a specific file from the zip file by using the following instructions.

-ARCHINDD(ZIPFILE)
-OUTFILE_DD(UNZIPFL)
R*
-DATA_TYPE(TEXT)

The input file is in binary mode, but i want the output file to be in text mode so that i can make modifications to it. The file, which i want to retrieve starts with "R". When i run my jcl, the entire content is coming in single line in output file. Actually the content looks like an xml file. I gave the record length as 80 and recfm as fb. Is there any way to get the output in multiple lines. Do we need to specify any other option for this? Please let me know.
Thanks for your help.

Re: PKUNZIP in mainframe

PostPosted: Tue Oct 07, 2008 11:48 pm
by MrSpock
You have to tell PKUNZIP what the codes are for EOL and EOF. You specify them as the proper sequence of CR (Carriage Return) LF (Line Feed) and CZ (Control Z) or as nothing (Null).

-DATA_DELIMITER(CRLF) or -DELIM(CRLF)
-FILE_TERMINATOR(CRLFCZ) or -TERM(CRLFCZ)

Re: PKUNZIP in mainframe

PostPosted: Wed Oct 08, 2008 12:01 am
by satlab
Hi,

I tried including these options, but it is giving the same result.

Re: PKUNZIP in mainframe

PostPosted: Wed Oct 08, 2008 12:13 am
by satlab
Hi,

Actually the output file would be ftp'ed to Unix server. I verified it on unix server and it is showing up as a single record. That means i am fine with having the entire content in single line. Sorry for posting this without checking properly.

I have one more issue with this. The unzipped file size varies for different executions. Here file size is nothing but the number of bytes, as we have only one record in the file. But how can i specify the record length when i am running pkunzip as i am not sure about the size of output file. What should be the record format type as the size varies from time to time? Please let me know.

Re: PKUNZIP in mainframe

PostPosted: Wed Oct 08, 2008 12:57 am
by satlab
I should have told length of the file instead of size of the file. Please treat it as length of the file.

Re: PKUNZIP in mainframe

PostPosted: Fri Nov 14, 2008 11:02 pm
by satlab
I achieved this with the option -CRLF(N). It is working fine.

Thanks