<?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 requeing a batch job in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913728#M80753</link>
    <description>Great suggestion!  And yes, I did used Ken's suggetion and now it's working just the way I thought it would be.&lt;BR /&gt;&lt;BR /&gt;Cheers!!&lt;BR /&gt;&lt;BR /&gt;Jorge</description>
    <pubDate>Fri, 15 Dec 2006 17:28:58 GMT</pubDate>
    <dc:creator>Jorge Cocomess</dc:creator>
    <dc:date>2006-12-15T17:28:58Z</dc:date>
    <item>
      <title>Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913723#M80748</link>
      <description>Greetings,&lt;BR /&gt;&lt;BR /&gt;I have this batch job that only supposed to runs from Sunday through Thursday, skips the weekend.  In my batch job, I have s section where it was checking for the day "THU" skip to the skip_weekend: prompt.  However, it's not working like I thought it would do.  Can someone direct me to the right commands.&lt;BR /&gt;&lt;BR /&gt;$ wkday = f$edit(f$extract(0,3,f$cvtime("today",,"weekday")),"upcase")&lt;BR /&gt;$ if (wkday .eqs. "THU") then goto SKIP_WEEKEND&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;&lt;BR /&gt;Jorge</description>
      <pubDate>Fri, 15 Dec 2006 09:29:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913723#M80748</guid>
      <dc:creator>Jorge Cocomess</dc:creator>
      <dc:date>2006-12-15T09:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913724#M80749</link>
      <description>&lt;!--!*#--&gt;That should work, but we need more information as to what is happening, what does the rest of your code do, what errors are being generated?&lt;BR /&gt;&lt;BR /&gt;But, why make it complicated?&lt;BR /&gt;&lt;BR /&gt;$ wkday = f$cvt(,,"weekday")&lt;BR /&gt;$ if wkday .eqs. "Thursday" then goto skip_weekend&lt;BR /&gt;&lt;BR /&gt;should work just as well.&lt;BR /&gt;&lt;BR /&gt;Ken</description>
      <pubDate>Fri, 15 Dec 2006 09:43:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913724#M80749</guid>
      <dc:creator>Ken Robinson</dc:creator>
      <dc:date>2006-12-15T09:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913725#M80750</link>
      <description>Is this running on a cluster right around midnight?&lt;BR /&gt;&lt;BR /&gt;If a cluster node is even a fraction of a second different than where the queue manager runs - then you are technically running it the day before. &lt;BR /&gt;&lt;BR /&gt;Why not check if Day = Fri or Sat then goto skip weekend?&lt;BR /&gt;Your script currently looks like it will only skip if day = Thursday.  That might be related to when to resubmit.&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Dec 2006 13:35:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913725#M80750</guid>
      <dc:creator>Peter Zeiszler</dc:creator>
      <dc:date>2006-12-15T13:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913726#M80751</link>
      <description>No, this is a non-cluster environment.  No errors, just doesn't check for Thursday and it continue to submit the job for Friday and so on.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jorge</description>
      <pubDate>Fri, 15 Dec 2006 15:37:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913726#M80751</guid>
      <dc:creator>Jorge Cocomess</dc:creator>
      <dc:date>2006-12-15T15:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913727#M80752</link>
      <description>I've encountered some weirdness in some lexical functions like f$cvtime when you bury them in complex commands, especially when running in batch.  Try separating the f$cvtime out of that line and putting the result in a symbol that you'll then use in the f$extract.  Better yet, do the simpler command that Ken recommended.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Dec 2006 17:20:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913727#M80752</guid>
      <dc:creator>EdgarZamora_1</dc:creator>
      <dc:date>2006-12-15T17:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913728#M80753</link>
      <description>Great suggestion!  And yes, I did used Ken's suggetion and now it's working just the way I thought it would be.&lt;BR /&gt;&lt;BR /&gt;Cheers!!&lt;BR /&gt;&lt;BR /&gt;Jorge</description>
      <pubDate>Fri, 15 Dec 2006 17:28:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913728#M80753</guid>
      <dc:creator>Jorge Cocomess</dc:creator>
      <dc:date>2006-12-15T17:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913729#M80754</link>
      <description>Okay, I thought it was working like the way I had intented.  Anyways, I have to ask another question though, because the batch job resubmit it 2 consecutive days in a row.  Here's the part of my script (below).  Please let me know how I can fix this.&lt;BR /&gt;&lt;BR /&gt;Thank you!!&lt;BR /&gt;$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;BR /&gt;$ set noverify&lt;BR /&gt;$ ON ERROR THEN GOTO EXIT&lt;BR /&gt;$ SET NOON&lt;BR /&gt;$ Set Proc/Priv=bypass&lt;BR /&gt;$!&lt;BR /&gt;$ wkday = f$cvt(,,"weekday")&lt;BR /&gt;$ if wkday .eqs. "Friday" then goto skip_weekend&lt;BR /&gt;$!&lt;BR /&gt;$ submit/user=backups/que=backups$batch -&lt;BR /&gt;        disk5:[backups.com]full_backup.com -&lt;BR /&gt;        /log=disk5:[backups.log]full_backup.log -&lt;BR /&gt;        /after="tomorrow+15:00:00" /noprint&lt;BR /&gt;&lt;BR /&gt;$!&lt;BR /&gt;$ Go To Begin&lt;BR /&gt;$ SKIP_WEEKEND:&lt;BR /&gt;$ submit/user=backups/que=backups$batch -&lt;BR /&gt;        disk5:[backups.com]full_backup.com -&lt;BR /&gt;        /log=disk5:[backups.log]full_backup.log -&lt;BR /&gt;        /after="tomorrow+1-15:00:00" /noprint&lt;BR /&gt;&lt;BR /&gt;$!&lt;BR /&gt;$ BEGIN:&lt;BR /&gt;$ set proc/name="Daily_Full_Backup"&lt;BR /&gt;$!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Dec 2006 10:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913729#M80754</guid>
      <dc:creator>Jorge Cocomess</dc:creator>
      <dc:date>2006-12-19T10:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913730#M80755</link>
      <description>Your code is working as expected. If it 's Friday, it will goto SKIP_WEEKEND.  However, after it gets there, it will fall through to the BEGIN section and therefore, run it anyway.&lt;BR /&gt;&lt;BR /&gt;Place the following immediately before the BEGIN label&lt;BR /&gt;$ goto exit&lt;BR /&gt;This is of course assuming that you have an EXIT label.&lt;BR /&gt;&lt;BR /&gt;Also, I notice that you set an on error condition at the begining and then turn it off (set noon).  Remove the "$ SET NOON" line.&lt;BR /&gt;&lt;BR /&gt;However, you still have not corrected the problem that Peter mentioned.  You are only checking for one day (Friday).  When this runs on Saturday or Sunday, it will fail the check and not skip weekend.&lt;BR /&gt;&lt;BR /&gt;Ideally, I would change your check to if Day = Saturday or Sunday then goto skip weekend.&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Tue, 19 Dec 2006 11:21:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913730#M80755</guid>
      <dc:creator>Doug_81</dc:creator>
      <dc:date>2006-12-19T11:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913731#M80756</link>
      <description>The following will execute the backup on any day whose name does not begin with an "S" - I think that's your goal.&lt;BR /&gt;&lt;BR /&gt;$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;BR /&gt;$ set noverify&lt;BR /&gt;$ set noon&lt;BR /&gt;$ set proc/priv=bypass&lt;BR /&gt;$!&lt;BR /&gt;$ submit/user=backups/que=backups$batch -&lt;BR /&gt;disk5:[backups.com]full_backup.com -&lt;BR /&gt;/log=disk5:[backups.log]full_backup.log -&lt;BR /&gt;/after="tomorrow+15:00:00" /noprint&lt;BR /&gt;$!&lt;BR /&gt;$ if f$extr(0,1,f$cvti(,,"weekday")) .eqs. "S" then exit&lt;BR /&gt;$!&lt;BR /&gt;$BEGIN:&lt;BR /&gt;$ set proc/name="DailyFullBackup"&lt;BR /&gt;$!&lt;BR /&gt;&lt;BR /&gt;Note that your process name was too long - 15 characters is the maximum and that unless you're issueing a later "SET ON" your "ON ERROR" trapping will never be activated.</description>
      <pubDate>Tue, 19 Dec 2006 11:26:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913731#M80756</guid>
      <dc:creator>Jim_McKinney</dc:creator>
      <dc:date>2006-12-19T11:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913732#M80757</link>
      <description>Great suggestions!!  I will focus more on checking for weeknd "S" instead of weekdays.&lt;BR /&gt;&lt;BR /&gt;Thank you so much!!&lt;BR /&gt;&lt;BR /&gt;Jorge</description>
      <pubDate>Tue, 19 Dec 2006 15:08:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913732#M80757</guid>
      <dc:creator>Jorge Cocomess</dc:creator>
      <dc:date>2006-12-19T15:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913733#M80758</link>
      <description>One other thought came to mind;  I want to run this batch job every day with an exception "Sat" Saturday.&lt;BR /&gt;&lt;BR /&gt;What would be the syntax setting this way?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jorge</description>
      <pubDate>Tue, 19 Dec 2006 15:18:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913733#M80758</guid>
      <dc:creator>Jorge Cocomess</dc:creator>
      <dc:date>2006-12-19T15:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem requeing a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913734#M80759</link>
      <description>$ if f$cvt(,,"weekday") .eqs. "Saturday" then goto skip_weekend</description>
      <pubDate>Tue, 19 Dec 2006 15:28:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-requeing-a-batch-job/m-p/3913734#M80759</guid>
      <dc:creator>Doug_81</dc:creator>
      <dc:date>2006-12-19T15:28:09Z</dc:date>
    </item>
  </channel>
</rss>

