Operating System - OpenVMS
1752492 Members
5648 Online
108788 Solutions
New Discussion юеВ

Re: * on DCL line executes everything?

 
Rick Dyson
Valued Contributor

* on DCL line executes everything?

I accidentally just discovered that if you use the DCL$Path logical name and just type "*" on the command line, it starts running (alphabetically) the first action (EXE or COM) it finds in your path. Is this just an unintended consequence of using the DCL$Path logical or a bug?

This was found when a HP provided proc had a line like:

$! *********...

and it wrapped without me noticing. So what actually was in the proc was:

$!
***************...

and it then started running the wrong stuff and it was not pretty. :)

Rick
4 REPLIES 4
Rick Dyson
Valued Contributor

Re: * on DCL line executes everything?

Well, embarrassed, I made a better search of the forums and found this is an old issue. A recent similar thread:

https://www11.itrc.hp.com/service/james/dispDoc.do?docURL=http%3A%2F%2Fsearch.hp.com%2Fredirect.html%3Furl%3Dhttp%253A%2F%2Fforums11.itrc.hp.com%2Fservice%2Fforums%2Fquestionanswer.do%253FthreadId%253D1082928%26qt%3D%252Bdcl%2524path%26hit%3D1&aid=SEARCH_FORUMS&pil=1&serStr=dcl%24path&pir=1

So, I guess I can answer my own question that it is the way it is and be careful with the "*" character!

Rick
Rick Dyson
Valued Contributor

Re: * on DCL line executes everything?

Maybe this is a better link to that other forum post:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1082928
Hoff
Honored Contributor

Re: * on DCL line executes everything?

I've commented on this in various of my old presentations.

The % is similar, but fewer folks use that wildcard.

If you're fumble-fingered, stick a file with a name that places it at the first position in the first directory in DCL$PATH that does nothing.
Aaron Sakovich
Super Advisor

Re: * on DCL line executes everything?

I prefer "$.com;32767" in the DCL$Path directories, with protection (E,E,E,E). This is what I usually use for the contents:


$! This is an empty place-holder to prevent the mistaken execution of
$! any other command files in the DCL$Path logical. This file must be
$! name $.COM so that it is the first file found during a search.
$!
$! DO NOT DELETE THIS FILE
$! DO NOT RENAME THIS FILE
$! DO NOT EDIT THIS FILE
$!
$ Exit