Control-M API v8 PDF
Control-M API v8 PDF
Control-M API v8 PDF
8.0.00
API Guide
November 2012
www.bmc.com
Contacting BMC Software
You can access the BMC Software website at http://www.bmc.com. From this website, you can obtain
information about the company, its products, corporate offices, special events, and career opportunities.
United States and Canada
Address BMC SOFTWARE INC Telephone 713 918 8800 Fax 713 918 8000
2101 CITYWEST BLVD 800 841 2031
HOUSTON TX
77042-2827
USA
Telephone (01) 713 918 8800 Fax (01) 713 918 8000
2
Support website
You can obtain technical support from BMC 24 hours a day, 7 days a week at
http://www.bmc.com/support. From this website, you can:
Read overviews about support services and programs that BMC offers
Find the most current information about BMC products
Search a database for issues similar to yours and possible solutions
Order or download product documentation
Download products and maintenance
Report an issue or ask a question
Subscribe to receive proactive e-mail alerts when new product notices are released
Find worldwide BMC support center locations and contact information, including e-mail addresses, fax
numbers, and telephone numbers
Support by telephone or e-mail
In the United States and Canada, if you need technical support and do not have access to the web, call 800
537 1813 or send an e-mail message to [email protected]. (In the subject line, enter
SupID:<yourSupportContractID>, such as SupID:12345). Outside the United States and Canada,
contact your local support center for assistance.
Before contacting BMC
Have the following information available so that Customer Support can begin working on your issue
immediately:
Product information
• Product name
• Product version (release number)
• License number and password (trial or permanent)
Operating system and environment information
• Machine type
• Operating system type, version, and service pack or other maintenance level such as PUT or PTF
• System hardware configuration
• Serial numbers
• Related software (database, application, and communication) including type, version, and service
pack or maintenance level
Sequence of events leading to the issue
Commands and options that you used
Messages received (and the time and date that you received them)
• Product error messages
3
• Messages from the operating system, such as file system full
• Messages from related software
License key and password information
If you have questions about your license key or password, contact BMC as follows:
(USA or Canada) Contact the Order Services Password Team at 800 841 2031, or send an e-mail
message to [email protected].
(Europe, the Middle East, and Africa) Fax your questions to EMEA Contracts Administration at +31 20
354 8702, or send an e-mail message to [email protected].
(Asia-Pacific) Contact your BMC sales representative or your local BMC office.
For the provisions described in the BMC License Agreement and Order related to third party products or
technologies included in the BMC Product, see the "ThirdParty" subdirectory in the installation directory of
this product.
4
Contents
Introduction to Control-M/EM API .................................................................................... 8
Related sections .............................................................................................................................9
Conventions ................................................................................................................................. 10
Syntax statements ........................................................................................................................ 10
How Control-M/EM API works ....................................................................................................... 11
Control-M/EM API sessions............................................................................................................ 12
5
User Registration .......................................................................................................................... 57
Check user token validity .............................................................................................................. 61
Client Keep Alive .......................................................................................................................... 64
6
Uninstalling Control-M/EM API ..................................................................................... 256
7
1
Chapter
1
Introduction to Control-M/EM API
Control-M/EM API is an open interface for external applications that enables you to use the capabilities of
Control-M/EM and Control-M Workload Automation.
Control-M/EM API enables users of your application to perform the following functions in the Control-M
Business Integrated Scheduling environment:
log a user in or out of Control-M Workload Automation.
create jobs and SMART Folder in the Control-M Active Jobs database
order jobs
order SMART Folders
track job execution
add or delete Conditions
change Alert status
check the validity of user tokens
create Job and SMART Folder Definitions
delete Job Definitions
upload Folders to Control-M/Server
retrieve jobs from Control-M Active Jobs Database
perform job actions such as Hold, Release, Rerun, Confirm, Kill and Set to OK
8
Control-M Workload Automation API Guide
Related sections
The following related publications/on-line help supplement this section:
Core section/ Control-M for z/OS User Manual Describes all Control-M concepts, features,
documents facilities and operating instructions in
detail. It can be used as a learning guide as
well as a reference guide.
Control-M Workload Automation Utilities Describes the utilities used for creating and
managing objects in the job production
environment and maintaining various
aspects of Control-M Workload
Automation.
Notices Release notes, flashes, technical bulletins Describes up-to-date information such as:
Updates to the installation instructions
Last-minute product information
9
Control-M Workload Automation API Guide
Conventions
This book uses the following special conventions:
All syntax, operating system terms, and literal examples are presented in this typeface.
Variable text in path names, system messages, or syntax is displayed in italic text:
testsys/instance/fileName
The symbol => connects items in a menu sequence. For example, Actions > Create Test instructs
you to choose the Create Test command from the Actions menu.
Syntax statements
The following example shows a sample syntax statement:
COMMAND KEYWORD1 [KEYWORD2 | KEYWORD3] KEYWORD4={YES | NO} fileName...
The following table explains conventions for syntax statements and provides examples:
Item Example
A vertical bar means that you can choose only {commit | cancel}
one of the listed items. In the example, you
{-commit | -cancel} (UNIX)
would choose either commit or cancel.
10
Control-M Workload Automation API Guide
Initialization
Before sending requests, Control-M/EM API must be initialized. Initializing the API starts the CORBA layer
that forwards requests from the client side of the API to the Control-M/EM GUI Server and the Global Alerts
Server.
Connecting to Control-M/EM
In this version of the API, a developer can interact with two Control-M/EM server components:
GUI Server
Global Alerts Server
The developer initializes an instance of either EMXMLInvoker or EMBasicXMLInvoker, and chooses with
which component to communicate. An unlimited number of requests can be sent using the invoke method of
the EMXMLInvoker or EMBasicXMLInvoker that was instantiated. For more information about the difference
between the EMXMLInvoker and EMBasicXMLInvoker methods, see Control-M/EM API programming
methods (on page 33).
11
Control-M Workload Automation API Guide
To illustrate this concept, an example of a Control-M/EM API session is presented in the following example.
The actions of the program user are shown together with the corresponding actions that your program must
perform to use Control-M/EM API.
Session example
The user logs in to a program, submits a Job Creation request to Control-M/EM, and logs off.
To submit a Job Creation request:
1. The user logs on to the host computer of the program that uses Control-M/EM API.
2. The user starts the program that uses Control-M/EM API.
3. The user logs in to Control-M/EM (sends a Registration request).
4. The user performs an action that results in a Job Creation request, for example, being sent to
Control-M/EM.
5. The user receives confirmation that the request was submitted.
6. The user performs additional actions that result in other requests being sent to Control-M/EM.
7. The user logs out of Control-M/EM (sends an unregistration request).
12
Control-M Workload Automation API Guide
1 Log in None
End user logs on to a remote computer
to use a program that uses the
Control-M/EM API.
13
Control-M Workload Automation API Guide
8 User makes additional requests Additional requests can be sent and handled using the same
EMBasicXMLInvoker instance obtained in step 2 and the user
token obtained in step 4.
9 User Logs off of Control-M/EM API (client side) sends Unregister request
Required actions:
Submit Unregister request. Use the invoke method,
supplying the Unregister request string as a parameter.
The request includes the user token obtained in Step 4.
14
2
Chapter
2
Control-M/EM API Installation
The Control-M/Enterprise Manager API is supplied as a compressed file. When decompressed, this file
creates a directory structure containing the Control-M/EM API files.
NOTE: To upgrade from previous versions of the Control-M/EM API, follow the instructions in Control-M/EM
API Upgrade (on page 21).
Compatibility
This section provides information about software compatibility for the Control-M/EM API.
Control-M/EM API is fully compatible with the following version of Control-M/EM:
Control-M/EM version 8.0.00
Control-M/EM version 7.0.00
Control-M/EM API is fully compatible with the following versions of Control-M:
Control-M/Server for UNIX and Windows version 8.0.00
Control-M/Server for UNIX and Windows version 7.0.00x
Control-M for z/OS version 8.0.00
Control-M for z/OS version 7.0.00x
Control-M/Server for UNIX and Windows version 6.4.0x
Control-M for z/OS version 6.3.0x
Control-M/Server for UNIX and Windows version 6.3.0x
Control-M/Server for Windows version 6.2.0x
Control-M/Server for UNIX version 6.2.0x
Control-M for OS/390 and z/OS version 6.2.0x
15
Control-M Workload Automation API Guide
16
Control-M Workload Automation API Guide
Directory Description
emapi-800\classes Contains the EMAPI libraries and third-party libraries that include
the following files:
jacorb.jar
Java implementation of CORBA (refer to the JacORB
copyright/license in this guide).
NamingViewer.jar
Java library used by the NamingViewer utility.
emapi.jar
The API implementation files.
log4j-1.2.8.jar
Files used by the API logging facility.
emapi-800\xmldata Contains the schema files that validate the XML formatted request
strings sent and received using the API.
17
Control-M Workload Automation API Guide
18
Control-M Workload Automation API Guide
Configuration files
These differences, and the names of other files that are used during configuration, are described in the
following table.
Name Description
emapi-configure.bat Creates configuration files and enables the API to access other key
(Windows) components.
emapi-configure These components include:
(UNIX)
CORBA Naming Service
Control-M/EM GUI Server
Global Alerts Server
19
Control-M Workload Automation API Guide
Name Description
NamingViewer.vbs Starts a Java GUI utility that displays the Naming Service repository
(Windows) graphically. For more information, see Control-M Workload
Automation Administration.
NamingViewer
(UNIX)
changePass.bat Encrypts the keystore password for demo certificates. This utility is
(Windows) located in the emapi_root directory. For more information, see
Control-M Workload Automation SSL Management.
changePass
(UNIX)
20
3
Chapter
3
Control-M/EM API Upgrade
This section describes how to upgrade to Control-M/EM API version 8.0.00.
Upgrade considerations
The Control-M/EM upgrade procedure (described in Control-M Workload Automation Installation and
Control-M Workload Automation Upgrade ) does not upgrade Control-M/EM API. Install and configure
Control-M/EM API separately after upgrade.
Do not copy the Control-M/EM API version 8.0.00 files directly over the previous installation This may cause
unpredictable behavior.
21
Control-M Workload Automation API Guide
table folder
table_info folder_info
table_rba folder_rba
into_table into_folder
table_id folder_id
is_table is_folder
22
Control-M Workload Automation API Guide
Control-M/EM version 7.0.00 introduces new terminology: "table" and "SMART Table," which replaces
the terms "scheduling table" and "group scheduling table." The new terminology is reflected in
requests/responses that are described in the XML schema for version 7.0.00 (EMAPI_700.xsd).
The following table lists the elements that have been renamed in version 7.0.00 to reflect the new
terminology:
sched_table table
scheduling_group_info table_info
group_rba table_rba
into_group into_table
group_id table_id
is_group is_table
23
Control-M Workload Automation API Guide
24
4
Chapter
4
Control-M/EM API environment
You must perform a number of steps in your project to prepare it to use Control-M/EM API.
25
Control-M Workload Automation API Guide
Sample class
A sample class is displayed:
EXAMPLE: import com.bmc.ctmem.emapi.*;
public class EMAPISample {
public EMAPISample() {
}
/** run once before submitting requests */
public void do_init(String[] args) {
EMXMLInvoker.init(args);
}
/** run once before exiting the program */
public void do_terminate() {
EMXMLInvoker.done();
}
/** This submits the XMLRequest received as a parameter
* and returns the response */
public String submit_request(String XMLRequest) {
String XMLResponse="";
26
Control-M Workload Automation API Guide
// Creates a component
ComponentType gsr_comp = new GSRComponent();
// Creates a new EMXMLInvoker instance
EMXMLInvoker my_invoker = new EMXMLInvoker(gsr_comp);
try {
// Submits the request given as a parameter
XMLResponse = my_invoker.invoke(XMLRequest);
}
catch(InvokeException i) {
// must handle InvokeException
}
return XMLResponse;
}
}
27
Control-M Workload Automation API Guide
4. Run the java command from the project working directory, using the following CORBA parameters:
These parameters are needed by Control-M/EM API. Pass them to your project as the first and second
runtime parameters. The command must be entered as a single line. It is divided here to fit on the page.
For Microsoft Windows
java.exe -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -classpath
%CLASSPATH% projectMainClass
For UNIX
java -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -classpath
$CLASSPATH projectMainClass
projectMainClass is your project main class.
Optionally, you can pass these parameters using one of the alternative methods described in Java virtual
machine parameters (on page 250).
28
5
Chapter
5
Issuing requests and handling responses
The Control-M/EM API is a set of Java classes that manipulate an existing set of functions in the server side
of the API. These classes enable Java developers to send requests to Control-M/EM server components from
within the developers’ applications.
Request types
The Control-M/EM API supports two types of requests:
Synchronous requests are processed by Control-M/EM. Responses are received directly from
Control-M/EM.
Asynchronous requests are sent through Control-M/EM to Control-M/Server. These requests receive a
tracking ID as a response. By sending a polling request that includes this tracking ID, the user can
retrieve feedback about what action Control-M/EM takes, or a notice that the request is still being
processed.
Client programs using the EMBasicXMLInvoker do not require the polling process, as polling is done by
the class itself. For more information, see Control-M/EM API programming methods (on page 33).
The following table describes the synchronous and asynchronous requests:
29
Control-M Workload Automation API Guide
Response types
Every time a request is made, Control-M/EM replies by sending one or more response strings. You can parse
the contents of these response strings for use in your project. Control-M/EM API responses are wrapped by
the SOAP envelope.For more information, see SOAP Envelope for Control-M/EM requests and responses (on
page 69).
The responses are divided into the following categories:
Successful responses (on page 30)
Fault responses (on page 30)
Successful responses
Successful responses appear directly below the SOAP-ENV:Body node. They contain the information
requested or indicate success. Every request has a specific ctmem response.
For example, ctmem:response_unregister is the response for a ctmem:request_unregister request.
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
. . .SPECIFIED_REQUEST_RESPONSE . . .
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Fault responses
Fault responses report failed requests. The fault node is located below the SOAP detail node. The fault node
contains information about the errors that caused the operation to fail. Every request has a specific fault
response.
For example, ctmem:fault_unregister is the fault response for the ctmem:request_unregister request.
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
30
Control-M Workload Automation API Guide
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode> … </faultcode>
<faultstring>…. </faultstring>
<detail>
. . . FAULT_RESPONSE_OF_THE_REQUEST . . .
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
When the Control-M/EM API is running a request that applies to multiple jobs, the request might succeed on
some jobs and fail on others. In this case, the general status field returned in a successful response, receives
a value of PARTIAL_SUCCESS instead of OK. Each individual job status is either OK or ERROR. A
PARTIAL_SUCCESS can only occur when the Control-M/EM API runs the following requests:
track job
order or force job
31
Control-M Workload Automation API Guide
32
Control-M Workload Automation API Guide
33
Control-M Workload Automation API Guide
34
Control-M Workload Automation API Guide
The following figure illustrates the structural differences between the two request methods:
35
Control-M Workload Automation API Guide
36
Control-M Workload Automation API Guide
37
Control-M Workload Automation API Guide
Examples
ComponentType myComponent = new GSRComponent();
EMBasicXMLInvoker gsrInvoker = new EMBasicXMLInvoker(myComponent);
The GSRComponent class represents the Control-M/EM GUI Server component in your
network. The GASComponent class represents the Control-M/EM Global Alerts Server
component in your network.
The component that you specify when you invoke the object (GSRComponent or
GASComponent) must be appropriate to the task that you want to perform. Request types and
the components that process those requests are listed in the table in Examples (on page 43).
Identifying information for these components was recorded in the ctmemapi.properties file
when you configured the API. This file contains the host name for each component.
In networks in which more than one GUI Server or GAS is installed, only one of each component
is listed in the ctmemapi.properties file. The API works only with the components listed in the
file. You cannot modify the file to include more than one GUI Server or GAS.
Using the invoke method
Prototype
public String invoke(String xmlRequest) throws InvokeException
In this statement, xmlRequest is a string that is formatted according to the XML request
specification that is presented in this book.
A request in XML format (xmlRequest), specifying the action that the Control-M installation is
to perform, is required for each call.
38
Control-M Workload Automation API Guide
39
Control-M Workload Automation API Guide
40
Control-M Workload Automation API Guide
The advantage of the polling process is that the API always replies immediately to the request. No extra time
or resources are spent processing the responses.
41
Control-M Workload Automation API Guide
42
Control-M Workload Automation API Guide
Examples
ComponentType myComponent = new GSRComponent();
EMXMLInvoker gsrInvoker = new EMXMLInvoker(myComponent);
• The GSRComponent class represents the Control-M/EM GUI Server component in your
network.
• The GASComponent class represents the Control-M/EM Global Alerts Server
component in your network.
The component you specify when you invoke the object (GSRComponent or GASComponent)
must be appropriate to the task that you want to perform.Request types and the components
that process those requests are listed in the following table.
Job Creation X
Order/Force X
Add/Delete Condition X
Polling X
User Registration X X
User Unregistration X X
Time-out Reset X X
Job Tracking X
Identifying information for these components was recorded in the ctmemapi.properties file
when you configured the API. This file contains the hostname for each component.
In networks in which more than one GUI Server or GAS is installed, only one of each component
is listed in the ctmemapi.properties file. The API works only with the components listed in the
file. You cannot modify the file to include more than one GUI Server or GAS.
Using the invoke method
Prototype
public String invoke(String xmlRequest) throws InvokeException
In this statement, xmlRequest is a string that is formatted according to the XML request
specification that is presented in this book.
43
Control-M Workload Automation API Guide
A request in XML format (xmlRequest), specifying the action that the Control-M installation is
to perform, is required for each call. The various types of requests that you can make are
described in Introduction to Control-M/EM API requests (on page 68).
44
Control-M Workload Automation API Guide
‘ apostrophe '
For information about using the EMXMLInvoker, see Using EMXMLInvoker class calls (on page 41).
For information about using the EMBasicXMLInvoker, see Using EMBasicXMLInvoker class calls (on page 37).
45
6
Chapter
6
Class reference
This section describes reference information about all public functions that you, can access when using
Control-M/EM API in your project. References to additional material are listed in the See Also section
included under each function heading.
The information in this chapter provides you with the necessary information to create requests in the form of
XML strings.
Control-M/EM API classes
Class Description
EMXMLInvoker The primary class of the API. For more information, see
EMXMLInvoker class (on page 49).
GASComponent The GASComponent class represents the Global Alerts Server (GAS).
For more information, see GASComponent class (on page 54).
InvokeException This class is used to process error feedback from Control-M/EM. For
more information, seeInvokeException class (on page 56).
46
Control-M Workload Automation API Guide
ComponentType class
An abstract base class representing a Control-M/EM component supported for use with the Control-M/EM
API.
The Global Alerts Server (GAS) and the GUI Server are supported for use with the Control-M/EM API.
When you send a request (for example, to change the status of an Alert) the Control-M/EM component to
which this request is referred is not indicated in the request. Instead, the request is referred by the
ComponentType instance to the appropriate component.
The GSRComponent class and the GASComponent class are derived from the ComponentType class. These
classes are used when creating an instance of the EMXMLInvoker or the EMBasicXMLInvoker.
For more information, see GASComponent class (on page 54) and GSRComponent class (on page 55).
EMBasicXMLInvoker class
The EMBasicXMLInvoker class is inherited from the EMXMLInvoker class. It shares many of the methods of
that class.
The EMBasicXMLInvoker class uses the methods listed in the following table:
Method Description
BuildPasswordString (on page An EMXMLInvoker method that encodes a given text string for use in a
50) Registration request.
done (on page 51) An EMXMLInvoker static method that stops the Control-M/EM API services by
breaking the connection with the CORBA processes.
The done implementation is the same as it is under EMXMLInvoker.
getProperties (on page 51) An EMXMLInvoker static method used to obtain the Control-M/EM Global Alerts
Server or GUI Server host names from the ctmem.properties file.
47
Control-M Workload Automation API Guide
Method Description
Init (on page 51) An EMXMLInvoker static method that starts the Control-M/EM API services
and initializes CORBA with default values or with values specified with its
optional parameters.
The init implementation is the same as EMXMLInvoker.
Invoke (on page 53) Used to send a request to Control-M/EM. the request is sent as an XML text
string. When the invoke method is used with the EMBasicXMLInvoker class,
polling for responses from Control-M/EM is automatic.
setPollRequestTimeoutMilli Determines the total time, in milliseconds, allotted for polling following a
(on page 49) request.
setProperties (on page 53) An EMXMLInvoker static method used to specify the Control-M/EM Global Alerts
Server or GUI Server host names and a location from which to obtain them.
invoke
Enables you to send a request to Control-M/EM. The request is sent as an XML text string. When the invoke
method is used with the EMBasicXMLInvoker class, polling for responses from Control-M/EM is automatic.
Syntax: Public String invoke(String xmlRequest) throws InvokeException
Parameters: The xmlRequest string is a request that the user sends to Control-M/EM. The string is a
text file in an XML format that the Control-M/EM API can accept and interpret.
Return Codes: Response in XML format. Response data that addresses the request that was sent. It is
returned as an XML formatted string.
See setProperties (on page 53) and Getting and setting Control-M/EM API properties (on page 243)
48
Control-M Workload Automation API Guide
setPollRequestIntervalMilli
Sets the interval between automatically-sent poll requests. This time is measured from the end of the
current poll request. This value must be less than or equal to the value specified with the
setPollRequestTimeoutMilli method.
Syntax: Public void setPollRequestIntervalMilli (final long timeout)
Parameters: timeout. Time, in milliseconds.
Return codes: None
See: Polling interval timeout configuration (on page 245) and setPollRequestTimeoutMilli below.
setPollRequestTimeoutMilli
Total time that is allotted for polling. This value must be greater than or equal to the value specified with the
setPollRequestIntervalMilli method.
Public void setPollRequestTimeoutMilli(final long timeout)
Parameters: timeout. Time, in milliseconds
Return Codes:None
See: Polling interval timeout configuration (on page 245) and setPollRequestIntervalMilli above.
EMXMLInvoker class
The EMXMLInvoker class is the primary class of the API. It methods are used to initiate and stop the API, get
and set API properties, and send requests to Control-M/EM.
The EMXMLInvoker class uses the methods listed in the following table:
Method Description
BuildPasswordString An EMXMLInvoker method that encodes a given text string for use in a Registration
(on page 50) request.
done (on page 51) An EMXMLInvoker static method that stops the Control-M/EM API services by
breaking the connection with the CORBA processes.
49
Control-M Workload Automation API Guide
Method Description
getProperties (on An EMXMLInvoker static method used to obtain the Control-M/EM Global Alerts
page 51) Server or GUI Server host names from the ctmem.properties file.
Init (on page 51) An EMXMLInvoker static method that starts the Control-M/EM API services and
initializes CORBA with default values or with values specified with its optional
parameters.
Invoke (on page 53) Used to send a request to Control-M/EM. the request is sent as an XML text string.
When the invoke method is used with the EMXMLInvoker class, the user must
activate polling to receive a response from Control-M/EM.
setProperties (on page An EMXMLInvoker static method used to specify the Control-M/EM Global Alerts
53) Server or GUI Server host names and a location from which to obtain them.
BuildPasswordString
This EMXMLInvoker method prepares a text string for use as a user password in the User Registration
request.
The BuildPasswordString() function must be called immediately before sending every API Register
request because a different string is used for each request in some modes.
Syntax: Public String BuildPasswordString(password_string) throws
InvokeException
Parameters: password_string. Text string, subject to all limitations that apply to a Control-M/EM
password
Return codes: The prepared string to be used in the password field of the registration request.
See: User Registration (on page 57) and for information about acceptable passwords, see Control-M
Workload Automation Administration.
50
Control-M Workload Automation API Guide
done
An EMXMLInvoker static method that stops the Control-M/EM API services by breaking the connection with
the CORBA processes.
Syntax: Public static void done()
Parameters: None
Return codes: None
See: Initializing and stopping the Control-M/EM API services (on page 42) and Init (on page 51)
getProperties
Used to obtain the Control-M/EM Global Alerts Server or GUI Server host names from the
ctmem.properties file
Syntax: Public Properties getProperties();
Parameters: The following table describes the parameters for getproperties:
Parameters:Parameter Description
Init
An EMXMLInvoker static method that starts the Control-M/EM API services and initializes CORBA with
default values or with values specified with its optional parameters. There are three prototypes.
The init method must be run at program startup.
51
Control-M Workload Automation API Guide
Prototype 1
This is the default implementation of init.
Prototype 2
This init prototype enables you to include an array of strings representing a list of arguments.
Syntax: Public static void init(String[] args)
Parameters: For a list of CORBA parameters suitable for use in args, see the manufacturer’s
documentation.
Return codes: None
See: done (on page 51), Initializing and stopping the Control-M/EM API services (on page 42), and
Modifying initialization properties (on page 241)
Prototype 3
This init prototype enables you to include an array of strings representing a list of arguments.
Syntax: Public static void init(String[] args, Properties props)
Parameters: For a list of CORBA parameters suitable for use in args, see the manufacturer’s
documentation. The props parameter (Properties) can contain CORBA parameters, using the same
options as in the command line that was passed as the first parameter (args).
The Properties class is part of the java.util package.
Return codes:
See: done (on page 51), Initializing and stopping the Control-M/EM API services (on page 42), and
Modifying initialization properties (on page 241)
52
Control-M Workload Automation API Guide
Invoke
Invoke enables you to send a request to Control-M/EM. The request is sent as an XML text string. When the
invoke method is used with the EMXMLInvoker class, you must activate polling to receive a response from
Control-M/EM.
Syntax: public String invoke(String xmlRequest) throws InvokeException
Parameters: Xml request string. This string is a request that the user sends to Control-M/EM. The string
is a text file in an XML format that the Control-M/EM API can accept and interpret.
Return codes: Response in XML format. Response data that addresses the request that was sent. It is
returned as an XML formatted string.
See: Invoke (on page 48) and Introduction to Control-M/EM API requests (on page 68)
setProperties
Used to specify the Control-M/EM Global Alerts Server or GUI Server host names and the source from which
to obtain them.
Syntax: Public void setProperties(Properties props);
Parameters: The following table describes the parameters for SetProperties:
Parameter Description
53
Control-M Workload Automation API Guide
GASComponent class
Represents the Global Alerts Server (GAS). When creating an instance of EMXMLInvoker (or
EMBasicXMLInvoker) with a reference to a GASComponent type, the request is sent to the specified
Control-M/EM Global Alerts Server.
The GASComponent class uses the constructors listed in the following table:
Constructor Description
GASComponent Using this constructor, the request is sent to the Global Alerts Server
(Prototype 1) (on hostname specified in the ctmemapi.properties file.
page 54)
For more information, see GASComponent (Prototype 1) (on page 54).
GASComponent Using this constructor, the request is sent to the Global Alerts Server
(Prototype 2) (on hostname specified with the hostname parameter.
page 54)
For more information, see GASComponent (Prototype 2) (on page 54).
GASComponent (Prototype 1)
Using this constructor, the request is sent to the Global Alerts Server hostname specified under
com.bmc.ctmem.emapi.GAS.hostname=host_name in the ctmemapi.properties file.
Syntax: GASComponent();
Parameters: None
Return codes: None
See: ComponentType class (on page 47), GASComponent (Prototype 2) (on page 54), and
GSRComponent class (on page 55)
GASComponent (Prototype 2)
Using this constructor, the request is sent to the Global Alerts Server hostname specified with the hostname
parameter.
Syntax: GASComponent(String hostname);
54
Control-M Workload Automation API Guide
GSRComponent class
Represents the GUI Server. When creating an instance of EMXMLInvoker (or EMBasicXMLInvoker) with
a reference to a GSRComponent type, the request is sent to the specified Control-M/EM GUI Server.
The GASComponent class uses the constructors listed in the following table:
Constructor Description
GSRComponent Using this constructor, the request is sent to the GUI Server hostname
(Prototype 1) (on specified in the ctmemapi.properties file.
page 55)
GSRComponent Using this constructor, the request is sent to the GUI Server hostname
(Prototype 2) (on specified with the hostname parameter.
page 55)
GSRComponent (Prototype 1)
Using this constructor, the request is sent to the GUI Server hostname specified under
com.bmc.ctmem.emapi.GSR.hostname=host_name in the ctmemapi.properties file.
Syntax: GSRComponent();
Parameters: None
Return codes: None
See: ComponentType class (on page 47), GASComponent class (on page 54), and GSRComponent
(Prototype 2) (on page 55)
GSRComponent (Prototype 2)
Using this constructor, the request is sent to the GUI Server hostname specified with the hostname
parameter.
Syntax: GSRComponent(String hostname);
Parameters: Hostname. This is the GUI Server hostname.
Return codes: None
See: ComponentType class (on page 47), GSRComponent (Prototype 1) (on page 55), and
GASComponent class (on page 54)
55
Control-M Workload Automation API Guide
InvokeException class
The InvokeException class enables the Control-M/EM API user to obtain error information when an
exception is thrown.
The InvokeException class includes the methods listed in the following table:
Method Description
getMajorCode (on Used to obtain the Major Code that identifies the error family to which an
page 56) error belongs.
getMinorCode (on Used to obtain the Minor Code of an error. The Minor Code provides a
page 56) unique identifier for the error in the family to which it belongs.
getMajorCode
Used to obtain the Major Code that identifies the error family for an error.
Syntax: Public int getMajorCode()
Parameters: None
Return codes: int. An integer that identifies the error family to which the error belongs.
See: getMinorCode (on page 56), getReason (on page 57), and Error codes and exceptions (on page
272)
getMinorCode
Enables you to obtain the Minor Code of an error. The Minor Code provides a unique identifier for the error
in the family to which it belongs.
Syntax: Public int getMinorCode()
Parameters: None
Return codes: int. An integer that provides a unique identifier for the error in its family.
See: getMajorCode (on page 56), getReason (on page 57), and Error codes and exceptions (on page
272)
56
Control-M Workload Automation API Guide
getReason
Used to obtain the text description of an error.
Syntax: Public String getReason()
Parameters: None
Return codes: String. This string is a text description of the error.
See: getMajorCode (on page 56), getMinorCode (on page 56), and Error codes and exceptions (on page
272)
User Registration
Sends the username and password of the user to the target server component. The server component
returns a unique token, which must accompany all subsequent requests made during the session.
Request parameters
The following figure describes the request_register XML parameters:
57
Control-M Workload Automation API Guide
Parameter Description
component This parameter is used only by Control-M Business Process Integration. For more
information, refer to the relevant product documentation.
timeout Indicates a length of time, in seconds, until the user’s current user token is
automatically invalidated. Integer. Default: 720. Optional.
You should synchronize the value of this parameter with that of the
EM_REFRESH_INTERVAL environment variable in Control-M/Enterprise Manager.
For more information, refer to Preparing your project environment (on page 25).
Use the Timeout Reset Request to restart the count from 0.
Fault response
XML parameters for fault_register, as well as a sample fault response are described in Fault Response (on
page 70).
Response parameters
The following figure describes the response_register XML parameters:
58
Control-M Workload Automation API Guide
Parameter Description
Errors
See Authorization request errors (Major code 407) (on page 285).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_register
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_name>emuser</ctmem:user_name>
<ctmem:password>empass</ctmem:password>
<ctmem:timeout>40</ctmem:timeout>
</ctmem:request_register>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
59
Control-M Workload Automation API Guide
<ctmem:response_register
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:authentication_message/>
</ctmem:response_register>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_register
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_name>emuser</ctmem:user_name>
<ctmem:password>failed</ctmem:password>
<ctmem:timeout>40</ctmem:timeout>
</ctmem:request_register>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_register
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
60
Control-M Workload Automation API Guide
<ctmem:error_list
ctmem:highest_severity="Error">
<ctmem:error ctmem:major="407"
ctmem:minor="3" ctmem:severity="Error">
<ctmem:error_message>Register
failed.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_register>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request parameters
The following figure describes the request_check_user_token XML parameters:
Parameter Description
component This parameter is used only by Control-M Business Process Integration. For more
information, refer to the relevant product documentation.
user_token Serial identification number supplied to the user during registration. String.
61
Control-M Workload Automation API Guide
Response parameters
The following figure describes the response_check_user_token XML parameters:
Parameter Description
will_expire Amount of time, in seconds, remaining until the expiration of the user identification
token. If the status is INVALID this parameter is set to zero.
Errors
See Authorization request errors (Major code 407) (on page 285).
Examples
Successful example
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
62
Control-M Workload Automation API Guide
<SOAP-ENV:Body>
<ctmem:response_check_user_token
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:will_expire>587</ctmem:will_expire>
</ctmem:response_check_user_token>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_check_user_token
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_check_user_token>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_check_user_token
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_check_user_token>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
63
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_check_user_token
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity="Error">
<ctmem:error ctmem:major="407" ctmem:minor="1"
ctmem:severity="Error">
<ctmem:error_message>Invalid user
token.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_check_user_token>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
64
Control-M Workload Automation API Guide
Request parameters
The following figure describes the request_client_keep_alive XML parameters:
Parameter Description
component This parameter is used only by Control-M Business Process Integration. For more
information, refer to the relevant product documentation.
user_token Serial identification number supplied to the user during registration. The user
indicated by this number is the user. String.
Response parameters
The following table describes the response_client_keep_alive XML parameters:
Parameter Description
status Describes the condition of the element that contains it.(for example, Error). String.
Errors
See Authorization request errors (Major code 407) (on page 285).
65
Control-M Workload Automation API Guide
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_client_keep_alive
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_client_keep_alive>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_client_keep_alive
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
</ctmem:response_client_keep_alive>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_client_keep_alive
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
66
Control-M Workload Automation API Guide
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_client_keep_alive>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_client_keep_alive
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='407'
ctmem:minor='1' ctmem:severity='Error' >
<ctmem:error_message>Invalid user
token.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_client_keep_alive>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
67
7
Chapter
7
Introduction to Control-M/EM API requests
The requests described in this chapter are listed in the following table:
Description
User Unregistration (on page 71) Checks if the specified user identification is still valid.
Create folder definitions (on page Creates a regular or SMART Folder definitions.
74)
Add folder to folder definitions Adds sub-folder definitions into an existing outermost
(on page 90) SMART folder or sub-folder.
Add jobs to folder definitions (on Adds job definitions into an existing outermost folder or
page 85) sub-folder.
Delete job definitions (on page Deletes job definitions from the specified outermost or
96) sub-folder.
Order (on page 110) Inserts a job or folder into Active Jobs immediately (force)
or subject to scheduling criteria (order).
Job creation (on page 124) Creates a job, SMART Folder, or sub-folder into the Active
Jobs database.
Job actions in active jobs Performs actions on jobs that are currently in the active
database (on page 178) jobs database.
Job tracking (on page 197) Polls the Response repository in the Control-M/EM GUI
Server to receive completion confirmation from earlier job
processing requests.
Retrieve jobs in the active jobs Retrieves jobs that are currently in the active jobs
database (on page 210) database.
Change alert status (on page Changes the status of an alert (for example, from
228) not_noticed to handled).
68
Control-M Workload Automation API Guide
Description
Retrieve BIM Services list (on Retrieves the list of services active in the BMC Batch Impact
page 232) Manager server.
Considerations
Many XML elements in this section are Control-M job parameters. To create a successful request, particularly
a Job Creation request or an Order Job request, BMC Software recommends that you become familiar with
Control-M job parameters.
Control-M/EM API does not support non-English characters in request and response parameters.
For details about Control-M job parameters, see Control-M Workload Automation Parameters. The element
names in this chapter often differ from the names of the job parameters to which they correspond. Search
for parameters by name in Control-M Workload Automation Parameters.
Request
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
. . . SPECIFIED_REQUEST . . .
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
69
Control-M Workload Automation API Guide
Response
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
. . .SPECIFIED_REQUEST_RESPONSE . . .
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The fault responses are wrapped within a SOAP Fault envelope.
Fault Response
The following table describes the parameters for fault XML parameters of all requests:
Parameter Description
error_list A sequence of error. For a list of the error_list sub parameters see:
Error XML parameters (on page 70).
Parameter Description
error attributes Major: The error Major Code. An integer describing the family of
errors to which the error belongs. For more information, see Error
codes and exceptions (on page 272)
Minor: The error minor Code. An integer that is a unique ID for an
error of this type. For more information, see: Error codes and
exceptions (on page 272)
Severity: The priority level assigned to the error
error_message Text description of the error. For more information see: Error codes
and exceptions (on page 272).
70
Control-M Workload Automation API Guide
User Unregistration
When the application finishes using the API, use the Unregister request to send the user token to the server
component. The server component erases the user from its active users list. The user token is invalidated
when the request is complete.
Request parameters
request_unregister XML parameters
The following figure describes the request_unregister XML parameters:
Parameter Description
component This parameter is used only by Control-M Business Process Integration. For more
information, refer to the relevant product documentation.
Response parameters
response_unregister XML parameter
The following figure describes the response_unregister XML parameters:
71
Control-M Workload Automation API Guide
Parameter Description
Errors
See Authorization request errors (Major code 407) (on page 285).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_unregister
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_unregister>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_unregister
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
72
Control-M Workload Automation API Guide
<ctmem:status>OK
</ctmem:status>
</ctmem:response_unregister>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_unregister
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_unregister>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_unregister
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='407'
ctmem:minor='4' ctmem:severity='Error' >
<ctmem:error_message>Unregister
failed.</ctmem:error_message>
73
Control-M Workload Automation API Guide
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_unregister>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request parameters
request_def_create_folder XML parameters
The following figure describes the request_def_create_folder XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
folder Folder wrapper. The folder is identified by the elements listed in the following
folder: folder XML parameters description
SMART_folder SMART Folder wrapper. The folder is identified by the elements listed in the
following folder: SMART_folder XML parameters description
74
Control-M Workload Automation API Guide
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
jobs A sequence of job elements. See Job and SMART Folder XML parameters (on page
302) for a list of the parameters that can be used/specified in job elements.
75
Control-M Workload Automation API Guide
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
folder_attributes The SMART Folder’s attributes. See Job and SMART Folder XML parameters (on
page 302).
sub_folders A sequence of sub-folder elements. See Job and SMART Folder XML parameters
(on page 302) for a list of the parameters that can be used/specified in sub-folder
elements.
jobs A sequence of job elements. See Job and SMART Folder XML parameters (on page
302) for a list of the parameters that can be used/specified in job elements.
76
Control-M Workload Automation API Guide
Parameter Description
folder_attributes The sub-folder’s user defined attributes. See Job and SMART Folder XML
parameters (on page 302)
sub_folders A sequence of sub-folder elements. See Job and SMART Folder XML parameters
(on page 302) for a list of the parameters that can be used/specified in sub-folder
elements.
jobs A sequence of job elements. See Job and SMART Folder XML parameters (on page
302) for a list of the parameters that can be used/specified in job elements.
Response parameters
response_def_create_folder XML parameters
The following figure describes the response_def_create_folder XML parameters:
77
Control-M Workload Automation API Guide
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
Errors
See Create job/SMART Folder definitions request errors (Major code 412) (on page 288).
Examples
Successful example
Request
The following request is to create a outer-most SMART Folder with a job and a sub-folder in the first level
which also contains a job:
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>115B95A7FA4B787B924A2BEA8CE3121A</ctmem:user_tok
en>
<ctmem:SMART_table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable</ctmem:table_name>
<ctmem:user_daily>SYSTEM</ctmem:user_daily>
78
Control-M Workload Automation API Guide
<ctmem:table_attributes>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:author>emuser</ctmem:author>
<ctmem:smart_table_rule_based_cals>
<ctmem:rule_based_cal>
<ctmem:rule_based_cal_name>rule_based_cal1</ctmem:ru
le_based_cal_name>
<ctmem:month_days>ALL</ctmem:month_days>
<ctmem:MAR>yes</ctmem:MAR>
</ctmem:rule_based_cal>
</ctmem:smart_table_rule_based_cals>
</ctmem:table_attributes>
<ctmem:sub_tables>
<ctmem:sub_table>
<ctmem:table_name>subTable_1</ctmem:table_name>
<ctmem:table_attributes>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
<ctmem:sub_table_rule_based_cals>
<ctmem:sub_rule_based_cal>
<ctmem:rule_based_cal_name>rule_based_cal1</ctmem:rule_based_cal_n
ame>
</ctmem:sub_rule_based_cal>
</ctmem:sub_table_rule_based_cals>
</ctmem:table_attributes>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-SubTable_1</ctmem:job_name>
<ctmem:mem_name>In-SubTable_1</ctmem:mem_name>
<ctmem:task_type>command</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
79
Control-M Workload Automation API Guide
<ctmem:command>ls -l</ctmem:command>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
<ctmem:job_rule_based_cals>
<ctmem:job_rule_based_cal>
<ctmem:rule_based_cal_name>rule_based_cal1</ctmem:rule_based_cal_n
ame>
</ctmem:job_rule_based_cal>
</ctmem:job_rule_based_cals>
</ctmem:job>
</ctmem:jobs>
</ctmem:sub_table>
</ctmem:sub_tables>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-Smart-Table</ctmem:job_name>
<ctmem:mem_name>INGROUP</ctmem:mem_name>
<ctmem:mem_lib>INGROUP</ctmem:mem_lib>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
</ctmem:job>
</ctmem:jobs>
</ctmem:SMART_table>
</ctmem:request_def_create_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
80
Control-M Workload Automation API Guide
<ctmem:response_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable</ctmem:table_name>
</ctmem:response_def_create_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request
The following request is to create a folder with a job:
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>115B95A7FA4B787B924A2BEA8CE3121A</ctmem:user_tok
en>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestTable</ctmem:table_name>
<ctmem:user_daily>SYSTEM</ctmem:user_daily>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-Table-1</ctmem:job_name>
<ctmem:mem_name>In-Table-1</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
<ctmem:month_days>ALL</ctmem:month_days>
<ctmem:MAR>yes</ctmem:MAR>
</ctmem:job>
</ctmem:jobs>
81
Control-M Workload Automation API Guide
</ctmem:table>
</ctmem:request_def_create_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestTable</ctmem:table_name>
</ctmem:response_def_create_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
The following request to create a folder contains invalid job definitions:
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>115B95A7FA4B787B924A2BEA8CE3121A</ctmem:user_tok
en>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestTable</ctmem:table_name>
<ctmem:user_daily>SYSTEM</ctmem:user_daily>
<ctmem:jobs>
<ctmem:job>
82
Control-M Workload Automation API Guide
<ctmem:job_name>In-Table-2</ctmem:job_name>
<ctmem:mem_name>In-Table-2</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:author>emuser</ctmem:author>
</ctmem:job>
</ctmem:jobs>
</ctmem:table>
</ctmem:request_def_create_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity='Error'>
<ctmem:error ctmem:major='412' ctmem:minor='1'
ctmem:severity='Error'>
<ctmem:error_message>Create jobs definitions failed,
inavlid
params.</ctmem:error_message>
</ctmem:error>
<ctmem:error ctmem:major='412' ctmem:minor='14'
ctmem:severity='Error'>
<ctmem:error_message>Create jobs definitions
validation error: Job[1]: Field: Owner -
Error: EM50011E: The field must have a
value.</ctmem:error_message>
83
Control-M Workload Automation API Guide
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_def_create_table>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request
The following request to create a folder fails because the folder already exists.
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>115B95A7FA4B787B924A2BEA8CE3121A</ctmem:user_tok
en>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestTable</ctmem:table_name>
<ctmem:user_daily>SYSTEM</ctmem:user_daily>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-Table-2</ctmem:job_name>
<ctmem:mem_name>In-Table-2</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
<ctmem:month_days>ALL</ctmem:month_days>
<ctmem:MAR>yes</ctmem:MAR>
</ctmem:job>
</ctmem:jobs>
84
Control-M Workload Automation API Guide
</ctmem:table>
</ctmem:request_def_create_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_def_create_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity='Error'>
<ctmem:error ctmem:major='412' ctmem:minor='7'
ctmem:severity='Error'>
<ctmem:error_message>Table already
exist.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_def_create_table>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
85
Control-M Workload Automation API Guide
Request parameters
request_def_add_jobs XML parameters
The following figure describes the request_def_add_jobs XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
control_m Name of the Control-M installation that processes the request. String.
jobs A sequence of job. For a list of the parameters for job, refer to Job and SMART
Folder XML parameters (on page 302)
86
Control-M Workload Automation API Guide
Response parameters
response_def_add_jobs XML parameters
The following figure describes the response_def_add_jobs XML parameters:
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
Examples
Successful example
Request
The following request is to add a job to an existing sub-folder:
<?xml version="1.0" encoding="iso-8859-1"?>
87
Control-M Workload Automation API Guide
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_add_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>83FE7394E4D10220EF99C3D55B79EFB4</ctmem:user_tok
en>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/subTable_1</ctmem:table_name>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-SubTable_job2</ctmem:job_name>
<ctmem:mem_name>In-SubTable_job2</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
</ctmem:job>
<ctmem:job>
<ctmem:job_name>In-SubTable_job3</ctmem:job_name>
<ctmem:mem_name>In-SubTable_job3</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_def_add_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
88
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_def_add_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:folder_name>apiTestSMARTTable/subTable_1</ctmem:table_name>
<ctmem:number_of_jobs_added>2</ctmem:number_of_jobs_added>
</ctmem:response_def_add_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
The following request is to add a job to a nonexistent sub-folder:
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_add_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>83FE7394E4D10220EF99C3D55B79EFB4</ctmem:user_tok
en>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/inexistent_subTable</ctmem:tab
le_name>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-SubTable_job4</ctmem:job_name>
<ctmem:mem_name>In-SubTable_job4</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
89
Control-M Workload Automation API Guide
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_def_add_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_def_add_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity='Error'>
<ctmem:error ctmem:major='412' ctmem:minor='3'
ctmem:severity='Error'>
<ctmem:error_message>Create jobs definitions
failed.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_def_add_jobs>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
90
Control-M Workload Automation API Guide
Request parameters
request_def_add_folder XML parameters
The following figure describes the request_def_add_folder XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
parent_table Table wrapper. The table is identified by the elements listed in the following table.
jobs A sequence of job. For a list of the parameters for job, refer to Job and SMART
Folder XML parameters (on page 302).
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
91
Control-M Workload Automation API Guide
Response parameters
response_def_add_folder XML parameters
The following table describes the response_def_add_folder XML parameters:
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
Examples
Successful example
Request
The following request is to add a sub-folder with one job to an existing sub-folder:
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
92
Control-M Workload Automation API Guide
<ctmem:request_def_add_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>D71B430E6A1B00071D4BE91A64E41AA4</ctmem:user_tok
en>
<ctmem:parent_table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/subTable_1</ctmem:table_name>
</ctmem:parent_table>
<ctmem:sub_table>
<ctmem:table_name>subTable_2</ctmem:table_name>
<ctmem:table_attributes>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
<ctmem:sub_table_rule_based_cals>
<ctmem:sub_rule_based_cal>
<ctmem:rule_based_cal_name>rule_based_cal2</ctmem:rule_based_cal_n
ame>
</ctmem:sub_rule_based_cal>
</ctmem:sub_table_rule_based_cals>
</ctmem:table_attributes>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-SubTable_2_job1</ctmem:job_name>
<ctmem:mem_name>In-SubTable_2_job1</ctmem:mem_name>
<ctmem:task_type>command</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:command>ls -l</ctmem:command>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
<ctmem:job_rule_based_cals>
<ctmem:job_rule_based_cal>
93
Control-M Workload Automation API Guide
<ctmem:rule_based_cal_name>rule_based_cal2</ctmem:rule_based_cal_n
ame>
</ctmem:job_rule_based_cal>
</ctmem:job_rule_based_cals>
</ctmem:job>
</ctmem:jobs>
</ctmem:sub_table>
</ctmem:request_def_add_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_def_add_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/subTable_1/subTable_2</ctmem:t
able_name>
</ctmem:response_def_add_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
The following request is to add a job to a nonexistent sub-folder:
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_add_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
94
Control-M Workload Automation API Guide
<ctmem:user_token>83FE7394E4D10220EF99C3D55B79EFB4</ctmem:user_tok
en>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/inexistent_subTable</ctmem:tab
le_name>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_name>In-SubTable_job4</ctmem:job_name>
<ctmem:mem_name>In-SubTable_job4</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>apiWinApp</ctmem:application>
<ctmem:group>apiGroup</ctmem:group>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:author>emuser</ctmem:author>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_def_add_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_def_add_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity='Error'>
<ctmem:error ctmem:major='412' ctmem:minor='3'
ctmem:severity='Error'>
95
Control-M Workload Automation API Guide
Request parameters
request_def_delete_jobs XML parameters
The following figure describes the request_def_delete_jobs XML parameters:
96
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
folder Folder wrapper. The folder is identified by the elements listed in the table XML
Parameters Description table.
delete_jobs_criterion Delete jobs criteria wrapper. String. Consists of include and exclude filters that
allow specifying items to include with or exclude from the deletion criteria, as
described in the delete_jobs_criterion XML parameters description table.
XML Parameters
The following table describes the XML Parameters:
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
97
Control-M Workload Automation API Guide
Parameter Description
exclude Optional. Filter that consists of a sequence of search_criterion elements. For more
information, refer to the include or exclude XML parameter (on page 98) table.
Parameter Description
search_criterion Search criteria wrapper that consists of a sequence of param elements. At least
one search_criterion element must appear under the exclude element. The amount
of search_criterion elements is unbounded. The relationship between
search_criterion elements in one filter is OR. For more information about param,
see the search_criterion XML parameters description table.
Parameter Description
param Parameters used to build the search criteria. At least one param element should
appear under a search_criterion element. The amount of param elements is
unbounded. The relationship between param elements in the same
search_criterion is AND. Elements of param are listed in the param XML parameters
(on page 99). String.
98
Control-M Workload Automation API Guide
Parameter Description
name Name of the table definition parameter used as a search criteria. String.
Mandatory. For a list of valid values for the name parameter, see the Valid Values
for name (on page 100) table.
value Value used in search criteria. Any valid value of a job parameter. Wildcards and
search patterns can be used in combination with LIKE operator. String. Mandatory.
99
Control-M Workload Automation API Guide
Parameter Description
HOST_ID Host ID of the host on which the job was most recently run.
This parameter is not available for MVS jobs.
FILE_PATH Name of the path that contains the job script file.
For more information about the parameters described in the table Valid values for name, refer to the
Control-M/Enterprise Manager documentation.
Response parameters
response_def_delete_jobs XML parameters
The following figure describes the response_def_delete_jobs XML parameters:
100
Control-M Workload Automation API Guide
Parameter Description
folder Folder wrapper. The folder is identified by the elements listed in the table XML
Parameters Description table.
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
Errors
See Delete job definitions request errors (Major code 413) (on page 289).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
101
Control-M Workload Automation API Guide
<ctmem:request_def_delete_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>D71B430E6A1B00071D4BE91A64E41AA4</ctmem:user_tok
en>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/subTable_1/subTable_2</ctmem:t
able_name>
</ctmem:table>
<ctmem:delete_jobs_criterion>
<ctmem:include>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>JOB_NAME</ctmem:name>
<ctmem:operator>LIKE</ctmem:operator>
<ctmem:value>*</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
</ctmem:include>
<ctmem:exclude>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>MEMNAME</ctmem:name>
<ctmem:operator>EQ</ctmem:operator>
<ctmem:value>apiMemName2</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
</ctmem:exclude>
</ctmem:delete_jobs_criterion>
</ctmem:request_def_delete_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
102
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_def_delete_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/subTable_1/subTable_2</ctmem:t
able_name>
</ctmem:table>
<ctmem:deleted_jobs_number>1</ctmem:deleted_jobs_number>
</ctmem:response_def_delete_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_delete_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>D71B430E6A1B00071D4BE91A64E41AA4</ctmem:user_tok
en>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable/subTable_1/subTable_2</ctmem:t
able_name>
</ctmem:table>
<ctmem:delete_jobs_criterion>
<ctmem:include>
103
Control-M Workload Automation API Guide
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>UNKNOWN</ctmem:name>
<ctmem:operator>LIKE</ctmem:operator>
<ctmem:value>*</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
</ctmem:include>
</ctmem:delete_jobs_criterion>
</ctmem:request_def_delete_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_def_delete_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity='Error'>
<ctmem:error ctmem:major='413' ctmem:minor='3'
ctmem:severity='Error'>
<ctmem:error_message>Failed to delete jobs from
table.</ctmem:error_message>
</ctmem:error>
<ctmem:error ctmem:major='413' ctmem:minor='6'
ctmem:severity='Error'>
<ctmem:error_message>Delete jobs definitions
validation error: [UNKNOWN] is not valid
filter field.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
104
Control-M Workload Automation API Guide
</ctmem:fault_def_delete_jobs>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Upload folder
Uploads an outermost folder. Only one folder can be uploaded per request. It is possible to force upload a
folder using the optional force parameter.
Request parameters
request_def_upload_folder XML parameters
The following figure describes the request_def_upload_folder XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
folder Folder wrapper. The folder is identified by the elements listed in the table XML
Parameters Description table.
105
Control-M Workload Automation API Guide
Parameter Description
control_m Name of the Control-M installation that processes the request. String.
Response parameters
The following table describes the response_def_upload_table XML Parameters:
Parameter Description
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
response_token Used in a polling request. This token is received in the immediate response of
response_def_upload_table.
106
Control-M Workload Automation API Guide
Parameter Description
Errors
See Upload folder request errors (Major code 411) (on page 287).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_upload_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
107
Control-M Workload Automation API Guide
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:force_it>no</ctmem:force_it>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable</ctmem:table_name>
</ctmem:table>
</ctmem:request_def_upload_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_def_upload_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>6</ctmem:response_token>
</ctmem:response_def_upload_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_def_upload_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:response_token>6</ctmem:response_token>
</ctmem:request_poll_def_upload_table>
108
Control-M Workload Automation API Guide
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_poll_def_upload_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
</ctmem:response_poll_def_upload_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_def_upload_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:force_it>no</ctmem:force_it>
<ctmem:table>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>inexistent_table</ctmem:table_name>
</ctmem:table>
</ctmem:request_def_upload_table>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
109
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_def_upload_table
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity="Error">
<ctmem:error ctmem:major="411" ctmem:minor="3"
ctmem:severity="Error">
<ctmem:error_message>Cannot get Table from
database.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_def_upload_table>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Order
The following operations can be performed with jobs and SMART Folders using Order:
Order a job. The job is entered into Active Jobs only when its scheduling criteria are met.
Order a job even if scheduling criteria are not met: The job is entered into Active Jobs database if its
scheduling criteria are met or not.
Order a SMART Folder: All jobs in the folder are ordered only when its scheduling criteria are met.
Order a SMART Folder even if scheduling criteria is not met: The SMART Folder is entered into Active
Jobs database even if its scheduling criteria is not met.
The mandatory parameters for ordering a job differ from the mandatory parameters that are specified when
ordering or forcing a SMART Folder. Optional parameters can be supplied for both jobs and SMART Folders.
110
Control-M Workload Automation API Guide
Request parameters
request_order_force XML parameters
The following figure describes the request_order_force XML parameters:
111
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
job_id Occurrence number of the job within the folder. String. Optional
Used to identify a specific job, in case there are multiple occurrences of the
same job name in the folder. If the value of the job_id parameter is blank,
0, or 1, the first occurrence of the job is used.
wait_for_order_date Indicates whether the job submission should wait for a specified order date
(order_date), or be submitted as soon as the execution criteria for the job
is satisfied.
Valid values:
yes (wait for order_date)
no (do not wait for order_date - default)
Relevant for Control-M versions 6.2.01 or later.
112
Control-M Workload Automation API Guide
Parameter Description
113
Control-M Workload Automation API Guide
Parameter Description
folder_id Serial number identifying the SMART Folder. Optional for jobs. Must be
empty for folders. For more information on the folder_id parameter, see
Job tracking (on page 197). String.
114
Control-M Workload Automation API Guide
Parameter Description
Response parameters
response_order_force XML parameters
The following figure describes the response_order_force XML parameters:
Parameter Description
115
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
response_token Used in a polling request. This token is received in the immediate response of a
response_order_force.
116
Control-M Workload Automation API Guide
Parameter Description
order_id Serial number assigned to the job by Control-M Workload Automation installation.
String.
file_name Name of the file that contains the job script. String.
117
Control-M Workload Automation API Guide
Parameter Description
status Describes the condition of the element that contains it.(for example, Error). String.
jobs A sequence of job. See the job XML parameters description table below.
error_list attribute: highest_severity Indicates the severity level of the most critical error
included in the error list. If only one error is included,
the severity for that error is displayed. String.
118
Control-M Workload Automation API Guide
Parameter Description
status Describes the condition of the element that contains it.(for example, Error). String.
error_list attribute: highest_severity Indicates the severity level of the most critical error
included in the error list. If only one error is included,
the severity for that error is displayed. String.
job_data An element that contains other parameters that describe the job.
A sequence of job_data. See the job_data XML parameters description
table.
Errors
See Order or Force request errors (Major code 405) (on page 284).
Examples
Successful example
The following request is to order/force a SMART Folder with a sub-folder and a job.
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:force_it>yes</ctmem:force_it>
119
Control-M Workload Automation API Guide
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:table_name>apiTestSMARTTable</ctmem:table_name>
<ctmem:odate>ODAT</ctmem:odate>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>10u</ctmem:response_token>
</ctmem:response_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:response_token>10u</ctmem:response_token>
</ctmem:request_poll_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
120
Control-M Workload Automation API Guide
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_poll_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:jobs>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:order_id>00000j</ctmem:order_id>
<ctmem:job_name>apiTestSMARTTable</ctmem:job_name>
<ctmem:ret_text>Job ordered</ctmem:ret_text>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:order_id>00000k</ctmem:order_id>
<ctmem:job_name>subTable_1</ctmem:job_name>
<ctmem:ret_text>Job ordered</ctmem:ret_text>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:order_id>00000l</ctmem:order_id>
<ctmem:mem_name>In-SubTable_1</ctmem:mem_name>
<ctmem:job_name>In-SubTable_1</ctmem:job_name>
<ctmem:ret_text>Job ordered</ctmem:ret_text>
</ctmem:job_data>
</ctmem:job>
</ctmem:jobs>
121
Control-M Workload Automation API Guide
</ctmem:response_poll_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:force_it>yes</ctmem:force_it>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:job_name>subTable_1</ctmem:job_name>
<ctmem:table_name>apiTestSMARTTable</ctmem:table_name>
<ctmem:odate>ODAT</ctmem:odate>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>11u</ctmem:response_token>
</ctmem:response_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
122
Control-M Workload Automation API Guide
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>17C3BA2475FB34069257862D90FB2128</ctmem:user_tok
en>
<ctmem:response_token>11u</ctmem:response_token>
</ctmem:request_poll_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.</faultstring>
<detail>
<ctmem:fault_poll_order_force
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list ctmem:highest_severity='Error'>
<ctmem:error ctmem:major='100' ctmem:minor='6'
ctmem:severity='Error'>
<ctmem:error_message>Entry not found 5778 Force
Sub-table subTable_1 alone is not
permitted</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_poll_order_force>
</detail>
</SOAP-ENV:Fault>
123
Control-M Workload Automation API Guide
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Job creation
This procedure describes how to to create a job or SMART Folder into Active Jobs database.
124
Control-M Workload Automation API Guide
Request parameters
request_create_aj XML parameters
The following figure describes the request_create_aj XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
active_job Specification for a single job. The parameters of the job are included as elements
between the opening and closing active_job tags. Contains no attributes.
See the following table.
125
Control-M Workload Automation API Guide
Parameter Description
application Name of the application to which the job’s group belongs. Used as a descriptive
name for related groups of jobs.
application_cm_version Indicates the version of external application (for example, SAP or Oracle
Applications) Control Module (CM) that is installed in the Control-M
installation. Specified together with the application_form,
application_type, and application_version elements.
application_form Specifies a predefined set of external application parameters that are displayed
in the External Application panel of the Control-M Workload Automation
Properties pane. Specified together with the application_cm_version,
application_type, and application_version elements.
application_type Indicates the type of external application (for example, SAP or Oracle
Applications) on which the external application job runs. Specified together with
the application_cm_version, application_form, and
application_version elements.
application_version Indicates the version of the external application (for example, SAP or Oracle
Applications) on which the external application job runs. Specified together with
the application_cm_version, application_form, and application_type
elements.
arch_max_days Maximum number of days to retains the SYSDATA archive data set for jobs that
ended NOTOK. [z/OS only]
arch_max_runs Maximum number of job runs to retain the SYSDATA archive data set for jobs
that ended NOTOK. [z/OS only]
126
Control-M Workload Automation API Guide
Parameter Description
command Command string supplied when the job Task Type (the task_type element) is
Command. Optional.
confirm_flag Specifies whether user confirmation is required before the job is submitted for
execution. String.
Valid values:
no - Job needs no confirmation to run. Default.
yes - Job must be confirmed to run.
count_cyclic_from Indicates whether the interval between successive runs of a cyclic job is
calculated from the start or the end of the previous job run. Specified only for
cyclic jobs (when the cyclic element is specified).
Valid values:
start – Counts interval from the start of the previous job run
end – Counts interval from the end of the previous job run
target - Counts interval from the scheduling time of the current job run.
127
Control-M Workload Automation API Guide
Parameter Description
cyclic_type If job is cyclic (cyclic equal yes), indicates how the intervals for running the job
are specified. Valid values are:
interval: Job is run at fixed interval. See the description for
rerun_interval.
interval_sequence: Job is run according to a list of time periods. See the
description for interval_sequence.
specific_times: Job is run according to a list of specific times. See the
description for specific_times.
This parameter is relevant only for jobs running in Control-M/Server version
6.4.01 and later and Control-M for z/OS version 7.0.01 and later.
days_due_out_offset The number of days that job execution can be extended after the ODAT.
days_due_out_offset is relevant only for jobs running in Control-M for z/OS
version 6.2.00 and later.
128
Control-M Workload Automation API Guide
Parameter Description
keep_active Number of extra days (beyond the original scheduling date) that the job is
allowed to remain in Active Jobs awaiting execution. Integer.
file_path Name of the library/directory in which the job script resides. String.
file_name Name of the file that contains the job script. String.
multiagent When selected, broadcasts job submission details to all Agents within a specified
Group. Not for z/OS. Optional.
Valid values:
yes – Nodes run as multi-agent job
no – not run as multi-agent job. Default.
host_group Host name of a host group to which the job is submitted. Not for z/OS.
order_folder Default or dummy folder to which you indicate the job belongs.
A folder is not necessary because jobs that are created with the Control-M/EM
API are inserted directly into Active Jobs. However, you may want to include a
value for this parameter so that the job can be tracked during statistical analysis
that uses Folder as a criterion.
129
Control-M Workload Automation API Guide
Parameter Description
prevent_nct2 Prevents data set cleanup before the original job run. [z/OS only].
Optional.
Valid values:
no – Does not prevent data set cleanup. Default.
yes – Prevents data set cleanup.
blank - Do not perform data set cleanup before the original job run.
list - Do not perform data set cleanup before the original job run; but
generate the messages that would be required for GDG adjustment during
restart.
flush - Halt processing of the job if any data set cleanup error is detected
(even if MVS would not have stopped processing the job).
130
Control-M Workload Automation API Guide
Parameter Description
request_nje Specifies the node in the JES network on which the job is to execute. [z/OS only]
String.
rerun_interval Specifies the length of time to wait between reruns of a job or between cyclic
runs of a job. The value is expressed as a number and a letter. The number
indicates the amount. The letter indicates the unit of measurement.
Valid values:
0 - 64800M (minutes)
0 - 1080H (hours)
0 - 45D (days)
Default: 0.
rerun_max Specifies the maximum number of reruns that can be performed for the
job. Integer.
Valid values: 0-99.
rerun_member Name of the JCL member to use when the job is automatically rerun. [z/OS only]
String. Optional.
reten_days Number of days to retain the job in the History Jobs file. [z/OS, only]. String.
reten_gen Maximum number of generations of the job to keep in the History Jobs
file.[z/OS, only]. String.
statistic_calendar Name of the Control-M periodic calendar within which statistics relating to the
job are collected.
131
Control-M Workload Automation API Guide
Parameter Description
sys_db Indicates that a single data set is used for archiving the SYSDATA of all jobs until
it is full, when another data set is started. [z/OS only]
Valid values:
yes – Single data set created for the SYSDATA of each job run.
no – Separate data set created for the SYSDATA of each job run.
output_from_class Limits the output handling operation to only outputs from the specified class.
[z/OS only]
output_parameter Certain output_option values require that you supply additional information
(such as Copy, NewDest):
If the output_option element is change_class, the output_parameter value
corresponds to the new class name.
If the output_option element is copy, the output_parameter value
corresponds to the destination file name.
If the output_option element is move, the output_parameter value
corresponds to the new destination for the file.
132
Control-M Workload Automation API Guide
Parameter Description
system_affinity Indicates the identity of the system in which the job must be initiated and
executed (in JES2).
Indicates the identity of the processor on which the job must execute (in
JES3).
For z/OS jobs only.
133
Control-M Workload Automation API Guide
Parameter Description
time_from_days_offset Number of days after the original scheduling date of the job during which
execution of the job can begin.
time_until_days_offset Number of days after the original scheduling date of the job during which
execution of the job can end.
time_zone Indicates the global time zone used to calculate the interval for time-related
conditions.
tolerance Maximum delay in minutes permitted for late submission when selecting a
specific time.
This parameter is relevant only for jobs running in Control-M/Server version
6.4.01 and later and Control-M for z/OS version 7.0.01 and later.
use_instream_jcl Whether the job submits a JCL stream defined within the job scheduling
definition.
Valid values are:
yes
no
134
Control-M Workload Automation API Guide
Parameter Description
135
Control-M Workload Automation API Guide
Parameter Description
136
Control-M Workload Automation API Guide
Parameter Description
137
Control-M Workload Automation API Guide
Parameter Description
find_pattern_from A number from 001 through 132, indicating the column at which the search should
start. If this field is blank, the value 001 is assumed. The value in this field must be
lower than that in the To Column field.
find_pattern_to A number from 001 through 132, indicating the column at which the search should
end. If this field is blank, the value 132 is assumed. The value in this field must be
higher than that in the From Column field.
and_or Option buttons that set the logical relationship between multiple On statements.
138
Control-M Workload Automation API Guide
139
Control-M Workload Automation API Guide
Parameter Description
do A sequence of do_statements.
do_variable Assigns an Variable variable when the On criteria are met. See do_variable XML
parameters (on page 140)
do_cond Assigns an In or Out condition when the On criteria are met. See do_cond XML
parameters (on page 141)
do_ifrerun Specifies job steps to be executed during rerun of a job. Only for networks using
Control-M/Restart. See do_ifrerun XML parameters (on page 143)
do_output Determines what to do with the output documentation when On criteria are met.
140
Control-M Workload Automation API Guide
Parameter Description
name Name of the item in question (for example, when specified for request, name is
the name of the request; when specified for pipe, name is the name of the pipe)
Parameter Description
141
Control-M Workload Automation API Guide
Parameter Description
142
Control-M Workload Automation API Guide
Parameter Description
folder Name of the Folder with which the job specified in do_forcejob is associated.
143
Control-M Workload Automation API Guide
Parameter Description
confirm Indicates that a job rerun specified by the Do If Rerun parameter must be manually
confirmed before it is executed.
Valid values:
yes – requires confirmation
no – confirmation is not required
from_procedure_step Procedure step (EXEC statement) that invokes a procedure from which the
specified program step program is executed.
from_program_step Job step. The execution results of the program executed by the job step are
checked against the specified codes criteria.
144
Control-M Workload Automation API Guide
Parameter Description
attach_output Specifies whether the output should be sent as an e-mail attachment. Valid values
are:
yes - Send the job’s output as an attachment
no - Do not send the job’s output as an attachment
default - Use the settings configured for the relevant Control-M server to
determine whether the job’s output should be sent as an attachment.
This parameter is relevant only for jobs running in Control-M/Server version 6.4.01
and later and Control-M for z/OS version 7.0.01 and later.
145
Control-M Workload Automation API Guide
Parameter Description
destination Recipient of a Shout message. Specified in both the Shout or the Notify
parameters.
146
Control-M Workload Automation API Guide
Parameter Description
from_class Specifies the class of jobs with outputs that are handled using the Do Output
specifications of the job.
parameter Contains additional output handling information. The type of information required
is dependent on the value of the option element.
If the option element is ChangeClass, the parameter value corresponds to the
new class name.
If the option element is Copy, the parameter value corresponds to the
destination file name.
If the option element is Move, the parameter value corresponds to the new
destination for the file.
147
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
148
Control-M Workload Automation API Guide
Parameter Description
149
Control-M Workload Automation API Guide
Parameter Description
on_fail Whether to keep a Control resource tied to a job if the job does not end OK. Valid
values:
keep
release - default
150
Control-M Workload Automation API Guide
Parameter Description
on_ok Whether to keep a Quantitative resource tied to a job if the job ends OK.
Valid values are:
release
discard
on_ok is relevant only for jobs running in Control-M for z/OS version 6.2.00 and
later.
on_fail Whether to keep a Quantitative resource tied to a job if the job does not end OK.
Valid values are:
keep
release
on_fail is relevant only for jobs running in Control-M for z/OS version 6.2.00 and
later.
151
Control-M Workload Automation API Guide
Parameter Description
name Name of the item in question (for example, when specified for request, name is
the name of the request; when specified for pipe, name is the name of the pipe)
Parameter Description
152
Control-M Workload Automation API Guide
Parameter Description
from_procedure_ Procedure step (EXEC statement) that invokes a procedure from which the
specified program step program is executed
step
from_program Job step. The execution results of the program executed by the job step are
_step checked against the specified codes criteria
153
Control-M Workload Automation API Guide
154
Control-M Workload Automation API Guide
Parameter Description
destination Recipient of a Shout message. Specified in both the Shout or the Do Shout
parameters.
shout_days_offset The number of days relative to the ODAT by which the sending of the Shout
message is offset.
Valid values are:
a number from 0 through 254
blank – no offset
shout_days_offset is relevant only for jobs running in Control-M for z/OS version
6.2.00 and later.
155
Control-M Workload Automation API Guide
Parameter Description
interval_item Time interval to rerun a cyclic job such as +2H, +1D, or +30M. Limited to 4000
characters for all fields.
Parameter Description
specific_time Specific time for a cyclic job to run, such as 7:00 or 11:00. Limited to 4000 for all
fields.
Response parameters
The following figure describes variable_assignment XML parameters:
156
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
response_token Used in a polling request. This token is received in the immediate response of a
response_create_aj.
157
Control-M Workload Automation API Guide
Parameter Description
job Tags that indicate a single job. A sequence of job. See the following table.
Parameter Description
status Describes the condition of the element that contains it.(for example, Error). String.
job_data An element that contains other parameters that describe the job.
See job_data XML parameters (on page 158)
158
Control-M Workload Automation API Guide
Parameter Description
order_id Serial number assigned to the job by the Control-M installation. String.
file_name Name of the file that contains the job script. String.
159
Control-M Workload Automation API Guide
Parameter Description
status Describes the condition of the element that contains it.(for example, Error). String.
jobs A sequence of jobs. See job XML parameters (on page 157).
Errors
Job creation errors are described in Create active job request errors (Major code 409) (on page 286).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:active_job>
<ctmem:job_name>MYJOB</ctmem:job_name>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:task_type>command</ctmem:task_type>
<ctmem:application>MYAPP</ctmem:application>
<ctmem:group>MYGROUP1</ctmem:group>
<ctmem:command>ls</ctmem:command>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
160
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>96</ctmem:response_token>
</ctmem:response_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:response_token>96</ctmem:response_token>
</ctmem:request_poll_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_poll_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:jobs>
<ctmem:job>
161
Control-M Workload Automation API Guide
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:rba>000000</ctmem:rba>
<ctmem:order_id>0023e</ctmem:order_id>
<ctmem:file_name>
</ctmem:mem_name>
<ctmem:job_name>MYJOB</ctmem:job_name>
<ctmem:is_table>no</ctmem:is_table>
</ctmem:job_data>
</ctmem:job>
</ctmem:jobs>
</ctmem:response_poll_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>Failure_ctm_name</ctmem:control_m>
<ctmem:active_job>
<ctmem:job_name>MYJOB</ctmem:job_name>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:task_type>command</ctmem:task_type>
<ctmem:application>MYAPP</ctmem:application>
<ctmem:group>MYGROUP1</ctmem:group>
<ctmem:command>ls</ctmem:command>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
162
Control-M Workload Automation API Guide
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='401'
ctmem:minor='2' ctmem:severity='Error' >
<ctmem:error_message>Invalid
Control-M.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_create_aj>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Add condition
Adds prerequisite conditions.
163
Control-M Workload Automation API Guide
Request parameters
The following table describes the request _add_condition XML Parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Parameter Description
164
Control-M Workload Automation API Guide
Response parameters
response_add_condition XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
response_token Used in a polling request. This token is received in the immediate response of a
response_add_condition.
165
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
Errors
See Add or Delete Condition request errors (Major code 404) (on page 283).
166
Control-M Workload Automation API Guide
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:condition>
<ctmem:name>MYJOBOUTCOND1</ctmem:name>
<ctmem:odate>STAT</ctmem:odate>
</ctmem:condition>
</ctmem:request_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>97</ctmem:response_token>
</ctmem:response_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
167
Control-M Workload Automation API Guide
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:response_token>97</ctmem:response_token>
</ctmem:request_poll_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_poll_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
</ctmem:response_poll_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:condition>
168
Control-M Workload Automation API Guide
<ctmem:name>MYJOBOUTCOND1</ctmem:name>
<ctmem:odate>STAT</ctmem:odate>
</ctmem:condition>
</ctmem:request_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>98</ctmem:response_token>
</ctmem:response_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:response_token>98</ctmem:response_token>
</ctmem:request_poll_add_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
169
Control-M Workload Automation API Guide
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM Server.
</faultstring>
<detail>
<ctmem:fault_poll_add_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='404'
ctmem:minor='14' ctmem:severity='Error' >
<ctmem:error_message>Connot add
condition, already exist.
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_poll_add_condition>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Delete condition
Deletes prerequisite conditions.
170
Control-M Workload Automation API Guide
Request parameters
request_delete_condition XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
condition Condition description wrapper. See condition XML parameters (on page 171).
171
Control-M Workload Automation API Guide
Parameter Description
Response parameters
Response_delete_condition XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
172
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
response_token Used in a polling request. This token is received in the immediate response of a
response_delete_condition.
Parameter Description
response_data_XML parameters
The following figure describes the response_data_XML parameters:
173
Control-M Workload Automation API Guide
Parameter Description
Errors
See Add or Delete Condition request errors (Major code 404) (on page 283).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:condition>
<ctmem:name>MYJOBOUTCOND1</ctmem:name>
<ctmem:odate>STAT</ctmem:odate>
</ctmem:condition>
</ctmem:request_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
174
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>99</ctmem:response_token>
</ctmem:response_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:response_token>99</ctmem:response_token>
</ctmem:request_poll_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_poll_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
</ctmem:response_poll_delete_condition>
</SOAP-ENV:Body>
175
Control-M Workload Automation API Guide
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:condition>
<ctmem:name>INEXISTENT_COND_NAME</ctmem:name>
<ctmem:odate>STAT</ctmem:odate>
</ctmem:condition>
</ctmem:request_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>101</ctmem:response_token>
</ctmem:response_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
176
Control-M Workload Automation API Guide
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_poll_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:response_token>101</ctmem:response_token>
</ctmem:request_poll_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_poll_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='404'
ctmem:minor='15' ctmem:severity='Error' >
<ctmem:error_message>Cannot delete
condition, does not exist.
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_poll_delete_condition>
</detail>
</SOAP-ENV:Fault>
177
Control-M Workload Automation API Guide
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Hold
Request parameters
request_aj_hold XML parameters
The following figure describes variable_assignment XML parameters:
178
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
response_aj_hold XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
179
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
180
Control-M Workload Automation API Guide
Parameter Description
Free
Request parameters
request_aj_free XML parameters
The following figure describes variable_assignment XML parameters:
181
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
response_aj_free XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
182
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Parameter Description
183
Control-M Workload Automation API Guide
Confirm
Request parameters
request_aj_confirm XML parameters
The following figure describes autoedit_assignment XML parameters
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
The following figure describes variable_assignment XML parameters
184
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
185
Control-M Workload Automation API Guide
Parameter Description
Rerun
Request parameters
The following figure describes variable_assignment XML parameters:
186
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
187
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Parameter Description
188
Control-M Workload Automation API Guide
Kill
Request parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
The following figure describes variable_assignment XML parameters:
189
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
190
Control-M Workload Automation API Guide
Parameter Description
Set to OK
Request parameters
request_aj_force_ok XML parameters
The following figure describes variable_assignment XML parameters:
191
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
response_aj_force_ok XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
192
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
193
Control-M Workload Automation API Guide
Parameter Description
Errors
See Job actions request errors (Major code 450) (on page 290).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_aj_free
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:order_id>0023e</ctmem:order_id>
</ctmem:request_aj_free>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
194
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_aj_free
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:response_token>103</ctmem:response_token>
</ctmem:response_aj_free>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_polling_aj_free
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:response_token>103</ctmem:response_token>
</ctmem:request_polling_aj_free>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Polling response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_polling_aj_free
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:order_id>0023e</ctmem:order_id>
195
Control-M Workload Automation API Guide
</ctmem:response_polling_aj_free>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_aj_hold
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:order_id>unknown</ctmem:order_id>
</ctmem:request_aj_hold>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_aj_hold
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity="Error">
<ctmem:error ctmem:major="401"
ctmem:minor="4" ctmem:severity="Error">
<ctmem:error_message>Internal Error:
Order ID not Found...
196
Control-M Workload Automation API Guide
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_aj_hold>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Job tracking
Tracks the progress of existing jobs in the Control-M installation.
Request parameters
request_job_track XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
jobs A sequence of job. See condition job XML parameters (on page 198).
197
Control-M Workload Automation API Guide
Parameter Description
Response parameters
response_job_track XML parameters
The following figure describes variable_assignment XML parameters:
198
Control-M Workload Automation API Guide
Parameter Description
status Describes the condition of the element that contains it. String.
status is a descriptive element in the response and job elements.
Parameter Description
status Describes the condition of the element that contains it.(for example, Error). String.
job_data An element that contains other parameters that describe the job.
A sequence of job_data. See:job_data XML parameters (on page 200)
error_list attribute: highest_severity Indicates the severity level of the most critical error
included in the error list. If only one error is included,
the severity for that error is displayed. String.
199
Control-M Workload Automation API Guide
Parameter Description
control_m String.
order_id Serial number assigned to the job by the Control-M installation. String.
200
Control-M Workload Automation API Guide
Parameter Description
201
Control-M Workload Automation API Guide
Parameter Description
Errors
See Job tracking request errors (Major code 406) (on page 284).
Examples
Successful Example (tracking single job)
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:jobs>
<ctmem:job>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013ic</ctmem:order_id>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
202
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:jobs>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013ic</ctmem:order_id>
<ctmem:job_status>Ended
OK</ctmem:job_status>
<ctmem:state_digits>000030000000</ctmem:state_digits>
<ctmem:odate>050711</ctmem:odate>
</ctmem:job_data>
</ctmem:job>
</ctmem:jobs>
</ctmem:response_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
203
Control-M Workload Automation API Guide
<ctmem:jobs>
<ctmem:job>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013xc</ctmem:order_id>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Error response from EM Server</faultstring>
<detail>
<ctmem:fault_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:jobs>
<ctmem:job>
<ctmem:job_data>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013xc</ctmem:order_id>
</ctmem:job_data>
<ctmem:error_list
ctmem:highest_severity="Error">
<ctmem:error ctmem:major="406"
ctmem:minor="1" ctmem:severity="Error">
<ctmem:error_message>
Job was not found in the last
AJF.
</ctmem:error_message>
</ctmem:error>
204
Control-M Workload Automation API Guide
</ctmem:error_list>
</ctmem:job>
</ctmem:jobs>
<ctmem:error_list ctmem:highest_severity="Error">
<ctmem:error ctmem:major="401" ctmem:minor="5"
ctmem:severity="Error">
<ctmem:error_message>Errors in
request.</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_job_track>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:jobs>
<ctmem:job>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013ic</ctmem:order_id>
</ctmem:job>
<ctmem:job>
<ctmem:control_m>ctm613</ctmem:control_m>
<ctmem:order_id>006b2</ctmem:order_id>
</ctmem:job>
<ctmem:job>
205
Control-M Workload Automation API Guide
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013xc</ctmem:order_id>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:jobs>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013ic</ctmem:order_id>
<ctmem:job_status>Ended
OK</ctmem:job_status>
<ctmem:state_digits>000030000000</ctmem:state_digits>
<ctmem:odate>050711</ctmem:odate>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:control_m>ctm613</ctmem:control_m>
<ctmem:order_id>006b2</ctmem:order_id>
<ctmem:job_status>Wait
Resource</ctmem:job_status>
206
Control-M Workload Automation API Guide
<ctmem:state_digits>220000004000</ctmem:state_digits>
<ctmem:odate>050704</ctmem:odate>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>012qh</ctmem:order_id>
<ctmem:job_status>Ended
OK</ctmem:job_status>
<ctmem:state_digits>000030000000</ctmem:state_digits>
<ctmem:odate>050711</ctmem:odate>
</ctmem:job_data>
</ctmem:job>
</ctmem:jobs>
</ctmem:response_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:jobs>
<ctmem:job>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013ic</ctmem:order_id>
</ctmem:job>
207
Control-M Workload Automation API Guide
<ctmem:job>
<ctmem:control_m>ctm613</ctmem:control_m>
<ctmem:order_id>006b2</ctmem:order_id>
</ctmem:job>
<ctmem:job>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013xc</ctmem:order_id>
</ctmem:job>
</ctmem:jobs>
</ctmem:request_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_job_track
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>PARTIAL_SUCCESS</ctmem:status>
<ctmem:jobs>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
<ctmem:job_data>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013ic</ctmem:order_id>
<ctmem:job_status>Ended
OK</ctmem:job_status>
<ctmem:state_digits>000030000000</ctmem:state_digits>
<ctmem:odate>050711</ctmem:odate>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:status>OK</ctmem:status>
208
Control-M Workload Automation API Guide
<ctmem:job_data>
<ctmem:control_m>ctm613</ctmem:control_m>
<ctmem:order_id>006b2</ctmem:order_id>
<ctmem:job_status>Wait
Resource</ctmem:job_status>
<ctmem:state_digits>220000004000</ctmem:state_digits>
<ctmem:odate>050704</ctmem:odate>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:job_data>
<ctmem:control_m>ctm620</ctmem:control_m>
<ctmem:order_id>013xc</ctmem:order_id>
</ctmem:job_data>
<ctmem:error_list
ctmem:highest_severity="Error">
<ctmem:error ctmem:major="406"
ctmem:minor="1" ctmem:severity="Error">
<ctmem:error_message>
Job was not found in the last AJF.
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:job>
</ctmem:jobs>
</ctmem:response_job_track>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
209
Control-M Workload Automation API Guide
Request parameters
request_act_retrieve_jobs XML Parameters
The following figure describes variable_assignment XML parameters:
210
Control-M Workload Automation API Guide
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
retrieve_jobs_criterion Retrieve jobs criteria wrapper. String. Consists of include and exclude filters that
allow specifying items to include with or exclude from the retrieve criteria, as
described in retrieve_jobs_criterion (on page 211).
retrieve_jobs_criterion
The following figure describes variable_assignment XML parameters:
Parameter Description
include Mandatory. Include filter definitions criteria wrapper. For more information, refer
include and exclude XML parameters (on page 212)
exclude Optional. Exclude filter definitions criteria wrapper. For more information, refer
include and exclude XML parameters (on page 212)
211
Control-M Workload Automation API Guide
Parameter Description
search_criterion String. Search criteria wrapper that consists of a sequence of param elements. At
least one search_criterion element must appear under the include element. The
amount of search_criterion elements is unbounded. The relationship between
search_criterion elements in one filter is OR. For a description of param, see
Search_criterion XML parameter (on page 212) table.
Parameter Description
param Search criteria parameter wrapper. String. Parameters used to build the search
criteria. At least one param element should appear under a search_criterion
element. The amount of param elements is unbounded. The relationship between
param elements in the same search_criterion is AND.
212
Control-M Workload Automation API Guide
Parameter Description
name Mandatory. Name of the retrieve active job parameter used as a search criteria.
String. For a list of valid values for the name parameter, refer to Table 136.
value Value used in search criteria. Any valid value of a job parameter. Wildcards and
search patterns can be used in combination with LIKE operator. String. Mandatory.
213
Control-M Workload Automation API Guide
Parameter Description
214
Control-M Workload Automation API Guide
Parameter Description
CRITICAL When selected, resources for the job are reserved exclusively for that job as they
become available. When all necessary resources are available, the job is executed.
CYCLIC If selected, indicates that the current job is cyclic (it should be rerun at specified
intervals).
215
Control-M Workload Automation API Guide
Parameter Description
Run As User User (user ID) on whose behalf the job is executed. This parameter is used by the
Control-M security mechanism.
HOSTGROUP Name of the host or host group on which following iterations of a job is run.
This parameter does not apply to MVS jobs.
216
Control-M Workload Automation API Guide
Response parameters
response_act_retrieve_jobs XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
Errors
See Retrieve active jobs request errors (Major code 440) (on page 289).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_act_retrieve_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
217
Control-M Workload Automation API Guide
<ctmem:max_returned_nodes>1000</ctmem:max_returned_nodes>
<ctmem:retrieve_jobs_criterion>
<ctmem:include>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>JOB_NAME</ctmem:name>
<ctmem:operator>LIKE</ctmem:operator>
<ctmem:value>*</ctmem:value>
</ctmem:param>
<ctmem:param>
<ctmem:name>ODATE</ctmem:name>
<ctmem:operator>EQ</ctmem:operator>
<ctmem:value>060625</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
</ctmem:include>
<ctmem:exclude>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>DATA_CENTER</ctmem:name>
<ctmem:operator>NE</ctmem:operator>
<ctmem:value>ctm630</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>APPLICATION</ctmem:name>
<ctmem:operator>EQ</ctmem:operator>
<ctmem:value>AJMN</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>APPLICATION</ctmem:name>
218
Control-M Workload Automation API Guide
<ctmem:operator>EQ</ctmem:operator>
<ctmem:value>FullJobs</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
</ctmem:exclude>
</ctmem:retrieve_jobs_criterion>
</ctmem:request_act_retrieve_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_act_retrieve_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:retrieved_nodes_number>3
</ctmem:retrieved_nodes_number>
<ctmem:jobs>
<ctmem:job>
<ctmem:job_data>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:order_id>0023e</ctmem:order_id>
<ctmem:rba>00023e</ctmem:rba>
<ctmem:table_rba>000000</ctmem:table_rba>
<ctmem:application>MYAPP</ctmem:application>
<ctmem:application_type>OS</ctmem:application_type>
<ctmem:group>MYGROUP1</ctmem:group>
<ctmem:job_name>MYJOB</ctmem:job_name>
<ctmem:mem_name> </ctmem:mem_name>
<ctmem:mem_lib> </ctmem:mem_lib>
<ctmem:order_table> </ctmem:order_table>
<ctmem:owner>controlm</ctmem:owner>
219
Control-M Workload Automation API Guide
<ctmem:description></ctmem:description>
<ctmem:task_type>Command</ctmem:task_type>
<ctmem:time_zone> </ctmem:time_zone>
<ctmem:in_BIM_service>0</ctmem:in_BIM_service>
<ctmem:job_status>Wait Resource
</ctmem:job_status>
<ctmem:job_state> </ctmem:job_state>
<ctmem:state_digits>020000004000</ctmem:state_digits>
<ctmem:odate>060625</ctmem:odate>
<ctmem:otime>20060625115417</ctmem:otime>
<ctmem:next_time> </ctmem:next_time>
<ctmem:rerun_counter>00000</ctmem:rerun_counter>
<ctmem:average_runtime>000000</ctmem:average_runtime>
<ctmem:start_time> </ctmem:start_time>
<ctmem:end_time> </ctmem:end_time>
<ctmem:critical>0</ctmem:critical>
<ctmem:cyclic>False</ctmem:cyclic>
<ctmem:emergency>False</ctmem:emergency>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:job_data>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:order_id>0023d</ctmem:order_id>
<ctmem:rba>00023d</ctmem:rba>
<ctmem:table_rba>000000</ctmem:table_rba>
<ctmem:application>apiWinApp2</ctmem:application>
<ctmem:application_type>
</ctmem:application_type>
<ctmem:group>apiGroup2</ctmem:group>
<ctmem:job_name>apitest2</ctmem:job_name>
220
Control-M Workload Automation API Guide
<ctmem:mem_name>apiMemName2</ctmem:mem_name>
<ctmem:mem_lib>d:<OWNER>controlm</ctmem:mem_lib>
<ctmem:order_table>apitest</ctmem:order_table>
<ctmem:owner> </ctmem:owner>
<ctmem:description>
</ctmem:description>
<ctmem:task_type>Job </ctmem:task_type>
<ctmem:time_zone> </ctmem:time_zone>
<ctmem:in_BIM_service>0
</ctmem:in_BIM_service>
<ctmem:job_status>Wait Resource
</ctmem:job_status>
<ctmem:job_state> </ctmem:job_state>
<ctmem:state_digits>020000004000</ctmem:state_digits>
<ctmem:odate>060625</ctmem:odate>
<ctmem:otime>20060625113440</ctmem:otime>
<ctmem:next_time> </ctmem:next_time>
<ctmem:rerun_counter>00000</ctmem:rerun_counter>
<ctmem:average_runtime>000000</ctmem:average_runtime>
<ctmem:start_time> </ctmem:start_time>
<ctmem:end_time> </ctmem:end_time>
<ctmem:critical>0</ctmem:critical>
<ctmem:cyclic>False</ctmem:cyclic>
<ctmem:emergency>False</ctmem:emergency>
</ctmem:job_data>
</ctmem:job>
<ctmem:job>
<ctmem:job_data>
<ctmem:control_m>ctm630</ctmem:control_m>
<ctmem:order_id>0023c</ctmem:order_id>
<ctmem:rba>00023c</ctmem:rba>
<ctmem:table_rba>000000</ctmem:table_rba>
221
Control-M Workload Automation API Guide
<ctmem:application>apiWinApp1</ctmem:application>
<ctmem:application_type>
</ctmem:application_type>
<ctmem:group>apiGroup1 </ctmem:group>
<ctmem:job_name>apitest1</ctmem:job_name>
<ctmem:mem_name>apiMemName1</ctmem:mem_name>
<ctmem:mem_lib> </ctmem:mem_lib>
<ctmem:order_table>apitest</ctmem:order_table>
<ctmem:owner>controlm</ctmem:owner>
<ctmem:description>
</ctmem:description>
<ctmem:task_type>Dummy </ctmem:task_type>
<ctmem:time_zone> </ctmem:time_zone>
<ctmem:in_BIM_service>0</ctmem:in_BIM_service>
<ctmem:job_status>Ended
OK</ctmem:job_status>
<ctmem:job_state>Run (2)</ctmem:job_state>
<ctmem:state_digits>000030000000</ctmem:state_digits>
<ctmem:odate>060625</ctmem:odate>
<ctmem:otime>20060625113439</ctmem:otime>
<ctmem:next_time> </ctmem:next_time>
<ctmem:rerun_counter>00001</ctmem:rerun_counter>
<ctmem:average_runtime>000000</ctmem:average_runtime>
<ctmem:start_time>20060625113441</ctmem:start_time>
<ctmem:end_time>20060625113441</ctmem:end_time>
<ctmem:critical>0</ctmem:critical>
<ctmem:cyclic>False</ctmem:cyclic>
<ctmem:emergency>False</ctmem:emergency>
</ctmem:job_data>
</ctmem:job>
222
Control-M Workload Automation API Guide
</ctmem:jobs>
</ctmem:response_act_retrieve_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure example
Request
<?xml version="1.0" encoding="ISO-8859-1" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_act_retrieve_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:max_returned_nodes>1000</ctmem:max_returned_nodes>
<ctmem:retrieve_jobs_criterion>
<ctmem:include>
<ctmem:search_criterion>
<ctmem:param>
<ctmem:name>JOB_NAME</ctmem:name>
<ctmem:operator>LIKE</ctmem:operator>
<ctmem:value>*</ctmem:value>
</ctmem:param>
</ctmem:search_criterion>
</ctmem:include>
</ctmem:retrieve_jobs_criterion>
</ctmem:request_act_retrieve_jobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
223
Control-M Workload Automation API Guide
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
<detail>
<ctmem:fault_act_retrieve_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='440'
ctmem:minor='4' ctmem:severity='Error' >
<ctmem:error_message>
Partial result.
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_act_retrieve_jobs>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
224
Control-M Workload Automation API Guide
Parameter Description
application_type Indicates the external application on which the job to be retrieved runs.
sub application The sub application to which the retrieved job belongs.
file_name The name of the file that contains the job script.
file_path The name of the path that contains the retrieved job file.
order_folder Default or dummy folder to which you indicate the job belongs. A folder is not
necessary because jobs that are created with Control-M/EM Web Services API are
inserted directly into Active Jobs database. However, you may want to include a
value for this parameter so that the job can be tracked during statistical analysis
that uses folder as a criterion.
order_library Default or dummy folder library in which folder documentation is said to be stored.
A folder (and, by extension, a folder library) are not necessary because jobs that
are created with the Control-M/EM Web Services API are inserted directly into
Active Jobs databse. However, you may want to include a value for this parameter
so that the job can be tracked during statistical analysis that uses Folder or Folder
Library as criteria. This parameter is specified only for z/OS jobs for which the
order_folder element was also specified.
Run As User User (user ID) on whose behalf the job is executed. This parameter is used by the
Control-M security mechanism.
225
Control-M Workload Automation API Guide
Parameter Description
time_zone Indicates the time zone according to which the job was scheduled.
226
Control-M Workload Automation API Guide
Parameter Description
next_time Indicates the next expected submission time for the job. For reruns or cyclic jobs
that use the Interval option. For Control-M for z/OS jobs, only the time can be
specified. For all other jobs, the time and the date can be specified.
average_runtime Average time (in minutes) for the job to run. The field displays the runtime statistic
generated by the latest run of the CTMJSA utility (which generates a statistic based
on the last successful runs of the job).
critical When selected, resources for the job are reserved exclusively for that job as they
become available. When all necessary resources are available, the job is executed.
cyclic If selected, indicates that the current job is cyclic (it should be rerun at specified
intervals).
227
Control-M Workload Automation API Guide
Request parameters
request_change_alert_status XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
alert_id The ID number of the alert. String. For more information on monitoring and
handling alerts, see Using Control-M Workload Automation.
228
Control-M Workload Automation API Guide
Response parameters
response_change_alert_status XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
Errors
See Alerts request errors (Major code 408) (on page 285).
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_change_alert_status
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:alert_id>359</ctmem:alert_id>
<ctmem:status>notice</ctmem:status>
</ctmem:request_change_alert_status>
</SOAP-ENV:Body>
229
Control-M Workload Automation API Guide
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_change_alert_status
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
</ctmem:response_change_alert_status>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Failure Example 1
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_change_alert_status
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:alert_id>9879</ctmem:alert_id>
<ctmem:status>notice</ctmem:status>
</ctmem:request_change_alert_status>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP:Server</faultcode>
230
Control-M Workload Automation API Guide
Failure Example 2
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_change_alert_status
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
<ctmem:alert_id>359</ctmem:alert_id>
<ctmem:status>notice</ctmem:status>
</ctmem:request_change_alert_status>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
231
Control-M Workload Automation API Guide
Response
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Error response from EM Server</faultstring>
<detail>
<ctmem:fault_change_alert_status
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity="Warning">
<ctmem:error ctmem:major="408"
ctmem:minor="7" ctmem:severity="Information">
<ctmem:error_message>
Alert already in desired state.
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_change_alert_status>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
232
Control-M Workload Automation API Guide
Request parameters
request_get_bim_services_info XML parameters
The following figure describes variable_assignment XML parameters:
Parameter Description
user_token Serial identification number supplied to the user during registration. String.
Response parameters
response_get_bim_services_info XML parameters
The following figure describes variable_assignment XML parameters:
233
Control-M Workload Automation API Guide
Parameter Description
234
Control-M Workload Automation API Guide
235
Control-M Workload Automation API Guide
Parameter Description
time_zone Indicates the time zone according to which the job should be scheduled. When the
value of this parameter is not zero, all dates reported use this time zone.
min_slack_time In case of a failure, this field indicates how long before the service is late.
236
Control-M Workload Automation API Guide
Examples
Successful example
Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_bim_services_info
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>12345630</ctmem:user_token>
</ctmem:request_bim_services_info>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:response_bim_services_info
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:status>OK</ctmem:status>
<ctmem:services>
<ctmem:service>
<ctmem:odate>12:26:07 01/12/2006</ctmem:odate>
<ctmem:service_name>Bim
Service</ctmem:service_name>
<ctmem:status>Service completed</ctmem:status>
<ctmem:due_time>12:29:07
01/12/2006</ctmem:due_time>
<ctmem:min_end_time>12:26:07
01/12/2006</ctmem:min_end_time>
<ctmem:description/>
<ctmem:num_jobs>3</ctmem:num_jobs>
<ctmem:complete_percentage>100</ctmem:complete_percentage>
237
Control-M Workload Automation API Guide
<ctmem:jobs_completed>3</ctmem:jobs_completed>
<ctmem:jobs_without_stats>2</ctmem:jobs_without_stats>
<ctmem:time_zone> GMT +2</ctmem:time_zone>
<ctmem:data_center>palace620</ctmem:data_center>
<ctmem:priority>5</ctmem:priority>
<ctmem:min_slack_time>0</ctmem:min_slack_time>
<ctmem:status_color>Service in process or
completed</ctmem:status_color>
</ctmem:service>
<ctmem:service>
<ctmem:odate>12:22:00 01/12/2006</ctmem:odate>
<ctmem:service_name>Bim
Service</ctmem:service_name>
<ctmem:status>Service is late</ctmem:status>
<ctmem:due_time>12:25:00
01/12/2006</ctmem:due_time>
<ctmem:min_end_time>13:52:08
01/12/2006</ctmem:min_end_time>
<ctmem:description>Job "Service4" should have
started by
12:25:00 GMT+02:00 and will not start on
time. The reason
is: Job is held.</ctmem:description>
<ctmem:num_jobs>3</ctmem:num_jobs>
<ctmem:complete_percentage>33</ctmem:complete_percentage>
<ctmem:jobs_completed>1</ctmem:jobs_completed>
<ctmem:jobs_without_stats>2</ctmem:jobs_without_stats>
<ctmem:time_zone> GMT +2</ctmem:time_zone>
<ctmem:data_center>palace620</ctmem:data_center>
<ctmem:priority>5</ctmem:priority>
<ctmem:min_slack_time>0</ctmem:min_slack_time>
<ctmem:status_color>Service delay or will not
complete</ctmem:status_color>
</ctmem:service>
238
Control-M Workload Automation API Guide
</ctmem:services>
</ctmem:response_bim_services_info>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode> … </faultcode>
<faultstring>…. </faultstring>
<detail>
. . . FAULT_RESPONSE_OF_THE_REQUEST . . .
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The fault parameters for all requests are described in Fault Response (on page 70).
Fault Response
The following table describes the parameters for fault XML parameters of all requests:
Parameter Description
error_list A sequence of error. For a list of the error_list sub parameters see:
Error XML parameters (on page 70).
Fault Example
<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error response from EM
Server.</faultstring>
239
Control-M Workload Automation API Guide
<detail>
<ctmem:fault_def_create_jobs
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:error_list
ctmem:highest_severity='Error' >
<ctmem:error ctmem:major='412'
ctmem:minor='1' ctmem:severity='Error' >
<ctmem:error_message>
Create jobs definitions failed,
inavlid params.
</ctmem:error_message>
</ctmem:error>
<ctmem:error ctmem:major='412'
ctmem:minor='14' ctmem:severity='Error' >
<ctmem:error_message>
Create jobs definitions validation
error: 'Field: AuthorError: The
field must have a
value'.
</ctmem:error_message>
</ctmem:error>
</ctmem:error_list>
</ctmem:fault_def_create_jobs>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
240
8
Chapter
8
Advanced features and optimization
Modifying initialization properties
Before using the Control-M/EM API in your project, the API must be initialized (started). The API services are
initialized using the EMXMLInvoker static method, init. This section shows you how to initialize
Control-M/EM API using non-default CORBA ORB properties.
If you intend to use the default initialization properties, you do not need to read Modifying initialization
properties.
CORBA is an architecture and specification for creating, distributing, and managing distributed program
objects in a network. In the Control-M/EM API, CORBA is implemented through the use of JacORB, a
third-party product that brokers requests among the components of distributed applications (acts as
middleware).
The Control-M/EM API init method initializes the CORBA Object Request Broker (ORB) in accordance with
instructions that you (the programmer) supply in the init call.
The default init prototype, Prototype 1, is called without the need to supply additional parameters or
properties.
The two additional init prototypes, Prototypes 2 and 3, enable you to specify alternate parameters and
properties for initializing CORBA.
Prototype 1
public static void init ()
Prototype 1 (the default prototype) initializes the CORBA services using a Control-M/EM API-specific CORBA
configuration that was created during the API post-installation configuration (using emapi-configure).
The default init prototype is described in Initializing and stopping the Control-M/EM API services (on page
42).
This CORBA configuration information is contained in the jacorb.properties file located under the
emapi-700\etc directory.
Prototype 2
public static void init(String[] args)
This init prototype enables you to include an array of strings representing a list of arguments.
241
Control-M Workload Automation API Guide
Arguments
The args parameter generally contains your command line arguments for the application’s main. This
enables you to control ORB initialization from outside the program.
For a list of CORBA parameters suitable for use in args, see the manufacturer’s documentation.
Code example
public class HelloWorld {
public static void main(String[] args) {
EMXMLInvoker.init(args);
...
}
}
Run example
java HelloWorld -jacorb.implname StandardNS
Prototype 3
public static void init(String[] args, Properties props)
This init prototype enables you to include an array of strings representing a list of arguments.
Arguments
The args parameter generally contains your command line arguments for the application’s main. This
enables you to control ORB initialization from outside the program.
For a list of CORBA parameters suitable for use in args, see the manufacturer’s documentation.
Properties
The props parameter (Properties) can contain CORBA parameters, using the same options as in the
command line that was passed as the first parameter (args).
The Properties class is part of the java.util package.
Code example
public class HelloWorld {
public static void main(String[] args) {
Properties props = new Properties();
props.setProperty("jacorb.implname", "StandardNS");
242
Control-M Workload Automation API Guide
EMXMLInvoker.init(args, props);
...
}
}
Run example
java HelloWorld
This run example is used for illustrative purposes. To run it, you must add Java virtual machine
(JVM) parameters and the Control-M/EM API CLASSPATH. These concepts are discussed in
Control-M/EM API Installation (on page 15).
This CORBA configuration information is contained in the jacorb.properties file located in the
emapi-700\etc directory.
By using both values for props and args, you can supply values for props that can be overridden
by values that are supplied for args.
getProperties
The getProperties method returns the properties object that you specified with the setProperties method.
If you have not set the Control-M/EM API properties using setProperties, using getProperties returns the
properties object containing the values in the ctmem.properties file under your project\application
working directory.
Each call to getProperties reads the ctmem.properties file. Any modifications made to this file while the
application is running affect subsequent calls to getProperties.
243
Control-M Workload Automation API Guide
Prototype
public Properties getProperties();
The Control-M/EM API default parameter properties are described in the following table (these parameters
were specified in the ctmemapi.properties file during configuration of the Control-M/EM API):
Parameter Description
setProperties
Use setProperties to modify the values of the Control-M/EM API properties. All subsequent calls to
getProperties return the Properties object that you specified with setProperties.
Prototype
public void setProperties(Properties props);
If the Control-M/EM API receives Properties that do not contain the parameters described in Table 146, the
localhost value is used in their place. It is recommended that you supply parameter values for the
Control-M/EM servers that are being used.
Example
In this example, setProperties is called before the Control-M/EM API is used. As a result, the
Control-M/EM API does not read the properties from the ctmem.properties file.
{
Properties props = new Properties();
props.setProperty("com.bmc.ctmem.emapi.GSR.hostname", "comp1");
props.setProperty("com.bmc.ctmem.emapi.GAS.hostname", "comp2");
EMXMLInvoker.setProperties(props);
...
// From this point forward, any new instance of EMXMLInvoker will work
with comp1 for the GUI Server and with comp2 for GAS
}
244
Control-M Workload Automation API Guide
Example
The total amount of time for polling is set at 10,000 milliseconds (10 seconds), using the
setPollRequestTimeoutMilli method.
The time between poll requests is set at 2000 milliseconds (2 seconds), using the
setPollRequestintervalMilli method.
Each polling request takes about 500 milliseconds (0.5 seconds).
10,000 / (2000 + 500) = 4 poll requests
setPollRequestIntervalMilli
The setPollRequestIntervalMilli method determines the time, in milliseconds, between poll requests.
This time is measured from the end of the current poll request. The actual time that it takes to carry out the
polling request is taken into account.
Prototype
public void setPollRequestIntervalMilli(final long timeout)
Default: 5000 milliseconds (5 seconds)
setPollRequestTimeoutMilli
The setPollRequestTimeoutMilli method determines the total time, in milliseconds, that is allotted for
polling for a response to a request.
245
Control-M Workload Automation API Guide
Prototype
public void setPollRequestTimeoutMilli(final long timeout)
Default: -1 milliseconds. The -1 value indicates that polling is carried on until a response is received. There
is no timeout value.
246
9
Chapter
9
Diagnostics and troubleshooting
This chapter helps you to analyze the Control-M/EM API product’s performance and prevent conflicts before
they arise.
Logging parameters
Any logging configuration information that you enter in the emapi_log.cfg file or in your project code must
conform to Log4J specifications (as described in the Log4J documentation).
247
Control-M Workload Automation API Guide
Level Description
248
Control-M Workload Automation API Guide
The remaining lines of the example define the properties of the appender, EMAPI_Appender.
The valid properties depend on the type of appender that is being defined.
This example illustrates a RollingFileAppender that has the properties discussed in the following
table.
RollingFileAppender example properties
Code Description
append=true Indicates that new information is added to the end of the log file
maxBackupIndex=2 Indicates the number of backups made (that is, the number of old
log files saved)
Possible cause
Some Control-M/EM API directories, .jar libraries, or library locations might be missing from your application
class path (CLASSPATH).
249
Control-M Workload Automation API Guide
Solution
Ensure that the following files and directories are in the class path:
fullPath/emapi-700/classes/log4j-1.2.8.jar
fullPath/emapi-700/classes/emapi.jar
fullPath/emapi-700/classes/jbcl.jar
fullPath/emapi-700/classes/jacorb.jar
fullPath/emapi-700/classes/concurrent-1.3.2.jar
fullPath/emapi-700/classes/logkit-1.2.jar
fullPath/emapi-700/classes/commons-codec-1.3.jar
fullPath/emapi-700/classes/avalon-framework-4.1.5.jar
fullPath/emapi-700/classes/antlr-2.7.2.jar
fullPath/emapi-700/classes/xercesImpl.jar
fullPath/emapi-700/classes/xml-apis.jar
fullPath/emapi-700/etc
fullPath/emapi-700/etc/jacorb.properties
Possible cause
There is an error in the virtual machine’s configuration parameters.
Solution
Check the log file for a message similar to the following message:
ERROR - resolve naming service failed during initial reference:
org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(Unknown Source)
If you received an org.omg.CORBA.COMM_FAILURE exception, and the exception was thrown from the
com.sun.corba.se.internal.iiop package, you probably did not specify to the virtual machine that it must
use the JacORB (CORBA) implementation (in place of the Sun default implementation).
You must specify to the Java virtual machine that it must use the CORBA implementation.
Use one of the following methods:
250
Control-M Workload Automation API Guide
Method 1
Run the java command from the project working directory, using the following parameters:
java -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
projectAppName
projectAppName is the executable file of your project.
Method 2
1. Create a file containing the following text:
org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
2. Save the file with the name orb.properties in one of the following directories:
• If you are using JDK, use JDK_HOME/jre/lib
• If you are using JRE, use JRE_HOME/lib
Method 3
Call the init method by using the properties illustrated in the following code example (assuming that args is
your application command-line arguments).
Properties props = new Properties();
props.setProperty("org.omg.CORBA.ORBClass",
"org.jacorb.orb.ORB");
props.setProperty("org.omg.CORBA.ORBSingletonClass",
"org.jacorb.orb.ORBSingleton");
EMXMLInvoker.init(args, props);
Alternatively, call the init method without any parameters.
Possible cause
Irrelevant libraries in the application class path (CLASSPATH) conflict with libraries that are required by the
Control-M/EM API. For example, a newer or older version of the APACHE Xerces Parser might be found in the
CLASSPATH.
251
Control-M Workload Automation API Guide
Solution
Use one of the following solutions:
Use the smallest set of classes possible when running the API. Doing so prevents your project from
finding irrelevant products and libraries in the CLASSPATH.
Ensure that the you have listed the required libraries first in the CLASSPATH so that they are found first.
Possible cause 1
The Control-M/EM API cannot communicate with the CORBA Naming Service for one of the following
reasons:
The CORBA services are down.
The Naming Service host name and port settings in the jacorb.properties file are incorrect. You can
find the corbaloc reference by searching for the following string: ORBInitRef.NameService.
Solution
Ensure that the following requirements are met:
The CORBA Naming Service is running (started) on the CORBA Server host computer.
The Naming Service host name and port settings in the jacorb.properties file point to the computer
that hosts the CORBA Server that you are using.
252
Control-M Workload Automation API Guide
Possible cause 2
Communication cannot be established with the Control-M/EM GUI Server or Global Alerts Server for one of
the following reasons:
Host names of the GUI Server or the Global Alerts Server are incorrect in the ctmemapi.properties file.
Host names of the GUI Server or the Global Alerts Server were specified with incorrect values in the code.
Solution
Ensure that the following requirements are met:
The Control-M/EM GUI Server is running.
The host names and ports of the Control-M/EM server components (GUI Server and Global Alerts Server)
are registered correctly in the CORBA Naming Service.
If you are using more than one CORBA Server, you are currently using the CORBA Server that serves the
Control-M/EM GUI Server and Global Alerts Server to which you are sending Control-M/EM API requests.
Possible cause
The XML file contains characters that the XML standard considers invalid. The following characters are
translated in the XML file as indicated in the following table:
‘ apostrophe '
253
Control-M Workload Automation API Guide
Possible cause
Because of Java limitations, applications that use the Control-M/EM API cannot be started when the path of
the directory in which the Control-M/EM API is installed contains spaces or other special characters.
Solution 1
1. Move the Control-M/EM API directory structure to a path that does not contain spaces or special
characters.
2. Reconfigure the Control-M/EM API.
3. If needed, modify the JAVA_HOME and CLASSPATH environment variables.
JAVA_HOME refers to the directory where the Java 2 Runtime Environment (JRE) was installed. The Java
2 SDK (also called the JDK) contains the JRE, but at a different level in the file hierarchy.
EXAMPLE: If the Java 2 SDK or JRE was installed in /ctm_em/user1, JAVA_HOME would be as follows:
If you are using JRE, /ctm_em/user1/jre1.6.x
If you are using SDK, /ctm_em/user1/jdk1.6.x/jre
Solution 2: A workaround
This solution provides an alternate method (one for UNIX and one for Windows) for use with the
Control-M/EM API. If you implement this solution, use this method at all times.
UNIX:
1. Define an alias to bypass the path that contains spaces. The alias should point to the Control-M/EM API
emapi-700 root directory. By using this alias when calling the Control-M/EM API, you can avoid
referring to spaces and special characters that exist in the actual path.
2. After defining the alias, reconfigure the Control-M/EM API so that it uses the new path.
EXAMPLE: If the Control-M/EM API root directory is ctm_em/path with space/emapi-700, use the
following commands to create the alias:
cd ctm_em
ln -s "path with space" pathwithoutspace
cd ctm_em/pathwithoutspace/emapi-700
Reconfigure the Control-M/EM API to reflect the new path.
254
Control-M Workload Automation API Guide
Microsoft Windows:
To avoid referring to spaces and special characters that exist in the actual path of the Control-M/EM API, call
the Control-M/EM API by using the MS-DOS-compatible (short) 8.3-format version of its name. Ensure that
you reconfigure the Control-M/EM API so that it uses the 8.3-format version of its path.
EXAMPLE: Open a new command prompt window.
Change the directory to the Control-M/EM API root directory, referring to the directory by using the
8.3-format version of its name.
If the Control-M/EM API root directory is d:\Program Files\BMC Software\emapi-700, use the
following command:
cd progra~1\bmcsof~1\emapi-700
Reconfigure the Control-M/EM API to reflect the new path.
255
10
Chapter
10
Uninstalling Control-M/EM API
The Control-M/EM API is a self-contained product provided in compressed formats (zip and tar) that can be
extracted to any directory. This chapter explains how to remove previous versions of the Control-M/EM API
from your system.
Every Control-M/EM installation has a directory named emapi under its home directory. This directory
contains dictionary and XML schema files necessary for the functioning of server components. Do not delete
this directory. If you remove this directory by mistake, restore it from a backup.
To uninstall the Control-M/EM API:
• Delete the Control-M/EM API directory:
o For version 7.0.00: emapi-700
o For version 6.4.01: emapi-640
o For version 6.3.01: emapi-630
o For version 6.2.01: emapi-620
o For version 6.1.03: emapi-613
o For versions earlier than 6.1.03: emapi-610
256
11
Chapter
11
Request format examples
This appendix includes one or more examples for each of the more complex requests:
Requests are submitted to the Control-M/EM API as XML-formatted text strings. The text strings can be
saved as plain-text files.
For instructions for how to create request strings and examples of the less complex requests, see
Introduction to Control-M/EM API requests (on page 68).
257
Control-M Workload Automation API Guide
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ctmem:request_delete_condition
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>$USER_TOKEN$</ctmem:user_token>
<ctmem:control_m>CTM01</ctmem:control_m>
<ctmem:condition>
<ctmem:name>Cond01</ctmem:name>
<ctmem:odate>0101</ctmem:odate>
</ctmem:condition>
</ctmem:request_delete_condition>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
258
Control-M Workload Automation API Guide
<ctmem:time_from>0900</ctmem:time_from>
<ctmem:time_until>1100</ctmem:time_until>
<ctmem:critical>no</ctmem:critical>
<ctmem:cyclic>no</ctmem:cyclic>
<ctmem:confirm_flag>yes</ctmem:confirm_flag>
<ctmem:auto_archive>no</ctmem:auto_archive>
<ctmem:sys_db>no</ctmem:sys_db>
<ctmem:arch_max_days>0</ctmem:arch_max_days>
<ctmem:arch_max_runs>0</ctmem:arch_max_runs>
<ctmem:rerun_max>0</ctmem:rerun_max>
<ctmem:command>ls -l</ctmem:command>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
259
Control-M Workload Automation API Guide
<ctmem:time_until>2300</ctmem:time_until>
<ctmem:rerun_interval>00060M</ctmem:rerun_interval>
<ctmem:critical>no</ctmem:critical>
<ctmem:cyclic>yes</ctmem:cyclic>
<ctmem:confirm_flag>yes</ctmem:confirm_flag>
<ctmem:auto_archive>no</ctmem:auto_archive>
<ctmem:sys_db>no</ctmem:sys_db>
<ctmem:arch_max_days>0</ctmem:arch_max_days>
<ctmem:arch_max_runs>0</ctmem:arch_max_runs>
<ctmem:rerun_max>0</ctmem:rerun_max>
<ctmem:command>ls -l</ctmem:command>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
260
Control-M Workload Automation API Guide
<ctmem:critical>no</ctmem:critical>
<ctmem:cyclic>no</ctmem:cyclic>
<ctmem:confirm_flag>yes</ctmem:confirm_flag>
<ctmem:auto_archive>no</ctmem:auto_archive>
<ctmem:sys_db>no</ctmem:sys_db>
<ctmem:arch_max_days>0</ctmem:arch_max_days>
<ctmem:arch_max_runs>0</ctmem:arch_max_runs>
<ctmem:rerun_max>0</ctmem:rerun_max>
<ctmem:command>ls -l</ctmem:command>
<ctmem:in_conditions>
<ctmem:in_condition>
<ctmem:condition>ctm600a0</ctmem:condition>
<ctmem:date>ODAT</ctmem:date>
<ctmem:and_or>and</ctmem:and_or>
</ctmem:in_condition>
</ctmem:in_conditions>
<ctmem:out_conditions>
<ctmem:out_condition>
<ctmem:condition>ctm600a0</ctmem:condition>
<ctmem:date>ODAT</ctmem:date>
<ctmem:sign>delete</ctmem:sign>
</ctmem:out_condition>
</ctmem:out_conditions>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
261
Control-M Workload Automation API Guide
<ctmem:request_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>$USER_TOKEN$</ctmem:user_token>
<ctmem:control_m>ctm3-omega</ctmem:control_m>
<ctmem:active_job>
<ctmem:job_name>Rsc0</ctmem:job_name>
<ctmem:mem_name>Rsc0</ctmem:mem_name>
<ctmem:task_type>dummy</ctmem:task_type>
<ctmem:application>Resource</ctmem:application>
<ctmem:group>Resource</ctmem:group>
<ctmem:max_wait>0</ctmem:max_wait>
<ctmem:description>Job requiring
resources.</ctmem:description>
<ctmem:cyclic>no</ctmem:cyclic>
<ctmem:confirm_flag>yes</ctmem:confirm_flag>
<ctmem:sys_db>no</ctmem:sys_db>
<ctmem:arch_max_days>0</ctmem:arch_max_days>
<ctmem:arch_max_runs>0</ctmem:arch_max_runs>
<ctmem:over_lib>asds</ctmem:over_lib>
<ctmem:count_cyclic_from>end</ctmem:count_cyclic_from>
<ctmem:control_resources>
<ctmem:control_resource>
<ctmem:resource>Disks</ctmem:resource>
<ctmem:type>shared</ctmem:type>
</ctmem:control_resource>
<ctmem:control_resource>
<ctmem:resource>Time</ctmem:resource>
<ctmem:type>shared</ctmem:type>
</ctmem:control_resource>
<ctmem:control_resource>
<ctmem:resource>JJ4</ctmem:resource>
<ctmem:type>shared</ctmem:type>
</ctmem:control_resource>
<ctmem:control_resource>
<ctmem:resource>DE1a34</ctmem:resource>
262
Control-M Workload Automation API Guide
<ctmem:type>exclusive</ctmem:type>
</ctmem:control_resource>
<ctmem:control_resource>
<ctmem:resource>CPU</ctmem:resource>
<ctmem:type>shared</ctmem:type>
</ctmem:control_resource>
</ctmem:control_resources>
<ctmem:quantitative_resources>
<ctmem:quantitative_resource>
<ctmem:resource>DL</ctmem:resource>
<ctmem:quantity>30</ctmem:quantity>
</ctmem:quantitative_resource>
</ctmem:quantitative_resources>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
263
Control-M Workload Automation API Guide
<ctmem:max_wait>0</ctmem:max_wait>
<ctmem:description>Job with On-Do
statements.</ctmem:description>
<ctmem:time_from>0900</ctmem:time_from>
<ctmem:time_until>1100</ctmem:time_until>
<ctmem:priority>Ab</ctmem:priority>
<ctmem:critical>no</ctmem:critical>
<ctmem:cyclic>no</ctmem:cyclic>
<ctmem:confirm_flag>yes</ctmem:confirm_flag>
<ctmem:auto_archive>no</ctmem:auto_archive>
<ctmem:sys_db>no</ctmem:sys_db>
<ctmem:arch_max_days>0</ctmem:arch_max_days>
<ctmem:arch_max_runs>0</ctmem:arch_max_runs>
<ctmem:rerun_max>0</ctmem:rerun_max>
<ctmem:count_cyclic_from>end</ctmem:count_cyclic_from>
<ctmem:command>ls -l</ctmem:command>
<ctmem:autoedit_assignments>
<ctmem:autoedit_assignment>
<ctmem:name>COPYTO</ctmem:name>
<ctmem:value>%%HOME.%%FILE</ctmem:value>
</ctmem:autoedit_assignment>
</ctmem:autoedit_assignments>
<ctmem:on_do_statements>
<ctmem:on_do_statement>
<ctmem:on_statements>
<ctmem:on_statement>
<ctmem:code>*</ctmem:code>
<ctmem:statement>*</ctmem:statement>
</ctmem:on_statement>
</ctmem:on_statements>
<ctmem:do_statements>
<ctmem:do_sysout>
<ctmem:option>copy</ctmem:option>
<ctmem:parameter>%%COPYTO</ctmem:parameter>
264
Control-M Workload Automation API Guide
</ctmem:do_sysout>
</ctmem:do_statements>
</ctmem:on_do_statement>
</ctmem:on_do_statements>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
265
Control-M Workload Automation API Guide
<ctmem:arch_max_runs>0</ctmem:arch_max_runs>
<ctmem:rerun_max>0</ctmem:rerun_max>
<ctmem:over_lib>JOBDOC</ctmem:over_lib>
<ctmem:count_cyclic_from>end</ctmem:count_cyclic_from>
<ctmem:command>echo %%ABC</ctmem:command>
<ctmem:on_do_statements>
<ctmem:on_do_statement>
<ctmem:on_statements>
<ctmem:on_statement>
<ctmem:code>*</ctmem:code>
<ctmem:statement>*</ctmem:statement>
</ctmem:on_statement>
</ctmem:on_statements>
<ctmem:do_statements>
<ctmem:do_autoedit>
<ctmem:name>Auto1</ctmem:name>
<ctmem:value>1234567890</ctmem:value>
</ctmem:do_autoedit>
</ctmem:do_statements>
</ctmem:on_do_statement>
</ctmem:on_do_statements>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
266
Control-M Workload Automation API Guide
<ctmem:request_create_aj
xmlns:ctmem="http://www.bmc.com/ctmem/schema700">
<ctmem:user_token>$USER_TOKEN$</ctmem:user_token>
<ctmem:control_m>omega</ctmem:control_m>
<ctmem:active_job>
<ctmem:task_type>SMART_table</ctmem:task_type>
<ctmem:application>appl</ctmem:application>
<ctmem:group>grp1</ctmem:group>
<ctmem:odate>ODAT</ctmem:odate>
</ctmem:active_job>
</ctmem:request_create_aj>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
267
Control-M Workload Automation API Guide
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In the group ID element, you need to specify:
the RBA of the SMART Folder if the Control-M is running on z/OS.
the Order ID of the SMART Folder (with the addition of a leading zero) if the Control-M is running
on another operating system.
<ctmem:control_m>UnixDc</ctmem:control_m><ctmem:job_id>2</ctmem:jo
b_id>
<ctmem:job_name>OrdSimJobU</ctmem:job_name>
<ctmem:table_name>OrdSimJobU</ctmem:table_name>
<ctmem:odate>20020522</ctmem:odate>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
268
Control-M Workload Automation API Guide
<ctmem:control_m>UnixDc</ctmem:control_m>
<ctmem:job_id>2</ctmem:job_id>
<ctmem:job_name>ForSimJobU</ctmem:job_name>
<ctmem:table_name>ForSimJobU</ctmem:table_name>
<ctmem:odate>20010522</ctmem:odate>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
269
Control-M Workload Automation API Guide
</ctmem:autoedit_assignment>
</ctmem:autoedit_assignments>
<ctmem:table_info>
<ctmem:into_table>recent</ctmem:into_table>
<ctmem:allow_dup>no</ctmem:allow_dup>
</ctmem:table_info>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
270
Control-M Workload Automation API Guide
<ctmem:name>B</ctmem:name>
<ctmem:value>3</ctmem:value>
</ctmem:autoedit_assignment>
</ctmem:autoedit_assignments>
<ctmem:table_info>
<ctmem:into_table>recent</ctmem:into_table>
<ctmem:allow_dup>yes</ctmem:allow_dup>
</ctmem:table_info>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<ctmem:user_token>$USER_TOKEN$</ctmem:user_token>
<ctmem:force_it>yes</ctmem:force_it>
<ctmem:control_m>my700</ctmem:control_m>
<ctmem:job_name>sub2</ctmem:job_name>
<ctmem:table_name>smart1/sub1</ctmem:table_name>
<ctmem:odate>ODAT</ctmem:odate>
<ctmem:table_info>
<ctmem:into_table>recent</ctmem:into_table>
<ctmem:allow_dup>yes</ctmem:allow_dup>
</ctmem:table_info>
</ctmem:request_order_force>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
271
12
Chapter
12
Error codes and exceptions
Errors and exceptions may occur when the Control-M/Enterprise Manager API is being used.
Errors and exceptions can be divided into the following groups:
errors and exceptions that are caused by the Control-M/EM API
errors and exceptions that are caused by faulty formatting in the XML request file
errors and exceptions that are caused by the presence of incorrect data in the XML request file
errors and exceptions that are caused by Control-M/EM or the Control-M installation
In addition to being described in this chapter, Control-M/EM API errors are listed in the EMAPIMessages.txt
file located in the home directory of the Control-M/EM installation.
Each error is composed of the following information:
Major code
Integer that represents a family of related errors or exceptions.
Minor code
ID code unique to each error.
Severity
Indicates how critical the error is. Severity also determines the way that the Control-M/EM API handles
the error.
Description
Text description of the error, returned as a string when an exception is thrown.
272
Control-M Workload Automation API Guide
Severity
Every error that the Control-M/EM API displays has a severity level. This level indicates the priority of the
error and indicates how much information is written to the log file.
When using the Control-M/EM API, the most common severity level is ERROR. Using the default logging
configuration, the DEBUG error is never used. For information on how to modify the logging configuration,
see Control-M/EM API logging (on page 247).
The severity levels that are supported by the Control-M/EM API are listed in the following table:
Level Description
273
Control-M Workload Automation API Guide
000 NULL Exception NULL exception errors (Major code 000) (on page 275)
100 Low-level API Exceptions Low-level API exceptions (Major code 100) (on page 276)
200 Parser Exceptions Parser exceptions (Major code 200) (on page 276)
300 Control-M Server Errors: Group1 Control-M/Server errors: Group 1 (Major code 300) (on page
277)
301 Control-M Server Errors: Group 2 Control-M/Server errors: Group 2 (Major code 301) (on page
280)
302 Control-M Server Errors: Group 3 Control-M/Server errors: Group 3 (Major code 302) (on page
281)
401 Generic Request Exceptions Generic request exceptions (Major code 401) (on page 282)
403 Poll Request Poll request errors (Major code 403) (on page 282)
404 Add/Delete Condition Request Add or Delete Condition request errors (Major code 404) (on
page 283)
405 Order/Force Request Order or Force request errors (Major code 405) (on page 284)
406 Job Tracking Request Job tracking request errors (Major code 406) (on page 284)
407 Authorization Request Authorization request errors (Major code 407) (on page 285)
408 Alerts Request Alerts request errors (Major code 408) (on page 285)
274
Control-M Workload Automation API Guide
409 Create Active Job Request Create active job request errors (Major code 409) (on page
286)
411 Upload folders Upload folder request errors (Major code 411) (on page 287)
412 Create jobs or SMART Folder Create job/SMART Folder definitions request errors (Major
definitions code 412) (on page 288)
413 Delete job definitions Delete job definitions request errors (Major code 413) (on
page 289)
440 Retrieve active jobs Retrieve active jobs request errors (Major code 440) (on page
289)
450 Active job actions Job actions request errors (Major code 450) (on page 290)
500 Control-M/EM API Java Client Control-M/EM API Java client errors (Major code 500) (on
page 291)
600 Gateway Messages Gateway messages (Major code 600) (on page 292)
Minor
code Severity Description
275
Control-M Workload Automation API Guide
Minor
code Severity Description
Minor
code Severity Description
276
Control-M Workload Automation API Guide
Minor
code Severity Description
277
Control-M Workload Automation API Guide
Minor
code Severity Description
52 ERROR Cannot add the condition because the condition file is full
54 ERROR Cannot add the control resource because the resource file is full
57 ERROR Cannot add the quantitative resource because the resource file is full
59 ERROR Cannot delete the quantitative resource because it does not exist
70 ERROR The requested job does not exist in the given folder
95 ERROR The folder entity specified was not found in Active Jobs database
278
Control-M Workload Automation API Guide
Minor
code Severity Description
101 ERROR The filed Sub Application is mandatory for a group entity
102 ERROR SUB APPLICATION and JOBNAME should be the same for group entity
103 ERROR SUB APPLICATION and SCHEDTAB should be the same for group entity
105 ERROR The Sub Application specified does not exist in the database
106 ERROR FILE_PATH, CMDLINE, FILE_NAME AND OVERRIDE_PATH should not be specified
110 ERROR Failed to setup application type for HOSTGRP, FILE_NAME and Override Path
should not be specified
279
Control-M Workload Automation API Guide
Minor
code Severity Description
534 ERROR Cannot open Active Jobs database is corrupted, I/O error, or file is not really
Active Jobs
535 ERROR Cannot order a job while Active Jobs database is being formatted
537 ERROR The job order contains more information than what Control-M/EM can handle
548 ERROR The calendar specified in the job is either corrupted or invalid
280
Control-M Workload Automation API Guide
Minor
code Severity Description
166 ERROR The job contains a condition with a PREV/NEXT date that cannot be interpreted by
Control-M/EM
169 INFO Control-M/EM has finished handling the request. No jobs were scheduled
Minor
code Severity Description
540 ERROR Security exit not loaded and security checking is bypassed
281
Control-M Workload Automation API Guide
Minor
code Severity Description
Minor
code Severity Description
282
Control-M Workload Automation API Guide
Minor
code Severity Description
283
Control-M Workload Automation API Guide
Minor
code Severity Description
Minor
code Severity Description
284
Control-M Workload Automation API Guide
Minor
code Severity Description
Minor
code Severity Description
285
Control-M Workload Automation API Guide
Minor
code Severity Description
286
Control-M Workload Automation API Guide
Minor
code Severity Description
287
Control-M Workload Automation API Guide
Minor
code Severity Description
10 ERROR Create definitions, API is not supported for CTM version '%s'
13 ERROR Sub application name of a job or a SMART Folder differs from a SMART Folder or
folder
288
Control-M Workload Automation API Guide
Minor
code Severity Description
6 ERROR Delete jobs definitions validation error: [<filter name>] is not valid filter field
Minor
code Severity Description
6 ERROR Retrieve active jobs validation error: '%s' is not valid filter field
289
Control-M Workload Automation API Guide
Minor
code Severity Description
361 ERROR The selected job/folder cannot be deleted due to its current state
290
Control-M Workload Automation API Guide
Minor
code Severity Description
3 ERROR Failed to establish connection with server - no server registered under this
hostname
5 ERROR Failed to establish connection with server - not a valid component type, check
your hostname
7 ERROR Failed to establish connection with server - check your connection with the
CORBA Naming Service
112 ERROR Response format is not valid, cannot find rule based calendar
291
Control-M Workload Automation API Guide
Minor
code Severity Description
4 ERROR Net too large to be fully viewed. Some nodes are missing
292
Control-M Workload Automation API Guide
Minor
code Severity Description
24 ERROR Field Rerun Mem Cannot be used if field Task Type is Cyclic
31 ERROR Do you really want to erase the entire value Net value
32 ERROR Do you really want to clear the entire value Net value
293
Control-M Workload Automation API Guide
Minor
code Severity Description
55 ERROR If field value (Days/Week days Calendar) begins with ALL then the rest of the
parameter must be blank
56 ERROR Field Days Calender is required if field value contains the value: value
57 ERROR Field Week Calender is required if field value contains the value: value
58 ERROR Field Days has an invalid value starting at position: value; There should be a comma
there
66 ERROR Unknown platform. Verification of data defaults to MVS. Do you want to continue?
294
Control-M Workload Automation API Guide
Minor
code Severity Description
68 ERROR Calendar value was downloaded successfully from data center value
69 ERROR Calendar value was deleted successfully from data center value
73 ERROR Forced Calendar Upload overrides calendar content in data center Proceed?
74 ERROR You are not authorized to access the Calendar List window
75 ERROR Filed value must be specified if field value is File, New Dest or Change Class
77 ERROR Field value may only be used with the Change Class option
79 ERROR Field Sign may not be + if the ODATE field value is **** or $$$$
82 ERROR Field Command Line may be specified only if Task Type is Command
86 ERROR Fields Parm and From Class must be specified if field Option is Change Class
87 ERROR Field Parm must be specified if field Option is New Dest or File
88 ERROR Field Confirmation Cal cannot be used with fields PDS Name or Minimum
89 ERROR Field Months cannot be used with fields PDS Name, Minimum or Dates
295
Control-M Workload Automation API Guide
Minor
code Severity Description
90 ERROR Field Dates cannot be used with parameters PDS Name, Minimum, Months, Days, or
Days Calendar
91 ERROR Field Dates cannot be used with fields Week Days, Weeks Days Calender Confirmation
Cal
92 ERROR If field PDS Name is specified then Minimum must be specified and vice versa
96 ERROR A job with the same name already exists in this folder
97 ERROR If field Retro is specified then PDS Name and Minimum cannot be used
98 ERROR The fields Days and Week Days Calendar cannot both be specified
100 ERROR Fields Rerun Mem and Max Rerun cannot be used if field Task Type is Cyclic
106 ERROR If field value is *???????, then field value must be blank
110 ERROR Definition folder value was downloaded successfully from data center value
111 ERROR Definition folder value was deleted successfully from data center value
296
Control-M Workload Automation API Guide
Minor
code Severity Description
114 ERROR Forced Folder Upload overrides folder content in data center Proceed?
115 ERROR You are not authorized to access the Folders window
117 ERROR Field value must be blank if field value is OK or NOTOK or RERUN
118 ERROR Communication with WS-Gateway stopped, all requests were canceled
123 ERROR value not possible, data center value not available
124 ERROR Communication with data center value down, all requests canceled
125 ERROR Data center value is suspended (Active jobs is being formatted)
127 ERROR Data center value is suspended (Active jobs is being formatted), all requests canceled
128 ERROR Invalid event %c received from data center value. To ensure database integrity,
WS-GTW stop/restart is recommended
129 ERROR The host name be specified only for the TCP protocol
130 ERROR The host name may contain only Alphanumeric characters and periods
297
Control-M Workload Automation API Guide
Minor
code Severity Description
134 ERROR The Net Group field must contain two alpha numeric characters
138 ERROR Please verify that all users have quit Control-M/EM and that the WS-Gateway is down.
146 ERROR Job Report fields saved. Please close and open the job report window
298
Control-M Workload Automation API Guide
Minor
code Severity Description
157 ERROR Alarm handling command ignored. User value is handling this alarm now
160 ERROR Download of calendar value canceled in gateway - Another download is currently in
progress - Try later
164 ERROR Upload of definitions folder value canceled in gateway - folder in use
165 ERROR Download of definition folder value canceled in gateway - folder in use
166 ERROR Download of definition folder value canceled in gateway - Another download is
currently in progress - Try later
167 ERROR Definitions folder deleted on data center but delete failed on workstation (rc 1)
168 ERROR Definitions folder deleted on data center but delete failed on workstation (rc 2)
169 ERROR Calendar deleted on data center but delete failed on workstation (rc 2)
170 ERROR Delete of definitions folder value canceled in gateway - folder in use
172 ERROR User request canceled in gateway, no answer from data center (time-out)
173 ERROR Download of value canceled, no answer from data center (time-out)
176 ERROR Upload canceled (file transfer error (rcp) in gateway), consult system administrator
299
Control-M Workload Automation API Guide
Minor
code Severity Description
177 ERROR Information request canceled in gateway, system error (fopen failed), consult system
administrator
178 ERROR Information request canceled (time-out) in gateway, no answer from data center
179 ERROR Upload of value canceled (time-out), no answer from data center
187 ERROR value was not found in data center. Delete in workstation?
188 ERROR You are not authorized to access the Global Conditions window
192 ERROR Insert failed. Record with same key already exists
194 ERROR Error message value Received from data center value
300
Control-M Workload Automation API Guide
Minor
code Severity Description
197 ERROR Field value may not contain the characters value
200 ERROR Field value must be blank if field When is OK or NOTOK or RERUN
203 ERROR Unsupported version value of data center value. Check Control-M installation
301
Control-M Workload Automation API Guide
Parameter Description
active_from Indicates the start of a period of time during which the job or SMART Folder
can be ordered.
active_till Indicates the end of a period of time during which the job or SMART Folder
can be ordered.
and_or Indicates the relationship between Month Days parameter values and Week
Days parameter values.
application Name of the application to which the job’s group belongs. Used as a
descriptive name for related groups of jobs.
application_cm_version Indicates the version of external application (for example, SAP or Oracle
Applications) Control Module (CM) that is installed in the Control-M
installation. Specified together with the application_form,
application_type, and application_version elements.
application_type Indicates the type of external application (for example, SAP or Oracle
Applications) on which the external application job runs. Specified together
with the application_cm_version, application_form, and
application_version elements.
302
Control-M Workload Automation API Guide
Parameter Description
application_version Indicates the version of the external application (for example, SAP or Oracle
Applications) on which the external application job runs. Specified together
with the application_cm_version, application_form, and
application_type elements.
arch_max_days Maximum number of days to retains the SYSDATA archive data set for jobs
that ended NOTOK. [z/OS only]
arch_max_runs Maximum number of job runs to retain the SYSDATA archive data set for
jobs that ended NOTOK. [z/OS only]
command Command string supplied when the job Task Type (the task_type
element) is Command. Optional.
confirm_flag Specifies whether user confirmation is required before the job is submitted
for execution. String.
Valid values:
no: Job needs no confirmation to run. Default.
yes: Job must be confirmed to run.
303
Control-M Workload Automation API Guide
Parameter Description
count_cyclic_from Indicates whether the interval between successive runs of a cyclic job is
calculated from the start or the end of the previous job run. Specified only
for cyclic jobs (when the cyclic element is specified).
Valid values:
start: Counts interval from the start of the previous job run
end: Counts interval from the end of the previous job run
target: Counts interval from the scheduling time of the current job run.
cyclic_type If job is cyclic (cyclic equal yes), indicates how the intervals for running the
job are specified. Valid values are:
interval: Job is run at fixed interval. See rerun_interval.
interval_sequence: Job is run according to a list of time periods. See
interval_sequence.
specific_times: Job is run according to a list of specific times. See
specific_times.
This parameter is relevant only for jobs running in Control-M/Server version
6.4.01 and later and Control-M for z/OS version 7.0.01 and later.
304
Control-M Workload Automation API Guide
Parameter Description
days_cal Name of a user-defined calendar containing a list of days of the month, used
with Month Days, to determine a set of working days.
days_due_out_offset The number of days that job execution can be extended after the ODAT.
days_due_out_offset is relevant only for jobs running in Control-M for
z/OS version 6.2.00 and later.
Sub Application Name of the sub application to which the job belongs. Used as a descriptive
name for related groups of jobs.
keep_active Number of extra days (beyond the original scheduling date) that the job is
allowed to remain in Active Jobs awaiting execution. Integer.
file_path Name of the library/directory in which the job script resides. String.
file_name Name of the file that contains the job script. String.
min_pds_tracks Minimum number of free partitioned data set tracks required by the library
specified for the PDS parameter.
305
Control-M Workload Automation API Guide
Parameter Description
month_days Indicates the days of the month on which the job should be scheduled for
processing.
multiagent When selected, broadcasts job submission details to all Agents within a
specified Node Group. Not for z/OS. Optional.
Valid values:
yes: Run as multi-agent job
no: Not run as multi-agent job. Default.
host_id Host ID of the host on which the job was most recently run.
This parameter is not available for Control-M for z/OS jobs.
306
Control-M Workload Automation API Guide
Parameter Description
prevent_nct2 Prevents data set cleanup before the original job run. [z/OS only].
Optional.
Valid values:
no: Does not prevent data set cleanup. Default.
yes: Prevents data set cleanup.
blank: Do not perform data set cleanup before the original job run.
list: Do not perform data set cleanup before the original job run; but
generate the messages that would be required for GDG adjustment
during restart.
flush: Halt processing of the job if any data set cleanup error is
detected (even if MVS would not have stopped processing the job).
request_nje Specifies the node in the JES network on which the job is to execute. [z/OS
only] String.
rerun_interval Specifies the length of time to wait between reruns of a job or between
cyclic runs of a job. The value is expressed as a number and a letter. The
number indicates the amount. The letter indicates the unit of measurement.
Valid values:
0 - 64800M (minutes)
0 - 1080H (hours)
0 - 45D (days)
Default: 0.
rerun_max Specifies the maximum number of reruns that can be performed for the
job. Integer.
Valid values: 0-99.
rerun_member Name of the JCL member to use when the job is automatically rerun. [z/OS
only] String. Optional.
reten_days Number of days to retain the job in the History Jobs file. [z/OS, only]. String.
307
Control-M Workload Automation API Guide
Parameter Description
reten_gen Maximum number of generations of the job to keep in the History Jobs
file.[z/OS, only]. String.
retro Indicates whether the job should be scheduled for possible execution after
its original scheduled date has passed.
shift When to schedule the job if the date is not confirmed. (Option) Valid values
are:
ignore_job. Do not shift the job to a different date. The job is not
scheduled.
next_day. Shift to the next working date.
prev_day. Shift to the previous working date.
no_confcal. Tentatively schedule the job for the current day (even if not
a working day). Additional shifting may or may not be performed,
depending on the value indicated in the shift_num parameter.
shift_num The number of working days that a job can be shifted. Values from -62 to 62
can be entered. This function is also called Extended Shift.
308
Control-M Workload Automation API Guide
Parameter Description
statistic_calendar Name of the Control-M periodic calendar within which statistics relating to
the job are collected.
sys_db Indicates that a single data set is used for archiving the SYSDATA of all jobs
until it is full, when another data set is started. [z/OS only]
Valid values:
yes: Single data set created for the SYSDATA of each job run.
no: Separate data set created for the SYSDATA of each job run.
Output_from_class Limits the output handling operation to only outputs from the specified
class. [z/OS only]
309
Control-M Workload Automation API Guide
Parameter Description
system_affinity Indicates the identity of the system in which the job must be initiated and
executed (in JES2).
Indicates the identity of the processor on which the job must execute (in
JES3).
For z/OS jobs only.
rule_based_cal_relationship Indicates the relationship (AND/OR) between Rule Based Calendar criteria
and basic scheduling criteria in the job processing definition (that is,
whether either set of criteria, or both sets of criteria, must be satisfied).
310
Control-M Workload Automation API Guide
Parameter Description
time_from_days_offset Number of days after the original scheduling date of the job during which
execution of the job can begin.
time_until_days_offset Number of days after the original scheduling date of the job during which
execution of the job can end.
time_zone Indicates the global time zone used to calculate the interval for time-related
conditions.
tolerance Maximum delay in minutes permitted for late submission when selecting a
specific time.
This parameter is relevant only for jobs running in Control-M/Server version
6.4.01 and later and Control-M for z/OS version 7.0.01 and later.
use_instream_jcl Whether the job submits a JCL stream defined within the job scheduling
definition.
Valid values are:
yes
no
week_days Indicates the days of the week on which the job should be scheduled for
processing.
311
Control-M Workload Automation API Guide
Parameter Description
JAN Indicates whether to run the job in this month. Valid values are:
yes
no
FEB Indicates whether to run the job in this month. Valid values are:
yes
no
MAR Indicates whether to run the job in this month. Valid values are:
yes
no
APR Indicates whether to run the job in this month. Valid values are:
yes
no
MAY Indicates whether to run the job in this month. Valid values are:
yes
no
JUN Indicates whether to run the job in this month. Valid values are:
yes
no
JUL Indicates whether to run the job in this month. Valid values are:
yes
no
AUG Indicates whether to run the job in this month. Valid values are:
yes
no
SEP Indicates whether to run the job in this month. Valid values are:
yes
no
312
Control-M Workload Automation API Guide
Parameter Description
OCT Indicates whether to run the job in this month. Valid values are:
yes
no
NOV Indicates whether to run the job in this month. Valid values are:
yes
no
DEC Indicates whether to run the job in this month. Valid values are:
yes
no
Parameter Description
date Indicates a specific date, in either mmdd or ddmm format (depending on the site
standard), on which the job should be scheduled.
313
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
314
Control-M Workload Automation API Guide
Parameter Description
and_or Indicates the relationship between Month Days parameter values and Week Days
parameter values.
315
Control-M Workload Automation API Guide
Parameter Description
find_pattern_from A number from 001 through 132, indicating the column at which the search should
start. If this field is blank, the value 001 is assumed. The value in this field must be
lower than that in the To Column field.
find_pattern_to A number from 001 through 132, indicating the column at which the search should
end. If this field is blank, the value 132 is assumed. The value in this field must be
higher than that in the From Column field.
and_or Option buttons that set the logical relationship between multiple On statements.
316
Control-M Workload Automation API Guide
317
Control-M Workload Automation API Guide
Parameter Description
do A sequence of do_statements.
do_variable Assigns a variable when the On criteria are met. See .do_variable XML parameters
(on page 318)
do_cond Assigns an In or Out condition when the On criteria are met. See .do_cond XML
parameters description (on page 319)
do_ifrerun Specifies job steps to be executed during rerun of a job. Only for networks using
Control-M/Restart. See do_ifrerun XML parameters (on page 321)
do_output Determines what to do with the output documentation when On criteria are met.
318
Control-M Workload Automation API Guide
Parameter Description
name Name of the item in question (for example, when specified for request, name is
the name of the request; when specified for pipe, name is the name of the pipe)
Parameter Description
319
Control-M Workload Automation API Guide
Parameter Description
320
Control-M Workload Automation API Guide
Parameter Description
folder Name of the Folder with which the job specified in do_forcejob is associated.
321
Control-M Workload Automation API Guide
Parameter Description
confirm Indicates that a job rerun specified by the Do If Rerun parameter must be manually
confirmed before it is executed.
Valid values:
yes – requires confirmation
no – no confirmation required
from_procedure_step Procedure step (EXEC statement) that invokes a procedure from which the
specified program step program is executed.
from_program_step Job step. The execution results of the program executed by the job step are
checked against the specified codes criteria.
322
Control-M Workload Automation API Guide
Parameter Description
attach_output Specifies whether the output should be sent as an email attachment. Valid values
are:
yes - Send the job’s output as an attachment
no - Do not send the job’s output as an attachment
default - Use the settings configured for the relevant Control-M server to
determine whether the job’s output should be sent as an attachment.
This parameter is relevant only for jobs running in Control-M/Server version 6.4.01
and later and Control-M for z/OS version 7.0.01 and later.
323
Control-M Workload Automation API Guide
Parameter Description
destination Recipient of a Shout message. Specified in both the Shout or the Do Shout
parameters.
324
Control-M Workload Automation API Guide
Parameter Description
from_class Specifies the class of jobs with outputs that are handled using the Do Output
specifications of the job.
parameter Contains additional output handling information. The type of information required
is dependent on the value of the option element.
If the option element is ChangeClass, the parameter value corresponds to the
new class name.
If the option element is Copy, the parameter value corresponds to the
destination file name.
If the option element is Move, the parameter value corresponds to the new
destination for the file.
325
Control-M Workload Automation API Guide
Parameter Description
description The description of the problem for which you are opening up the ticket.
summary A summary of the problem for which you are opening up a ticket.
326
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
327
Control-M Workload Automation API Guide
Parameter Description
on_fail Whether to keep a Control resource tied to a job if the job does not end OK. Valid
values:
keep
release – default
328
Control-M Workload Automation API Guide
Parameter Description
on_ok Whether to keep a Quantitative resource tied to a job if the job ends OK.
Valid values are:
release
discard
on_ok is relevant only for jobs running in Control-M for z/OS version 6.2.00 and
later.
on_fail Whether to keep a Quantitative resource tied to a job if the job does not end OK.
Valid values are:
keep
release
on_fail is relevant only for jobs running in Control-M for z/OS version 6.2.00 and
later.
329
Control-M Workload Automation API Guide
Parameter Description
330
Control-M Workload Automation API Guide
Parameter Description
from_procedure_step Procedure step (EXEC statement) that invokes a procedure from which the
specified program step program is executed.
from_program_step Job step. The execution results of the program executed by the job step are
checked against the specified codes criteria.
331
Control-M Workload Automation API Guide
332
Control-M Workload Automation API Guide
Parameter Description
destination Recipient of a Shout message. Specified in both the Shout or the Do Shout
parameters.
shout_days_offset The number of days relative to the ODAT by which the sending of the Shout
message is offset.
Valid values are:
a number from 0 through 254
blank – no offset
shout_days_offset is relevant only for jobs running in Control-M for z/OS version
6.2.00 and later.
333
Control-M Workload Automation API Guide
334
Control-M Workload Automation API Guide
Parameter Description
keep_active Maximum number of days that the job can wait to be executed after its original
scheduling date has passed.
and_or Indicates the relationship between Month Days parameter values and Week Days
parameter values.
Optional.
days_cal Name of a user-defined calendar containing a list of days of the month, used with
Month Days, to determine a set of working days.
weeks_cal Name of a user-defined, week-based calendar used together with parameter Week
Days to specify a set of working days.
retro Indicates whether the job should be scheduled for possible execution after its
original scheduled date has passed.
shift When to schedule the job if the date is not confirmed. (Option) Valid values are:
ignore_job. Do not shift the job to a different date. The job is not scheduled.
next_day. Shift to the next working date.
prev_day. Shift to the previous working date.
no_confcal. Tentatively schedule the job for the current day (even if not a
working day). Additional shifting may or may not be performed, depending on
the value indicated in the shift_num parameter.
shift_num The number of working days that a job can be shifted. Values from -62 to 62 can
be entered. This function is also called Extended Shift.
active_from Indicates the start of a period of time during which the job or SMART Folder can be
ordered.
active_till Indicates the end of a period of time during which the job or SMART Folder can be
ordered.
month_days Indicates the days of the month on which the job should be scheduled for
processing.
week_days Indicates the days of the week on which the job should be scheduled for
processing.
335
Control-M Workload Automation API Guide
Parameter Description
JAN Indicates whether to run the job in this month. Valid values are:
yes
no
FEB Indicates whether to run the job in this month. Valid values are:
yes
no
MAR Indicates whether to run the job in this month. Valid values are:
yes
no
APR Indicates whether to run the job in this month. Valid values are:
yes
no
MAY Indicates whether to run the job in this month. Valid values are:
yes
no
JUN Indicates whether to run the job in this month. Valid values are:
yes
no
JUL Indicates whether to run the job in this month. Valid values are:
yes
no
AUG Indicates whether to run the job in this month. Valid values are:
yes
no
336
Control-M Workload Automation API Guide
Parameter Description
SEP Indicates whether to run the job in this month. Valid values are:
yes
no
OCT Indicates whether to run the job in this month. Valid values are:
yes
no
NOV Indicates whether to run the job in this month. Valid values are:
yes
no
DEC Indicates whether to run the job in this month. Valid values are:
yes
no
Parameter Description
date Indicates a specific date, in either mmdd or ddmm format (depending on the site
standard), on which the job should be scheduled.
337
Control-M Workload Automation API Guide
Parameter Description
Parameter Description
interval_item Time interval to rerun a cyclic job such as +2H, +1D, or +30M. Limited to 4000
characters for all fields.
Parameter Description
specific_time Specific time for a cyclic job to run, such as 7:00 or 11:00. Limited to 4000 for all
fields.
338