<?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: Retained batch job in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325980#M47458</link>
    <description>We use this quite often to check printer queues and whether they are working successfully or not.&lt;BR /&gt;We do a SET queue_name /RETAIN to check if prints are going through successfully. The only problem is that it gets forgotten for a few months and then you have quite a few entries sitting on the queue !&lt;BR /&gt;Do a SET queue_name /NORETAIN to stop the event.&lt;BR /&gt;Yours Terry.</description>
    <pubDate>Mon, 12 Jul 2004 03:37:31 GMT</pubDate>
    <dc:creator>Terry Yeomans</dc:creator>
    <dc:date>2004-07-12T03:37:31Z</dc:date>
    <item>
      <title>Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325972#M47450</link>
      <description>Why is the following job retained ?&lt;BR /&gt;&lt;BR /&gt;SALPV1/MGRWVW&amp;gt;sh que ARB$BATCH_SALPV1/all/fu&lt;BR /&gt;Batch queue ARB$BATCH_SALPV1, idle, on SALPV1::&lt;BR /&gt;  /AUTOSTART_ON=(SALPV1::) /BASE_PRIORITY=3 /JOB_LIMIT=10&lt;BR /&gt;  /OWNER=[SYSMGR,SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S) /RETAIN=ERROR&lt;BR /&gt;&lt;BR /&gt;  Entry  Jobname         Username             Status&lt;BR /&gt;  -----  -------         --------             ------&lt;BR /&gt;    388  DSM_TRANSFERT_ADHNOS4&lt;BR /&gt;                         DSMMGR               Retained on completion&lt;BR /&gt;         Submitted  7-JUL-2004 09:29:13.76 /KEEP /PARAM=("ADHVAXNT",&lt;BR /&gt;         "SRV_DOWNLOAD:[DSMPGR]ADHNOS4.VAX","ADHNOS4.VAX") /NOPRINT&lt;BR /&gt;         /PRIORITY=100&lt;BR /&gt;         File: _DSA1:[SYSAPP.FAST]FAST_MULTI_TRF.COM;2&lt;BR /&gt;         Completed  7-JUL-2004 09:29:23.69 on queue ARB$BATCH_SALPV1&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jul 2004 00:52:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325972#M47450</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2004-07-08T00:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325973#M47451</link>
      <description>Wim,&lt;BR /&gt;&lt;BR /&gt;Have you looked in the logfile of this job (most likely named FAST_MULTI_TRF.LOG) what error could have occurred? If that dosn't tell you the reason, you can take a look in accounting and lok for this batchjob, it may hold the exit status (and so a reason for retainment)&lt;BR /&gt;&lt;BR /&gt;Willem</description>
      <pubDate>Thu, 08 Jul 2004 01:00:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325973#M47451</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2004-07-08T01:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325974#M47452</link>
      <description>Willem,&lt;BR /&gt;&lt;BR /&gt;The exit status was 0, meaning a warning.&lt;BR /&gt;&lt;BR /&gt;In the log file no message was show (and exit 0 was done as last statement).&lt;BR /&gt;&lt;BR /&gt;But I asked retained on ERROR (which means "no success", so retain=warning would have been a better syntax). Why is it retaining the job with "retained on completion" instead of "retained on error".&lt;BR /&gt;&lt;BR /&gt;I tested it with "dir a.b" where a.b doesn't exist. The job ended in "retained on error" for a warning.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Thu, 08 Jul 2004 01:20:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325974#M47452</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2004-07-08T01:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325975#M47453</link>
      <description>Wim,&lt;BR /&gt;&lt;BR /&gt;Just checked in HELP SET QUE/RETAIN (7.3-1) on options:&lt;BR /&gt;&lt;BR /&gt;ERROR   Holds in the queue only jobs that complete unsuccessfully.&lt;BR /&gt;&lt;BR /&gt;Since WARNING is not successfull either (not an odd value), it will cause a job be retained. To prevent this, you should handle that within the commandprocedure.&lt;BR /&gt;&lt;BR /&gt;I must admit this seems a bit odd compared with the DCL ON &lt;SEVERITY&gt; statement where this dicstinction in severity is possible. You would expect otherwise. Yet another DCL enhancement? &lt;BR /&gt;&lt;BR /&gt;Willem&lt;BR /&gt;&lt;BR /&gt;&lt;/SEVERITY&gt;</description>
      <pubDate>Thu, 08 Jul 2004 03:58:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325975#M47453</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2004-07-08T03:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325976#M47454</link>
      <description>Willem,&lt;BR /&gt;&lt;BR /&gt;But why is it "retained on completion" in 1 case, "retained on error" in the other. Both for warnings.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Thu, 08 Jul 2004 04:01:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325976#M47454</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2004-07-08T04:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325977#M47455</link>
      <description>Matter of terminology, be aware these are two distict issues!&lt;BR /&gt;&lt;BR /&gt;Your first output is about the queue itself. This tells the definition, and the specified /RETAIN=ERROR tells that any job that completes in any non-succesfull status is to be retained - on completion, that is. /RETAIN=ALL will retain any job, regardless it's exit status.&lt;BR /&gt;So: this is a QUEUE DEFINITION issue&lt;BR /&gt;&lt;BR /&gt;Your second output is about the job itself. It has completed. Normally, jobs will be removed on completion unless specified otherwise. Here, it says the job is retained on copletion. Obviously - since that has been specified, since the job exited with an even (=unsuccessfull) status, as specified in the queue definition.&lt;BR /&gt;So: this is a JOB STATUS issue&lt;BR /&gt;&lt;BR /&gt;Retainment happens AT JOB END.&lt;BR /&gt;SHO QUEUE gives you the queue definition, that include some attributes the queuemanager will apply at job completion.&lt;BR /&gt;It will also show you information of all jobs on that queue that are scheduled (waiting), put on hold and active, and the ones where queuemanager has applied completion actions: /RETAIN, for instance.&lt;BR /&gt;&lt;BR /&gt;If a job appears "Retained on completion", you should look at the queue definition.&lt;BR /&gt;You can specify /RETAIN=ALL at the queue definition level, causing all jobs to be retined, regardless it's exit status.&lt;BR /&gt;However, did you specify /RETAIN=ERROR, you _know_ something went wrong. If completed successfully, the job would not appear after completion (unless it has been submitted with the /RETAIN option.)&lt;BR /&gt;&lt;BR /&gt;In your case: something went wrong with this one....&lt;BR /&gt;&lt;BR /&gt;HTE&lt;BR /&gt;&lt;BR /&gt;Willem</description>
      <pubDate>Thu, 08 Jul 2004 04:51:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325977#M47455</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2004-07-08T04:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325978#M47456</link>
      <description>Willem,&lt;BR /&gt;&lt;BR /&gt;Not clear ...&lt;BR /&gt;&lt;BR /&gt;Why is it "retained on completion" in 1 case (exit 0), "retained on error" in the other.(exit %x10019290). Both for are warnings.&lt;BR /&gt;&lt;BR /&gt;I didn't use submit/retain and the queue always has retain=error.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Thu, 08 Jul 2004 06:26:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325978#M47456</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2004-07-08T06:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325979#M47457</link>
      <description>Wim,&lt;BR /&gt;&lt;BR /&gt;I may have misunderstood. Do you express:&lt;BR /&gt;&lt;BR /&gt;Case 1:&lt;BR /&gt;$ exit 0 --&amp;gt; SHO QUE gives "retained on completion"&lt;BR /&gt;&lt;BR /&gt;Case 2:&lt;BR /&gt;$ exit %x10019290 --&amp;gt; SHO QUE gives "retained on error"&lt;BR /&gt;&lt;BR /&gt;Weird, indeed.&lt;BR /&gt;Just a wild guess: What's in the code?&lt;BR /&gt;Indeed - that _makes_ a difference.&lt;BR /&gt;&lt;BR /&gt;1. create a queue:&lt;BR /&gt;init/queue/batch/retain=error/start test&lt;BR /&gt;&lt;BR /&gt;2. created minor command procedure named x.com:&lt;BR /&gt;&lt;BR /&gt;$ case=p1&lt;BR /&gt;$ if case .eq. 1&lt;BR /&gt;$ then&lt;BR /&gt;$ S=0        ! force to some value in DCL&lt;BR /&gt;$ else       ! this is case 2&lt;BR /&gt;$ dir a.b    ! which doesn't exits&lt;BR /&gt;$ s=$status&lt;BR /&gt;$ endif&lt;BR /&gt;$ exit 's'&lt;BR /&gt;&lt;BR /&gt;3. submitted this twice to this queue, with different params:&lt;BR /&gt;&lt;BR /&gt;$ submit/que=test x.com/param="1"&lt;BR /&gt;$ submit/que=test x.com/param="2"&lt;BR /&gt;&lt;BR /&gt;4. Show status:&lt;BR /&gt;$ sho que/full test&lt;BR /&gt;Batch queue TEST, idle, on DIANA::&lt;BR /&gt;  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S)&lt;BR /&gt;  /RETAIN=ERROR&lt;BR /&gt;&lt;BR /&gt;  Entry  Jobname         Username             Status&lt;BR /&gt;  -----  -------         --------             ------&lt;BR /&gt;    265  x               SYSTEM               Retained on completion&lt;BR /&gt;         Submitted  8-JUL-2004 21:39:23.27 /PARAM=("1") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;1&lt;BR /&gt;         Completed  8-JUL-2004 21:39:26.06 on queue TEST&lt;BR /&gt;&lt;BR /&gt;    267  x               SYSTEM               Retained on error&lt;BR /&gt;       %RMS-W-FNF, file not found&lt;BR /&gt;         Submitted  8-JUL-2004 21:39:26.90 /PARAM=("2") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;1&lt;BR /&gt;         Completed  8-JUL-2004 21:39:29.51 on queue TEST&lt;BR /&gt;&lt;BR /&gt;Someone@hp.com to explain....&lt;BR /&gt;&lt;BR /&gt;What I can think of: by explicitly setting S to some value doesn't trigger severity internally, but an unsuccesful DIR would chnage $STATUS - causing the error flag to be raised. EXIT 0 would be signalled as an unsuccesfull end - causing the job to be retained, but since no error has been flagged, it won't be "on error", merely "on found exit status". EXIT based on $STATUS (in whatever way) would have 'error' flagged, hence 'retained on error'.&lt;BR /&gt;Just to prove it:&lt;BR /&gt;&lt;BR /&gt;In stead of&lt;BR /&gt;$ S=$STATUS&lt;BR /&gt;&lt;BR /&gt;enter&lt;BR /&gt;$S=0&lt;BR /&gt;&lt;BR /&gt;Result after submissions:&lt;BR /&gt;&lt;BR /&gt;$ sho que/full test&lt;BR /&gt;Batch queue TEST, idle, on DIANA::&lt;BR /&gt;  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S)&lt;BR /&gt;  /RETAIN=ERROR&lt;BR /&gt;&lt;BR /&gt;  Entry  Jobname         Username             Status&lt;BR /&gt;  -----  -------         --------             ------&lt;BR /&gt;    273  x               SYSTEM               Retained on completion&lt;BR /&gt;         Submitted  8-JUL-2004 21:54:24.26 /PARAM=("1") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;3&lt;BR /&gt;         Completed  8-JUL-2004 21:54:27.74 on queue TEST&lt;BR /&gt;&lt;BR /&gt;    274  x               SYSTEM               Retained on completion&lt;BR /&gt;         Submitted  8-JUL-2004 21:54:26.67 /PARAM=("2") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;3&lt;BR /&gt;         Completed  8-JUL-2004 21:54:30.33 on queue TEST&lt;BR /&gt;&lt;BR /&gt;now assign  some big value:&lt;BR /&gt;$ S=%X10010000&lt;BR /&gt;&lt;BR /&gt;and the result is:&lt;BR /&gt;&lt;BR /&gt;$ sho que/full test&lt;BR /&gt;Batch queue TEST, idle, on DIANA::&lt;BR /&gt;  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S)&lt;BR /&gt;  /RETAIN=ERROR&lt;BR /&gt;&lt;BR /&gt;  Entry  Jobname         Username             Status&lt;BR /&gt;  -----  -------         --------             ------&lt;BR /&gt;    281  x               SYSTEM               Retained on error&lt;BR /&gt;       %RMS-W-NORMAL, normal successful completion&lt;BR /&gt;         Submitted  8-JUL-2004 21:58:12.14 /PARAM=("2") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;5&lt;BR /&gt;         Completed  8-JUL-2004 21:58:14.70 on queue TEST&lt;BR /&gt;&lt;BR /&gt;    283  x               SYSTEM               Retained on completion&lt;BR /&gt;         Submitted  8-JUL-2004 21:58:16.74 /PARAM=("1") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;5&lt;BR /&gt;         Completed  8-JUL-2004 21:58:19.13 on queue TEST&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;(Mind the opposite order - sorry)&lt;BR /&gt;It seems to me that the presence of some facility-number in the message makes the difference: yes it does: set both assignments of S to this value (error or no error) and the result is:&lt;BR /&gt;&lt;BR /&gt;$ sho que/full test&lt;BR /&gt;Batch queue TEST, idle, on DIANA::&lt;BR /&gt;  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S)&lt;BR /&gt;  /RETAIN=ERROR&lt;BR /&gt;&lt;BR /&gt;  Entry  Jobname         Username             Status&lt;BR /&gt;  -----  -------         --------             ------&lt;BR /&gt;    285  x               SYSTEM               Retained on error&lt;BR /&gt;       %RMS-W-NORMAL, normal successful completion&lt;BR /&gt;         Submitted  8-JUL-2004 22:02:06.82 /PARAM=("1") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;6&lt;BR /&gt;         Completed  8-JUL-2004 22:02:09.22 on queue TEST&lt;BR /&gt;&lt;BR /&gt;    287  x               SYSTEM               Retained on error&lt;BR /&gt;       %RMS-W-NORMAL, normal successful completion&lt;BR /&gt;         Submitted  8-JUL-2004 22:02:09.22 /PARAM=("2") /PRIORITY=100&lt;BR /&gt;         File: _$1$DKA0:[SYS0.SYSMGR]x.com;6&lt;BR /&gt;         Completed  8-JUL-2004 22:02:11.75 on queue TEST&lt;BR /&gt;&lt;BR /&gt;Ok, it doesn't explain the difference, just the cause.&lt;BR /&gt;&lt;BR /&gt;Willem&lt;BR /&gt;Willem</description>
      <pubDate>Thu, 08 Jul 2004 16:17:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325979#M47457</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2004-07-08T16:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retained batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325980#M47458</link>
      <description>We use this quite often to check printer queues and whether they are working successfully or not.&lt;BR /&gt;We do a SET queue_name /RETAIN to check if prints are going through successfully. The only problem is that it gets forgotten for a few months and then you have quite a few entries sitting on the queue !&lt;BR /&gt;Do a SET queue_name /NORETAIN to stop the event.&lt;BR /&gt;Yours Terry.</description>
      <pubDate>Mon, 12 Jul 2004 03:37:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retained-batch-job/m-p/3325980#M47458</guid>
      <dc:creator>Terry Yeomans</dc:creator>
      <dc:date>2004-07-12T03:37:31Z</dc:date>
    </item>
  </channel>
</rss>

