•
•
• TuxJES is an Oracle Tuxedo application. Most of the TuxJES components are Oracle Tuxedo client or Oracle Tuxedo servers. You must first configure TuxJES as an Oracle Tuxedo application. The environment variable JESDIR must be configured correctly which points to the directory where TuxJES installed.Listing 1 shows is an Oracle Tuxedo configuration file (UBBCONFIG) example segment for a TuxJES system.The following TuxJES servers should be included in the Oracle Tuxedo configuration file (UBBCONFIG):
Note: For the TuxJES administration server ARTJESADM, a TuxJES configuration file should be specified using the -i option. In the Oracle Tuxedo configuration file (UBBCONFIG), ARTJESADM should be configured in front of ARTJESCONV, ARTJESINITIATOR, or ARTJESPURGE servers.You can specify the number of timeout periods for blocking messages, transactions, and other system activities by setting the SCANUNIT and BLOCKTIME parameter. The value you assign must be a positive multiple of 5.
Controls the granularity of checking intervals and timeouts. SCANUNIT must be a multiple of 5 and between 0 and 60 seconds.Example: SCANUNIT 20The default is 10. BLOCKTIME controls how much time can a message block before it times out.SCANUNIT * BLOCKTIME must not exceed 32767.The default time of SCANUNIT * BLOCKTIME is approximately 60 seconds.Listing 2 Example SettingsA /Q queue space with name JES2QSPACE must be created for a TuxJES system. And some /Q queues should be created within this queue space. TuxJES provides a sample shell script (jesqinit) to create the queue space (JES2QSPACE) and the queues. For more information, see the Oracle Tuxedo Application Runtime Batch Reference Guide.The root directory to store job information. It is a mandatory attribute. If this directory does not exist, ARTJESADM creates it automatically.The default job class if the job class is not set in JCL. It is an optional attribute. The default job class is A if this attribute is not set.If it is not set, only one job can be in execution status for a job name. NODELAY will remove the dependency check. The default value is delay execution.S: Job submission event.C: Job conversion complete event.E:Job execution complete event.P: Job purge event.L: Job cancel completed event.A: all supported events.If EVENTPOST is not specified, no events are posted. The data buffer with event post is FML32 type and the fields are defined in tuxjes/include/jesflds.h.The path of the job repository where jobs are stored. The script file path inputted in job submitting may be a relative path in JOBREPOSITORY if it is set.Specifies whether and how to enable the user substitution (See TuxJES User Substitution). The values are:NONE: Default value. Indicates jobs are executed by the OS user who starts JES system. This is compatible with all previous implementations on JES system.USER_IDENTICAL: Indicates jobs are executed by the Oracle Tuxedo user with which JES client joins JES system. Make sure that each Oracle Tuxedo user corresponds to an existing OS user before you choose this value.USER_MAPPING: When this value is specified, the JES system looks up the TuxJES user mapping file and finds out the OS user corresponding to the Oracle Tuxedo user with which JES client joins JES system, and then appoints this OS user as the job executor.The full path where TuxJES user mapping file is stored. It is used along with PRIVILEGE_MODE when its value is USER_MAPPING.TuxJES Security ConfigurationTuxJES leverages the Oracle Tuxedo security mechanism to implement authentication. If authentication is enabled, a security profile should be generated using the genapprofile utility and it should be used as a artjesadmin parameter to access the TuxJES system. The user used in the profile will be the job owner. A job only can be administrated by its owner, such as cancel, purge, hold and release. A job can be viewed by everybody. If a job is without owner, it can be manipulated by everyone.Even if an Oracle Tuxedo application does not have security configured, the genjesprofile utility still can be used to enforce job owner permission checking and store the database connection MT_DB_LOGIN.User mapping file is loaded and takes effect when PRIVILEGE_MODE value is specified to MAPPING_CREDENTIAL. It defines the mapping relationship between Oracle Tuxedo users and OS users. Every line in the mapping file is in the format as below:Listing 3 shows a segment example of user mapping file for the TuxJES system.After the TuxJES system starts, you can use the artjesadmin utility to submit a job, hold a job, release a job, cancel a job, purge a job, display the job information, or subscribe event for job status change.The scriptfile parameter is the job script to be submitted. The job script is generated by Oracle Tuxedo ART Workbench from a JCL.It can be an absolute path format, a relative path in the current working directory, or a relative path in JOBREPOSITORY if it is set. Its length is limited to 1023.artjesadmin also supports direct job submission using the following format:
artjesadmin -i scriptfileYou can submit a job in synchronous way by using artjesadmin with the following format:
Note: To submit a job in synchronous way, in TuxJES Configuration File, it's required to set EVENTPOST=A; in UBBCONFIG file, it’s required to set NOTIFY to DIPIN and set server TMUSREVT.-y and -t
Table 2 Option -y and -t Descriptions While timeout occurs, artjesadmin command line will exit but the job will run by JES continuously without impact.
Table 3 Exit Code Information shown on Table 4 will be printed to stdout in the following format.
Table 4 Standard Output Listing 4 Sample: Job is Executed SuccessfullyListing 5 Sample: Job Fails00000002,JOBA,FAILED,U0568Listing 6 Sample: Timeout OccursYou can display the information of a job or a series of jobs using the artjesadmin subcommand printjob:-n jobname: Display jobs with given job name-j jobid: Display a particular job information-c job_class: Display a particular class jobs information-a: Display all jobs-v: Verbose modeThe output of the printjob subcommand includes:EXECUTING: a job is runningCONVING: a job waiting for conversionWAITING: a job waiting for executionDONE: a job finished successfullyFAIL: a job finished but failedHOLD_WAITING: a job is in hold state after conversionHOLD_CONVING: a job is in hold state without conversionINDOUBT: a job is in doubt state due to its initiator restartedCANCELED: a job is canceled
• For more information about how to set block time, please refer to Block Time in UBBCONFIG for TuxJES.You can get job status in synchronous way by using artjesadmin with the following format:-p and -jTable 5 lists the exit codes for artjesadmin if -p is specified.
Table 5 Exit Code Job status = DONE Job status = FAIL Job status = CANCEL Job status = CONVING Job status = EXECUTING Job status = HOLD_CONVING Job status = HOLD_WAITING Job status = WAITING Job status = DISCARD This status will occur if tpenqueue() fails. Job status = INDOUBT When a job is running, if JES server ARTJESINITIATOR is shutdown and then restarted, the job status will be INDOUBT. Information shown on Table 6 will be printed to stdout in the following format.
Table 6 Standard Output Listing 7 Sample: Job has been Finished Normally00000002,JOBA,DONE,C0000Listing 8 Sample: Job is Finished but Fails00000002,JOBA,FAILED,U0568Listing 9 Sample: Job is Running00000002,JOBA,EXECUTINGYou can hold a job or a series of jobs which are in CONVING or WAITING status using the artjesadmin subcommand holdjob:-n jobname: hold jobs with given job name-j jobid: hold a particular job-c job_class: hold a particular class jobs-a: hold all jobsYou can release a job or a series of jobs which are in HOLD_WAITING or HOLD_CONVING status using the artjesadmin subcommand releasejob:-n jobname: release jobs with given job name-j jobid: release a particular job-c job_class: release a particular class jobs-a: release all jobs-n jobname: cancel jobs with given job name-j jobid: cancel a particular job-c job_class: cancel a particular class jobs-a: cancel all jobs-n jobname: purge jobs with given job name-j jobid: purge a particular job-a: purge all jobsCompleted jobs in the DONE or FAIL status are moved to the purge queue. For other jobs, purgejob has same effect as canceljob. The purgejob command does not purge the job directly. The ARTJESPURGE server deletes the job from the TuxJES system.You can display the number of maximum concurrent executing jobs of an ARTJESINITIATOR server using the artjesadmin subcommand printconcurrent:You can change the number of maximum concurrent executing jobs of an ARTJESINITIATOR server using the artjesadmin subcommand changeconcurrent:-n concurrent_num: the number of maximum concurrent executing jobsC: job conversion complete eventE: job execution finish eventP: job purge eventL: job cancel completed eventA: all supported events. If the event is set to "on", A is the default.on |off: The submission is on or off. the "on" setting can be used with the -t option.After subscribing to an event, you are notified on the artjesadmin console when the corresponding event is generated.