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
 

 

FTP a zip file via JCL in mainframes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Wed Aug 07, 2013 11:09 pm    Post subject: FTP a zip file via JCL in mainframes
Reply with quote

Hi,

I tried to find this in the forum, about PKZIP and FTP that file to a shared drive, but i am not getting the below issue:

Here is my PKZIP jcl to zip the mainframe file:

Code:
//********************************************************************
//* THIS JOB WILL ZIP A MAINFRAME FLAT FILE                           
//********************************************************************
//*                                                                   
//ZIP01    EXEC PGM=PKZIP,REGION=2048K                               
//STEPLIB  DD DISP=SHR,DSN=PKZIP.LOAD                         
//INFILE DD DSN=GDG.JCL,DISP=SHR                             
//SYSPRINT DD SYSOUT=*                                               
//SYSOUT DD SYSOUT=*                                                 
//SYSIN DD *                                                         
 -ECHO                                                               
 -MEMORY_MODE(SMALL)                                                 
 -ARCHIVE(GDG.ZIP)                                           
 -DATA_TYPE(BINARY)                                                   
 -METHOD(MAXIMUM)                                                     
 -INDD(INFILE)                                                       
/*                                                                   
//*



The above job successfully zips my file GDG.JCL to GDG.zip.

Now i am not able to FTP this GDG.zip file. Can anyone please help me in this:

Code:
//P001     EXEC PGM=FTP,PARM='(EXIT',REGION=4096K                   
//INPUT    DD *                                                     
Mycompany name
User
password
ASCII                                                               
PUT 'GDG.JCL' \shrdata\wc\wcscan\GDG.zip                         
QUIT                                                                 
//OUTPUT   DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=* 


I know, there is some issue with the ASCII and BINARY. My PKZIP has created BINARY and i am sending in ASCII.
Can anyone please help on how to FTP this BINARY zip file.

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

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 11:14 pm    Post subject:
Reply with quote

What are the error messages that you are getting?
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 Aug 07, 2013 11:17 pm    Post subject:
Reply with quote

Code:

//P001 EXEC PGM=FTP,PARM='(EXIT',REGION=4096K
//INPUT DD *
Mycompany name
User
password
ASCII
PUT 'GDG.JCL' \shrdata\wc\wcscan\GDG.zip
QUIT
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
1. "my company name" should be the IP address or DNS name for the server you are connecting to
2. ASCII should be BINARY -- ZIP files must be transferred as binary
3. I don't know how PKZIP works on the mainframe, but I suspect you want to transfer GDG.ZIP, not GDG.JCL
Back to top
View user's profile Send private message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Wed Aug 07, 2013 11:37 pm    Post subject: FTP a zip file via JCL in mainframes
Reply with quote

Thanks Bob.
I got it. It was a silly mistake i was making in my JCL, which you corrected in point 3.
I put GDG.JCL instead of GDG.ZIP in my jcl and it worked.
Below is the jcl that worked:

//P001 EXEC PGM=FTP,PARM='(EXIT',REGION=4096K
//INPUT DD *
DNS name
User
password
BINARY
PUT 'GDG.ZIP' \shrdata\wc\wcscan\GDG.zip
QUIT
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*

Thanks again !!!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Aug 08, 2013 12:46 am    Post subject:
Reply with quote

Glad to hear you got it working, but I go by Robert -- never have been called "Bob" except by people who don't know better.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Aug 08, 2013 1:55 pm    Post subject:
Reply with quote

Quote:
people who don't know better
or with a death-wish? icon_smile.gif

chhabraravneet:
There was nothing wrong with the JCL - the error was in the FTP control cards (they are NOT JCL).
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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