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
 

 

File Transfer PC to Mainframe
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
morrisjmm

New User


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

PostPosted: Sat Jul 08, 2006 3:28 am    Post subject: File Transfer PC to Mainframe
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: 2360
Location: Israel

PostPosted: Sun Jul 09, 2006 3:01 am    Post subject:
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    Post subject: Re: File Transfer PC to Mainframe
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

Moderator Team Head


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

PostPosted: Wed Aug 30, 2006 6:04 pm    Post subject: Re: File Transfer PC to Mainframe
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    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Aug 31, 2006 11:36 pm    Post subject: Re: File Transfer PC to Mainframe
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    Post subject:
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    Post subject: Reply to: File Transfer PC to Mainframe
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Dec 23, 2009 6:46 pm    Post subject: Reply to: File Transfer PC to Mainframe
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: 7904
Location: Bellevue, IA

PostPosted: Wed Dec 23, 2009 6:50 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Moderator Team Head


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

PostPosted: Wed Dec 23, 2009 7:50 pm    Post subject: Reply to: File Transfer PC to Mainframe
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: 7904
Location: Bellevue, IA

PostPosted: Wed Dec 23, 2009 7:52 pm    Post subject:
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    Post subject:
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    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Wed Dec 23, 2009 9:27 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

here is the attachment
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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