Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Device Logicals Names

SOLVED
Go to solution
Kevin Raven (UK)
Frequent Advisor

Device Logicals Names

We are currently in the process of moving a Development cluster to SAN based storage.

Current storage device names are like;
DSA1 = $1$DKA100 + $1$DKB200 + $1$DKC200
We have about 20 shadow sets.

New storage will be like
DSA1= $1$DGA1010 + $1$DGA1020 + $1$DGA1030

The server will not be about for long in the future.
The server is riddled with command files that reference device names and numbers i.e. Remove member DKC200 from shadow set , mount it , do a backup from it and remount into shadow set.

I have done a quick and dirty fix of a
$DEFINE/SYS/EXEC/TRANS=(CONC,TERM) $1$DKC200 $1£DGA1030:
This seems to work ...but I have found that some command files reference the disk as _$1$DKC200: or _$1$DKC200 (Underscore at start of device name). This breaks my quick and ugly fix ...

This a dev server and has been a sandpit for the last 5 years !

Anyone have any ideas how I do a logical define to cope with the _ prior to device names ?

Avoiding editing the dozens of cammand files of course.

Thanks in Advance
6 REPLIES
Robert Gezelter
Honored Contributor
Solution

Re: Device Logicals Names

Raven,

If the files are forcing the names, then there is little that can be done.

If the names are explicit, then using SEARCH, GREP, PERL or other tools to identify the command files (and possibly automate the editing) might be an option [I have done this in similar situations in the past].

I would also consider moving this using the techniques described in my presentation "Migrating OpenVMS Storage Environments without Interruption or Disruption" (slides available at http://www.rlgsc.com/hptechnologyforum/2007/1512.html ).

- Bob Gezelter, http://www.rlgsc.com
Kevin Raven (UK)
Frequent Advisor

Re: Device Logicals Names

Thanks for the quick reply.

Yes it looks like we script something to search and make the changes in the numerous command files.

Thanks
Hoff
Honored Contributor

Re: Device Logicals Names

As for the fix, add a couple of more logical names -- the classic leading underscore stuff does NOT work the way it once did; this notation has been "broken" since V4.0. Put another way, add:

$ DEFINE/SYS/EXEC/TRANS=(CONC,TERM) -
_$1$DKC200 $1$DGA1030:

$ DEFINE/SYS/EXEC/TRANS=(CONC,TERM) -
__$1$DKC200 $1$DGA1030:

I've also patched executables and data files to fix some of these cases; for what isn't accessible via logical name or editor or other and more reasonable means.

And tools such as Perl can make short order of mass DCL changes.

Hoff
Honored Contributor

Re: Device Logicals Names

nb: One _ underscore gets removed when specified, so just keep adding them (in classic DCL fashion) until you get enough of them out front.
AEFAEF
Advisor

Re: Device Logicals Names

You can also do en masse changes in DCL command procedures using DCL and EDT:

*** Use at your own risk ***

[Despite the comments (I wrote this thing ca. 2000), a quick check showed it works with the ... wildcard.]


$!+ FIXALL.COM
$!
$! PURPOSE: TO S/OLD/NEW/WH IN MANY FILES IN A SINGLE DIRECTORY
$! P1 = FILE-SPEC (WILDCARDS OKAY)
$!
$!! Ask for file-spec:
$!
$ IF (P1 .EQS. "") THEN $ INQUIRE P1 "_File-spec"
$_ASK_P2:
$ IF (P2 .EQS. "") THEN $ INQUIRE P2 "_Old string"
$ IF (P2 .EQS. "") THEN $ WRITE SYS$COMMAND "Null value not allowed. Try again:"
$ IF (P2 .EQS. "") THEN $ GOTO _ASK_P2
$ IF (P3 .EQS. "") THEN $ INQUIRE P3 "_New string"
$!
$!! Create the command file that will be run to do the editing:
$!
$ ON ERROR THEN GOTO LEAVE
$ ON CONTROL_Y THEN GOTO LEAVE
$ OPEN/WRITE FIX FIXALL.TMP
$ WRITE FIX "$ ON CONTROL_Y THEN STOP "
$ WRITE FIX "$ EDIT/EDT/NOCOMMAND 'P1' "
$ FIX_STRING = "S|" + P2 + "|" + P3 + "|WH"
$ WRITE FIX FIX_STRING
$ WRITE FIX "EXIT "
$ CLOSE FIX
$!
$!! Look for files:
$!
$FIX_FILE:
$!
$ FILE = F$SEARCH(P1)
$ SHOW SYMBOL FILE
$ IF (FILE .EQS. "") THEN $ GOTO EXIT
$!
$!! Run the command file we just made, but do not alter it or directory files!
$!
$ FILE_NAME = F$PARSE(FILE,,,"NAME")
$ FILE_TYPE = F$PARSE(FILE,,,"TYPE")
$ FILE_NT = FILE_NAME + FILE_TYPE
$ IF (FILE_NT .NES. "FIXALL.TMP" .AND. FILE_TYPE .NES. ".DIR") THEN @FIXALL.TMP 'FILE'
$!
$!GO BACK TO THE TOP OF THE LOOP:
$ GOTO FIX_FILE
$!
$EXIT:
$ DELETE FIXALL.TMP;*
$ EXIT
$!
$LEAVE:
$ CLOSE FIX
$ STOP
$!
$!# END OF FIXALL.COM

AEFAEF
AEFAEF
Advisor

Re: Device Logicals Names

Sorry to reply to my own post.

I wrote FIXALL.COM between about 1986 and Jun 1991, not ca. 2000.

Yeah, I should have fixed the comment about a "many files in a single directory" before I posted. Sorry. It should work fine with any file-spec that F$SEARCH is happy with.

AEFAEF