Copyright 1987-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 By Kevin G. Barkes Originally published August, 1987 ALARMS AND EXCURSIONS Perhaps the best feature of DCL is the ease with which useful little utilities can be constructed. This month's featured procedure, ALARM.COM, is a prime example. The original version was written by James Robanske of U.S. West Network Systems, Inc. in Bellevue, WA. It arrived just as I was preparing this month's column and trying to come up with a command file which would demonstrate that you don't need hundreds of lines of code to perform meaningful tasks in DCL. The procedure as it appears here operates identically to James'. I restructured the code to reduce the line count and to demonstrate the operation of several lexical functions. In a small procedure such as this one, the "performance" increase gained by combining operations is almost negligible, and, indeed, an excellent argument can be made against compacting code to the point of incoherence. There's also the matter of diminishing returns... is it worth spending several hours to ultimately optimize a command file that is executed infrequently and takes under a few seconds to execute in its original, expanded form? In any event, ALARM.COM provides a handy method for sending yourself reminder notes via the VMS MAIL utility. The procedure has both interactive and batch "modes". When executed interactively, it builds a mail file and submits itself to the default system batch queue for execution. When executed in batch mode, it MAILs its message file to the user who submitted the job, then deletes the message file. The "switch" controlling this functionality is the F$MODE lexical in the first line of the procedure. If the procedure finds itself executing in batch mode, it branches to DOIT:, the label preceding the mail processing command. The command syntax for using ALARM interactively is @alarm [