Copyright 1989-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 November, 1989
TAKING THE PLUNGE
DECwindows has claimed another victim.
Late this summer my consulting company joined DEC's
Independent Software Vendor program, in the process
acquiring a VAXstation 3100 and a slew of programming
languages and tools. As of this writing (mid-August), the
system is reportedly in transit.
As a DEC ISV, I'll be porting some of my publishing/text
processing utilities into the DECwindows environment. This
should be an interesting endeavor; I'm not aware of many
text-oriented SPITBOL applications which have been
transferred to graphics-based C programming. ("Can you say
culture shock? I knew you could.")
Before diving headlong into that herculean effort, however,
it will be necessary to get up close and personal with
DECwindows. Judging from some of the comments from folk on
DECUServe, ARIS, and other electronic forums, the experience
will be one which will be, shall we say, memorable. To
paraphrase John Campbell, "Pioneering essentially amounts to
finding new and horrible ways to hang your system." I've
started re-reading Dave Bynon's VAXstation articles and
updated my electronic telephone book with his latest home
phone number. You can run, David, but you can't hide.
Fortunately, DEC is eager and willing to assist developers
"push the envelope". Their ISV program includes an
extensive on-line VAX Notes-based system where members can
exchange information. ISV members have personal
representatives assigned to them, actual, identifiable
humans from whom to seek help.
Why would someone who told a DEC salesman at a DECUS
workstation demo "Windows? We don't need no stinkin'
windows!", a hard-core command-line interface addict,
seemingly forsake his roots and take up sides with the
"X-men"?
And what has this to do with DCL?
Frankly, windowing environments are rather rare in my
primary applications development area, database publishing.
Most processing is done in batch mode, which requires
little in the way of graphical interfacing.
But the primary users of my software have been migrating to
workstations in order to ease the processing burden on
their main cpus and to handle integrated graphics. If I
don't provide a windowing interface, something that works
seamlessly with the other applications, then I'm going left
in the dust.
As for DCL...
At least on VAXstations, DCL is still around, lurking in the
background. A VAXstation is still a VAX, still requires VMS
system management skills, and still uses DCL to get things
done, even though the user may be insulated from its
presence to a degree.
Beginning in the January, 1990 column, DCL Dialogue will
contain, from time to time, information about using DCL in
the DECwindows/workstation environment. But the main thrust
of this column will continue to be getting the most out of
Digital Command Language, regardless of the platform.
In the meantime, wish me luck.
*****************************************
BREAKING THE RULES
Bartolomeu Barros of Boston has attained what few achieve;
getting me to publish Yet Another Set Default Utility.
While this is in clear violation of the "no more set
default" edict, Bartolomeu's command procedure (PROGRAM 1)
contains a novel twist; it displays the directory name at
the bottom of the terminal screen in reverse video, making
navigation a far easier chore.
More importantly, the .COM file shows how to use terminal
escape sequences. This code can be "cannibalized" and
dropped into other procedures without too much effort.
Those wishing to make the DCL a tad more elegant may
consider using the F$FAO lexical function instead of the
fixed space strings contained in the file.
*******************************************
ALL-IN-1 FOR THE POOR
Bill Bailey, manager of academic and administrative systems
at North Carolina A&T State University passed along a DCL
menu system modeled after DEC's ALL-IN-1 office product.
While the code is too large to publish, we've placed PMA-1
("The Poor Man's ALL-IN-1") in the DCL download area of ARIS
for those of you looking for a way to manage users who are
not familiar with the normal VMS DCL environment. The
component procedures and documentation are in one large file
named PMA.DOC.
Bill is very active in VAX teleconferencing; he frequents
the FidoNet VAX area, USENET's info.vax conference, and even
runs his own BBS system, where he offers support for PMA-1.
----------
Kevin G. Barkes is an independent consultant. He publishes
the KGB Report newsletter, operates the www.kgbreport.com website,
lurks on comp.os.vms, and can be reached at kgbarkes@gmail.com.
*****************************************************************************
PROGRAM 1
$ SET NOVERIFY
$!
$! SET_DEF.COM Set default and display the directory name
$! at the bottom of the screen (line 24).
$! If the directory length > 80, only the last
$! 80 characters will display.
$!
$ ESC[0,7] = %x1B
$ SPACE = " "
$ P :== WRITE SYS$OUTPUT
$ U == F$GETSYI("NODENAME") ! Get node name
$ IF P1 .EQS. "SHOW" THEN P1 = "[]" ! Show current default
$ IF P1 .EQS. "" THEN P1 = F$TRNLNM("SYS$LOGIN") ! GET LOGIN directory name
$ SET DEFAULT 'P1' ! Set default to whatever P1 is
$ DEFAULT = F$ENVIRONMENT("DEFAULT") ! Get the whole directory name
$ LENGTH = F$LENGTH(DEFAULT) ! Find the length of directory
$ SPC_PAD = F$EXTRACT(0,80-'LENGTH',SPACE) ! Extract spaces for padding
$ IF LENGTH .GT. 80 THEN SPC_PAD = "" ! No padding if length > 80
$ IF LENGTH .GT. 80 THEN -
DEFAULT = F$EXTRACT('LENGTH'-80,80,DEFAULT) ! Extract last 80 characters
$ SET PROMPT = "''ESC'[1;23r''ESC'[23;1f $ " ! Set prompt
$ P "''ESC'[0k''ESC'[24;1f''ESC'[1;7m''DEFAULT'''SPC_PAD'''ESC'[0m''ESC'[1;23r"
$ EXIT
$!
$! To use: Define a symbol SD:== @DEVICE:[DIRECTORY]SET_DEF.COM
$!
$! then enter: SD directory_name will set and show default
$! SD show will show the default directory
$! SD will set default to main level dir.
$!
$! Author: Bartolomeu Barros
$! Boston, Massachusetts
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!