- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- PIPE Cmd Issue
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
тАО02-15-2011 02:57 PM
тАО02-15-2011 02:57 PM
Question 1) Any way to get PIPE to append to a file?
Question 2) In trying to create an equivalent append function, I ran into something I don't understand.
This script works:
$ OPEN/APPEND OUT X.LOG
$ PIPE SHOW TIME > OUT
$ CLOSE OUT
But this script fails - why? (Only differnce is the pair of parenthesis)
$ OPEN/APPEND OUT X.LOG
$ PIPE ( SHOW TIME ) > OUT
%DCL-W-WRGSUBSHSYN, empty subshell or subshell is not separated from other command sequences by proper separators
$ CLOSE OUT
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2011 04:34 PM
тАО02-15-2011 04:34 PM
Re: PIPE Cmd Issue
By the way, pipe has more progress to do. In one line the command:
$ PIPE SHOW TIME >> X.LOG
does not work on OpenVMS V8.3-1H1 with HP I64VMS VMS831H1I_UPDATE V6.0. I do not know what with OpenVMS V8.4 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2011 05:08 PM
тАО02-15-2011 05:08 PM
Solution> Question 1) Any way to get PIPE to append to a file?
Sure, easy:
$ PIPE somecommand | APPEND SYS$PIPE somefile
Yes, it would have been nice if DCL had implemented this with ">>" like Unix, but they didn't.
> But this script fails - why? (Only
> differnce is the pair of parenthesis)
It's syntactically incorrect. The brackets delimit a subshell. Redirection "belongs" to a subshell, so it would need to be included inside the brackets to be syntactically correct.
Where DCL gets a bit ugly is in working out how to redirect output for a "whole" subshell. Consider:
$ PIPE (SHOW TIME ; SHOW PROCESS)
How to send the output for the whole subshell?
As you've shown, the obvious syntax is incorrect:
$ PIPE (SHOW TIME ; SHOW PROCESS) > myfile
I'd agree that this SHOULD work, but the way the syntax is designed it doesn't.
Changing to:
$ PIPE (SHOW TIME ; SHOW PROCESS > myfile)
but this only catches the output for the immediately preceeding command.
You can use COPY, like this:
$ PIPE (SHOW TIME ; SHOW PROCESS) | COPY SYS$PIPE myfile
The DCL PIPE command is only a bit like the Unix one. It has some very strange quirks and limitations.
For example, one of the primary motivations for pipe in Unix is to avoid temporary files and disk I/O, thereby making the script run faster. Although the DCL command avoids disk I/O, it's typically orders of magnitude SLOWER than the same sequence of commands using temporary files. It seems to have something to do with the way the PIPE processes are synchronised (the writer often ends up in RWMBX waiting for the next pipe stage. Resource waits are VERY expensive).
That's not to say PIPE isn't useful, just that it isn't a direct mapping from the Unix function. You should always test your assumptions and reasons for using it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2011 09:53 AM
тАО02-16-2011 09:53 AM
Re: PIPE Cmd Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2011 09:54 AM
тАО02-16-2011 09:54 AM