Common awexe commands you may want to use in your scripts or to interface Applications Manager with other applications are described below.
The awserver_sql.dat file located in the data directory includes several commands used for Applications Manager background processes and general user utilities. This topic documents the commands that may be useful to you in your scripts or to interface Applications Manager with other applications. These commands can help you with actions such as:
Each command documented below includes a format, example, and command number. The command numbers correlate with each call's definition in the awserver_sql.dat file. For more information on a particular call, see the awserver_sql.dat file.
Activating Automation Engine and Agent Debug
To turn on automation engine and agent debug, use the awexe SCHEDULE_DEBUG call.
Format
awexe SCHEDULE_DEBUG START_TIME=<HH:mm> MINUTES=<mmm>
Example
In the example below, debug is turned on at 6:00 PM for 30 minutes.
>awexe SCHEDULE_DEBUG START_TIME=18:00 MINUTES=030
Updating a Substitution Variable or Creating a New Substitution Variable
To update an existing static substitution variable value, use the awexe upd_var_value call.
Format
awexe upd_var_value subvar=<subvar name> var_value=<value>
Example
In the example below, the value of the #success substitution variable is being set to Y.
>awexe upd_var_value subvar=#success var_value=Y
To create a new static substitution variable and set its value, use the awexe upd_var_value call with the flag=Y argument.
Format
awexe upd_var_value subvar=<subvar name> var_value=<value> flag=Y
Example
In the example below, the #success substitution variable is created with the value of Y.
>awexe upd_var_value subvar=#success var_value=Y flag=Y
Command Number
1900
Retrieving a Substitution Variable
To retrieve the value of a JDBC or Oracle SQL substitution variable, use the awexe get_var_value call.
Format
awexe get_var_value subvar=<subvar name>
Example
In the example below, the value for the #today substitution is returned.
> awexe get_var_value subvar=#today
27-jan-09
Command Number
1901
To take actions on one or more tasks, use the awexe aw_quemgr call.
Format
awexe aw_quemgr tranmode=<letter> jobids='<space separated run_ids inside single quotes>' so_user_name=<Applications Manager user name> password=<user password>
The following tranmode letters correspond to an action:
H-Hold task(s)
R-Reset task(s)
D-Delete task(s)
K-Kill task(s)
Example
In the example below, user PBROWN deletes run_id 65711.00.
> awexe aw_quemgr tranmode=D jobids=65711.00 so_user_name=PBROWN password=8uwc76
Success jobids processed
Command Number
2001
Retrieving a Multi Select Prompt Value
To return the value(s) from a multi select prompt, use the awexe multiselect_value call.
Format
awexe multiselect_value arg_1=<reference number>
Example
In the example below, a job included a multi select prompt that allowed an Applications Manager user to select one or more Applications Manager jobs. When the job was requested, the prompt's value was displayed as Ref=65772. The awexe multiselect_value call below returns the jobs selected for the prompt.
>awexe multiselect_value arg_1=65772
10_MINUTES
20_MINUTES
7147
ABORTER
AGENT_GROUP
Command Number
2004
Retrieving a Multi Select Prompt Description
To return the description(s) from a multi select prompt, use the awexe multiselect_descr call.
Format
awexe multiselect_value arg_1=<reference number>
Example
The example below returns the descriptions of jobs selected in a multi select prompt.
>awexe multiselect_descr arg_1=65772
10_MINUTES-Test Job
20_MINUTES-Test JOBl2
7147-Testing bug 7147
ABORTER-This will abort
AGENT_GROUP-agent groupl
Command Number
2005
Requesting Jobs and Process Flows
To request a job or process flow, use the awexe aw_run call.
Format
awexe aw_run so_job_command="<job/process flow name and arguments>" so_user_name=<Applications Manager user name> password=<user password>
You can type awrun -h and press Enter to view a list of awrun options.
The awexe aw_run call is equivalent to awrun. For more information, see awrun - The Command Line API for Requesting Tasks.
Example
In the example, TEST_JOB is requested on the EXPRESS queue with the alias TEST_JOB_VIA_AWRUN.
> awexe aw_run so_job_command="TEST_JOB -q EXPRESS -v TEST_JOB_VIA_AWRUN" so_user_name=SQLOPER password=s0pass
Command Number
2006
Getting Process Flow Names from Component Run IDs
To view a parent process flow's name when you provide a process flow component's run ID, use the awexe get_chain_name call.
Format
awexe get_chain_name jobid=<run ID number>
Example
An example is shown below.
> awexe get_chain_name jobid=689046
SAMPLE
Command Number
2007
To view a queue summary, use the awexe q call.
2010 Q SELECT 1000 0 OBD_CLS_COM_CONT NULL FETCH_ROW
# result #
Example
An example is shown below.
awexe q
BATCH #### 7 A 50 12
EXPRESS 7 0 A 10 9
JACK 9 0 A 50 11
MONITOR #### 0 A 50 12
PRIORITY 4 0 A 40 6
QUEUE00 8 0 A 50 10
RUTH 9 0 A 50 11
Total Qs #### 7 A 12
The awexe q call returns the following columns: queue, max threads, tasks in the Backlog, active or inactive status, priority, and thread schedule sequence.
Command Number
2010
To view an agent summary, use the awexe node call.
Example
An example is shown below.
/home/tech6/site $ awexe node
PROD6 Running 00:00:30 M 9999 6 0 0 0 1
PROD6 Running 00:00:17 A 9999 6 0 0 0 0
SOLARIS9 Stopped 84 Days A 2 1 0 0 0 0
WINXP Running 00:01:00 A 1 1 0 0 0 0
APPWORX_A G 0 0 0 0 0 1
The awexe node call returns the following columns: agent, status, elapsed time, automation engine/agent/group, max threads, tasks in the Backlog, running tasks, tasks on hold, aborted tasks, running scheduled tasks.
Command Number
2011
Starting or Stopping the Automation Engine
To start or stop the Applications Manager automation engine, use the use the awexe master command=start and awexe master command=stop calls.
Command Number
1028
To view tasks in the Backlog, use the awexe jq call.
Example
An example is shown below.
> awexe jq
65712.00 BATCH SAMPLE 01/27 15:29 HOLD PROD6
65713.00 BATCH PROMPT_EXAMPLE 01/27 15:29 STAGED_PW PROD6 JACK SAMPLE
65714.00 BATCH TEST_JOB 01/27 15:29 STAGED PROD6 JACK SAMPLE
65715.00 BATCH TEST_JOB.2A 01/27 15:29 STAGED PROD6 JACK SAMPLE
65716.00 BATCH TEST_JOB.3 01/27 15:29 STAGED_PW PROD6 JACK SAMPLE
65717.00 BATCH TEST_JOB.4 01/27 15:29 STAGED_PW PROD6 JACK SAMPLE
65718.00 BATCH TEST_JOB.5 01/27 15:29 STAGED_PW PROD6 JACK SAMPLE
The awexe jq call returns the following columns: run ID, queue, job/process flow/component, start date and time, task status, agent, parent process flow.
You can use the syntax awexe jq module=<ABC>% to return jobs, process flows, or components with names or aliases starting with the text entered as <ABC>.
Command Number
2012
To view tasks in History, use the awexe jh call. You can specify a number of minutes to look back using the format awexe jh minutes=<number of minutes>.
2013 JH SELECT 10000 0 OBD_CLS_COM_CONT NULL FETCH_ROW
minutes # result #
Examples
An example is shown below.
> awexe jh
65771.00 BATCH TEST_JOB 01/28 09:20 00:00:05 FINISHED TECH6
An example is shown below that specifies a number of minutes.
> awexe jh minutes=180
65771.00 BATCH TEST_JOB 01/28 09:20 00:00:05 FINISHED TECH6
65770.00 BATCH EXAMPLE_SCHEDULES 01/28 09:00 00:00:06 FINISHED
65769.00 BATCH SCHEDULES00 01/28 09:00 00:00:06 FINISHED
65768.00 BATCH EXAMPLE_SCHEDULES 01/28 08:00 00:00:06 FINISHED
65767.00 BATCH SCHEDULES00 01/28 08:00 00:00:06 FINISHED
The awexe jh call returns the following columns; run ID, queue, job/process flow/component, finished date and time, elapsed time, task status, requestor, parent process flow.
Command Number
2013
Viewing an RMI and Agent Connection Summary
To view a server and agent connection summary, use the awexe rmi_status call.
Example
An example is shown below.
> awexe rmi_status
Host IP Session Last Activity
Master n/a 28804 01/28/05 09:55:16
obiwan 200.1.1.2 0 05/28/04 15:50:18
obiwan 200.1.1.2 0 10/28/04 09:13:40
obiwan 200.1.1.2 28804 01/28/05 09:55:16
The awexe jh call returns the following columns: run ID, queue, job/process flow/component, finished date and time, elapsed time, task status, requestor, parent process flow.
Command Number
2020
Viewing an Applications Manager User Login Report
To view a report of Applications Manager user logins, use the awexe show_users call.
Example
An example is shown below.
> awexe show_users
JIRETON 555.1.1.301 11/20/06 08:34:57 Current
BILLG 222.1.1.024 11/20/06 08:47:08 Current
The awexe show_users call returns the following columns; Applications Manager user, IP address, date, time, status.
Command Number
2109