<?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: F$GETQUI problem in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455397#M42528</link>
    <description>Hakan, you're a genius, it worked a treat many thanks,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
    <pubDate>Wed, 08 Jul 2009 09:30:05 GMT</pubDate>
    <dc:creator>Dave Deacon-Holmes</dc:creator>
    <dc:date>2009-07-08T09:30:05Z</dc:date>
    <item>
      <title>F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455391#M42522</link>
      <description>Hi - I'm trying to write a script thus:&lt;BR /&gt;&lt;BR /&gt;@jobname batch$queue jobname&lt;BR /&gt;&lt;BR /&gt;giving a result of the entry number and the batch queue it's in.&lt;BR /&gt;F$GETQUI is making me tear my hair out, can anyone please assist?</description>
      <pubDate>Wed, 08 Jul 2009 08:33:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455391#M42522</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-08T08:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455392#M42523</link>
      <description>F$GETQUI is not an easy one.....&lt;BR /&gt;&lt;BR /&gt;Have you looked at the examples in&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/83final/9996/9996pro_101.html#green_20" target="_blank"&gt;http://h71000.www7.hp.com/doc/83final/9996/9996pro_101.html#green_20&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hakan&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Jul 2009 08:39:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455392#M42523</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2009-07-08T08:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455393#M42524</link>
      <description>Thanks Hakan,&lt;BR /&gt;Yes I've perused that but still unable to get satisfactory results.&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Wed, 08 Jul 2009 08:48:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455393#M42524</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-08T08:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455394#M42525</link>
      <description>I have just modified example #3 and got if to work.&lt;BR /&gt;&lt;BR /&gt;$  TEMP = F$GETQUI("")&lt;BR /&gt;$  QLOOP:&lt;BR /&gt;$  QNAME = F$GETQUI("DISPLAY_QUEUE","QUEUE_NAME","*")&lt;BR /&gt;$  IF QNAME .EQS. "" THEN EXIT&lt;BR /&gt;$  JLOOP:&lt;BR /&gt;$  NOACCESS = F$GETQUI("DISPLAY_JOB","JOB_INACCESSIBLE",,"ALL_JOBS")&lt;BR /&gt;$  IF NOACCESS .EQS. "TRUE" THEN GOTO JLOOP&lt;BR /&gt;$  IF NOACCESS .EQS. "" THEN GOTO QLOOP&lt;BR /&gt;$  JNAME := 'F$GETQUI("DISPLAY_JOB","JOB_NAME",,"FREEZE_CONTEXT")&lt;BR /&gt;$  ENUM   = F$GETQUI("DISPLAY_JOB","ENTRY_NUMBER",,"FREEZE_CONTEXT")&lt;BR /&gt;$  if JNAME .eqs. "''p1'"&lt;BR /&gt;$  then&lt;BR /&gt;$      WRITE SYS$OUTPUT "    JOB:  ", JNAME," QUEUE: ",QNAME," ENTRY:  ",ENUM&lt;BR /&gt;$  endif&lt;BR /&gt;$  GOTO JLOOP&lt;BR /&gt;&lt;BR /&gt;Hakan</description>
      <pubDate>Wed, 08 Jul 2009 09:02:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455394#M42525</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2009-07-08T09:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455395#M42526</link>
      <description>Some lines "wrapped" when I "cut &amp;amp; paste".&lt;BR /&gt;&lt;BR /&gt;Use it as:&lt;BR /&gt;&lt;BR /&gt;@COMMANDFILE 'jobname'&lt;BR /&gt;&lt;BR /&gt;Then you have to edit the code to suit your needs.&lt;BR /&gt;&lt;BR /&gt;Hakan</description>
      <pubDate>Wed, 08 Jul 2009 09:08:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455395#M42526</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2009-07-08T09:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455396#M42527</link>
      <description>Thanks again Hakan, but it's producing no results here.&lt;BR /&gt;I can see a batch queue with a job in it, but I can't run the job with the batch queue name and the jobname as params to give me the entry number of the jobname.</description>
      <pubDate>Wed, 08 Jul 2009 09:17:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455396#M42527</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-08T09:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455397#M42528</link>
      <description>Hakan, you're a genius, it worked a treat many thanks,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Wed, 08 Jul 2009 09:30:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455397#M42528</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-08T09:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455398#M42529</link>
      <description>Genius is a strong word, but Thanks !&lt;BR /&gt;I have some friends in the VMS-world that make me feel like a rockie.&lt;BR /&gt;&lt;BR /&gt;If you need help to modify the script, mail me.&lt;BR /&gt;&lt;BR /&gt;Hakan&lt;BR /&gt;hakan(dot)zanderau(at)ha-solutions(dot)se</description>
      <pubDate>Wed, 08 Jul 2009 09:37:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455398#M42529</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2009-07-08T09:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455399#M42530</link>
      <description>See also &lt;A href="http://dcl.openvms.org" target="_blank"&gt;http://dcl.openvms.org&lt;/A&gt;&lt;BR /&gt;where you will find several examples of using F$GETQUI</description>
      <pubDate>Wed, 08 Jul 2009 10:23:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455399#M42530</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2009-07-08T10:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455400#M42531</link>
      <description>My fingers typed without confirming with my brain.....&lt;BR /&gt;&lt;BR /&gt;The word is ROOKIE, not rockie ! ;-)&lt;BR /&gt;&lt;BR /&gt;Hakan</description>
      <pubDate>Wed, 08 Jul 2009 19:39:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455400#M42531</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2009-07-08T19:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455401#M42532</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;  You can look up jobs by job name with F$GETQUI, rather than walking through a queue. This will also support wildcards in the job name. &lt;BR /&gt;&lt;BR /&gt;$ jname=p1&lt;BR /&gt;$ Loop:&lt;BR /&gt;$   e=F$GETQUI("DISPLAY_ENTRY","ENTRY_NUMBER",jname,"WILDCARD")&lt;BR /&gt;$   IF e.NES.""&lt;BR /&gt;$   THEN&lt;BR /&gt;$     q=F$GETQUI("DISPLAY_ENTRY","QUEUE_NAME",e,"FREEZE_CONTEXT")&lt;BR /&gt;$     j=F$GETQUI("DISPLAY_ENTRY","JOB_NAME",e,"FREEZE_CONTEXT")&lt;BR /&gt;$     WRITE SYS$OUTPUT "Entry ''e' ''j' ''q'"&lt;BR /&gt;$     found="TRUE"&lt;BR /&gt;$     GOTO Loop&lt;BR /&gt;$   ENDIF&lt;BR /&gt;$ IF .NOT."''found'" THEN WRITE SYS$OUTPUT "No such entry ''jname'"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; To gather more information about the entries, add more "DISPLAY_ENTRY" calls with "FREEZE_CONTEXT". There are some DCL commands, like SHOW ENTRY which can interfere with your context. If you need to execute one, use SPAWN to run it in a subprocess.&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Jul 2009 21:21:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455401#M42532</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-07-08T21:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455402#M42533</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;John Gillings' suggestion to use DISPLAY_ENTRY is more efficient than DISPLAY_JOB, and if you are only interested in jobs running under the current username, it is probably the best way to go.&lt;BR /&gt;&lt;BR /&gt;However, it is limited to listing entries for the current username regardless of your privilege.&lt;BR /&gt;&lt;BR /&gt;It is a similar to the SHOW ENTRY DCL command, where the others are more like a SHOW QUEUE command with the output being filtered.  And unlike SHOW ENTRY, there is no way to specify the /USER you are interested in.  (If there is a way, it doesn't appear to be documented.)&lt;BR /&gt;&lt;BR /&gt;If you want something that will see batch jobs for all users, and you have access to the queues via privilege or ACL, then the DISPLAY_JOB method is more general, but with the added cost of having to sift through possibly many jobs that you are not interested in.&lt;BR /&gt;&lt;BR /&gt;Jon&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jul 2009 04:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455402#M42533</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-07-09T04:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455403#M42534</link>
      <description>I need to make comment.&lt;BR /&gt;&lt;BR /&gt;Dave answered that he had looked at the F$GETQUI examples, but couldn't make things work.&lt;BR /&gt;&lt;BR /&gt;I took example #3 and made small modifications to hint Dave how he could use it as a template (for his own needs.......)&lt;BR /&gt;&lt;BR /&gt;I could have written it more efficient, but that wasn't my goal.&lt;BR /&gt;&lt;BR /&gt;There are a million ways to skin a cat....efficient or not.&lt;BR /&gt;&lt;BR /&gt;Hakan</description>
      <pubDate>Thu, 09 Jul 2009 05:34:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455403#M42534</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2009-07-09T05:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455404#M42535</link>
      <description>&lt;!--!*#--&gt;Here is what I use.  It uses the DISPLAY_JOB method.  The parameters are not in the order you specified, but you can at least use this as a starting point.&lt;BR /&gt;&lt;BR /&gt;I got the original version of this from a note left by Jim Becker on DECUServe (Note VMS 3121.1)&lt;BR /&gt;&lt;BR /&gt;I have made some local nodifications, the primary one being that it will now return a comma seperated list of entry numbers instead of just the first one it finds that matches.  Also change the "help" displayed if no parameters were passed.  You will need to edit the location where you keep your copy of find_batch_job.com.&lt;BR /&gt;&lt;BR /&gt;I have included both versions in the attached find_batch_job.zip file.  This was created on VMS without the "-V" zip&lt;BR /&gt;&lt;BR /&gt;$ unzip -v find_batch_job &lt;BR /&gt;Get RMS defaults.  getjpi sts = %x00000001.&lt;BR /&gt;               Default: deq =      0, mbc =   0, mbf =   0.&lt;BR /&gt;Open callback.  ID = 1, deq =  16384, mbc = 127, mbf =   2.&lt;BR /&gt;Archive:  ROOT$USERS:[JON.SCRATCH]FIND_BATCH_JOB.ZIP;1&lt;BR /&gt; Length   Method    Size  Ratio   Date   Time   CRC-32    Name&lt;BR /&gt;--------  ------  ------- -----   ----   ----   ------    ----&lt;BR /&gt;    2883  Defl:N     1201  58%  11-01-00 23:45  3d68d93b  find_batch_job.com&lt;BR /&gt;    1678  Defl:N      745  56%  07-08-09 15:21  14b5e717  find_batch_job.com_original&lt;BR /&gt;--------          -------  ---                            -------&lt;BR /&gt;    4561             1946  57%                            2 files&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;The original version was copied and renamed to find_batch_job.com_original&lt;BR /&gt;&lt;BR /&gt;If you want the files to have standard text type and using the vms unzip program, use the following to unpack:&lt;BR /&gt;&lt;BR /&gt;$ unzip -a find_batch_job &lt;BR /&gt;&lt;BR /&gt;This hasn't been modified since 2000; if you are running 8.3, the job name matching could be modified to use f$match_wild to be a bit more general.  As is, it matches substrings so using a string like "T4" will match any job name containing T4.  If you don't like that behavior, change it.&lt;BR /&gt;&lt;BR /&gt;Some useful commands to use the find_entry symbol created by find_batch_job:&lt;BR /&gt;&lt;BR /&gt;$ @find_batch_job substring queue_wildcard&lt;BR /&gt;&lt;BR /&gt;$ show queue 'find_entry' ! this displays the entries that matched&lt;BR /&gt;&lt;BR /&gt;$ delete entry=('find_entry') ! this lets you delete multiple entries that match your criteria (I recomend using show entry 'find_entry' first)&lt;BR /&gt;&lt;BR /&gt;Example usage:&lt;BR /&gt;&lt;BR /&gt;$ @mgr:find_batch_job&lt;BR /&gt;Usage : @MGR:FIND_BATCH_JOB JOB_NAME [QUEUE]&lt;BR /&gt;P1 must give the string to find in the job name (case-insensitive).&lt;BR /&gt;P2 optional Queue(s) to search (any queue spec that's valid with f$getqui)&lt;BR /&gt;This will set the global SYMBOL FIND_ENTRY with list of entry numbers&lt;BR /&gt;$&lt;BR /&gt;$ @mgr:find_batch_job t4 ! when there are matching entries, the resulting find_entry symbol is displayed&lt;BR /&gt;  FIND_ENTRY == "1004705,83,1004706,74"&lt;BR /&gt;$&lt;BR /&gt;$ sho sym $status&lt;BR /&gt;  $STATUS == "%X00030001"&lt;BR /&gt;$&lt;BR /&gt;$ sho entry 'find_entry'&lt;BR /&gt;  Entry  Jobname         Username     Blocks  Status&lt;BR /&gt;  -----  -------         --------     ------  ------&lt;BR /&gt;1004705  T4$COLLECT      SYSTEM               Executing&lt;BR /&gt;         On available batch queue T4_BATCH$OMEGA&lt;BR /&gt;&lt;BR /&gt;     83  T4$COLLECT      SYSTEM               Holding until  8-JUL-2009 23:58:00.00&lt;BR /&gt;         On available batch queue T4_BATCH$OMEGA&lt;BR /&gt;&lt;BR /&gt;1004706  T4$COLLECT      SYSTEM               Executing&lt;BR /&gt;         On available batch queue T4_BATCH$SIGMA&lt;BR /&gt;&lt;BR /&gt;     74  T4$COLLECT      SYSTEM               Holding until  8-JUL-2009 23:58:00.00&lt;BR /&gt;         On available batch queue T4_BATCH$SIGMA&lt;BR /&gt;$&lt;BR /&gt;$ @mgr:find_batch_job asjfkl  ! this won't find anything, just to show what happens&lt;BR /&gt;$&lt;BR /&gt;$ sho sym $status&lt;BR /&gt;  $STATUS == "%X00000003"&lt;BR /&gt;$&lt;BR /&gt;$ sho sym find_entry&lt;BR /&gt;  FIND_ENTRY == ""&lt;BR /&gt;$</description>
      <pubDate>Thu, 09 Jul 2009 05:55:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455404#M42535</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-07-09T05:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: F$GETQUI problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455405#M42536</link>
      <description>The correct syntax to delete queue entries is:&lt;BR /&gt;&lt;BR /&gt;$ delete/entry=('find_entry')&lt;BR /&gt;&lt;BR /&gt;not $ delete entry=('find_entry')&lt;BR /&gt;&lt;BR /&gt;that my previous comment had.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Thu, 09 Jul 2009 06:58:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-getqui-problem/m-p/4455405#M42536</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-07-09T06:58:22Z</dc:date>
    </item>
  </channel>
</rss>

