- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Output from command procedure to both screen and l...
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-19-2008 06:23 AM
тАО02-19-2008 06:23 AM
How do I get a command procedure to output to both the screen and a log file at the same time? Using /OUTPUT only goes to the log file and nothing is displayed on the screen.
Thanks,
Steven
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 06:40 AM
тАО02-19-2008 06:40 AM
Re: Output from command procedure to both screen and log file
Welcome to the HP TIRC Forum for OpenVMS.
I tend to use terminalor emulators configured with 5000 or more scroll lines.
For more procedural cases I use SET HOST /LOG
But you probably are not interested in that.
I suspect that $PIPE ... command .. @TEE is what you need.
Please check out $HELP PIPE examples
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 06:56 AM
тАО02-19-2008 06:56 AM
Re: Output from command procedure to both screen and log file
You can use pipe and the tee.com commandfile to solve this.
See
Help pipe examples
Example 5 describes something very similar to your requirement.
Hope that helps
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 07:03 AM
тАО02-19-2008 07:03 AM
Solutionhere a example solution for your problem:
$ ! TEE.COM - command procedure to display/log data flowing through
$ ! a pipeline
$ ! Usage: @TEE log-file
$
$ OPEN/WRITE tee_file 'P1'
$ LOOP:
$ READ/END_OF_FILE=clean_up SYS$PIPE line
$ WRITE SYS$OUTPUT line ! Send it out to next stage of the pipeline
$ WRITE tee_file line ! Log output to the log file
$ GOTO LOOP
$clean_up:
$ CLOSE tee_file
$ EXIT
As an example, how to use it:
$ PIPE dcl-command | @tee logfile-name
$ PIPE DIR | @tee test.log
Regrads
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 08:28 AM
тАО02-19-2008 08:28 AM
Re: Output from command procedure to both screen and log file
Steven