At 09:07 AM 8/16/2001 -0400, Thomas Pfau wrote:
>If you only need the device name, you can use SYS$GETDVI (is there a
>$GETDVI interface module yet?) with item code DVI$_DEVNAM,
>DVI$_ALLDEVNAM or DVI$_FULLDEVNAM.
A slight revision of Patrick's script like so:
use VMS::Stdio "getname";
use VMS::Device 'device_info';
open IN, "<mpa0:" || die $^E;
my $dname = getname(*IN);
print "$dname\n";
print device_info($dname)->{'DEVNAM'} . "\t"
. device_info($dname)->{'ALLDEVNAM'} . "\t"
. device_info($dname)->{'FULLDEVNAM'} . "\n";
sleep (5);
yields:
MPA0:[].;
_MPA0: _THETIS$MPA0: _THETIS$MPA0:
The getname() call depends on the C RTL's function of the same name. It is
probably just remembering whatever name you gave it when you opened the
file. The fact that you are opening a channel to a template device, thus
autovivifying an actual device, is probably opaque to the C RTL.