Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JCL required to FTP a zipped file to my z/os and unzip file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Smita Sebastian

New User


Joined: 30 May 2007
Posts: 7
Location: India

PostPosted: Wed Jul 02, 2008 2:42 pm    Post subject: JCL required to FTP a zipped file to my z/os and unzip file
Reply with quote

Hi -

We receive a pipe '|' delimited file from a vendor which is in the zipped format. My requirement is to FTP 'get' the zipped file and unzip the file in the next step. Can someone provide me with the jcl steps for this? Is there any additional steps that I need to include for related processing like for example a format conversion?

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

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Jul 02, 2008 2:50 pm    Post subject: Reply to: JCL required to FTP a zipped file to my z/os and u
Reply with quote

See this previous topic.
Back to top
View user's profile Send private message
Smita Sebastian

New User


Joined: 30 May 2007
Posts: 7
Location: India

PostPosted: Wed Jul 02, 2008 2:59 pm    Post subject: Reply to: JCL required to FTP a zipped file to my z/os and u
Reply with quote

Hi superk,

Thanks for ur quick reply. I have got the PKUNZIP step from the link that you have given me. Now I need the FTP step...Will the normal FTP work for a zipped file? The ftp'd file would be in ASCII format. Will the format change after the PKUNZIP step? If so do we need any more additional steps to make the file fit for processing?

As of now, my ftp is as follows -
xxx.yyy.com (EXIT
username
password
sendsite
ascii
cd
dir
LOCSITE LRECL=500 BLOCKSIZE=0
get x.DLM 'HLQ.XXXX.YYYY.ZZZZZ' (R
get y.DLM 'HLQ.UUUU.VVVV.WWWW' (R
dir
quit
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8166
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jul 02, 2008 3:11 pm    Post subject:
Reply with quote

First, a zipped file cannot be transferred in ASCII format. You must use binary (image) format to transfer a zipped file. Otherwise what you receive will not be usable or even readable.

Second, the data in the zipped file, assuming it is ASCII, will still be ASCII on the mainframe once unzipped. Since the mainframe is EBCDIC, you'll have to convert the data from ASCII to EBCDIC to make it readable. Look at ICONV in the Unix System Services manual for details (PAX and other Unix System Services commands can also handle the conversion).

Third, unless your mainframe site has purchased PKZIP or one of the other mainframe zip packages such as ZIP-390 or INFO-ZIP, you will find yourself unable to run them. Which leaves you with a zipped file on the mainframe that you cannot process.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Jul 02, 2008 3:21 pm    Post subject: Reply to: JCL required to FTP a zipped file to my z/os and u
Reply with quote

Robert, for the purpose of this topic, I'm making the presumption, unless the O/P says otherwise, that they do have a licensed version of PKWARE's products. If so, then the zip file will be in ASCII format, and yes it must be transferred in binary mode. The PKUNZIP program will take care of the conversion of the data inside from ASCII to EBCDIC if needed.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8166
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jul 02, 2008 5:19 pm    Post subject:
Reply with quote

Kevin: My response was based on O/P's statement that vendor is sending zipped file -- nothing was said indicating they've got something to unzip it on their mainframe. Presuming they've got PKUNZIP or INFO-ZIP or ZIP-390, then yes, format conversion can be done as part of the unzip.

Smita: looking at your FTP job, I'd probably transfer a zipped file to Unix System Services, unzip it, and then move the unzipped file to a z/OS file. And did you get the 500 LRECL from your zip program documentation?
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: Wed Jul 02, 2008 10:32 pm    Post subject:
Reply with quote

Hello Smita,

You may already know this, but if you want to "pull" the data from the remote to the mainframe, using a mainframe process, the remote system must be running an ftp service (rather than only an ftp client).

Many unix servers run an ftp service - most win-based machines do not (when you include all of the desk-top systems).

You may want to consider having the remote "push" file rather than your batch job trying to pull the file as the mainframe will almost always be "up" and the remote may not, which would cause your process to fail.
Back to top
View user's profile Send private message
Smita Sebastian

New User


Joined: 30 May 2007
Posts: 7
Location: India

PostPosted: Tue Jul 08, 2008 11:14 am    Post subject: Reply to: JCL required to FTP a zipped file to my z/os and u
Reply with quote

Hi -

Thanks for all your resposnses. The vendor has agreed to place unzipped files in the folder. Hence the FTP step should do...

Thanks,
S
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 Jul 08, 2008 1:02 pm    Post subject:
Reply with quote

Hello,

Quote:
Hence the FTP step should do...
So long as the remote folders are available on a system that is actually running an ftp service. . .
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us