- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- FTP and OpenVMS command file symbols
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
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
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-20-2016 01:32 PM
07-20-2016 01:32 PM
FTP and OpenVMS command file symbols
Hello,
I am attempting to spawn a command file to use FTP to transfer a file. The spawn command spawns the string "@CommandFile FileToTransfer".
The statement in the command file "Sho Sym 'P1' lists "FileToTransfer". But the FTP command
Put 'P1' 'P1'
does not translate P1.
I am working with OpenVMS V8.3-1H1 on an Itanium HP Integrity 2660.
Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 02:41 PM
07-20-2016 02:41 PM
Re: FTP and OpenVMS command file symbols
If the following is what you are entering, it should work.
$ SPAWN @CommandFile FileToTransfer
The value "FileToTransfer" should be interpreted as P1 for the procedure. Note the following as a test that works:
===============
$ Cre test.com
$ Write sys$output "''p1'" ! note the double quote followed by two apostrophes before the p1
$exit ! CTRL-Z
$ spaw @test test
==================
If you are following the same pattern and it does not work, please post the exact procedure used.
Dan
The above should print out the word test on the terminal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 02:43 PM
07-20-2016 02:43 PM
Re: FTP and OpenVMS command file symbols
Missed the actual problem...
If you are attempting to translate P1 once you have invoked FTP, it wont work. To do what you want may take a extra step or two. Please describe EXACTLY what you are trying to do so we can provide a simple solution.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 03:10 PM
07-20-2016 03:10 PM
Re: FTP and OpenVMS command file symbols
> Please describe EXACTLY what you are trying to do [...]
Usually a good idea.
On VMS, scripting the simple FTP client may be difficult. In many
cases (especially single-file transfers), COPY /FTP can be much easier.
(But may be less efficient for multi-file transfers, using a new
connection for each one.)
help copy /ftp
For fetch ("get") operations, Wget can work well. There exists a
Wput program for doing "put" operations, and I may have an old one lying
around somewhere, but no bets on its condition. I don't use it, but
cURL could be worth a look, too.
http://antinode.info/dec/sw/wget.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 03:14 PM
07-20-2016 03:14 PM
Re: FTP and OpenVMS command file symbols
> I am working with OpenVMS V8.3-1H1 on an Itanium HP Integrity 2660.
For future reference, actual output from:
tcpip show version
can be more informative than any (less complete) summary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 03:28 PM
07-20-2016 03:28 PM
Re: FTP and OpenVMS command file symbols
It would have helped if you showed your command procedure - with sensitive information removed.
P1 is a DCL symbol (or variable), which is only substituted (or expanded) in the DCL context. When you enter the FTP command you can use DCL symbols for the command arguments/parameters. But once the FTP program runs and prompts you for an FTP command you are no longer in a DCL context. The PUT command is in the program context and there P1 has no definition (or value).
You need to let DCL substitute the symbols and write that to the input for FTP. FTP reads its input from SYS$INPUT or whatever you direct it to with /INPUT. So either redirect SYS$INPUT or use /INPUT.
Usually this is done by writing an input file - in the DCL context, so with the WRITE command. You can use the PIPE command and WRITE to write the SYS$INPUT for FTP, something like
$ pipe write sys$output "put ''p1' ''p1'" |ftp host/username=remote-username/password=remote-password
Obviously you need to have the remote username and the password in this command. I don't know how you did this in your command procedure and whether this is OK in your environment.
And then there are other tools for example COPY/FTP, which are easier to use from the DCL command line - that is with DCL symbols.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 12:33 PM
07-21-2016 12:33 PM
Re: FTP and OpenVMS command file symbols
The preferred command for network file transfers is scp or sftp with the "-B" option and with certificates in place of passwords (and an ssh and sftp intro), but — if complete data insecurity, well-known problems with network firewalls, and the exposure of server passwords don't dissuade you — then use the COPY /FTP command here.
DCL symbol substitution is only available at the $ DCL command prompt (either prompting interactively, or within a command line within a DCL command procedure beginning with $); when DCL is prompting and processing the command. Within a tool or a utility such as FTP or from from within the OpenVMS linker, no DCL symbol substitutions are honored.
Please also upgrade to HPE OpenVMS I64 V8.4 with current OpenVMS patches, or potentially to VSI OpenVMS I64 V8.4-2; to a more recent release