- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Using variable to set def directory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2007 02:48 AM
02-12-2007 02:48 AM
for example
$newdir = test1
$set def sys$sysdeivce:[stuff.mine.newdir]
where newdir is a variable name
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2007 02:53 AM
02-12-2007 02:53 AM
Solution$ newdir = "test1"
$ SET DEF sys$syssdevice:[stuff.mine.'newdir']
This will do what you expected.
or ...
$ @my_commfile "test1" ! Supply the variable part as a variable to the commfile
The commfile then looks like this:
$ SET DEF SYS$SYSDEVICE:[stuff.mine.'P1']
Hope that helps
Regards
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2007 02:57 AM
02-12-2007 02:57 AM
Re: Using variable to set def directory
DCL symbol substitution will be of interest here, and applies here and most any other time when the $ prompt or DCL is otherwise reading and processing input:
$ newdir := SYS$SYSDEVICE:[SOMEWHERE]
$ SET DEFAULT 'newdir'
To perform a substring substitution
$ newdir := test1
$ SET DEFAULT ddcu:[this.that.'newdir']
(or potentially [.'newdir'], if you can use relative directory notation.)
Navigation within a directory hierarchy can be a bit, um, interesting.
Also look around for PUSHD and POPD tools, as these are widely available and potentially relevant here, and there are a gazillion versions of "CD" tools around for OpenVMS. Start on the OpenVMS Freeware, but you should have no problem finding examples using Google or such. (http://www.hp.com/go/openvms/freeware)
As for learning more about DCL and DCL arcana, the OpenVMS User's Guide (in the OpenVMS documentation set) is a good start, and (if you can find a copy) Writing Real Programs in DCL 2nd Ed, a book I co-authored a few years back.
Available tutorial and command-related information is referenced in the OpenVMS FAQ (http://www.hoffmanlabs.com/vmsfaq), for both books and tutorial sites, and comparisions between (say) Unix shell commands and DCL commands.
And again, welcome to ITRC.
Stephen Hoffman
HoffmanLabs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2007 02:58 AM
02-12-2007 02:58 AM
Re: Using variable to set def directory
welcome to the forum. I did not recognize that you are a new member.
Have Fun
Regards
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2007 05:48 AM
02-12-2007 05:48 AM
Re: Using variable to set def directory
Thanks for your help and friendly welcome to the forum !