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
 
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: 1782
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: 8188
Location: East Dubuque, Illinois, USA

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: 8188
Location: East Dubuque, Illinois, USA

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: 1922
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 unable to set RC = 4 when empty file migusd SYNCSORT 0 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm

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