- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- DCL Script with parameter /
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
09-15-2006 02:34 AM
09-15-2006 02:34 AM
Can we use / as commandscript parameter ?
Purpose is I want to create an enviornment where some of the Unix command work (cd, ls,mkdir etc.) in VMS.
E.g.
@CD /usr/bin
As per my analysis DCL will throw an error if we use / as parameter.
@CD "/" will work , but I can not ask the user to enter a command @CD "/usr/bin"
Please suggest
Regards
Sethu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:53 AM
09-15-2006 02:53 AM
SolutionWell, you don't really want your users to type @CD anyway right? Not knowing where CD lives and all that?
So you could define "$CD = @some_fixed_place:cd.com X"
Now, if for example you use: $CD /usr
The in CD.COM the P1 will be "X" and P1 will be /USR (uppercased!)
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:55 AM
09-15-2006 02:55 AM
Re: DCL Script with parameter /
Oops, submitted before proofreading...
Then in the context of CD.COM the paramater P1 will be "X" and P2 will be /USR (uppercased!)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 04:56 AM
09-15-2006 04:56 AM
Re: DCL Script with parameter /
$ cd :== @somefixedplace:cd x """"
Then the 2nd parameter will contain everything that is entered after the command in whatever case is entered.
Here's a short example:
test.com contains the one line
$ sho sym p%
If I define the command cd as
$ cd :== @test X """
and enter the command
$ cd/this /is /a TEST
Here is the output:
P1 = "X"
P2 = " /this /is /a TEST"
P3 = ""
P4 = ""
P5 = ""
P6 = ""
P7 = ""
P8 = ""
$ cd /this is a /test
P1 = "X"
P2 = " /this is a /test"
P3 = ""
P4 = ""
P5 = ""
P6 = ""
P7 = ""
P8 = ""
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 05:16 AM
09-15-2006 05:16 AM
Re: DCL Script with parameter /
let me start with
WELCOME to VMS and to this forum!
Hein,
I think Sethu is entitled to a little explanation.
So Sethu, here goes:
/ in VMS normally denotes a qualifier (compare the Unix - , denoting a what U* calls a switch)
The @ ("execute whatever you find at") command behaves similar but not the same: it only accepts maximum of one qualifier, and only if given directly after the name of the file to be executed. All other command line elements (maximum 8, separated by spaces) are command parameters, which are automatically available within the activated procedure as the symbols P1 to P8.
So, Hein is "cheating" around the treating /USR as a qualifier by adding a dummy param.
The symbol CD will be replaced by its value
@some_fixed_place:cd.com X
in the command line evaluation, and then /usr/bin wil be added, resulting in
@some_fixed_place:cd.com X /usr/bin.
Now, CD.COM should never ever look at P1, but process P2. which holds the value of /USR/BIN
If you really need that as lowercase, then put it betweeb quotes on your command line. (same if you need embedded spaces or other special chars).
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 07:00 AM
09-15-2006 07:00 AM
Re: DCL Script with parameter /
cd is defined as: CD == "@DCL$PATH:CD #"
Then dcl$path:cd.com is the one at
http://wwwvms.mppmu.mpg.de/util_root/com/cd.com
It uses a program path_to_directory from
http://wwwvms.mppmu.mpg.de/~huber/util/main/path_to_directory.c
and needs for the "cd ~user" case a program UD
from
http://wwwvms.mppmu.mpg.de/vmssig/archive/u/ud.zip
whichh needs to be installed with SYSPRV to get another users home directory (if this is allowed at Your site).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2006 01:07 AM
09-18-2006 01:07 AM
Re: DCL Script with parameter /
Thanks very much for your time and help. It is working fine for me
Thanks and Regards
Sethu