[Info-vax] SET DEFAULT iterative logical name translation
alanfe...@gmail.com
alanfeldman48 at gmail.com
Mon Oct 17 03:22:34 EDT 2022
On Monday, October 25, 2021 at 3:47:23 PM UTC-4, Dave Froble wrote:
> On 10/25/2021 2:28 PM, alanfe... at gmail.com wrote:
>
> > But it does a lot more than that. SET DEFAULT had 2 or 3 silly bugs that I figured wouldn't take long to fix.
> What bugs? I've never seen any.
Here are some SET DEFAULT bugs:
>From vmsu2055_release_notes.txt
1.1.5 SET DEFAULT and SHOW DEFAULT Commands-Behavior Changed
V5.5-2
In VMS Version 5.5-2, the DCL command SET DEFAULT does not
set the default correctly when you use a logical name that
has multiple translations. For example:
$ SET DEFAULT DISK1:[DIRECTORY1]
$ DEFINE myfile myfile1
$ DEFINE myfile1 DISK2:[DIRECTORY2]
$ SET DEFAULT myfile
$ SHOW DEFAULT
DISK1:[DIRECTORY2]
In this example, the default should read:
DISK2:[DIRECTORY2]
This problem will be corrected in a future release of VMS.
Currently, DCL does not show the right default device in
the SHOW DEFAULT command when you use a logical name that
has multiple translations. For example:
$ SET DEFAULT DISK1:[DIRECTORY]
$ DEFINE myfile myfile1
$ DEFINE myfile1 DISK2:[DIRECTORY]
$ SET DEFAULT myfile: ! Must be with a colon
$ SHOW DEFAULT
myfile:[DIRECTORY]
$ WRITE SYS$OUTPUT F$ENVIRONMENT("DEFAULT")
myfile:[DIRECTORY]
In this example, "myfile" is used as the default
device. The correct default directory display should be
DISK2:[DIRECTORY].
This SHOW DEFAULT behavior will be changed in a future
release of VMS.
======================================================================
The bug in the first example has been fixed. I don't know when except
that it was probably 7.0 or later.
The second one is still broken on OpenVMS V8.4-2L2.
Regardless, you won't encounter these problems if you always use
TO.COM to change your default. (TO.COM v5.3 will be released soon!)
======================================================================
======================================================================
OLD:
The DCL program SET DEFAULT has two problems with nested logical
names:
1.) If the first translation has a trailing colon and there is no
explicit directory-spec in the second translation, SYS$DISK is changed
to the 1st translation and the directory portion is not changed. The
"actual" current directory remains hidden in SYS$DISK.
The above is still broken as of OpenVMS V8.4-2L2.
Got new details on this. SET DEF keeps translating until it gets to a
logical name with a trailing colon. Then SYS$DISK is changed to that
logical name, leaving the directory unchanged; unless it contains a
device and directory, in which case you get just that: the device and
the directory upon running SHOW DEFAULT. Note that if you include a
trailing colon in the SET DEFAULT command, the logical name will be
assigned to SYS$DISK, just as if it were a search list.
Example:
$ SHOW DEF
DSA3:[DECUSERVE_USER.FELDMAN.TO-V530]
$ SHOW LOG A
"A" = "B:" (LNM$PROCESS_TABLE)
1 "B" = "C:" (LNM$PROCESS_TABLE)
2 "C" = "D:" (LNM$PROCESS_TABLE)
3 "D" = "SYS$LOGIN:" (LNM$PROCESS_TABLE)
4 "SYS$LOGIN" = "DISK_USER:[DECUSERVE_USER.FELDMAN]" (LNM$JOB_831D6780)
$ SET DEF A
$ SHOW DEF
B:[DECUSERVE_USER.FELDMAN.TO-V530]
$ SET DEF D:
$ SH DEF
D:[DECUSERVE_USER.FELDMAN.TO-V530]
$ SET DEF D
$ SH DEF
DISK_USER:[DECUSERVE_USER.FELDMAN]
$
2.) If the 1st translation has no trailing colon, then only the
directory portion of the default is changed! This can leave SYS$DISK
incorrect thereby leaving the default incorrect.
The above, no 2., has been fixed. I don't know when, though.
The above, no 2., has been fixed. I don't know when, though.
Additionally, in certain circumstances, SET DEFAULT returns an error
but still changes your process to a bad default. But I haven't been
able to reproduce this on EISNER (OpenVMS V8.4-2L2). Maybe it's been
fixed.
UPDATE on 2022/10/16
It's still broken:
$ SH DEF
DISK_USER:[DECUSERVE_USER.FELDMAN]
$ SET DEF DSA2:DSA3
%RMS-F-DIR, error in directory name
$ SH DEF
DSA2:[DECUSERVE_USER.FELDMAN]
%DCL-I-INVDEF, DSA2:[DECUSERVE_USER.FELDMAN] does not exist
$
As you can see, SET DEFAULT produced a fatal error, yet still changed
the default. Yeah, it's unlikely you'll ever type something like that.
Maybe there's another type of typo that causes this.
Anyway,
TO.COM fixes all of the above problems and does much more. See the
other .TXT files for additional information.
TO.COM v5.3 to be released soon!
> --
> David Froble Tel: 724-529-0450
> Dave Froble Enterprises, Inc. E-Mail: da... at tsoft-inc.com
> DFE Ultralights, Inc.
> 170 Grimplin Road
> Vanderbilt, PA 15486
Alan Feldman
More information about the Info-vax
mailing list