Page 1 of 1

FTP in REXX

PostPosted: Mon May 31, 2010 9:08 pm
by Vinayak
Dear All,
I have a requirement of a REXX program which will FTP number of datasets from mainframe to Windows..I googled on it also tried some codes, but i am not able to do it. I am using ZOS V1R4. So it would be helpful for me if someone provide a working code....
I am able to do the same using JAVA, but my requirement is to do the same from Mainframe side (either using REXX or JCL will also do).

Re: FTP in REXX

PostPosted: Mon May 31, 2010 9:26 pm
by Robert Sample
When you ask for code, you are asking professionals to provide their work product. Unless you are willing to pay their rate (and 1000 U.S. dollars per day or fraction thereof are common), please do not expect to get code on this forum.

What have you tried that has not worked so far?

Re: FTP in REXX

PostPosted: Mon May 31, 2010 10:05 pm
by dick scherrer
Hello,

However, if you post what you have so far and what problem(s) occur, someone may be able to help you fix your "code". . .

Usually, the first issue with this type of process is that very few Windows pc's are set up as an ftp server - which it has to be to send files from the mainframe to the desktop. All pc's have an ftp client, but very few have a "server" running.

Re: FTP in REXX

PostPosted: Tue Jun 01, 2010 7:51 am
by Vinayak
Thank you all for your replies,

I have tried the following simple code
/* REXX */
ddnftp = Clist.output.ps
filename = rexxftp.txt
server = 111.11.1111.11111

Queue "sendsite"
Queue "ascii"
Queue "cd temp"
Queue "put //dd:"ddnftp" "filename
Queue "qui"
x = Outtrap(x.)
"FTP "server" 21 (Exit=8"
retcode = rc
x = Outtrap(Off)
Say RC

The above code is giving me RC = 8, it is not able to establish a connection with my PC. May be the same reason i am not having a FTP server running in my PC. So please tell me how to get a Ftp server running.

Re: FTP in REXX

PostPosted: Tue Jun 01, 2010 8:33 am
by dick scherrer
Hello,

So please tell me how to get a Ftp server running.
You first need to coordinate with your network/pc support people. Most places forbid running an "ftp server" on your desktop. If this is permitted in your organization, your support people will be able to provide the installation material.

Re: FTP in REXX

PostPosted: Tue Jun 01, 2010 2:55 pm
by MrSpock
Vinayak wrote:May be the same reason i am not having a FTP server running in my PC. So please tell me how to get a Ftp server running.


Another member posted a few ideas here in this topic.

Re: FTP in REXX

PostPosted: Tue Jun 01, 2010 5:56 pm
by Robert Sample
Very few sites will allow a desktop PC to act as a server, which requires a fixed IP address unlike the dynamic addresses usually assigned to desktops. The only good way to do this is to contact your site support group and work with them. If you take any other approach, organizations will frequently take action up to and including termination for creating an unauthorized server in their network.

Re: FTP in REXX

PostPosted: Tue Jun 01, 2010 9:41 pm
by Vinayak
Thank you for your suggestions...
I will definitely try out FileZila server.

Re: FTP in REXX

PostPosted: Tue Jun 01, 2010 9:45 pm
by enrico-sorichetti
strong advice :D
before trying anything get approval
installation of unauthorized software is cause for lawful termination

Re: FTP in REXX

PostPosted: Wed Jun 02, 2010 12:26 am
by dick scherrer
Hello,

I will definitely try out FileZila server.
If you do this at home, no big deal (depending on the files you want to download). If you do this at work without formal permission, you may find yourself looking for new employment.

It is completely irresponsible and unprofessional to introduce unapproved software into a corporate computing environment. . .