Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Help with PKUNZIP JCL
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Mon Jan 18, 2010 1:49 am    Post subject: Help with PKUNZIP JCL
Reply with quote

Hello everyone,

I am a new member in this group.After scanning through all the forums in here I came to a conclusion that this is the forum to which i can seek help with my questions on PKUNZIP.I hope I am in the right forum.Please direct me to the appropriate forum if I am not right.

I have a requirement where in I need to pull a file from an external vendor server via SFTP to test environment in my shop.The file on the vendor server is a zipped file.When unzipped using WINSCP/PUTTY, I was able to see 25 data tables in the zipped file.

Eg:- Say zipped document is A.DOC

When unzipped using winscp I see data for a.tbl,b.tbl,c.tbl,d.tbl and so on like 25 tables.

I was able to successfully do SFTP and transferred the zipped file to a mainframe dataset.

Now I have to figure out a way to unzip this zipped mainframe file and extract all the 25 data tables on to individual PDS members in a new MF PDS file so that I can upload to the db2 tables.

I tried UNZIP JCL to do so and job keep failing.I wonder if there is a way any one can help with a JCL to accomplish the same.

I am pasting the unzip JCL i used which is abending.

//STEP01 EXEC PKUNZIP,REGION=2M
//STEPLIB DD DSN=SYSL.PKZIPMVS.DEVL.LOADLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DATAOUT DD DSN=TFRSS.VENDOR.DATA.UNZIPPED,DISP=
// (NEW,CATLG,DELETE),
// DSORG=PO,RECFM=FB,LRECL=400,BLKSIZE=0,
// UNIT=SYSDA,SPACE=(CYL,(800,800,20),RLSE)
//SYSIN DD *
-ECHO(Y)
-ARCHIVE_DSN(TFRSS.VENDOR.DATA.ZIPPED)
-OUTFILE_DD(DATAOUT)
-OUTFILE_SPACE_MULTIVOL=Y
-DATA_TYPE(TEXT)
-HIERARCHY(N)
-CRLF=Y
/*

Thanks,
Prem
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Jan 18, 2010 2:24 am    Post subject: Reply to: Help with PKUNZIP JCL
Reply with quote

Quote:
i used which is abending.


If You do not realize that You should post also the abend, very little we can do for You

here is the link to the IBM abend codes manual in case of an abend starting with S ( system abend )
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2H781/CCONTENTS?SHELF=EZ2MZ901&DN=SA22-7626-16&DT=20080124095350
search for the abend You received and if something is not clear somebody will be glad to help

for a U ( user abend ) You will have to look at the PKZIP manuals
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Tue Jan 19, 2010 1:08 am    Post subject: Re:Pkunzip
Reply with quote

Thanks Enrico..

The reason why I dint post abend was because I had cancelled the job as it writing tons of pages on SYSABEND and was running for more than hour.Obviously I sensed that job is going to abend.So I purged the job to avoid operations calling me to notify me of the job filling up the spool.

But I did see the following information on my sysout before I purged the job.

ZPEX002I HMS_Education.tab
ZPEX003I Extracted to TFRSS.VENDOR.DATA.UNZIPPED(HMS_EDUC)
ZPTM002I SUBTASK ( 4) EP: ACEXMAIN Ended - TCB: 009E4238 Comp: 00E37000
<CCCOZIP> ReadData ACCOCQMR Premature End(8) FL1=00

I opened the sysabend log and I also see SYSTEM = E37 REASON CODE = 00000004 which is obviously complaining about not enough primary space allocation.But I tried allocating more primary space and reran the job again .But it is still failing.So I am not sure it has to do with space allocation.

I strongly suspect I am doing something wrong with my sysin parms.

Appreciate if you or some experts can take a look at that and see if there is anything fishy.I am still trying to get this work and here is the most recent sysin dd card parms I am using

000012 //SYSIN DD *
000013 -ECHO(Y)
000014 -ARCHIVE_DSN(TFRSS.VENDOR.DATA.ZIPPED)
000015 -ACTION(EXTRACT)
000016 -OUTFILE_DD(DATAOUT)
000017 -OUTFILE_DSNTYPE(PDS)
000018 -OUTFILE_SPACE_MULTIVOL=Y
000019 -DATA_TYPE(DETECT)
000020 -HIERARCHY(N)
000021 /*
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jan 19, 2010 2:26 am    Post subject:
Reply with quote

Can you run an archive listing and find out how much space the output will take?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jan 19, 2010 2:48 am    Post subject:
Reply with quote

What format was the zip file transferred to the mainframe in?
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Tue Jan 19, 2010 3:09 am    Post subject:
Reply with quote

Robert,

File when transfered as zip is 630 MB.
All unzipped files to a whole occupies 1700 MB of data.

Craig,

File was transferred as binary.Pasting my sftp parms here
open trnfer@sftp.xxxonline.com
pwd
cd /files
pwd
binary
ls -l
sget 20091118_vendor_data.zip //DD:vndrZIP
lclose
quit

JCL which I used successfully to do the transfer is

EDIT MCSKMN.SFTP.JCL(OPPRSFTP) - 01.04 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 //MCSKMNAA JOB 'MCSKMNA,TSSS,D','SFTP BATCH',CLASS=E,
000002 // MSGCLASS=X,NOTIFY=&SYSUID
000003 /*JBS BIND TECTIA.LIC
000004 //**-----------------------------------------------------------------**
000005 //PS010 EXEC PGM=IEFBR14
000006 //VNDRZIP DD DISP=(MOD,DELETE),DSN=TFRSS.VENDOR.DATA.ZIPPED,
000007 // UNIT=3390,SPACE=(TRK,0)
000008 //**-----------------------------------------------------------------**
000009 //PS020 EXEC SFTPBATP
000010 //PASSWD DD DSN=MCS.SFTP.PARM(VNDRPSWD),DISP=SHR
000011 //HMSZIP DD DISP=(,CATLG),DSN=TFRSS.VENDOR.DATA.ZIPPED,
000012 // UNIT=3390,SPACE=(CYL,(600,600),RLSE),
000013 // RECFM=U,LRECL=0,BLKSIZE=27998
000014 //BATCHIN DD DSN=MCS.SFTP.PARM(VNDRCMDS),DISP=SHR
000015 //*
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jan 19, 2010 3:33 am    Post subject:
Reply with quote

1700 megabytes is about 60% of a 2800 megabyte 3390 mod 3. Try allocating the output file as 2200 cylinders -- hopefully it'll get enough space then. If this is not possible, use more disks (UNIT=SYSDA,?) where ? is the number of packs to allocate on -- just make sure the total primary space is at least 1700 megabytes.
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Tue Jan 19, 2010 3:39 am    Post subject:
Reply with quote

Thanks Rober..I will try and let you know if iam able toget rid of E37.
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Tue Jan 19, 2010 8:43 am    Post subject:
Reply with quote

I gave enough space and still failing.I searched PKzip manuals for sample JCL's that extracts zipped data on to PDS ..Couldnt find any either.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jan 19, 2010 8:47 am    Post subject:
Reply with quote

Quote:
I searched PKzip manuals for sample JCL's that extracts zipped data on to PDS ..Couldnt find any either.
It sounds like it is time to open a problem with the vendor to determine whether or not what you are attempting to do is even possible using the product.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jan 19, 2010 10:04 am    Post subject:
Reply with quote

Hello,

Something that often helps resolving this type of problem is to create a very small (1k bytes) test file and work with this until the process is working correctly.

Then go for the larger volume.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jan 19, 2010 5:46 pm    Post subject:
Reply with quote

PremKumarNair wrote:
Thanks Rober..
With due respect would like to say - please spell his name correctly - He is Robert.
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Tue Jan 19, 2010 9:50 pm    Post subject:
Reply with quote

Anuj,
Thanks for bringing it to my attention.Though I had spelled Robert's name correctly in the body of my post in many places which I believe you would have noticed by now, I did see at one place I comitted an oversight error.Thanks for bringing it to my attention and my appologies to Robert for misspelling the name.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jan 19, 2010 9:57 pm    Post subject:
Reply with quote

No problem with the name!

I don't work with PKUNZIP on the mainframe, so I see at least two potential problems with what you're trying to do:

1) the file names in the archive may not meet the requirements for a PDS name (8 or fewer characters, first must be a letter, only a few special characters allowed), in which case you need to find out from the vendor just how the software handles invalid names,

2) the software may not allow extraction of multiple files into a PDS at all; you might have to extract one file at a time -- which again requires talking to the vendor (or looking in the manual) to verify
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Wed Jan 20, 2010 12:47 am    Post subject:
Reply with quote

Thanks Robert..I will post these questions on PKWARE support site and see what happens.

Apparently manual says it can handle PDS filetypes but not sure as you rightly mentioned about extraction of multiple files into a PDS.There is no example in the manual which is showing that at least.

wrt concerns on naming conventions on PDS member name,looks to me that part is ok as the sysout message says

ZPEX002I HMS_Education.tab
ZPEX003I Extracted to TFRSS.VENDOR.DATA.UNZIPPED(HMS_EDUC)
ZPTM002I SUBTASK ( 4) EP: ACEXMAIN Ended - TCB: 009E4238 Comp: 00E37000
<CCCOZIP> ReadData ACCOCQMR Premature End(8) FL1=00

As you see in the message above it looks like UNZIP process has truncated HMS_education tab to HMS_EDUC which is 8 characters.

But I am gonna raise that question as well to see if thats an issue as well.

Has anyone tried raising questions with the vendor?If so,what is the normal turn around time to get the questions answered?Just being curious.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Jan 20, 2010 1:03 am    Post subject:
Reply with quote

In this case, another concern would be if you have files like HMS_education_2008 and HMS_education_2009 -- since they both truncate down to HMS_EDUC, what happens? Does the last one extracted overlay the first one? Or is there an error message generated?
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Wed Jan 20, 2010 1:40 am    Post subject:
Reply with quote

Robert,

Thats a good question.Fortunately filenames are different like
HMS_Address
HMS_Certification
HMS_DEA
HMS_Education
HMS_Identifiers
HMS_Practitioner
HMS_Sanction
HMS_Specialty
HMS_State_License
HMS_Surescripts

But what I am seeing per sysout is it extracted first member HMS_education and then it started writing to PDS and stops there.I dont see any info as to if it tries to write another one nor I see any error message.

I was able to contact someone in PKWARE tech support and as per them the operation I am trying to perform is quite possible with PKUNZIP.The person i spoke with suggested adding UNZIP DSN parm to the control card.I have added the same and resubmitted the job. i will let you know how it goes.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 20, 2010 4:08 pm    Post subject:
Reply with quote

Did you look at the –SELECT_FROM_PDS command, Synonyms Include: –PDS_TARGET, –ZIPCUR?

Source : PKZIP MVS/ESA, OS/390, & z/OSUser’s Guide PKMU-V5R0100

I think thats required using -HIERARCHY(N).
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Thu Jan 21, 2010 11:23 am    Post subject:
Reply with quote

Peter,

Thanks..I havent looked at those synonyms.I will take a look and try and see what happens.

I tried UNZIP-DSN as recommended by PKWARE support personnel and unfortunately that didnt work either.

Thanks again.
Back to top
View user's profile Send private message
PremKumarNair

New User


Joined: 12 Jan 2010
Posts: 27
Location: Pleasanton,CA

PostPosted: Thu Jan 28, 2010 2:07 am    Post subject: Reply to: Help with PKUNZIP JCL
Reply with quote

Finally I got this working..

Pasting the working JCL to unzip to Sequential Files.

Code:
//STEP02   EXEC PKUNZIP,REGION=8M                                       
//STEPLIB  DD  DSN=SYSL.PKZIPMVS.DEVL.LOADLIB,DISP=SHR                                   
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSIN        DD   *                                                   
  -ECHO
 -OUTFILE_UNIT(SYSDA)
 -OUTFILE_RECFM(FB)
 -OUTFILE_LRECL(4096)
 -OUTFILE_BLKSIZ(0)
 -OUTFILE_OVERWRITE(Y)
 -DATA_TYPE(TEXT)
 -CRLF(Y)                                               
 -ARCHIVE_DSN(TFRSS.HMS.DATA.ZIPPED) 
 -UNZIPPED_DSN(HMS_Education.tab,TFRSS.HMS.EDUC.UNZIPPED)               
 -UNZIPPED_DSN(HMS_Sanction.tab,TFRSS.HMS.SNCT.UNZIPPED)               
       
HMS_Education.tab                                                     
HMS_Sanction.tab                                                       
                                           
 /*                                                         


Pasting the working JCL to unzip to PDS.



Code:
//STEP01   EXEC PKUNZIP,REGION=8M                                       
//STEPLIB  DD  DSN=SYSL.PKZIPMVS.DEVL.LOADLIB,DISP=SHR                 
//DATAOUT  DD  DSN=TFRSS.HMS.DATA.UNZIPPED,DISP=(NEW,CATLG,DELETE),     
//             DSORG=PO,RECFM=FB,LRECL=400,BLKSIZE=0,                   
//             UNIT=SYSDA,SPACE=(CYL,(3000,100,50),RLSE)               
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSIN    DD   *                                                       
 -ARCHIVE_DSN(TFRSS.HMS.DATA.ZIPPED)                                   
 -ACTION(EXTRACT)                                                       
 -OUTFILE_DSNTYPE(PDS)                                                 
 -DATA_TYPE(TEXT)                                                       
 -CRLF(Y)                                                               
 -OUTFILE_OVERWRITE(Y)                                                 
 -UNZIPPED_DSN(HMS_Address.tab,|                                       
  TFRSS.HMS.DATA.UNZIPPED(HMSADDR))                                                                     
 -UNZIPPED_DSN(HMS_Education.tab,|                                     
  TFRSS.HMS.DATA.UNZIPPED(HMSEDUC))                                                                     
 -UNZIPPED_DSN(HMS_Sanction.tab,|                                       
  TFRSS.HMS.DATA.UNZIPPED(HMSSANC))                                                                           
  "HMS_Education.tab"                                                                                                   
  "HMS_Sanction.tab"                                                   
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ERROR using PKUNZIP via EZT Ramsee CA Products 5 Tue Nov 12, 2013 1:16 pm
No new posts Issue with PKUNZIP chetanambi JCL & VSAM 9 Thu May 16, 2013 5:17 pm
No new posts how to find location of pkunzip on th... Aleksandra Sirota All Other Mainframe Topics 3 Wed Jun 30, 2010 4:07 am
No new posts PKUNZIP giving return code of eight eldhose_george All Other Mainframe Topics 3 Sat Oct 11, 2008 4:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us