Copyright 1992-2016 by Kevin G. Barkes All rights reserved. This article may be duplicated or redistributed provided no alterations of any kind are made to this file. This edition of DCL Dialogue is sponsored by Networking Dynamics, developers and marketers of productivity software for OpenVMS systems. Contact our website www.networkingdynamics.com to download free demos of our software and see how you will save time, money and raise productivity! Be sure to mention DCL Dialogue! DCL DIALOGUE Originally published August, 1992 An Automated Noodge By Kevin G. Barkes A noodge, for those uninitiated among you, is a dialectic variation of the word nudge. It's common in the Pittsburgh area, although nowhere near as ubiquitous as "yunz", our flavor of the second person singular and plural forms of the pronoun "you". But I digress. A noodge can also be a noun, defined as an individual whose primary goal in life is making certain other people keep their commitments. The greatest noodge I ever knew was my grandmother, a remarkable woman able to maintain in her head the social calendars of scores of relatives. While she could never recall the location of her teeth or her change purse, she nonetheless spent most of the day on the telephone reminding her kin of doctor appointments, birthdays, and, for the more unsavory branch of the family, trial dates. Since her passing, I've spent a good portion of my life in a Holy Grail-like search for some type of reliable reminder system. I've gone through countless DayTimers, TimeOrganizers, ScanCard and other paper-based methodologies with dubious success. I either forget to use them, leave them in airports, or find myself unable to decipher prior scribblings. And they work only if you remember to look at them. Then there are the PIMs, or Personal Information Manager software. I've easily spent a grand on this stuff over the past couple years, and have yet to find one I really like. Their reminder alarms work ok, but only if the program is running. Since I frequently use software which dislikes DOS TSRs and multi-taskers, half the time my PIMs are not active, so their alerts never get to sound. The closest thing to perfection I've found is the Sharp Wizard "palmtop" organizer. Their newest unit, the OZ-8600, has 256K of RAM memory, more than enough to store all my addresses, phone numbers, and to-do lists. I'd be totally lost without it. Unfortunately, its alarm "bell" is a wimpy electronic chirp, easy to miss amid the computer fans and blaring movie soundtrack CDs usually playing in my office. The only loud, reliable, constantly running electronic device I have around here is my VAXstation 3100. So, I wrote a short and simple DCL command file to perform the tickler or "noodge functions" I need. The procedure has no bells and whistles to speak of, and literally begs for extra functionality. Which is why I won't add any. The thought of a DCL-based Polaris Packrat clone makes my blood run cold. The "system" runs off a single file in the user's login directory, SYS$LOGIN:NOODGE.DAT. (See Figure 1.) Comment lines can be used by placing an exclamation mark in the first position of a line. A typical entry consists of: TIME | MESSAGE | TIME is the time you want the alarm to sound, in absolute time format. This can be a complete specification (1-JAN-1993 18:00), a date only (15-JUN), or a time only (6:15). DCL uses the current day's year and date as the default, unless explicitly specified. The entries in the file can be in any order; no need to place them chronologically. MESSAGE is the message you want to appear on your screen at TIME. The two are separated by a vertical bar ("|") delimiter. Spaces around the bar are optional. The final "|" is also optional, and is a special flag which limits how long alarm messages are sent to your terminal. When NOODGE sees the trailing "|", it imposes a user-specified period for the duration of the alarm. This permits the user to enter automatically repeating alarms. For example, the entry: 12:00|Stuff face| will sound every day at noon as a lunchtime reminder. The trailing "|" will cause the alarm to stop sounding after the time defined by the symbol PERIOD in the command procedure. I've assigned a symbol, NOODGE, in my LOGIN.COM which translates to EDIT SYS$LOGIN:NOODGE.COM. After the procedure warns me of a pending appointment, I just type NOODGE at the DCL prompt and edit out the completed item or put an "!" in the first position of the line. I run NOODGE as a subprocess from my LOGIN.COM: $ IF F$EXTRACT(0,1,F$GETJPI("","TERMINAL")) .EQS. "T"- THEN SPAWN/NOWAIT/INPUT=SYS$LOGIN:NOODGE.COM This minor contortion is necessary to verify the subprocess is running from a process attached to a terminal. The procedure has the spawned process rename itself to "noodge". This is a mechanism to prevent multiple copies of NOODGE from running, of concern to folks like me who operate from multiple DECterms on a VAXstation. Comment out these lines if more than one person at your site wants to run NOODGE. Also be aware that when you log out, NOODGE dies. The procedure itself (Program 1) is straightforward, self-documenting and well-commented. Everytime I think of adding stuff to it, I look at the stack of unused, expensive PIM manuals lying on the shelf, and I come back to my senses. Grandma would be proud. ***** I truly appreciate all of you who take time to write me each month. While I respond to e-mail almost immediately, it sometimes takes me awhile to respond to US Mail and I usually just scrawl something in longhand and send it back. Then I forget if I really did respond. So in case I missed you, thanks to Kim Headlee, Marilynn Smith and Mark Tomasello for your comments and contributions. ***** Those of you who are regular readers know of my continuing problem getting Digital's myriad divisions to acknowledge my address change (which took effect last November). Aside from Educational Services, which continues to send catalogs to every member of my family, it appeared the rest of DEC had cleaned up its act. Then came the Service Quality Review form from whatever DEC is calling Field Service these days. It was mailed to my old address. I had scads of fun completing the form. The phone should start ringing any time now... *************************** Kevin G. Barkes is an independent consultant whose most recent visit to the optometrist was most depressing. He's hoping VMS 6.0 will feature a SET DISPLAY/BIFOCAL command. Kevin lurks on comp.os.vms and can be reached at kgbarkes@gmail.com. **************************************************************** PROGRAM 1. $! NOODGE.COM !Simple schedule alarm $ SET NOON ! Exit if noodge is already running $ SET PROCESS/NAME="noodge" $ IF $SEVERITY .NE. 1 THEN EXIT $ INTERVAL = "00:05" ! minutes between checks $ PERIOD = "+-00:30:00" ! limit for repeating alarms $! Assign some symbols $ BELL[0,7] = 7 ! Terminal bell $ ESC[0,7] = 27 ! Escape character $ BOLD = ESC+"[1;7m" ! Bold type $ NORM = ESC+"[0m" ! Normal type $ OPENFILE: ! Open and read the schedule file $ OPEN/READ/ERROR=NOFILE NOODGE SYS$LOGIN:NOODGE.DAT $ READLOOP: $ READ/END=CLOSEFILE/ERROR=CLOSEFILE NOODGE RECORD $! Skip blank lines $ IF F$EDIT(RECORD,"COLLAPSE") .EQS. "" THEN GOTO READLOOP $! Ignore comments (lines beginning with "!") $ IF F$EXTRACT(0,1,RECORD) .EQS. "!" THEN GOTO READLOOP $ ! Get the time of the alarm $ NOODGETIME = F$ELEMENT(0,"|",RECORD) $! Get the alarm message to be displayed $ NOODGETALK = F$ELEMENT(1,"|",RECORD) $! See if the alarm period is to be limited $ NOODGEFLAG = F$ELEMENT(2,"|",RECORD) $! What time is it? $ NOW = F$CVTIME(,"ABSOLUTE","DATETIME") $! What time is the alarm supposed to sound? $ NOODGETIME = F$CVTIME(NOODGETIME,"ABSOLUTE","DATETIME") $! In case an invalid date/time was supplied... $ IF $SEVERITY .NE. 1 THEN GOTO BADENTRY $! Special routine if alarm is limited $ IF NOODGEFLAG .NES. "|" THEN GOTO LIMIT $! If the time equals or is later than the alarm time, $! then sound the alarm. $ IF F$CVTIME(NOW,"COMPARISON") .GES. - F$CVTIME(NOODGETIME,"COMPARISON") THEN - WRITE SYS$OUTPUT BELL+BOLD+NOODGETALK+NORM $! Get the next entry... $ GOTO READLOOP $! For limited alarms: $ LIMIT: $ NOODGELIMIT - = F$CVTIME(NOODGETIME+"''PERIOD'","ABSOLUTE","DATETIME") $! Sound the alarm if the time equals or is later $! than the alarm time, but not if it's more than $! PERIOD past the alarm time. $ IF F$CVTIME(NOW,"COMPARISON") .GES. - F$CVTIME(NOODGETIME,"COMPARISON")- .AND. F$CVTIME(NOW,"COMPARISON") .LES. - F$CVTIME(NOODGELIMIT,"COMPARISON") THEN - WRITE SYS$OUTPUT BELL+BOLD+NOODGETALK+NORM $! Get the next entry... $ GOTO READLOOP $! Close the file $ CLOSEFILE: $ CLOSE NOODGE $! Wait for INTERVAL to elapse... $ WAITLOOP: $ WAIT 'INTERVAL' $! Then do it again. $ GOTO OPENFILE $! Handle bad entries. $ BADENTRY: $ WRITE SYS$OUTPUT "BAD NOODGE ENTRY: ",RECORD $ GOTO READLOOP $! Handle missing file. $ NOFILE: $ WRITE SYS$OUTPUT "No NOODGE.DAT file exists." $ WRITE SYS$OUTPUT "NOODGE Subprocess terminated." $ EXIT ************************************************************** FIGURE 1. ! Sample noodge.dat file ! ! These are for specific dates/times ! Alarm will sound every INTERVAL ! minutes until line is removed from ! the NOODGE.DAT file. 18-MAY 06:30 |Upload DCL Dialogue 27-MAY 09:00 |Visit optometrist again (10:30 appointment) 27-MAY 15:00 |School picnic (leave at 5 p.m.) 15-JUN |19th wedding anniversary 1-JAN-1993 18:00 |Clean under VAXstation ! These alarms will sound for PERIOD ! minutes every day at 6:00 a.m. and ! 11 p.m. The "|" at the end of the ! line invokes the limited alarm feature. 6:15 |Consume mass quantities of coffee| 23:00 |Heavily medicate self| 10:30|Meter and take out mail| 12:15|Check for mail|