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

File Transfer PC to Mainframe


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

New User


Joined: 15 May 2006
Posts: 3
Location: Pennsylvania, USA

PostPosted: Sat Jul 08, 2006 3:28 am
Reply with quote

Instead of transferring each module manually one at a time, someone told me that you could use ftp (file transfer protocol) to transfer a list of files from a PC to the Mainframe. The files on the PC are in text format going to a PDS on the mainframe. Using the file transfer feature of POWERTERM with an active TSO session. Thanks for any help.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jul 09, 2006 3:01 am
Reply with quote

Use can do this using native FTP. Open your command shell (usually from 'My Programs' or by run-->'cmd').

Enter FTP. provide user name and password.

Set the mainframe & pc directories using CD & LCD commands.

Use MPUT * to move all files from your PC to the mainframe.

O.
Back to top
View user's profile Send private message
rammf
Currently Banned

New User


Joined: 24 Jul 2005
Posts: 17
Location: chennai

PostPosted: Wed Aug 30, 2006 3:32 am
Reply with quote

Sorry,

I am NOT clear with ur explanation.

Can u explain it elaborate???


Thx in adv
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Aug 30, 2006 6:04 pm
Reply with quote

OK. Here's a sample process. A desktop folder (c:\temp) contains three files (#1, #2, #3) to be transmitted to a PDS on a z/OS mainframe:

I open a command prompt, and enter this information:

C:\>ftp myhost <= where myhost is the host FTP server name.

I get these responses:

