<?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 f$getqui to return queue entry info in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857887#M32425</link>
    <description>I know if I read for a couple more hours I would get it..&lt;BR /&gt;I am attemping to watch a queued job with a script to watch for when the job ends.&lt;BR /&gt;&lt;BR /&gt;I know I am close.  &lt;BR /&gt;f$getqui("display_entry","entry_number","somenumber#", ?? )&lt;BR /&gt;&lt;BR /&gt;Basically once the entry is gone or returns null I would like to do some thing afterwards. &lt;BR /&gt;&lt;BR /&gt;Any tips ?&lt;BR /&gt;&lt;BR /&gt;Thanks !!!</description>
    <pubDate>Wed, 18 Aug 2004 13:16:25 GMT</pubDate>
    <dc:creator>Tim Nelson</dc:creator>
    <dc:date>2004-08-18T13:16:25Z</dc:date>
    <item>
      <title>f$getqui to return queue entry info</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857887#M32425</link>
      <description>I know if I read for a couple more hours I would get it..&lt;BR /&gt;I am attemping to watch a queued job with a script to watch for when the job ends.&lt;BR /&gt;&lt;BR /&gt;I know I am close.  &lt;BR /&gt;f$getqui("display_entry","entry_number","somenumber#", ?? )&lt;BR /&gt;&lt;BR /&gt;Basically once the entry is gone or returns null I would like to do some thing afterwards. &lt;BR /&gt;&lt;BR /&gt;Any tips ?&lt;BR /&gt;&lt;BR /&gt;Thanks !!!</description>
      <pubDate>Wed, 18 Aug 2004 13:16:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857887#M32425</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2004-08-18T13:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: f$getqui to return queue entry info</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857888#M32426</link>
      <description>The easiest way is to use the Synchronize command with a /Entry=entry_number.  This will cause the command procedure to wait until the entry completes and then continue with the next statement in the procedure.  It does require delete access to the specified entry number.</description>
      <pubDate>Wed, 18 Aug 2004 15:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857888#M32426</guid>
      <dc:creator>Dale A. Marcy</dc:creator>
      <dc:date>2004-08-18T15:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: f$getqui to return queue entry info</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857889#M32427</link>
      <description>Tim,&lt;BR /&gt;&lt;BR /&gt;  By default a batch entry is removed when the job completes. If the entry doesn't exist, your F$GETQUI will return null (which can't be distinguished from using a bogus entry number). If the job is submitted with /RETAIN=ALWAYS (or the queue is set to retain jobs) the entry will remain until explicitly deleted.&lt;BR /&gt;&lt;BR /&gt;F$GETQUI("DISPLAY_ENTRY","JOB_STATUS",entry)&lt;BR /&gt;&lt;BR /&gt;will return the state of the job. For example, a holding job will return 4&lt;BR /&gt;(QUI$M_JOB_HOLDING), en executing job will return 2 (QUI$M_JOB_EXECUTING) and a completed job will return 128 (QUI$M_JOB_RETAINED). See the $GETQUI documentation for other possible states. Values (hex) can be found with:&lt;BR /&gt;&lt;BR /&gt;$ PIPE LIBRARY/EXTRACT=$QUIDEF/OUT=SYS$OUTPUT SYS$SHARE:STARLET/MACRO | SEARCH SYS$PIPE QUI$M_JOB_ | SORT SYS$PIPE SYS$OUTPUT&lt;BR /&gt;&lt;BR /&gt;If you want to wait for a specific job to complete, use SYNCHRONIZE as Dale has suggested. Note that SYNCHRONIZE against a retained job will return immediately. Also note that the $STATUS of SYNCHRONIZE will be the completion status of the job, unless the entry number doesn't exist, in which case it will be JBC-E-NOSUCHENT.&lt;BR /&gt;&lt;BR /&gt;Also note that the symbol $ENTRY gets set to the entry number following a PRINT or SUBMIT command. It's much easier to use $ENTRY than search for your job later. For example:&lt;BR /&gt;&lt;BR /&gt;$ SUBMIT/RETAIN=ALWAYS MYBATCHJOB&lt;BR /&gt;$ myentry=$entry&lt;BR /&gt;$!&lt;BR /&gt;$! some stuff...&lt;BR /&gt;$!&lt;BR /&gt;$ SET NOON&lt;BR /&gt;$ SYNCHRONIZE/ENTRY='myentry'&lt;BR /&gt;$ mystatus=$STATUS&lt;BR /&gt;$ DELETE/ENTRY='myentry'&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Aug 2004 18:12:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857889#M32427</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2004-08-18T18:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: f$getqui to return queue entry info</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857890#M32428</link>
      <description>Thanks to all who responded</description>
      <pubDate>Thu, 21 Jul 2005 11:38:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-to-return-queue-entry-info/m-p/4857890#M32428</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2005-07-21T11:38:41Z</dc:date>
    </item>
  </channel>
</rss>

