3.1.4.4 Parameters and Options

artjesadmin supports the following parameters and options:

-h
Option -h prints artjesadmin usage information as listed above.
-v
Option -v indicates the current version of Oracle Tuxedo Application Runtime for Batch.
-f
The security profile file generated by genjesprofile. The default value is ~/.tuxAppProfile. It requires the owner of the security profile must be the user who runs artjesadmin. The user name in this profile is the owner of the submitted jobs. A job without a specified owner is assigned the owner name "*".
A job with a particular owner can only be controlled by that owner. A job without a particular owner (*) can be controlled by anyone. Any user can print all jobs.

Note:

  • If -f profile is specified, the specified profile file will be used;
  • If -f is specified while profile is not, ~/.tuxAppProfile will be used as the profile file;
  • If -f is not specified, nothing will be used as the profile file.
-p and -j
Option -p and -j are added to get job status without interaction in artjesadmin console.
The following table lists the exit codes for artjesadmin if -p is specified.

Table 3-2 Exit Code

Exit Code Descriptions Notes
0 Job is finished normally. Job status = DONE A job is finished successfully.
1 Command execution fails. The failure is caused by an internal error, a network error, or a syntax error.
3 Job status = FAIL JOB execution fails.
4 Job status = CANCEL A job is canceled.
5 Job status = CONVING A job is waiting for conversion.
6 Job status = EXECUTING A job is running.
7 Job status = HOLD_CONVING A job is in hold state without conversion.
8 Job status = HOLD_WAITING A job is in hold state after conversion.
9 Job status = WAITING A job is waiting for execution.
10 Job status = DISCARD This status will occur if tpenqueue() fails.
11 Job status = INDOUBT When a job is running, if JES server ARTJESINITIATOR is shutdown and then restarted, the job status will be INDOUBT.
22 Job does not exist. N/A
Information shown in the following table is printed to stdout in the following format.
<JOBID>,<JOBNAME>,<JOBSTATUS>,<JOB RETURN CODE>

Table 3-3 Standard Output

Output Content Descriptions Sample
<JOBID> Job ID 00005097
<JOBNAME> Job name JOBA
<JOBSTATUS> Job current status DONE
<JOB RETURN CODE> Job return code from EJR (only available if a job has finished) C000

Listing Sample: Job has been Finished Normally

00000002,JOBA,DONE,C0000

Listing Sample: Job is Finished but Fails

00000002,JOBA,FAILED,U0568

Listing Sample: Job is Running

00000002,JOBA,EXECUTING
-x showjobexec|resumejobexec|stopjobexec [[lmid=machine|grpid=groupid|grpid=groupid,srvid=serverid];...]
Option -x is specified to control ARTJESINITIATOR servers. It must be showjobexec, resumejobexec, or stopjobexec. For more information, see Sub Commands.
-t <timeout>
Option -t <timeout> is specified to control the timeout threshold when submitting a job in synchronous mode, asynchronous mode, or console mode. With -t option, an integer can be specified to control the timeout. In the absence of a timer, clients will be left waiting indefinitely.
  • In synchronous mode, the timer is used to wait for the job (from submission to execution) to finish.
  • In asynchronous mode or console mode, the timer is used to wait for the job (submission only) to finish.
-T
Option -T is specified to submit a job in test mode, which only do checks rather than executing this job. For more information about test mode, see -t file|NULL argument in EJR Syntax.
-o <Job Execution Engine Options>
-o can be used to pass special options to the job execution engine. If the job is in KSH, the options are passed to KSH execution engine; if the job is in JCL, the options are passed to native JCL execution engine.
  • Available options for KSH Execution Engine are listed as follows.
    -o “-f <envfile>”
    Specifies full path of the environment file that includes environment variables for the current job. It must conform to syntax of shell script. In this file, environment variables must be set with “export <KEY>=<VALUE>” or “<KEY>=<VALUE>;export <KEY>”.
  • Available options for JCL Execution Engine are listed as follows.
    -o “-e <envfile>”
    Specifies full path of the environment file that includes environment variables for the current job. It must conform to syntax of “<KEY>=<VALUE>” format.
-y
Option -y is added to submit a job in the synchronous way. This option enables synchronous mode to wait for job end.

Note:

To submit a job in synchronous way, in TuxJES Configuration File, you must set EVENTPOST=A.
The following table lists the exit codes for artjesadmin if -y is specified.

Table 3-4 Exit Code

Exit Code Descriptions Notes
0 Job is finished successfully. N/A
1 Command execution fails. The code will be returned by either invalid timeout value or a command line syntax error.
2 Job conversion fails. Job is submitted successfully, but job conversion fails.
3 Job execution fails. Job is submitted successfully, but job execution fails.
4 Job is canceled. Job is submitted successfully, but is canceled before reaching final status.
20 Timeout occurs. Job has not been finished within the time specified by -t option.
Information shown on the following table will be printed to stdout in the following format.
<JOBID>,<JOBNAME>,<JOBSTATUS>,<JOB RETURN CODE> 

Table 3-5 Standard Output

Output Content Descriptions Sample
<JOBID> Job ID 00005097
<JOBNAME> Job name JOBA
<JOBSTATUS> Job final status (only available if job is finished before the timeout occurs) DONE
<JOB RETURN CODE> Job return code from EJR (only available if a job is finished before the timeout occurs) C000

Listing Sample: Job is Executed Successfully

00000002,JOBA,DONE,C0000

Listing Sample: Job Fails

00000002,JOBA,FAILED,U0568

Listing Sample: Timeout Occurs

00000002,JOBA,Already Timeout!
-i
Option -i is specified to submit KSH jobs. scriptfile must be full path or relative path to APPDIR environment variable, or to JOBREPOSITORY configuration item.
-I
Option -I is specified to submit JCL jobs. scriptfile must be full path or relative path to APPDIR environment variable, or to JOBREPOSITORY configuration item.
-x settracelevel [trclvl=trace_level[,[lmid=machine|grpid=groupid|grpid=groupid,srvid=serverid];...]]
Option -x settracelevel is specified to set the TuxJES trace message level. For more information, see Sub Commands.
-x setjesacl aclfile=rulepath[,aclfiletype=PLAIN|ENCRYPTED[,aclmode=MAC|DAC]]
Option -x setjesacl is specified to change job access authorization. For more information, see Sub Commands.