- Integrated Systems
- About Us
- Integrated Systems
- About Us
09-24-2008 04:53 PM
$ 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
$ $ 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
%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?
Solved! Go to Solution.
09-24-2008 05:31 PM
$ 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.
09-24-2008 06:52 PM
>$ 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 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.
09-25-2008 09:21 AM
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!
09-25-2008 09:54 AM
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
09-26-2008 03:10 AM
>> 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.