Operating System - OpenVMS
1828342 Members
3295 Online
109976 Solutions
New Discussion

Logicals in detached processes / Finding the input file

 
Mohren
Occasional Advisor

Logicals in detached processes / Finding the input file

I do not understand the handling of logicals in detached processes. When I start a detached process where the input file is in the actual directory, everything is fine.
E.g.
run /detached /input=input_file.com sys$system:loginout
When I try to get the input file from another directory, I get an error
E.g.
run /detached /input=mydir:input_file.com sys$system:loginout
The error I get in the output file seems to tell me that he cannot open the input file:
Error opening primary input file sys$input
Error in file name
mydir is defined in system table, so he should find it. Besides, when I put a show logical * in the local input file, it shows that he knows mydir
Thanks in advance for your help
9 REPLIES 9
Robert Gezelter
Honored Contributor

Re: Logicals in detached processes / Finding the input file

Mohren,

You are likely encountering a protection problem.

Do two things:
- Add a SHOW PROCESS/ALL following the SHOW LOGICAL
- Do a DIRECTORY/SECURITY on the file that you are having trouble accessing (and its directory).

- Bob Gezelter, http://www.rlgsc.com
Jan van den Ende
Honored Contributor

Re: Logicals in detached processes / Finding the input file

Mohren,


mydir is defined in system table


but is it defined /EXEC (and any LNM in its translation path, up till the FYSICAL device name)?

LOGINOUT is (obviously) a privileged image.
Those should (and do) honour only privileged mode ( ie, EXEC) logicals.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
John Gillings
Honored Contributor

Re: Logicals in detached processes / Finding the input file

Mohren,

>LOGINOUT is (obviously) a privileged
>image. Those should (and do) honour only
>privileged mode ( ie, EXEC) logicals.

Rare to catch Jan making a mistake. Sorry, this is not true!

As long as the logical name is visible to the detached process, the file can be found and executed (try it yourself).

If you can execute a procedure from your login directory, use one for debugging:

sys$login:test.com
$ show logical/full mydir
$ dir/full mydir:input_file.com
$ type mydir:input_file.com
$ @mydir:input_file.com

now execute it detached
$ run/detached/input=test.com/out=test.log sys$system:loginout

check the dir, type or "@" commands for errors.
A crucible of informative mistakes
Mohren
Occasional Advisor

Re: Logicals in detached processes / Finding the input file

Thank you for alle your answers. I do not see a protection problem, as the file and the directory has RWE on all levels. But there might be some security problem, for the command works fine when I put input_file.com in my home directory, and start it from there.
I then tried to define the logical in exec mode, but it did not help either. I then tried test.com as given by John, and it worked fine! He showed me all the logicals, and even started mydir:input_file.com. But without this com file in between, it still does not work.
acco/full/id= for the generated process gives me a final status code 000184C4: %RMS-F-DEV, error in device name or inappropriate device type
Wim Van den Wyngaert
Honored Contributor

Re: Logicals in detached processes / Finding the input file

(already posted it on previous thread)
I think it's the f$parse you need.
/input='f$parse("file")'
Idem for /output and /error.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: Logicals in detached processes / Finding the input file

I just tested it on 6.2 and 7.3. These systems do not need the f$pars. The f$pars was however added because of the error message you get. But it could be because of VAX 5.5 or a setup of the logicals that was different many years ago.

Good luck

Wim
Wim
Mohren
Occasional Advisor

Re: Logicals in detached processes / Finding the input file

Thank you for your help. I think that I have found the problem now by myself. It was a initialization for external modules used by my program which destroyed my lnm$file_dev (my logical name tables where deleted from lnm$file_dev).
Mohren
Occasional Advisor

Re: Logicals in detached processes / Finding the input file

Thank you for your help. I think that I have found the problem now by myself. It was a initialization for external modules used by my program which destroyed my lnm$file_dev (my logical name tables where deleted from lnm$file_dev).
Wim Van den Wyngaert
Honored Contributor

Re: Logicals in detached processes / Finding the input file

Found it. My script conditionally used group or job logicals that were not seen by loginout (used /uic).

Wim
Wim