[Info-vax] how to do a search for just today's info

Norm Raphael norman.raphael at verizon.net
Wed Jan 28 13:44:23 EST 2015


 >On 01/28/15, pcoviello at gmail.com<pcoviello at gmail.com> wrote:
 >
>I have a constantly growing log file.
>
>I put together a command procedure to do 2 searches, I need to have the second 
>search only for what is new or what is only today.
>
>here is the first search
>
>01/21/15-01:09:49:245 (20f4e4b7) 0 Starting Expansion for database _DSA316:[CACHESYS.APL.GBDEBT28K]. 2000 MB requested.
>01/21/15-10:41:23:539 (20f4e4b7) 0 Starting Expansion for database _DSA310:[CACHESYS.SUBCOM]. 1000 MB requested.
>01/22/15-10:59:40:048 (20f4e4b7) 0 Starting Expansion for database _DSA304:[CACHESYS.PL.GBDEBT68K]. 5000 MB requested.
>01/25/15-15:42:22:716 (20f4e4b7) 0 Starting Expansion for database _DSA317:[CACHESYS.CABLE.GBDEBT38K]. 5000 MB requested.
>01/27/15-09:44:10:310 (20f4e4b7) 0 Starting Expansion for database _DSA311:[CACHESYS.CJVA1]. 1000 MB requested.
>
>In this case I would not see any today. 
>I'll be running this 24/7 and 30 minute intervals
>
>$ TIME_STAMP=F$TIME()
>$ TODAY=F$TIME()
>$!
>$ sea cachesys:cconsole.log "expansion for"/out=sys$scratch:cconsole.TMP
>$!
>$ if time_stamp .eqs. today
>$ then goto NEXT
>$ NEXT:
>$ Search sys$scratch:cconsole.tmp today /out=temp:cconsole_log.TXT
>$ IF F$FILE_ATTRIBUTES("temp:cconsole_log.txt","EOF") .EQ. 0 THEN GOTO EXIT
>$ mail/subject="***** CACHE Monitor *****" temp:cconsole_log.TXT "pcoviello at someplace.com"
>$ DELETE SYS$SCRATCH:cconsole.tmp;*
>$ DELETE temp:cconsole_log.txt;*
>$ EXIT:
>FACS1>
>
>Thanks,
>Paul

Are you looking for this to match:

$ X:= 'F$CVTIME("TODAY","COMPARISON","DATE")
$ SHO SYM X
  X = "2015-01-28"
$ Y:='F$EXT(5,2,X)"/"'F$EXT(8,2,X)"/"'F$EXT(2,2,X)
$ SHO SYM Y
  Y = "01/28/15"
 
 Norman F. Raphael
"Everything worthwhile eventually 
degenerates into real work." -Murphy




More information about the Info-vax mailing list