cancel
Showing results for 
Search instead for 
Did you mean: 

symbols

 
SOLVED
Go to solution
John Tannahill
Frequent Advisor

symbols

I am working in an openvms alpha environment, but have relatively little openvms experience. I have an issue that I describe below. There must be an easy answer?

$ sh sym python
PYTHON == "$ python_root:[vms.bin]python"

$ sh log python_root
"PYTHON_ROOT" = "$2$DKA0:[3RD_PARTY.PYTHON.PYTHON250.]" (LNM$SYSTEM_TABLE)

The python symbol works as it should:
* If I type “python”, I go into an interactive python session.
* If I type “python xdoit.py”, xdoit.py is run.

But if I try to execute the symbol contents directly, i.e.:
$ $ python_root:[vms.bin]python
Or:
$ $ python_root:[vms.bin]python xdoit.py
These do not work?
And for both, I get:
%DCL-W-NOLBLS, label ignored - use only within command procedures
\PYTHON_ROOT:\
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character

If I get rid of one of the starting dollar signs, I still get the same error.

What is going on here and what do I need to do to get the latter cases to work?

Thanks,
John

9 REPLIES 9
Thomas Ritter
Respected Contributor

Re: symbols

John, to run PYTHON

either

$ PYTHON

or

$ r python_root:[vms.bin]python
John Tannahill
Frequent Advisor

Re: symbols

Thanks Thomas, that works for the simple case, but what about:

$ r python_root:[vms.bin]python xdoit.py

The run command does not seem to like me passing the xdoit.py argument? Could not find any examples of run using arguments in the online documentation.

John
Thomas Ritter
Respected Contributor
Solution

Re: symbols

John,


$ PYTHON xdoit.py

The concept is called foreign commands.
John Tannahill
Frequent Advisor

Re: symbols

Got enough info to point me in the right direction for what I am trying to do.
John Gillings
Honored Contributor

Re: symbols

John,

>$ r python_root:[vms.bin]python xdoit.py
>

>The run command does not seem to like me
>passing the xdoit.py argument?

That's correct. The DCL RUN command doesn't understand parameters. There are several ways of passing parameters to images, here are a few. In each case is the full file specification of the target image.

1) Define a foreign command symbol

$ foreign_command="$"
$ foreign_command parameter parameter...

2) use the DCL$PATH logical name

$ DEFINE DCL$PATH dir1,dir2,dir3,...
$ image-name parameter parameter

(in this case image-name is just the name, not the full file specification)

3) use the (undocumented) MCR command

$ MCR parameter parameter...

4) define a DCL command using the CLD utility and call CLI$ routines to determine values of parameters and qualifiers.
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: symbols

> [...] relatively little openvms experience.

The FAQ covers many useful topics:

http://www.hoffmanlabs.com/vmsfaq/
John Tannahill
Frequent Advisor

Re: symbols

John & Steven,

I have learned a valuable lesson - not to close my posts too hastily. I would like to give you guys points, but it appears that I cannot?

It turns out that for us, the optimal solution appears to be to use DCL$PATH. It is less intrusive than adding a command to the command table (& easier in general).

Thanks for your help!
John
Robert Gezelter
Honored Contributor

Re: symbols

John,

The series of columns that I did for OpenVMS.org on logical names and related topics may also be of interest.

They are cross linked, but the last one [on logical names] can be found at http://www.openvms.org/stories.php?story=03/03/03/4358185

There are also some other presentations that I have done in the past for Connect [the user group] (fka Encompass, fka DECUS). Those can be reached via my firm's presentations page at http://www.rlgsc.com/presentations.html

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com
Joseph Huber_1
Honored Contributor

Re: symbols


>> the optimal solution appears to be to use DCL$PATH.

This is true for most executables or command-files.
In the case of python as far I know it is not enough to know the main executable, but it needs some more definitions/logicals pointing to a phython root directory. Therefore it needs some kind of setup file, which then can have the command definition as well.
http://www.mpp.mpg.de/~huber