Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: hammond@not@peek.ssr.hp.com (Charlie Hammond)
Subject: Re: Hobbyist License problems (was: Re: llcense problems)
Date: Thu, 29 Jan 2004 15:40:09 GMT	[thread overview]
Message-ID: <tP9Sb.13364$KA5.10000@news.cpqcorp.net> (raw)
In-Reply-To: MWVRb.13312$mK4.11118@news.cpqcorp.net

No support.  No guarantee.  But, if you're inerested, here is how
I warn myself about soon-to-expire licenses:

$ SET VERIFY
$!
$! LIC_CHECK.COM
$!
$! Check for soon-to-terminate licenses
$!
$!  Resubmit job
$!
$!  We will not run this on Sat or Sun.
$!
$!  If this is FRIDAY , re-submit it for next MONDAY
$!
$   if f$cvtime("TODAY",,"WEEKDAY") .eqs. "Friday"
$   then        ! On Friday, "TOMORROW+2-" is next Monday
$       after_time = f$cvtime("TOMORROW+2-","ABSOLUTE")
$   else
$       after_time = f$cvtime("TOMORROW","ABSOLUTE")
$   endif
$!
$   set noon
$   submit lic_check.com /name=lic_check /after="''after_time'"
$   stat = $status
$   set on
$   if .not. $status
$   then
$       mail blank.txt _hammond -
            /subj="LIC_CHECK failed to re-submit itself -- continuing"
$   endif
$!
$!  On Monday check for anything w/i 30 days.
$   if f$cvtime("TODAY",,"WEEKDAY") .eqs. "Monday"
$   then
$       pipe sho lic | sear sys$input terminate
$       if $status .eq. %X10000001  ! normal -- found terminate
$       then
$           mail blank.txt _hammond -
                /subj="1 or more licenses will terminate within 30 days"
$           exit
$       else
$           if $status .ne. %X18D78053  ! No strings matched
$           then
$!              Anything other than normal and no strigs matched is unexpected.
$               mail blank.txt _hammond -
                    /subj="Unexpected status in LIC-CHECK.COM(30)"
$           exit
$           endif
$       endif
$!
$!  Other days, check only for w/i 10 days
$   else
$       x$d = f$cvtime("today+10-","absolute")
$       x$d = f$element(0," ",x$d)
$       pipe sho lic /before /termination='x$d'   | sear sys$input criteria
$       if $status .eq. %X18D78053  ! No strings matched -- terminate
$       then
$           mail blank.txt _hammond -
                /subj="1 or more licenses will terminate within 10 days"
$           exit
$       else
$           if $status .ne. %X10000001  ! normal -- found
$           then
$!              Anything other than normal and no strigs matched is unexpected.
$               mail blank.txt _hammond -
                    /subj="Unexpected status in LIC-CHECK.COM(10)"
$           exit
$           endif
$       endif
$   endif

-- 
      Charlie Hammond -- Hewlett-Packard Company -- Ft Lauderdale  FL  USA
          (hammond@not@peek.ssr.hp.com -- remove "@not" when replying)
      All opinions expressed are my own and not necessarily my employer's.



      reply	other threads:[~2004-01-29 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-27 20:47 llcense problems Michael Grunditz
2004-01-28 21:35 ` Hobbyist License problems (was: Re: llcense problems) Hoff Hoffman
2004-01-29 15:40   ` hammond [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox