Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FTP from HOST(z/OS) to PC(WindozeXP)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Steve Coalbran

New User


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

PostPosted: Thu Nov 10, 2011 3:46 pm    Post subject: FTP from HOST(z/OS) to PC(WindozeXP)
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

Moderator Team Head


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

PostPosted: Thu Nov 10, 2011 5:11 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 10, 2011 5:28 pm    Post subject:
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: 85
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 5:29 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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: 85
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 5:31 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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: 85
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 5:34 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 10, 2011 5:42 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Nov 10, 2011 5:45 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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: 642
Location: Whitby, ON, Canada

PostPosted: Thu Nov 10, 2011 6:48 pm    Post subject:
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: 85
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 6:55 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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: 85
Location: Stockholm, Sweden

PostPosted: Thu Nov 10, 2011 7:02 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Nov 10, 2011 7:58 pm    Post subject: Reply to: FTP from HOST(z/OS) to PC(WindozeXP)
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

Site Director


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

PostPosted: Thu Nov 10, 2011 9:09 pm    Post subject:
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: 642
Location: Whitby, ON, Canada

PostPosted: Thu Nov 10, 2011 9:20 pm    Post subject:
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    Post subject:
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: 642
Location: Whitby, ON, Canada

PostPosted: Thu Nov 10, 2011 9:37 pm    Post subject:
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: 85
Location: Stockholm, Sweden

PostPosted: Fri Nov 11, 2011 2:41 pm    Post subject:
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: 85
Location: Stockholm, Sweden

PostPosted: Fri Nov 11, 2011 2:45 pm    Post subject:
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    Post subject:
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: 85
Location: Stockholm, Sweden

PostPosted: Tue Nov 15, 2011 1:12 pm    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PC to Host for unicode file Tom Steiner TSO/ISPF 5 Mon May 16, 2016 10:38 pm
No new posts moving date from host variable to ora... rohanthengal DB2 5 Fri Jan 17, 2014 10:14 pm
No new posts UNUSABLE HOST VARIABLE pshongal DB2 4 Wed Jan 15, 2014 1:02 pm
No new posts host variable usage in query shankarm DB2 2 Wed Oct 30, 2013 6:00 pm
No new posts Single row update in DB2 Z/OS using a... jdeeponline DB2 3 Mon Mar 18, 2013 2:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us