$ ШОУ ПРОЦЕСС / ВСЕ
$ SHOW ENTRY
$ SHOW ENTRY / FULL
Если у меня есть команда dosomething в OpenVMS, где я могу увидеть, откуда она берется (Расположение скрипта / exe - как это определяется, если это другой вид животного)
$ ШОУ ПРОЦЕСС / ВСЕ
$ SHOW ENTRY
$ SHOW ENTRY / FULL
There exists three DCL "sources" of, as you say, "coming from" something command like.
One warning: syntaxes with visible explicit DCL enforcement, like:
$'dosomething'
are not counted here, only the "visible like command" ones.
Also explicit RUN or MCR commands are commands themselves, then run dosomething
are out of interest.
Symbols
Function: like un*x alias or as "run a program with parameters", nearly like the MCR dosomething.
Do a:
$ show symbol dosomething
Symbols are "first use" (if used, then has priority over next steps)
True DCL command
There no build in utility to check the command table.
However you can setup a freeware VERB utility.
Then do a:
$ verb dosomething
The "image" and "cliroutine" (in VERB output) shows the .EXE or internal DCL routine where runs the command.
Path usage
Do a:
$ directory DCL$PATCH:dosomething
If a .COM or .EXE file exists, the command procedure runs nearly like after @DCL$PATH:dosomething
or image of code runs like mcr DCL$PATH:dosomething
.
Path usage is a "last chance" one (only if symbol does not exist or not used and true DCL command does not exist also)
"Nearly" in all description above because there are minor syntax interpretation difference, mostly irrelevant.
If exists a symbol with name matching your "command", the content of symbol may be translated in two ways:
if the content begins with "$", the use is named "foreign command" and runs image (.EXE file) of rest of content, up to separator (parameter can be applied nearly like in alias); warning: the default directory of specified .EXE is SYS$SYSTEM:, not the default of process!
in all other cases the value may function like un*x alias.
Value of symbol is "inlined" to the command line, and the substituted text is interpreted as ("new") command.
The word "may" applies regarding of the SET SYMBOL setting (check HELP SET SYMBOL for VERB description).
Be aware, that alias further explains to other real dcl syntax (true command, explicite "@" for procedure or "invisible" DCL$PATH use), but not to next symbol (alias or foreign command).
It it strongly not recommended to substitute any true DCL command with aliases, DO NOT this!
True command are set with the SET COMMAND command (obvious), the executable (.EXE image or internal DCL routine) names are not related in other way to the command name, even if most command has adequate names (the DIRECTORY command runs a SYS$SYSTEM:DIRECTORY.EXE etc, but APPEND runs COPY.EXE and HELP runs VMSHELP.EXE etc)
Path is used like in un*x, but:
Не думайте, что в OpenVMS это работает именно так, и на самом деле нет надежного способа. Для DCL-шоу большинство квалификаторов заканчивалось бы в SYS $ SYSTEM: SHOW.EXE, но без файла MAP не было бы способа выяснить, какой исходный модуль фактически вошел в этот исполняемый файл. DCL не похож на Bash, где он запускает-исполняет другой процесс и загружает образ этой команды.