From - Thu Oct 16 13:19:02 1997 Path: news.mitre.org!blanket.mitre.org!news.tufts.edu!usenet.logical.net!nntprelay.mathworks.com!howland.erols.net!newsfeed.internetmci.com!192.48.96.123!in1.uu.net!nclient1-gui.server.virgin.net!not-for-mail From: "Matt Roxburgh" Newsgroups: vmsnet.sysmgt Subject: Some DCL procedures you may find useful 1/3 Date: 16 Oct 1997 09:36:27 GMT Organization: Virgin Net Usenet Service Lines: 92 Message-ID: <01bcda1f$39112ec0$4e01210a@matt> NNTP-Posting-Host: p21-albatross-gui.tch.virgin.net X-Newsreader: Microsoft Internet News 4.70.1155 Hi, Nothing in particular to say so I thought I would just contribute 3 command files that you may find useful, if only to laugh at the DCL which was not my best ever effort but then everyone says that. I would post them to VMSNET.SOURCES but it looks like that has been dead for years ! These will be coming in the next 2 postings and at the end of this one .... Any comments - suggestions please send to matthew.roxburgh@virgin.net. I look forward to hearing your views. matt roxburgh, The command procedures are IM_FREE_DISK.COM It gives the current free space on a list of devices in bar graph format. A thin line indicates the FIRST ever run in the current process. ie the initial recorded free spaces on the drive. Each successive run will show the initial, current and direction change since the last run (indicated by a +/- in the free block column) SYSSTAT.COM A useful SHOW SYSTEM alternative, shows image, memory, open files etc. allows select by user or by image and filtering out of particular process types ie BATCH, SUB, OTHER, INTERACTIVE or NETWORK and lastly a very simple one WAIT_UNTIL.COM which allows you to do a $ @SYS_CMD:WAIT_UNTIL 10:30 it is useful for backups and scheduled runs. If the time is before the current time then it assumes it is tomorrow ! The file is included below extract and run. Passing an "!" as parameter 2 causes the wait not to be executed. $! WAIT_UNTIL.COM $! ============================================================================ ========== $! Wait until the time specified as P1 if the time specified is less than now $! then assume it is tomorrow $! $! If you sepecify a comment ("!") as P2 then the wait doesn't happen $ $ $ hhmm_time = f$time() $ gosub get_hhmm $ time_now = hhmm_time $ $ hhmm_time = P1 $ gosub get_hhmm $ time_then = hhmm_time $ $ tomorrow = 0 $ if time_then .lt. time_now then tommorrow = 1 $ $ wait_hours = 'f$extract(0,2,time_then)' - 'f$extract(0,2,time_now)' $ wait_mins = 'f$extract(2,2,time_then)' - 'f$extract(2,2,time_now)' $ $ if wait_mins .lt. 0 $ then $ wait_mins = wait_mins + 60 $ wait_hours = wait_hours - 1 $ endif $ $ if wait_hours .lt. 0 then wait_hours = wait_hours + 24 $ $ wait_time = f$fao("!2ZB:!2ZB:00", wait_hours, wait_mins) $ $ write sys$output "To wait from ", time_now, " until ", time_then $ write sys$output "... requires a wait of ", wait_time, " ... waiting" $ $'p2' wait 'wait_time' $ $ exit $ $ get_hhmm: $ $ hhmm_time = f$cvtime(hhmm_time, "ABSOLUTE", "HOUR") + - f$cvtime(hhmm_time, "ABSOLUTE", "MINUTE") $ $ return