View previous topic :: View next topic
|
Author |
Message |
ashok54
New User
Joined: 29 Jul 2009 Posts: 5 Location: bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
ashok54
New User
Joined: 29 Jul 2009 Posts: 5 Location: bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
ashok54
New User
Joined: 29 Jul 2009 Posts: 5 Location: bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|