REQUE A BATCH MONTHLY


The following information will be needed in order to restart a batch if it ever is deleted from the que, or whenever you need to start one for a different aid year.  The example used is USERS:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.BCF.

Set the batch to run:

MAIN MENU, REPORTS, BATCHSTART, SUMFUND_4SBR

FUND Term to report (071Y = Annual Fund for 07)? 071Y

Batch file SYS$SYSDEVICE:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.COM; created   09:2
4 AM
Queue the batch now <NO>? YES
Batch Queue <AID$BATCH>?
Time to start the batch <NOW>? /REQUE=MONTHLY  (this is what makes it run monthly)

Look at the que:

$ sho que/full/all aid$batch
Batch queue AID$BATCH, idle, on ALPHA::
  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[ESP] /PROTECTION=(S:M,O:D,G:R,W:S)

  Entry  Jobname         Username             Status
  -----  -------         --------             ------
    678  FINAIDHOLD      AID_FLOY             Holding until 10-APR-2007 06:00:00
         Submitted  9-APR-2007 06:00:54.51 /KEEP
         /LOG=ALPHA$DKA0:[AID_FLOY]FINAIDHOLD.LOG; /NOTIFY /NOPRINT
         /PRIORITY=100 /RESTART=AID$BATCH
         File: _ALPHA$DKA0:[AID.EXE]FINAIDHOLD.COM;37

    693  CWA_INCOMPLETE  AID_FLOY             Holding until 16-APR-2007 07:37:24
         Submitted  9-APR-2007 07:37:24.76 /KEEP /NOTIFY /NOPRINT /PRIORITY=100
         /RESTART=AID$BATCH
         File: _ALPHA$DKA0:[AID.EXE.SITE]CWA_INCOMPLETE.COM;9

    741  SUMFUND_GROUPED_RECUR
                         AID_FLOY             Holding until  9-MAY-2007 09:18:00
         Submitted  9-APR-2007 09:18:33.59 /KEEP /NOTIFY /NOPRINT /PRIORITY=100
         File: _ALPHA$DKA0:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.COM;9

If you want to set it to run on a different day of the month:

$ set entry/after="1-may-2007 07:00:00"  741

Show the que again, to confirm:

$ sho que/full/all aid$batch
Batch queue AID$BATCH, idle, on ALPHA::
  /BASE_PRIORITY=4 /JOB_LIMIT=1 /OWNER=[ESP] /PROTECTION=(S:M,O:D,G:R,W:S)

  Entry  Jobname         Username             Status
  -----  -------         --------             ------
    678  FINAIDHOLD      AID_FLOY             Holding until 10-APR-2007 06:00:00
         Submitted  9-APR-2007 06:00:54.51 /KEEP
         /LOG=ALPHA$DKA0:[AID_FLOY]FINAIDHOLD.LOG; /NOTIFY /NOPRINT
         /PRIORITY=100 /RESTART=AID$BATCH
         File: _ALPHA$DKA0:[AID.EXE]FINAIDHOLD.COM;37

    693  CWA_INCOMPLETE  AID_FLOY             Holding until 16-APR-2007 07:37:24
         Submitted  9-APR-2007 07:37:24.76 /KEEP /NOTIFY /NOPRINT /PRIORITY=100
         /RESTART=AID$BATCH
         File: _ALPHA$DKA0:[AID.EXE.SITE]CWA_INCOMPLETE.COM;9

    741  SUMFUND_GROUPED_RECUR
                         AID_FLOY             Holding until  1-MAY-2007 07:00:00
         Submitted  9-APR-2007 09:18:33.59 /KEEP /NOTIFY /NOPRINT /PRIORITY=100
         File: _ALPHA$DKA0:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.COM;9

It's possible to have two different versions of the same batch running, e.g., if you wanted one for 071Y, and the other for 061Y.  You might be the only one who understands why the que would contain two versions of the same batch file.  The que would list each of them as the same name, but with a different version #.  If you inadvertently get duplicate jobs in the que, you can delete the one you don't want by:

$del/entry=741

It's a good idea to do the $SHOW QUE/FULL/ALL command in order to check on the que if you have recurring batches.  It's something I do several times a week, to make sure the batches are que'd up to run when they're supposed to.  I'd recommend you're taking on this responsibility for the AID batches in case the new SYSMGR doesn't do it.  (Gina, for the same reason, you might want to start monitoring SBR$BATCH and FIS$BATCH.)

Almost 100% of the recurring batches can be que'd from the menu, but if you ever want to que them from the $ prompt:

$ QUEB users:[aid.exe.site]sumfund_grouped_recur
Output Batch Filename <SYS$SYSDEVICE:[AID_FLOY]SUMFUND_GROUPED_RECUR.COM>?

USERS:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.COM (place it in the same dir as the .bcf file)

File SYS$SYSDEVICE:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.COM; exists.
Create a new version <NO>? YES (especially if changes have been made)
Save SYS$SYSDEVICE:[AID.EXE.SITE]SUMFUND_GROUPED_RECUR.COM; after execution <NO>? YES (crucial)
Allow batch log to be queued <NO>? NO

(responses to the remaining prompts are shown at top of this memo)

More info in DMS Reference Manual Vol II, under QUEBATCH.