2.7.3 Defining jobs as PC or UNIX jobs
- Organization of this subsection
(1) Defining jobs as PC jobs
This subsection explains the items required to define JP1/Advanced Shell batch jobs as PC jobs.
(a) When defining a batch job
-
Executable file name
Specify the path of the adshexec command in Executable file name in the Definition tab in the Define Details - [PC Job] dialog box or in sc="script-file-name" in the unit definition file.
installation-folder\JP1ASE\bin\adshexec.exe
-
Parameters
Specify the options, job definition script file name, and runtime parameters for the adshexec command in Parameters in the Definition tab in the Define Details - [PC Job] dialog box or in prm="parameter" in the unit definition file.
-
Environment variable
Specify the following details in Environment variables in the Definition tab in the Define Details - [PC Job] dialog box or in env="environment-variable" in the unit definition file.
AJS_BJEX_STOP=TERM
The following figure provides an example specification of a batch job in JP1/Advanced Shell.
(b) When defining a GUI application execution job
This section explains the items required to define a GUI application execution job of JP1/Advanced Shell as a PC job.
-
Executable file name
Specify the path of the adshappexec command in Executable file name in the Definition tab in the Define Details - [PC Job] dialog box or in sc="script-file-name" in the unit definition file.
installation-folder\JP1ASE\bin\adshappexec.exe
-
Parameters
Specify the parameters for the adshappexec command in Parameters in the Definition tab in the Define Details - [PC Job] dialog box or in env="parameter" in the unit definition file.
-
Environment variables and environment variable file name
Environment variables and the environment variable file name are ignored even if they are specified.
The following figure provides an example specification of a batch job in JP1/Advanced Shell.
(2) Defining jobs as UNIX jobs
This subsection explains the items required to define JP1/Advanced Shell batch jobs as UNIX jobs.
-
Script file name
Specify the path of the adshexec command in Script file name on the Definition tab in the Define Details - [UNIX Job] dialog box or in sc="script-file-name" in the unit definition file:
/opt/jp1as/bin/adshexec
Alternatively, you can specify the path of the adshexec command following #! on the first line (example: #!/opt/jp1as/bin/adshexec), and then specify the path of the job definition script file with execution permissions granted:
Path of job definition script file
-
Command statement
You can specify, as part of command text, the path of the adshexec command or path of the job definition script file in the same way as for the script file name. Specify the path in Command statement on the Definition tab in the Define Details - [UNIX Job] dialog box, or in te="command-text" in the unit definition file. If a job defined in the command statement is terminated forcibly in JP1/AJS, the following restrictions apply.
-
Depending on the timing at which forced termination is performed, you might not be able to reference the contents of the job execution log or standard error output for the job from JP1/AJS - View. In this case, you can check the contents of the job execution log in the spool job directory.
-
Jobs with return code 143 are output to the job execution log. However, jobs with return code -1 can be referenced from JP1/AJS - View.
-
Parameters
Specify the options, job definition script file name, and runtime parameters for the adshexec command in Parameters on the Definition tab in the Define Details - [UNIX Job] dialog box or in prm="parameter" in the unit definition file.
If you specified a job definition script file name for the script file name, specify only the runtime parameters.
Environment variables
Specify the following value in Environment variables on the Definition tab in the Define Details - [UNIX Job] dialog box or in env="environment-variable" in the unit definition file:
AJS_BJEX_STOP=TERM
The following figure shows a specification example of a JP1/Advanced Shell batch job In this example, the adshexec command is specified for "script file name" and job definition script file path is specified.