[Info-vax] defining a symbol as an action invoked when entered as command

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Sat Mar 28 11:28:58 EDT 2020


On 2020-03-28 09:21:54 +0000, Phillip Helbig (undress to reply said:

> Is there anyway to get the same result as a symbol which gets evaluated 
> only when entered as a command?

For what I suspect you're up to here, the DCL & ampersand substitution 
mechanism won't suffice.

Use an executable and pick off what you need at run time, and stop 
trying to work around the limits of a ~forty year old design?

Or a different scripting language, though none of those are integrated 
with OpenVMS.

You're probably considering DCL here as Fortran from the last 
millennium itself has some issues around dynamic string handling.

As for your DCL question, the usual solution is to write part of the 
DCL procedure at run-time, and then execute it.

There are examples of folks working around the DCL limitations here 
using a dynamically-written procedure, too.

Unfortunately for folks embarking on the path of this dynamic DCL 
workaround, the scratch directory generation and handling, the filename 
generation, and the risks of malicious collisions are all themselves 
problematic within the current DCL design.

For those cases where this dynamic DCL sequence might be sensitive, 
this design can be fodder for a commend execution injection, or fodder 
for races, if there are latent design or coding errors.




-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list