Computing.Net > Forums > OpenVMS > Auto login from vms/ucx to linux box

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Auto login from vms/ucx to linux box

Reply to Message Icon

Name: Jeff
Date: May 21, 2002 at 06:46:06 Pacific
Comment:

I am using two boxes. One OpenVMS V7.1, Runing UCX and the other is Linux Mandrake release 7.1b. What I would like to do is set up an ftp that auto logs in from the VMS to the Linux and puts my files in my dir. I am able to do it from VMS running Multinet, but not from VMS running UCX. Any ideas?



Sponsored Link
Ads by Google

Response Number 1
Name: ME
Date: May 25, 2002 at 09:07:10 Pacific
Reply:

You don't write what you're doing. But this works for me (UCX 4.2) :

-----------
$ define /user sys$command sys$input
$ ftp mylinux.mysite.my /user="myuser"
mypassword
set type binary
cd mydirectory
put myfile.exe
close
quit
-----------


0

Response Number 2
Name: premjith Nair
Date: June 3, 2002 at 23:24:00 Pacific
Reply:

You may use the following for transferring multiple files from a directory. Include the directory name in file "myfile.dat"

Modify to your requirements.
==============================

$!Program Name : FTP_UNIX.com [VMS To Unix Transfer]
$!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ set message/notext/nofacility/noidentification/noseverity
$ myfile = "myfile.dat;"
$ count = 0
$ err_cnt = 0
$ nofile = 0
$ sep = ","
$ log_file == "ftp_unix.log"
$ trf_file == "temp.com"
$ today= f$cvtime("",,"date")
$ fday= f$extract(8,2,today)
$ fmon = f$extract(5,2,today)
$ fyear = f$extract(2,2,(f$cvtime("today","absolute","year")))
$ file_date=fday+fmon+fyear
$ write sys$output "


FTP to Unix Server in Progress..."
$ write sys$output " "
$ open/read local_list 'myfile
$ read_loop:
$ on control_y then goto end
$ on warning then gosub error
$ on error then gosub error
$ flcount=0
$ read/end_of_file=end local_list each_record
$ local_name =f$edit(f$element(0,sep,each_record),"upcase")
$ if f$extract(0,1,local_name) .eqs. "!" then goto read_loop
$ if "''local_name'" .eqs. "" then goto end
$ local_dir = "$disk123:[agents.''local_name']"
$ remote_dir = "/pub/''local_name'/download"
$ all_file = local_dir+"*"+file_date
$ all_ja_file = local_dir+"j*"+file_date+".inv"
$ all_pr_file = local_dir+"r*"+file_date+".inv"
$ cum_ja_file = "J_''local_name'_ALLLINES_''file_date'.txt"
$ cum_pr_file = "R_''local_name'_ALLLINES_''file_date'.txt"
$ copy/nolog 'all_ja_file sys$login:'cum_ja_file;
$ copy/nolog 'all_pr_file sys$login:'cum_pr_file;
$!
$ open/write ftpout 'trf_file
$ write ftpout "$set noon"
$ write ftpout "$define sys$output ''log_file';"
$ write ftpout "$ftp"
$ write ftpout "enable parse"
$ write ftpout "open 10.1.100.24"
$ write ftpout "user abc"
$ write ftpout "abcd945"
$ write ftpout "cd ''remote_dir'"
$ write ftpout "put sys$login:''cum_ja_file' ''cum_ja_file'"
$ write ftpout "put sys$login:''cum_pr_file' ''cum_pr_file'"
$file_loop:
$ local_file = f$search("''all_file'.inv")
$ if "''local_file'" .eqs. "" then goto process
$ file_name = f$parse(local_file,,,"NAME")
$ flcount =flcount+1
$ write ftpout "put ''local_file' ''file_name'.txt"
$ goto file_loop
$process:
$ write ftpout "quit"
$ write ftpout "$exit"
$ close ftpout
$ deassign sys$output
$ set on
$ @'trf_file
$ if flcount .ge. 1
$ then
$ count=count+1
$ w ''count'=> ''local_name' Transferred "
$ else
$ nofile=nofile+1
$ w No file to Transfer for ''local_name "
$ endif
$ delete/nolog 'trf_file;*
$ delete/nolog 'cum_ja_file;*
$ delete/nolog 'cum_pr_file;*
$ purge/nolog 'log_file
$ goto read_loop
$end:
$ write sys$output " "
$ writ ''count' Agent's Files Transferred"
$ write sys$output " "
$ writ ''nofile' Agent's had No file "
$ if err_cnt .ge. 1
$ then
$ write sys$output " "
$ writ ''err_cnt' Failed Transfer[s],Check OPER Mail"
$ endif
$ close local_list
$ set message/text/facility/identification/severity
$ set on
$ exit
$!
$error:
$mail nl: oper /subject="FTP to Unix Server for Agent ''local_name' Failed"
$err_cnt=err_cnt+1
$write sys$output " "
$read/pro Agent ''local_name' Transfer not Ok,Press Return" sys$command xx
$write sys$output " "
$if f$trnlnm("ftpout") .nes. "" then close ftpout
$set noon
$return


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Rally migration tool Outlook Express is freaki...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: Auto login from vms/ucx to linux box

sftp from vms to linux www.computing.net/answers/openvms/sftp-from-vms-to-linux/493.html

openvms to linux/windows NT migration www.computing.net/answers/openvms/openvms-to-linuxwindows-nt-migration/18.html

GUI VMS application on Linux workstation www.computing.net/answers/openvms/gui-vms-application-on-linux-workstation/54.html