FTP in REXX



IBM's Command List programming language & Restructured Extended Executor

FTP in REXX

Postby Vinayak » Mon May 31, 2010 9:08 pm

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).
Vinayak
 
Posts: 18
Joined: Tue Feb 09, 2010 7:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FTP in REXX

Postby Robert Sample » Mon May 31, 2010 9:26 pm

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?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: FTP in REXX

Postby dick scherrer » Mon May 31, 2010 10:05 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: FTP in REXX

Postby Vinayak » Tue Jun 01, 2010 7:51 am

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.
Vinayak
 
Posts: 18
Joined: Tue Feb 09, 2010 7:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FTP in REXX

Postby dick scherrer » Tue Jun 01, 2010 8:33 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: FTP in REXX

Postby MrSpock » Tue Jun 01, 2010 2:55 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: FTP in REXX

Postby Robert Sample » Tue Jun 01, 2010 5:56 pm

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: FTP in REXX

Postby Vinayak » Tue Jun 01, 2010 9:41 pm

Thank you for your suggestions...
I will definitely try out FileZila server.
Vinayak
 
Posts: 18
Joined: Tue Feb 09, 2010 7:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FTP in REXX

Postby enrico-sorichetti » Tue Jun 01, 2010 9:45 pm

strong advice :D
before trying anything get approval
installation of unauthorized software is cause for lawful termination
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: FTP in REXX

Postby dick scherrer » Wed Jun 02, 2010 12:26 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post