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
 

 

using FTP in JCL i need to download and XMIT file

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

New User


Joined: 29 Jul 2009
Posts: 5
Location: bangalore

PostPosted: Tue Aug 11, 2009 4:20 pm    Post subject: using FTP in JCL i need to download and XMIT file
Reply with quote

The jcl code is as follows
//TPGMF01J JOB 1633,'ASHOK',
// MSGCLASS=G,NOTIFY=&SYSUID
//FTP001 EXEC PGM=FTP,PARM='172.29.122.37'
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD *
TPGMF01 JULY
GET 'TPGMF01.APAZ.APR30.BKP.D09209' +
CD E\MODREP\EX2.TXT
QUIT

the output is
EZA1736I FTP 172.29.122.37
EZY2640I Using 'TCPIP.FTP.DATA' for local site configuration parameters.
EZA1450I IBM FTP CS V1R10
EZA1554I Connecting to: 172.29.122.37 port: 21.
220-FTPSERVE IBM FTP CS V1R10 at ETPGM.DAL-EBIS.IHOST.COM, 10:42:14 on 2009-08
220 Connection will close if idle for more than 5 minutes.
EZA1459I NAME (172.29.122.37:TPGMF01):
EZYFS34W FTP will not remove TRAILING sequence numbers
EZA1701I >>> USER TPGMF01
331 Send password please.
EZA1701I >>> PASS
230 TPGMF01 is logged on. Working directory is "TPGMF01.".
EZA1460I Command:
EZA1736I GET 'TPGMF01.APAZ.APR30.BKP.D09209' +
EZA1542I Usage: GET foreignfile <localname> <(REPLACE>
EZA1460I Command:
EZA1736I CD E\MODREP\EX2.TXT
EZA1701I >>> CWD E\MODREP\EX2.TXT
501 A qualifier in "E\MODREP\EX2.TXT" contains an invalid character
EZA1460I Command:
EZA1736I QUIT
EZA1701I >>> QUIT
221 Quit command received. Goodbye.


My question is , it is able to connect to the server. Now i need to download the XMit file. Can any one help me in the GET command in JCL , so that i can download to PC.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 11, 2009 4:22 pm    Post subject:
Reply with quote

You give JCl, you give the job lob, but you do not tell us exactly what you are trying to do.

With this information it is easier to get a good response.
Back to top
View user's profile Send private message
ashok54

New User


Joined: 29 Jul 2009
Posts: 5
Location: bangalore

PostPosted: Tue Aug 11, 2009 4:30 pm    Post subject:
Reply with quote

My question is , it is able to connect to the server. Now i need to download the XMit file.

To download that XMIT file i mentioned the GET command , it is getting as error in GET syntax'

so how to use GET command in JCL ?

I need to download from Mainframe to PC.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Aug 11, 2009 4:37 pm    Post subject:
Reply with quote

Code:
EZA1736I GET 'TPGMF01.APAZ.APR30.BKP.D09209' +
EZA1542I Usage: GET foreignfile <localname> <(REPLACE>
This doesn't tell you everything you need to know about why your job didn't retrieve the file???

And why are you doing a Change Directory command after you've issued the GET command -- you need to be in the correct directory before you get the file, you know.
Back to top
View user's profile Send private message
ashok54

New User


Joined: 29 Jul 2009
Posts: 5
Location: bangalore

PostPosted: Tue Aug 11, 2009 4:43 pm    Post subject:
Reply with quote

230 TPGMF01 is logged on. Working directory is "TPGMF01.".
EZA1460I Command:
EZA1736I GET 'TPGMF01.APAZ.APR30.BKP.D09209' +

whether the usage of GET syntax in jcl is corret or any modifications to de done.

IT is showing as Working Directory as "TPGMF01"


This is first time i am using this FTP commands, so i got JCL from forum, and tried. so i dont know exactly how the syntax is mentioed.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Aug 11, 2009 4:53 pm    Post subject:
Reply with quote

When you use FTP to a z/OS machine, your working directory is the TSO user id you signed on as. Making some assumptions about what you are trying to do, I believe your FTP commands (after the sign on) need to be:
Code:
bin
get 'TPGMF01.APAZ.APR30.BKP.D09209'  e:\MODREP\EX2.TXT
quit
Assumptions:
1) For an XMIT file, you need to be in binary, not text (ASCII) mode.
2) From the presence of the EZA messages, you are running the FTP on your mainframe connecting to a Windows server.
3) You want to store the file on the mainframe as APAZ.APR30.BKP.D09209 under your TSO user id.
4) The file on the Windows server you need to retrieve is in the MODREP directory under root and has a file name of EX2.TXT
If these assumptions are not correct, then the commands may need to be changed appropriately.

I recommend you find the z/OS Communications Server bookshelf at your site and read the User's Guide to learn more about FTP since there are quite a few nuances to how FTP works and each site can customize as they see the need.
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 Aug 11, 2009 8:37 pm    Post subject:
Reply with quote

Hello,

Quote:
Can any one help me in the GET command in JCL , so that i can download to PC.
You probably cannot send a file from the mainframe to your pc using FTP via a batch job (JCL). To be able to do this, your pc would need to be running as an "ftp server" so the mainframe could connect.

The way most files are downloaded directly to a pc is using the ftp client available on the pc to connect to the mainframe ftp server.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
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


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