HP OpenVMS Systems

ask the wizard
Content starts here

DCL Programming and Dates?

» close window

The Question is:

 
How do I exclude to my backup command procedure to not incluse sunday and
 mondays night backups.  presently I do a submit.after="tomorrow +01:00:00"
 
 


The Answer is :

 
  Please acquire and read one of the available resources on DCL
  programming.
 
  Most easily, have the procedure resubmit itself on a daily basis
  (eg: /AFTER="TOMORROW+01:00") and then check for and exit based
  on the day of the week.
 
  The following are related examples of basic DCL programming...
 
 
 
$! see if a full backup should be performed, default not...
 
$ DOFULLBACK = "FALSE"
$ day = F$Edit(f$cvtim(,,"WEEKDAY"),"COLLAPSE,UPCASE")
$ if "''day'" .eqs. "FRIDAY" then DOFULLBACK = "TRUE"
 
 
 
 
$! see if a full backup should be performed tonight
 
$ day = F$Edit(f$cvtim(,,"WEEKDAY"),"COLLAPSE,UPCASE")
 
$ skipdays = "SATURDAY,SUNDAY"
$ if f$locate(",''day',",",''skipdays',") .ne. f$length(",''skipdays,'")
$ then
$   EXIT
$ endif
 

answer written or last revised on ( 6-JUN-2001 )

» close window