HP OpenVMS Systems

ask the wizard
Content starts here

DCL symbol substitution?

» close window

The Question is:

 
$ inquire old_ver "What is the old version?"
$ inquire new_ver "What will the new version be called?"
$ copy csystbl_'old_ver'.mar csystbl_'new_ver'.mar
$ edit csystbl_'new_ver'.mar
subs /"'new_ver'" /"'old_ver'"
ex
 
I've tried several variations of the sub command, but I can't seem to port
over the variables from DCL to the editor.  What is the proper way to do
this?
 
Thanks,
Bob
 
 


The Answer is :

 
  The DCL symbol substitution occurs only at the DCL prompt, not within
  data and not within files.  If you wish to perform symbol substitution
  in this environment, you typically write a small file containing the
  command(s) and data to be invoked -- potentially only the data -- and
  you then invoke the created procedure or reference the specified data.
 
  In this case, use of a file containing nolinemode commands or other
  techniques might be useful -- you will want to ensure that the text
  editor you use does not attempt to use screen mode or similar, as this
  is not generally considered adventageous within a command procedure.
 

answer written or last revised on ( 16-NOV-1998 )

» close window