IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP from HOST(z/OS) to PC(WindozeXP)


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 3:46 pm
Reply with quote

Hi - I am trying to download a file from the host to my PC.
(I have zero trouble the other way!)
The examples I have seen require a userid and password.
I guess this is my Windoze userid & pw but they don't seem to work (or I have something else wrong!)
I am on WindozeXP running PGP (which may be getting in the way?)
Here's the JCL...
Code:
//SE16661F JOB (DUMMY),'FTP2PC',MSGCLASS=H,                           
//         MSGLEVEL=(1,1),CLASS=A,TIME=(5,0),NOTIFY=&SYSUID           
//FTP      EXEC PGM=FTP,PARM=' 9.183.76.102 23 (EXIT=8'                     
//OUTPUT DD SYSOUT=*                                                   
//SYSPRINT DD SYSOUT=*                                                 
//INPUT DD *                                                           
uuuuuuuu
pppppppp                                                               
PUT USER.EXEC(CSV2ISPT) C:/TEMP/FTP2PC.TST                             
QUIT                                                                   
//   
which gives...
Code:

EZA1736I FTP 9.183.76.102 23 (EXIT=8                                           
EZA1450I IBM FTP CS V1R11                                                       
EZA1466I FTP: using TCPIP                                                       
EZA1772I FTP: EXIT has been set.                                               
EZA1554I Connecting to:   9.183.76.102 port: 23.                               
EZA2590E recv error from getNextReply - EDC8128I Connection refused. (errno2=0x769F0442)
EZA1475I Connection with 9.183.76.102 terminated                               
EZA1735I Std Return Code = 10000, Error Code = 0008

The IP address is from my IPCONFIG and the port is the same I use for PCOMM... Wromg? icon_rolleyes.gif
Any assistance appreciated.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 10, 2011 5:11 pm
Reply with quote

FTP is usually port 21. Port 23 is, I believe, usually reserved for SFTP. What do the configuration definitions in your desktop's FTP server say you should use?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 10, 2011 5:28 pm
Reply with quote

Quote:
Hi - I am trying to download a file from the host to my PC.
(I have zero trouble the other way!)
Unless your PC is running server software (and it is EXTREMELY RARE for any PC not a server to be running this software), you cannot connect from a mainframe (or any other external machine) to your PC using FTP. Your PC must be running FTP software that listens on the appropriate port (which is what a server does).
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 5:29 pm
Reply with quote

Thanks Kev - what I know about PCs you could fit on the back of a fag packet! What/where is my FTP Desktop Server? OR is this something I need to install?
I have a FileZilla but that has a blank in the Port field. icon_confused.gif
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 5:31 pm
Reply with quote

The same happens with Port 21 icon_eek.gif
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 5:34 pm
Reply with quote

In fact the same happens if I blank out the password &/ or the userid or if I remove those lines altogether. icon_cry.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 10, 2011 5:42 pm
Reply with quote

You'll need to install on your desktop and run Microsoft IIS or something else (Google windows ftp server to find out more) to provide the server side support on your PC. I STRONGLY recommend discussing this with your network support group before making any changes, as there are implications in converting your desktop to a server that can negatively impact (in some cases, severely) network performance.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 10, 2011 5:45 pm
Reply with quote

As has been mentioned, you are going to need an FTP server running on your PC.

That will have a userid and password to log-on and you should then be able to communicate with it.

The plain FileZilla that you have is to "talk" to an FTP server (on the Mainframe for instance, or anywhere else you can connect to). You need a bit that "listens" while it is running, "hears" the incoming on the appropriate port, and then allows log-on and acess to the PC disk through the standard FTP commands from the Mainframe.

You can do get/put from the Mainframe with the FileZilla you have, but you need FTP server software on the PC to get data to/from the PC if the Mainframe is doing the asking.

You on a Network at work? Talk to the people who support it. There probably is already an FTP server there which can give you access to a networked drive which you can then access from your PC.

If you are not networked, then you need software on the target PC. Presumably work-related, so get them to pay for a good one. I don't know what is good :-)
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Nov 10, 2011 6:48 pm
Reply with quote

Or you could try using the ISPF Work Station Agent. A small program running on your windows desktop listens for file transfers (either up or down) that you can initiate from the mainframe using ISPF services. Like most ISPF services, you can run it in batch.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 6:55 pm
Reply with quote

Thanks Bill, sound advice.
Network? Yes IBM does have the odd network. icon_lol.gif
There is a Network-Drive somewhere on this ThinkPad.
Haven't touched it for years so cannot remember how to use it but will dig into it.
It sounds like it's not going to be as easy as I anticipated.
Even if I get it to the network drive then I still need to get from there to the PC.
I may have to re-architect this and just generate the FTP stream on the host but actually run it on the PC end. icon_rolleyes.gif
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 7:02 pm
Reply with quote

don.leahy wrote:
... try using the ISPF Work Station Agent....

Thanks Don, yes I have WSA running and am currently "Connected".
What I was thinking of doing was to backup certain host libraries to my PC for portability from customer to customer.
The features there didn't seem to work for copying whole libraries, even with member masks.
On the other hand, I can now edit PC files using the ISPF Editor! Now, that's what I call progress!!! icon_wink.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Nov 10, 2011 7:58 pm
Reply with quote

Quote:
The features there didn't seem to work for copying whole libraries,


Use XMIT dummy.user DSN(...) OUTDSN(...) to copy your library into a sequential dataset, in Netdata format. You should be able to download the PS dataset using WSA.

Edit the PC file using WSA and copy in the OUTDSN.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 10, 2011 9:09 pm
Reply with quote

Hello,

Not exactly what you asked, but what works for me "everywhere" is to pull the library from the mainframe rather than trying to push it to the pc.

Create a new receiving directory for the library on the pc. Using the ftp client on the pc, position the mainframe "directory" to the library to download and all of the members can be downloaded in one click. Different clients have different tcp/ip products running, but i've found a usable ftp client on every one so far.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Nov 10, 2011 9:20 pm
Reply with quote

Steve Coalbran wrote:
don.leahy wrote:
... try using the ISPF Work Station Agent....

Thanks Don, yes I have WSA running and am currently "Connected".
What I was thinking of doing was to backup certain host libraries to my PC for portability from customer to customer.
The features there didn't seem to work for copying whole libraries, even with member masks.
On the other hand, I can now edit PC files using the ISPF Editor! Now, that's what I call progress!!! icon_wink.gif

You're quite right; I forgot that the FILEXFER service doesn't support member name masks. I think I was confused because in my last job I used SimpList, which has that ability. It must invoke FILEXFER for each member in the list, building the receiving file name based on the member name.

Sigh. If only ISPF 3.7.2 (or IPT) could do that.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Nov 10, 2011 9:33 pm
Reply with quote

You know the mainframe FTP address. Let's say it's 10.10.10.10.


Try going to a dos prompt and typing
Code:
FTP 10.10.10.10

Use your mainframe userid/password to log in

The type
Code:
get 'mainframe.dsn' pcfilename.txt


then type
Code:
bye


The mainframe file will be in the dos directory from which you started FTP.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Nov 10, 2011 9:37 pm
Reply with quote

don.leahy wrote:

You're quite right; I forgot that the FILEXFER service doesn't support member name masks. I think I was confused because in my last job I used SimpList, which has that ability. It must invoke FILEXFER for each member in the list, building the receiving file name based on the member name.

Sigh. If only ISPF 3.7.2 (or IPT) could do that.

Doh! I should have checked before posting. ISPF 3.7.2 *can* do that. All you have to do is put a wildcard in the workstation file name.
Code:
   Menu  RefList  RefMode  Help                                             
 ---------------------------------------------------------------------------
                  Download/Upload Data Set To/From Workstation             
 Command ===>                                                               
                                                                           
 ISPF Library:                                                             
    Project . . . DDST                                                     
    Group . . . . LEAHYD2  . . .          . . .          . . .             
    Type  . . . . EXEC                                                     
    Member  . . . *             (Blank or pattern for member selection list)
                                                                           
 Other Partitioned or Sequential Data Set:                                 
    Name  . . . . . . .                                                     
    Volume Serial . . .         (If not cataloged)                         
                                                                           
 Workstation File:                                                         
    File Name . . . . . P:\My Documents\*.txt                               
                                                                           
 Transfer Option                       Options                             
 1  1. Download to workstation            Generate statistics on upload     
    2. Upload from workstation         /  Transfer in text mode             
                                       /  Replace existing member/file     
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Fri Nov 11, 2011 2:41 pm
Reply with quote

Pedro wrote:
Use XMIT...

Thanks Pedro - yes, I do that elsewhere but I wanted it to be editable on PC too. icon_cry.gif

dick scherrer wrote:
... pull the library from the mainframe ...

Thanks Dick, exactly what I have decided to do.
I was hoping to run it as a batch job (we love JCL!) perhaps even on a scheduler! BUT... needs must? icon_cry.gif

don.leahy wrote:
...Sigh. If only ISPF 3.7.2 (or IPT) could do that...

Thanks Don,
I am talking with Mike Rotter on some IPT possibilities in the WS area, one which was deliberately ignored in IPT actually.
In an OLIST one should be able to use the " filename prefix to signify a WS file but it didn't work when I tried it.
The fix won't (probably) be in the next release of IPT [7.1 coming soon to a site near you!] icon_biggrin.gif

Ed Goodman wrote:
You know the mainframe FTP address...

Hi Ed Yes, I can FTP fine from PC->host, I do it all the time.
In fact I have a little app that runs in Rexx on PC to trap my ipaddr and FTP it as a tiny file to the host where I have modified the WSCON panel to read the file and load the ipaddr. icon_wink.gif
I even designed a little icon to start it... icon_razz.gif
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Fri Nov 11, 2011 2:45 pm
Reply with quote

don.leahy wrote:
... All you have to do is put a wildcard in the
workstation file name...

Hi Don,
I tried that and it only unloads the first member - for me anyhow. icon_sad.gif
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Sat Nov 12, 2011 9:07 am
Reply with quote

You read it too fast... My example GETS a file on the mainframe and brings it down to the PC. Which is what you said you were trying to do.

Just use a GET instead of a PUT.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Tue Nov 15, 2011 1:12 pm
Reply with quote

Ed Goodman wrote:
Just use a GET instead of a PUT.

Hi Ed - no "reading fast" is not my style - I'm more of a pedant! icon_wink.gif
I am trying to drive this from the host so PUT is what I want(ed) to do.

However, I think I've established I DO need to turn it around and generate a FTP command stream on the host and execute it on the PC.
This I have done before many times - once for a complete DataWarehouse! icon_eek.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 15, 2011 1:49 pm
Reply with quote

Quote:
The fix won't (probably) be in the next release of IPT [7.1 coming soon to a site near you!]

will it be available as a trial download like the previous one ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts access the last host command CLIST & REXX 2
No new posts File transfer from host with filler f... TSO/ISPF 15
No new posts DECIMAL HOST VARIABLE OR PARAMETER 14... DB2 7
This topic is locked: you cannot edit posts or make replies. Is there a way to restrict user login... All Other Mainframe Topics 11
No new posts DB2 9.1.0 not move values to Host-Var... DB2 8
Search our Forums:

Back to Top