<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Output from command procedure to both screen and log file in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147194#M14187</link>
    <description>Hi Steven&lt;BR /&gt;&lt;BR /&gt;here a example solution for your problem:&lt;BR /&gt;&lt;BR /&gt;$ ! TEE.COM - command procedure to display/log data flowing through&lt;BR /&gt;$ !           a pipeline&lt;BR /&gt;$ ! Usage: @TEE log-file&lt;BR /&gt;$&lt;BR /&gt;$ OPEN/WRITE tee_file 'P1'&lt;BR /&gt;$ LOOP:&lt;BR /&gt;$  READ/END_OF_FILE=clean_up  SYS$PIPE line&lt;BR /&gt;$  WRITE SYS$OUTPUT line ! Send it out to next stage of the pipeline&lt;BR /&gt;$  WRITE tee_file line   ! Log output to the log file&lt;BR /&gt;$  GOTO LOOP&lt;BR /&gt;$clean_up:&lt;BR /&gt;$  CLOSE tee_file&lt;BR /&gt;$  EXIT&lt;BR /&gt;&lt;BR /&gt;As an example, how to use it:&lt;BR /&gt;&lt;BR /&gt;$ PIPE dcl-command | @tee logfile-name&lt;BR /&gt;&lt;BR /&gt;$ PIPE DIR | @tee test.log&lt;BR /&gt;&lt;BR /&gt;Regrads&lt;BR /&gt;&lt;BR /&gt;Geni</description>
    <pubDate>Tue, 19 Feb 2008 15:03:43 GMT</pubDate>
    <dc:creator>Heinz W Genhart</dc:creator>
    <dc:date>2008-02-19T15:03:43Z</dc:date>
    <item>
      <title>Output from command procedure to both screen and log file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147191#M14184</link>
      <description>Hello everyone:&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Steven</description>
      <pubDate>Tue, 19 Feb 2008 14:23:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147191#M14184</guid>
      <dc:creator>Steven  Watson</dc:creator>
      <dc:date>2008-02-19T14:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Output from command procedure to both screen and log file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147192#M14185</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;Welcome to the HP TIRC Forum for OpenVMS.&lt;BR /&gt;&lt;BR /&gt;I tend to use terminalor emulators configured with 5000 or more scroll lines.&lt;BR /&gt;&lt;BR /&gt;For more procedural cases I use SET HOST /LOG&lt;BR /&gt;&lt;BR /&gt;But you probably are not interested in that.&lt;BR /&gt;&lt;BR /&gt;I suspect that $PIPE ... command ..  @TEE is what you need.&lt;BR /&gt;&lt;BR /&gt;Please check out $HELP PIPE examples&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Feb 2008 14:40:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147192#M14185</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-02-19T14:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Output from command procedure to both screen and log file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147193#M14186</link>
      <description>Hi Steven&lt;BR /&gt;&lt;BR /&gt;You can use pipe and the tee.com commandfile to solve this.&lt;BR /&gt;&lt;BR /&gt;See&lt;BR /&gt;&lt;BR /&gt;Help pipe examples&lt;BR /&gt;&lt;BR /&gt;Example 5 describes something very similar to your requirement.&lt;BR /&gt;&lt;BR /&gt;Hope that helps&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Geni</description>
      <pubDate>Tue, 19 Feb 2008 14:56:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147193#M14186</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2008-02-19T14:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Output from command procedure to both screen and log file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147194#M14187</link>
      <description>Hi Steven&lt;BR /&gt;&lt;BR /&gt;here a example solution for your problem:&lt;BR /&gt;&lt;BR /&gt;$ ! TEE.COM - command procedure to display/log data flowing through&lt;BR /&gt;$ !           a pipeline&lt;BR /&gt;$ ! Usage: @TEE log-file&lt;BR /&gt;$&lt;BR /&gt;$ OPEN/WRITE tee_file 'P1'&lt;BR /&gt;$ LOOP:&lt;BR /&gt;$  READ/END_OF_FILE=clean_up  SYS$PIPE line&lt;BR /&gt;$  WRITE SYS$OUTPUT line ! Send it out to next stage of the pipeline&lt;BR /&gt;$  WRITE tee_file line   ! Log output to the log file&lt;BR /&gt;$  GOTO LOOP&lt;BR /&gt;$clean_up:&lt;BR /&gt;$  CLOSE tee_file&lt;BR /&gt;$  EXIT&lt;BR /&gt;&lt;BR /&gt;As an example, how to use it:&lt;BR /&gt;&lt;BR /&gt;$ PIPE dcl-command | @tee logfile-name&lt;BR /&gt;&lt;BR /&gt;$ PIPE DIR | @tee test.log&lt;BR /&gt;&lt;BR /&gt;Regrads&lt;BR /&gt;&lt;BR /&gt;Geni</description>
      <pubDate>Tue, 19 Feb 2008 15:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147194#M14187</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2008-02-19T15:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Output from command procedure to both screen and log file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147195#M14188</link>
      <description>Thanks all, TEE.COM solved the problem for me.&lt;BR /&gt;&lt;BR /&gt;Steven</description>
      <pubDate>Tue, 19 Feb 2008 16:28:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/output-from-command-procedure-to-both-screen-and-log-file/m-p/4147195#M14188</guid>
      <dc:creator>Steven  Watson</dc:creator>
      <dc:date>2008-02-19T16:28:49Z</dc:date>
    </item>
  </channel>
</rss>

