Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logging onto an IBM mainframe

Status
Not open for further replies.

wagnj1

Programmer
Jul 21, 2003
154
CA
hi! I'm having a problem getting a unix script to log onto an IBM mainframe. the script looks like this:

#!/bin/ksh
ftp -n -i mainframename <<!
user mainframeaccountname password

can I have the username and password on the one line? or do I need to indicate somehow the the password is actually the password?
 
do "man ftp", and look into the .netrc file. This will do an auto login for you.
 
thanks for the reply. I don't actually have access to UNIX on my system, I'm the mainframe guy. but I need to know if the script should be:
user username
pass password

or

user username password

or something like that.
 
user username password is the classical way.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
well this is fairly messed up then. Both the username and password in the script are correct and in the classical format. but the error report keeps saying that the PASS command failed, you must first logon with USER and PASS. any ideas?
 
This has been addressed elsewhere before (I think), but here is our way to doing a similar function:
Script:

ftp -n <ftpcrmsndcmd 2>&1 >./log/ftpcrmsndlog.$$

Contents of ftpcrmsndcmd file:

prompt
open 123.123.123.123
user bubba mypassword
binary
cd /incoming
mput *
bye

While this is a bit different than what you started with, it might give you a start.

Using .netrc should also work, but I haven't played with it personally for about 10 years.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top