<?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: Problem with run /detach /output file in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786603#M76430</link>
    <description>Hi Philippe,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Must I understand that there is no &lt;BR /&gt;&amp;gt; solution based on the operating &lt;BR /&gt;&amp;gt; system making it possible to close &lt;BR /&gt;&amp;gt; and reopen the file without stopping &lt;BR /&gt;&amp;gt; the process?&lt;BR /&gt;&lt;BR /&gt;Your question made me curious as to why this useful utility didn't already exist. My best guess is that it is because Knuckles and Guido have ordained that "Anyone who logs information to sys$output should be sleepin' with the fishes!".&lt;BR /&gt;&lt;BR /&gt;But if we can entertain the idea of a log-file-cycler a little longer: -&lt;BR /&gt;&lt;BR /&gt;. The RMS bits seem pretty straight-forward.&lt;BR /&gt;. The fact that DCL's need to keep track of what's going on could be the problem.&lt;BR /&gt;. The VMS code in LOGICAL.LIS suggests it should be as simple as: -&lt;BR /&gt;&lt;BR /&gt;dcl$open_output&lt;BR /&gt;dcl$close_old_output&lt;BR /&gt;dcl$create_output&lt;BR /&gt;&lt;BR /&gt;Then again, I don't know how DCL hangs together and have never written a Supervisor mode RTL in my life so what do I know?&lt;BR /&gt;&lt;BR /&gt;But don't dispair! I know a man who can and if he get's a chance in the next few days he'll have a look.&lt;BR /&gt;&lt;BR /&gt;Even if it was doable, would you just close the log-file and have it look like someone $STOP/IDed the process? Are you happy to output some sort of "Log-switch in progress" message which may be far from the last data written to the log? What's written at the beginning of the New log?&lt;BR /&gt;&lt;BR /&gt;Still, if there was truly scope for fruitful discussion on the subject then I'm sure that one of the DCL gurus at HP with nothin' to do, and all day to do it in, would have contributed already.&lt;BR /&gt;&lt;BR /&gt;Regards Richard Maher</description>
    <pubDate>Tue, 16 May 2006 05:50:04 GMT</pubDate>
    <dc:creator>Richard J Maher</dc:creator>
    <dc:date>2006-05-16T05:50:04Z</dc:date>
    <item>
      <title>Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786589#M76416</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;In my application, i'm starting all my process with such a following script :&lt;BR /&gt;&lt;BR /&gt;$ run /detach -&lt;BR /&gt;/AUTHORIZE -&lt;BR /&gt;/INPUT   = $diskloc:[commande]run_gest_contexte.com -&lt;BR /&gt;/OUTPUT  = $fic_trace:gest_contexte.dat -&lt;BR /&gt;/PROCESS = GASP_gest_cont -&lt;BR /&gt;/NORESOURCE_WAIT-&lt;BR /&gt;/priority  = 6 -&lt;BR /&gt;/working_set      = 8192 -&lt;BR /&gt;/maximum_working_set  = 32768 -&lt;BR /&gt;/extent           = 32768 -&lt;BR /&gt;SYS$SYSTEM:LOGINOUT.EXE&lt;BR /&gt;&lt;BR /&gt;Problem : (i use printf in program for tracing) this file is ever growing...&lt;BR /&gt;&lt;BR /&gt;Is it possible to switch to a new output file without restarting the process ? (for example weekly or when reaching a certain size...)&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for all...&lt;BR /&gt;&lt;BR /&gt;Philippe</description>
      <pubDate>Thu, 11 May 2006 08:00:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786589#M76416</guid>
      <dc:creator>berlioz</dc:creator>
      <dc:date>2006-05-11T08:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786590#M76417</link>
      <description>Philippe,&lt;BR /&gt;&lt;BR /&gt;you could use the /OUTPUT for errormessages and open/write/reopen the 'real' output file from your application, either on a regurlar basis, or on a trigger.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Thu, 11 May 2006 09:19:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786590#M76417</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-05-11T09:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786591#M76418</link>
      <description>kalle,&lt;BR /&gt;&lt;BR /&gt;I know that it's the good way.&lt;BR /&gt;&lt;BR /&gt;But, in fact, it is a very old application (in exploitation since 1995) that I support.  &lt;BR /&gt;&lt;BR /&gt;Before making modifications of source code, I seek a simple solution (based on the operating system for exemple)</description>
      <pubDate>Thu, 11 May 2006 09:48:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786591#M76418</guid>
      <dc:creator>berlioz</dc:creator>
      <dc:date>2006-05-11T09:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786592#M76419</link>
      <description>You didn't specify the VMS version, but V8.2 introduced CREATE/MAILBOX. So you could&lt;BR /&gt;- create a mailbox before starting the detached process&lt;BR /&gt;- specifiy this mailbox as /OUTPUT&lt;BR /&gt;- start another detached process which reads the mailbox and writes to an output file, which can be repopened at your will&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Thu, 11 May 2006 10:05:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786592#M76419</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-05-11T10:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786593#M76420</link>
      <description>Best would be to change the application to periodically reopen the file. Previous versions could then be backed up and deleted as required.&lt;BR /&gt;&lt;BR /&gt;A mailbox and a reader program would work. Before VMS V8.2 to create the mailbox use&lt;BR /&gt;MBU &lt;BR /&gt;&lt;A href="ftp://ftp.process.com/vms-freeware/fileserv/mbu.zip" target="_blank"&gt;ftp://ftp.process.com/vms-freeware/fileserv/mbu.zip&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or other program of your choice.&lt;BR /&gt;</description>
      <pubDate>Thu, 11 May 2006 10:22:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786593#M76420</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2006-05-11T10:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786594#M76421</link>
      <description>the VMS version is 7.3-2</description>
      <pubDate>Thu, 11 May 2006 10:28:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786594#M76421</guid>
      <dc:creator>berlioz</dc:creator>
      <dc:date>2006-05-11T10:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786595#M76422</link>
      <description>Must I understand that there is no solution based on the operating system making it possible to close and reopen the file without stopping the process?</description>
      <pubDate>Fri, 12 May 2006 02:17:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786595#M76422</guid>
      <dc:creator>berlioz</dc:creator>
      <dc:date>2006-05-12T02:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786596#M76423</link>
      <description>Philippe,&lt;BR /&gt;&lt;BR /&gt;that is correct. There is no way for the operating system to force closing/opening the file. &lt;BR /&gt;&lt;BR /&gt;It will be necessary to amend the application is some way to achieve the result which you desire.&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Fri, 12 May 2006 02:43:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786596#M76423</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2006-05-12T02:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786597#M76424</link>
      <description>May be a simple solution is to check in your com file/.exe if a certain logical name (name it gest_exit for example, defined /System/exec), when it has a certain value (reopen), closes and re-opens the logfile, and deassigns the logical name. So when you need it, you define this logical. &lt;BR /&gt;&lt;BR /&gt;Of course it needs a minor modification.</description>
      <pubDate>Fri, 12 May 2006 02:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786597#M76424</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2006-05-12T02:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786598#M76425</link>
      <description>hi Philippe&lt;BR /&gt;&lt;BR /&gt;I think, if you have the source of the application, it would not be to difficult to do some changes to renew the&lt;BR /&gt;logfile on a dayli base.&lt;BR /&gt;&lt;BR /&gt;If You dont want to change the source, then you could use the solution with the mailbox. Then you do not have to change&lt;BR /&gt;the source of the application, but the way you start it. A possibility to do this is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$! create mailbox&lt;BR /&gt;$! --------------&lt;BR /&gt;$ 'command_to_create_mailbox'&lt;BR /&gt;$!&lt;BR /&gt;$! start the application process&lt;BR /&gt;$! -----------------------------&lt;BR /&gt;$ run /detach -&lt;BR /&gt;/AUTHORIZE -&lt;BR /&gt;/INPUT = $diskloc:[commande]run_gest_contexte.com -&lt;BR /&gt;/OUTPUT = MBAxxx: -&lt;BR /&gt;/PROCESS = GASP_gest_cont -&lt;BR /&gt;/NORESOURCE_WAIT-&lt;BR /&gt;/priority = 6 -&lt;BR /&gt;/working_set = 8192 -&lt;BR /&gt;/maximum_working_set = 32768 -&lt;BR /&gt;/extent = 32768 -&lt;BR /&gt;SYS$SYSTEM:LOGINOUT.EXE&lt;BR /&gt;$!&lt;BR /&gt;$! open the mailbox for read&lt;BR /&gt;$! -------------------------&lt;BR /&gt;$ OPEN/READ mbx MBAxx:&lt;BR /&gt;$!&lt;BR /&gt;$! write to a logfile. renew it dayli&lt;BR /&gt;$! ----------------------------------&lt;BR /&gt;$log_loop:&lt;BR /&gt;$ logfile="application_output_''F$CVTIME("","Comparison","DATE").log"&lt;BR /&gt;$ IF F$SEARCH(logfile) .EQS. "" CREATE 'logfile'&lt;BR /&gt;$ OPEN/APPEND log 'logfile'&lt;BR /&gt;$ READ/END_OF_FILE=clean_up mbx record&lt;BR /&gt;$ WRITE log record&lt;BR /&gt;$ CLOSE log&lt;BR /&gt;$ GOTO log_loop&lt;BR /&gt;$clean_up:&lt;BR /&gt;$ close mbx&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You could also combine this solution with the suggestion of labadie and use a logical name to reopen the logfile&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Heinz</description>
      <pubDate>Fri, 12 May 2006 04:00:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786598#M76425</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2006-05-12T04:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786599#M76426</link>
      <description>Hi Berlioz,&lt;BR /&gt;   Another simple way of getting around it is to reset the execution of the program every week. You can add in your main COM file a validation or condition to check when to stop and start again your program.&lt;BR /&gt;&lt;BR /&gt;$!Check if it's sunday and if the time is between 12:00 and 12:04 ...&lt;BR /&gt;$!  .... if it is, resubmit job to clear process IO count, reset logs, etc. etc. etc.&lt;BR /&gt;$ if f$cvtime("TODAY",,"WEEKDAY") .eqs. "Sunday"&lt;BR /&gt;$   then&lt;BR /&gt;$     if f$extract(11,5,f$cvtime()) .ges. "12:00"&lt;BR /&gt;$       then&lt;BR /&gt;$         if f$extract(11,5,f$cvtime()) .les. "12:04" then GOTO RESUBMIT&lt;BR /&gt;$     endif&lt;BR /&gt;$ endif&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope it will help.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ronald&lt;BR /&gt;</description>
      <pubDate>Mon, 15 May 2006 04:01:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786599#M76426</guid>
      <dc:creator>IFX_1</dc:creator>
      <dc:date>2006-05-15T04:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786600#M76427</link>
      <description>Note that if you use the mailbox and the mailbox reader aborts, the mailbox write process will go into RWMBX until something reads the mailbox.&lt;BR /&gt;If the reader is too slow, it might delay the writer process.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Mon, 15 May 2006 10:28:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786600#M76427</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-05-15T10:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786601#M76428</link>
      <description>As an aside, this part of your RUN command is ignored:&lt;BR /&gt;/working_set = 8192 -&lt;BR /&gt;/maximum_working_set = 32768 -&lt;BR /&gt;/extent = 32768&lt;BR /&gt;&lt;BR /&gt;Since you are using RUN /AUTHORIZE the working set and other quotas are obtained from the SYSUAF account settings instead of RUN command qualifiers.</description>
      <pubDate>Mon, 15 May 2006 17:04:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786601#M76428</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2006-05-15T17:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786602#M76429</link>
      <description>If your command file diskloc:[commande]run_gest_contexte.com just RUNs an .EXE which nornally doesn't exit, and if there is a time of day/week when it is safe to restart this program, then I would recommend...&lt;BR /&gt;&lt;BR /&gt;* Set up another process such as a periodic batch job that does a STOP/IMAGE for your application process.  STOP /IMAGE will abort the program (force exit) but not kill the process.  RMS rundown occurs and exit handlers run.&lt;BR /&gt;&lt;BR /&gt;* Modify the command file to check for when the program has been aborted like this:&lt;BR /&gt;&lt;BR /&gt;$ RUN application.exe&lt;BR /&gt;$ STATUS = $STATUS&lt;BR /&gt;$ IF F$MESSAGE(STATUS,"IDENT").EQS."FORCEX"&lt;BR /&gt;$ THEN&lt;BR /&gt;$   SET PROCESS/NAME=OLD_'F$GETJPI(0,"PID")'&lt;BR /&gt;$   RUN/detach/authorize !Full run command&lt;BR /&gt;$   EXIT  !Old process dies here&lt;BR /&gt;$ ENDIF</description>
      <pubDate>Mon, 15 May 2006 17:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786602#M76429</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2006-05-15T17:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with run /detach /output file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786603#M76430</link>
      <description>Hi Philippe,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Must I understand that there is no &lt;BR /&gt;&amp;gt; solution based on the operating &lt;BR /&gt;&amp;gt; system making it possible to close &lt;BR /&gt;&amp;gt; and reopen the file without stopping &lt;BR /&gt;&amp;gt; the process?&lt;BR /&gt;&lt;BR /&gt;Your question made me curious as to why this useful utility didn't already exist. My best guess is that it is because Knuckles and Guido have ordained that "Anyone who logs information to sys$output should be sleepin' with the fishes!".&lt;BR /&gt;&lt;BR /&gt;But if we can entertain the idea of a log-file-cycler a little longer: -&lt;BR /&gt;&lt;BR /&gt;. The RMS bits seem pretty straight-forward.&lt;BR /&gt;. The fact that DCL's need to keep track of what's going on could be the problem.&lt;BR /&gt;. The VMS code in LOGICAL.LIS suggests it should be as simple as: -&lt;BR /&gt;&lt;BR /&gt;dcl$open_output&lt;BR /&gt;dcl$close_old_output&lt;BR /&gt;dcl$create_output&lt;BR /&gt;&lt;BR /&gt;Then again, I don't know how DCL hangs together and have never written a Supervisor mode RTL in my life so what do I know?&lt;BR /&gt;&lt;BR /&gt;But don't dispair! I know a man who can and if he get's a chance in the next few days he'll have a look.&lt;BR /&gt;&lt;BR /&gt;Even if it was doable, would you just close the log-file and have it look like someone $STOP/IDed the process? Are you happy to output some sort of "Log-switch in progress" message which may be far from the last data written to the log? What's written at the beginning of the New log?&lt;BR /&gt;&lt;BR /&gt;Still, if there was truly scope for fruitful discussion on the subject then I'm sure that one of the DCL gurus at HP with nothin' to do, and all day to do it in, would have contributed already.&lt;BR /&gt;&lt;BR /&gt;Regards Richard Maher</description>
      <pubDate>Tue, 16 May 2006 05:50:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-with-run-detach-output-file/m-p/3786603#M76430</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-05-16T05:50:04Z</dc:date>
    </item>
  </channel>
</rss>

