Re: days in scripting

2003-03-25 Thread Tuyl Adrie, A.C. van
Works great Al, thanks!
Nice solution, using select from db, but actually not selecting anything
from the db :-)


 -Oorspronkelijk bericht-
 Van:  Alan Davenport [SMTP:[EMAIL PROTECTED]
 Verzonden:maandag 24 maart 2003 14:54
 Aan:  [EMAIL PROTECTED]
 Onderwerp:Re: days in scripting

 Yes, there is. I do this in my scripts. Here is an example below:


 Name   Line   Command

Number
 -- --
 
 DAILY_MAI- 1  issue message i 'Starting TSM Daily
 Maintenance.'

  NT

6  run healthcheck

11 select 1 from db where
 dayname(current_date)='Sunday'
16 if (rc_ok) goto Sunday

21 cancel expiration

26 issue message i 'Starting Backup of disc pool
 DirectoryPool
to tape pool Copy_Directories'

31 ba stg directorypool copy_directories

36 issue message i 'Starting Backup of disc pool
 BACKUPPOOL to
off-site tape pool COPYVAULT.'

41 ba stg backuppool copyvault maxpr=8 wait=yes

46 issue message i 'Starting Migration of files in
 disc pool to
tape in pool TAPEPOOL.'

51 upd stg backuppool highm=10 lowm=0

56 delete sch migrate_check t=a

61 def sch migrate_check t=a cmd='run
 migrate_check'

startt=now+0:10 active=y perunits=onetime

66 exit

71 Sunday:

76 issue message i 'Starting reclamation of
 partially
 full
tapes.'

81 run startreclaim

86 issue message i 'Starting expiration of old data
 from the
TSM database.'

91 expire i quiet=yes

96 exit


 Take care,
Al

 Alan Davenport
 Senior Storage Administrator
 Selective Insurance Co. of America
 [EMAIL PROTECTED]
 (973) 948-1306


 -Original Message-
 From: Tuyl Adrie, A.C. van [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 4:53 AM
 To: [EMAIL PROTECTED]
 Subject: days in scripting


 Hi all,

 We have a daily tsm script which checks for missed backups, missed events,
 filesystems backupped longer then 24 hours ago etc.
 Weekends we do not backup all of our servers, so the check should be for
 last friday and not for sunday.
 Is there a way to implement the current day and do a jump depending on the
 current day?

 For instance:

 if 'today=monday' goto
 q ev * * begind=-3
 else
 q ev * * begind=-1




 Thanks,
 Adrie

 TSM Server 4.2.2.6 on Win NT 4 SP 6a

 **
 **
 This e-mail and any files transmitted with it are confidential and
 intended
 solely for the use of the individual or entity to whom they are addressed.
 If you have received this e-mail in error, please notify
 [EMAIL PROTECTED]
 This footnote also confirms that this e-mail message has been checked by
 McAfee Groupshield for the presence of computer viruses.
 **
 **

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this e-mail in error, please notify
[EMAIL PROTECTED]
This footnote also confirms that this e-mail message has been checked by
McAfee Groupshield for the presence of computer viruses.



Re: days in scripting

2003-03-25 Thread Alan Davenport
You're welcome! I'm glad I was able to help! I learned that dummy select
here on the list. I also use it for checking time-of-day in other scripts. I
want to make sure I do not start expiration processing during the afternoon
if my maintenance script finishes before 4pm because of the load it places
on the CPU. Here is  the script below showing this little trick:


Name   Line   Command

   Number
-- --

START_EXP- 1  select 1 from db where hour(current_time)16

 IRE

   6  if(rc_ok) goto resch

   11 delete sch start_expire t=a

   16 issue message i 'Starting expiration of old data
from the
   TSM database.'

   21 expire i quiet=yes

   26 exit

   31 resch:

   36 delete sch start_expire t=a

   41 def sch start_expire t=a cmd='run start_expire'
startt=16:00
   active=y perunits=onetime


   Take care,
   Al

Alan Davenport
Senior Storage Administrator
Selective Insurance Co. of America
[EMAIL PROTECTED]
(973) 948-1306


-Original Message-
From: Tuyl Adrie, A.C. van [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 3:18 AM
To: [EMAIL PROTECTED]
Subject: Re: days in scripting


Works great Al, thanks!
Nice solution, using select from db, but actually not selecting anything
from the db :-)


 -Oorspronkelijk bericht-
 Van:  Alan Davenport [SMTP:[EMAIL PROTECTED]
 Verzonden:maandag 24 maart 2003 14:54
 Aan:  [EMAIL PROTECTED]
 Onderwerp:Re: days in scripting

 Yes, there is. I do this in my scripts. Here is an example below:


 Name   Line   Command

Number
 -- --
 
 DAILY_MAI- 1  issue message i 'Starting TSM Daily
 Maintenance.'

  NT

6  run healthcheck

11 select 1 from db where
 dayname(current_date)='Sunday'
16 if (rc_ok) goto Sunday

21 cancel expiration

26 issue message i 'Starting Backup of disc pool
 DirectoryPool
to tape pool Copy_Directories'

31 ba stg directorypool copy_directories

36 issue message i 'Starting Backup of disc pool
 BACKUPPOOL to
off-site tape pool COPYVAULT.'

41 ba stg backuppool copyvault maxpr=8 wait=yes

46 issue message i 'Starting Migration of files in
 disc pool to
tape in pool TAPEPOOL.'

51 upd stg backuppool highm=10 lowm=0

56 delete sch migrate_check t=a

61 def sch migrate_check t=a cmd='run
 migrate_check'

startt=now+0:10 active=y perunits=onetime

66 exit

71 Sunday:

76 issue message i 'Starting reclamation of
 partially
 full
tapes.'

81 run startreclaim

86 issue message i 'Starting expiration of old data
 from the
TSM database.'

91 expire i quiet=yes

96 exit


 Take care,
Al

 Alan Davenport
 Senior Storage Administrator
 Selective Insurance Co. of America
 [EMAIL PROTECTED]
 (973) 948-1306


 -Original Message-
 From: Tuyl Adrie, A.C. van [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 4:53 AM
 To: [EMAIL PROTECTED]
 Subject: days in scripting


 Hi all,

 We have a daily tsm script which checks for missed backups, missed events,
 filesystems backupped longer then 24 hours ago etc.
 Weekends we do not backup all of our servers, so the check should be for
 last friday and not for sunday.
 Is there a way to implement the current day and do a jump depending on the
 current day?

 For instance:

 if 'today=monday' goto
 q ev * * begind=-3
 else
 q ev * * begind=-1




 Thanks,
 Adrie

 TSM Server 4.2.2.6 on Win NT 4 SP 6a

 **
 **
 This e-mail and any files transmitted with it are confidential and
 intended
 solely for the use of the individual or entity to whom they are addressed.
 If you have received this e-mail in error, please notify
 [EMAIL PROTECTED]
 This footnote also confirms that this e-mail message has been checked by
 McAfee Groupshield for the presence of computer viruses.
 **
 **

This e-mail

days in scripting

2003-03-24 Thread Tuyl Adrie, A.C. van
Hi all,

We have a daily tsm script which checks for missed backups, missed events,
filesystems backupped longer then 24 hours ago etc.
Weekends we do not backup all of our servers, so the check should be for
last friday and not for sunday.
Is there a way to implement the current day and do a jump depending on the
current day?

For instance:

if 'today=monday' goto
q ev * * begind=-3
else
q ev * * begind=-1




Thanks,
Adrie

TSM Server 4.2.2.6 on Win NT 4 SP 6a


This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this e-mail in error, please notify
[EMAIL PROTECTED]
This footnote also confirms that this e-mail message has been checked by
McAfee Groupshield for the presence of computer viruses.



Re: days in scripting

2003-03-24 Thread Alan Davenport
Yes, there is. I do this in my scripts. Here is an example below:


Name   Line   Command

   Number
-- --

DAILY_MAI- 1  issue message i 'Starting TSM Daily Maintenance.'

 NT

   6  run healthcheck

   11 select 1 from db where
dayname(current_date)='Sunday'
   16 if (rc_ok) goto Sunday

   21 cancel expiration

   26 issue message i 'Starting Backup of disc pool
DirectoryPool
   to tape pool Copy_Directories'

   31 ba stg directorypool copy_directories

   36 issue message i 'Starting Backup of disc pool
BACKUPPOOL to
   off-site tape pool COPYVAULT.'

   41 ba stg backuppool copyvault maxpr=8 wait=yes

   46 issue message i 'Starting Migration of files in
disc pool to
   tape in pool TAPEPOOL.'

   51 upd stg backuppool highm=10 lowm=0

   56 delete sch migrate_check t=a

   61 def sch migrate_check t=a cmd='run migrate_check'

   startt=now+0:10 active=y perunits=onetime

   66 exit

   71 Sunday:

   76 issue message i 'Starting reclamation of partially
full
   tapes.'

   81 run startreclaim

   86 issue message i 'Starting expiration of old data
from the
   TSM database.'

   91 expire i quiet=yes

   96 exit


Take care,
   Al

Alan Davenport
Senior Storage Administrator
Selective Insurance Co. of America
[EMAIL PROTECTED]
(973) 948-1306


-Original Message-
From: Tuyl Adrie, A.C. van [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 4:53 AM
To: [EMAIL PROTECTED]
Subject: days in scripting


Hi all,

We have a daily tsm script which checks for missed backups, missed events,
filesystems backupped longer then 24 hours ago etc.
Weekends we do not backup all of our servers, so the check should be for
last friday and not for sunday.
Is there a way to implement the current day and do a jump depending on the
current day?

For instance:

if 'today=monday' goto
q ev * * begind=-3
else
q ev * * begind=-1




Thanks,
Adrie

TSM Server 4.2.2.6 on Win NT 4 SP 6a


This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this e-mail in error, please notify
[EMAIL PROTECTED]
This footnote also confirms that this e-mail message has been checked by
McAfee Groupshield for the presence of computer viruses.