I would like to know two things with regards to submitting
jobs to a batch que.
1. Is there any way that I can submit a job in such a
way that it will not run my LOGIN.COM? I would
surely think there must be a way to make it run like
when I login with the /NOCOMMAND switch on. I have
exhausted all my resources for VAX tricks from every-
body I know.
2. When you submit a batch job, the log file gets its
protections from some system defaults somewhere (I
am guessing this part), rather than your own process
default protection. I would like to submit a batch
job and have the .LOG file take on my default
protections or let me specify the protections
upon submission.
As with most things, the lack of direct availablility of these features
on the SUBMIT command is a tradeoff between complexity of the interface
and demand. However, it is possible to achieve these goals indirectly.
1 - skip LOGIN.COM
You can't skip LOGIN.COM completely, but you can implement your own
message to control what sections are executed. Here's an example:
$ SUBMIT file /PARAMETER=P1="NOCOMMAND"
Now, in LOGIN.COM, you can test the parameter value:
$ IF F$MODE().EQS."BATCH"
$ THEN
$ entry = F$GETQUI("DISPLAY_JOB","ENTRY_NUMBER",,"THIS_JOB")
$ P1 = F$GETQUI("DISPLAY_ENTRY","PARAMETER_1",entry,"")
$ IF P1.EQS."NOCOMMAND" THEN EXIT
$ ENDIF
2 - control protection of log file
The default SOGW protection mask for the log file is taken from the
SYSGEN parameter RMS_FILEPROT.
Without changing that parameter you cannot directly change the
protection of the log file. However if you use a "jacket" procedure,
you *can* adjust the protection of the "effective" log file. For example:
$ SUBMIT JACKET.COM
Where JACKET.COM contains commands similar to:
$ SET PROTECTION=whatever you like
$ @realprocedure/OUTPUT=real-logfile "''p1'", "''p2'", "''p3'", -
"''p4'", "''p5'", "''p6'", "''p7'", "''p8'"
If you wish to specify the protection on the SUBMIT command, you
could use one of the parameters to pass the protection mask to
the job. For example:
$ SET PROTECTION=('p2')
Depending on your needs, you could make the jacket procedure generic,
passing the name of the command procedure by parameter as well.
Another option would be to direct the logfile to a particular
directory which has a DEFAULT_PROTECTION ACE or OPTIONS=DEFAULT
ACEs which specify your precise protection requirements. Similarly,
creating a file with the same name as the log file and setting its
security (SOGW and ACL) will result in that security profile being
propogated to the new file. For example:
$ CREATE PROC.LOG
$ SET PROT=(S:RWED,O:RWED,G,W:RE)
$ SUBMIT PROC
See Section 8.1 in the V6 OpenVMS Guide to System Security (in
particular Figure 8-1) for details of how OpenVMS decides on the
ownership and protection of a file.