Connected to myhost.##.##.###.
220-FTPB1 IBM FTP CS V1R7 at MYHOST.##.##.###, 12:14:35 on 2006-08-30.
220 Connection will close if idle for more than 5 minutes.
User (myhost.##.##.###:(none)): superk <= I enter my user id.

331 Send password please.
Password: <= I enter my password (the passord is masked).

230 SUPERK is logged on. Working directory is "SUPERK.".

ftp> cd PDS <= I change my working directory to the one I want to use.

250 The working directory "SUPERK.PDS" is a partitioned data set

ftp> lcd temp <= I now change my local directory to the \temp directory.

Local directory now C:\temp.

ftp> prompt interactive <= I enter the command to turn off interactive prompting.

Interactive mode Off .

ftp> mput #* <= I enter the mput command to "multiple put" all of the matching files.

200 Port request OK.
125 Storing data set SUPERK.PDS(#1)
250-Statistics have been updated for the PDS member that was transferred
250 Transfer completed successfully.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.
200 Port request OK.
125 Storing data set SUPERK.PDS(#2)
250-Statistics have been updated for the PDS member that was transferred
250 Transfer completed successfully.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.
200 Port request OK.
125 Storing data set SUPERK.PDS(#3)
250-Statistics have been updated for the PDS member that was transferred
250 Transfer completed successfully.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.

ftp> qui <= Now I end my FTP session.

221 Quit command received. Goodbye.
Back to top
View user's profile Send private message
warren

New User


Joined: 30 Aug 2006
Posts: 14
Location: Tampa, Florida

PostPosted: Thu Aug 31, 2006 11:08 pm
Reply with quote

That is an excellent example. But what if the files were sequential, instead of in a PDS? I have used XMIT's and RECEIVE's on these guys but only know how to do 1 file at a time, if the files are not in a PDS.
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 Aug 31, 2006 11:36 pm
Reply with quote

Doesn't matter. mput would work the same way, with the only difference being that, instead of creating members in a PDS, you'll be creating one dataset for each file sent. So, you have to make sure that the files you're sending have an appropriate naming convention (i.e. as always, stick with DOS 8.3 file naming standards).

For my example, I could just as easily enter:

ftp> cd myfiles
250 "SUPERK.MYFILES." is the working directory name prefix.
ftp> mput #*
200 Port request OK.
125 Storing data set SUPERK.MYFILES.#1
250 Transfer completed successfully.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.
200 Port request OK.
125 Storing data set SUPERK.MYFILES.#2
250 Transfer completed successfully.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.
200 Port request OK.
125 Storing data set SUPERK.MYFILES.#3
250 Transfer completed successfully.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.
ftp> qui
221 Quit command received. Goodbye.

to get 3 new datasets.
Back to top
View user's profile Send private message
warren

New User


Joined: 30 Aug 2006
Posts: 14
Location: Tampa, Florida

PostPosted: Thu Aug 31, 2006 11:56 pm
Reply with quote

Great, I will try this tomorrow! Currently ftp'ing 200 sequential files 1 at a time & it takes hours. Some of the files are of different lengths though, so a few quick questions: (1) should the files be separated into folders or directories by lrecl, before the 'mput' & then 1 mput for each folder or directory? (2) should matching files already be allocated & exist empty on the mainframe or will the ftp mput process create them as FB? I ask this because in moving PDS's I used XMIT and TSO RECEIVE with .xmi files for PDS's...but with sequential files, I'm told one must use .dat suffixes & I wonder if they automatically create sequential files on the mainframe.

Thanx!
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Dec 23, 2009 6:42 pm
Reply with quote

Hi,

I have a .bat file which connects to mainframe, after entering user id and password i am getting the following error

530 PASS command failed
Login Failed
ftp>

Even though the password is correct.

Pls advise how to give userid and password in the .bat file.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Dec 23, 2009 6:46 pm
Reply with quote

Code:
The topic has been resurrected after
...          3 year(s) - (months difference / 12 )
...          3 year(s) - (difference )
...         40 months
...       1209 days
...      29034 hours
...    1742086 minutes
...  104525160 seconds
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Dec 23, 2009 6:50 pm
Reply with quote

Google is your friend. Googling ftp windows batch script gives 3,750,000 hits, the very first of which is a Microsoft support answer on how to do exactly what you asked.
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Dec 23, 2009 7:23 pm
Reply with quote

I am trying like this... however failing.

ftp -s:up.txt

my up.txt is having

open server
<racfid>
<passwd>

Still login faliure...
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Dec 23, 2009 7:44 pm
Reply with quote

Check if you are using correct ip.
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: Wed Dec 23, 2009 7:47 pm
Reply with quote

Hello,

Talk with the mainframe security and/or network people. They can isolate exactly what is wrong as they can see exactly what is happeneing.

You haven't posted anything other than "it didn't work" which provides nothing to use to help you.

Maybe your local support people can get more complete info about the problem. . .

Suggest you try to do one file manually (to make sure it works) before trying to run a .bat file. . .
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Dec 23, 2009 7:50 pm
Reply with quote

That error can also happen if you don't have the correct RACF authority to use FTP.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Dec 23, 2009 7:52 pm
Reply with quote

I tested with -s:batch.file and it worked well for me. I suggest you contact your site support group for assistance -- they may need to look at the data going back and forth.
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Dec 23, 2009 9:21 pm
Reply with quote

Thanks for your immediate responses.

I got the IP address using ping <server name>

and I am using the same racf id and passwd which i used to login in mf.

Did system block FTP?
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Dec 23, 2009 9:23 pm
Reply with quote

Hi Robert,

Can you share your batch file pls.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Dec 23, 2009 9:27 pm
Reply with quote

Quote:
Did system block FTP?
This is a question only your site support group can answer -- and that is why I suggested you contact them. They may not have the FTP task running. They may have the FTP task running but using some non-standard ports. They may have the FTP task running on a different IP address than you expect. The FTP task could have started running at the last IPL but then been canceled, abended, or otherwise shut down. The network may be configured to refuse all FTP requests if not from a known IP address. And we can provide you with nothing about any of these possible issues -- only your site support people, who know the site and its configuration, can tell you exactly what you need to know.

The batch file is
Code:
open <DNS name>
<user id>
<password>
cd 'HIGH.LEVEL.QUALIFIER'
put <pcfile> <mainframe file>
quit
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Dec 23, 2009 9:42 pm
Reply with quote

Pls check the error which I am getting.
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Dec 23, 2009 9:46 pm
Reply with quote

here is the attachment
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: Wed Dec 23, 2009 10:03 pm
Reply with quote

Hello,

Which part of "talk with your site support" was not clear?

You continue to post "it didn't work" and that is not something we can use to help. . .

Someone on your system needs to confirm that you are going to a correct place, with a current id and the proper password. We can't help with that. . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Dec 23, 2009 10:04 pm
Reply with quote

Either your user id for SYN2.DEARBORN.FORD.COM is wrong, or the password you are providing is wrong (or maybe both). NTFTP1 is the name of the FTP daemon (batch job) running on the site. Everything appears correct so your problem must be site related. You must contact someone at SYN2.DEARBORN.FORD.COM for assistance as we've done all we can do.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
Search our Forums:

Back to Top