- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: DCL script to FTP files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 02:28 AM
тАО07-30-2010 02:28 AM
DCL script to FTP files
I wonder if anyone could help me out with modifying a small DCL script which FTPs some files to a server?
We have 8 VAXs which seem to use different FTPs. Some use FTP & some use MULTI FTP as the command to get into the FTP prompt
There is a script which writes commands to a temp file ftpjob.tmp, executes ftpjob.tmp and then deletes it
$ open/write ftpjob ftpjob.tmp
$ wr ftpjob "$ftp 10.37.2.23 /username=ftp_to_share",-
"/password=""1password23"""
$ wr ftpjob "cd /VAX/OUT/SHARE/"
$ wr ftpjob "put ''source_file' ''target_file'"
$ wr ftpjob "bye"
$ wr ftpjob "$exit"
$ close ftpjob
$ @ftpjob.tmp
$! delete ftpjob.tmp;
This works fine on the systems which FTP is accessed by typing FTP
However, on the systems where Multi FTP is typed to access FTP (see below) I get Login or Password incorrect errors.
$ open/write ftpjob ftpjob.tmp
$ wr ftpjob "$multi ftp 10.37.2.23 /username=ftp_legacy_uk_prd",-
"/password=""1pwd4PRDUK"""
$ wr ftpjob "cd /VAX/OUT/APOLLO/"
$ wr ftpjob "put ''source_file' ''target_file'"
$ wr ftpjob "bye"
$ wr ftpjob "$exit"
$ close ftpjob
$ @ftpjob.tmp
$! delete ftpjob.tmp;
If I manually enter the commands at the prompt I can get in, not really sure what I'm doing wrong here..
Any help gratefully received
Thanks
BM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 03:11 AM
тАО07-30-2010 03:11 AM
Re: DCL script to FTP files
Please note that I do not have multiftp so I can not test this.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 03:37 AM
тАО07-30-2010 03:37 AM
Re: DCL script to FTP files
> FTPs. [...]
It might be useful to know something about
the software here (more than "VAXs").
Is this "MULTI FTP" related to MultiNet?
The DEC/Compaq/HP IP networking package
should identify itself using a command like:
tcpip show version
or:
ucx show version
depending on its age. MultiNet probably has
something similar, but you may be able to
find that about as fas as I could. ("HELP"?)
At a minimum:
WRITE SYS$OUTPUT F$GETSYI( "VERSION")
Other potentially interesting things:
Did this stuff ever work? If so, what has
changed recently?
Are you publishing real passwords here?
> If I manually enter the commands [...]
And what you enter manually is really what's
in those procedures? As usual, a transcript
showing actual commands with their actual
output can be more helpful than vague
descriptions and interpretations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 04:01 AM
тАО07-30-2010 04:01 AM
Re: DCL script to FTP files
If this box is V6.2 or later, you're doing this the hard way.
Use the COPY /FTP command that's available in DCL.
It does symbol substitution.
It does passwords.
It does default directories.
It's trivially easy to use in DCL command procedures, and to substitute symbols within.
COPY /FTP /ASCII -
fromhost"user pass"::"/where/ever.txt" -
localfilename.txt
See the manuals, or see:
http://labs.hoffmanlabs.com/node/136
The more secure version of this operation, which avoids passwords, uses sftp. (There's unfortunately no DCL verb for that, though.) See the sftp documentation or see:
http://labs.hoffmanlabs.com/node/1118
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 05:19 AM
тАО07-30-2010 05:19 AM
Re: DCL script to FTP files
I'm getting somewhere with it
If I issue the following at a command prompt I can get in
Multi ftp 10.37.1.23 /username=username /password="""password""" (I think it needs these quotes to be in the right case)
ATSR22 MultiNet FTP user process V4.0(118)
Connection opened (Assuming 8-bit connections)
<
[Attempting to log in as ******]
However I'm trying to run this procedure within a script so that it writes the commands to ftpjob.tmp and then executes it(it's all within an existing procedure which sends lots of reports out)
$ open/write ftpjob ftpjob.tmp
$ wr ftpjob "$Multi ftp 10.37.1.23 /username= username /password="""password""""
$ wr ftpjob "cd /VAX/OUT/SHARE/"
$ wr ftpjob "put ben.txt ben.txt"
$ wr ftpjob "bye"
$ wr ftpjob "$exit"
$ close ftpjob
$ @ftpjob.tmp
$! delete ftpjob.tmp;
$ exit
I'm thinking that somehow it's either submitting the password in the incorrect casing or there's a space missing.
if try for example
Multi ftp 10.37.1.23 /username=******** /password="""****"""
then it'll connect
but if I
open/write benjob benjob.tmp
wr benjob "multi ftp 10.37.1.23 /username= ftp_legacy_uk_prd /password="""1pwd4PRDUK""" "
close benjob
then look inside the benjob.tmp file I have
multi ftp 10.37.1.23 /username= ftp_legacy_uk_prd /password="1PWD4PRDUK"
It has to be something small that I'm missing here I'd imagine
BM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 05:30 AM
тАО07-30-2010 05:30 AM
Re: DCL script to FTP files
If yes, then it must be quoted on the DCL command as well, like the password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 05:36 AM
тАО07-30-2010 05:36 AM
Re: DCL script to FTP files
It's got to be something to do with how the commands get written into the temp file first and then read back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 05:36 AM
тАО07-30-2010 05:36 AM
Re: DCL script to FTP files
Just get rid of the password.
Why?
At least that's being honest about the security here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 05:38 AM
тАО07-30-2010 05:38 AM
Re: DCL script to FTP files
ATSR19 MultiNet FTP user process V4.0(118)
Connection opened (Assuming 8-bit connections)
ucx show version
DEC TCP/IP Services for OpenVMS VAX Version V4.0 - ECO Level 2
on a VAX 4000-600A running OpenVMS V7.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 05:44 AM
тАО07-30-2010 05:44 AM
Re: DCL script to FTP files
this is what you are currently doing
Write Outfile "Password="""Test""""
this appears in OutFile as
Password="TEST" (Not what you want!)
Try
Write Outfile "Password=""Test"""
(i.e. one less doublequote around the password string)
Should give;
Password="Test"
HTH
Dave