Operating System - OpenVMS
1752806 Members
6475 Online
108789 Solutions
New Discussion

Re: Use a symbol in a DCL command procedure

 
SOLVED
Go to solution
Chaim Budnick
Regular Advisor

Re: Use a symbol in a DCL command procedure

After some experimentation, I discovered that the following will work using a logical name and not a symbol:

$date=F$EXTRACT(0,9,F$TIME())
$define/user sum_file 'date'.sum
$monitor
monitor io/sum=sum_file/ending=18:00/int=30
$exit

I understand that this particular example doesn't really require invoking monitor and then issuing a monitor command and that I could issue the entire command as a DCL line command. However, I am looking for a way to be able to dynamically use a symbol or as I have discovered a logical for dynamic usage.

Thanks for all the replies!!

Chaim
Jan van den Ende
Honored Contributor

Re: Use a symbol in a DCL command procedure

Chaim,

"... However, I am looking for a way to be able to dynamically use a symbol ..."

As I understand this, your question is about a generic way to use to contents of a symbol to be used in the input for an image.

Then, yes, in the case where you want to use your symbol value in a (any) filename, then you can do a define logical name for that file.
The logical name definition is done in a "normal" DCL command line, ie, with normal symbol substitution.
Then, in your image data line, you use a fixed file name (that is to say, as far as DCL is concerned). So, no substitution needed. At a certain moment when your image needs the file, then RMS parses the filename to get to the file ID. And RMS knows how to handle Logical Names (without THAT, most of VMS flexibility & reliability would not exist!!).
So, as long as it is about building 'variable' filenames, DEFINE works.
For all other kinds of variable data input, you are still down to either of the above methods: the classicle "write file / execute it / delete it", or the recently available PIPE manipulations.

HTH

Cheers.

Have one on me.

Jan
Don't rust yours pelled jacker to fine doll missed aches.