The Job Execution Control uses the job submitter's login shell (information registered in the password entry) at job startup. If the login shell is the C shell, note the following.
Changing the .logout file
When the .logout file exists in the job submitter's home directory, care must be taken. When the Job Execution Control starts the job, it executes the shell script by logging in internally. Therefore, when the ".logout" file exists, the commands described in the ".logout" will be executed after the shell script execution. This will result in the completion code specified by the shell script lost. To prevent this from occurring, it is necessary to change the .logout file as follows.
Example of changing the .logout file
@ sts = $status if ( $?ENVIRONMENT == 0 ) then clear echo 'Bye Bye' if(`tty ` == '/dev/console') echo "" else exit($sts) endif
Save the completion code of the shell script execution specified as a job in the temporary variable sts. Then, when executing the job with the Job Execution Control, skip the usual processes and complete with the saved completion code. Or, when not executing the job with the Job Execution Control, carry out the usual processes.
Whether or not the job is executed with the Job Execution Control is determined by whether the environment variable ENVIRONMENT is set to "BATCH." Therefore, when the environment variable ENVIRONMENT is set to "BATCH", the job is assumed to be executed with the Job Execution Control.
When "Warning: No access to "tty"; thus no job control in this shell..." is output as the job output result (previous history):
The above message is output when the C shell cannot obtain the terminal (tty) attribute.
Since this is from the C shell specifications, Operation Manager cannot prevent this message from being output.
With the Job Execution Control, the job is executed as if a logged-in user had executed the shell script.
Although the original login secures the terminal device, the Job Execution Control does not secure the terminal device resulting in the above message as the C shell has not obtained the terminal attribute.
Unless the shell script started by the Job Execution Control executes any process depending on the terminal attribute, there will be no other affect than the above message output.