<?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: How to control execution time of DCL commands in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268081#M15353</link>
    <description>Re: What is FEXIT?&lt;BR /&gt;&lt;BR /&gt;I'd think it's a Forced Exit - so it'd be a STOP/IMAGE - rather than a DELPRC, a STOP.&lt;BR /&gt;&lt;BR /&gt;Since STOP/IMAGE wasn't implemented for a long time (pre 7.3-2?), everyone had his own image that called $FORCEX.&lt;BR /&gt;&lt;BR /&gt;$FORCEX would be the right choice IMHO, since the intent is to kill the blocking image runningin the master process, rather than the master process itself.&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
    <pubDate>Mon, 15 Sep 2008 09:07:54 GMT</pubDate>
    <dc:creator>Martin Vorlaender</dc:creator>
    <dc:date>2008-09-15T09:07:54Z</dc:date>
    <item>
      <title>How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268070#M15342</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am using Open VMS version 7.3-2.&lt;BR /&gt;I have a problem executing a command procedure with FTP commands in it. Sometimes the FTP command does not exit due to slow connections. In such a case  a manual CTRL+Y needs to be done but instead i want to abort and continue with the remaining execution automatically. How can i run the command procedure for certain duration of time so that it terminates irrespective of whether the FTP commands have been executed or not?&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Sep 2008 05:08:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268070#M15342</guid>
      <dc:creator>JVK_1</dc:creator>
      <dc:date>2008-09-12T05:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268071#M15343</link>
      <description>You may spawn individual commands or procedures using /NOWAIT, wait a specific amount of time in the master process and then continue and/or kill the subprocess.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Fri, 12 Sep 2008 05:19:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268071#M15343</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2008-09-12T05:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268072#M15344</link>
      <description>hi Kalle,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your suggestion. I'll try it out.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;VIjay.</description>
      <pubDate>Fri, 12 Sep 2008 07:13:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268072#M15344</guid>
      <dc:creator>JVK_1</dc:creator>
      <dc:date>2008-09-12T07:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268073#M15345</link>
      <description>Vijay,&lt;BR /&gt;&lt;BR /&gt;Another alternative is to use the batch queues, although there is no guarantee that the job starts immediately (the queue may be busy or stopped).&lt;BR /&gt;&lt;BR /&gt;In either case, be very careful that it is possible to tell the difference between a completed and uncompleted task. It is all too easy to find that ftp has transferred less than a complete file, and have later stages of the application become confused by processing a truncated file.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Fri, 12 Sep 2008 08:43:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268073#M15345</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2008-09-12T08:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268074#M15346</link>
      <description>Hi Robert, &lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the reply. Will try to implement.&lt;BR /&gt;I have another question. Can the same command procedure be invoked simultaneously by different processes passing different parameters (like FTP address and file names) ? something like multithreading..In such a case where each request to that command procedure is processed seperately (and simultaneously)  using NOWAIT will be easier.. &lt;BR /&gt;</description>
      <pubDate>Fri, 12 Sep 2008 08:52:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268074#M15346</guid>
      <dc:creator>JVK_1</dc:creator>
      <dc:date>2008-09-12T08:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268075#M15347</link>
      <description>sorry BOB for the wrong name used..mistake.. :) &lt;BR /&gt;</description>
      <pubDate>Fri, 12 Sep 2008 08:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268075#M15347</guid>
      <dc:creator>JVK_1</dc:creator>
      <dc:date>2008-09-12T08:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268076#M15348</link>
      <description>&amp;gt; [...] Can the same command procedure be&lt;BR /&gt;&amp;gt; invoked simultaneously by different&lt;BR /&gt;&amp;gt; processes [...]&lt;BR /&gt;&lt;BR /&gt;Normally, yes (unless your command procedure&lt;BR /&gt;does something inappropriate, like, say, use&lt;BR /&gt;a fixed name for a temporary file).&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] something like multithreading [...]&lt;BR /&gt;&lt;BR /&gt;More like multiprocessing.</description>
      <pubDate>Fri, 12 Sep 2008 11:41:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268076#M15348</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-09-12T11:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268077#M15349</link>
      <description>&lt;!--!*#--&gt;Here's a command file we use for this problem.  Right before the FTP command spawn this commmand file like this:&lt;BR /&gt;$ PID = F$GETJPI(0,PID)&lt;BR /&gt;$ SPAWN /PROCESS=SUB_'PID' -&lt;BR /&gt;@PROCESS_WATCHER 'PID' 00:05:00 &lt;BR /&gt;$ COPY/FTP ...&lt;BR /&gt;$ STATUS = $STATUS&lt;BR /&gt;$ STOP SUB_'PID'&lt;BR /&gt;$ IF (.NOT.STATUS) THEN ...&lt;BR /&gt;&lt;BR /&gt;$!----------PROCESS_WATCHER.COM--------&lt;BR /&gt;$ SET NOON&lt;BR /&gt;$ WATCHED_PID := 'P1'                   !Pass process ID in as P1&lt;BR /&gt;$ IF (WATCHED_PID .EQS. "") THEN WATCHED_PID = F$GETJPI(0,"MASTER_PID")&lt;BR /&gt;$ P2 = P2-"+"                           !Pass max wait time in as P2 w or w/o +&lt;BR /&gt;$ IF (P2 .EQS. "") THEN P2 = "00:02:00"&lt;BR /&gt;$ END_CTIME = F$CVTIME("+''P2'")&lt;BR /&gt;$ IF (.NOT.$STATUS) THEN END_CTIME = F$CVTIME("+00:02:00")&lt;BR /&gt;$ INTERVAL := 'P3'                      !Interval between checking for new I/O&lt;BR /&gt;$ IF (INTERVAL .EQS. "") THEN INTERNVAL := 00:00:30&lt;BR /&gt;$!----------------&lt;BR /&gt;$! PRIME DATA&lt;BR /&gt;$!-----------&lt;BR /&gt;$ CURBIO = F$GETJPI(WATCHED_PID,"BUFIO")&lt;BR /&gt;$ IF (.NOT.$STATUS) THEN EXIT&lt;BR /&gt;$ CURDIO = F$GETJPI(WATCHED_PID,"DIRIO")&lt;BR /&gt;$LOOP:&lt;BR /&gt;$   LASTBIO = CURBIO&lt;BR /&gt;$   LASTDIO = CURDIO&lt;BR /&gt;$   WAIT 'INTERVAL'&lt;BR /&gt;$!--------------------&lt;BR /&gt;$!  CHECK CURRENT INFO&lt;BR /&gt;$!--------------------&lt;BR /&gt;$   CURDIO = F$GETJPI(WATCHED_PID,"DIRIO")&lt;BR /&gt;$   CURBIO = F$GETJPI(WATCHED_PID,"BUFIO")&lt;BR /&gt;$   DIO = CURDIO - LASTDIO&lt;BR /&gt;$   BIO = CURBIO - LASTBIO&lt;BR /&gt;$! If no I/O occured or if this has been going on too long kill our master.&lt;BR /&gt;$   IF ( (DIO.GT.0 .OR. BIO.GT.0) .AND. -&lt;BR /&gt;          F$CVTIME() .LTS. END_CTIME ) THEN GOTO LOOP&lt;BR /&gt;$  FEXIT /ID='WATCHED_PID'&lt;BR /&gt;$  EXIT&lt;BR /&gt;$! this process is spawned from a command procedure that&lt;BR /&gt;$! is doing an inline COPY/FTP or another FTP process.&lt;BR /&gt;$! it could be any process really.&lt;BR /&gt;$! it will wait the time in P2 and FEXIT the process ID in P1&lt;BR /&gt;$! passed in as p2 if wait time is reached or no I/O in any P3 interval.&lt;BR /&gt;$!----------------------------------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Sep 2008 15:08:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268077#M15349</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2008-09-12T15:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268078#M15350</link>
      <description>Hi Jess,&lt;BR /&gt;&lt;BR /&gt;I have tried out your solution. Actually am new to DCL coding. &lt;BR /&gt;I'm getting the following error after executing the above command procedure.&lt;BR /&gt;&lt;BR /&gt;$  FEXIT /ID=00036D43&lt;BR /&gt;%DCL-W-IVVERB, unrecognized command verb - check validity and spelling&lt;BR /&gt; \FEXIT\&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for the help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Vijay.</description>
      <pubDate>Mon, 15 Sep 2008 04:52:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268078#M15350</guid>
      <dc:creator>JVK_1</dc:creator>
      <dc:date>2008-09-15T04:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268079#M15351</link>
      <description>Must be about the same ad STOP. Just replace FEXIT by STOP.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Mon, 15 Sep 2008 07:13:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268079#M15351</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-09-15T07:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268080#M15352</link>
      <description>Vijay,&lt;BR /&gt;&lt;BR /&gt;As I believe Steve has already commented, the answer is that multiple processes (and as a result, batch jobs) can execute the same command file simultaneously. This presumes that the command file does not use a fixed, fully qualified filename in a way that precludes simultaneous execution. &lt;BR /&gt;&lt;BR /&gt;If a command procedure uses a temporary file TEMPORARY.TMP, then two sessions on the same account will be trying to use the same file. A solution to this is to dynamically create file names using the F$GETJPI lexical function an the PID argument.&lt;BR /&gt;&lt;BR /&gt;The same is true for logical names outside of the process-context.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Mon, 15 Sep 2008 07:28:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268080#M15352</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2008-09-15T07:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268081#M15353</link>
      <description>Re: What is FEXIT?&lt;BR /&gt;&lt;BR /&gt;I'd think it's a Forced Exit - so it'd be a STOP/IMAGE - rather than a DELPRC, a STOP.&lt;BR /&gt;&lt;BR /&gt;Since STOP/IMAGE wasn't implemented for a long time (pre 7.3-2?), everyone had his own image that called $FORCEX.&lt;BR /&gt;&lt;BR /&gt;$FORCEX would be the right choice IMHO, since the intent is to kill the blocking image runningin the master process, rather than the master process itself.&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
      <pubDate>Mon, 15 Sep 2008 09:07:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268081#M15353</guid>
      <dc:creator>Martin Vorlaender</dc:creator>
      <dc:date>2008-09-15T09:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268082#M15354</link>
      <description>Not exiting on a timeout is either a bug in your procedure, or a bug in the ftp tool.  If you're not using COPY /FTP, start there.  The classic FTP utility interface is somewhat more difficult to script than is COPY /FTP.&lt;BR /&gt;&lt;BR /&gt;I don't remember off-hand if COPY /FTP has a qualifier with a timeout specifier; that would be a reasonable enhancement, if not.&lt;BR /&gt;&lt;BR /&gt;Is OpenVMS a prerequisite here or are add-ons permissible?  There are hosts that deal with this sort of file transfer operation better (either with built-in tools or with some widely-available add-on software) and that can run parallel and partial-restart ftp transfers.  (I'd expect Perl or another existing library has some options here, too.   LWP::UserAgent and Net::FTP from libnet come to mind.)  Here's a libnet set-up for ftp with a 100 second timeout specified.&lt;BR /&gt;&lt;BR /&gt;use Net::FTP;&lt;BR /&gt;my $ftp = new Net::FTP( hostname, Timeout =&amp;gt; 100 );&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2008 13:41:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268082#M15354</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-09-15T13:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268083#M15355</link>
      <description>Yes. "FEXIT" should be replaced with "STOP/IMAGE".  Sorry about that, I didn't notice that.  As Martin guessed FEXIT was our own implementation of STOP/IMAGE which was required before VMS 7.3.</description>
      <pubDate>Tue, 16 Sep 2008 14:59:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268083#M15355</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2008-09-16T14:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268084#M15356</link>
      <description>re: Bob:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;If a command procedure uses a temporary &lt;BR /&gt;&amp;gt;file TEMPORARY.TMP, then two sessions on &lt;BR /&gt;&amp;gt;the same account will be trying to use the &lt;BR /&gt;&amp;gt;same file. A solution to this is to &lt;BR /&gt;&amp;gt;dynamically create file names using the &lt;BR /&gt;&amp;gt;F$GETJPI lexical function an the PID &lt;BR /&gt;&amp;gt;argument.&lt;BR /&gt;&lt;BR /&gt;  Even better, if you're V7.3 or higher, use F$UNIQUE. &lt;BR /&gt;&lt;BR /&gt;$ myfile=F$PARSE(F$UNIQUE(), "SYS$SCRATCH:.TMP;")&lt;BR /&gt;&lt;BR /&gt;  Even better than that is to use PIPE and avoid temporary files altogether.</description>
      <pubDate>Tue, 23 Sep 2008 00:16:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268084#M15356</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-09-23T00:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268085#M15357</link>
      <description>No f$uniq on my 7.3.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 23 Sep 2008 07:43:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268085#M15357</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-09-23T07:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to control execution time of DCL commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268086#M15358</link>
      <description>Wim&lt;BR /&gt;&lt;BR /&gt;Let's say Vms 7.3-2 :-)</description>
      <pubDate>Tue, 23 Sep 2008 08:20:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-control-execution-time-of-dcl-commands/m-p/4268086#M15358</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2008-09-23T08:20:16Z</dc:date>
    </item>
  </channel>
</rss>

