View previous topic :: View next topic
|
Author |
Message |
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
Hi,
Currently i am FTPing a file from mainframe to 3 different unix servers in JCL through 3 different steps. Each step will call a control card which had details about the destination server.
I want to eliminate these 3 steps in JCL. I need to FTP the file to 3 different servers at the same time in a single step. I wrote a REXX program which will dynamically create FTP control card which has details about 3 servers
I am invoking this FTP control card. When we run the JCL it successfully FTPs to the first server and then it quits automatically. It doesn’t FTP to the next server. It says invalid command. I am not sure if we can transfer a file to more than one server through the same control card.
Please let me know if it is possible and some idea on how should i proceed.
Thanks. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Is it possible to FTP to mulitple destinations?
Do you have a link to an FTP manual? |
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
Sorry i couldnt get your question.
You can FTP a file to multiple different servers through different steps in JCL.
Do you have a link to an FTP manual? --- couldnt understand this |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Is it even possible to FTP to multiple destinations (as with email) in a single step/FTP execution?
Do you have the FTP manual available to you to look this up? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
I think XCOM will do the job. |
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
Is it even possible to FTP to multiple destinations (as with email) in a single step/FTP execution? ---> This is the question which i am asking here. If so any ideas on that
I dont have FTP manual |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Yes, it is. Once FTP has started it can open and close sessions as many times as it needs to. |
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
Could you please provide me some idea on how can i do this.
I had created a control card as below:
servername1
userid1
password1
send file using put command
quit
servername2
userid2
password2
send file using put command
quit
called this control card in the FTP step thru JCL.
It successfully FTPs to servername1. After that it doesnt recognize any command and says invalid command. Hence not able to ftp to servername2.
Please advise. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You need to get rid of the quit statements (except for the last one). |
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
I have tried that option. But it doesnt work.
coded as below:
servername1
userid1
password1
send file using put command
servername2
userid2
password2
send file using put command
quit
It FTPed to servername1 and then it threw error as invalid command for servername2, userid2,password2. Again it FTPed file to same servername1. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Maybe put a "disconnect" or "close" between the following statements :
send file using put command
servername2 |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
I tried this option and it worked. Thanks all for your timely help. |
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
I have a doubt here. If the FTP of the first server failes will it still continue to FTP to the next server?
Is there a way to find out if the file was FTPed successfully in control card. |
|
Back to top |
|
|
shanuss
New User
Joined: 16 Jul 2008 Posts: 17 Location: Chennai
|
|
|
|
you can verify spool to see if there is any FTP failed statements.... Or you can issue a list command on to the servers once all FTPs are done |
|
Back to top |
|
|
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
I tried failing the FTP of first server to see if the second server FTP runs succesfully. It didnt invoke the second server's FTP and it returned error code 1808.
My requirement is to successfully run FTP of the second server even if the first server FTP fails. Kindly provide me some pointers on how i can do this. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Run multiple steps or multiple jobs. If the first FTP does not complete successfully, then z/OS considers the step to have failed and will not execute any other FTP commands. So you cannot do what you want in a single step of a job. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Once again XCOM will do the job.
Oh, I almost forgot. You have to have it installed of course. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The funny thing is, I had been thinking about posting a comment to this that I didn't think it would be a good idea to do this because of exactly this issue. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
superk wrote: |
The funny thing is, I had been thinking about posting a comment to this that I didn't think it would be a good idea to do this because of exactly this issue. |
Hello Kevin,
i was thinking the same after my first response. But then as we speak
im bored like hell. Beside that i really get annoyed when people wont
understand if something is not working the way they would like, then you have to revert to other solutions given by you, others and last but not least myself. |
|
Back to top |
|
|
|