Control-M Workload Automation Utilities Guide
Control-M Workload Automation Utilities Guide
9.0.00.500
Utilities Guide
June 2017
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
2103 CITYWEST BLVD 800 841 2031
HOUSTON TX
77042-2827
USA
Telephone (01) 713 918 8800 Fax (01) 713 918 8000
2
ERP and BI/DI: The application server(s) upon which Control-M managed processes are executed
should be licensed in addition to the Control-M Agent machine(s) (in some cases, this may be the
same machine).
Databases: Each database server upon which Control-M managed database related processes are
being executed should be counted in addition to the Control-M Agent machine(s).
AFT and MFT: Only the machine(s) upon which the AFT or MFT plug-in is installed should be licensed.
Web Services, Java & Messaging: Only the Control-M Agent machine(s) upon which the plug-in is
installed should be licensed.
Backup: The Control-M Agent machine(s) where the Backup plug-in is installed and also the hosts
which are running the backup server software should be licensed (note that this excludes the client
machines for which the Backup Server software is managing actual backup processes except where a
backup takes place of the backup server machine itself).
Cloud: Only the Control-M Agent machine(s) upon which the plug-in is installed should be licensed.
Hadoop: All machines in each managed Hadoop Cluster should be licensed.
IBM® Tivoli® Business Service Manager, IBM Tivoli Workload Scheduler, IBM Cognos, IBM InfoSphere
DataStage, IBM iSeries, IBM Websphere, and AIX® are the trademarks or registered trademarks of
International Business Machines Corporation in the United States, other countries, or both.
UNIX® is the registered trademark of The Open Group in the US and other countries.
Linux is the registered trademark of Linus Torvalds.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks
of their respective owners.
SAP® R/2 and SAP R/3, SAP Business Objects, and SAP NetWeaver are trademarks or registered
trademarks of SAP AG in Germany and in several other countries.
3
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
• Messages from the operating system, such as file system full
• Messages from related software
4
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.
Third party Software
For the provisions described in the BMC License Agreement and Order related to third party products or
technologies included in the BMC Product, see
https://docs.bmc.com/docs/display/workloadautomation/Control-M+Workload+Automation+Documentati
on and click Third-party software (TPS).
5
Contents
Introduction to Utilities ................................................................................................. 10
Methods for running utilities .......................................................................................................... 11
Utility reference table ................................................................................................................... 22
Utility workflow between Control-M/Server and Control-M/Agent ..................................................... 29
Control-M/EM requests and communication ................................................................................... 30
Parameter name cross references.................................................................................................. 31
6
Active Jobs Database utilities....................................................................................... 339
ctmcontb ................................................................................................................................... 339
ctmipc ....................................................................................................................................... 344
ctmloadset ................................................................................................................................. 346
ctmstvar .................................................................................................................................... 349
ctmvar ....................................................................................................................................... 350
ecactltb ..................................................................................................................................... 356
7
ccmcli ........................................................................................................................................ 424
ctm_menu ................................................................................................................................. 428
ctmag ........................................................................................................................................ 428
ctmagcln .................................................................................................................................... 429
ctmdiskspace ............................................................................................................................. 431
ctmkeygen ................................................................................................................................. 432
ctmkeystore_mng ....................................................................................................................... 438
ctmldnrs .................................................................................................................................... 442
ctmlog ....................................................................................................................................... 445
ctmsys ....................................................................................................................................... 448
ctmunixcfg ................................................................................................................................. 455
ctmwincfg .................................................................................................................................. 456
Running the ctmwincfg utility ...................................................................................................... 456
ecaqrtab .................................................................................................................................... 457
emmftcli .................................................................................................................................... 461
emcha -restore ........................................................................................................................... 465
erase_audit_data........................................................................................................................ 465
purge_xalerts ............................................................................................................................. 467
purge_runinfo ............................................................................................................................ 468
Loading prerequisite conditions from manual conditions file .......................................................... 469
Creating the manual conditions file .............................................................................................. 469
Manual conditions parameters ..................................................................................................... 470
Manual conditions file example .................................................................................................... 470
Running the ctm_remedy_configure utility ................................................................................... 471
set_agent_mode ........................................................................................................................ 471
Health Check utility .................................................................................................................... 473
8
Statistics and reporting ............................................................................................... 606
bim_report ................................................................................................................................. 606
emreportcli ................................................................................................................................ 608
ctmjsa ....................................................................................................................................... 612
ctmruninf ................................................................................................................................... 615
ctmstats .................................................................................................................................... 618
9
1
1
Introduction to Utilities
Utilities can be used to perform many common Control-M tasks from the command prompt of any
computer where Control-M components are installed.
Although many of the tasks performed by these utilities can be performed using Control-M or the
Control-M Configuration Manager, the utilities enable you to work at computers that do not have the GUI
or the Control-M Configuration Manager installed on them. By including a utility command in the
command line of a job processing definition, you can automatically run the utility at a predetermined time
or under a predetermined set of conditions. For more information about different methods for running
utilities, see Methods for running utilities (on page 11).
Utilities can be run from computers on Control-M/EM, Control-M/Server and Control-M/Agent and are
usually run as Administrator. For Control-M/Server and Control-M/Agent, if a user other than an
Administrator wants to run the utility, you need to follow the procedure as described in Running
Control-M/Server utilities as other users (on page 13) and Control-M/Agent utilities (on page 20).
For Control-M/EM utilities you must have the appropriate authorization to either copy from or modify
entities in Control-M/EM database. For more information, see Control-M/EM Authorizations. Some
Control-M/EM database utilities are implemented by using input and argument files written in XML, as
described in XML file rules (on page 35). A valid Control-M/EM database user name and password are
required to run Control-M/EM utilities.
The following sections describes the types of utilities:
Definition, ordering, and monitoring utilities (on page 41): Creates, modifies, deletes, orders and
monitors job processing definitions.
Folders and Calendars utilities (on page 265): Creates, and modifies calendar definitions, folders, and
SMART Folders and Sub Folders.
New day procedure and user dailies (on page 328): Creates and modifies how the job ordering
processing is automated.
Active Jobs Database utilities (on page 339): Monitors the jobs running in the active database.
Communication, start up, and troubleshooting (on page 357): Starts up, shuts down, and
troubleshoots various Control-M components.
Administration and configuration (on page 415): Monitors and manages selected elements of
Control-M.
Database maintenance (on page 495): Maintains the Control-M/EM database.
Security (on page 586): Implements various levels of security.
Statistics and reporting (on page 606): Generates statistics and reports.
10
Control-M Utilities Guide
Chapter
11
Control-M Utilities Guide
Some Control-M/Agent utilities require special formatting for transmission to the Server computer.
Commands invoked from UNIX agent computers are embedded in double quotes when sent to the
Server computer. Therefore, use single quotes for command elements that must be within quotation
marks.
EXAMPLE: ctmcreate ...-cmdline "ls -l ’$HOME’"ctmcreate ...-cmdline "ls -l
’$HOME’"
Values for utility parameters must not contain the apostrophe or single quote character.
When invoking these utilities from Control-M/Agent, the presence of a special character in the
argument values may cause problems. The following example contains a back-slash before the string
DELETEME:
ctmcreate -TASKTYPE COMMAND -jobname servertest -cmdline "ctmvar -action
set -var '%%#\DELETEME' -varexpr to_be_deleted"
When this command is invoked from Control-M/Agent, the back-slash before DELETEME may be
"eaten" by the shell. To avoid this problem, add a back-slash before the special character that causes
the problem (in this case, the original back-slash). When invoking the ctmcreate utility or ctmdefine
utility from Control-M/Agent with a date_ref of $$$$, put a back-slash before each $ as shown here:
ctmcreate -TASKTYPE COMMAND -cmdline ls -incond a '\$\$\$\$' AND ...
12
Control-M Utilities Guide
Utilities output
Certain Control-M/Server and Control-M/Agent utilities generate reports that can be directed to a file.
Each such utility is identified by the inclusion of <output> among the utility’s parameters.
If output parameters are specified, output is routed to the specified file (for example, a file on the
Control-M/Server computer).
ctmordck SYSTEM SYSTEM <User Name>/ctm_server/user_a/udlist.txt
If output parameters are not specified, the output is routed to the default output device (for example,
the logical name of a disk).
When directing output to a file, do one of the following:
Specify the full path name of the file (for example,
<User Name>/ctm_server/user1/rprt.txt).
Specify the relative name of the file to be placed in the <controlmUserDir>/ directory.
Redirect to the Control-M/Agent computer by specifying a full path name of the file after the
redirection (>) character.
13
Control-M Utilities Guide
ORACLE_BASE DB_TYPE
ORACLE_HOME PGHOME
ORACLE_SID PGDATA
NLS_LANG PGPORT
PGHOST
PGDATABASE
PGUSER
PGSYSCONFDIR
PGSERVICE
LD_LIBRARY_PATH/LIBPATH/
SHLIBPATH
DBU_BIN
MIRROR_DSQUERY
14
Control-M Utilities Guide
To ascertain the values to assign to variables, see Determining the values to assign to variables (on page
15).
15
Control-M Utilities Guide
AIX LIBPATH
HP-UX SHLIB_PATH
Solaris LD_LIBRARY_PATH
Variable Description
<Control-M/ServerPath> The default full path name of the Windows home directory
under which Control-M/Server is installed.
<user name> The default full path name of the UNIX user account home
directory under which Control-M/Server is installed.
16
Control-M Utilities Guide
For examples, see Example: Environment variables in UNIX using csh or tsch (on page 17) and Example:
Environmental variables in UNIX using other shells (on page 18).
17
Control-M Utilities Guide
18
Control-M Utilities Guide
machine=Solaris
PG_HOST=ctrlm900
PG_SERVICE=db
LD_LIBRARY_PATH=/home1/ctm900pg/ctm_server/exe_Solaris:/home1/ctm900pg/pgs
ql/lib
:/home1/ctm900pg/pgsql/lib32:/home1/ctm900pg/ctm_server/exe_Solaris:/home1
/ctm900pg/pgsql/lib:/home1/ctm900pg/pgsql/lib32:/home1/ctm900pg/ctm_agent/
ctm/exe:/home1/ctm900pg/ctm_agent/ctm/exe
DB_TYPE=SERVER
PGSYSCONFDIR=/home1/ctm900pg/pgsql/etc
19
Control-M Utilities Guide
Control-M/Agent utilities
Agent utilities that run on a Windows computer by a user other than the administrator may not have
access to certain data or functions. Agent utilities that run on a UNIX computer can be run by users other
than the agent account owner, after the user has loaded the agent account environment. For more
information, see Running Control-M/Agent utilities as other users (on page 21).
All Control-M/Agent utilities support the -agent <agent name> parameter. The variable <agent name>
represents the name of the Control-M/Agent specified during the installation procedure.
Where multiple Control-M/Agents reside on a computer, the -agent parameter determines which
Control-M/Agent will manage the utility. If the ctmagcfg or ag_diag_comm utilities are run without
specifying the -agent parameter, the user is prompted to select the Control-M/Agent. For all other utilities,
if the -agent parameter is not specified, the default Control-M/Agent is used.
EXAMPLE: Assume a computer has two Agents, Default and Saturn. To add a user to Default, use the
following command:
ctmpwd -action add -user user2 -password 123456 -agent Default
-or-
ctmpwd -action add -user user2 -password 123456
EXAMPLE: To add a user to Saturn, use the following command:
ctmpwd -action add -user saturn_user2 -password 123456 -agent Saturn
20
Control-M Utilities Guide
21
Control-M Utilities Guide
SQL Access
Supports Variables
Creates reports
Run interactively
computer
Run from a remote host
Run from agent computer
_exit Yes
_sleep Yes
ag_diag_ Yes
comm
ag_ping Yes
ctmagcfg Yes
ctmunixcf Yes
g
ctmwincf Yes
g
set_agent Yes
_mode
22
Control-M Utilities Guide
Utility
SQL Access
Supports Variables
Creates reports
Run interactively
computer
Run from a remote host
Run from agent computer
ctm_resto Yes Yes Yes
re_bcp
ctmdisksp Yes
ace
23
Control-M Utilities Guide
Utility
SQL Access
Supports Variables
Creates reports
Run interactively
computer
Run from a remote host
Run from agent computer
ctmkeyge Yes Yes
n
ctmkeyst Yes
ore_
mng
ctmruninf
24
Control-M Utilities Guide
Utility
SQL Access
Supports Variables
Creates reports
Run interactively
computer
Run from a remote host
Run from agent computer
ctmudchk Yes Yes
shutdb Yes
startdb Yes
25
Control-M Utilities Guide
Utility
SQL Access
Supports Variables
Creates reports
Run interactively
computer
Run from a remote host
Run from agent computer
cli Yes Yes
26
Control-M Utilities Guide
Utility
SQL Access
Supports Variables
Creates reports
Run interactively
computer
Run from a remote host
Run from agent computer
em_SQL Yes Yes Yes
orbadmin Yes
27
Run from a remote host
computer
Run from agent computer
Run interactively
Yes
Yes
Creates reports
28
Supports Variables
Run as a batch job
Yes
Yes
Only Administrator
can run utility
Yes
Control-M Utilities Guide
SQL Access
Yes
Requires Control-M active
updatede
Utility
util
f
Control-M Utilities Guide
NOTE: If the primary Control-M/Server does not respond to a Control-M/Agent request to execute a
utility (other than ag_ping), the request is automatically redirected to the first non-primary Server listed in
the Authorized Control-M/Server Hosts parameter. If the redirection is successful, that agent continues to
work with the replacement server.
Some Control-M/Server utilities can be invoked from Control-M/Agent using the same command line
syntax. When such a utility is invoked by the agent, the agent sends the command line, by way of a
message, to the server for execution.
The Agent-to-Server communication timeout intervals are described in Defining a Control-M/Agent
component. If the agent requests a utility that runs on the server and there is no response within the
timeout interval, the requested action will fail. You can modify this timeout interval by using the
Control-M/Agent System Parameters window in the Control-M Configuration Manager. However,
increasing this timeout interval tends to reduce Control-M/Agent performance.
29
Control-M Utilities Guide
30
Control-M Utilities Guide
APPLICATION Application
CRITICAL Critical
CYCLIC Cyclic
DESCRIPTION Description
31
Control-M Utilities Guide
DOOK Do OK
DOSHOUT Notify
CAL_ANDOR AND/OR
DATE Dates
DAYS Days
SPECIFIC_TIMES Run at
TOLERANCE Tolerance
RELATIONSHIP Relationship
RETRO Retroactively order job that its scheduled date has passed
TIMEUNTIL Time
32
Control-M Utilities Guide
INTERVAL Interval
INCOND In Conditions
ON On Statement/Code
RUN_AS Run as
PRIORITY Priority
SHOUT Notification
FOLDER Folder
TASKTYPE What
33
Control-M Utilities Guide
TIMEUNTIL Time to
34
2
2
XML file rules
Control-M/EM utilities read input text files that are used to enter information into the Control-M/EM
database. Control-M/EM export utilities export data from the database in text files. Both the input and the
output files are formatted with XML. For example, the defcal input file specifies new Calendar definitions
to enter into the database. Different parts of the input file are defined by tags composed of punctuation
marks. For an example, see XML file example (on page 36).
XML files have the following characteristics:
XML is a structured format for organizing and specifying data.
Data in an XML file is classified by type.
Words enclosed in angle brackets (< >), called tags, are used to classify and organize the data.
In the XML files used by the Control-M/EM utilities, tags are used to classify job processing definitions,
Calendar, folder, and SMART Folder parameters, and values. Each Control-M/EM utility is composed of a
combination of at least two of the following parts:
An invocation command.
An input file containing either data to enter into the Control-M/EM database or arguments for
selecting specific data from the database.
An output file containing data specified in the arguments file, if it was used.
Optional switches for controlling how the utility runs.
For example, the defjob utility has three parts; the invocation command, a file of job processing
definitions that are imported into the Control-M/EM database, and an optional switch. You prepare the file
containing the job processing definitions.
The exportdefjob utility uses an invocation command, a file containing arguments for specifying the job
processing definitions that are exported from the Control-M/EM database, an optional switch, and an
output file containing the exported job processing definitions. You prepare the arguments file. The output
file is created by the exportdefjob utility.
Each utility contains a table of elements (job, calendar, and folder parameters) and attributes (sub
parameters). If the valid value is a string, see the description of the appropriate parameter in Control-M
Parameters for information about valid values and their formats. If working in an I18N environment, a
header must be placed at the top of the arguments file, as described in XML file for I18N environment (on
page 37).
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
35
Control-M Utilities Guide
Operator Description
NEQ Not equal. Select cases that include any value different from the one specified.
LIKE Similar. Select cases that have an attribute common to the one specified.
You must use a wildcard, such as * in the value that you specify. For example,
JOBNAME LIKE="JOB1*"
selects all jobs with a job name that begins with JOB1. JOB13 would be
selected, but not JOB25.
36
Control-M Utilities Guide
37
Control-M Utilities Guide
Each utility input file has its own .dtd file. The arguments files share the same .dtd file. Utility .dtd files
are stored in the Control-M EM <9.0.00>\Default\data\Resource directory (on Windows).
38
Control-M Utilities Guide
Wildcards
Multiple jobs can be selected and copied using the * (asterisk) wildcard character to represent multiple
values. The asterisk is used to represent zero or more alphanumeric characters. An asterisk can also be
used to replace characters in the middle of an expression.
NOTE: Only one asterisk can be used in an expression.
EXAMPLE 1:
The job name of a specific job definition is AAABBB. If you include the any of the following
arguments in an updatedef utility argument file, you select job AAABBB:
<JOB_NAME FROM="AAABBB"/>
<JOB_NAME FROM="*BBB"/>
<JOB_NAME FROM="AAA*"/>
39
Control-M Utilities Guide
EXAMPLE 2:
There are three job processing definitions. Their Job Names are:
AAABBB, AAACCC, and BBBCCC
The following argument selects jobs AAACCC and BBBCCC, and selects any other jobs with a
Job Name that ends with the letters CCC.
<JOB_NAME FROM="*CCC"/>
The asterisk has a special function when used in find and replace operations in selected utilities. The
following utilities use find and replace operations:
copydefcal
copydefjob
duplicatedefjob
updatedef
In the FROM (find) statement of an argument, an asterisk replaces a text string (as shown in the example
above). The asterisk in the TO statement of the argument represents the same string as the asterisk in
the FROM statement of the argument. The placement of the asterisk can be changed.
EXAMPLE 1:
There are three job processing definitions:
AAABBB, AAACCC, BBBCCC
Modify the job names of some of these jobs using the following argument:
<JOB_NAME FROM="*CCC" TO="*DDD"/>
• Job AAACCC becomes Job AAADDD
• Job BBBCCC becomes Job BBBDDD
• Job AAABBB is not modified.
EXAMPLE 2:
There are three job processing definitions:
AAABBB, DDDCCC, BBBCCC
<JOB_NAME FROM="*CCC" TO="DDD*"/>
• Job DDDCCC becomes Job DDDDDD
• Job BBBCCC becomes Job DDDBBB
• Job AAABBB is not modified.
40
3
3
Definition, ordering, and monitoring utilities
The definition, ordering, and monitoring utilities are used to create and define job processing definitions:
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
The following table describes the utilities for various utilities for job processing definitions.
Control-M/EM utilities
emdef utility for jobs (on page Enables you to make various modifications to job
42) definitions, rules and site standards in the Control-M/EM
database.
To use the emdef utility for folders and calendars, see
emdef utility for folders and calendars (on page 266).
NOTE: To order and force jobs using the cli utility, see
cli utility (on page 302).
emdef utility for services (on page Enables you to make various modifications to BIM
174) service definitions in the Control-M/EM database.
emwacli for promotion (on page Enables you to run Promotion as a batch process.
182)
41
Control-M Utilities Guide
Control-M/Server utilities
ctmcreate (on page 189) Creates a job, which is added directly into the Active
Jobs database.
ctmdefine (on page 202) Adds a job processing definition to a folder, a SMART
folder, and a subfolder in the Control-M/Server
database.
ctmexdef (on page 215) Exports jobs from the Control-M/Server database to an
ASCII file for use with ctmcreate or ctmdefine.
ctmfw File Watcher utility (on Detects completion of file transfer activity.
page 217)
ctmimptb (on page 228) Imports SMART Folders that were exported with the
exportdeffolder utility.
ctmkilljob (on page 231) Terminates a Control-M job and its associated
processes.
ctmorder (on page 232) Orders jobs from a SMART Folder in the
Control-M/Server database.
ctmsweep (on page 258) Deletes non-active jobs from the Control-M/Server
database.
ctmwhy (on page 262) Reports why a job waiting in the Active Jobs database is
not submitted.
Control-M/Agent utilities
_exit (on page 264) Sets the completion status for a job that runs from a
.bat file.
_sleep (on page 264) Sets the sleep time for Control-M/Server processes.
42
Control-M Utilities Guide
NOTE: For information about using the emdef utility for folders and calendars, see emdef utility for folders
and calendars (on page 266).
The emdef utility includes the following utilities:
defjob (on page 46) Imports job processing definitions directly into Control-M/EM
database.
copydefjob (on page 66) Copies jobs from one folder to another in the Control-M/EM
database that is similar to a specified existing definition.
deldefjob (on page 85) Deletes specified job processing definitions from a SMART
Folder in the Control-M/EM database.
duplicatedefjob (on page 89) Copies an existing job definition in the same data center and
SMART Folder.
exportdefjob (on page 112) Exports job processing definitions from a folder in the
Control-M/EM database to an output file.
loopdetecttool (on page 117) Checks job processing definitions to determine if conditions
are defined in a way that would cause loops.
updatedef (on page 124) Updates specified parameter values in the following
definitions in the Control-M/EM database:
Job processing definitions
Folder definitions
SMART Folder definitions
Sub Folder definitions
43
Control-M Utilities Guide
Parameter Description
<password file Includes an unencrypted user name and password on separate lines in
name> a flat file in the following format:
user=<userName>
password=<password>
<GUI Server Defines the Control-M/EM GUI server logical name, host name, or IP
Name> address.
NOTE: If multiple GUI servers exist, set this parameter to the logical
name of the relevant GUI server.
<XML file Defines the path and name of the XML file containing the defjob
name> specifications. For instructions about creating this file, see XML file rules
(on page 35).
<out file name> Defines the path and name of the file containing the exported job
specifications.
44
Control-M Utilities Guide
emdef switches
The following table describes switches for the emdef utilities:
/a The /a switch directs the utility to automatically reset the Created By The following utilities are
parameter to the current Control-M/EM user when these two values do not supported:
match. If not specified, the utility skips (that is, does not process) job
definitions whose Author does not match the currently logged in user.
defjob
NOTE: The /a switch has no effect on Administrator users and is relevant copydefjob
only when the AuthorSecurity system parameter is set to 2 or 3. duplicatedefjob
exportdefjob
updatedef
defservice
exportdefservice
defcal
deffolder
exportdefcal
exportdeffolder
/c Operates on a chunk of jobs at any one time to reduce the process' defjob
memory
45
Control-M Utilities Guide
/t Operate on a single folder at a time, to reduce process memory. The following utilities are
supported:
defjob
exportdefjob
deffolder
exportdeffolder
/f Forces folder definition with a site standard that does not exist, which sets deffolder
the site standard to none.
defjob
The defjob utility imports job processing definitions directly into Control-M/EM database. To import the
job using the defjob utility, see Importing jobs into existing folders using the defjob utility (on page 47).
defjob reads job processing definitions from a plain text input file written in XML format, see defjob XML
file rules (on page 47).
Each job processing definition in the Control-M/EM database has a JOBISN field that contains a job ID
number. JOBISN is the JOB_ID field in the def_job folder. Many jobs can have the same JOBISN number.
However, the JOBISN number is unique in each Folder. Use Control-M Control-M Monitoring Domain to
determine the job ID. Select the job in the Monitoring domain to see jobs IDs.
If a job that is being imported contains a JOBISN number that already exists in the Control-M/EM
database, defjob overwrites the existing job processing definition with the new job processing definition.
If a JOBISN value is not specified, defjob imports the job processing definition into the database as a new
job.
46
Control-M Utilities Guide
47
Control-M Utilities Guide
48
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
DEFJOB Indicates the XML root element. Job processing definitions are placed between the
opening and closing DEFJOB tags. One or more jobs can be specified. Each
individual job is enclosed by JOB /JOB tags.
JOB Indicates the opening and closing tags of a single job definition. Parameters of the
job are listed between the tags.
DATACENTER Name of the Control-M installation to which the job belongs. String. Mandatory.
PARENT_FOLDER Name of the parent folder to which the job’s folder belongs. String. Mandatory.
FOLDER_NAME Name of the SMART Folder to which the job belongs. String. Mandatory.
FOLDER_DSN (z/OS only) Name of the library that contains the SMART Folder. String. Mandatory.
FILE_NAME Name of the file that contains the job script. String. Optional.
SUB_APPLICATION Indicates the name of the Sub Application where the job belongs logically. It is a
sub-category of the Application parameter. For example, the Application is Finances,
and the Sub Application is Payroll. String. Mandatory.
APPLICATION Provides a logical name for sorting groups of jobs. This parameter is used to supply
a common descriptive name to a set of related job groups. The jobs do not
necessarily have to run at the same time. String. Mandatory.
49
Control-M Utilities Guide
Parameter Description
FILE_PATH Name of the library/directory in which the job script resides. String. Optional.
CMDLINE Command string supplied when the job Task Type is Command. String. Optional.
HOSTID Host name of an agent computer or name of a host group to which the job is
submitted. String. Optional.
RUN_AS Identifies the user name with the authorization to execute the job. This parameter
is used by the Control-M security mechanism. String. Mandatory.
MAXRERUN Specifies the maximum number of reruns that can be performed for the job.
Optional.
Valid values: 0-99. Default: 0
TIMEFROM Indicates the earliest time for submitting the job. Format is (hhmm). Optional.
TIMETO Indicates the latest time for submitting the job. Format is (hhmm) or (>). Optional.
50
Control-M Utilities Guide
Parameter Description
CYCLIC Indicates whether the job is cyclic (to be run at regular intervals). Optional.
Valid values:
0 (No. Default)
1 (Yes)
CYCLIC_TOLERANCE Maximum delay in minutes permitted for a late submission when selecting a specific
time (for example 5 minutes).
NOTE: Relevant for Control-M version 6.4.01 or later.
INSTREAM_JCL Defines a script exactly as it would be specified in a terminal for the specific
computer and is part of the job definition.
(embedded script)
For Control-M for Distributed System for 6.4.01 or later an embedded script is
marked with a 
 indicator.
For Control-M for z/OS version 6.2.00 or later, the XML file is formatted with
multi\-ple lines which contain four digit numbers which state the length of the line,
fol\-lowed by the line’s text.
51
Control-M Utilities Guide
Parameter Description
CONFIRM Indicates whether the job must be manually confirmed by the Control-M/EM user
before it runs. Optional. Valid values:
0 (Default)
1
INTERVAL Specifies the length of time (in minutes) to wait between reruns of a job or between
cyclic runs of a job. Integer. Optional.
Default: 0.
MAXWAIT Number of extra days (beyond the original scheduling date) that the job is allowed
to remain in the Active Jobs database awaiting execution. Integer. Optional.
DOCLIB Name of a library or directory containing the job documentation file. String.
Optional.
DAYS Days of the month on which to order the job. String. Optional.
DAYS_AND_OR Indicates the relationship between specified Days values and Weekdays values.
Optional.
Valid values:
AND
OR
WEEKDAYS Days of the week on which to order the job. String. Optional.
52
Control-M Utilities Guide
Parameter Description
DATE Specific dates on which to order the job. String. mmdd format. Optional.
For example, January 10 is written as: DATE="0110"
DAYSCAL Name of a user-defined calendar used to specify a set of days. String. Optional.
WEEKSCAL Name of a calendar to be used to validate specified weekdays on which to order the
job. String. Optional.
CONFCAL Specifies a calendar that is used to validate all specified days and dates on which to
schedule the job. String. Optional.
RETRO Indicates whether the job is scheduled for possible execution after its original
scheduling date (odate) has passed. Optional.
Valid values:
0 (No. Default)
1 (Yes)
SHIFT Describes how to shift the scheduling date of the job. Optional.
Valid values:
IGNOREJOB
PREVDAY
NEXTDAY
NOCONFCAL
SHIFTNUM Number of days to shift the scheduling date of the job. Optional. Valid values: -62
to 62.
MAXDAYS Maximum number of days to retain the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. Optional. Valid values: 00 – 98, or 99
to indicate that SYSDATA is retained for an unlimited number of days.
MAXRUNS Maximum number of job runs to retain the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. Optional. Valid values: 000 – 998, or
999 to retain SYSDATA data for all runs.
RERUNMEM Name of the JCL member to use when the job is automatically rerun. String. 1 - 8
characters. Optional.
RETEN_DAYS (z/OS only) Number of days to retain the job in the History Jobs file. String.
Optional.
RETEN_GEN (z/OS only) Maximum number of generations of a job to keep in the History Jobs
file String. Optional.
53
Control-M Utilities Guide
Parameter Description
PREV_DAY Flag to indicate whether job scheduling is shifted to a previous working day in the
CONFCAL calendar. Optional.
Valid values:
Y
N
IND_CYCLIC Indicates whether the interval between further runs of a cyclic job is counted from
the start or the end of the previous job run. Optional.
Valid values:
START
END
TARGET
RULE_BASED_CALEND Relationship (AND|OR) between the specified Rule-Based Calendars and the job’s
AR_RELATIONSHIP own basic scheduling criteria. Optional.
Valid values:
AND
OR
TAG_RELATIONSHIP Relationship (AND|OR) between the specified Schedule Tag criteria and the job’s
own basic scheduling criteria. This parameter is relevant only for jobs in a SMART
Folder. Optional. This parameter is for backward compatibility.
Valid values:
AND
OR
SYSDB Determines whether one or multiple data sets are used to catalogue sysdata.
Optional. Valid values:
0 (Multiple-Default)
1 (Single)
PDSNAME Name of a partitioned dataset (PDS) to be checked for free space. String. Optional.
MINIMUM Minimum number of free partitioned dataset tracks required by the library specified
for the PDSNAME parameter. Integer. Optional.
CATEGORY Name of a Control-D report decollating mission category that must be scheduled
under Control-D when the job is scheduled under Control-M. String. Optional.
54
Control-M Utilities Guide
Parameter Description
PREVENTNCT2 (z/OS only) Prevents dataset cleanup before the original job run Optional.
Valid values:
Blank – Does not perform data set cleanup before the original job run. Default.
N – Does not prevent cleanup.
Y - Prevents data set cleanup. This value is not valid for started tasks.
L (List) – Do not perform data set cleanup before the original job run. Do
generate messages that would be required for CDG adjustment
during restart.
F (Flush) – Halt processing of the job if any data set cleanup error is detected
(even if z/OS would not have stopped processing the job).
JAN, FEB, MAR, APR, Months when the job can run.
MAY, JUN, JUL, AUG, Valid values:
SEP, OCT, NOV, DEC
0 (Not run. Default)
1 (Run)
PAR Certain OPTION values (such as Release, NewDest) require additional information.
String. Optional.
FROM Limits the OUTPUT handling operation to only OUTPUTs from the specified class.
String. Optional.
ADJUST_COND Indicates whether to ignore prerequisite conditions normally set by predecessor jobs
if the relevant predecessor jobs are not scheduled. This parameter is relevant only
for jobs in a SMART Folder. Optional.
Valid values:
0 (Do not ignore. Default.)
1 (Ignore relevant prerequisite conditions)
55
Control-M Utilities Guide
Parameter Description
CREATION_USER Name of the user who created the job. String. Optional.
CHANGE_USERID Name of the user who last modified the job. String. Optional.
CHANGE_DATE Date on which the job was last modified. String. Optional.
CHANGE_TIME Time at which the job was last modified. String. Optional.
JOB_RELEASE For internal use. Do not include this parameter in your defjob input file.
JOB_VERSION For internal use. Do not include this parameter in your deffolder input file.
APPL_TYPE Indicates the type of external application (for example, SAP or Oracle Applications)
on which the external application job runs. String. Up to 10 characters. Mandatory
for external application jobs.
APPL_VER Version of the external application (for example, SAP or Oracle) on which the
external application job runs. String. Up to 10 characters. Mandatory for external
application jobs.
APPL_FORM Predefined set of external application parameters that are displayed in the Job
Properties team. String. Up to 30 characters. Mandatory for external application
jobs.
CM_VER Indicates the version of external Application Add-on (for example, SAP or Oracle
Applications) that is installed in the Control-M installation. String. Up to 10
characters. Mandatory for external application jobs.
MULTY_AGENT When selected, broadcasts job submission details to all agents in a specified Host
Group. Optional.
Valid values:
Y – run as multi-agent job
N – not run as multi-agent job. Default.
ACTIVE_FROM (z/OS only) Indicates the start of a period of time during which the job or SMART
Folder can be ordered. Optional.
Date Format: YYYYMMDD
ACTIVE_TILL (z/OS only) Indicates the end of the time interval during which the job or SMART
Folder can be ordered. Optional. Date Format: YYYYMMDD
56
Control-M Utilities Guide
Parameter Description
TIMEZONE Indicates the global time zone used to calculate the interval for time-related
conditions.
String. Optional.
SCHEDULING_ (z/OS only) Indicates the JES2 workload management scheduling environment
ENVIRONMENT associated with the job. String. Optional.
SYSTEM_AFFINITY Identity of the system in which the job must be initiated and executed (in JES2).
Identity of the processor on which the job must execute (in JES3). String. Optional.
REQUEST_NJE_HOST Specifies the host in the JES network on which the job is to execute. String.
Optional.
RULE_BASED_CALEND Wrapper for the Rule-Based Calendars listed with the RULE_BASED_
AR_NAMES CALENDAR_NAME parameter. Optional.
RULE_BASED_CALENDAR_NAMES RULE_BASED_CALENDAR_NAME="rbc1"
RULE_BASED_CALENDAR_NAME="rbc2"
TAG_NAMES Wrapper for the tags listed with the TAG_NAME parameter. Optional.
TAG_NAMES TAG_NAME="tag1" TAG_NAME="tag2"
TAG_NAME Name of the schedule tags that apply to the SMART Folder.
Mandatory. This parameter is for backward compatibility.
57
Control-M Utilities Guide
Parameter Description
58
Control-M Utilities Guide
Parameter Description
STEP_RANGE Step range in the job that can be used in an ON PGMST statement. Optional.
STEP_RANGE NAME="cleanup" FPGMS="Defrag" TPGMS=""
59
Control-M Utilities Guide
Parameter Description
ON Optional.
ON STMT="CODE" CODE="rt5" AND_OR="AND"><ON
CODE Return codes or statuses that can satisfy the step or code
event criteria if returned upon termination of the specified job
steps.
String. Optional. Valid values: 1-255 characters.
60
Control-M Utilities Guide
Parameter Description
61
Control-M Utilities Guide
Parameter Description
DOFORCEJOB Forces a specified job when the current job is performed. Optional.
DOFORCEJOB DSN="45446" FOLDER_NAME="Folder2" NAME="Job4"
ODATE="ODAT"
FOLDER_NAME Name of the SMART Folder to which the job belongs. String,
1-10 characters. Mandatory.
ODATE Original scheduling date for the job. String. Default: ODAT
DOOUTPUT Handle job output (OUTPUT) when the job is done. Optional.
DOOUTPUT OPTION="Release" PAR="F" FROM=""
62
Control-M Utilities Guide
Parameter Description
DOIFRERUN Job steps to be executed during restart of a job. Available only at sites using
Control-M/Restart. Optional.
DOIFRERUN CONFIRM="0" FPGMS="step1" FPROCS="proc1"
TPGMS="step5" TPROCS="proc3"
ATTACH_OUTPUT Specifies at the job level whether the OUTPUT should be sent
as an email attachment.
63
Control-M Utilities Guide
Parameter Description
DOCTBRULE (z/OS only) Invokes a Control-M/Analyzer rule to be executed during the processing
of a specific program step. Optional.
DOCTBRULE NAME="GOVTBAL" PAR="DOREPORT,10,%%ODATE"
DOREMEDY Opens a ticket in the Remedy Help Desk regarding the critical service.
64
Control-M Utilities Guide
65
Control-M Utilities Guide
<DO ACTION="OK"/>
<DOVARIABLE EXP="%%def=123"/>
<DOSHOUT DEST="" MESSAGE=""/>
<DOFORCEJOB DSN="" FOLDER_NAME="Tbl1"
NAME="Job4"/>
<DOCTBRULE NAME="DOCT"/>
<DOOUTPUT OPTION="Release"/>
<DOIFRERUN FPGMS="1" FPROCS="1" TPGMS="1"
TPROCS="1"/>
<DOCOND NAME="COND4"/>
<DOMAIL DEST="COMP667" MESSAGE="Job done."/>
</ON>
</JOB>
</DEFJOB>
copydefjob
The copydefjob utility copies jobs from one folder to another in the Control-M/EM database that is similar
to a specified existing definition. The original job and the copy must be in different data centers or SMART
Folders. To create a new job using run the defjob utility, see Copying jobs to and from folders using the
copydefjob utility (on page 66).
NOTE: Multiple jobs can be selected and copied using the * wildcard character. For an explanation of
how wildcards function in the XML-based utilities, see Wildcards (on page 39).
When copydefjob is invoked, it processes a file of arguments that specifies criteria for selecting one or
more existing job processing definitions. The selected jobs are copied to the existing SMART Folder
and/or data center specified in the arguments file. For more information, see copydefjob XML file rules
(on page 67).
66
Control-M Utilities Guide
67
Control-M Utilities Guide
If you specify any parameters, the FROM subparameter is mandatory and the TO subparameter is
optional.
If a FROM value is specified without a TO value, it is used as a filter criterion.
If a TO value is specified, it indicates the new value of the parameter.
For more information on the arguments file parameters for the copydefjob utility, see copydefjob XML file
parameters (on page 68), and copydefjob XML file examples (on page 83).
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
COPYJOB These tags indicate the start and end of the COPYJOB argument. Only criteria that
are located between the tags are considered to be part of the argument.
FROM Name of the SMART Folder specified in the job processing definition that is
being copied. String. Mandatory.
TO The folder name in the job processing definition copy. String. Optional.
FOLDER_DSN (z/OS® only) Name of the library that contains the SMART Folder. Mandatory.
NOTE: At least one of the following SMART Folder parameters must be included in
the arguments file: DATACENTER, FOLDER_NAME, FOLDER_DSN
EXAMPLE: FOLDER_DSN FROM="Lib1" TO="Lib1_COPY"
FROM Name of the library containing the SMART Folder in the job processing
definition that is being copied. String. Mandatory.
TO Name of the library in the job processing definition copy. String. Optional.
68
Control-M Utilities Guide
Parameter Description
FROM Name of the Control-M installation to which the job being copied belongs.
Mandatory.
69
Control-M Utilities Guide
Parameter Description
SUB_APPLICATION Name of the group to which the job belongs. Used as a descriptive name for related
groups of jobs.
EXAMPLE: SUB_APPLICATION FROM="Grp_HR"
APPLICATION Name of the application to which the job’s group belongs. Used as a descriptive
name for related groups of jobs.
EXAMPLE: APPLICATION FROM="App3""
70
Control-M Utilities Guide
Parameter Description
FOLDER Optional.
_ORDER_ METHOD
EXAMPLE: FOLDER_ORDER_ METHOD FROM="Job3"
FILE_PATH Name of the library/directory in which the job script resides. String. Optional.
EXAMPLE: FILE_PATH FROM="Mem1"
CMDLINE Command string supplied when the job Task Type is Command. Optional.
EXAMPLE: CMDLINE FROM="C:\Format"
HOSTID Host name of an agent computer or name of a host group to which the job is
submitted. Optional.
EXAMPLE: HOSTID FROM="Com3"
RUN_AS Run_As name associated with the job. This parameter is used by the
Control-M/Server security mechanism. Optional.
EXAMPLE: RUN_AS FROM="emuser"
MAXRERUN Specifies the maximum number of reruns that can be performed for the job.
EXAMPLE: MAXRERUN FROM="1"
Valid values: 0-99. Default: 0
71
Control-M Utilities Guide
Parameter Description
72
Control-M Utilities Guide
Parameter Description
CYCLIC Indicates if the job is cyclic (to be rerun at regular intervals). Optional.
EXAMPLE: CYCLIC FROM="0"
CYCLIC_ Maximum delay in minutes permitted for a late submission when selecting a specific
TOLERANCE time (for example 5 minutes).
CYCLIC_TIMES_ A list of times, separated by commas (for example 0800,1330,2300), which supports
SEQUENCE time synonym (for example 2730).
CONFIRM Indicates that the job must be manually confirmed by the Control-M/EM user before
it runs.
EXAMPLE: CONFIRM FROM="0"
73
Control-M Utilities Guide
Parameter Description
INTERVAL Specifies the length of time (in minutes) to wait between reruns of a job or between
cyclic runs of a job. Integer. Optional.
EXAMPLE: INTERVAL FROM="3"
MAXWAIT Number of extra days (beyond the original scheduling date) that the job is allowed to
remain in the Active Jobs database awaiting execution. Integer.
EXAMPLE: MAXWAIT FROM="4"
DOCLIB Name of a library or directory containing the job documentation file. String.
Mandatory.
EXAMPLE: DOCLIB FROM="AcctFiles"
DAYS Days of the month on which to order the job. String. Optional.
EXAMPLE: DAYS FROM="ALL"
74
Control-M Utilities Guide
Parameter Description
DAYS_AND_OR Indicates the relationship between specified Days values and Weekdays values.
Optional.
EXAMPLE: DAYS_AND_OR FROM="AND"
WEEKDAYS Days of the week on which to order the job. String. Optional.
EXAMPLE: WEEKDAYS FROM="1,2,4"
DATE Specific dates on which to order the job. String. MMDD format. Optional.
EXAMPLE: DATE FROM="0312"
DAYSCAL Name of a user-defined calendar used to specify a set of days. String. Optional.
EXAMPLE: DAYSCAL FROM="shipping"
WEEKSCAL Name of a calendar to be used to validate specified weekdays on which to order the
job. String. Optional.
EXAMPLE: WEEKSCAL FROM="2"
CONFCAL Specifies a calendar that is used to validate all specified days and dates on which to
schedule the job. String.
EXAMPLE: CONFCAL FROM="cal99" TO="cal00"
RETRO Indicates whether the job is scheduled for possible execution after its original
scheduling date (odate) has passed.
EXAMPLE: RETRO FROM="0"
75
Control-M Utilities Guide
Parameter Description
MAXDAYS Maximum number of days to retains the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. String. Optional.
EXAMPLE: MAXDAYS FROM="07"
MAXRUNS Maximum number of job runs to retains the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. String. Optional.
EXAMPLE: MAXRUNS FROM="100"
RERUNMEM Name of the JCL member to use when the job is automatically rerun. String. 1-8
characters. Optional.
EXAMPLE: RERUNMEM FROM="Mem45"
RETEN_DAYS (z/OS only) Number of days to retain the job in the History Jobs file. String. Optional.
EXAMPLE: RETEN_DAYS FROM="5"
76
Control-M Utilities Guide
Parameter Description
RETEN_GEN (z/OS only) Maximum number of generations of the job to keep in the History Jobs
file. String.
EXAMPLE: RETEN_GEN FROM="3"
PREV_DAY Flag to indicate whether job scheduling is shifted to a previous working day in the
CONFCAL calendar. Optional.
EXAMPLE: PREV_DAY FROM="N"
IND_CYCLIC Indicates whether the interval between further runs of a cyclic job is counted from
the start or the end of the previous job run. Optional.
EXAMPLE: IND_CYCLIC FROM="START"
RULE_BASED_ Relationship (AND|OR) between the specified Rule-Based Calendar and the job’s own
CALENDAR_RELATIO basic scheduling criteria. Optional.
NSHIP
EXAMPLE: RULE_BASED_CALENDAR_RELATIONSHIP FROM="AND"
77
Control-M Utilities Guide
Parameter Description
TAG Relationship (AND|OR) between the specified Schedule Tag criteria and the job’s own
_RELATIONSHIP basic scheduling criteria. This parameter is relevant only for jobs in a SMART Folder.
Optional. This parameter is for backward compatibility.
EXAMPLE: TAG_RELATIONSHIP FROM="AND"
SYSDB Determines whether one or multiple data sets are used to catalogue sysdata.
EXAMPLE: SYSDB FROM="1" TO="0"
PDSNAME Name of a partitioned dataset (PDS) to be checked for free space. String. Optional.
EXAMPLE: PDSNAME FROM="Lib_3"
MINIMUM Minimum number of free partitioned dataset tracks required by the library specified
for the PDSNAME parameter. Integer. Optional.
EXAMPLE: MINIMUM FROM="5"
CATEGORY Name of a Control-D report decollating mission category that must be scheduled
under Control-D when the job is scheduled under Control-M. String. Optional.
EXAMPLE: CATEGORY FROM="DAILY"
78
Control-M Utilities Guide
Parameter Description
PREVENTNCT2 (z/OS only) Prevents dataset cleanup before the original job run. Optional.
Valid values:
Blank – Does not perform data set cleanup before the original job run. Default.
N – Does not prevent cleanup.
Y - Prevents data set cleanup. This value is not valid for started tasks.
L (List) – Do not perform data set cleanup before the original job run. Do
generate messages that would be required for CDG adjustment during restart.
F (Flush) – Halt processing of the job if any data set cleanup error is detected
(even if z/OS would not have stopped processing the job).
EXAMPLE: PREVENTNCT2 FROM="1"
JAN, FEB, MAR, APR, Months when the job can run. Optional.
MAY, JUN, JUL, AUG,
EXAMPLE: JAN FROM="0"
SEP,
OCT, NOV, DEC
FROM Mandatory. Not including a month is the same as including a month having
the value 0. Valid values:
0 (Default)
1
79
Control-M Utilities Guide
Parameter Description
PAR Certain OPTION FROM values (such as Release, NewDest) require additional
information. The PAR parameter holds this information as a string.
EXAMPLE: PAR FROM="mem3.log"
FROM Limits the OUTPUT handling operation to OUTPUTs from the specified class.
Optional.
EXAMPLE: FROM FROM="5"
ADJUST_COND Indicates whether to ignore prerequisite conditions normally set by predecessor jobs
if the relevant predecessor jobs are not scheduled. This parameter is relevant only
for jobs in a SMART Folder. Optional. Valid values:
0 (Do not ignore. Default.)
1 (Ignore relevant prerequisite conditions)
APPL_TYPE Indicates the type of external application (for example, SAP or Oracle) on which the
external application job runs. Mandatory for external application jobs.
EXAMPLE: APPL_TYPE FROM="SAP"
APPL_VER Version of the external application (for example, SAP or Oracle) on which the
external application job runs. Mandatory for external application jobs.
EXAMPLE: APPL_VER FROM="4.6"
APPL_FORM Predefined set of external application parameters that are displayed in the Job
Properties team. Mandatory for external application jobs.
EXAMPLE: APPL_FORM FROM="Default SAP 4.6"
CM_VER Indicates the version of external Application Add-on (for example, SAP or Oracle)
that is installed in the Control-M installation. Mandatory for external application jobs.
EXAMPLE: CM_VER FROM="6.1.00"
80
Control-M Utilities Guide
Parameter Description
MULTY_AGENT When selected, broadcasts job submission details to all agents in a specified Host
Group. Optional.
EXAMPLE: MULTY_AGENT FROM="N"
ACTIVE_FROM (z/OS only) Indicates the start of a period of time during which the job or SMART
Folder can be ordered. Optional.
EXAMPLE: ACTIVE_FROM FROM="20070315"
ACTIVE_TILL (z/OS only) Indicates the end of a period of time during which the job or SMART
Folder can be ordered. Optional.
EXAMPLE: ACTIVE_TILL FROM="20070315"
TIMEZONE Indicates global time zone used to calculate the interval for time-related conditions.
Optional.
EXAMPLE: TIMEZONE FROM="EST"
SYSTEM_AFFINITY Identity of the system in which the job must be initiated and executed (in JES2).
Identity of the processor on which the job must execute (in JES3). Optional. String.
REQUEST_NJE Specifies the host in the JES network on which the job is to execute.
_HOST
FROM String. Mandatory.
EXAMPLE: REQUEST_NJE_HOST FROM="OS5"
81
Control-M Utilities Guide
Parameter Description
SCHEDULING (z/OS only) Indicates the JES2 workload management scheduling environment that is
_ENVIRONMENT to be associated with the job.
CHANGE Name of the user that last modified the job. String.
_USERID
EXAMPLE: CHANGE_USERID FROM="emuser"
82
Control-M Utilities Guide
Copy all jobs in one folder to another folder XML file example
In the copydefjob XML file, copy all jobs in the F15NYC folder to the F17LA folder.
<COPYJOB>
<FOLDER_NAME FROM="F15NYC" TO="F17LA"/>
</COPYJOB>
Copy all cyclic jobs with similar job name XML file example
In the copydefjob XML file, copy all cyclic jobs in the GrpAcct Sub Application that have a JobName
beginning with the string Acct from FOLDER_DSN 23Y to FOLDER_DSN 14G.
<COPYJOB>
<FOLDER_DSN FROM="23Y" TO="14G">
<SUBAPPLICATION FROM="GrpAcct"/>
<CYCLIC FROM="1"/>
<JOBNAME="Acct*" />
</COPYJOB>
83
Control-M Utilities Guide
84
Control-M Utilities Guide
deldefjob
The deldefjob utility deletes specified job processing definitions in the Control-M/EM database. To delete
jobs using the deldefjob utility, see Deleting jobs using the deldefjob utility (on page 85).
When deldefjob is invoked, it processes a specified file of arguments in XML format. This file contains
statements that identify existing job processing definitions. The identified definitions are deleted from the
Control-M/EM database. For more information, see deldefjob XML file rules (on page 85).
85
Control-M Utilities Guide
For more information about the deldefjob XML file parameters, see deldefjob XML file parameters (on
page 86), and deldefjob XML file example (on page 87).
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
TERMS These tags indicate the start and end of the TERM tags. Only criteria that are
located between these tags are considered to be part of the argument.
TERM The TERM tags indicate the start and end of a group of selection criteria for a job
or jobs that are to be deleted. Only PARAM tags that are located between the
TERM tags are considered to be part of the TERM argument.
86
Control-M Utilities Guide
Parameter Description
PARAM The selection criteria parameter used to determine job definitions to be deleted.
More than one PARAM can be specified. Mandatory.
PARAM NAME="DATACENTER" OP="EQ" VALUE="Center1"
Delete definitions with the same job name XML file example
In the deldefjob XML file, delete job processing definitions with the name Job5 from the EM5NY data
center.
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ"
VALUE="EM5NY"/>
87
Control-M Utilities Guide
Delete definitions that satisfy one or both of two criteria XML file example
In the deldefjob XML file, delete job processing definitions that satisfy either the data center name is
Data1 and the jobname begins with the letter J, or the jobname is Job5 and the job is not cyclic.
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ"
VALUE="Data1"/>
<PARAM NAME="JOBNAME" OP="LIKE" VALUE="J*"/>
</TERM>
<TERM>
<PARAM NAME="JOBNAME" OP="EQ" VALUE="Job5"/>
<PARAM NAME="CYCLIC" OP="EQ" VALUE="0"/>
</TERM>
</TERMS>
88
Control-M Utilities Guide
duplicatedefjob
The duplicatedefjob utility makes a copy of an existing job definition in the same data center and SMART
Folder. Elements of the copy can be changed. To copy jobs using the duplicatedefjob utility, see Copying
existing jobs using the duplicatedefjob utility (on page 89).
NOTE: Multiple jobs can be selected and copied using the * wildcard character. For an explanation of
how wildcards function in XML-based utilities, see Wildcards (on page 39).
When duplicatedefjob is invoked, it processes a specified file of arguments in XML format. This file
contains statements that identify existing job processing definitions. The identified definitions are copied,
changes to the copy (if requested) are made, and the copy is stored in the Control-M/EM database. For
more information, see duplicatedefjob XML file rules (on page 90).
89
Control-M Utilities Guide
90
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being
used, and the location of the .dtd file.
DUPLICATEJOB The DUPLICATEJOB tags indicate the start and end of a group of selection
criteria for a job or jobs that are to be copied. Only criteria that are located
between the DUPLICATEJOB tags are considered to be part of the
duplicatedefjob parameters.
FOLDER_NAME Name of the SMART Folder to which the job belongs. Mandatory.
NOTE: At least one of the following SMART Folder parameters must be
included in the arguments file: DATACENTER, FOLDER_NAME, FOLDER_DSN
FOLDER_NAME FROM="Tbl5NYC"
Folder_DSN (z/OS only). Name of the library that contains the SMART Folder. Mandatory.
NOTE:
A TO subparameter cannot be specified for this parameter.
At least one of the following SMART Folder parameters must be included
in the arguments file: DATACENTER, FOLDER_NAME, FOLDER_DSN
FOLDER_DSN FROM="Lib1"
91
Control-M Utilities Guide
Parameter Description
DATACENTER Name of the Control-M installation to which the job belongs. Mandatory.
NOTE:
A TO parameter cannot be specified for this parameter.
At least one of the following SMART Folder parameters must be included
in the arguments file: DATACENTER, FOLDER_NAME,FOLDER_DSN
DATACENTER FROM="CTMNYC"
FROM Mandatory.
TO Optional.
FILE_NAME Name of the file that contains the job script. Optional.
FILE_NAME FROM="Mem3" TO="Mem7"
FROM Mandatory.
TO Optional.
SUB_APPLICATION Name of the group to which the job belongs. Used as a descriptive name for
related jobs. Optional.
SUB_APPLICATION FROM="Grp_HR" TO="Grp_ACCT"
FROM Mandatory.
TO Optional.
92
Control-M Utilities Guide
Parameter Description
APPLICATION Name of the application to which the job’s group belongs. Used as a
descriptive name for related jobs. Optional.
APPLICATION FROM="App3" TO="App1"
TO String Optional.
93
Control-M Utilities Guide
Parameter Description
FROM Mandatory.
Valid values:
Job
Detached
Command
Dummy
(z/OS only) Valid values:
Started_Task
Cyclic_Job
Cyclic_Task
Emergency_Job
Emergency_Cyclic_Job
Emergency_Task
Emergency_Cyclic_Task
TO String. Optional.
94
Control-M Utilities Guide
Parameter Description
FILE_PATH Name of the library/directory in which the job script resides. String. Optional.
FILE_PATH FROM="File1" TO="File4"
TO String. Optional.
CMDLINE Command string supplied when the job Task Type is Command. Optional.
CMDLINE FROM="C:\Format" TO="C\:CD Emnt"
TO String. Optional.
HOSTID Host name of an agent computer or a host group to which the job is
submitted. Optional.
HOSTID FROM="Com3" TO="Acct4"
RUN_AS Owner (user ID) associated with the job. This parameter is used by the
Control-M/Server security mechanism. Optional.
OWNER FROM="emuser" TO="emhr"
TO String. Optional.
MAXRERUN Maximum number of reruns that can be performed for the job. Optional.
MAXRERUN FROM="1" TO="3"
TO String. Optional.
TO String. Optional.
95
Control-M Utilities Guide
Parameter Description
TO String. Optional.
TO String. Optional.
TO String. Optional.
96
Control-M Utilities Guide
Parameter Description
CYCLIC Indicates whether the job is cyclic (to be run at regular intervals). Optional.
CYCLIC FROM="0" TO="1"
CYCLIC_ Maximum delay in minutes permitted for a late submission when selecting a
TOLERANCE specific time (for example 5 minutes).
97
Control-M Utilities Guide
Parameter Description
CONFIRM Indicates whether the job must be manually confirmed by the Control-M/EM
user before it runs. Optional.
CONFIRM FROM="0" TO="1"
INTERVAL Length of time (in minutes) to wait between reruns or cyclic runs of a job.
Integer. Optional.
INTERVAL FROM="3" TO="4"
TO String. Optional.
TO String. Optional.
98
Control-M Utilities Guide
Parameter Description
MAXWAIT Number of extra days (after the original scheduling date) that the job is
allowed to remain in the Active Jobs database awaiting execution. Integer.
Optional.
MAXWAIT FROM="4" TO="3"
TO Integer. Optional.
TO String. Optional.
TO String. Optional.
DOCLIB Name of library or directory containing the job documentation file. String.
Optional.
DOCLIB FROM="AcctFiles" TO="HRFiles"
TO String. Optional.
DAYS Days of the month on which to order the job. String. Optional.
DAYS FROM="ALL" TO="159"
TO String. Optional.
99
Control-M Utilities Guide
Parameter Description
DAYS_AND_OR Relationship between specified Days values and Weekdays values. Optional.
DAYS_AND_OR FROM="AND" TO="OR"
TO String. Optional.
WEEKDAYS Days of the week on which to order the job. String. Optional.
WEEKDAYS FROM="1,2,4" TO="ALL"
TO String. Optional.
DATE Specific dates on which to order the job. String. MMDD format. Optional.
DATE FROM="0312" TO="0319"
TO String. Optional.
WEEKSCAL Calendar to be used to validate specified weekdays on which to order the job.
String. Optional.
WEEKSCAL FROM="w5" TO="w6"
TO String. Optional.
100
Control-M Utilities Guide
Parameter Description
CONFCAL Specifies a calendar that is used to validate all specified days and dates on
which to schedule the job. String. Optional.
CONFCAL FROM="cal99" TO="cal00"
TO String. Optional.
RETRO Indicates whether the job is scheduled for possible execution after its original
scheduling date (odate) has passed. Optional.
RETRO FROM="0" TO="1"
SHIFT Describes how to shift the scheduling date of the job. Optional.
SHIFT FROM="PREVDAY" TO="NEXTDAY"
SHIFTNUM Number of days to shift the scheduling date of the job. Optional.
SHIFTNUM FROM="-10" TO="5"
TO String. Optional.
101
Control-M Utilities Guide
Parameter Description
MAXDAYS Maximum number of days to retain the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. String. Optional.
MAXDAYS FROM="07" TO="14"
TO String. Optional.
MAXRUNS Maximum number of job runs to retain the SYSDATA archive dataset for jobs
that ended NOTOK. Subparameter of AUTOARCH. String. Optional.
MAXRUNS FROM="100" TO="250"
TO String. Optional.
RERUNMEM (z/OS only) JCL member to use when the job is automatically rerun. String. 1
- 8 characters. Optional.
RERUNMEM FROM="Mem45" TO="Mem7"
TO String. Optional.
RETEN_DAYS (z/OS only) Number of days to retain the job in the History Jobs file. String.
Optional.
RETEN_DAYS FROM="5" TO="7"
TO String. Optional.
RETEN_GEN (z/OS only) Maximum number of generations to keep in the History Jobs file.
String. Optional.
RETEN_GEN FROM="3" TO="4"
TO String. Optional.
102
Control-M Utilities Guide
Parameter Description
PREV_DAY Optional.
PREV_DAY FROM="N" TO="Y"
IND_CYCLIC Indicates whether the time interval between runs of a cyclic job is counted
from the start or the end of the previous job run. Optional.
IND_CYCLIC FROM="Y" TO="N"
RULE_BASED_ Relationship (AND|OR) between the specified Rule-Based Calendar and the
CALENDAR_ job’s own basic scheduling criteria. Optional.
RELATIONSHIP RULE_BASED_CALENDAR_RELATIONSHIP FROM="AND" TO="OR"
103
Control-M Utilities Guide
Parameter Description
TAG_ Relationship (AND|OR) between the specified Schedule Tag criteria and the
RELATIONSHIP job’s own basic scheduling criteria. This parameter is relevant only for jobs in
a SMART Folder. Optional. This parameter is for backward compatibility.
TAG_RELATIONSHIP FROM="AND" TO="OR"
SYSDB Determines whether single or multiple data sets are used to catalogue
sysdata. Optional.
SYSDB FROM="1" TO="0"
PDSNAME Name of partitioned dataset (PDS) to be checked for free space. String.
Optional.
PDSNAME FROM="Lib_3" TO="Lib_5"
TO String. Optional.
MINIMUM Minimum number of free partitioned dataset tracks required by the library
specified for the PDSNAME parameter. Integer. Optional.
MINIMUM FROM="5" TO="6"
TO Integer. Optional.
104
Control-M Utilities Guide
Parameter Description
TO String. Optional.
105
Control-M Utilities Guide
Parameter Description
PREVENTNCT2 (z/OS only) Prevents dataset cleanup before the original job run Optional.
Valid values:
Blank – Does not perform data set cleanup before the original job run.
Default.
N – Does not prevent cleanup.
Y - Prevents data set cleanup. This value is not valid for started tasks.
L (List) – Do not perform data set cleanup before the original job run. Do
generate messages that would be required for CDG adjustment during
restart.
F (Flush) – Halt processing of the job if any data set cleanup error is
detected (even if z/OS would not have stopped processing the job).
PREVENTNC2 FROM="1" TO="0"
JAN, FEB, MAR, APR, Months when the job can run. Optional. Not including a month is the same as
MAY, JUN, JUL, AUG, including that month with the value 0.
SEP, JAN FROM="0" TO="1"
OCT, NOV, DEC
JUL FROM="0" TO="1"
106
Control-M Utilities Guide
Parameter Description
PAR Certain OPTION values require that you supply additional information (such
as Release, NewDest). The PAR parameter holds that information as a string.
Optional.
PAR FROM="mem3log" TO="mem5log"
TO String. Optional.
FROM Limits the OUTPUT handling operation to OUTPUTs from the specified class.
Optional.
FROM FROM="1" TO="2"
TO String. Optional.
TO String. Optional.
107
Control-M Utilities Guide
Parameter Description
APPL_TYPE Type of external application (for example, SAP or Oracle) on which the
external application job runs. Mandatory for external application jobs.
APPL_TYPE FROM="SAP" TO="OracleApps"
TO Optional. String.
APPL_VER Version of the external application (for example, SAP or Oracle) on which the
external application job runs. Mandatory for external application jobs.
APPL_VER FROM="4.5" TO="4.6"
TO Optional. String.
APPL_FORM Predefined set of external application parameters that are displayed in the
Job Properties team. Mandatory for external application jobs.
APPL_FORM FROM="Default SAP 4.6" TO="Default SAP 4.5"
TO Optional. String.
CM_VER Version of external Application Add-on (for example, SAP or Oracle) that is
installed in the Control-M installation. Mandatory for external application jobs.
CM_VER FROM="6.1.00" TO="6.1.01"
TO Optional. String.
108
Control-M Utilities Guide
Parameter Description
MULTY_AGENT When selected, broadcasts job submission details to all agents in a specified
Host Group. Optional.
MULTY_AGENT FROM="N" TO="Y"
TO Optional. String.
ACTIVE_FROM (z/OS only) Start of a period of time during which the job or SMART Folder
can be ordered. Optional.
ACTIVE_FROM FROM="20070315" TO="20070601"
TO Optional. String.
ACTIVE_TILL (z/OS only) End of a period of time during which the job or SMART Folder can
be ordered. Optional.
ACTIVE_TILL FROM="20070315" TO="20070601"
TO Optional. String.
TIMEZONE Global time zone used to calculate the interval for time-related conditions.
Optional.
TIMEZONE FROM="EST" TO="GMT"
TO Optional. String.
SYSTEM_AFFINITY Identity of the system in which the job must be initiated and executed (in
JES2). Identity of the processor on which the job must execute (in JES3).
Optional. String.
109
Control-M Utilities Guide
Parameter Description
TO String. Optional.
SYSTEM_AFFINITY FROM="SYS3" TO="SYS6"
TO String. Optional.
REQUEST_NJE_HOST FROM="OS5" TO="OS6"
TO String. Optional.
SCHEDULING_ENVIRONMENT FROM="SCHD2"
TO="SCHD3"
CREATION_USER Name of the user that created the job. String. Optional.
CREATION_USER FROM="emuser" TO="em1"
TO String. Optional.
TO String. Optional.
TO String. Optional.
110
Control-M Utilities Guide
Parameter Description
CHANGE_USERID Name of the user that last modified the job. String. Optional.
CHANGE_USERID FROM="emuser" TO="emacct"
TO String. Optional.
CHANGE_DATE Date that the job was last modified. String. Optional.
CHANGE_DATE FROM="1204" TO="1304"
TO String. Optional.
CHANGE_TIME Time that the job was last modified. String. Optional.
CHANGE_TIME FROM="1650" TO="1700"
TO String. Optional.
111
Control-M Utilities Guide
exportdefjob
The exportdefjob utility exports job processing definitions from a folder in the Control-M/EM database to
an output file. To export jobs using the utility, see Exporting a job from a folder using the exportdefjob
utility (on page 113).
When exportdefjob is invoked, it processes a specified file of arguments in XML format. This file contains
statements that identify existing job processing definitions. The identified definitions are exported from
the Control-M/EM database to an output file. You can modify the exported job processing definitions in
the output file and can import the modified definitions into the Control-M/EM database using either the
defjob or updatedef utility. For more information, see exportdefjob arguments file rules (on page 113).
112
Control-M Utilities Guide
113
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
TERMS These tags indicate the start and end of the TERMS file. Only criteria that are
located between the tags are considered to be part of the argument.
TERM The TERM tags indicate the start and the end of a group of selection criteria
used to specify a job or jobs that are to be exported. Only PARAM tags that are
located between the TERM tags are considered to be part of the TERM
argument.
114
Control-M Utilities Guide
Parameter Description
PARAM Selection criteria parameter used to determine the job definitions that are to be
exported. More than one PARAM can be specified. Mandatory.
PARAM NAME="DATACENTER" OP="E" VALUE="Center1"
CYCLIC_TOLERANCE Maximum delay in minutes permitted for a late submission when selecting a
specific time (for example 5 minutes).
115
Control-M Utilities Guide
Export job definitions based on one or more criteria XML file example
In the exportdefjob XML file, export job processing definitions that either have data center name Data1
and a jobname that begins with the letter J, or have jobname Job5 and are not cyclic jobs.
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ"
VALUE="Data1"/>
<PARAM NAME="JOBNAME" OP="LIKE" VALUE="J*"/>
</TERM>
<TERM>
<PARAM NAME="JOBNAME" OP="EQ" VALUE="Job5"/>
<PARAM NAME="CYCLIC" OP="EQ" VALUE="0"/>
</TERM>
</TERMS>
116
Control-M Utilities Guide
loopdetecttool
The loopdetecttool utility checks job processing definitions to determine if conditions are defined in a way
that would cause loops. A loop in this context means:
A chain of jobs that will never run because the IN condition needed to start the first job in the chain
will be created only by the last job in the chain.
Any combination of jobs, groups, and conditions between them, because it is not clear which job in
the group will run first or last, creating or deleting the relevant conditions.
To check for loops in a number of jobs, see Detecting loops in jobs using the loopdetecttool utility (on
page 117).
The loopdetecttool parameter of the emdef utility reads an argument file (in XML format) that contains
criteria that determine which job processing definitions and SMART Folder the utility should analyze. For
more information, see loopdetecttool arguments file rules (on page 118). The utility checks for definitions
whose conditions could potentially cause a loop. After the utility runs, it summarizes the problematic jobs
and conditions in an XML format file.
117
Control-M Utilities Guide
loopdetecttool parameters
The following table describes the loopdetecttool parameters:
Parameter Description
<password file> Flat file that contains an unencrypted user name and password on
separate lines in the following format:
user=<userName>
password=<password>
<input args file Path and name of the arguments file that contains criteria for job and
name> SMART Folder specifications. The format for this file is described in
loopdetecttool arguments file rules (on page 118).
For information about this file, see the Arguments file rules section
below and XML file rules (on page 35).
<output result Path and name of the output file that contains the summary of
file name> problematic jobs and conditions (loops).
118
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file. These lines must appear exactly as follows:
?xml version=’1.0’ encoding=’UTF-8’?
!DOCTYPE TERMS SYSTEM "terms.dtd"
TERMS These tags indicate the start and end of the TERMS file. Only criteria that are located between
the tags are considered part of the argument.
TERM The TERM tags indicate the start and the end of a group of selection criteria used to specify a
job or jobs that are to be analyzed. Only PARAM tags that are located between the TERM tags
are considered part of the TERM argument.
REL The relationship between the terms (optional). Valid values are:
AND
OR
119
Control-M Utilities Guide
Parameter Description
PARAM Selection criteria parameter used to determine the job definitions that are to be analyzed. You
can specify more than one PARAM. This parameter is required.
PARAM NAME="DATACENTER" OP="EQ" VALUE="Center1"
NAME The parameter name of any job processing definition parameter. This parameter
is required.
NOTE: At least one of the following SMART Folder parameters must be included
in the arguments file: DATACENTER, FOLDER_NAME, FOLDER_DSN
OP The relationship between the NAME and VALUE parameters of the TERM. This
relationship is required. Valid values are:
EQ – equal
NEQ – not equal
NOTIN – does not contain
LIKE – mask or pattern
VALUE The value of the parameter specified in the NAME field. This value is required.
120
Control-M Utilities Guide
loopdetecttool output
The following table lists the summary of the problematic jobs and conditions in an XML format file after
the utility runs.
Parameter Description
The beginning of the arguments file specifies the location of the .dtd file as follows:
!DOCTYPE "ctmem:loop_cond_detect" SYSTEM "path\filename.dtd"
ctmem:message Between these tags, relevant messages are listed, such as the number of loops
detected, how many jobs were found in each loop, and other remarks.
ctmem:loops Between these tags, details about all found loops are listed.
ctmem:loop Between these tags, details about each found loop is listed. Each ctmem:loop tag
contains pairs of the following tags: ctmem:job and ctmem:condition.
ctmem:job Between these tags, information about the job that is part of a potential loop is
displayed. This information includes the job’s data center, SMART Folder, group,
application, and job name. Pairs of jobs and conditions are grouped by In and Out
conditions.
ctmem:condition Between these tags, information about the conditions that were found to cause a
potential loop is displayed. This information includes the condition’s name, date, and
type. Pairs of jobs and conditions are grouped by In and Out conditions.
loopdetecttool output
<!DOCTYPE ctmem:loop_cond_detect SYSTEM "C:\Program Files\Altova\XML Spy
Suite\Examples\LoopDetectOut.dtd">
<ctmem:loop_cond_detect>
<ctmem:message>1 Loop was detected.</ctmem:message>
<ctmem:loops>
<ctmem:message>2 Jobs were found in the loop</ctmem:message>
121
Control-M Utilities Guide
<ctmem:loop>
<ctmem:job>
<ctmem:control_m>PROD_DC1</ctmem:control_m>
<ctmem:order_folder>Daily_Prod1</ctmem:order_folder>
<ctmem:application>WinDcProd1</ctmem:application>
<ctmem:group>BackupDaily</ctmem:group>
<ctmem:job_name>Job1</ctmem:job_name>
</ctmem:job>
<ctmem:condition>
<ctmem:cond_name>Job1-Ended-OK</ctmem:cond_name>
<ctmem:cond_date>ODAT</ctmem:cond_date>
<ctmem:message>regular condition</ctmem:message>
</ctmem:condition>
<ctmem:job>
<ctmem:control_m>PROD_DC1</ctmem:control_m>
<ctmem:order_folder>Daily_Prod1</ctmem:order_folder>
<ctmem:application>WinDcProd1</ctmem:application>
<ctmem:group>BackupDaily</ctmem:group>
<ctmem:job_name>Job2</ctmem:job_name>
</ctmem:job>
<ctmem:condition>
<ctmem:cond_name>Job2-Ended-OK</ctmem:cond_name>
<ctmem:cond_date>ODAT</ctmem:cond_date>
<ctmem:message>regular condition</ctmem:message>
</ctmem:condition>
</ctmem:loop>
</ctmem:loops>
</ctmem:loop_cond_detect>
122
Control-M Utilities Guide
Analyze job definitions for loops based on one or more criteria XML file
example
In the loopdetecttool XML file, analyzes job processing definitions that either the data center name is
Data1, and a job name begins with the letter J or the job name is Job5, and the job is not cyclic.
<?xml version=’1.0’ encoding=’UTF-8’?>
<!DOCTYPE TERMS SYSTEM "terms.dtd">
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ" VALUE="Data1"/>
<PARAM NAME="JOBNAME" OP="LIKE" VALUE="J*"/>
</TERM>
<TERM>
<PARAM NAME="JOBNAME" OP="EQ" VALUE="Job5"/>
<PARAM NAME="CYCLIC" OP="EQ" VALUE="0"/>
</TERM>
</TERMS>
Analyze job definitions for loops based on multiple criteria XML file example
In the loopdetecttool XML file analyze all job processing definitions from either Data1 or Data2 data
center that has a job name that does not begin with the letter R.
<?xml version=’1.0’ encoding=’UTF-8’?>
<!DOCTYPE TERMS SYSTEM "terms.dtd">
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ" VALUE="Data1"/>
<PARAM NAME="JOBNAME" OP="NEQ" VALUE="R*"/>
</TERM>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ" VALUE="Data2"/>
<PARAM NAME="JOBNAME" OP="NEQ" VALUE="R*"/>
</TERM>
</TERMS>
123
Control-M Utilities Guide
updatedef
The updatedef utility updates (modifies) specified parameter values in the following definitions in the
Control-M/EM database:
Job processing definitions
Folder definitions
SMART Folder definitions
Sub-folder definitions
NOTE: updatedef modifies the characteristics of existing job processing definitions. duplicatedefjob
creates new job processing definitions based on existing job processing definitions in the "from" data
center and folders.
To update parameter values using the updatedef utility, see Updating parameter values using the
updatedef utility (on page 124).
The selected jobs, folders, SMART Folders and Sub-folders are modified according to specifications in the
updatedef arguments file. For more information, see updatedef XML file rules (on page 125).
The updatedef utility does not create new jobs or folders.
124
Control-M Utilities Guide
125
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being
used, and the location of the .dtd file.
UPDATE These tags indicate the start and end of the UPDATE argument. Only criteria
located between the tags are considered to be part of the argument.
Mandatory.
FOLDER These tags indicate the start and end of the folder specification. Criteria
identifying the folders to be modified and indicating the types of
modifications to be made are located between these tags. Optional.
TO String. Optional
FOLDER_DSN (z/OS only) Name of the library that contains the (scheduling) folder.
Optional.
ABLE_DSN FROM="Lib1" TO="Lib2"
To String. Optional
DATACENTER Name of the Control-M installation to which the job belongs. Optional.
NOTE: A TO parameter cannot be specified for this parameter.
EXAMPLE: DATACENTER FROM="CTMNYC"
TO String. Optional
126
Control-M Utilities Guide
Parameter Description
CYCLIC_ Maximum delay in minutes permitted for a late submission when selecting a
TOLERANCE specific time (for example 5 minutes).
127
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
UPDATE These tags indicate the start and end of the UPDATE argument. Only criteria that
are located between the tags are considered to be part of the argument.
Mandatory.
JOB These tags indicate the start and end of each job specification. Criteria identifying
the jobs to be modified and indicating the types of modifications to be made are
located between these tags. Optional.
FOLDER_DSN (z/OS only) Name of the library that contains the (scheduling) folder. Mandatory.
NOTE: This parameter cannot be modified.
EXAMPLE: FOLDER_DSN FROM="Lib1"
DATACENTER Name of the Control-M installation to which the job belongs. Mandatory.
NOTE: This parameter cannot be modified.
EXAMPLE: DATACENTER FROM="CTMNYC"
FOLDER_ORDER_ Optional.
METHOD
NOTE: This parameter cannot be modified.
EXAMPLE: FOLDER_ORDER_ METHOD FROM="Job3"
128
Control-M Utilities Guide
Parameter Description
FROM Mandatory.
TO Optional.
FILE_NAME Name of the file that contains the job script. Optional.
EXAMPLE: FILE_NAME FROM="File3" TO="File7"
FROM Mandatory.
TO Optional.
FROM Mandatory.
APPLICATION Name of the application to which the job’s group belongs. Optional.
EXAMPLE: APPLICATION FROM="App3" TO="App1"
TO String Optional.
129
Control-M Utilities Guide
Parameter Description
FROM Mandatory.
Valid values:
Job
Detached
Command
Dummy
External
(z/OS only) Valid values:
Job
Started_Task
NOTE: In Control-M/EM versions earlier than 6.1.00, the TASKTYPE
format contained:
for z/OS, emergency and cyclic information
for other operating systems, critical and cyclic information
Control-M/EM version 6.2.01 and higher can run jobs with the old
TASKTYPE format. However, BMC recommends that, to specify this
type of information when creating new job processing definitions, you
use CRITICAL and CYCLIC parameters.
[for z/OS]
BMC recommends that, to specify this type of information when
creating new job processing definitions, you use CRITICAL (a value of
"1" indicates that the job is an Emergency job) and CYCLIC parameters.
NOTE: Critical path jobs are indicated by coding an * as the first
character in the Priority parameter. There is no connection between
critical path jobs and the Critical parameter.
130
Control-M Utilities Guide
Parameter Description
CREATED_BY Control-M/EM user who defined the job. This parameter is used by the
Control-M/Server security mechanism. String. Optional.
NOTE: This argument is used by the Control-M/Server security mechanism and,
under certain circumstances, cannot be modified. For more information, see the
Security chapter and the description of the AuthorSecurity system parameter in
GUI Server parameters.
EXAMPLE: CREATED_BY FROM="emuser" TO="em5"
TO String. Optional.
FILE_PATH Name of the library/directory in which the job script resides. String. Optional.
EXAMPLE: FILE_PATH FROM="File1" TO="File4"
TO String. Optional.
CMDLINE Command string supplied when the job Task Type is Command. Optional.
EXAMPLE: CMDLINE FROM="C:\Format" TO="C\:CD Emnt"
TO String. Optional.
HOSTID Host name of an agent computer or host group to which the job is submitted.
Optional.
EXAMPLE: HOSTID FROM="Com3" TO="Acct4"
TO Host name of the agent computer on which the job copy is running
Optional.
RUN_AS Owner (user ID) associated with the job. This parameter is used by the
Control-M/Server security mechanism. Optional.
EXAMPLE: OWNER FROM="emuser" TO="emhr"
TO String. Optional.
131
Control-M Utilities Guide
Parameter Description
MAXRERUN Maximum number of reruns that can be performed for the job. Optional.
EXAMPLE: MAXRERUN FROM="1" TO="3"
TO String. Optional.
TO String. Optional.
TO String. Optional.
TO String. Optional.
TO String. Optional.
132
Control-M Utilities Guide
Parameter Description
CYCLIC Indicates whether the job is cyclic (to be run at regular intervals). Optional.
EXAMPLE: CYCLIC FROM="0" TO="1"
CONFIRM Indicates that the job must be manually confirmed by the Control-M/EM user
before it runs. Optional.
EXAMPLE: CONFIRM FROM="0" TO="1"
133
Control-M Utilities Guide
Parameter Description
INTERVAL Length of time (in minutes) to wait between reruns of a job or between cyclic runs
of a job. Integer. Optional.
EXAMPLE: INTERVAL FROM="3" TO="4"
TO String. Optional.
TO String. Optional.
MAXWAIT Number of extra days (after the original scheduling date) that the job is allowed to
remain in the Active Jobs database awaiting execution. Integer. Optional.
EXAMPLE: MAXWAIT FROM="4" TO="3"
TO Integer. Optional.
TO String. Optional.
134
Control-M Utilities Guide
Parameter Description
TO String. Optional.
DOCLIB Name of a library or directory containing the job documentation file. String.
Optional.
EXAMPLE: DOCLIB FROM="AcctFiles" TO="HRFiles"
TO String. Optional.
DAYS Days of the month on which to order the job. String. Optional.
EXAMPLE: DAYS FROM="ALL" TO="159"
TO String. Optional.
DAYS_AND_OR Indicates the relationship between specified Days values and Weekdays values.
Optional.
EXAMPLE: DAYS_AND_OR FROM="AND" TO="OR"
TO String. Optional.
WEEKDAYS Days of the week on which to order the job. String. Optional.
EXAMPLE: WEEKDAYS FROM="1,2,4" TO="ALL"
TO String. Optional.
135
Control-M Utilities Guide
Parameter Description
DATE Specific dates on which to order the job. String. mmdd format. Optional.
EXAMPLE: DATE FROM="0312" TO="0319"
DAYSCAL Name of a user-defined calendar used to specify a set of days. String. Optional.
EXAMPLE: DAYSCAL FROM="shipping" TO="receiving"
TO String. Optional.
TO String. Optional.
CONFCAL Specifies a calendar that is used to validate all specified days and dates on which
to schedule the job. String. Optional.
EXAMPLE: CONFCAL FROM="cal99" TO="cal00"
TO String. Optional.
136
Control-M Utilities Guide
Parameter Description
RETRO Indicates whether the job is scheduled for possible execution after its original
scheduling date (odate) has passed. Optional.
EXAMPLE: RETRO FROM="0" TO="1"
SHIFT Describes how to shift the scheduling date of the job. Optional.
EXAMPLE: SHIFT FROM="PREVDAY" TO="NEXTDAY"
SHIFTNUM Number of days to shift the scheduling date of the job. Optional.
EXAMPLE: SHIFTNUM FROM="-10" TO="5"
TO String. Optional.
MAXDAYS Maximum number of days to retains the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. String. Optional.
EXAMPLE: MAXDAYS FROM="07" TO="14"
TO String. Optional.
137
Control-M Utilities Guide
Parameter Description
MAXRUNS Maximum number of job runs to retains the SYSDATA archive dataset for jobs that
ended NOTOK. Subparameter of AUTOARCH. String. Optional.
EXAMPLE: MAXRUNS FROM="100" TO="250"
TO String. Optional.
RERUNMEM Name of the JCL member to use when the job is automatically rerun. String. 1 - 8
characters. Optional.
EXAMPLE: RERUNMEM FROM="Mem45" TO="Mem7"
TO String. Optional.
RETEN_DAYS (z/OS only) Number of days to retain the job in the History Jobs file. String.
Optional.
EXAMPLE: RETEN_DAYS FROM="5" TO="7"
TO String. Optional.
RETEN_GEN (z/OS only) Maximum number of generations of the job to keep in the History Jobs
file. String. Optional.
EXAMPLE: RETEN_GEN FROM="3" TO="4"
TO String. Optional.
TASK_CLASS Optional.
EXAMPLE: TASK_CLASS FROM="Distribution" TO="Decollation"
TO String. Optional.
138
Control-M Utilities Guide
Parameter Description
PREV_DAY Optional.
EXAMPLE: PREV_DAY FROM="N" TO="Y"
IND_CYCLIC Indicates whether the interval between further runs of a cyclic job is counted from
the start or the end of the previous job run. Optional.
EXAMPLE: IND_CYCLIC FROM="Y" TO="N"
RULE_BASED_ Relationship (AND|OR) between the specified Rule-Based Calendar and the job’s
CALENDAR own basic scheduling criteria. Optional.
_RELATIONSHIP EXAMPLE: RULE_BASED_CALENDAR_RELATIONSHIP FROM="AND"
TO="OR"
139
Control-M Utilities Guide
Parameter Description
TAG_RELATIONSHIP Relationship (AND|OR) between the specified Schedule Tag criteria and the job’s
own basic scheduling criteria. This parameter is relevant only for jobs in a SMART
Folder. Optional. This parameter is for backward compatibility.
EXAMPLE: TAG_RELATIONSHIP FROM="AND" TO="OR"
SYSDB Determines whether one or multiple data sets are used to catalogue sysdata.
Optional.
EXAMPLE: SYSDB FROM="1" TO="0"
PDSNAME Name of a partitioned dataset (PDS) to be checked for free space. String. Optional.
EXAMPLE: PDSNAME FROM="Lib_3" TO="Lib_5"
TO String. Optional.
MINIMUM Minimum number of free partitioned dataset tracks required by the library specified
for the PDSNAME parameter. Integer. Optional.
MINIMUM FROM="5" TO="6"
TO Integer. Optional.
140
Control-M Utilities Guide
Parameter Description
CATEGORY Name of a Control-D report decollating mission category that must be scheduled
under Control-D when the job is scheduled under Control-M. String. Optional.
EXAMPLE: CATEGORY FROM="*" TO="DAILY"
TO String. Optional.
141
Control-M Utilities Guide
Parameter Description
PREVENTNC2 (z/OS only) Performs dataset cleanup before the original job run. Optional.
EXAMPLE: PREVENTNC2 FROM="1" TO="0"
JAN, FEB, MAR, Months when the job can run. Optional. Not including a month is the same as
APR, MAY, JUN, including a month with value 0.
JUL, AUG, SEP,
EXAMPLE: JAN FROM="0" TO="1"
OCT, NOV, DEC
FROM Mandatory. Valid values:
0 (Default)
1
142
Control-M Utilities Guide
Parameter Description
PAR Certain OPTION values require that you supply additional information (such as
Release, NewDest). The PAR parameter holds that information as a string.
Optional.
EXAMPLE: PAR FROM="mem3log" TO="mem5log"
TO String. Optional.
FROM Limits the OUTPUT handling operation to OUTPUTs from the specified class.
Optional.
EXAMPLE: FROM FROM="1" TO="2"
TO String. Optional.
TO String. Optional.
APPL_TYPE Type of external application (for example, SAP or Oracle) on which the external
application job runs. Mandatory for external application jobs.
EXAMPLE: APPL_TYPE FROM="SAP" TO="OracleApps"
TO Optional. String.
143
Control-M Utilities Guide
Parameter Description
APPL_VER Version of the external application (for example, SAP or Oracle) on which the
external application job runs. Mandatory for external application jobs.
EXAMPLE: APPL_VER FROM="4.5" TO="4.6"
TO Optional. String.
APPL_FORM Predefined set of external application parameters that are displayed in the Job
Properties team. Mandatory for external application jobs.
EXAMPLE: APPL_FORM FROM="Default SAP 4.6" TO="Default SAP
4.5"
TO Optional. String.
CM_VER Version of external Application Add-on(for example, SAP or Oracle) that is installed
in the Control-M installation. Mandatory for external application jobs.
EXAMPLE: CM_VER FROM="6.1.00" TO="6.1.01"
TO Optional. String.
MULTY_AGENT When selected, broadcasts job submission details to all agents in a specified Host
Group. Optional.
EXAMPLE: MULTY_AGENT FROM="N" TO="Y"
TO Optional. String.
ACTIVE_FROM (z/OS only) Start of a period of time during which the job or SMART Folder can be
ordered. Optional.
EXAMPLE: ACTIVE_FROM FROM="20080315" TO="20080601"
TO Optional. String.
144
Control-M Utilities Guide
Parameter Description
ACTIVE_TILL (z/OS only) End of a period of time during which the job or SMART Folder can be
ordered. Optional.
EXAMPLE: ACTIVE_TILL FROM="20080315" TO="20080601"
TO Optional. String.
TIMEZONE Global time zone used to calculate the interval for time-related conditions.
Optional.
EXAMPLE: TIMEZONE FROM="EST" TO="GMT"
TO Optional. String.
TO String. Optional.
TO String. Optional.
TO String. Optional.
145
Control-M Utilities Guide
Parameter Description
CHANGE_USERID Name of the user that last modified the job. Optional.
EXAMPLE: CHANGE_USERID FROM="emuser" TO="emacct"
TO String. Optional.
TO String. Optional.
TO String. Optional.
146
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
UPDATE These tags indicate the start and end of the UPDATE argument. Only criteria located
between the tags are considered to be part of the argument. Mandatory.
SMART_FOLDER These tags indicate the start and end of the SMART Folder specification. Criteria
identifying the SMART Folders to be modified and indicating the types of modifications
to be made are located between these tags. Optional.
DATACENTER Name of the Control-M installation to which the job belongs. Optional.
NOTE:
A TO subparameter cannot be specified for this parameter.
At least one of the following folder parameters must be included in the input file:
DATACENTER, FOLDER_NAME, FOLDER_DSN
EXAMPLE: DATACENTER FROM="CTMNYC"
FOLDER_DSN (z/OS only) Name of the library that contains the SMART Folder. Optional.
NOTE:
A TO subparameter cannot be specified for this parameter.
At least one of the following folder parameters must be included in the input file:
DATACENTER, FOLDER_NAME, FOLDER_DSN
EXAMPLE: FOLDER_DSN FROM="CTMNYC"
147
Control-M Utilities Guide
Parameter Description
FOLDER_ORDER_ Optional.
METHOD
NOTE: A TO subparameter cannot be specified for this parameter.
EXAMPLE: FOLDER_ORDER_ METHOD FROM="CTMNYC"
SUB_APPLICATION Name of the group to which the SMART Folder belongs. Used as a descriptive name
for related folders. Optional.
EXAMPLE: GROUP FROM="Grp_HR" TO="Grp_ACCT"
TO String. Optional.
USED_BY Optional.
EXAMPLE: USED_BY FROM="fff" TO="ffg"
TO String. Optional.
USED_BY_CODE Optional.
EXAMPLE: USED_BY_CODE FROM="C***" TO="D***"
TO String. Optional.
MODIFIED Optional.
EXAMPLE: MODIFIED FROM="1101" TO="1102"
TO String. Optional.
TO String. Optional.
148
Control-M Utilities Guide
Parameter Description
CHECKSUM Optional.
EXAMPLE: CHECKSUM FROM="Y" TO="N"
TO String. Optional.
TO String. Optional.
REAL_FOLDERID Optional.
EXAMPLE: REAL_FOLDERID FROM="43556" TO="43557"
TO String. Optional.
TO String. Optional.
FILE_NAME Name of the file that contains the job script. Optional.
EXAMPLE: FILE_NAME FROM="File3" TO="File7"
TO String. Optional.
APPLICATION Name of the application to which the job’s group belongs. Used as a descriptive name
for related jobs. Optional.
EXAMPLE: APPLICATION FROM="App3""
TO String. Optional.
149
Control-M Utilities Guide
Parameter Description
RUN_AS Owner (user ID) associated with the job. This parameter is used by the
Control-M/Server security mechanism. Optional.
EXAMPLE: OWNER FROM="emuser" TO="emhr"
TO String. Optional.
ADJUST_COND Indicates whether to ignore prerequisite conditions normally set by predecessor jobs if
the relevant predecessor jobs are not scheduled. Optional. Valid values:
0 (Do not ignore. Default.)
1 (Ignore relevant prerequisite conditions.)
EXAMPLE: ADJUST_COND FROM="1" TO="2"
TO String. Optional.
CONFIRM Indicates whether the job must be manually confirmed by the Control-M/EM user
before it runs. Optional.
EXAMPLE: CONFIRM FROM="0" TO="1"
PRIORITY Indicates Control-M job priority. Optional. Two-character alphanumeric from 00 to ZZ.
EXAMPLE: PRIORITY FROM="AA" TO="BB"
TO String. Optional.
150
Control-M Utilities Guide
Parameter Description
TIMEFROM Indicates the earliest time for submitting the SMART Folder. Format: hhmm. Optional.
EXAMPLE: TIMEFROM FROM="1430" TO="1450"
TO String. Optional.
TIMETO Indicates the latest time for submitting the SMART Folder. Format: hhmm. Optional.
EXAMPLE: TIMETO FROM="1430" TO="1450"
TO String. Optional.
TO String. Optional.
TO String. Optional.
DOCLIB Name of a library or directory containing the job documentation file. String. Optional.
EXAMPLE: DOCLIB FROM="AcctFiles" TO="HRFiles"
TO String. Optional.
TO String. Optional.
151
Control-M Utilities Guide
Parameter Description
CREATED_BY Control-M/EM user who defined the job. String. Optional. Example:
EXAMPLE: CREATED_BY FROM="emuser" TO="emadmin"
NOTE: The New Day Procedure compares the Author and Owner for each job to
check if the job’s user has authorization to submit the job. Control-M/EM security
levels determine who can edit the Author value (any user or administrators only). For
more information, see the Security chapter and the description of the
AuthorSecurity system parameter in GUI Server parameters.
TO String. Optional.
CREATION_USER Name of the user that created the job. String. Optional.
EXAMPLE: CREATION_USER FROM="emuser" TO="em1"
TO String. Optional.
CREATION_DATE Date that the SMART Folder was created. String. Format: ddmm. Optional.
EXAMPLE: CREATION_DATE FROM="1212" TO="2012"
TO String. Optional.
CREATION_TIME Time the SMART Folder was created. String. Format: hhmm. Optional.
EXAMPLE: CREATION_TIME FROM="1230" TO="1430"
TO String. Optional.
CHANGE_USERID Name of the user that last modified the SMART Folder. String. Optional.
EXAMPLE: CHANGE_USERID FROM="emuser" TO="emadmin"
TO String. Optional.
152
Control-M Utilities Guide
153
Control-M Utilities Guide
154
Control-M Utilities Guide
155
Control-M Utilities Guide
156
Control-M Utilities Guide
exportsitestandards
The exportsitestandards utility enables you to do the following:
Note: It is recommended that you back up your Workload Change Manager entities before performing
any changes, by running the util (on page 527) utility (-wcm type).
Export site standards, and perform a mass update on multiple Site Standards, where you can
add/update a Site Standard rule in a large number of existing Site Standards, and import them into
Control-M. For more information on importing site standards, see importsitestandards (on page 160).
Export one or multiple Site Standards from one environment to another, between two environments
on different Control-M/Enterprise Managers.
For more information on importing/exporting site standards, see Exporting/importing Site Standards.
To run the utility, see Running the exportsitestandards utility (on page 157).
157
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
TERMS These tags indicate the start and end of the TERMS file. Only criteria that are
located between the tags are considered to be part of the argument.
TERM The TERM tags indicate the start and the end of a group of selection criteria
used to specify a Site Standard or Site Standards that are to be exported. Only
PARAM tags that are located between the TERM tags are considered to be part
of the TERM argument.
158
Control-M Utilities Guide
Parameter Description
PARAM Selection criteria parameter used to determine the job definitions that are to be
exported. More than one PARAM can be specified. Mandatory.
PARAM VALUE="*" OP="LIKE" NAME="NAME"
EXAMPLE:
<?xml version="1.0"?>
-<TERMS>
-<TERM>
<PARAM VALUE="*" OP="LIKE" NAME="NAME"/>
<PARAM VALUE="MySiteStandard*" OP="LIKE" NAME="DESCRIPTION"/>
<PARAM VALUE="myUser*" OP="LIKE" NAME="CREATE_UID"/>
</TERM>
</TERMS>
159
Control-M Utilities Guide
importsitestandards
The importsitestandard utility enables you to do the following:
After you have completed exportsitestandards (on page 157), you can perform a mass update on
multiple Site Standards, where you can add/update a Site Standard rule in a large number of existing
Site Standards, and import them into Control-M.
Import one or multiple Site Standards from one environment to another, between two environments
on different Control-M/Enterprise Managers.
If you are importing Site Standards that already exist in the database, you can use the overwrite flag
in the utility command. In this case, the existing Site Standards are replaced. If you do not use the
overwrite flag, only new Site Standards are imported.
For more information on importing/exporting site standards, see Exporting/importing Site Standards.
To run the utility, see Running the importsitestandard utility (on page 160).
160
Control-M Utilities Guide
Parameter Description
<password file name> Flat file containing an unencrypted user name and password on
separate lines in the format:
user=<userName>
password=<password>
<GUI Server Control-M/EM GUI server logical name, host name, or IP address.
Name>
NOTE: If multiple GUI servers exist, set this parameter to the
logical name of the relevant GUI server.
<data file (import only) Defines the path and name of the XML file
name> containing the Site Standards.
<args file name> (export only) Defines the path and name of the arguments file
containing arguments that are used as selection criteria to
determine which site standards to export.
<file name> (export only) Path and name of the output file containing the
exported site standards
161
Control-M Utilities Guide
exportpromotionrule
The exportpromotionrule utility enables you to do the following:
Export promotion rules and perform a mass update of multiple promotion rules, where you can
add/update a Promotion rule for a large number of existing Promotion rules, and import them into
Control-M.
When adding a new rule, it is best to add the rule in the Tools section in Control-M, as described in
Promotion Rules in the Control-M User Guide. This serves as a template in which you export using this
utility.
Export one or more promotion rules from one environment to another, between two environments on
different Control-M/Enterprise Managers. In this case, you may want to make small changes to the
rules before importing them into the destination environment. For example, some values might
change between a test environment and a production environment.
To run the utility, see Running the exportpromotion utility (on page 162).
162
Control-M Utilities Guide
163
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being
used, and the location of the .dtd file.
TERMS These tags indicate the start and end of the TERMS file. Only
criteria that are located between the tags are considered to be
part of the argument.
TERM The TERM tags indicate the start and the end of a group of
selection criteria used to specify a job or jobs that are to be
exported. Only PARAM tags that are located between the TERM
tags are considered to be part of the TERM argument.
164
Control-M Utilities Guide
165
Control-M Utilities Guide
After running the exportpromotionrule utility, the following output file is generated:
<PromotionEnvItem>
<SourceName>ENV1</SourceName>
<TargetName>ENV2</TargetName>
<Name>ENV1-TO-ENV2</Name>
<Description>env1 to env 2 rule updates Application field to be
'123'</Description>
<PromotionRule>
<UpdateRows>
<FindAndUpdateItem>
<Type>Update</Type>
<IsParent>false</IsParent>
<Children/>
<Operator>
<OperatorName>Like</OperatorName>
<OperatorValue>Like</OperatorValue>
<OperatorEnumValue>LikeOperator</OperatorEnumValue>
166
Control-M Utilities Guide
</Operator>
<IsVisible>true</IsVisible>
<IsChildrenVisible>true</IsChildrenVisible>
<LegacyId>F_Application</LegacyId>
<Level>0</Level>
<IsSelected>true</IsSelected>
<UpdateValue>123</UpdateValue>
<Command>
<OperatorName>assign</OperatorName>
<OperatorEnumValue>AssignCommand</OperatorEnumValue>
</Command>
<UpdateOperator>
<OperatorName>Update</OperatorName>
<OperatorEnumValue>UpdateAction</OperatorEnumValue>
</UpdateOperator>
</FindAndUpdateItem>
</UpdateRows>
<CanMoveUpdateItemUp>false</CanMoveUpdateItemUp>
<CanMoveUpdateItemDown>false</CanMoveUpdateItemDown>
</PromotionRule>
</PromotionEnvItem>
167
Control-M Utilities Guide
After running the exportpromotionrule utility, the following output file is generated:
<PromotionEnvItem>
<SourceName>ENV1</SourceName>
<TargetName>ENV3</TargetName>
<Name>ENV1-TO-ENV3</Name>
<Description>env1 to env 3 rule updates Description field to be 'Nightly
Job'</Description>
<PromotionRule>
<UpdateRows>
<FindAndUpdateItem>
<Type>Update</Type>
<IsParent>false</IsParent>
<Children/>
<Operator>
<OperatorName>Like</OperatorName>
<OperatorValue>Like</OperatorValue>
<OperatorEnumValue>LikeOperator</OperatorEnumValue>
168
Control-M Utilities Guide
</Operator>
<IsVisible>true</IsVisible>
<IsChildrenVisible>true</IsChildrenVisible>
<LegacyId>F_Description</LegacyId>
<Level>0</Level>
<IsSelected>true</IsSelected>
<UpdateValue>Nightly Job</UpdateValue>
<Command>
<OperatorName>assign</OperatorName>
<OperatorEnumValue>AssignCommand</OperatorEnumValue>
</Command>
<UpdateOperator>
<OperatorName>Update</OperatorName>
<OperatorEnumValue>UpdateAction</OperatorEnumValue>
</UpdateOperator>
</FindAndUpdateItem>
</UpdateRows>
<CanMoveUpdateItemUp>false</CanMoveUpdateItemUp>
<CanMoveUpdateItemDown>false</CanMoveUpdateItemDown>
</PromotionRule>
</PromotionEnvItem>
Updating the Run as User field and Set the Priority to High - output file
In the following example, you need to create two Promotion Rules from source environment ENV4 to
target environment ENV2:
Update the Run as User field to adminuser
Set the Priority to High
The following figure shows how the Promotion Rule appears in Control-M.
169
Control-M Utilities Guide
After running the exportpromotionrule utility, the following output file is generated:
<PromotionEnvItem>
<SourceName>ENV4</SourceName>
<TargetName>ENV2</TargetName>
<Name>ENV4-TO-ENV2</Name>
<Description>env4 to env 2 rule updates 2 field: 1. Run As to be 'adminuser'.
2. Priority to 'High'</Description>
<PromotionRule>
<UpdateRows>
<FindAndUpdateItem>
<Type>Update</Type>
<IsParent>false</IsParent>
<Children/>
<Operator>
<OperatorName>Like</OperatorName>
<OperatorValue>Like</OperatorValue>
<OperatorEnumValue>LikeOperator</OperatorEnumValue>
170
Control-M Utilities Guide
</Operator>
<IsVisible>true</IsVisible>
<IsChildrenVisible>true</IsChildrenVisible>
<LegacyId>F_Owner</LegacyId>
<Level>0</Level>
<IsSelected>false</IsSelected>
<UpdateValue>adminuser</UpdateValue>
<Command>
<OperatorName>assign</OperatorName>
<OperatorEnumValue>AssignCommand</OperatorEnumValue>
</Command>
<UpdateOperator>
<OperatorName>Update</OperatorName>
<OperatorEnumValue>UpdateAction</OperatorEnumValue>
</UpdateOperator>
</FindAndUpdateItem>
<FindAndUpdateItem>
<Type>Update</Type>
<IsParent>false</IsParent>
<Children/>
<Operator>
<OperatorName>Like</OperatorName>
<OperatorValue>Like</OperatorValue>
<OperatorEnumValue>LikeOperator</OperatorEnumValue>
</Operator>
<IsVisible>true</IsVisible>
<IsChildrenVisible>true</IsChildrenVisible>
<LegacyId>F_Priority</LegacyId>
<Level>0</Level>
<IsSelected>true</IsSelected>
<UpdateValue>High</UpdateValue>
<Command>
<OperatorName>assign</OperatorName>
<OperatorEnumValue>AssignCommand</OperatorEnumValue>
</Command>
171
Control-M Utilities Guide
<UpdateOperator>
<OperatorName>Update</OperatorName>
<OperatorEnumValue>UpdateAction</OperatorEnumValue>
</UpdateOperator>
</FindAndUpdateItem>
</UpdateRows>
<CanMoveUpdateItemUp>true</CanMoveUpdateItemUp>
<CanMoveUpdateItemDown>false</CanMoveUpdateItemDown>
</PromotionRule>
</PromotionEnvItem>
Importpromotionrule
The importpromotionrule utility enables you to do the following:
Perform a mass update on multiple Promotion rules (after Running the exportsitestandards utility (on
page 157)) where you can add/update a Promotion rule in a large number of existing Promotion
rules, and import them into Control-M.
Import one or multiple Promotion rules from one environment to another, between two environments
on different Control-M/Enterprise Managers. If you import Promotion rules that already exist in the
database, you can use the overwrite flag (/o) in the utility command, so existing Promotion rules are
replaced. If you do not use the overwrite flag, Promotion rules are not imported and a message is
issued that Promotion rules already exist.
Before using the importpromotionrule utility, note the following:
The Source/Target name must be defined in the Environment Name field in the Promotion Rules
tab in Control-M.
Only one rule for each Source and Target combination is permitted. If the file contains two rules with
the same Source and Target, an error message is issued when importing the rule.
To run the utility, see Running the importpromotionrule utility (on page 172).
172
Control-M Utilities Guide
Parameter Description
<password file name> Flat file containing an unencrypted user name and password on
separate lines in the format:
user=<userName>
password=<password>
<GUI Server Name> Control-M/EM GUI server logical name, host name, or IP address.
NOTE: If multiple GUI servers exist, set this parameter to the
logical name of the relevant GUI server.
<data file name> (import only) Defines the path and name of the XML file
containing the promotion rules. For more information about the
XML file, see exportpromotionrule arguments file rules (on page
163) and XML file rules (on page 35).
<args file name> (export only) Defines the path and name of the arguments file
containing arguments that are used as selection criteria to
determine which promotion rules to export.
<file name> (export only) Path and name of the output file containing the
exported promotion rules. For more information, see Promotion
rules output file (on page 165).
173
Control-M Utilities Guide
defservice (on page 174) Imports service processing definitions into the Control-M/EM
database
For emdef parameters related to jobs, see emdef utility for jobs (on page 42).
For emdef parameters related to folders and calendars see emdef utility for folders and calendars (on
page 266).
defservice
The defservice utility imports service processing definitions into existing folders in the Control-M/EM
database. To import service processing definitions using the defservice utility, see Importing BIM service
processing definitions using the defservice utility (on page 174).
defservice reads service processing definitions from a plain text input file written in XML format.
The defservice input file is checked and processed. If there are any errors in the file, a message is
displayed specifying the lines with the errors. For more information, see defservice XML input file example
(on page 175).
174
Control-M Utilities Guide
175
Control-M Utilities Guide
<INCLUDING_TERMS >
<TERM >
<PARAM NAME="CONTROL-M Name" OP="LIKE" VALUE="isvm-w23-ctmDS9"/>
<PARAM NAME="ORDER_FOLDER" OP="LIKE" VALUE="TestCon, TestCon2"/>
</TERM>
</INCLUDING_TERMS>
</FILTER>
</SERVICE>
<SERVICE CREATED_BY="emuser" CREATE_TIME="20100818094142UTC"
INSTANTIATION_TYPE="Job" LAST_UPDATE_TIME="20100822055018UTC" NAME="order
(job) service" ORDERABLE="1" SERVICE_ID="4">
<FILTER >
<INCLUDING_TERMS >
<TERM >
<PARAM NAME="CONTROL-M Name" OP="EQ" VALUE="isvm-w23-ctmDS9"/>
<PARAM NAME="ORDER_FOLDER" OP="EQ" VALUE="TestCon_"/>
<PARAM NAME="JOBNAME" OP="EQ" />
</TERM>
</INCLUDING_TERMS>
</FILTER>
<ORDERABLE_PARAM DISPLAY_NAME="p1" PARAM_NAME="p1" PARAM_TYPE="String"
REQUIRED="1" VALIDATION=","/>
</SERVICE>
<SERVICE CREATED_BY="emuser" CREATE_TIME="20100819211228UTC"
INSTANTIATION_TYPE="SMARTFolder" LAST_UPDATE_TIME="20100822055018UTC"
NAME="tzahi" ORDERABLE="1" SERVICE_ID="6">
<FILTER >
<INCLUDING_TERMS >
<TERM >
<PARAM NAME="CONTROL-M Name" OP="EQ" VALUE="isvm-w23-ctmDS9"/>
<PARAM NAME="ORDER_FOLDER" OP="EQ" VALUE="aaa22"/>
</TERM>
</INCLUDING_TERMS>
</FILTER>
</SERVICE>
176
Control-M Utilities Guide
177
Control-M Utilities Guide
</SERVICE>
<SERVICE CREATED_BY="emuser" CREATE_TIME="20100821140755UTC"
INSTANTIATION_TYPE="Filter" LAST_UPDATE_TIME="20100822055018UTC"
NAME="tzahi3" ORDERABLE="0" SERVICE_ID="9">
<FILTER >
<INCLUDING_TERMS >
<TERM >
<PARAM NAME="CONTROL-M Name" OP="LIKE" VALUE="isvm-w23-ctmDS9, THID0106"/>
<PARAM NAME="APPLICATION" OP="LIKE" VALUE="SuadDailyAppl*"/>
<PARAM NAME="GROUP" OP="LIKE" VALUE="DailyJobs, TestCon*"/>
<PARAM NAME="MEMLIB" OP="LIKE" VALUE="memlib"/>
<PARAM NAME="TASKTYPE" OP="LIKE" VALUE="*Job*, Command"/>
<PARAM NAME="DEF_HOSTGROUP" OP="LIKE" VALUE="hostgroup"/>
</TERM>
</INCLUDING_TERMS>
</FILTER>
</SERVICE>
<SERVICE CREATED_BY="emuser" CREATE_TIME="20100822060917UTC"
INSTANTIATION_TYPE="Filter" LAST_UPDATE_TIME="20100822060917UTC"
NAME="ServiceFilter" ORDERABLE="0" SERVICE_ID="11">
<FILTER >
<INCLUDING_TERMS >
<TERM >
<PARAM NAME="CONTROL-M Name" OP="LIKE" VALUE="controlm"/>
<PARAM NAME="APPLICATION" OP="LIKE" VALUE="application"/>
<PARAM NAME="GROUP" OP="LIKE" VALUE="group"/>
<PARAM NAME="ORDER_FOLDER" OP="LIKE" VALUE="folder"/>
<PARAM NAME="ORDER_LIB" OP="LIKE" VALUE="folderlin"/>
<PARAM NAME="MEMLIB" OP="LIKE" VALUE="memlib"/>
<PARAM NAME="MEMNAME" OP="LIKE" VALUE="memname"/>
<PARAM NAME="JOBNAME" OP="LIKE" VALUE="jobname"/>
<PARAM NAME="TASKTYPE" OP="LIKE" VALUE="*Job*, *Task*, Command, Detached,
Dummy, External"/>
<PARAM NAME="OWNER" OP="LIKE" VALUE="owner"/>
<PARAM NAME="DEF_HOSTGROUP" OP="LIKE" VALUE="hostgroup"/>
<PARAM NAME="APPL_TYPE" OP="LIKE" VALUE="OS"/>
178
Control-M Utilities Guide
exportdefservice
The exportdefservice parameter of the emdef utility exports BIM service processing definitions from the
Control-M/EM database to an output file. To export service processing definitions using the utility, see
Exporting BIM service processing definitions using the exportdefservice utility (on page 179).
When exportdefservice is invoked, it processes a specified file of arguments in XML format. For more
information, see exportdefservice arguments file (on page 181). This file contains statements that identify
existing service processing definitions. The identified definitions are exported from the Control-M/EM
database to an output file. You can modify the exported service processing definitions in the output file
and can import the modified definitions into the Control-M/EM database using the defservice (on page
174) utility.
179
Control-M Utilities Guide
exportdefservice parameters
The following table lists the exportdefservice parameters:
Parameter Description
<password file Flat file containing an unencrypted user name and password on
name> separate lines in the format:
user=<userName >
password=<password>
<GUI Server Control-M/EM GUI server logical name, host name, or IP address.
Name>
NOTE: If multiple GUI servers exist, set this parameter to the logical
name of the relevant GUI server.
<Args file name> Path and name of the arguments file containing exportdefservice
specifications. For information about this file, see XML file rules (on
page 35)
<file name> Path and name of the file containing the exported service
specifications.
/a Accept all. The /a switch directs the utility to automatically reset the
Created By parameter to the current Control-M/EM user when these
two values do not match. If not specified, the utility skips (that is,
does not process) job definitions whose Author does not match the
currently logged in user.
NOTE: The /a switch has no effect on Administrator users and is
relevant only when the AuthorSecurity system parameter is set to 2
or 3.
180
Control-M Utilities Guide
Parameter Description
The first two lines of the arguments file specify the XML version, the text encoding format being used, and
the location of the .dtd file.
TERMS These tags indicate the start and end of the TERMS file. Only criteria that are
located between the tags are considered to be part of the argument.
TERM The TERM tags indicate the start and the end of a group of selection criteria
used to specify a service or services that are to be exported. Only PARAM tags
that are located between the TERM tags are considered to be part of the TERM
argument.
181
Control-M Utilities Guide
Parameter Description
PARAM Selection criteria parameter used to determine the service definitions that are to
be exported. More than one PARAM can be specified. Mandatory.
PARAM NAME="DATACENTER" OP="E" VALUE="Center1"
182
Control-M Utilities Guide
Promotion can only be run from a Windows environment where Control-M client is installed. The utility
uses Promotion rules which have been defined by the Administrator in Control-M. Running the utility
invokes the same promotion user exits and email notifications for all actions if defining Promotion in
Control-M client.
To run the emwacli utilty, see Running the emwacli utility (on page 183).
You can type the emwacli parameters in the command line or define the parameters in a param_file
(text file). For more information see param_file (on page 187).
For more information about emwacli parameters, see emwacli utility Promotion parameters (on page
184).
183
Control-M Utilities Guide
Parameter Descripton
-param_file Enables you to define a file containing parameters for the utility,
instead of typing each parameter in the command line. For more
information, see param_file (on page 187).
-promotion rule Defines the name of the defined promotion rule (mandatory). For
more information about defining promotion rules see Creating a
promotion rule.
184
Control-M Utilities Guide
Parameter Descripton
-ignore warnings Determines if a promote action stops where there are validation
warnings or integrity warnings.
Values:
Y: If any validation or integrity warnings are issued, promotion
continues.
N: If any validation or integrity warnings are issued,
promotion exits.
Default: Y
NOTE: Integrity and validation warnings appear in the command
window regardless of the value.
-request_description Defines the request description that appears in the request details.
-email_notification Defines the email address for notifications. For more information,
see Request Details parameters.
185
Control-M Utilities Guide
Parameter Descripton
-accept_all Enables you to consolidate jobs and SMART folders into the
current logged in user if the Created_by parameter and the
Control-M/EM user do not match.
Values:
Y: Jobs and SMART folders in the Created_by parameter are
consolidated into the current logged in user, if the Created by
parameter and Control-M/EM user do not match.
N: The utility exits with an error message, if the Created by
parameter and Control-M/EM user do not match.
Default: N
NOTE: Relevant only when the AuthorSecurity system parameter
is set to 2 or 3.
-folder_name Defines the name of the SMART Folder where the job belongs
(mandatory)
-folder_library (Control-M for z/OS only) Defines the name of the library where
the folder is located.
-ru Defines the user name in the target environment. Mandatory for
defining a remote environment.
-rp Defines the password associated with the user name in the target
environment which is used only for promotion requests.
186
Control-M Utilities Guide
param_file
param_file enables you to define a file containing parameters for the utility. The utility reads promotion
definitions from a plain text input file, which is checked and processed. If there are any errors in the file,
a message is displayed specifying the lines with the errors. In this file, each parameter and its values (if
any) are on a separate line with the same syntax they would have on the command line. Using the
params_file enables you to prepare and save files of the emwacli parameter that can be reused.
If a mandatory parameter is omitted from the param_file the utility exits with an error message. If an
optional parameter is omitted, the default is used.
All keywords must be entered in lowercase. For an example, see emwacli utility param_file example (on
page 187).
187
Control-M Utilities Guide
Control-M/Server utilities
This table lists the Control-M/Server utilities that are used for definition, ordering, and monitoring.
ctmcreate (on page 189) Enables a specific purpose job to be inserted directly
into the Active Jobs database.
ctmdefine (on page 202) Adds a job processing definition to a folder, a SMART
folder, and a subfolder in the Control-M/Server
database.
ctmexdef (on page 215) The ctmexdef utility exports job processing definitions
from the Control-M/Server database to a flat (ASCII)
file.
ctmfw File Watcher utility (on The ctmfw (Control-M File Watcher) utility monitors file
page 217) status and detects the following file processes:
Successful completion of a file transfer activity
Creation of a file
Deletion of a file
ctmimptb (on page 228) The ctmimptb utility imports job definition folders
(including SMART Folders and Rule-Based Calendars)
that were exported from Control-M/EM by the
exportdeffolder utility.
ctmkilljob (on page 231) The ctmkilljob utility terminates a specified Control-M
job and all its processes. ctmkilljob terminates only jobs
that are currently executing.
ctmorder (on page 232) The ctmorder utility orders or forces one or more jobs
from a SMART Folder in the Control-M/Server database.
ctmpsm (on page 240) The ctmpsm utility can be invoked interactively to
display the Control-M Production Support menu.
ctmsweep (on page 258) The ctmsweep utility deletes job definitions from the
Control-M/Server database that become obsolete due to
the Start date (Active From Date) and End date (Active
To Date) parameters in the job definitions.
ctmwhy (on page 262) The ctmwhy utility displays a report stating why a
SMART Folder, Sub-folder, or job waiting in the Active
Jobs database is not being submitted for execution.
188
Control-M Utilities Guide
ctmcreate
The ctmcreate utility is an API (Application Program Interface) that allows a specific purpose job to be
inserted directly into the Active Jobs database. The job does not have to be defined in the
Control-M/Server database. The function performed by this utility is equivalent to the Force function in
Control-M/EM. To run the ctmcreate utility, see Creating a job using ctmcreate utility (on page 189).
The ctmcreate utility can be invoked using the -input_file parameter:
ctmcreate -input_file <fullPathFileName>
The referenced file contains all the required parameters. Most of the parameters are described in
Control-M Parameters and ctmcreate parameters (on page 192).
For more information on syntax rules, see ctmcreate syntax rules (on page 199).
You can create a job within the given folder or Sub-folder name. The ctmcreate utility can be used to
create a specific purpose (non-permanent) folder that is not defined in the Control-M/Server database by
specifying:
-TASKTYPE FOLDER|SUBFOLDER -folder <folderName|folderPath>
EXAMPLE: Control-M/Server ctmcreate utility
ctmcreate -tasktype job -application SAP -hostgrp chef1 -appltype SAP -file_path ddd
-file_name fff -variable %%SAPR3-ACCOUNT DV1 -variable %%SAPR3-JOBNAME SAPCM
-variable %%SAPR3-JOBCOUNT 09495501 -variable %%SAPR3-JOB_MODE EXTERNAL
-applver 46C/46D -applform "SAP R3" -cmver 900 -jobname xxxx.
189
Control-M Utilities Guide
190
Control-M Utilities Guide
[ -DOCMEM <filename> ]
[ -DOCLIB <directory name> ]
[ -INCOND <condition> <dateref>|ODAT AND|OR ]
[ -OUTCOND <condition> <dateref>|ODAT ADD|DEL ]
[ -VARIABLE <variable name as %%local, %%\global, %%\\smart or
%%\\pool\variable> <expression> ]
[ -QUANTITATIVE <name> <quantity> ]
[ -OUTPUT RELEASE|DELETE|COPY|MOVE [<parameter>]]
[ -CONTROL <name> E|S ]
[ -SHOUT OK|NOTOK|RERUN|LATESUB|LATETIME|EXECTIME <destination>
<urgency R|U|V> <message> [<time>] ]
[ -REMOVEATONCE Y:N ]
[ -DAYSKEEPINNOTOK <days> ]
[ -ON <statement> <code>
[ -DOOK ]
[ -DONOTOK ]
[ -DORERUN ]
[ -DOSHOUT <destination> <urgency R|U|V> <message> ]
[ -DOCOND <condname> <dateref>|ODAT ADD|DEL ]
[ -DOVARIABLE <variable name as %%local, %%\global, %%\\smart or
%%\\pool\variable> <expression> ]
[ -DOFORCEJOB <foldername> <jobname> <odate>|ODAT ]
[ -DOREMOTEFORCEJOB <foldername> <jobname> <odate>|ODAT ]
[ -ORDERVARIABLE <variable name as %%local, %%\global, %%\\smart or
%%\\pool\variable> <expression> ]
[ -DOOUTPUT RELEASE|DELETE|COPY|MOVE [<parameter>] ] ]
[ -DOSTOPCYCLIC ]
[ -DOMAIL <destination> <cc> <urgency R|U|V> <subject> <message> [<attach
output>] ]
[ -DOREMEDY <summary> <description> <urgency L|M|H|U|C>
[ -CAPTURE INTO <variable name as %%local, %%\global, %%\\smart or
%%\\pool\variable>
SEARCH <Search string>
[SKIPROWS <Number rows>]
[SKIPWORDS <Number words> [DELIMITER <Character delimiter> TAKE <Number
words | 0 until end>] | SKIPCHARS <Number characters> [TAKE <Number chars | 0 until
end>] ] ]
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the ctmcreate parameters, see ctmcreate parameters (on page 192).
191
Control-M Utilities Guide
ctmcreate parameters
The following table describes ctmcreate utility parameters. Most of the parameters are also described in
Control-M Parameters.
Parameter Description
-APPLICATION Provides a logical name for sorting groups of jobs. This parameter
is used to supply a common descriptive name to a set of related
groups of jobs.
-CYCLIC Indicates whether the job is cyclic (to be run at regular intervals).
Optional.
Valid values:
Y – Yes
N – No (Default)
192
Control-M Utilities Guide
Parameter Description
193
Control-M Utilities Guide
Parameter Description
-FOLDER_ORD Specifies in which order of a SMART Folder to put the job. Valid
values are:
194
Control-M Utilities Guide
Parameter Description
-EMBEDDED_SCRIPT The Embedded script parameter contains the name of the file and
path, which enables the embedded script to be copied from a file.
-INPUT_FILE Name and full path of a file containing parameters for the utility.
In this file, each parameter and its values (if any) are on a
separate line with the same syntax they would have on the
command line. Using the -input_file parameter enables you to:
Prepare and save files of utility parameters that can be
reused.
Specify utility input longer than the number of characters
allowed in the command line.
-input_file
<controlm_owner>/ctm_server/data/ctmcr
eate_parms.txt
195
Control-M Utilities Guide
Parameter Description
196
Control-M Utilities Guide
Parameter Description
CAPTURE Defines the job capture definitions. This parameter can be used to
search the output of a job for specified text and based on the
capture parameters, extract words or characters from the output.
The destination of the capture is a variable that can be set to any
of the following types:
local
global
named pool
smart folder
197
Control-M Utilities Guide
Parameter Description
198
Control-M Utilities Guide
199
Control-M Utilities Guide
A parameter requiring more than one entry can be repeated as many times as necessary (for
example, if a job must wait for several prerequisite conditions, specify a separate -incond parameter
for each prerequisite condition).
The following special characters are disabled when they occur in prerequisite condition names: ( ) |
[blanks]
An -on parameter must be followed by at least one -do... parameter. -do... parameters are dependent
upon the last -on parameter preceding them. Normally, when a -dorerun parameter is implemented,
the current run of the job ends with NOTOK status. To ensure that the job will have OK status even
though it is rerun, specify a -do ok parameter immediately after the -dorerun parameter.
The -dorerun parameter cannot be specified for a cyclic job.
The order of the parameters does not affect the outcome of the job, with the exception of -on
and -do... parameters.
When using -doforcejob to force an entire folder, <job name> must be specified as a blank enclosed
in quotation marks (that is, " ").
When the ctmcreate utility is invoked from a script, to use the **** option for a -incond date
parameter, specify the parameter as \"****\"
If a single character is specified for the priority parameter, the first character is assumed to be A. For
example, priority 1 is interpreted as priority A1.
A maximum of 99 prerequisite conditions can be specified for docond parameters.
-incond pk_oly_ok "****"
When the UNIX symbol ~ is used in parameter -filepath, -override path, or -doclib to represent the
user’s home directory, the entire parameter should be enclosed in double quotation marks. The
quotation marks ensure that the ~ symbol will be translated by the agent before submission, and not
by the server before transmission to the agent computer.
-file_path "~/controlm/scripts/"
For more information on ctmcreate parameters , see ctmcreate parameters (on page 192) , and
ctmcreate example.
200
Control-M Utilities Guide
201
Control-M Utilities Guide
ctmdefine
The ctmdefine utility is an API (Application Program Interface) that adds a job processing definition to one
of the following in the Control-M/Server database:
A Folder
A SMART Folder
A Sub-Folder
To run the ctmdefine utility, see Adding a job to a folder using the ctmdefine utility (on page 203).
This utility can be used when converting job scheduling information from other job control components to
Control-M/Server. The function performed by this utility is equivalent to the manual process of creating
job processing definitions, described in Job definition.
The ctmdefine utility can be invoked using the -input_file parameter:
-ctmdefine -input_file <fullPathFileName>
The referenced file contains all the required parameters. Most of the parameters are described in
Control-M Parameters and ctmdefine parameters (on page 207).
For more information on ctmdefine syntax rules, see ctmdefine syntax rules (on page 210).
The ctmdefine utility can also be used to define jobs for specific applications, for example, SAP and Oracle
Applications (OAP).
When creating new SMART folders or job processing definitions, the following considerations are
applicable:
202
Control-M Utilities Guide
If the job name specified when using this utility already exists in a job processing definition in the
SMART Folder, the new job processing definition does not overwrite the existing one. Both job
processing definitions will appear in the folder, each with a different internal job number.
If the SMART Folder specified when using this utility does not exist, the utility creates it.
After using this utility to create one or more job processing definitions, download the modified SMART
Folders to the Control-M/EM database.
A newly created SMART folder can be assigned a Order method parameter using the Control-M after
the folder is downloaded to the Control-M/EM database or by using the ctmpsm utility.
Values for a creation/modification timestamp and the user ID of the user who created or modified the
job processing definition are automatically added to the communication protocol between
Control-M/EM and Control-M/Server and are stored in the Control-M/EM database. These values are
initialized by the ctmdefine utility and are sent to Control-M/EM when the SMART Folder is
downloaded. When the SMART Folder is uploaded, Control-M/EM sends these values to
Control-M/Server.
When defining a job in a nested folder, a folder path to the intended nested folder must be specified
(-FOLDER option). The folder path starts from the outermost folder name and is similar to operating
system files and directories path. When a folder name is used and the folder does not exist, a folder is
created.
If you define a new Rule-based calendar with the ! character at the beginning of the Rule-based
calendar name, the Rule-based calendar is excluded. If this feature is disabled, an error message is
displayed that you cannot define a Rule-based calendar with the ! character. For more information,
see DefaultCTMExcludeRBC in General parameters.
203
Control-M Utilities Guide
204
Control-M Utilities Guide
205
Control-M Utilities Guide
[ -WEEKCAL <calendar> ]
[ -CAL_ANDOR AND|OR ]
[ -SHIFT [</>/@][+/-]nn ]
[ -CONFCAL <calendar> ]
[ -RETRO Y|N ]
[ -RBC <rule_based_calendar> ]
If you define a new Rule-based calendar with the ! character at the beginning of the Rule-based calendar
name, the Rule-based calendar is excluded. If this feature is disabled, an error message is displayed that
you cannot define a Rule-based calendar with the ! character. For more information, see
DefaultCTMExcludeRBC in General parameters.
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the ctmdefine parameters, see ctmdefine parameters (on page 207).
206
Control-M Utilities Guide
ctmdefine parameters
The following table describes debug, quiet, and input_file parameters. For more details about the
parameters (for example, cyclic job parameters) are described in Control-M Parameters.
Parameter Description
-APPLICATION Provides a logical name for sorting groups of jobs. This parameter is
used to supply a common descriptive name to a set of related
groups of jobs.
-input_file Name and full path of a file containing parameters for the utility. In
this file, each parameter and its values (if any) are on a separate
line with the same syntax they would have on the command line.
Using the -input_file parameter enables you to:
Prepare and save files of utility parameters that can be reused.
Specify utility input longer than the number of characters
allowed in the command line.
EXAMPLE: -input_file
~<controlmOwner>/ctm_server/data/ctmdefine_parms.
txt
-CAPTURE Defines the job capture definitions. This parameter can be used to
search the output of a job for specified text and based on the
capture parameters, extract words or characters from the output.
The destination of the capture is a variable that can be set to any of
the following types:
local
global
named pool
smart folder
207
Control-M Utilities Guide
Parameter Description
208
Control-M Utilities Guide
Parameter Description
209
Control-M Utilities Guide
Parameter Description
210
Control-M Utilities Guide
-rbc myrbc1
-maxwait 1
-days 0,2,3
-dayscal cal1
Strings containing blanks must be enclosed in quotation marks (for example, -cmdline "ctmudlst list
payroll").
A UNIX metasymbol (that must be enclosed in quotation marks) in a command line string should be
enclosed in single quotation (for example, -cmdline "ctmcontb list ‘*’ ").
If a parameter value begins with a $ sign, the operating system will try to replace the value. For
example, -jobname $USER will cause the shell to substitute the current user. If a parameter value
should contain a $ sign, enclose the value in single quotation marks. For example, -jobname ‘test$’
will set the jobname parameter to test$.
A variable that does not contain a $ sign can be enclosed in single or double quotation marks. A
variable that does contain a $ sign should be enclosed in single quotation marks. A variable containing
a $ sign cannot be resolved if it is enclosed in double quotation marks.
Condition dates are specified in mmdd format. Time is specified in hhmm format.
On computers that support Disk Clustering, the -hostgrp parameter is required (including either a host
group name, or the virtual name of the Control-M/Agent).
A parameter requiring more than one entry can be repeated as needed:
• If a job is dependent upon several prerequisite conditions, specify a separate -incond parameter
for each prerequisite condition.
• If a job can run only in January and July, specify a separate -month parameter for each month.
(For example, -month ALL N -month JAN Y -month JUL Y.)
• If a job should run every month except July, specify -month ALL Y and -month JUL N.
• If a job is in a SMART Folder and is scheduled according to the FIRSTDAY and SALARY1
Rule-Based Calendars, specify –RBC FIRSTDAY –RBC SALARY1.
The default for the -month parameter is ALL Y, which means that if you want to define a job that
should run only in one specific month, you must first indicate that it should not run on any month. For
example: -month ALL N -month NOV Y
An -on parameter must be followed by at least one -do parameter.
Additional post-processing conditions can be set by using -on <statement> <code>.
EXAMPLE: On statement: *
Code: RUNCOUNT>4
Do Shout: To: Control-M/EM
Text: "Job ran more than four times"
211
Control-M Utilities Guide
-do parameters are dependent upon the last -on parameter preceding them.
The order of parameters does not affect the outcome of the job, with the exception of -on and -do...
parameters.
All fields of each parameter (as specified in the syntax section) must contain values. If no value is
required for a parameter field, a null string "" must be specified in the relevant position in the
parameter specification.
EXAMPLE: The -domail parameter has the following syntax:
-domail <destination> <cc> <severity> <subject> <message>
EXAMPLE: To specify this command without a value for the cc field, include a null string in the
appropriate location. For example:
-domail [email protected] "" R "subject line" "My message"
Normally, when a -dorerun parameter is implemented, the current run of the job ends with NOTOK
status. To ensure that the job will have an OK status, even though it is rerun, specify a -dook
parameter immediately after the -dorerun parameter.
The -dorerun parameter cannot be specified for a cyclic job.
When using -doforcejob to force an entire folder, <job name> must be specified as a blank enclosed
in quotation marks (that is, " ").
IN condition statements that use complex boolean logic can be specified.
For more information, see the description of the In Condition parameter in Control-M Parameters.
When ctmdefine is invoked from a script: To use the **** option for a -incond date parameter,
specify this parameter as "****"
-incond pk_oly_ok "****"
When the UNIX symbol ~ is used in a -memlib, -override path, or -doclib parameter to represent the
user’s home directory, the entire parameter should be enclosed in double quotation marks, which
ensures that the ~ will be translated by the agent before submission, and not by Control-M/Server
before transmission to the agent computer.
-memlib "~/controlm/scripts/"
A maximum of 99 prerequisite conditions can be specified for docond parameters.
Condition names using both open and closed square brackets ([ and ]) must be enclosed in quotation
marks (for example, "RATE[A1]").
The following special characters are disabled when they occur in prerequisite condition names:
• ( open parenthesis
• ) close parenthesis
• | vertical bar
• space
212
Control-M Utilities Guide
The -shift parameter has been extended to four characters (xyyy). The first character (x) indicates
how to shift scheduling of the job if the original scheduling day of the job is not a working day in the
CONFCAL calendar. Valid values are:
• "" (Blank) – No shifting occurs. The job is not scheduled. Default.
• > – Job scheduling is shifted to the next working day in the CONFCAL calendar. Additional
shifting may be performed, depending on the yyy value, described below.
• < – Job scheduling is shifted to the previous working day in the CONFCAL calendar. Additional
shifting may or may not be performed, depending on the yyy value, described below.
• @ – Tentatively schedule the job for the current day, even if the current day is not a working
day in the CONFCAL calendar. Additional shifting may or may not be performed, depending on the
yyy value, described below.
The remaining three characters (yyy) shift scheduling of the job forward or backward the specified
number of working days, as defined in the CONFCAL calendar. Valid values are:
o Blank - no shifting occurs
o -nn or +nn shifts the job forward or backward nn working days in the CONFCAL calendar. nn
can be any value from 0 to 62.
NOTE:
If the result of shifting by yyy days is a day that is not allowed (-n was entered for that day in the
DAYS parameter), the job is shifted to the next working day (for a forward shift), or to the
previous working day (for a backward shift).
If the original scheduling day of the job is a working day in the CONFCAL calendar, the x value is
ignored and the yyy value determines when the job is scheduled.
If the original scheduling day of the job is not a working day in the CONFCAL calendar, job
scheduling is shifted according to the x value and then shifted again according to the yyy value (if
specified) to determine when the job is scheduled.
If the original scheduling day of the job is not a working day in the CONFCAL calendar, and no
value (blank) is specified for the x value, the job is not scheduled, and the yyy value (if specified)
is ignored.
Confcal and Shift parameters are applied to a scheduling date only if that date already satisfies
the Basic Scheduling criteria as specified in the Days, Months, Dates, and Weekdays parameters.
For more information on the parameters for the ctmdefine utility, see ctmdefine parameters (on page
207).
ctmdefine examples
The following command contains the minimum parameters required to define a job:
ctmdefine -folder cmmnds -jobname cmls13 \
-tasktype command -sub_application em -application test \
-date 0101 -cmdline "ls -l /etc/passwd"
You can get the same result by using the -input_file parameter as follows:
ctmdefine -input_file ~<controlm_owner>/ctm_server/data/ctmdefine_cmmnds.txt
213
Control-M Utilities Guide
214
Control-M Utilities Guide
ctmexdef
The ctmexdef utility exports job processing definitions from the Control-M/Server database to a flat
(ASCII) file. This file can then be used as input for either the ctmcreate utility or the ctmdefine utility.
The ctmexdef utility can be used to:
Modify existing job processing definitions in batch mode (together with the ctmdefine utility). The job
processing definitions in the file exported by ctmexdef can be edited offline and then returned to the
Control-M/Server database by using ctmdefine. For more information, see ctmdefine (on page 202).
Creating specific purpose jobs to be inserted in the Active Jobs database based on previously defined
jobs. Together with the ctmcreate utility, the ctmexdef utility can copy and modify job processing
definitions in batch mode that can then be sent directly to the Active Jobs database by using
ctmcreate. See ctmcreate (on page 189) for a complete description of the utility.
To run the ctmexdef utility, see Exporting jobs using the ctmexdef utility (on page 215).
When working on UNIX, the utf8 file stores the script. No translation is performed by the utility when
being read into memory. In Windows, that store the script is native. Translation to utf8 needs to be
performed by either the ctmcreate or ctmdefine when being read into memory.
The output of ctmexdef on Windows cannot be used as input on UNIX installations and the other way
around.
For more information on ctmexdef syntax rules, see ctmexdef syntax rules (on page 216).
215
Control-M Utilities Guide
ctmexdef parameters
The following table lists debug, quiet, and input_file parameters for the ctmexdef utility. All other
parameters (for example, cyclic job parameters) are described in Control-M Parameters.
Parameter Description
-FILE Full path name of the file to contain the exported job specifications. If
this parameter is not specified, the output is routed to the default
output device.
-FOLDER Name of the SMART Folder or of the job. Either the JOBNAME or
FILE_NAME parameter is required.
-WORKING_DIR Contains embedded script files. The name of each file consists of a
SMART Folder name, job name, and time stamp. The embedded script
only appears for jobs that have the in-line script turned on.
216
Control-M Utilities Guide
217
Control-M Utilities Guide
218
Control-M Utilities Guide
ctmfw parameters
The following table lists the ctmfw utility rules file parameters:
Parameter Description
FILE Path of the file to be detected. The file name can include wildcard character * to
represent any number of characters (including no characters) or ? to represent any
one character.
NOTE: The path and file name must not exceed 214 characters.
mode CREATE Detects creation of a file. Default. File size is ignored if the filename
parameter contains wildcards (unless the monitor file size when
wildcard is used parameter is set to Y).
NOTE: If a mask is specified for the filename, and the monitor file size
when wildcard is used parameter is set to:
N, the ctmfw utility will end OK after detection of the first file that
matches the specified mask.
Y, the ctmfw utility will end OK after detection of the first file that
matches the filename and file size.
DELETE Detects deletion of a file. When the ctmfw utility is run in this mode, it
first checks for files that match the specified name. After a specified file
is detected, the ctmfw utility checks at the specified interval for deletion
of that file.
NOTE: If a mask is specified as the filename, the ctmfw utility will end
successfully only after all detected files that match the specified mask
have been deleted.
mode CREATE Detects creation of a file. Default. File size is ignored if the filename
parameter contains wildcards (unless the monitor file size when
wildcard is used parameter is set to Y).
NOTE: If a mask is specified for the filename, and the monitor file size
when wildcard is used parameter is set to:
N, the ctmfw utility will end OK after detection of the first file that
matches the specified mask.
Y, the ctmfw utility will end OK after detection of the first file that
matches the filename and file size.
219
Control-M Utilities Guide
Parameter Description
DELETE Detects deletion of a file. When the ctmfw utility is run in this mode, it
first checks for files that match the specified name. After a specified file
is detected, the ctmfw utility checks at the specified interval for deletion
of that file.
NOTE: If a mask is specified as the filename, the ctmfw utility will end
successfully only after all detected files that match the specified mask
have been deleted.
minimum detected Minimum file size in bytes. This parameter is ignored if the FILE parameter contains
size wildcards (unless the monitor file size when wildcard is used parameter is set to
Y) or if the mode parameter is set to DELETE. Default: 0 (any size detected).
interval between file Interval between successive attempts to detect the existence/deletion of a file (in
searches seconds). Default: 60
interval between Interval between attempts to monitor the size of a file after it is detected (in
filesize comparison seconds). This parameter is ignored when using wildcards in FILE or when using
iterations DELETE mode. Default: 10
number of iterations Number of attempts to monitor file size where the size remains static and greater than
while size is static or equal to minimum detected size (indicating successful creation of the file). This
parameter is ignored when using wildcards in FILE or when using DELETE mode.
Default: 3
time limit for the Maximum time (in minutes) to run the process without detecting the file at its
process minimum size (CREATE) or detecting its deletion (DELETE). If the file is not
detected/deleted in this specified time frame, the process terminates with an error
return code, as described in Return codes (on page 228). Default: 0 (no time limit).
monitor file size Indicates whether file size should be monitored if the filename contains wildcards.
when wildcard is This parameter is ignored if the filename does not contain a wildcard. Valid values:
used
N – do not monitor file size (Default)
Y – monitor the file size
If this parameter is set to Y and more than one file matches the specified mask, the
ctmfw utility selects the first file that is detected, monitors its file size, and ignores all
other matching files.
starting time for Indicates an absolute time at which the utility starts monitoring the file. For example,
detecting files 200712061400, means that at 2 PM on December 6th, 2007 the FileWatcher utility will
start watching the file.
Alternatively, you can use the HHMM format, in which case the current date is used.
220
Control-M Utilities Guide
Parameter Description
absolute stop time Indicates an absolute time at which the file is no longer watched. For example,
200702061400, would mean that at 2 PM on February 6th, 2007 the FileWatcher
utility will stop watching the file.
Alternatively, you can use the HHMM format, in which case the current date is used.
maximal age of file Indicates the maximum amount of time that can pass since the file you want to watch
was last modified. For example, 2y3d5h means that after 2years, 3 days, and 5 hours
has passed, the file will no longer be watched. Entering a value of 2H10Min, means
that after 2 hours and 10 minutes has passed, the file will no longer be detected.
This parameter is ignored if the mode parameter is set to DELETE. Default: 0
minimal age of file Indicates the minimum amount of time that must have passed since the file you want
to watch was last modified. For example, 2y3d5h means that 2years, 3 days, and 5
hours must pass before the file will be watched. Entering a value of 2H10Min, means
that 2 hours and 10 minutes must pass before the file will be detected.
This parameter is ignored if the mode parameter is set to DELETE. Default: 0
221
Control-M Utilities Guide
Parameter Description
CYCLIC_INTERVAL Indicates the interval between multiple operations of detecting the file (in minutes).
This interval must be greater than the value for WAIT_TIME. If the cyclic_interval is
0, only one attempt to detect the file will be performed. Default: 0
FROM_TIME Starting time for detecting all the files (default FROM_TIME). Used with WAIT_TIME
to identify the time frame for detecting and monitoring the files. This parameter is
expressed in 24-hour, hhmm format. Default: 0000 or Now
INTERVAL Sleep interval (in seconds) between successive scans for all the files. This parameter
replaces individual sleep_int and mon_int parameters for each file. Default: 10
MAX_AGE Indicates the maximum amount of time that can pass since the file you want to
watch was last modified.
If MAX_AGE = 0, any change to the file timestamp means that the condition is
met.
IF MAX_AGE = 10 Min and if the amount of time of the watched file that has
passed is less than 10 minutes, then the condition is met.
This parameter is ignored if the mode parameter is set to DELETE.
Default: 0
MIN_AGE Indicates the minimum amount of time that must have passed since the file you
want to watch was last modified. For example, 2y3d5h means that 2years, 3 days,
and 5 hours must pass before the file will be watched.
This parameter is ignored if the mode parameter is set to DELETE. Default: 0
MIN_SIZE Minimum file size in bytes. This parameter is ignored if the FILE parameter contains
wildcards (unless the monitor file size when wildcard is used parameter is set to Y)
or if the mode parameter is set to DELETE. Default: 0 (any size detected).
MON_SIZE_ Indicates whether file size should be monitored if the filename contains wildcards.
WILDCARD This parameter is ignored if the filename does not contain a wildcard.
Valid values:
N – do not monitor file size (Default)
Y – monitor the file size
If this parameter is set to Y and more than one file matches the specified mask, the
ctmfw utility randomly selects one matching file, monitors its file size, and ignores all
other matching files.
222
Control-M Utilities Guide
Parameter Description
STOP_TIME Indicates an absolute time at which the file is no longer watched. For example,
200702061400, means that at 2 PM on February 6th, 2007 the FileWatcher utility will
stop watching the file.
You can also use the HHMM format, which uses the current date, plus the HHMM
entered. Default: 0 (meaning, no stop time)
NOTE: STOP_TIME can only be used as a global parameter.
WAIT_TIME Maximum time (in minutes) to run the process without detecting the file at its
minimum size (CREATE) or detecting its deletion (DELETE). If the file is not
detected/deleted in this specified time frame, the process terminates with an error
return code, as described in ctmfw- return codes table below.. Default: 0 (no time
limit).
223
Control-M Utilities Guide
224
Control-M Utilities Guide
EXAMPLE:
INTERVAL 10
ON_FILEWATCH /controlm/datafile*.txt CREATE
THEN
DO_COND %FILENAME% 0101 +
NOTE: All global parameters must be delimited by the new line character.
225
Control-M Utilities Guide
Action Description
DO_EXIT [exit code] Terminate ctmfw with the user-defined exit code.
NOTE: If the file is detected and the size remains static within the time frame (CREATE) or the file has
been deleted (DELETE), the DO commands in the THEN block are executed. If the file is not detected or
deleted within the time frame, the statements following the ELSE block are executed. ctmfw terminates
when all the files in the Rules file have been processed.
If an ON_FILEWATCH statement contains a cyclic_interval parameter, ctmfw will only stop monitoring a
file on a DO_OK or DO_NOTOK action.
226
Control-M Utilities Guide
Parameter Value
Run as <control_m_user>
On Statement/Code processing:
Stmt *
Code COMPSTAT=0
Stmt *
Code COMPSTAT=1
227
Control-M Utilities Guide
Return codes
The return codes listed in the following table are issued by the ctmfw utility after detecting if a file is
created or deleted in the specified time frame.
7 Indicates that the ctmfw request timed out. That is, the file was not
detected in the specified time frame.
ctmimptb
The ctmimptb utility imports folders (including SMART Folders and Rule-Based Calendars) containing job
definitions that were exported from Control-M/EM by the exportdeffolder utility. To run the ctmimptb
utility, see Importing folders using the ctmimptb utility (on page 229).
The ctmimptb utility gets the exported XML file that was created by exportdeffolder (on page 298) in
Control-M/EM, and imports the folders into the Control-M/Server database. This utility can overwrite
existing folders when overwrite mode is specified.
The ctmimptb utility works at the folder level only and cannot import a specific job or jobs from a folder.
The utility can import Sub-folder entities and Sub-folders jobs, but cannot import Sub-folders individually.
The Sub-folders must be imported as part of SMART folders.
The Control-M/EM exportdeffolder utility cannot define an empty folder. Therefore, the ctmimptb utility
cannot perform an action that will cause folders to become empty. If you duplicate SMART Folders in the
XML input file, when overwrite mode is specified, the last SMART Folder is considered and overwrite mode
is not specified and the SMART Folder does not exist in the database, the first defined SMART Folder is
considered.
228
Control-M Utilities Guide
When a job definition folder in the input XML file is large, importing this folder is performed by a few
transactions. The number of jobs within each transaction is specified by the CTMIMPTB_ENT_IN_TRANS
parameter that is defined in the
~controlm/ctm_server/data/config.dat file. If the CTMIMPTB_ENT_IN_TRANS parameter is not
specified in the config.dat file. The value range is 5–10,000 jobs and the default value 1,000 jobs.
The following describes the results of the import procedure:
In the event of a successful import, the utility exits with a success return value. If the utility was
invoked without overwrite mode and the utility encounters rejected folders during the import process,
an appropriate message is issued for the partial import.
In the event of a failure, the utility exits with an error return value and a partial import might occur. If
a commit was already made, an appropriate message is issued for the partial import.
The ctmimptb utility is run by using the Control-M/Server security authorization of the invoking user.
The permissions that are required to run the ctmimptb utility on Control-M/Server SMART Folders are
Read, Write, and Delete.
If permission is denied for a specific SMART Folder, the ctmimptb utility ignores the folder, continues
processing the input XML file, and (if no other errors are encountered) exits with a success return value.
BMC recommends that you avoid updating job definition folders while the ctmimptb utility is running.
229
Control-M Utilities Guide
ctmimptb parameters
The following table lists the ctmpimptb utility parameters:
Parameter Description
-PATH Indicates the full path to the file that holds the job definition folders
to be imported. This file is in XML and is generated by the
exportdeffolder utility in Control-M/EM.
-OVERWRITE determines how the utility responds when a folder that already exists
in Control-M/Server is imported:
When this parameter is specified, the current folder in the
Control-M/Server database is replaced with the imported folder,
and a message similar to the following message is issued:
"Schedule folder already exists in the database and overwrite was
specified. Overwriting this folder"
When this parameter is not specified, the imported folder is
rejected, leaving the current folder in the Control-M/Server
database unchanged, and a message similar to the following
message is issued:
"Schedule folder already exists in the database and overwrite was
not specified. Skip importing this folder."
After either using the imported folder to replace the current folder in
the Control-M/Server database or rejecting the imported folder, the
ctmimptb utility continues processing the file.
230
Control-M Utilities Guide
ctmkilljob
The ctmkilljob utility terminates a specified Control-M job and all its processes. ctmkilljob terminates only
jobs that are currently executing. This utility can only be run interactively. To run the utility, see Ending a
job using the ctmkilljob utility (on page 231).
NOTE: The ctmkilljob utility fails if the agent is upgrading.
The ctmkilljob utility can be invoked using the -input_file parameter:
ctmkilljob -input_file <fullPathFileName>
The referenced file contains all the required parameters. Most of the parameters are described in
Control-M Parameters and ctmkilljob parameters (on page 232).
If the action performed by the ctmkilljob utility was successful, the utility responds with the statement:
Job was killed
The specified job is ended with NOTOK status.
NOTE: The parameters specified for ctmkilljob must indicate one unique job. If more than one job fits the
description specified in the command, you are informed that a unique name must be entered to carry out
the action. Reenter the command with parameters that specify one unique job.
231
Control-M Utilities Guide
ctmkilljob parameters
The following table lists the ctmkilljob utility parameters:
Parameter Description
-FILE_NAME Name of the file that contains the job script statements.
input_file Name and full path of a file containing parameters for the utility. In
this file, each parameter and its values (if any) are on a separate line
with the same syntax they would have on the command line. Using the
-input_file parameter enables you to:
prepare and save files of utility parameters that can be reused.
specify utility input longer than the number of characters allowed in
the command line.
-input_file
~<controlm_owner>/ctm_server/data/ctmkill
job_parms.txt
ctmorder
The ctmorder utility orders or forces one or more jobs from a SMART Folder in the Control-M/Server
database.
NOTE: Ordered jobs are placed in the Active Jobs database if their scheduling criteria are met. Forced
jobs are placed in the Active Jobs database regardless of their scheduling criteria.
To run the ctmorder utility, see Ordering or forcing a job using the ctmorder utility (on page 233).
If two jobs with the same name exist in a SMART Folder and you use the ctmorder utility to order or force
a job with that name, only the first job is added to the Active Jobs database.
NOTE: If the ctmorder utility is running when the New Day procedure begins, it is automatically
suspended until New Day procedure is ended.
When ordering a SMART Folder, folder-level Rule-Based Calendars are calculated and joined so that if the
scheduling criteria are met, the folder will be ordered. As a result of ordering the folder:
232
Control-M Utilities Guide
233
Control-M Utilities Guide
[-FORCE <y|n>]
[-HOLD <y|n>]
[-UNIQUE <y|n>]
[-SEQNO <job sequence number>]
[-INTO_FOLDER_ORDERID <{SMART folder order id}|LAST|ALONE|NEWT]>
[-NODUPLICATION]
[-DEBUG <debug level 0-5> ]
[-QUIET ]
[-VARIABLE <varname> <expression> ]
[-ODATE_OPTION <VALUE_DATE|RUN_DATE>]
-or-
ctmorder -input_file <fullPathToFileName>
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the ctmorder parameters, see ctmorder parameters (on page 235) and ctmorder examples (on page
238).
234
Control-M Utilities Guide
ctmorder parameters
The following table lists the ctmorder utility parameters:
Parameter Description
-FOLDER Either a folder name, SMART folder name (name of the SMART Folder
containing the jobs) or the path (including the folder name) to the
folder. This value might contain wild characters within the folder path.
Wild characters in the outermost folder name are also valid.
-NAME Job name (or mask) of the job(s) to order or force. Mandatory.
You can order a SMART Folder, but you cannot order an individual job,
or selection of jobs, from a SMART Folder.
The job name can include the following wildcard characters:
* — represents any number of characters (or none). Specify * by
itself to include all jobs in the folder.
NOTE: Any parameter including * must be enclosed in double quotation
(see Example below).
? — represents any single character.
$ — represents any single character.
NOTE: Whether the *, ?, and $ characters act as wildcards or as
ordinary characters in a job name is determined by the presence or
absence of a -seqno parameter:
The *, ?, and $ characters will only act as wildcards in the -jobname
parameter if no -seqno parameter is specified.
The *, ?, and $ characters will only act as ordinary characters in the
-jobname parameter if a -seqno parameter is specified. In this case, the
specified job name must exactly match the name of the job in the
indicated sequence, or the job will not be ordered.
-odate Indicates the scheduling date (odate) to be associated with job(s). Valid
values:
235
Control-M Utilities Guide
Parameter Description
-force Add the specified jobs to the Active Jobs database regardless of
scheduling criteria. If -force is not specified, jobs are added to the Active
Jobs database only if their scheduling criteria are satisfied (known as
order). Use -INTO_FOLDER_ORDERID to force a job or sub-folder into a
folder or sub-folder that has already been ordered.
-hold Place the specified jobs in the Active Jobs database in Hold status.
-seqno A counter identifying the row number of the job in the SMART Folder.
The first job in each SMART Folder is numbered 1 and each subsequent
job increments the counter by one. If this parameter is not specified, the
first job in the specified folder is ordered. Optional.
NOTE: If this parameter is specified, any *, ?, and $ characters in the
-jobname parameter are assumed to be ordinary characters rather than
wildcards. Therefore:
Do not specify a -seqno parameter if you are specifying wildcards in the
-jobname parameter.
If you are specifying *, ?, or $ characters as ordinary characters (not
wildcards) in the -jobname, you must specify the appropriate -seqno
parameter (and the specified job name must exactly match the actual
job name).
-INTO_FOLDER_ NOTE: This parameter is relevant only for jobs in a SMART Folder. If the
ORDERID folder being ordered is not a SMART Folder, this parameter is ignored.
236
Control-M Utilities Guide
Parameter Description
NEWT A new folder is created and the specified jobs are ordered
to that SMART Folder. Default.
NOTE: The SMART Folder order id, last, alone and newt options can
only be used when the -force parameter is set to Y.
-noduplication Allow jobs to be ordered and added to an existing ordered SMART Folder
only if those jobs have not already been ordered in that instance of the
SMART Folder.
This parameter can be specified only if last or <SMART Folder order id>
is specified for the -INTO_FOLDER_ORDERID parameter.
NOTE: This parameter is relevant only for jobs in a SMART Folder.
value_date The specified odate is the odate value for the job(s). The
jobs should be run during the current working day.
Default.
NOTE: If a time zone is specified in a job processing
definition, the job is run according to the specified time
zone.
237
Control-M Utilities Guide
Parameter Description
-input_file Name and full path of a file containing parameters for the utility. In this
file, each parameter and its values (if any) are on a separate line with
the same syntax they would have on the command line. Using the
-input_file parameter enables you to:
Prepare and save files of utility parameters that can be reused.
Specify utility input longer than the number of characters allowed in
the command line.
-input_file ~<controlm_run_as
name>/ctm_server/data/ctmorder_parms.txt
NOTE: If neither ORDER nor FORCE is included in the command, the specified jobs are ordered.
ctmorder examples
The following are examples of ctmorder utility:
The following command orders jobs named acct_job contained in SMART Folder ACCT100. Any jobs
placed in the Active Jobs database will have the current Control-M date as their original scheduling date:
ctmorder -FOLDER ACCT100 -NAME acct_job -ODATE odat
The same results can be achieved using the -input_file parameter as follows:
ctmorder -input_file ~<controlm_run_as
name>/ctm_server/data/ctmorder_acct100.txt
The referenced file contains the following lines:
-FOLDER ACCT100
-NAME acct_job
-ODATE odat
The following command orders all jobs contained in the SMART Folder ACCT100 whose job name begins
with ga. Any jobs placed in the Active Jobs database will have the date March 15, 2016 as their original
scheduling date:
238
Control-M Utilities Guide
239
Control-M Utilities Guide
ctmpsm
The ctmpsm utility performs functions affecting jobs or conditions in the active jobs database of the data
center. It provides an alternative to using the Control-M and enables you to perform many of the GUI
functions directly in the data center. To run the ctmpsm utility, see Running the ctmpsm utility
interactively (on page 240). For command line invocation, see ctmpsm utility command line parameters
(on page 250).
The functions in this menu are divided into the following categories:
Active Jobs database functions provide various views of the Active Jobs database. Each view displays
information about the jobs and provides options to perform such actions on the jobs as Hold, Free,
Delete, Rerun, Why, Confirm, View or modify job details, and view the Control-M log.
Resource Map functions enable you to view and modify Quantitative resources, Control resources, and
prerequisite conditions. The first three of these functions activate the ecactltb, ecaqrtab, and
ctmcontb utilities respectively.
Scheduling Functions enable you to order or force SMART Folders or specific jobs in SMART Folders.
You can also generate monthly or yearly scheduling plans using the ctmrpln utility.
NOTE: If long names have been used for the In condition, jobname, override path, file_name, and doclib
parameters, these values will be truncated in the output of the ctmpsm utility. To view the complete
values for these parameters, use Control-M. The following special characters are disabled when they
occur in prerequisite condition names: ( ) | [blanks]
All Active Jobs database options display the following menu at the bottom of the screen:
H) Hold, F) Free, D) Delete, U) Undelete, R) Rerun, W) Why, Z) Details
LO) LogOrd, LJ) LogJob, Cn) Confirm, Sx)Sort[x: 1.ORDERNO 2.JOBNAME]
J) Output A) Statistic V) View Script/JCL K) Force OK I)Dependencies JobsGx)
Global action x [x: H(Hold), F(Free), D(Delete), U(Undelete), R(Rerun)]
Q)Quit
Enter Option:
These actions are described in ctmpsm active jobs database actions (on page 243).
240
Control-M Utilities Guide
NOTE: If you want to invoke the utility through the command line, type ctmpsm -<parameter>. For
more information about the command line parameters, see ctmpsm utility command line parameters
(on page 250).
For the Control-M parameter name, see Parameter name cross references (on page 31).
For more details about the ctmpsm options and actions, see the following:
• ctmpsm active jobs database options (on page 242)
• ctmpsm active jobs database actions (on page 243)
• Resource map options (on page 245)
• Scheduling function options (on page 245)
• ctmpsm folder option output example (on page 246)
• ctmpsm options for scheduling functions (on page 246)
• ctmpsm options in the SMART Folder List Jobs menu (on page 248)
• Values in STATE and STATUS ctmpsm fields (on page 249)
241
Control-M Utilities Guide
1 List All Lists all jobs in the Active Jobs database and indicates if
they are associated with a SMART Folder (TBL) or
Sub-folder (STB).
2 List All Lists all jobs in the Active Jobs database. Indicates which
(Show jobs have started or ended execution.
Started/Ended)
3 List All Lists all jobs in the Active Jobs database. Indicates the
(Show Application) application to which each job belongs.
4 List All Lists all jobs in the Active Jobs database. Indicates the File
(Show File Name) Name for each job.
5 List Jobs That Lists jobs in the Active Jobs database with a completion
Ended OK Ended OK status.
6 List Jobs That Lists jobs in the Active Jobs database that have a
Ended NOTOK completion Ended NOTOK status.
7 List Submitted/ Lists jobs in the Active Jobs database that are currently
Executing Jobs executing.
8 List Cyclic Jobs Lists jobs in the Active Jobs database that are cyclic.
9 List Jobs Waiting for Lists jobs in the Active Jobs database that are waiting to
Time Window begin executing based on their Time From parameter.
10 List Jobs Waiting for Lists jobs in the Active Jobs database that are waiting for
Confirmation confirmation.
41 List SMART Folders Displays a list of all SMART Folders in the Active Jobs
database.
42 List Ordered SMART Displays a list of all ordered SMART Folders in the Active
Folders Jobs database.
242
Control-M Utilities Guide
243
Control-M Utilities Guide
NOTE: The R (Rerun) option and the Global options (GH, GF, GD, GU, and GR) affect only
jobs and not SMART Folders.
244
Control-M Utilities Guide
61 Control Lists Control resources currently used in the Active jobs database.
Resources Activates the ecactltb utility.
72 Order Allows you to order SMART Folders or jobs. You are prompted to
Folders/Job specify:
s
SMART Folder
Job Name (optional)
Odate (YYYYMMDD/ODAT)
Odate_option (VALUE_DATE|RUN_DATE) [VALUE_DATE]
Hold Option (Y|N)
For more information about ordering jobs and SMART Folders, see
ctmorder (on page 232)
245
Control-M Utilities Guide
A Add Adds a Order method to an existed folder. When selected, you are
prompted for the Folder name and Order method name.
246
Control-M Utilities Guide
F# Force folder Forces a specific Folder (for example, specify F6 to force folder
# RE_OUTPUT).
The following prompt is displayed:
Odate (YYYYMMDD/ODAT) [ODAT]:
Enter the odate for the job to be forced in YYYYMMDD format, or
enter the value ODAT to indicate that the job should use the current
working date as its odate.
The following prompt is displayed:
ODATE option (VALUE_DATE|RUN_DATE) [VALUE_DATE]:
To run jobs now with the specified odate, specify, VALUE_DATE
To wait until the specified odate begins before running the jobs,
specify RUN_DATE.
If the specified folder is a SMART Folder, the following prompt is
displayed:
Please choose one of the following:
A) Alone.
N) New sub application.
L) Last.
B) Bind to existing group Orderno.
These options are described below:
A – Forces each job in the folder separately as a non-sub
application job.
N – Forces the jobs in the folder as a new sub application in the
Active Jobs database.
L – Forces the jobs in the folder, and adds them to the most
recently ordered sub application in the Active Jobs database.
B – Forces the jobs in the folder, and adds them to a specified
application in the Active Jobs database.
J# List jobs # Lists content of a folder and provides options to force a specific job
or sub-folder or generate a report (for example, specify J1 to list the
jobs in folder supply).
R Remove Deletes a specific Folder and all its associated jobs (for example,
Folder specify R RE_OUTPUT to delete folder RE_OUTPUT).
247
Control-M Utilities Guide
U# Update Updates the Order method name for a specific Folder (for example,
folder # specify U6 to update the Order method name for folder
RE_OUTPUT).
F# Force job # Forces a specific job (for example, specify F2 to force job
DAYS_30_FEB).
M# Month Schedule Generates a monthly Job Order report for the folder. You are
Plan prompted to enter the year and month in format YYYYMM.
Y# Year Schedule Generates a yearly Job Order report for a specific job. You are
Plan for job # prompted to enter the year in format YYYY.
248
Control-M Utilities Guide
Value Description
STATUSES
STATES
Wait Host The host(s) to which the job is being submitted is unavailable, either
because of host's restriction, or because of network availability.
Wait Workload One or more of the workloads with which the job is associated has
reached its maximum jobs limit policy.
Submitted The job was submitted (that is, the job was sent to an agent).
Post proc The job has performed its post processing activities.
249
Control-M Utilities Guide
Value Description
Parameter Description
CHILD Lists dependent jobs with IN conditions that are created by the job whose order ID is
specified in this command.
ctmpsm -CHILD <order_ID> [<tasktype>]
250
Control-M Utilities Guide
Parameter Description
LISTCAL Lists available calendars. The list can be restricted by calendar name and year.
ctmpsm -LISTCAL [<calendar name>][<calendar year>]
<calendar name> Restricts the list to calendars with the specified name or prefix
(indicated by * at the end).
<calendar year> Restricts the list to calendars for the specified year.
251
Control-M Utilities Guide
Parameter Description
LISTALL Lists jobs in the Active Jobs database. The list can be filtered by time, application, and
member name. The list can be sorted by order ID or job name.
ctmpsm -LISTALL
[<ODAT|TIME|APPLICATION|FILENAME|ALL|ALLFIELDS_ALLFIELDS_FUL
L]
[-SORT {ORDERID|JOBNAME>]
In addition to the order ID and the job name, one of the following fields must also be
included in the LISTALL output:
ODAT: Order date.
TIME: Time execution started and ended.
APPLICATION: Application to which the job belongs.
FILENAME: File name for the job.
ALL: – Includes ODAT, FROMTIME and UNTIL fields.
ALLFIELDS: Includes ODAT, FILENAME, and APPLICATION fields.
ALLFIELDS_FULL: Includes ODAT,FILENAME, APPLICATION fields and full size for
the JOBNAME column.
–SORT: Indicates the order in which the jobs should be listed. Valid values:
ORDERID and JOBNAME.
Note for other job statuses:
The following additional job statuses are visible only when using the LISTALL option:
WAIT_ODAT The Job’s Odate is later than the Control-M/Server working date for
the relevant timezone. The job is waiting for the relevant day (Odate) to begin.
POST_ODAT The job’s Odate is earlier than the Control-M/Server working date
for the relevant timezone. The job will be deleted during the next run of the New
Day procedure.
These job statuses are used in the Control-M/Server Active Jobs database. However,
in Control-M/EM, jobs with these statuses will appear with Wait Condition status. In
non-interactive mode, WAIT_Condition and WAIT_CONFIRM are both displayed as
Wait Con.
252
Control-M Utilities Guide
Parameter Description
LISTJOB Lists jobs that are cyclic, as well as jobs in the Active Jobs database with a specified
status. Jobs can be filtered by status: OK, NOTOK, executing, waiting for the end of a
time interval, waiting for confirmation.
ctmpsm -LISTJOB
<OK|NOTOK|EXECUTING|CYCLIC| WAITTIME|WAITCONFIRM}
[-SORT {ORDERID|JOBNAME>]
OK: Jobs with a completion Ended OK status.
NOTOK: Jobs with a completion Ended NOTOK status.
EXECUTING: Jobs that are currently executing.
CYCLIC: Jobs that are cyclic.
WAITTIME: Jobs waiting to begin executing based on the time specified in their
Time From parameter.
WAITCONFIRM: Jobs waiting for confirmation.
–SORT: Indicates the order in which the jobs should be listed. Valid values:
ORDERID and JOBNAME.
LISTSUB_APPLICATI Lists jobs in the specified Sub Application that are associated with a Specified
ON Application.
ctmpsm -LISTSUB_APPLICATION <application> <sub application>>
[<scheduling date>]
Wildcard characters can be used as part of the specified application or sub-application
names, as follows:
* represents any number of characters.
? represents any single character.
LISTAJFFLD Lists jobs in the Active Jobs database that were ordered from the specified SMART
Folder.
ctmpsm -LISTAJFFLD <folder name>
Wildcard characters can be used as part of the specified application or sub-application
names, as follows:
* represents any number of characters.
? represents any single character.
FOLDER Lists SMART Folders and jobs defined in the Control-M/Server database, and allows
you to add or delete SMART Folders.
ctmpsm -FOLDER
<LISTFOLDER <folder name>|-UPDATE <row number> <udaily name>|
253
Control-M Utilities Guide
Parameter Description
-ADD <folder name> <udaily name>|-DUDAILY <row number>|
-REMOVE <folder name>|-LISTJOBS <row number> [FULL]
-LISTFOLDER Lists all instances of SMART Folders that match the specified
name or mask. For example, if a SMART Folder is ordered by two
different user dailies, that folder will appear twice in the output of
this option.
Wildcards can used as part of the folder name for this option.
* Represents any number of characters.
? Represents any single character.
-UPDATE Updates the User Daily name for a specific SMART Folder.
-ADD Adds a User Daily to an existing folder. The Folder name and
Order method name must be specified when this option is used.
LISTOUTPUT List the OUTPUTs for an order ID. The list can be restricted by runcount number.
ctmpsm -LISTOUTPUT <orderID> [OUTPUTNUMBER {<number>|ALL}]
These parameters are described below.
To define a viewer to which the display of the OUTPUT of a job is redirected, specify
the CTMPSM_VIEWER parameter in the
~<controlm_owner>/ctm_server/data/config.dat file. For more information
about the CTMPSM_VIEWER parameter, see System configuration.
order_ID: Identifies the job whose OUTPUTs are listed.
number: Restricts the list to the OUTPUT whose runcount is specified. If ALL is
specified, the output will contain only a list of all OUTPUTs related to the specified
order ID.
254
Control-M Utilities Guide
Parameter Description
LISTDETAILS Lists the details of the job associated with the specified order ID.
LISTDETAILS <orderID>
LISTFULLDETAILS Lists the parameters of a specified job in the Active Jobs database. In addition to the
data provided by LISTDETAILS (above), LISTFULLDETAILS provides data about In
conditions, Out conditions, and Variable values. (LISTFULLDETAILS was added for use
with the "Zoom and Save" option in WebAccess.)
ctmpsm -LISTFULLDETAILS <orderID>
UPDATEAJF Performs a specified command or updates conditions for a job in the Active Jobs
database that is associated with a specified order ID.
ctmpsm -UPDATEAJF <orderID> <command>
command is one of the following:
HOLD _ Set the status of a job to HELD.
FREE _ Free a previously held job.
DELETE _ Mark a job for deletion.
NOTE: Jobs with Executing or Submitted status cannot be deleted.
UNDELETE _ Undelete a job marked for deletion.
RERUN _ Rerun a job.
CONFIRM _ Confirm submission of a job.
SET TO OK _ Set the status a job to be OK.
NOTE: SET TO OK can only be applied to inactive jobs (that is, jobs that are not
running).
STATISTICS – Display a job’s statistics.
CONDADDIN <cond> <date> <AND|OR> _ Add the specified IN condition with
the specified date reference. You can include one or more additional IN conditions
by using the AND or OR conjunctional parameter.
CONDADDOUT <cond> <date> <+|-> _ Add the specified OUT condition with
the specified date reference. Use + to indicate that the condition must be
present. Use - to indicate that the condition must not be present.
CONDDELIN <cond> _ Delete the specified IN condition.
CONDDELOUT <cond> _ Delete the specified OUT condition.
NOTE: Conditions specified using this mode apply only to the specified instance
of the job in the Active Jobs database. Subsequent orders of that job are not
affected.
255
Control-M Utilities Guide
Parameter Description
UPDATESUBAPPLICA Applies a specified command to jobs in the specified Sub Application that are
TION associated with the specified Application.
ctmpsm -UPDATESUB_APPLICATION <application> <sub application> <command>
<command> is one of the following:
HOLD _ Set the status of a job to HELD.
FREE _ Free previously held jobs.
DELETE _ Mark the jobs for deletion.
UNDELETE _ Undelete the jobs marked for deletion.
CONFIRM _ Confirm submission of the jobs.
UPDATEFOLDER Applies a specified command to jobs in the Active Jobs database that were ordered
from the specified folder.
ctmpsm -UPDATEFOLDER <folder> <command>
<command> is one of the following:
HOLD _ Set the status of a job to HELD.
FREE _ Free previously held jobs.
DELETE _ Mark the jobs for deletion.
UNDELETE _ Undelete the jobs marked for deletion.
RERUN _ Rerun the jobs.
CONFIRM _ Confirm submission of the jobs.
256
Control-M Utilities Guide
Parameter Description
XML Lists jobs in the Active Jobs database in XML format. The job output formats can be
changed according to the specified parameter, such as order date, time, application,
or member name can be added to the output.
ctmpsm -XML [{ODAT|TIME|APPLICATION|MEMNAME|ALL|ALLFIELDS}]
[-SORT <ORDERID|JOBNAME>]
To list jobs in the Active Jobs database in XML format, specify ctmpsm -XML plus at
least one of the following fields:
ODAT: Order date.
TIME: Time execution started and ended.
APPLICATION: Application to which the job belongs.
FILENAME: File name for the job.
ALL: Includes ODAT and TIME fields.
ALLFIELDS: Includes ODAT, FILENAME, and APPLICATION fields.
In addition, you can specify the following:
–SORT indicates the order in which the jobs should be listed.
Valid values: ORDERID and JOBNAME.
EXAMPLE: To change the output format in the Active Jobs database according to the
file name of the job, specify the following:
ctmpsm -XML FILENAME
EXAMPLE: To sort the list in Example 1 above according to job name, specify the
following:
ctmpsm -XML FILENAME -SORT JOBNAME
EXAMPLE: To display the most recent OUTPUT of the job whose order ID is 1234, specify the following
command:
ctmpsm -listoutput 1234
EXAMPLE: To display the second OUTPUT of the job whose order ID is 1234, specify the
following command:
ctmpsm -listoutput 1234 -outputnumber 2
257
Control-M Utilities Guide
ctmsweep
The ctmsweep utility deletes job definitions from the Control-M/Server database that become obsolete
due to the Start date (Active From Date) and End date (Active To Date) parameters in the job definitions.
To run the ctmsweep utility, see Running the ctmsweep utility (on page 258).
In a typical production situation, you can use ctmsweep as follows:
Run the ctmsweep utility with the –Test parameter to generate the sweep_obsolete.txt file, which
is essentially a report listing the obsolete jobs and folders.
Check the sweep_obsolete.txt file and decide if you want to delete the jobs and folders that are
displayed in the report.
Activate the ctmsweep utility without the –Test parameter to delete the obsolete jobs and folders
from the Control-M/Server database.
If the utility failed or partially succeeded, check the U_CTMSWEEP.<PID>.log file for the reason for
the failure. Perform the necessary corrections. Activate the ctmsweep utility again to delete the obsolete
folders and jobs that were not deleted successfully in the previous run.
NOTE: Avoid updating job or folder definitions when the ctmsweep utility is running.
The ctmsweep utility can be invoked using the -input_file parameter:
ctmsweep -input_file <fullPathFileName>
The referenced file contains all the required parameters. Most of the parameters are described in
Control-M Parameters and ctmsweep parameters (on page 259).
258
Control-M Utilities Guide
ctmsweep parameters
The following table lists the ctmsweep utility parameters.
Parameter Description
-Test Causes the ctmsweep utility to scan all job definitions and generate the
sweep_obsolete.txt file, which consists of a report of the current
obsolete jobs and folders, without actually deleting the jobs
259
Control-M Utilities Guide
Utility reports
The following table lists the files created by the ctmsweep utility for each obsolete folder or job that is
deleted:
Report formats
The report for obsolete jobs has the following format:
Obsolete folders/jobs [on 03/18/2016 09:56:32] for date: 20100316
Command Folder/Job No File Name Name Folder Name
The report is relevant for jobs, Sub-folders and SMART Folders.
Only the most recent version of the sweep_obsolete.txt report is saved.
Return
code Description
1 Failure
Run the ctmsweep utility again.
260
Control-M Utilities Guide
261
Control-M Utilities Guide
NOTE: To delete obsolete folders or jobs, you need both Delete and Update permissions for the specific
folder. If permission is denied for a specific folder, the ctmsweep utility ignores the folder, continues
processing other folders in the database, and (if no other errors are encountered) exits with a success
return value.
ctmwhy
The ctmwhy utility displays a report stating why a SMART Folder, Sub-folder, or job waiting in the Active
Jobs database is not being submitted for execution. This utility is equivalent to the Why option available
when right-clicking a SMART Folder, Sub-folder, or job in the Tree View pane of the Control-M/EM
window. To run the ctmwhy utility, see Running the ctmwhy utility (on page 263).
The ctmwhy utility can be invoked using the -input_file parameter:
ctmwhy -input_file <fullPathFileName>
The referenced file contains all the required parameters. Most of the parameters are described in
Control-M Parameters.
262
Control-M Utilities Guide
ctmwhy example
Specify the following command to determine why the job with Order ID A4X is not being submitted for
execution:
ctmwhy A4X
A typical response might be QR: ‘TAPE4’ : needed 2. None reserved. This response indicates
that the job is not being submitted because it requires two of the Quantitative resource
TAPE4 and none is available.
Specify the following command to determine why the job with Order ID 11 is not being submitted for
execution. The Order ID in this example is expressed as a base 10 number:
ctmwhy "*37"
Control-M/Agent utilities
This table lists the Control-M/Agent utilities that are used for definition, ordering, and monitoring.
_exit (on page 264) (Windows only) Sets the completion status for a job
that runs from a .bat file.
_sleep (on page 264) (Windows only) The _sleep utility is similar to the sleep
built-in shell function in UNIX.
263
Control-M Utilities Guide
_exit
(Windows only) Sets the completion status for a job that runs from a .bat file.
The _exit utility is similar to the exit built-in shell function in UNIX.
To run the _exit utility, see Running the _exit utility (on page 264).
_sleep
(Windows only) Sets the sleep time for Control-M/Server processes.
The _sleep utility is similar to the sleep built-in shell function in UNIX.
To run the _sleep utility, see Running the _sleep utility (on page 264).
264
4
4
Folders and Calendars utilities
The folders and calendars utilities are used to folder, SMART folder, and Calendar definitions. You can use
the Folder Manager, Job Properties team, and Folder Properties team in Control-M and
Control-M/Enterprise Manager (Control-M/EM) for the same tasks. However, if you perform these tasks by
including a utility command in the command line of a job processing definition, you can run the utility at a
predetermined time or under a predetermined set of conditions without being present.
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
The following table describes the utilities for various utilities for folders and calendars definitions.
Utility Description
Control-M/EM
emdef utility for Creates various modifications to folder and calendar definitions in the
folders and Control-M/EM database.
calendars (on
page 266)
Control-M/Server
ctmcalc_date Calculate the date a job can be ordered, after adding or deducting a
(on page 315) specified number of days.
ctmrpln (on Creates a report that lists jobs in a folder and when they are scheduled to
page 324) run.
265
Control-M Utilities Guide
Parameter Description
copydefcal (on page 266) Creates a new calendar definition in the Control-M/EM
database identical to an existing calendar definition.
defcal (on page 270) Imports a calendar definition into the Control-M database.
deffolder (on page 277) Imports Folders and SMART Folders into the Control-M/EM
database
exportdefcal (on page 292) Exports calendar definitions in the Control-M/EM database to
an output file for use as input to other utilities.
exportdeffolder (on page Exports folders from the Control-M/EM database to a text
298) file.
updatedef (on page 124) Modifies jobs, folders, and group attributes.
The emdef utility manages Rule-Base Calendars similar to other calendar types. The Rule-Base Calendar
parameters are specified in the arguments file.
For emdef job utilities, see emdef utility for jobs (on page 42).
copydefcal
The copydefcal utility creates a new calendar definition in the Control-M/EM database identical to an
existing calendar definition. Calendars can be copied and saved under different names in the same data
center. Calendars in one data center can be copied to a different data center and saved under the same
or different names. To copy existing calendar definitions using the copydefcal utility, see Copying an
existing calendar using the copydefcal utility (on page 267).
Multiple calendars can be selected and copied using the * wildcard character. For an explanation of how
wildcards function in XML-based utilities, see Terminology.
When copydefcal is invoked, a file of arguments that you created is processed. This arguments file
contains statements that specify an existing calendar or group of calendars. The specified calendars are
exported to an output file. copydefcal reads arguments directly from a plain text arguments file (in XML
format) instead of reading them from the command line. For more information, see copydefcal arguments
file rules (on page 267).
266
Control-M Utilities Guide
267
Control-M Utilities Guide
If you choose to specify a parameter, the FROM subparameter is mandatory, and the TO
subparameter is optional.
When a FROM value is specified without a TO value, it is used as a filter criterion.
When a TO value is included, it indicates the new value with which the parameter is updated.
Multiple values can be specified for TO and FROM by using the * wildcard character. For an
explanation of how wildcards function in the XML-based utilities, see Wildcards (on page 39).
If any FROM value contains *, and the corresponding TO value contains *, the * in the TO value
expresses the same information as the * in the FROM value.
The TO attribute of the DATACENTER parameter must be used to import the copied calendar into a
different data center if the copy has the same name as the original calendar (the TO attribute is not
used with the CALENDAR parameter). Otherwise, the calendar copy overwrites the original in the
same data center.
For more information on the arguments file parameters for the copydefcal utility, see copydefcal
arguments file parameters (on page 268) and copydefcal arguments file examples (on page 269).
Parameter Description
The first two lines of the XML request file for this API request contain information that specifies the version
of XML, the text encoding format being used, and the location of the .dtd file.
COPYCAL These tags indicate the start and end of the COPYCAL argument. Only criteria that are
located between the tags are considered to be part of the argument.
FROM: Data center in which the source calendar is located. String. Mandatory.
FROM: Defines the name of the calendar from which a copy is made. String. Mandatory.
TO: Defines the name of the calendar copy. The copy retains the name of the original
calendar if this attribute is not used. String. Optional.
268
Control-M Utilities Guide
Copy multiple calendars from the same data center XML file example
In the copydefcal XML file, all calendars in the EM5NYC data center with names beginning with the letter
A are copied to the EM7NYC data center. The new calendar names are calendarname_COPY (for
example, the copy of the Alljobs calendar is named Alljobs_COPY).
<COPYCAL>
<DATACENTER FROM="EM5NYC" TO="EM7NYC"/>
<CALENDAR FROM="A*" TO="A*_COPY"/>
</COPYCAL>
269
Control-M Utilities Guide
defcal
The defcal utility imports a calendar definition into the Control-M/EM database.
defcal reads calendar definitions directly from a plain text input file (in XML format) instead of reading
them from the command line. To import a calendar definition using the defcal utility, see Importing a
calendar using the defcal utility (on page 270).
270
Control-M Utilities Guide
Parameter Description
The first two lines of the XML request file for this API request contain information that
specifies the version of XML, the text encoding format being used, and the location of
the .dtd file.
CALENDAR Indicates the opening and closing tags of a single calendar definition.
The parameters of the job are listed between the tags.
<CALENDAR DATACENTER="EM5A" NAME="AcctJob1"
TYPE="Relative"></CALENDAR>
271
Control-M Utilities Guide
Parameter Description
272
Control-M Utilities Guide
Parameter Description
RULE_BASED Indicates the opening and closing tags of a single Rule-Based Calendar
_CALENDAR definition. The parameters of the job are listed between the tags.
<RULE_BASED_CALENDAR DATACENTER="EM5A"
NAME="AcctJob1"></RULE_BASED_CALENDAR>
273
Control-M Utilities Guide
Parameter Description
JAN, FEB, MAR, Months when the job can run. Optional. Not including
APR, MAY, JUN, a month is the same as including a month having the
JUL, AUG, SEP, value 0. Valid values:
OCT, NOV, DEC
0 (Default)
1
274
Control-M Utilities Guide
Parameter Description
275
Control-M Utilities Guide
Import two calendars into different data centers XML file example
Two calendars are imported, each into a different data center, with a single defcal XML file.
<DEFCAL>
<CALENDAR
DATACENTER="EM5NY"
NAME="AcctCal3"
TYPE="Regular">
<YEAR
NAME="2016"
DAYS="YYYYYYYYYYYYYYYYYYNYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYNYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNY
YYYYYYYYYYYYYYYYYYYY"
DESCRIPTION="Calendar for 2016."/>
<CALENDAR
DATACENTER="EM2LA"
NAME="HRCal3"
TYPE="Regular">
<YEAR
NAME="2016"
DAYS="YYYYYYYYYYYYYYYYNNNYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYNNNNNYYYYYYYYYYYYYYYYNNNYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYNNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYNYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNNNY
YYYYYYYYYYYYYYYYYNNN"
DESCRIPTION="Calendar for 2016."/>
</CALENDAR>
</DEFCAL>
276
Control-M Utilities Guide
deffolder
The deffolder utility imports Folders and SMART Folders into the Control-M/EM database. To run the
deffolder utility, see Running the deffolder utility (on page 277).
When deffolder is invoked, a file of arguments that you have created is processed. This input file contains
statements that specify:
an existing folder or set of folders
an existing SMART Folder or set of SMART Folders.
For more information, see deffolder XML file rules (on page 278). The specified folders are imported into
the Control-M/EM database.
If the folders do not exist in the Control-M/EM database, the utility creates them. If the folders do exist, a
message is issued indicating that the folders already exist (unless the /o switch is specified, in which case
the folders are overwritten – the /o switch is described below).
The deffolder utility reads folder and SMART Folder definitions directly from a plain text arguments file (in
XML format) instead of reading them from the command line.
A single deffolder input file can contain specifications for both folders and SMART Folders.
NOTE: XML is comprised of elements and attributes. Each element can contain attributes and
sub-elements. In the folder that follows, elements are bolded and attributes are italicized.
277
Control-M Utilities Guide
278
Control-M Utilities Guide
Parameter Description
The first two lines of the XML request file for this API request contain information that specifies the version
of XML, the text encoding format being used, and the location of the .xsd file.
DEFFOLDER Indicates to Control-M/EM database the beginning and end of the deffolder
utility. Folder definitions are placed between the opening and closing
DEFFOLDER tags. One or more folders can be specified. Each individual folder
is enclosed by the <FOLDER ENFORCE_VALIDATION><FOLDER> tags.
FOLDER Indicates the closing tags of a single folder definition. In the case of the folder,
the folder parameters consist of parameters that describe the folder directly
and a list of the jobs that are included in the folder. In turn, each of the jobs
that is listed includes all of its own descriptive parameters.
FOLDER_NAME Defines the name of the folder to which the job belongs. String. Mandatory.
NOTE: The following folder parameters must be specified for each folder:
DATACENTER
FOLDER_NAME
FOLDER_DSN (z/OS only)
FOLDER_DSN (z/OS only) Defines the name of the library that contains the folder. String.
Optional.
NOTE: The following folder parameters must be specified for each folder:
DATACENTER
FOLDER_NAME
FOLDER_DSN (z/OS only)
279
Control-M Utilities Guide
Parameter Description
DATACENTER Defines the name of the Control-M installation to which the folder belongs.
String. Mandatory.
NOTE: The following folder parameters must be specified for each folder:
DATACENTER
FOLDER_NAME
FOLDER_DSN (z/OS only)
JOB Opening and closing tags of a single job definition. Parameters of the job are
listed between the tags. For a complete listing of defjob parameters, see defjob
(on page 46).
CYCLIC_ Maximum delay in minutes permitted for a late submission when selecting a
TOLERANCE specific time (for example 5 minutes).
SITE_STANDARD_NAME Defines the name of the site standard that is applied to the folder and all of its
entities. For more information see Site standards management
NOTE: Relevant for Control-M Workload Change Manager only.
BUSINESS_PARAMETER_N Defines the name of the Business Parameter name that is applied to the folder
AME and all of its entities. For more information, see Site standards management
NOTE: Relevant for Control-M Workload Change Manager only.
280
Control-M Utilities Guide
Parameter Description
The first two lines of the XML request file for this API request contain information that specifies the version of
XML, the text encoding format being used, and the location of the .xsd file.
DEFFOLDER Indicates the beginning and end of the deffolder utility. Folder definitions are placed
between the opening and closing DEFFOLDER tags. One or more jobs can be
specified. Each individual job is enclosed by the <SMART_FOLDER
ENFORCE_VALIDATION></SMART_FOLDER> tag.
FOLDER_ORDER_ Defines the New day or User daily name. String. Optional.
METHOD
FOLDER_NAME Defines the name of the SMART Folder to which the job belongs. String. Mandatory.
NOTE:
The following SMART Folder parameters must be specified for each folder:
DATACENTER
FOLDER_NAME
FOLDER_DSN (z/OS only)
DATACENTER Name of the Control-M installation to which the SMART Folder belongs. String.
Mandatory.
NOTE: The following folder parameters must be specified for each folder:
DATACENTER
FOLDER_NAME
FOLDER_DSN (z/OS only)
281
Control-M Utilities Guide
Parameter Description
CYCLIC_TOLERANCE Maximum delay in minutes permitted for a late submission when selecting a specific
time (for example 5 minutes).
CYCLIC_TIMES_SEQUE A list of times, separated by commas (for example 0800,1330,2300), which supports
NCE time synonym (for example 2730).
DAYSKEEPINNOTOK Enables you to specify a minimum period to keep the SMART folder (and jobs) in the
Active Jobs database after the folder is set to NOT OK.
REMOVEATONCE Indicates that all jobs in the folder are not removed automatically from the Active
Jobs database. Instead jobs wait for the folder to complete and are removed at the
same time as the folder. Relevant for all jobs in the SMART folder including jobs that
complete ok. Jobs are not automatically removed, but wait for the folder to
complete.
PARENT_FOLDER Defines the name of the parent folder to which the job's SMART Folder belongs.
String. Mandatory.
FILENAME Name of the file that contains the job script. String. Optional.
APPLICATION Name of the application to which the SMART Folder belongs. Used as a descriptive
name for related groups of SMART Folders. String. Mandatory.
SUB_APPLICATION Name of the group to which the jobs in the SMART Folder are assigned. String.
Mandatory.
RUN_AS Owner (user ID) associated with the SMART Folder. This parameter is used by the
Control-M/Server security mechanism. String. Optional.
ADJUST_COND Indicates whether to ignore prerequisite conditions normally set by predecessor jobs
if the relevant predecessor jobs are not scheduled. This parameter is relevant only
for jobs in a SMART Folder. String. Optional.
282
Control-M Utilities Guide
Parameter Description
CONFIRM Indicates that the SMART Folder must be manually confirmed by the Control-M/EM
user before it runs. Valid values:
0 (No confirmation. Default.)
1 (Requires confirmation.)
TIMEFROM Indicates the earliest time for submitting the SMART Folder. String. Optional.
TIMETO Indicates the latest time for submitting the SMART Folder. String. Optional.
DUE_OUT Time that the jobs in the SMART Folder are expected to finish. String. Optional.
DOCMEM Name of the file containing SMART Folder documentation. String. Optional.
CREATED BY Control-M/EM user who defined the SMART Folder. String. Mandatory.
NOTE: This argument is used by the Control-M security mechanism and, under
certain circumstances, cannot be modified. For more information, see the Security
chapter and the description of the AuthorSecurity system parameter in GUI Server
parameters.
CREATION_USER Name of the user who created the SMART Folder. String. Optional.
CREATION_DATE Date on which the SMART Folder was created. String. Optional.
CREATION_TIME Time at which the SMART Folder was created. String. Optional.
CHANGE_USERID Name of the user who last modified the SMART Folder. String. Optional.
CHANGE_DATE Date on which the SMART Folder was last modified. String. Optional.
CHANGE_TIME Time at which the SMART Folder was last modified. String. Optional.
283
Control-M Utilities Guide
Parameter Description
MULTY_AGENT If set to Y, job submission details are broadcasted to all agents within an Application
Group. The agent with available resources runs the jobs in the SMART Folder.
Optional.
Valid values:
Y - run as a multi-agent job
N - do not run as a multi-agent job. Default.
ACTIVE_FROM (z/OS jobs and SMART Folders, only) Indicates the start of a period of time during
which the job or SMART Folder can be ordered. Optional. Date Format: YYYYMMDD
ACTIVE_TILL (z/OS jobs and SMART Folders, only) Indicates the end of a period of time during
which the job or SMART Folder can be ordered. Optional. Date Format: YYYYMMDD
284
Control-M Utilities Guide
Parameter Description
285
Control-M Utilities Guide
Parameter Description
JAN, FEB, MAR, APR, MAY, JUN, Months when the jobs in the SMART Folder can
JUL, AUG, SEP, OCT, NOV, DEC run. Optional. Valid values:
0 (Default)
1
TAG (SMART Folders only) Collection of scheduling criteria organized unit with a unique
name. Mandatory. This parameter is for backward compatibility.
EXAMPLE: TAG TAG_NAME="tag1" DAYS="1,8,15,23"
DAYS_AND_OR="AND" WEEKDAYS="wcal_3" DATE="18"
DAYSCAL="" CONFCAL="cal_4" RETRO="1" SHIFT="PREVDAY"
SHIFTNUM="5" MAXWAIT="5" MAXRUNS="2" JAN="1"
TAG_NAMES Wrapper for specifying one or more TAGs for the SMART Folder. For backward
compatibility. This parameter is for backward compatibility.
EXAMPLE: TAG_NAMES TAG_NAME="TAG_1"
JOB Indicates the opening and closing tags of a single job definition. The parameters of
the job are listed between the tags. For a complete listing of defjob parameters, see
defjob XML file parameters (on page 49).
SITE_STANDARD_NAM Defines the name of the site standard that is applied to the folder and all of its
E entities. For more information see Site standards management
NOTE: Relevant for Control-M Workload Change Manager only.
BUSINESS_PARAMETE Defines the name of the Business Parameter name that is applied to the folder and
R_NAME all of its entities. For more information, see Site standards management
NOTE: Relevant for Control-M Workload Change Manager only.
286
Control-M Utilities Guide
287
Control-M Utilities Guide
CMDLINE="echo_33"
INTERVAL="00001M"
CYCLIC="1"
TASKTYPE="Command"
CRITICAL="0"
RUN_AS="emuser"
CREATED_BY="emuser"
JOBNAME="OS_Job#1"/>
<JOB PARENT_FOLDER="Folder#2"
CYCLIC_TYPE="C"
CYCLIC_TOLERANCE="0"
USE_INSTREAM_JCL="N"
MULTY_AGENT="N"
APPL_TYPE="OS"
RULE_BASED_CALENDAR_RELATIONSHIP="O"
IND_CYCLIC="S"
SYSDB="1"
SHIFTNUM="+00"
SHIFT="Ignore Job"
DAYS_AND_OR="O"
DEC="1" NOV="1" OCT="1" SEP="1" AUG="1" JUL="1" JUN="1" MAY="1" APR="1" MAR="1"
FEB="1" JAN="1"
DAYS="ALL"
MAXRUNS="0"
MAXDAYS="0"
AUTOARCH="1"
MAXRERUN="0"
MAXWAIT="0"
RETRO="0"
CONFIRM="0"
CMDLINE="echo_30"
INTERVAL="00001M"
CYCLIC="0"
TASKTYPE="Command"
CRITICAL="0"
288
Control-M Utilities Guide
RUN_AS="emuser"
CREATED_BY="emuser"
JOBNAME="OS_Job#3"/>
</FOLDER>
</DEFTABLE>
289
Control-M Utilities Guide
290
Control-M Utilities Guide
TASKTYPE="Command"
CYCLIC="0"
INTERVAL="00001M"
CMDLINE="a"
CONFIRM="0"
RETRO="0"
MAXWAIT="0"
MAXRERUN="0"
AUTOARCH="1"
MAXDAYS="0"
MAXRUNS="0"
DAYS="ALL"
JAN="1"
FEB="1"
MAR="1"
APR="1"
MAY="1"
JUN="1"
JUL="1"
AUG="1"
SEP="1"
OCT="1"
NOV="1"
DEC="1"
DAYS_AND_OR="O"
SHIFT="Ignore Job"
SHIFTNUM="+00"
SYSDB="1"
IND_CYCLIC="S"
CREATION_USER="emuser"
CREATION_DATE="20130728"
CREATION_TIME="215511"
RULE_BASED_CALENDAR_RELATIONSHIP="O"
APPL_TYPE="OS"
MULTY_AGENT="N"
291
Control-M Utilities Guide
USE_INSTREAM_JCL="N"
VERSION_OPCODE="N"
IS_CURRENT_VERSION="Y"
VERSION_SERIAL="1"
VERSION_HOST="BMC-HSD2GV1"
CYCLIC_TOLERANCE="0"
CYCLIC_TYPE="C"
PARENT_FOLDER="rt" />
<ADDITIONAL_FOLDER_DETAILS>
<BUSINESS_PARAMETER NAME="Dept" VALUE="Finance" />
</ADDITIONAL_FOLDER_DETAILS>
</FOLDER>
</DEFTABLE>
exportdefcal
The exportdefcal utility exports calendar definitions in the Control-M/EM database to an output file for use
as input to other utilities. To export calendar definition using the exportdefcal utility, see Exporting
calendar definitions using exportdefcal utility (on page 293).
When the exportdefcal utility is invoked, an arguments file that you prepare is processed. This arguments
file contains statements that specify an existing calendar or group of calendars. The calendars that you
specified in the arguments file are exported to an output file. You can modify the exported calendars in
the output file and re-import them into the Control-M/EM database using the defcal utility. For more
information, see exportdefcal arguments file rules (on page 293).
Output files from export utilities (such as exportdefcal) can be used as input files with the import utilities
(such as defcal).
exportdefcal reads arguments directly from a plain text arguments file (in XML format) instead of reading
them from the command line.
NOTE: The exportdefcal utility only exports Control-M level Rule-Based Calendars. To export Folder level
Rule-Based Calendars, use the exportdeffolder utility (as TAGs were previously exported).
292
Control-M Utilities Guide
293
Control-M Utilities Guide
Parameter Description
The first two lines of the XML request file for this API request contain information that specifies the version
of XML, the text encoding format being used, and the location of the .dtd file.
TERMS These tags indicate the start and end of the TERMS file. Only criteria that are
located between the tags are considered to be part of the argument.
TERM The TERM tags indicate the start and the end of a group of selection criteria used
to specify a calendar or calendars that are to be exported. Only PARAM tags that
are located between the TERM tags are considered to be part of the TERM
argument.
294
Control-M Utilities Guide
Parameter Description
PARAM The selection criteria parameter used to determine those calendars that are to be
exported. More than one PARAM can be specified. Mandatory.
PARAM NAME="DATACENTER" OP="EQ" VALUE="Center1"
VALUE String. Mandatory. Value of the parameter specified in the NAME field.
If the value of NAME is DATACENTER, enter the name of the
Control-M installation for VALUE.
If the value of NAME is CALENDAR, enter a calendar name.
If the value of NAME is TYPE, enter one of the following calendar
types: Relative, Regular, Periodic, Rule_Based
295
Control-M Utilities Guide
296
Control-M Utilities Guide
297
Control-M Utilities Guide
exportdeffolder
The exportdeffolder utility exports folders from the Control-M/EM database to a text file. To export folders
using the exportdeffolder utility, see Exporting folders using the exportdeffolder utility (on page 298).
When the exportdeffolder utility is invoked, a file of arguments that you have created is processed. This
arguments file contains statements that specify an existing folder, SMART Folders and Sub-folders. The
specified folders are exported to an output file. For more information, see exportdeffolder arguments file
(on page 298).
Output files created with the exportdeffolder utility can be used as import files with the deffolder utility.
For example, you can export job processing definitions to an output file using exportdeffolder, make
modifications to the definitions and save the file, and use the same file as the input file when running
deffolder to import the modified folder definitions into Control-M/EM database.
To export folders:
1. Do one of the following:
• UNIX: Log on to a Control-M/EM account.
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
NOTE: For Windows client installations, open a command prompt window and navigate to the
<EM Home>\Default\bin directory.
2. Enter one of the following commands:
• emdef exportdeffolder [-USERNAME <user> [-PASSWORD <password>] |
-PASSWORD_FILE <password file>] -HOST <GUI Server Name> -ARG_FILE <args
file name> -OUT_FILE <File Name>
• emdef exportdeffolder [-u <user> [-p <password>] | -pf <password file>]
-s <GUI Server Name> -arg <args file name> -out <File name>
For more details on the exportdeffolder parameters and options, see emdef general parameters (on
page 44) and emdef switches (on page 45).
For details about the args file name, see exportdeffolder arguments file (on page 298).
298
Control-M Utilities Guide
Parameter Description
The first two lines of the XML request file for this API request contain information that specifies the version
of XML, the text encoding format being used, and the location of the .dtd file.
TERMS These tags indicate the start and end of the TERMS file. Only criteria that are
located between the tags are considered to be part of the argument.
TERM The TERM tags indicate the start and the end of a group of selection criteria used
to specify a folder or folders that are to be exported. Only PARAM tags that are
located between the TERM tags are considered to be part of the TERM argument.
299
Control-M Utilities Guide
Parameter Description
PARAM The selection criteria parameter used to determine those folders that are to be
exported. More than one PARAM can be specified. Mandatory.
PARAM NAME="DATACENTER" OP="EQ" VALUE="Center1"
OP Mandatory.
Describes the relationship between the NAME and the VALUE
parameters of the TERM. Valid values:
EQ
NEQ
NOTIN
LIKE
CYCLIC_ Maximum delay in minutes permitted for a late submission when selecting a
TOLERANCE specific time (for example 5 minutes).
Relevant for Control-M version 6.4.01 or later.
300
Control-M Utilities Guide
Parameter Description
MAXWAIT Number of extra days (beyond the original scheduling date) that the jobs in the
SMART Folder are allowed to remain in the Active Jobs database awaiting
execution.
The value of MAXWAIT in the Rule_Based_Calendar is the value of the MAXWAIT
for the jobs that use this Rule_Based_Calendar.
Integer. Optional.
REMOVEATONCE Indicates that all jobs in the folder are not removed automatically from the Active
Jobs database. Instead jobs wait for the folder to complete and are removed at
the same time as the folder.
Valid values:
Y: Yes
N: No (default)
DAYSKEEPINNOTOK Enables you to specify a minimum period to keep the SMART folder (and jobs) in
the Active Jobs database after the folder is set to NOT OK.
Valid values:
0-98 (default 0)
99: Forever
exportdeffolder examples
Following are examples of arguments files used with the exportdeffolder utility:
Export all folders in the Data1 data center
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ"
VALUE="Data1"/>
</TERM>
</TERMS>
Export with multiple selection criteria
Exported SMART Folders that are located in data center Data1 and belong to the GRP_03 SMART
Folder, or located in data center Data1 and belong to the GRP_04 SMART Folder:
301
Control-M Utilities Guide
<TERMS>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ"
VALUE="Data1"/>
<PARAM NAME="GROUP" OP="EQ" VALUE="GRP_03"/>
</TERM>
<TERM>
<PARAM NAME="DATACENTER" OP="EQ"
VALUE="Data1"/>
<PARAM NAME="GROUP" OP="EQ" VALUE="GRP_04"/>
</TERM>
</TERMS>
cli utility
The Command Line Interface (cli) utility is a batch utility that enables you to perform the following
operations (services) from the command line:
Order jobs, as described in Ordering jobs using the cli utility (on page 305).
Force jobs, as described in Forcing a job using the cli utility (on page 306).
Force jobs in a folder, as described in Forcing a job into a folder (on page 306).
Upload folders and download folders, as described in Uploading and downloading folders using the cli
utility (on page 307).
Order Folders, as described in Ordering folders (on page 310).
Force jobs, as described in Forcing folders using the cli utility (on page 308).
Upload or download calendars, as described in Uploading and downloading calendars (on page 308).
Delete job processing definitions from folders, as described in Deleting job definitions by Job Name
(on page 311).
Activate a Workload Policy Definition, as described in Activating a workload policy definition using the
cli utility (on page 313).
The cli utility can be used on UNIX and Windows computers. The cli utility is installed automatically on
Windows computers during installation of the Control-M/EM Gateway, GUI server, and Control-M
Configuration Manager components.
Many of the tasks performed by the cli utility can also be performed using Control-M. However, by
including a utility command in the command line of a job processing definition, you can run the utility at a
predetermined time or under a predetermined set of conditions without being present.
You can make multiple requests in a single operation. Each service requires its own service name and
includes all the relevant service parameters that follow it.
302
Control-M Utilities Guide
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
cli parameters
The following table lists the cli utility parameters:
Parameter Description
<password file> Flat file containing an unencrypted user name and password on
separate lines in the format:
user=<emUser>
password=<emPass>
<Server Name> Defines the host name of the workstation running Control-M/EM
database Server.
NOTE: If you need to address a GUI server and multiple GUI servers
exist, set this parameter to the logical name of the relevant GUI
server.
<timeout in Defines the time, in seconds, that the utility waits for a response.
seconds> Timeout is used to override the default waiting period (120 seconds).
NOTE: Do not use timeout with commands that do not return a
response (-JOB_DELETE and -MEM_DELETE).
-BY_FORCE Forces the specified folder or calendar. Use this option during upload
only.
-ACTION_REASON A note saved in the audit report explaining the purpose for performing
the action.
-ACTION_NOTE A note saved in the audit report justifying the performance of the
action.
<cmd> The syntax for additional commands that are available for specifying
with the cli utility.
303
Control-M Utilities Guide
Parameter Description
<Control-M Defines the name of the Control-M Calendar you want to upload or
Calendar> download.
<Wait_Odate> Determines whether you should wait for the Order date to run the job.
For Control-M for Z/OS this field is Mandatory. Valid values are:
Y - Wait for Order date to run job.
N - Run the job immediately.
For Control-M for Distributed Systems this field is optional. If omitted,
the job runs immediately. If not omitted, the only valid value is
Wait_Odate, which means wait for Order date to run the job.
<With_Hold> Enables you to hold all jobs immediately after they are ordered.
Specify one of the following values:
N - Order/Force the job in a free state.
Y or With_Hold - Order/Force the job in a Hold state.
304
Control-M Utilities Guide
Parameter Description
<library> (Control-M for z/OS only) Defines the name of the library in which the
folder is located.
To order jobs:
1. Do one of the following:
• UNIX: Log on to a Control-M/EM account.
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
NOTE: For Windows client installations, open a command prompt window and navigate to the
<EM Home>\Default\bin directory.
2. Type the following command:
cli [-U <user_name> [-P <password>] | -PF <password file>] -H <Server Name>
[-T <timeout in seconds>] [-DDMM] [-BY_FORCE] -JOB_ORDER <CTM_name>
<folder_name> <job_name> <Odate> <Wait_Odate> [<With_Hold>] [<library>]
NOTE: UNIX: Add the em prefix before cli.
When forcing or ordering a job, Control-M/EM does not check if multiple jobs with the same name
exist in the folder.
For more details about the cli parameters, see cli parameters (on page 303). For the Control-M parameter
name, see Parameter name cross references (on page 31).
305
Control-M Utilities Guide
To force a job:
1. Do one of the following:
• UNIX: Log on to a Control-M/EM account.
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
NOTE: For Windows client installations, open a command prompt window and navigate to the
<EM Home>\Default\bin directory.
2. Type the following command:
cli [-U <user_name> [-P <password>] | -PF <password file>] -H <Server Name>
[-t timeout in seconds] [-DDMM] -JOB_FORCE <CTM_name> <folder_name>
<job_name> [<Odate>] [<library>]
NOTE: UNIX: Add the em prefix before cli.
For more information on the forcing a job parameters, see cli parameters (on page 303) and Force a job
parameters (on page 307).
306
Control-M Utilities Guide
Parameters Description
RECENT Forces the job into the folder that was run most
recently.
[duplication] Adds a job to a folder, even if there is a job with that name in the
folder. Valid values:
Y – Adds the job, if required.
N – Does not create a duplicate job if a job of the same name
already exists
NOTE: This setting can be used only when RECENT or TableID are
selected for folder.
307
Control-M Utilities Guide
To force folders:
1. Do one of the following:
• UNIX: Log on to a Control-M/EM account.
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
NOTE: For Windows client installations, open a command prompt window and navigate to the
<EM Home>\Default\bin directory.
2. Type the following command:
cli [-U <user_name> [-P <password>] | -PF <password file>] -H <Server Name>
[-t timeout in seconds] [-DDMM] -FOLDER_FORCE <CTM_name> <folder_name>
[<Odate>] [<library>]
NOTE: UNIX: Add the em prefix before cli.
For more details on the cli parameters, see cli parameters (on page 303).
308
Control-M Utilities Guide
309
Control-M Utilities Guide
Parameters Description
folder SMART Folder into which the Sub Folder is forced. Values:
RECENT: Forces the Sub Folder into the SMART
Folder that was run most recently.
NEW: Creates a new folder
Ordering folders
This procedure describes how to order folders using the cli utility.
To order folders:
1. Do one of the following:
• UNIX: Log on to a Control-M/EM account.
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
NOTE: For Windows client installations, open a command prompt window and navigate to the
<EM Home>\Default\bin directory.
2. Type the following command:
cli [-U <user_name> [-P <password>] | -PF <password file>] -H <Server Name>
[-T timeout in seconds] [-DDMM] -FOLDER_ORDER <CTM_name> <folder_name>
[<Odate>] [<library>]
NOTE: UNIX: Add the em prefix before cli.
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the cli parameters, see cli parameters (on page 303) and cli additional parameters.
310
Control-M Utilities Guide
Deleting Sub-folders
This procedure describes how to delete Sub-folders using the cli utility which enables you to delete the
Sub-folder from the Control-M/EM database only. Sub-folders in the Control-M/Server database are not
affected.
To delete Sub-folders:
1. Do one of the following:
• UNIX: Log on to a Control-M/EM account.
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
NOTE: For Windows client installations, open a command prompt window and navigate to the
<EM Home>\Default\bin directory.
2. Type the following command:
cli [-U <user_name> [-P <password>] | -PF <password file>] -H <Server Name>
-SUB-FOLDER_DELETE <CTM_name> <sub_folder_Name>
NOTE: UNIX: Add the em prefix before cli.
Deleting Sub-folders using the cli utility will delete all of the Sub-folders contents. If you only want to
delete a job use the -JOB_DELETE command.
311
Control-M Utilities Guide
312
Control-M Utilities Guide
Parameter Description
mem_name Indicates the name of the file that contains the job script, or for z/OS jobs,
the name of a member that contains one of the following in relation to the
job to be executed:
The JCL of the job
The started task procedure
Warning messages
ALL All occurrences of the job are deleted, if there is more than one job with the
same name.
NONE No jobs are deleted if there is more than one job with the same name.
NUMBER Deletes the job with the specified sequence number of the duplicate job (for
example, if 5 is entered, the fifth occurrence of the Job Name is deleted).
313
Control-M Utilities Guide
Parameter Description
<request_xml_file> Defines the path and name of the XML file that includes the
Control-M/EM request parameters. For more information, see
Introduction to Control-M/EM API.
<response_xml_file> Defines the path and name of the XML file that includes the
Control-M/EM response parameters. For more information, see
Introduction to Control-M/EM API.
314
Control-M Utilities Guide
ctmcalc_date
The ctmcalc_date utility calculates the date that a job can be ordered after adding or deducting a
specified number of days. You can specify whether the calculated date can be any day of the week or
must be a work day. To run the ctmcalc_date utility, see Calculating the date a job can run using the
ctmcalc_date utility (on page 315).
Calculating the date a job can run using the ctmcalc_date utility
This procedure describes how to run the ctmcalc_date utility, which enables you to calculate the date that
a job can be ordered after adding or deducting a specified number of days.
To calculate the date using the utility:
Open a command prompt and type the following command:
ctmcalc_date -FOLDER <Folder Path name>
-NAME <job or sub folder name>
-DATE <scheduling date>
-SHIFT <+/-n>
-OUTPUT_FORMAT DATE | EXTENDED (Date and flag) | FLAG
[ -ONLY_WORKING_DAYS <Y/N> ]
[ -DEBUG <debug level 0-5> ]
For more details on the ctmcalc_date parameters, see ctmcalc_date parameters (on page 316) and
ctmcalc_date examples (on page 317).
315
Control-M Utilities Guide
ctmcalc_date parameters
The following table describes the parameters in the ctmcalc_date utility:
Parameter Description
-DATE indicates the scheduling date (odate) to be associated with the job
Specify the date in yyyymmdd format.
-SHIFT indicates how many days to shift the scheduling criteria of the job
Valid values are +n or -n. n is the number of days to be shifted.
Specify +n to shift the job forward n number of days, or specify -n
to shift the job backward n number of days. The scheduling criteria
of the job are shifted either by work days or any day, according to
the value specified for the -ONLY_WORKING_DAYS parameter.
-ONLY_WORKING indicates whether the scheduling day can be any day of the week or
_DAYS must be a work day
Valid values are Y and N.
Y – the job can be scheduled to run only on a work day
N – the job can be scheduled to run on any day of the week
316
Control-M Utilities Guide
Parameter Description
ctmcalc_date examples
The following are ctmcalc_date examples:
Issue the following command to display the calculated scheduling date that the prodyjob job in the
Production folder will be ordered if its scheduling criteria are met, if two days are added to the original
scheduling date of the job, August 02, 2016:
ctmcalc_date -FOLDER Production -NAME prodyjob -date 20160802 \
-shift +2 -ONLY_WORKING_DAYS Y -OUTPUT_FORMAT DATE
20160804
As in the first example, displaying the calculated scheduling date and indicating if the job will be
scheduled:
ctmcalc_date -FOLDER Production -NAME prodyjob -date 20160802 \
-shift +2 -ONLY_WORKING_DAYS Y -OUTPUT_FORMAT EXTENDED
20160804 Y
As in the first example, indicating if the job will be scheduled without displaying the calculated scheduling
date:
ctmcalc_date -FOLDER Production -MAME prodyjob -date 20160802 \
-shift +2 -ONLY_WORKING_DAYS Y -OUTPUT_FORMAT FLAG
Y
317
Control-M Utilities Guide
ctmdeffolder
Use the ctmdeffolder utility to create a job definition for a new SMART Folder. SMART Folders are used for
jobs whose processing can be treated as a single unit. The definition created using this utility contains
values for parameters that affect handling of the entire collection of jobs in the SMART Folder. A SMART
Folder can be empty, or it can contain jobs and also Sub-folders, see ctmdefsubfolder (on page 322). To
run the ctmdeffolder utility, see Creating SMART Folders with definitions using the ctmdeffolder utility (on
page 318).
For more information about parameters of SMART Folders, see Job definition.
NOTE: When a Sub-folder is defined using ctmdeffolder without any Rule-Based Calendar being specified,
the Sub-folder inherits all Rule-Based Calendars.
The following are the ctmdeffolder utility syntax rules:
When using variables in cmtdeffolder parameters, a variable that does not contain a $ sign can be
enclosed in single (‘ ’) or double (" ") quotation marks.
A variable that does contain a $ sign must be enclosed in single quotation marks.
A variable containing a $ sign cannot be resolved if it is enclosed in double quotation marks.
If you define a new Rule-based calendar with the ! character at the beginning of the Rule-based
calendar name, the Rule-based calendar is excluded. If this feature is disabled, an error message is
displayed that you cannot define a Rule-based calendar with the ! character. For more information,
see DefaultCTMExcludeRBC in General parameters.
318
Control-M Utilities Guide
[ -MAXWAIT <days> ]
[ -ADJUST_COND Y|N ]
[ -RUN_AS <username> ]
[ -CREATED BY <username> ]
[ -DEBUG <debug level 0-5> ]
[ -QUIET ]
[ -TIMEZONE <xxx> ]
[ -TIMEFROM <earliest submission time> ]
[ -TIMEUNTIL <latest submission time> | '>' ]
[ -PRIORITY <job priority> ]
[ -CONFIRM Y|N ]
[ -APPLTYPE <agent_application> ]
[ -APPLVER <application version> ]
[ -CMVER <CM version> ]
[ -APPLFORM <application form> ]
[ -DESCRIPTION <string> ]
[ -DOCMEM <filename> ]
[ -DOCLIB <directory name> ]
[ -INCOND <condition> <dateref>|ODAT AND|OR ]
[ -OUTCOND <condition> <dateref>|ODAT ADD|DEL ]
[ -VARIABLE <varname> <expression> ]
[ -SHOUT OK|NOTOK|LATESUB|LATETIME|EXECTIME
<destination> <urgency R|U|V> <message> [<time>] ]
[ -USERDAILY <user daily name>
[ -REMOVEATONCE Y:N ]
[ -DAYSKEEPINNOTOK <days> ]
[ -ON <OK|NOTOK>
[ -DOOK ]
[ -DONOTOK ]
[ -DOSHOUT <destination> <urgency R|U|V> <message> ]
[ -DOCOND <condname> <dateref>|ODAT ADD|DEL ]
[ -DOVARIABLE <varname> <expression> ]
[ -DOFORCEJOB <foldername> <jobname> <odate>|ODAT ]
[ -DOREMOTEFORCEJOB <foldername> <jobname> <odate>|ODAT ]
319
Control-M Utilities Guide
320
Control-M Utilities Guide
ctmdeffolder parameters
The following table lists the ctmdeffolder utility parameters:
Parameter Description
-input_file Name and full path of a file containing parameters for the utility. In
this file, each parameter and its values (if any) are on a separate line
with the same syntax they would have on the command line. Using the
-input_file parameter enables you to:
prepare and save files of utility parameters that can be reused.
specify utility input longer than the number of characters allowed in
the command line.
EXAMPLE:-input_file
~<controlmOwner>/ctm_server/data/ctmdeffo
lder_parms.txt
-USER DAILY Name of a order method job that is associated with the created SMART
Folder. This parameter is case-sensitive.
NOTE: The specified name must not be longer than 10 characters. If a
longer name is specified, an error message is issued.
EXAMPLE: ctmdeffolder -folder ss -application a -group
g -rbc r -order_ method verylongnamespecified
The response is:
RULE-BASED CALENDAR 'r' added
The value length for -ORDER_ METHOD exceeds maximum
allowed length 10
ctmdeffolder example
The following is an ctmdeffolder command example:
Use the following command to create a SMART Folder named job:
ctmdeffolder -FOLDER job -SUBAPPLICATION supply -APPLICATION supplies -RBC jobRbc -DAYS
ALL -MONTH ALL Y
Control-M/Server issues a message, similar to the following:
RULE-BASED CALENDAR 'jobRbc' added
new SMART Folder ENTITY defined, SMART Folder='job', ACTIVEFOLDERNO = 00000j(19)
321
Control-M Utilities Guide
ctmdefsubfolder
The ctmdefsubfolder utility creates a definition for a new Sub-folder. Sub-folders are used for jobs whose
processing can be treated as a single unit. A Sub-folder can only be defined within a SMART folder, see
ctmdeffolder (on page 318). A Sub-folder can be empty, or it can contain jobs and also other Sub-folders.
To run the ctmdefsubfolder utility, see Creating a Sub-Folder using the ctmdefsubfolder utility (on page
322).
For more information about parameters of Sub-folders, see Sub Folder parameters.
When using variables in ctmdefsubfolder parameters, a variable that does not contain a $ sign can be
enclosed in single (‘ ’) or double (" ") quotation marks. A variable that does contain a $ sign must be
enclosed in single quotation marks. A variable containing a $ sign cannot be resolved if it is enclosed in
double quotation marks.
The RBC option associates Rule-Based Calendars to be used by the Sub-folder and it may appear more
than once. Specified Rule-Based Calendars must be defined by the direct parent folder. The '*' means that
the Sub-folder inherits all the Rule-Based Calendars from the direct parent folder. When a Sub-folder is
defined without a Rule-based calendar, the Sub-folder inherits the Rule-based calendars of the direct
parent. To define a Sub-folder without any Rule-based calendar associations, use the NONE option. If a
Rule-based calendar is defined with the ! character at the beginning of the Rule-based calendar name, the
Rule-based calendar is excluded. If this feature is disabled, an error message is displayed that you cannot
define a Rule-based calendar with the ! character. For more information, see DefaultCTMExcludeRBC
in General parameters.
The Created by field will be set automatically with the default logged in account name if it's not specified.
322
Control-M Utilities Guide
323
Control-M Utilities Guide
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the ctmdefsubfolder parameters, see ctmdefsubfolder parameters (on page 324) and ctmdefsubfolder
syntax rules.
ctmdefsubfolder parameters
The following table lists the ctmdefsubfolder utility parameters:
Parameter Description
-input_file Name and full path of a file containing parameters for the utility. In
this file, each parameter and its values (if any) are on a separate line
with the same syntax they would have on the command line. Using the
-input_file parameter enables you to:
prepare and save files of utility parameters that can be reused.
specify utility input longer than the number of characters allowed in
the command line.
-input_file
~<controlmOwner>/ctm_server/data/ctmdefsu
btab_parms.txt
ctmrpln
The ctmrpln utility creates a report that lists selected jobs in selected folders, and indicates when the jobs
are scheduled to run. It enables you to test the effect of different calendars on job scheduling. To run the
ctmrpln utility, see Creating a job report using the ctmrpln utility (on page 324).
Each report can be created in one of the formats described in ctmrpln report formats (on page 325).
The characters described in ctmrpln report characters (on page 325) can appear in this report. The
characters indicate whether a job is scheduled to run (that is, whether the job is placed in the Active Jobs
database.)
324
Control-M Utilities Guide
Format Description
Daily Report Displays jobs in the specified folder that are scheduled to run on a
specific day. Each job’s Mem Name (or Job Name), Group, and
Description parameters are displayed.
Monthly Report Displays a folder of all days in a specified month and marks (with an
asterisk "*") the days of the month on which jobs in the specified
folder are scheduled to run. Jobs can be identified either by their
Mem Name or Job Name parameters.
Yearly Report Displays the year, the two years before, and the two years after the
year specified in the <Date> parameter. Marks each day with
various characters (described in the next folder) that indicate if jobs
in the specified folders are scheduled to run.
Char Description
- The job is scheduled to not run on this day. For example, if DAYS=-3, the job is
scheduled to not run on the 3rd day of the month.
325
Control-M Utilities Guide
ctmrpln parameters
The following table lists the ctmrpln utility parameters:
Parameter Description
<Folder> Name of the folder on which to base the report. The folder name
can include the following wildcard characters:
326
Control-M Utilities Guide
Parameter Description
<Job Name> Job Name of the jobs to include in the report. The Job Name can
include wildcard characters (see <Folder> above). Specify * by
itself to include all jobs in the folder.
<output> Full path name to which the report should be sent (optional). If this
parameter is not specified, the output is routed to the default output
device.
NOTE: To print the Monthly Report, specify a device that can print
132-column reports.
ctmrpln examples
The following are examples of the ctmrpln utility:
The following command causes the utility to generate a report for folder PROD1. The report will include
all jobs whose Job Name parameter begins with "jn" and that will run on January 1, 2017 based on the
calendar work_days. The job is identified by its File Name. (To identify jobs by Job Name, specify
Report_type DJ.) The output is directed to the user’s display.
ctmrpln D work_days PROD1 "jn*" 20170101
The following command causes the utility to generate a folder of days on which job PRDJ02 in folder
PROD1 will run during the month of April, 2016, based on the calendar work_days. The job is identified by
File Name. (To identify jobs by Job Name, specify Report_type MJ.) The output is directed to printer lp1.
ctmrpln M work_days PROD1 PRDJ02 201604 lp1
The following command causes the utility to generate a five-year report encompassing the period January
2003 through December 2008. This indicates on which days each job in folder PROD1 runs, based on the
calendar work_days. The output is directed to printer lp1.
ctmrpln Y work_days PROD1 "*" 2005 lp1
327
5
5
New day procedure and user dailies
The new day procedure and order methods utilities:
Obtain information regarding the user daily procedure, such as the last time it ran or the jobs that it
ordered and their security authorizations
Actually run a specific user daily to order jobs whose folders are associated with it (ctmudly)
By including a utility command in the command line of a job processing definition, you can run the utility
at a predetermined time or under a predetermined set of conditions without being present.
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
Utility Description
ctmordck (on Lists job processing definitions that can be ordered by a specific User Daily
page 328) job.
ctmudlst (on Enables you to manually set the User Daily last run date.
page 333)
ctmsys (on Enables you to define appropriate values for system parameters including
page 448) customizing the New day procedure.
ctmordck
The ctmordck utility lists job processing definitions associated with a specific User Daily name and
indicates the security status of each job with regard to the User Daily name job (that is, whether or not
the Control-M security mechanism will allow jobs associated with a User Daily name to run with the
authorizations currently assigned to it).
To run the ctmordck utility, see Viewing jobs with User Daily name using the ctmordck utility (on page
329).
This utility displays the following fields:
328
Control-M Utilities Guide
Viewing jobs with User Daily name using the ctmordck utility
This procedure describes how to run the ctmordck utility, which enables you to list job processing
definitions associated with the User Daily name and indicates the security status of each job.
329
Control-M Utilities Guide
ctmordck parameters
The following table lists the ctmordck utility parameters:
Parameter Description
<Daily name> Defines the name of the User Daily procedure. For more information,
see User Daily name.
<Output> Full path name to which the report should be sent. If this parameter
is not specified, the output is routed to the default output device.
ctmordck examples
The following are examples of ctmordck utility command and output:
The following command generates a list for user SYSTEM and the User Daily name SYSTEM. The list is
directed to the specified file called udlist.
ctmordck SYSTEM <user name> SYSTEM <Daily
name>/ctm_server/user1/udlist
The following is sample output from the above command:
Date: 18-Feb-2017. Page: 1
User SYSTEM , Daily SYSTEM Ordering list
--------------------------------------------------------------------------------------
JOBNAME No. CREATED_BY RUN_AS FD FN UA
------------------------------------------------
CTMLOG HAN 2066 root root Y N Y
PURGE JOB 2067 root root Y N Y
user3-DAIL 2033 BARRY user3 Y N Y
user2-DAIL 2032 STEVE user2 Y N Y
user1-DAIL 2031 STEVE user1 Y N Y
JEAN-UD 2000 jean jean Y N Y
JOB-STATUS 2068 root root Y N Y
GD-TEST1 20 jean user1 Y N Y
GD-TEST2 21 jean user2 Y N Y
GD-TEST3 22 jean user3 Y N Y
GD-user4 2008 jean user4 Y N Y
GD-user5 2009 jean user5 Y N Y
330
Control-M Utilities Guide
ctmudchk
The ctmudchk utility checks if all jobs that should have been ordered by a User Daily name job are in the
Active Jobs database. This utility facilitates recovery from the interruption of a User Daily job. If a User
Daily job is interrupted for any reason (for example, operating system crashes, User Daily job errors), the
ctmudchk utility can determine which jobs in the affected user daily ended okay, which jobs had
interruptions, and which jobs had not yet run. You can examine the outputs and logs related to the jobs
that were in process to decide what to do, but the utility can reorder the jobs that did not yet run.
Before ordering the job, ctmudchk verifies that a job is not already present in the Active Jobs database.
When using the ctmudchk utility, the New Day procedure must not be running.
To handle an interruption in User Daily processing, run the ctmudchk utility for the affected User Daily to
order jobs that were not ordered because of the interruption. To run the ctmudchk utility, see Checking
and ordering jobs using the ctmudchk utility (on page 331).
331
Control-M Utilities Guide
ctmudchk parameters
The following table lists the ctmudchk utility parameters:
Parameter Description
-DAILY Name of the User Daily to be checked. For more information, see User
Daily name.
-ACTION Indicates whether jobs that are missing from the Active Jobs database
should be listed or ordered.
The following values can be specified for this parameter:
LIST Lists the job name and the name of the folder for
each missing job.
-odate Indicates the scheduling date (odate) to be associated with jobs that
are ordered by this user daily job.
Valid values are:
value_date The specified odate is the odate value for the jobs.
However, the jobs ordered by the user daily job
should be run during the current working day.
This is the default value for the -odate_option
parameter.
If time zones specified in specific job processing
definitions in the folders, then the jobs are run
according to those time zones.
332
Control-M Utilities Guide
Parameter Description
run_date The jobs ordered by the user daily job should be run
only when the specified odate begins.
If the specified odate is the current working day,
then this will work in the same way as value_date
(described above).
If the specified odate has not begun (for example,
due to time zone specifications), then the job will
wait in the Active Jobs database (with WAIT_ODAT
status) until the start of the specified working day.
If the specified odate has already passed, the
ctmudchk utility will not run, and an error message
will be displayed.
-FILE Indicates the path name for the output of the ctmudchk utility. This
parameter is required only if LIST is specified for the ACTION
parameter.
ctmudchk examples
The following are examples of ctmudchk utility commands:
Use the following command to check Active Jobs database for jobs that are ordered by the User Daily
name, payroll. The Job Name and Folder are listed for each job that is not in the Active Jobs database.
ctmudchk -DAILY payroll -ACTION LIST
Use the following command to check the Active Jobs database for jobs that are ordered by the User Daily
name, admin1. The utility orders each job that is not in the Active Jobs database.
ctmudchk -DAILY admin1 -ACTION ORDER
ctmudlst
The ctmudlst utility is used to display or modify UDLAST (the User Daily last run date). To run the
ctmudlst utility, see Modifying the User daily's last run date using the ctmudlst utility (on page 333).
When using the ctmudlst utility, the New Day procedure must not be running.
Modifying the User daily's last run date using the ctmudlst utility
This procedure describes how to run the ctmudlst utility, which enables you to display or modify UDLAST
(the User Daily's last run date).
333
Control-M Utilities Guide
To modify the user daily's last run date using the utility:
1. Do one of the following:
• UNIX: Log on to a Control-M/Server account
• Windows: Open a command prompt window where Control-M/Server is installed.
2. Type one of the following commands:
• ctmudlst LIST <daily name>
• ctmudlst LIST "*"
• ctmudlst UPDATE <daily name> <date>
• ctmudlst DELETE <daily name>
For more information on the ctmudlst utility parameters, see ctmudlst parameters (on page 334).
ctmudlst parameters
The following table lists the ctmudlst utility parameters:
Parameter Description
LIST Lists the name of the User Daily's last run date.
UPDATE Updates the name of the User Daily's last run date.
DELETE Deletes the name of the User Daily's last run date.
<Daily name> Defines the user daily name. For more information, see User Daily
name.
"*" Asterisk enclosed in quotation marks. Displays a list of all User Daily
names and corresponding last run dates.
<Date> Requested value for the last running date in yyyymmdd format.
ctmudlst examples
The following are examples of the ctmudlst utility commands:
The following command lists the last run date for User Daily name, payroll:
ctmudlst LIST payroll
The following command changes the last run date for User Daily name, inventory, to August 10, 2008:
ctmudlst UPDATE inventory 20080810
334
Control-M Utilities Guide
ctmudly
The ctmudly utility orders jobs whose folders are associated with a specific User Daily name. To run the
ctmudly utility, see Ordering jobs with a specific user daily name using the ctmudly utility (on page 335).
Each job in the ordered Folders whose Scheduling criteria are satisfied is placed in the Active Jobs
database.
The exit code of the ctmudly utility is determined by Control-M configuration parameter
UDLY_PARTCOPY_ERR. For more information about this parameter, see Configuration parameters.
Ordering jobs with a specific user daily name using the ctmudly
utility
This procedure describes how to run the ctmudly utility, which enables you to order jobs whose folders
are associated with a specific User Daily name.
335
Control-M Utilities Guide
ctmudly parameters
The following table lists the ctmudly utility parameters:
Parameter Description
<user Daily> Name of a user daily job that is associated with one or more folders.
This parameter is case-sensitive.
NOTE:
The specified name must be no longer than 10 characters. If a
longer name is specified, it will be truncated to 10 characters.
If the ctmudly utility command is issued from a Control-M/Agent, it
must include the -DAILY_NAME keyword (as shown above).
For more information, see User Daily name.
-odate Indicates the scheduling date (odate) to be associated with jobs that
are ordered by this order method job.
Valid values are:
336
Control-M Utilities Guide
Parameter Description
run_date The jobs ordered by the User daily name job should
be run only when the specified odate begins.
If the specified odate is the current working day,
then this will work in the same way as value_date
(described above).
If the specified odate has not begun (for example,
due to time zone specifications), then the job will
wait in the Active Jobs database (with WAIT_ODAT
status) until the start of the specified working day.
ctmudly messages
The following table describes the ctmudly utility issued messages:
Message Description
Security Issues When a job is not scheduled due to security protection, the
following Alert is sent to Control-M/EM:
DAILY <userdaily name> FAILED TO ORDER JOBNAME
<jobName> - Security
Scheduling issues If one or more jobs in a folder is not ordered by a User Daily job
due to scheduling criteria, the type of Alert sent to Control-M/EM
is determined by the value of the Control-M configuration
parameter NOT_ORDERED_JOB_ALERT. For more information
about this parameter, see Configuration parameters.
PARTIAL COPY message If one or more jobs in a folder was not ordered by the User Daily
job due to scheduling criteria or security settings, the Order
method (ctmudly) ended with the following error message in the
job output (OUTPUT).
ctmudly examples
The following are examples of the ctmudly utility commands:
Ordering a specific User Daily
The following command orders all Folders that are associated with the User Daily name, prod:
ctmudly prod
337
Control-M Utilities Guide
338
6
6
Active Jobs Database utilities
The following utilities, when run, affect the active jobs database. These utilities have an immediate impact
on the jobs as they run.
Prerequisite conditions: Performs operations on the Prerequisite Conditions folder. The existence
or deletion of these conditions can determine if jobs run. For more information, see ctmcontb (on
page 339).
Parameter values: Refreshes recently updated parameters, as an alternative to restarting
Control-M/Server. For more information, see ctmipc (on page 344).
Quantitative Resources: Updates the resource usage of a Control-M/Agent. For more information,
see ctmloadset (on page 346).
Variable values: Displays the current value of a variable. For more information see ctmstvar (on
page 349).
Global variables: Manipulates Global variables for data centers, SMART Folders (excluding
Sub-folders), or jobs in SMART Folders. For more information, see ctmvar (on page 350)
Control Resources: Displays a list of Control resources and the status of each resource, after which
the user might decide to modify the status of a resource. For more information, see ecactltb (on page
356).
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
ctmcontb
The ctmcontb utility performs the following operations on prerequisite conditions in the Control-M/Server
database:
Lists existing prerequisite conditions while treating an asterisk in a condition name as a wildcard.
(-LIST)
Lists existing prerequisite conditions while treating an asterisk in a condition name as a regular
character. (-LISTNOWILD)
Adds a prerequisite condition. (-ADD)
Generates a prerequisite condition in XML format. (-XML)
Deletes a prerequisite condition while treating an asterisk in a condition name as a wildcard.
(-DELETE)
Deletes a prerequisite condition while treating an asterisk in a condition name as a regular character.
(-DELETENOWILD)
Deletes conditions within a specified range of dates. (-DELETEFROM)
339
Control-M Utilities Guide
340
Control-M Utilities Guide
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the ctmcontb parameters, see ctmcontb utility parameters (on page 341).
Variable Description
341
Control-M Utilities Guide
Variable Description
<Condition Date> Displays the date of the prerequisite condition in mmdd format.
For Listing and Deleting:
The condition date can include wildcard character * to indicate
any number of characters (including none). When using an *,
enclose the date in quotation marks (for example, "12* ").
Specify "*" by itself to include all dates.
Specify ODAT to accept the Control-M date.
Specify STAT if a date is not relevant.
For Adding or Generating in XML Format:
Specify ODAT to use the Control-M working date.
Specify STAT if a date is not relevant.
342
Control-M Utilities Guide
Variable Description
<Full Path file name> Displays the name and full path of a file containing parameters for
the utility. In this file, each parameter and its values (if any) are
on a separate line with the same syntax they would have on the
command line. Using the -input_file parameter enables you to:
Prepare, save, and reuse files of utility parameters.
Specify utility input longer than the number of characters
allowed in the command line.
-input_file /ctm_server/data/ctmcontb_list.txt
ctmcontb examples
The following command deletes prerequisite condition bckp_end with condition dates in December:
ctmcontb -DELETE bckp_end "12*"
The following command deletes all prerequisite conditions with prefix a and condition dates between
December 1 and December 15 inclusive:
ctmcontb -DELETEFROM "a*" 1201 1215
The following command deletes the prerequisite condition aa* with condition date ODAT:
ctmcontb -DELETENOWILD "aa*" ODAT
You can implement the second example with the -input_file parameter as follows:
ctmcontb -input_file ~<controlm_owner>/ctm_server/data/ctmcontb_delfr.txt
Where the referenced file contains the line:
-DELETEFROM "a*" 1201 1215
The following command lists the prerequisite condition named aa* with all its dates:
Ctmcontb -LISTNOWILD "aa*" "*"
The following command lists all existing prerequisite conditions:
ctmcontb -LIST "*" "*"
A report similar to the following example is generated:
Date: 30-JUN-2016. Page 1
Conditions list
CONDNAME CONDDATE
APR01-L20 0629
APR01-L20 0630
ARD01-L30K 0630
LVL11-LVL22 0628
343
Control-M Utilities Guide
LVL11-LVL22 0629
LVL11-LVL22 0630
PKR11-LVL01 0630
This example demonstrates the advantage of defining a Control-M job to run a utility. The following job
processing definition causes Control-M to run ctmcontb each work day, each time deleting all prerequisite
conditions that are between five and ten days old:
Week Days 2,3,4,5,6
Variable Assignment
%%A=%%CALCDATE %%DATE -10
%%B=%%CALCDATE %%DATE -5
%%A=%%SUBSTR %%A 3 4
%%B=%%SUBSTR %%B 3 4
Command Line ctmcontb -DELETEFROM "*" %%A %%B
This example illustrates ctmcontb input and output when using the -XML option. ODAT automatically
generates the Control-M/Server system date that, in this example, was March 15th.
D:\>ctmcontb -XML cond1 ODAT
<?xml version="1.0" encoding="utf-8" ?>
<CTMCONTB
CONDNAME="cond1"
CONDDATE="0315">
<COND
CONDNAME="cond1"
CONDDATE=" 0315">
</COND>
</CTMCONTB>
This example cleans all conditions and excludes conditions that start with "A" between May and June,
and excludes conditions that start with A between August 10th and August 20th:
ctmcontb -clean "*" -exclude A* 0501 0630 -exclude B* 0810 0820
ctmipc
The ctmipc utility sends a message to Control-M/Server processes, which instructs the processes to
perform a specific action. To run the ctmipc utility, see Refreshing parameters using the ctmipc utility (on
page 345).
The ctmipc utility can only be used to refresh recently updated parameters, as an alternative to restarting
Control-M/Server.
344
Control-M Utilities Guide
ctmipc parameters
The following table lists the parameters for the ctmipc utility:
Parameter Description
-DATA Indicates additional data to be sent with the message ID (if any).
-QUIET Indicates that the ctmipc utility will not generate any output
message, upon success or a failure.
-DEBUG Indicates that the utility will run in debug mode, and will therefore
generate a debug log in the proclog sub-directory of
Control-M/Server.
345
Control-M Utilities Guide
ctmloadset
The ctmloadset utility records current resource usage on an agent computer in the Quantitative Resources
table. This utility is typically invoked by a cyclic job that runs on the agent computer and measures usage
of a certain resource on the computer. Usage data is then used to update the Quantitative Resources
table on the Control-M/Server computer. To run the ctmloadset utility, see Updating a Quantitative
Resource using the ctmloadset utility (on page 346).
ctmloadset is used when load balancing is implemented. The load-balancing algorithm uses the data
recorded in the Quantitative Resources table to determine to which agent computer a job should be
submitted.
Control-M maintains the following information about usage of each Quantitative resource:
Total Used: Units of the resource currently in use. This parameter represents the sum of the values
specified in the other two rows of this table.
Used by Control-M: Units of the resource currently in use by jobs submitted by Control-M/EM
database.
Used by Others: Units of the resource currently in use by non-Control-M jobs.
Update resource usage values in the Quantitative Resources table in either of two ways:
Specify the value for Total Used for a resource. ctmloadset subtracts the value for Used by Control-M
from the value you specify and places the remainder in the field Used by Others.
Specify the value for Used by Others for a resource. This value is added to the value Used by
Control-M to calculate the value Total Used for the resource.
Values for the utility can be expressed as an absolute number of units or as a percentage of the total
number of units defined (Max value).
The utility’s output is displayed as type Q rows in the Quantitative Resources window. However, the Mem
Name field remains blank since this represents usage by one or more non-Control-M jobs.
346
Control-M Utilities Guide
ctmloadset parameters
The following utility lists the ctmloadset parameters:
Parameter Description
TOTAL Indicates that the load value provided specifies the total usage of the
resource by all jobs (both Control-M jobs and non-Control-M jobs).
When this option is specified, the utility calculates the usage of the
resource by non-Control-M jobs and updates the table accordingly.
OTHERS Indicates that the load value provided specifies the units of the resource
used by one or more non-Control-M jobs.
ctmloadset example
A host group contains three agent computers: diana, jacklin and ruby. Each computer is defined in the
Quantitative Resource table as having 200 units of resource CPU_load, representing the load on the
computer’s CPU.
computer jacklin is used exclusively to run jobs submitted by Control-M. The computer is currently
executing a job that uses 120 units of resource CPU_load.
computer ruby is used exclusively to run jobs submitted by Control-M. The computer is currently
executing a job that uses 150 units of resource CPU_load.
computer diana is used both for Control-M and non-Control-M jobs. The computer is currently
executing a job submitted by Control-M that uses 75 units of resource CPU_load.
A cyclic job is defined to run periodically on diana to measure the total load on the CPU. The job updates
the Quantitative Resources table using the ctmloadset utility to indicate to Control-M exactly what the
load is on that computer. The last run of this job determined that the load on the CPU is 80% of total
capacity. The job invokes ctmloadset as follows:
ctmloadset TOTAL CPU@diana 80%
The Total Used for diana is set to 80% of 200, or 160. Since the usage by Control-M jobs is currently 75
units, ctmloadset calculates that the "Other" (non-Control-M usage) is 160 - 75, or 85.
347
Control-M Utilities Guide
As a result, the Quantitative Resources table now contains the following values:
Total used by
Resource Max Control-M Total used by others Free
CPU@diana 200 75 85 40
The Control-M load-balancing algorithm uses these values when determining where to submit the next
job.
CPU@diana L 50 0 30 20
The following command specifies that the current usage of the Quantitative resource CPU@diana by
non-Control-M jobs is 12 units:
ctmloadset OTHERS CPU@diana 12
As a result, the output from the ecaqrtab utility is now as follows:
CPU@diana L 50 0 42 8
The following command specifies that the current usage of the Quantitative resource CPU@diana by
non-Control-M jobs is 12%:
ctmloadset OTHERS CPU@diana 12%
348
Control-M Utilities Guide
The non-Control-M usage of the resource is calculated as 12% of 50, or 6 units. As a result, the output
from the ecaqrtab utility is now as follows:
CPU@diana L 50 0 36 14
The following command specifies that the current total usage of the Quantitative resource CPU@diana by
all jobs is 48 units:
ctmloadset TOTAL CPU@diana 48
As a result, the output from the ecaqrtab utility is now as follows:
CPU@diana L 50 0 48 2
ctmstvar
The ctmstvar utility displays the current value of a variable or function. To run the ctmstvar utility, see
Viewing a variable value using the ctmstvar utility (on page 349).
UNIX only:
• A variable that does not contain a $ sign can be enclosed in single or double quotation marks.
• A variable that does contain a $ sign must be enclosed in single quotation marks.
• A variable that contains a $ sign cannot be resolved if it is enclosed in double quotation marks.
Windows only: Variables must be enclosed with double quotation marks.
NOTE: The $WCALC variable is not supported with the ctmstvar utility.
349
Control-M Utilities Guide
For more details on the ctmstvar parameters, see ctmstvar parameters (on page 350).
ctmstvar parameters
The following table lists the ctmstvar utility parameters:
Variable Description
<orderID> Order ID of a job waiting in the Active Jobs database (as displayed
in the Job Details window of Control-M/EM). The Order ID displayed
in Control-M/EM is a base 36 number. If you want to specify the
Order ID here as a base 10 number, prefix the number with an
asterisk, and enclose it in quotation marks (for example,"*1234").
Use "0" to indicate no specific Order ID.
ctmstvar examples
The following are examples of the ctmstvar utility commands:
ctmstvar a1 ‘%%$CALCDATE %%ODATE -2’
ctmstvar 0 "%%ODATE"
ctmvar
The ctmvar utility defines, deletes, modifies and displays variables. This utility can be applied to variables
that are in a specific job processing definition in a SMART Folder, common to all jobs in a SMART Folder,
and global for an entire data center (a Control-M/EM database and all associated agents).
To run the ctmvar utility, see running the Creating and editing variables using the ctmvar utility (on page
351).
Consider the following:
If a SMART Folder specified in the ctmvar utility has been ordered more than once, the utility updates
every instance of that SMART Folder in the Active Jobs database.
Variables in jobs that are not part of a SMART Folder cannot be modified using the ctmvar utility.
A value specified for a Global variable is overridden if a local variable with the same name is defined
in a job processing definition, Sub-folder or SMART Folder.
Sub-folders cannot be modified using the ctmvar utility.
350
Control-M Utilities Guide
351
Control-M Utilities Guide
ctmvar parameters
The following table lists the ctmvar utility parameters:
Parameter Description
352
Control-M Utilities Guide
Parameter Description
LIST Displays all Global variables for the data center or all
variables for the specified SMART Folder specified in the
-var parameter.
ctmvar -action LIST
Displays all Global variables for the data
center.
ctmvar -action LIST -var "%%\PAYROLL"
Displays all variables that are global for the
PAYROLL SMART Folder.
Variable values can also be displayed using the ctmstvar
utility. However, the ctmstvar utility resolves the current
value of only a specified variable or function. The ctmvar
utility displays all variables in the data center or the
specified SMART Folder.
-VAR Name and location of the variable that the specified action should be
applied to.
The valid format for this parameter depends on the type of variable being
handled.
For a variable that is global for an entire data center, valid format is:
-var "%%\<var_name>"
For a variable that is global for all jobs in a SMART Folder, valid format is:
-var "%%\<SMART_folder_name>\<var_name>"
For variable in a specific job in a SMART Folder, valid format is:
-var "%%\<folder_name>\<jobName>\<var_name>"
This parameter cannot be specified together with -action LOAD.
For more information about variables, see Control-M Variable facility .
-VAREXPR Value to be assigned to the specified variable. The specified value can be:
a string (embedded in quotation)
an integer (a numeric value)
an Variable expression (for example, with an Variable function)
another (existing) global variable.
This parameter cannot be specified together with
-action LOAD.For more information, see Control-M Variable facility .
353
Control-M Utilities Guide
Parameter Description
-FILENAME Path and name of the file containing the list of variables. The file must be
accessible to Control-M/Server. This parameter is only valid when
specified together with -action LOAD.
The syntax for each line in the specified file is
%%[\<ctmvar>[\<job>]]\<varName>=<expression>
Specify the entire pathname in this parameter.
-DEBUG Sets a debug level for the utility. This parameter is used for maintenance
and troubleshooting purposes. The level, a numeric value from 0 to 5,
must be used only if requested and specified by Technical Support.
Performance is somewhat slower and requires a larger number of
resources when operating in debug mode. BMC recommends that you
activate debug mode only when absolutely necessary and revert to
normal mode as soon as possible.
-input_file Name and full path of a file containing parameters for the utility. In this
file, each parameter and its values (if any) are on a separate line with the
same syntax they would have on the command line. Using the -input_file
parameter enables you to:
prepare and save files of utility parameters that can be reused.
specify utility input longer than the number of characters allowed in
the command line.
-input_file ~<controlm_owner>/ctm_server/data/ctmvar_parms.txt
-POOL Indicates the variable action to be performed in the specified named pool.
The following are possible actions:
LOAD Loads variable values from a specified file to pool. The file
name is the path name of a text file containing the variable
assignment statements.
This file must be accessible to Control-M. The file must
contain a single assignment on each line.
EXAMPLE:
ctmvar -POOL load -POOLNAME <pool name> - FROM
<file name>
354
Control-M Utilities Guide
Parameter Description
ctmvar examples
The following command assigns the value UP to variable %%CTMSTATUS:
ctmvar -action set -var "%%\CTMSTATUS" -varexpr "UP"
The following command assigns the value 31 to variable %%MONTHDAYS in the folder called
PAYROLL:
ctmvar -action set -var "%%\PAYROLL\MONTHDAYS"
-varexpr 31
The following command assigns the current value of system variable %%TIME to variable %%AAA:
ctmvar -action set -var "%%\AAA" -varexpr %%TIME
You can get the same result using the -input_file parameter as follows:
ctmvar -input_file ~<controlm_owner>/ctm_server/data/var_expr_parms.txt
The referenced file contains the following lines:
-action set
355
Control-M Utilities Guide
-var "%%\AAA"
-varexpr %%TIME
The format variable %%@varname indicates that the variable should contain a value to be resolved by
each job that uses it. In the following example, the command assigns the value %%@TIME to variable
%%AAA:
ctmvar -action set -var "%%\AAA" -varexpr %%@TIME
The following command sets the name of the POOL to "test" and assigns the value %%ODATE to the
variable A:
ctmvar -POOL SETVAR -POOLNAME "test" -VAR "A" -VALUE "%%ODATE"
ecactltb
The ecactltb utility displays a list of Control resources and the status of each resource. To run the ecactltb
utility, see Viewing Control Resources using the ecactltb utility (on page 356).
If the name of an output file is specified, but no path is specified for this file, the output file is placed in
the Control-M/Server home directory.
356
7
7
Communication, start up, and troubleshooting
The communication, startup, and troubleshooting utilities are used to set up communication between
Control-M components, start up/shut down Control-M components and entities, and determine if
communication between the components is occurring effectively. Various troubleshooting utilities are also
included here.
By including a utility command in the command line of a job processing definition, you can run the utility
at a predetermined time or under a predetermined set of conditions without being present.
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
Utility Description
Control-M/Server
ctl (on page Checks if Control-M/EM Server components are operational and send
359) commands.
orbadmin (on Manages the Naming Service process and the CORBA configuration file.
page 376)
357
Control-M Utilities Guide
Utility Description
ctmspdiag (on Prints or erases diagnostics from stored procedures and set or show
page 402) diagnostic request status of stored procedures.
init_prflag (on Resets sleep times and trace levels for Control-M/Server processes.
page 403)
ctmchangeshdir Changes the shared directory path that is used for the PostgreSQL
(on page 410) replication in a high availability environment.
Control-M/Agent
358
Control-M Utilities Guide
Utility Description
ctl
The ctl command line utility enables you to send simple requests to Control-M/EM server components.
The ctl utility can:
Check if Control-M/EM server components are operational.
Check if Batch Impact Manager and Control-M/Forecast (Forecast) server components are operational
(if they are installed at your site).
Send commands to Control-M/EM components during runtime, for example, setting Gateway debug
level.
The ctl utility is automatically installed with a full Control-M/EM installation.
To run the utility, you can select one of the following:
Sending requests to Control-M/EM Server using the ctl utility (on page 360)
Sending requests from the Control Shell using the ctl utility (on page 360)
The ctl utility can send request to the following:
Gateway, as described in Sending requests to the Gateway using the ctl utility (on page 362).
Global Conditions Server, as described in Sending requests to the Global Conditions server using the
ctl utility (on page 365).
GUI Server, as described in Sending requests to the GUI server using the ctl utility (on page 366).
Forecast Server, as described in Sending requests to the Forecast server using the ctl utility (on page
368).
Configuration Management server, as described in Sending requests to the Configuration
Management server using the ctl utility (on page 370).
Configuration Agent, as described in Sending requests to the Configuration Agent using the ctl utility
(on page 372).
High Availability Server, as described in Sending requests to the High Availability Server using the ctl
utility (on page 373).
BIM Server, as described in Sending requests to the BMC Batch Impact Manager server using the ctl
utility (on page 374).
Self Service server, as described in Sending requests to the Control-M Self Service server using the ctl
utility (on page 375).
359
Control-M Utilities Guide
Sending requests from the Control Shell using the ctl utility
This procedure describes how to run the ctl utility from the Control Shell, which enables you to send
commands to the Control-M/EM server components. These commands are the same as those that you can
run under the -cmdstr parameter, in the ctl command line utility.
To run the ctl utility from the Control Shell:
1. Right-click the required Control-M/EM server component, and select Control Shell.
The Control Shell dialog box is displayed.
2. Click Usage to populate the Result field of the Control Shell dialog box with the commands and
requests available for the specific component.
3. Select the required command, and copy it into the Specify... field of the Control Shell dialog box. You
can also manually enter a specific command.
4. Click Apply.
360
Control-M Utilities Guide
Paramete
r Description
-pf Flat file containing an unencrypted username and password on separate lines
in the format:
user=username
password=password
-reg Checks if the Global Conditions Server is registered in the CommReg table.
-reg cannot be used with -cmd or -cmdstr.
-timeout Indicates the period of time (in seconds) that ctl waits for a response from the
GUI Server before declaring that communication has failed.
Default: 30. Optional.
-diagon Activates tracing of ctl work flow (diagnostics). The results are written to the
ctl_diag.machine.txt file located in the working directory. Optional.
361
Control-M Utilities Guide
ctl example
This example describes specifying a specific server component and computer.
The following table lists examples showing how you can ensure that only specific server components and
computers are selected. In the examples, only the relevant section of the code is displayed.
Command Description
em ctl -U user01 -P pass01 -C Gateway -dc ctm_main Direct the ctl command to the Gateway for data center
ctm_main.
em ctl -U user01 -P pass01 -C GCS -all Direct the ctl command to all Global Conditions Servers.
em ctl -U user01 -P pass01 -C GCS -M wip78 Direct the ctl command to the Global Conditions Server
of the computer named wip78.
em ctl -U user01 -P pass01 -C GUI_Server -name gsr01 Direct the ctl command to the GUI Server on the
computer with the logical name of gsr01.
362
Control-M Utilities Guide
Parameter Description
RETRIVE_U Directs a request to Control-M for z/OS for updated Order method information
SERDAILYO to be sent to the Control-M/EM database.
RDER_
METHOD
-C Gateway Indicates that the command is directed to the gateway. The gateway
mediates between Control-M/EM components and the Control-M installation.
-dc Name of a data center. This name identifies the gateway to which ctl is
sending a command or message. This parameter is used when a query or
command is directed to a specific gateway (as specified by the -C parameter).
-dc cannot be used with -all.
-all Directs a query or command to all components of the gateway (as specified
by the -C parameter).
-all cannot be used with -dc.
The following -cmd values are used for diagnostics and debugging, as
described in Control-M diagnostics.
Diagnostic and non-diagnostic commands can be specified on the same ctl
command line.
change_file Closes the current log and diag files and creates new files.
363
Control-M Utilities Guide
Parameter Description
-cmdstr Specifies a text string to be sent to the gateway. If the text string contains
spaces or tabs, it must be enclosed with double quotation marks (" ").
-cmdstr cannot be used with -reg or -cmd.
Valid values include:
364
Control-M Utilities Guide
Parameter Description
The -cmdstr parameter is used for diagnostic purposes only. For more
information about the -cmdstr parameter, see System configuration.
The ctl utility can be run from the Control Shell. For more information, see To
perform commands using the Control Shell section in ctl (on page 359).
To send requests to the Global Conditions server using the ctl utility:
Type the following command:
[em] ctl -U <em dbo user> -P <em dbo pass> -C GCS {-M <computerName> | -all}
{-reg |-cmd stop |-cmd life_check | -cmd change_file | -cmdstr
"<commandString>"}]
[-timeout <<responseTimeout> (seconds)>] [-diagon]
365
Control-M Utilities Guide
NOTE: You can use a password file name <-pf> instead of using -U and -P.
For more information, see Parameters common to all ctl commands (on page 361) and ctl Global
Conditions server parameters (on page 366).
Paramete
r Description
-C GCS Global Conditions Server to which the command is directed. The Global
Conditions Server handles the distribution of conditions that affect jobs in
more than one data center.
-all Directs a query or command to all Global Conditions Servers. -all cannot be
used with -M.
The following -cmd value is used for diagnostic and debugging purposes,
which is described in Control-M diagnostics.
Diagnostic and non-diagnostic commands can be specified on the same ctl
command line.
change_file Closes the current log and diag files and creates new files.
-cmdstr Specifies a text string to be sent to the Global Conditions Server. If the text
string contains spaces or tabs, it must be enclosed with double quotation
marks (" ").
-cmdstr cannot be used with -reg or -cmd.
The -cmdstr parameter is used for diagnostic purposes only. For more
information about the -cmdstr parameter, see System configuration.
366
Control-M Utilities Guide
Parameter Description
-C GUI_Server Indicates that the command is directed to one or more GUI servers. GUI
servers handle communications between Control-M/EM GUI workstations
and other Control-M/EM components.
-name Logical name of the GUI server. If the GUI server is started without
specifying -name, the logical name of the GUI server is equal to the host
name of the computer where the GUI server is running.
-all Directs a query or command to all GUI servers. -all cannot be used with -M.
get_measure Retrieves statistics from the GUI server and displays them.
This command cannot be specified with other commands
in the same run of the ctl utility.
367
Control-M Utilities Guide
Parameter Description
-cmdstr Specifies a text string to be sent to the GUI server. If the text string
contains spaces or tabs, it must be enclosed with double quotation marks ("
").
NOTE: -cmdstr cannot be used with -reg or -cmd.
Valid values include:
REFRESH_LDAP
REFRESH_HISTORY
For more information about the -cmdstr parameter, see System
configuration.
368
Control-M Utilities Guide
Paramete
r Description
-name Logical name of the Forecast server. If the Forecast server is started without
specifying -name, the logical name of the Forecast server is equal to the host
name of the computer where the Forecast server is running.
-all Directs a query or command to all Forecast servers. -all cannot be used with
-M.
369
Control-M Utilities Guide
Paramete
r Description
-cmdstr Specifies a text string to be sent to the Forecast server. If the text string
contains spaces or tabs, it must be enclosed with double quotation marks (" ").
NOTE: -cmdstr cannot be used with -reg or -cmd.
The usage of -cmdstr is discussed in System configuration.
The following commands are available:
USERDAILY_CLEAN - clean all the info or just the info for one job key in
the USER_DAILY_ZOS folder
Syntax: USERDAILY_CLEAN <CTM name> [dsn] [folder] [file name]
USERDAILY_DATA - The user daily definitions (job ordered, folder list or
user daily list) information gathered in the Control-M/EM database can be
exported to a CSV file. The file can contain the following data:
Data center name
Lib name of job
Folder name of job
Job name
Order type
Target type
Lib name of folder
Folder name
Task mask
RBC mask
ODAT
Force
Order method
370
Control-M Utilities Guide
To send requests to the Configuration Management server using the ctl utility:
Type the following command:
ctl -U <em dbo User> -P <em dbo Pass> -C CMS |
{-M <computerName> |-name <logicalName> | -all}
{-reg |-cmd stop |-cmd life_check |-cmdstr "<commandString>"}
[-timeout <<responseTimeout> (seconds)>][-diagon]
NOTE: You can use a password file name <-pf> instead of using -U and -P.
For more information, see Parameters common to all ctl commands (on page 361) and ctl Configuration
Management server parameters (on page 371).
Paramete
r Description
371
Control-M Utilities Guide
To send requests using the Configuration Agent from the ctl utility:
Type the following command:
ctl -U <emUser> -P <emPass> -C Config_Agent
{-M <Computer_Name> | -all}
{-reg |-cmd stop | -cmd life_check | -cmd shutdown} | -cmdstr
"<commandString>"}]
[-timeout <<responseTimeout> (seconds)>] [-diagon]
NOTE: You can use a password file name <-pf> instead of using -U and -P.
For more information, see Parameters common to all ctl commands (on page 361) and ctl Configuration
Agent parameters (on page 373).
372
Control-M Utilities Guide
Parameter Description
shutdown Stops the Configuration Agent, and all components that the
Configuration Agent administers, without changing their
configurations. This command cannot be specified with
other commands in the same run of the ctl utility.
-cmdstr Specifies a text string to be sent to the Configuration Agent. If the text
string contains spaces or tabs, it must be enclosed with double
quotation marks (" ").
-cmdstr cannot be used with -reg or -cmd.
For more information about the -cmdstr parameter, System
configuration.
Sending requests to the High Availability Server using the ctl utility
This procedure describes how to send simple requests to the High Availability Server using the ctl utility.
To send requests to the High Availability Server using the ctl utility:
Type the following command
ctl -U <em dbo User> -P <em dbo Pass> -C Config_HA
{-M <Computer_Name> | -all}
{-reg |-cmd stop | -cmd life_check | -cmd shutdown} | -cmdstr
"<commandString>"}]
[-timeout <<response Timeout> (seconds)>] [-diagon]
NOTE: You can use a password file name <-pf> instead of using -U and -P.
For more information, see Parameters common to all ctl commands (on page 361).
373
Control-M Utilities Guide
Parameter Description
shutdown Stops the High Availability Server, and all components that
the High Availability Server administers, without changing
their configurations. This command cannot be specified
with other commands in the same run of the ctl utility.
-cmdstr Specifies a text string to be sent to the High Availability Server. If the
text string contains spaces or tabs, it must be enclosed with double
quotation marks (" ").
NOTE: -cmdstr cannot be used with -reg or -cmd.
For more information about the -cmdstr parameter, System
configuration.
374
Control-M Utilities Guide
For more information, see Parameters common to all ctl commands (on page 361) and ctl BMC Batch
Impact Manager server parameters (on page 375).
Paramete
r Description
-C BIM Indicates that the command is directed to a Batch Impact Manager server (if
this component is installed at your site).
-name Logical name of the Batch Impact Manager server. If the Batch Impact
Manager server is started without specifying -name, the logical name of the
Batch Impact Manager server is equal to the host name of the computer where
the Batch Impact Manager server is running.
-cmdstr Specifies a text string to be sent to the Batch Impact Manager server. If the
text string contains spaces or tabs, it must be enclosed with double quotation
marks (" ").
NOTE: -cmdstr cannot be used with -reg or -cmd.
Its usage is discussed in System configuration.
Sending requests to the Control-M Self Service server using the ctl
utility
This procedure describes how to send requests to the Control-M Self Service server using the ctl utility.
To send requests to the Control-M Self Service server using the ctl utility:
Type the following command:
ctl -U <emUser> -P <emPass> -C Self Service Server
{-M <computerName> | -name <logicalName>}
{-reg |-cmd stop |-cmd life_check | -cmdstr "<Command_String>"}
[-timeout <<responseTimeout> (seconds)>] [-diagon]
NOTE: You can use a password file name <-pf> instead of using -U and -P.
For more information, see Parameters common to all ctl commands (on page 361) and ctl Self Service
server parameters (on page 376).
375
Control-M Utilities Guide
Parameter Description
-C Self Indicates that the command is directed to a Self Service Server (if this
Service component is installed at your site).
Server
-name Logical name of the Self Service Server. If the Self Service Server is started
without specifying -name, the logical name of the Self Service Server is equal
to the host name of the computer where the Self Service Server is running.
-cmdstr Specifies a text string to be sent to the Self Service Server. If the text string
contains spaces or tabs, it must be enclosed with double quotation marks
(" ").
NOTE: -cmdstr cannot be used with -reg or -cmd.
Its usage is discussed in System configuration.
orbadmin
The orbadmin (CORBA administration) utility can be used to manage the Naming Service process and the
CORBA configuration file. To run the orbadmin utility, see Running the orbadmin utility (on page 376).
Control-M/EM uses an XML CORBA configuration file that defines CORBA parameters for CORBA
components. The parameters and values in this file can be initialized and modified by the orbconfigure
GUI (see the description of the orbconfigure CORBA configuration GUI in Control-M Administration), and
by the orbadmin utility (described here).
376
Control-M Utilities Guide
orbadmin parameters
The following table lists the orbadmin parameters:
domain show Displays all parameters and values in the configuration file
scope remove <name> Removes a scope and its parameters from the file
scope show <name> Displays parameters and their values in the scope
variable create -scope <scope> Creates a parameter (with or without a value) in the specified scope.
-value <value> <name>
If that scope does not exist, it is created. If the value contains a blank,
enclose the value in double quotes.
variable modify [-scope <scope>] Modifies a parameter value (in the specified scope) of the
-value <value> <name> configuration domain. If the parameter does not exist, it is added
automatically.
If the scope is not specified, the parameter is modified in every scope
that contains it. If the specified value contains a blank, enclose the
value in double quotes.
variable remove -scope <scope> Removes specified parameter from the XML configuration file.
<name>
If the scope is not specified, the parameter is removed from all the
scopes that contain it.
variable show -scope <scope> Displays the specified parameter and its value in the specified (or
<name> default) scope.
If the parameter does not exist in the specified scope, the default
scope is searched.
377
Control-M Utilities Guide
ns register (Windows only) Specifies Naming Service values in the registry and
installs the Naming Service as a Windows service.
ns remove (Windows only) Removes Naming Service values from the registry and
uninstalls the Windows service.
ns stop [-local] Stops the Naming Service. -local is required if a remote Naming
Service is running and you want to stop the local Naming Service.
ns status Checks the status of the configured Naming Service process. Possible
status values: Running, Stopped, and Not installed.
ns resolve Resolves the Naming Service IOR and prints it to the console.
ns list [-ior] Lists all registered objects in the Naming Service with endpoint
information. If -ior is specified, IOR references of the registered
objects are printed to the console.
orbadmin examples
The following are examples of outputs and examples for some of the orbadmin utility commands:
ns status sample output:
Naming service status: Running on remote machine, vered:13075
ns resolve sample output:
IOR:010000000100000000000000010000000000000024000000010102cd06000000766572
65640013330b0000004e616d6553657276696365cd00000000
ns list sample output:
BMC Software: naming context
EM: naming context
vered: naming context
GSR: naming context
XMLInvoker: object reference:Protocol: IIOP, Endpoint:
172.16.131.242:59020
378
Control-M Utilities Guide
379
Control-M Utilities Guide
ctm_agstat
The ctm_agstat utility enables you to list or update the status of an agent. For more information, see
communication status of agents and remote hosts in Component management. To run the ctm_agstat
utility, see Running the ctm_agstat utility (on page 381).
380
Control-M Utilities Guide
ctm_agstat parameters
The following table describes the parameters of the ctm_agstat utility:
Parameter Description
-UPDATE Changes the status of the specified agent to the specified status.
This parameter is mandatory if the -LIST parameter is not
specified
The permissions of the AGSTAT directory must be modified to
allow access to users who will run the ctm_agstat utility with the
-UPDATE parameter.
381
Control-M Utilities Guide
Parameter Description
-DEBUG <debug level> Set the required diagnostic level. Valid values: 0 (no diagnostics)
to 5 (highest level of diagnostics).
ctm_agstat examples
The following are examples of the ctm_agstat utility commands:
To display the current status of agent CMAGENT, type:
ctm_agstat -LIST CMAGENT
To change the status of agent CMAGENT to DISABLED, type:
ctm_agstat -UPDATE CMAGENT DISABLED
ctm_diag_comm
The ctm_diag_comm utility generates a report about the connection details between the specified
Control-M/Agent or remote host and Control-M/Server. You can either specify the host name of a
computer where Control-M/Agent is installed, or the host name of a computer with which you want
Control-M/Server to communicate. To run the ctm_diag_comm utility, see Running the ctm_diag_comm
utility (on page 382).
382
Control-M Utilities Guide
You are prompted for the host name of the Control-M/Agent or remote host.
• To run the utility as a single command:
ctm_diag_comm <agent> | <remoteHost>
For more details on the ctm_diag_comm parameters, see ctm_diag_comm parameters (on page 383).
ctm_diag_comm parameters
The following table lists the ctm_diag_comm utility parameters:
Parameter Description
ctm_diag_comm example
The following is an example of ctm_diag_comm report:
Assume that Control-M/Server is installed on the UNIX computer with host name taurus. Control-M/Agent
has not yet been defined in the Control-M/Server database, so when ctm_diag_comm is invoked, it will try
to generate a report connecting it as an agent or remote host. The report below is displayed after
invoking the following command:
Control-M/Server to Control-M/Agent Communication Diagnostic Report
-------------------------------------------------------------------
CTMS User Name : ctm900sd
CTMS Directory : /home1/ctm900sd/ctm
CTMS Platform Architecture : Solaris
CTMS Installed Version :
CTMS Local IP Host Interface Name : taurus
Server-to-Agent Port Number : 12666
Agent-to-Server Port Number : 7420
Server-Agent Comm. Protocol : TCP
Server-Agent Protocol Version : 07
Server-Agent Connection mode : Transient
Agent Platform Name : mars
Agent Status : Unknown
Agent known Type : Undefined
383
Control-M Utilities Guide
ctmgetcm
The ctmgetcm utility is used to collect, store and display application server information from
Control-M/Agents. To run the ctmgercm utility, see Running the ctmgetcm utility (on page 384).
When the action parameter is set to GET, application server information is collected, stored in a folder
in the Control-M/Server database, and displayed.
When the action parameter is set to VIEW, previously stored application server information is
displayed.
Control-M information is updated only after ctmgetcm is run, or each time ctmgetcm is reconfigured.
384
Control-M Utilities Guide
ctmgetcm parameters
The following table lists the ctmgetcm utility parameters:
Parameters Description
-ACTION Indicates the action that the ctmgetcm utility should perform. Valid values
are:
ctmgetcm example
The following are examples of the ctmgetcm utility commands:
Specify the following command to view existing information for all applications on the Control-M/Agent
sahara computer:
ctmgetcm -host sahara -appltype "*" -action VIEW
Output similar to the following is displayed:
HOST APPLTYPE APPLVER CMVER
------- --------- -------- ------
385
Control-M Utilities Guide
ctmhostmap
The ctmhostmap utility manages the mapping of remote host computers to agents and the conversion of
Control-M/Agents to remote host computers. This utility can be run from the command line, or by using
the Control-M Configuration Manager. For more information about using the Control-M Configuration
Manager, see Introduction to Control-M Configuration Manager. To run the ctmhostmap utility, see
Running the ctmhostmap utility (on page 386).
Each computer that is defined as a remote host is listed in the Control-M/Server database. The
ctmhostmap utility enables you to manage the entries in the database.
386
Control-M Utilities Guide
387
Control-M Utilities Guide
ctmhostmap Actions
The following table describes the actions in the ctmhostmap utility:
Action Description
add Specifies the details of the remote host computer that is being defined in the
Control-M/Server database.
Control-M/Server discovers the specified computer using default remote host
map settings if the following is specified without further parameters:
ctmhostmap -action add -host <remoteHost>
Separate the agent names with a semicolon (;) when adding more than one
agent.
For UNIX: If more than one Control-M/Agent is being added, the entire list must
be enclosed in quotation marks, for example "jupiter;andromeda;taurus".
update Modifies the details of the specified remote host computer in the
Control-M/Server database.
Separate the agent names with a semicolon when adding more than one agent.
For UNIX: If more than one Control-M/Agents are being added, the entire list
must be enclosed in quotation marks, for example "jupiter;andromeda;taurus".
Control-M/Server replaces the existing settings of a remote host with the
settings of Default if the following command is specified:
ctmhostmap -action update -host "<Default>"
delete Deletes the details of the specified remote host computer in the
Control-M/Server database.
list Lists the details of the specified remote host computer in the Control-M/Server
database. The resultant list includes all remote host computers and their
statuses, except when list is specified with -host (see description below).
388
Control-M Utilities Guide
ctmhostmap parameters
The following table lists the ctmhostmap utility parameters:
Paramete
r Description
-force Override a regular agent computer that has the same name as the specified
computer. Optional.
This option is used in order to convert regular agent to remote host. For more
information, see the appendix in the in Defining a remote host.
-host Specifies the name of the remote host computer or <Default>. The name of
the host cannot exceed 50 characters.
This parameter is:
mandatory when specified with add, update, and delete
optional when specified with list
<Default > is not applicable if the delete action is specified.
If -host is specified with -list, the remote host is not <Default>, and the status
is not Discovering, then the details of the specified remote host are displayed.
The output includes the following:
all the remote host definition parameter values
remote host status
status of each agent, showing which remote host is defined to be available
through it
To view the "Default Remote Settings", specify the following command:
ctmhostmap -action list -host "<Default>"
-agent List of agent names, separated by semi-colons (;). For UNIX: Enclose the
entire list in quotation marks.
This parameter is:
mandatory when specified with add
optional when specified with update
For example, to list more than one Control-M/Agent, the entire list must be
separated by semi-colons, for example pluto;mars;saturn. For UNIX, the list
would be: "pluto;mars;saturn".
389
Control-M Utilities Guide
Paramete
r Description
-protocol Indicates which protocol is used by the agent to execute jobs on the remote
host computer. Mandatory. Valid values are:
SSH – Secure Shell (SSH) for UNIX or Windows computers
WMI – Windows Management Instrumentation (WMI) for Windows
computers
If SSH is specified, then the following parameters must be specified:
-sshport Specifies the SSH port number that the SSH daemon is
listening to on the remote host computer. Valid value: 22 or
an integer from 1024 through 65535
-outputdir Indicates the directory used for the OUTPUT files created by
jobs that have been submitted. The name of the outputdir
cannot exceed 1,024 characters.
NOTE: Configure the specified directory on the remote host
as a shared directory, with the shared name of OUTPUT.
ctmhostmap examples
The following are examples of the ctmhostmap utility commands:
To add remote host mars to the Control-M/Server database, mapped through Control-M/Agents pluto,
neptune, and venus, using SSH protocol, run the following command:
390
Control-M Utilities Guide
ctmhostmap -action add -host mars -agent "pluto;neptune;venus" -protocol ssh -sshport 54 -sshalg des
-compression N
The following message is displayed:
Remote host added successfully.
To add remote host saturn, mapped through Control-M/Agent jupiter, using WMI protocol, run the
following command:
ctmhostmap -action add -host saturn -agent jupiter -protocol wmi -outputdir
d:\\ctm\\data
The following message is displayed:
Remote host added successfully.
As described above, but the OUTPUT directory contains spaces. Run the following command:
ctmhostmap -action add -host saturn -agent jupiter -protocol wmi -outputdir
"c:\ctm eur\data"
The following message is displayed:
Remote host added successfully.
To add remote host saturn, mapped through Control-M/Agents jupiter, andromeda, and taurus using SSH
protocol, run the following command:
ctmhostmap -action add -host mars -agent "jupiter;andromeda;taurus" -protocol
ssh -sshport 22 -sshalg blowfish -compression N
The following message is displayed:
Remote host added successfully.
When modifying an existing entry, only the parameters that are being updated are mandatory. To change
the SSH port number of remote host mars from 54 to 48, and to change the SSH algorithm from DES to
3DES, run the following command:
ctmhostmap -action update -host mars -sshport 48 -sshalg 3des
The following message is displayed:
Remote host updated successfully.
To delete remote host mars from the Control-M/Server database, specify the following command:
ctmhostmap -action delete -host mars
The following message is displayed:
Action ‘delete’ ended successfully.
To display a list of remote hosts, run the following command:
ctmhostmap -action list
The following report is displayed:
Remote Host Status
orion Available
taurus Unavailable
391
Control-M Utilities Guide
pegasus Unavailable
Action ‘list’ ended successfully.
To display the details of remote host orion, run the following command:
ctmhostmap -action list -host orion
The following report is displayed:
Remote host ‘orion’ settings:
Protocol : SSH
Port Number : 22
Encryption : BLOWFISH
Compression : NO
Agents : (comet) (meteor) (cyborg)
Remote Host Status : Available
Agents Statuses : (comet: Available) (meteor: Available) (cyborg:
Available)
Action ‘list’ ended successfully.
ctmhostgrp
The ctmhostgrp utility is used to maintain and view host groups. This utility provides the command line
facility for running the options available from the Host Group Menu. To run the ctmhostgrp utility, see
Running the ctmhostgrp utility (on page 392).
The Host Group menu is used to maintain and view host groups. Host groups are used by the
Control-M/Server load-balancing function. For additional instructions, see Host group management.
392
Control-M Utilities Guide
[ -VIEW |
-ADD <hostid> |
-DELETE <hostid> ] |
For more details on the ctmhostgrp parameters, see ctmhostgrp parameters (on page 393).
ctmhostgrp parameters
The following table lists the ctmhostgrp utility parameters:
Variable Description
-DELETE Prompts for the name of the host group to delete from the specified
group.
393
Control-M Utilities Guide
ctmping
The ctmping utility tests, configures, and reports on the connection and availability between
Control-M/Server and Control-M/Agents or remote host computers. To run the ctmping utility, see
Running the ctmping utility (on page 394).
ctmping can be included in the Watchdog process. For more information, see Watchdog process
parameters.
This utility can check if an agent or remote host is down and, if required, register it in the database as
unavailable. When the agent or remote host again becomes available, the state is changed and
information about it is gathered by a Control-M/Server process.
You cannot ping the agent if the agent is upgrading. When the agent becomes available again, then you
can ping the agent. The following error message appears:
Cannot ping the agent. Agent is upgrading.
394
Control-M Utilities Guide
ctmping parameters
The following table lists the ctmping utility parameters:
Parameter Description
-HOSTID Host name of the agent or remote host computer to be pinged (tested).
At least one Host ID must be specified for each run of the ctmping utility.
Additional Host IDs can optionally be specified to enable a single run of this
utility to test communication with more than one agent computer.
395
Control-M Utilities Guide
Parameter Description
-FILE Full path and name of a file containing a list of host computers to be pinged.
Each line in the specified file contains:
the name (host ID) of the agent or remote host (mandatory)
the HOSTTYPE (optional)
The delimiter between the name and the HOSTTYPE is a blank or any number
of blank spaces.
Where the computer type is not specified, a discovery process attempts to
determine the type to be used. See -HOSTTYPE above.
EXAMPLE: Assume the following computers must be pinged:
Name Type
dime not specified
comet Control-M/Agent
mars remote host computer
EXAMPLE: The text below specifies the above details in a file:
dime
(HOSTTYPE is not specified)
comet REGULAR
mars REMOTE
-DEBUG Activates a debug trace at the specified level. Valid levels: 0 through 5.
Default: 0. Performance is slower when operating in debug mode. BMC
recommends that you activate debug mode only when requested by Technical
Support and use the specified level.
396
Control-M Utilities Guide
Parameter Description
ctmping examples
To connect and perform a communication test with the agent jacklin, specify the following command:
ctmping -hostid jacklin
The response is:
Agent: jacklin is alive
To attempt to connect and test communication with agent diana (that is currently down), specify the
following command:
ctmping -hostid diana
The response is:
Agent: diana, Msg: Agent not available.
Add it to the database? y/n:
To connect and test communication with the agent jacklin and collect configuration information needed
for the discovery process, specify the following command:
ctmping -hostid jacklin -discover y
The response is:
Agent: jacklin is alive
To connect and test communication with the agent jacklin and generate a debug trace without displaying
the results on screen, specify the following command:
ctmping -hostid jacklin -debug 1 -quiet
Only the return code of the utility indicates if it was successful. The debug trace information is saved to
the following file:
~<controlm_owner>/ctm_server/proclog/ping<PID>_<PID>.log
PID is the Process Identity number.
The agents, comet and mars, have been configured to connect to remote host dime. To generate a report
showing the result of the test and the connection details, specify the following command:
ctmping -hostid dime -hosttype remote -fulldetails
397
Control-M Utilities Guide
398
Control-M Utilities Guide
ctmshout
The ctmshout utility sends a message to the specified user or destination using the specified severity
level. For information about Shout message destinations, see Shout destination management. For
information about attaching the OUTPUT of a job to Shout messages, see the E-mail configuration
parameters. To run the ctmshout utility, see Running the ctmshout utility (on page 399).
Each parameter name can be shortened to the minimum number of letters required to uniquely identify
the parameter. For example: -ORDERID can be shortened to -O.
Shout messages can be sent to multiple destinations or users in the same command
399
Control-M Utilities Guide
ctmshout parameters
The following table lists the ctmshout utility parameters:
Parameter Description
<username> User ID that should receive the message. DEST and USER can be
specified in the same ctmshout command.
<message> Free text to be sent to the destination (1 - 255 characters). If the text
is more than one word, it must be enclosed in quotation marks.
<hostID> Host ID of the agent computer. Used for messages whose destination
is either a user in the data center or a user defined in the Shout
Destination folder.
NOTE: If -ORDERID is also specified, this Host_ID overrides the Host
ID specified in the job with that Order ID.
<severityLevel> One letter character indicating the urgency of the message. Valid
values:
R – Regular (Default)
U – Urgent
V – Very urgent
<fullPathFileName> Name and full path of a file containing the utility parameters. In this
file, each parameter and its values (if any) are on a separate line with
the same syntax they would have on the command line. The
-input_file parameter enables you to:
Prepare and save files of utility parameters that can be reused.
Specify utility input longer than the number of characters allowed
in the command line.
-input_file~<controlm_owner>/ctm_server/data/ctms
hout_parms.txt
400
Control-M Utilities Guide
ctmshout examples
The following are examples of the ctmshout utility commands:
The following command sends the message "File not found" to the Alerts window in Control-M/EM and
associates it with a job whose Order ID is 1234:
ctmshout -ORDERID 1234 -USER EM \
-MESSAGE "File not found" -SEVERITY V
The same result is achieved by using the -input_file parameter as follows:
ctmshout -input_file ~<controlm_owner>/ctm_server/data/ctmshout_payroll.txt
The referenced file contains the following lines:
-ORDERID 1234
-USER EM
-MESSAGE "File not found"
-SEVERITY V
The following command sends the message "The weekly paycheck job has abended" to user John on
agent computer diana:
ctmshout -HOSTID diana -USER John -MESSAGE
"The weekly paycheck job\ has abended" -SEVERITY V
The following illustrates the use of the ctmshout utility in a job script command to send the Shout
message "Job started" to the Alerts window in Control-M/EM.
The job processing definition for a certain job contains the following Variable Assignment parameter:
%%PARM1 = %%ORDERID
The script used to execute the job contains the following command:
ctmshout -O $1 -USER EM -MESSAGE "Job started" \
-SEVERITY R
ctmshtb
The ctmshtb utility specifies the active Shout Destination folder. To run the ctmshtb utility, see Running
the ctmshtb utility (on page 402).
You can add, delete, and modify Shout Destination folders using the ctmsys utility, described in ctmsys
(on page 448) . The ctmsys utility can also be used to specify the active Shout Destination folder
interactively.
The Shout Destination folder associates physical output destinations with logical destination names. The
names are specified in Shout and Do Shout statements in job processing definitions and in the ctmshout
utility. For more information, see Shout destination management.
By defining Control-M jobs that execute this utility at specified times, the active Shout Destination folder
designation can be changed automatically according to the schedule that suits your installation.
401
Control-M Utilities Guide
ctmspdiag
The ctmspdiag utility is a tool to print or erase diagnostic messages recorded from stored procedures
(SPs) in the Control-M/Server database. ctmspdiag can also set or show the diagnostic request status of
SPs. To run the ctmspdiag utility, see Running the ctmspdiag utility (on page 402).
402
Control-M Utilities Guide
ctmsuspend
The ctmsuspend utility suspends and restores Control-M/Server communication process for mass uploads
and downloads from Control-M/EM. During suspension mode, Control-M deactivates its job processing
functions by suspending the TR, SL, NS, LG, and WD processes. To run the ctmsuspend utility, see
Running the ctmsuspend utility (on page 403).
This utility should be invoked before executing the Mass Upload or Mass Download features on the
Control-M.
init_prflag
The init_prflag utility resets sleep times and trace levels for Control-M/Server processes. To run the
init_prflag utility, see Running the init_prflag utility (on page 404).
This utility performs the following actions:
The sleep times for all Control-M/Server processes are reset to their initial (installation) values. See
the table below.
The trace level for all Control-M/Server processes is reset to zero.
The sleep time setting for Control-M/Server processes can affect the functionality of Control-M/Server and
the performance of your data center. Sleep time is the length of time that a process lies dormant before
"waking up" to check if any request to perform an action was received. When modifying certain
Control-M/Server process sleep time settings, it is important to consider the number of jobs that are
processing, the job schedule plan, and the overall load on the computer.
403
Control-M Utilities Guide
404
Control-M Utilities Guide
Sleep Time
Initial
Process Task Settings Sleep Time Modification Considerations
RT Inter-process 30 No effect
Communication Router
SL Job Selector and job post 5 Increase: Delay in Job Submission and Shout
processing messages for late submission. Can be increased
during period of minimal job processing.
Decrease: Additional CPU resources.
CS N/A No effect
CA N/A No effect
405
Control-M Utilities Guide
shut_ca
The shut_ca utility shuts down the Control-M/Server Configuration Agent. To shut down the
Control-M/Server Configuration Agent, see Shutting down Control-M/Server Configuration Agent using the
shut_ca utility (on page 406).
shut_ctm
The shut_ctm utility shuts down Control-M/Server and its processes. To run the shut_ctm utility, see
Shutting down Control-M/Server using the shut_ctm utility (on page 406).
406
Control-M Utilities Guide
shut_ctm
show_ca
The show_ca utility displays the status of Control-M/Server Configuration Agent. To view the status of the
Control-M/Server Configuration Agent, using the show_ca utility, see Viewing Control-M/Server
Configuration Agent status using the show_ca utility (on page 407).
shutdb
The shutdb utility shuts down the SQL database server.
The SQL database server can also be shut down using ctm_menu and then selecting Control-M
Manager menu. For more information about the ctm_menu, see ctm_menu (on page 428).
To shut down the SQL database server, using the shutdb utility, see Shutting down the SQL database
server using the shutdb utility (on page 407).
Shutting down the SQL database server using the shutdb utility
This procedure describes how shut down the SQL database server, using the shutdb utility.
407
Control-M Utilities Guide
start_ca
The start_ca utility starts the Control-M/Server Configuration Agent. To run the start_ca utility, see
Starting Control-M/Server Configuration Agent using the start_ca utility (on page 408).
start_ctm
The start_ctm utility starts Control-M/Server. To start Control-M/Server using the start_ctm utility, see
Starting Control-M/Server using the start_ctm utility (on page 408).
To start Control-M/Server:
1. Do one of the following:
• UNIX: Log on to a Control-M/Server account
• Windows: Open a command prompt window where Control-M/Server is installed.
2. Type the following command:
start_ctm
408
Control-M Utilities Guide
startdb
The startdb utility starts the SQL database server. The SQL database can also be started using the
ctm_menu and then selecting Control-M Manager menu. For more information about the ctm_menu,
see ctm_menu (on page 428).
To start the SQL database server using the startdb, Starting the SQL database server using the startdb
utility (on page 409).
ctm_pause
The ctm_pause utility stops Control-M/Server from submitting jobs. To stop Control-M/Server from
submitting jobs using the ctm_pause utility, see Stopping Control-M/Server from submitting jobs using the
ctm_pause utility (on page 409).
409
Control-M Utilities Guide
ctmchangeshdir
The ctmchangeshdir changes the shared directory path that is used for the PostgreSQL replication in a
high availability environment. It is also used for Control M/Server to share information between the two
computers.
To run the ctmchangeshdir utility, see Running the ctmchangeshdir utility (on page 410).
ag_diag_comm
BMC recommends that you verify the ability of the agent computer to communicate with the primary
Server computer and with all other authorized Server host computers.
Control-M/Agent includes a diagnostic program that checks parameters and environmental conditions
relevant to communication between the agent and server computers. This program is typically used at the
request of Technical Support to determine the cause of a communication problem.
410
Control-M Utilities Guide
ag_diag_comm
The Control-M/Agent Communication Diagnostic Report is displayed. See check output below.
If the user is not the administrator, the ag_diag_comm command cannot display all the details.
411
Control-M Utilities Guide
Network disconnections
Control-M/Agent requires an open connection to a remote host from the time of job submission until the
end of the job. If a network disconnection occurs, Control-M/Agent attempts to restore the connection.
During the reconnection attempts, jobs running on the remote host, through the specified
Control-M/Agent, remain in executing status.
If the connection is restored, the status of jobs is updated to reflect their current status, either completed
or still running. If the connection is not restored after the specified number of attempts, the jobs end with
NOTOK status.
The handling of network disconnections to remote hosts is supported when you use remote hosts on
UNIX, Linux, and z/OS USS (using SSH) and when you use remote hosts on Windows (using WMI).
The OUTPUT and exit code for jobs are stored in files on the remote host. The files reside in the user
home directory of the job’s owner, in the directory specified by RJX_OUTPUT_DIR. (For more information
about RJX_OUTPUT_DIR, see the table below.) If network connections were restored, these files are
deleted when the jobs end. If network connections were not restored, you can check these files to see if
the jobs completed successfully or failed.
The following section describes how to use configuration parameters to modify recovery settings when a
network disconnection occurs.
412
Control-M Utilities Guide
ag_ping
The ag_ping utility verifies Control-M/Server is active on the Server computer connected to the agent
computer. To run the utility, see Running the ag_ping utility (on page 414).
413
Control-M Utilities Guide
shagent
(UNIX only) The shagent utility checks that the p_ctmag and p_ctmat processes are running. It can be
invoked only from the Control-M/Agent computer. To run the utility, see Running the shagent utility (on
page 414).
414
8
8
Administration and configuration
The administration and configuration utilities perform various administration and configuration tasks. By
including a utility command in the command line of a job processing definition, you can run the utility at a
predetermined time or under a predetermined set of conditions without being present.
The following table describes the utilities used for administration and configuration tasks.
Utility Description
agkeystore (on Create, apply, and restore keys for job owners credentials using a
page 419) Blowfish algorithm.
ctmagcpk (on page Enables you to change a key's password and apply the new key to job
423) owners credentials for all installed Application Plug-ins (that support
the AES algorithm).
ccmcli (on page Performs basic management operations and deletes old alerts.
424)
ctm_menu (on Interactive menu that provides access to a variety of functions and
page 428) utilities that are used to maintain Control-M/Server.
ctmag (on page Agent Configuration utility that is used to maintain Control-M/Agent
428) configuration parameters, and to view and modify most of the
operating system parameters.
ctmkeystore_mng Creates, modifies, and deletes keys with secure information such as
(on page 438) passwords.
415
Control-M Utilities Guide
Utility Description
ctmldnrs (on page Creates and loads the Manual Conditions file.
442)
ctmlog (on page Performs a selective cleanup of the Control-M log or produces a report
445) of Control-M log entries.
ctmsys (on page Maintains Control-M/Server system parameters and Shout Destination
448) tables.
Running the Enables you to view and modify most of the configuration parameters
ctmunixcfg utility in the OS.dat file.
(on page 456)
ctmwincfg (on page Enables you to view and modify the Application Add-on for Windows
456) configuration parameters.
ecaqrtab (on page Performs operations on quantitative resources in the Resources table.
457)
emmftcli (on page Enables you to search for file transfers in Control-M based on search
461) and filter parameters from a command line.
emcha -restore (on Restores high availability data to the Control-M/EM primary or
page 465) secondary host
purge_xalerts (on Deletes exception alerts from the Exception Alerts table in the
page 467) Control-M/EM database.
Health Check utility Scans and collects system information about the environment.
(on page 473)
416
Control-M Utilities Guide
ag_change_password
The ag_change_password utility, enables you to automate password changes of Application Plug-ins
accounts. To run the utility, see Running the ag_change_password utility (on page 417).
NOTE: Control-M MFT is not supported.
417
Control-M Utilities Guide
ag_change_password parameters
The following table describes the parameters in the ag_change_password utility:
Parameter Description
-application_type The type of Application Add-on installed on this agent. Valid values are:
CLOUD – Control-M for Cloud
DATABASE – Control-M/EM database
ETL_INFA – Control-M for Informatica
FILE_TRANS – Control-M for Advanced File Transfer
PS8 – Control-M for PeopleSoft
SAP (Only from 7.0.00) – Control-M for SAP
SAP_BO – Control-M for SAP Business Objects
ORACLE_BI: Control-M for Oracle Business Intelligence
BACKUP: Control-M for Backup
DATASTAGE: Control-M for Datastage
JAVA MSG WS: Control-M for Web Services, Java and Messaging
418
Control-M Utilities Guide
Wildcards must be enclosed with single quotations (' ') or with double quotations " " according to the
requirements of the UNIX shell in which the ag_change_password utility is activated.
agkeystore
The agkeystore utility enables you to create, apply, and restore keys to encrypt job owners credentials
using a Blowfish algorithm. To run the agkeystore utility, see Running the agkeystore utility (on page
419).
Changes to the Blowfish encryption key made using the agkeystore utility must also be made in
Control-M/Server using the ctmkeystore_mng utility.
419
Control-M Utilities Guide
420
Control-M Utilities Guide
agkeystore options
The following table describes the options in the agkeystore utility:
Option Description
Add new key Creates a new Blowfish encryption key in the agkeystore.kdb file.
After selecting the Add new key option, you are prompted to enter an
input file name to the file that contains the key. Ensure that you specify the
full path to this file.
If a new Blowfish key was added earlier but was not yet applied by
completing the Apply new key procedure, you are prompted to either
overwrite the earlier Blowfish key with a newer Blowfish key or leave the
Blowfish key that was created earlier intact and not create a subsequent
newer Blowfish key.
When Control-M/Agent is running on Windows computers and configured
with LOGON_AS_USER logon option, a new PASSWRDS file containing all
the job owners and their passwords encrypted with the new key is created.
The original PASSWRDS file is not changed.
After adding a new key, only use ctmpwd to create and modify
Control-M/Agent users and passwords when you have completed the Apply
new key procedure.
Apply new The new key replaces the existing Blowfish encryption key in the
key agkeystore.kdb file used by Control-M/Agent and the PASSWRDS file is
replaced with the new PASSWRDS file that is created in the Add new key
option when Control-M/Agent is running on Windows computers and
configured with LOGON_AS_USER logon option.
Immediately after applying the new key, restart Control-M/Agent for the
new Blowfish encryption key to be used.
Restore Replaces the existing Blowfish encryption key entry in the agkeystore.kdb
default key file with the default Blowfish encryption key that is used by Control-M.
When Control-M/Agent is running on Windows computers and configured
with LOGON_AS_USER logon option, the PASSWRDS file is saved with the
job owners and their passwords encrypted with the default key.
Immediately after restoring the default key, restart Control-M/Agent for the
new Blowfish encryption key to be used.
421
Control-M Utilities Guide
agkeystore actions
The following table describes the actions in the agkeystore utility:
Action Description
-agent (Windows only) Specify the name of the agent whose Blowfish encryption of
job owners credentials are being modified.
-key Specify the type of encryption key. Enter the value BLOWFISH
-action Specify the action that the utility must take on the agkeystore.kdb file. The
valid values are:
add – creates a new Blowfish encryption key in the agkeystore.kdb file
If a new Blowfish key was added earlier but was not yet applied by completing
the Apply new key procedure, you can either overwrite the earlier Blowfish
key with a newer key or leave the Blowfish key that was created earlier intact
and not create a subsequent newer Blowfish key.
apply – the updated Blowfish encryption key replaces the existing Blowfish
encryption key in the agkeystore.kdb file
The Control-M/Agent must be restarted for this action to take effect.
restore – replaces the existing Blowfish encryption key in the agkeystore.kdb
file with the Blowfish encryption key that is used by Control-M
The Control-M/Agent must be restarted for this action to take effect.
-input Specify the full path to the file that contains the Blowfish encryption key.
The maximum length of the key is 32 characters (256 bits) long.
-replace Replace a new Blowfish encryption key that was created but that has not yet
been applied by completing the Apply new key procedure.
-replace is relevant only when -action add is specified and another Blowfish
encryption key was added but has not yet been applied. In this case use
-replace to overwrite the existing Blowfish encryption key entry with the new
Blowfish key. The valid values are:
Y – replace existing new Blowfish encryption key if it exists
N – do not replace the Blowfish encryption key
422
Control-M Utilities Guide
ctmagcpk
The ctmagcpk utility enables you to change a key's password and apply the new key to job owners
credentials for all installed Application Plug-ins (that support the AES algorithm). When this utility runs for
the first time, it migrates the credentials from BlowFish to a new AES-256 key. In case of failure, the
utility can be used to restore previous credentials and key. To run the ctmagcpk utility, see Running the
ctmagcpk utility (on page 423).
NOTE: When uninstalling Control-M/Agent version 9.0.00 fix pack 3, the utility enables you revert to
BlowFish.
ctmagcpk options
The following table describes the options for the ctmagcpk utility:
Options Description
423
Control-M Utilities Guide
ccmcli
The ccmcli utility enables you to interactively perform basic administrative tasks on Control-M components
on the Control-M/EM, Control-M/Server and Control-M/Agent, including the following tasks:
Starting
Stopping
Ignoring
Recycling
Viewing details about the component or server
Removing old alerts
Deleting history of job or group definitions
Deleting Control-M/Agent or remote host component
To run the ccmcli utility, see Running the ccmcli utility (on page 424).
424
Control-M Utilities Guide
ccmcli parameters
The following table lists the ccmcli utility parameters:
Parameter Description
-pf Flat file containing an unencrypted username and password on separate lines
in the format:
user=username
password=password
425
Control-M Utilities Guide
Parameter Description
-cmd The command you want to run on the agent configuration server or
component. Valid values are:
start
stop
ignore
recycle
details
remove_old_alerts
erase_jobs_history
delete_agent
delete_remote_host
deploy
If the component type is -t CTM_Agent, only -cmd recycle is supported.
When you specify the -force flag, and the recycle command for a
Control-M/Agent, you can force recycling of a Control-M/Agent, even if jobs
are running on it or on a remote host computer.
You must specify the -date flag, when you specify the remove_old_alerts
command.
You must specify the -node_id flag, when you specify the delete_agent and
delete_remote_host commands.
You must specify the Control-M/Server where the Control-M/Agent and
Remote Host are defined, when you specify the command type, name , and
host for the delete_agent and delete_remote_host commands.
You must specify the -keep_days flag, when you specify the
erase_jobs_history command. All jobs above the specified number are
deleted.
Deploy: The following flags must be specified:
-action <install|transfer|transfer_and_install>
-agent
-ctm_server
-package
NOTE: If the action is install, you must specify -activity_id. If the action is
transfer or transfer and install, you must specify-activity_name.
426
Control-M Utilities Guide
Parameter Description
-date The date from which alerts must be kept. Alerts older than the specified date
are removed. Enter the date in the format YYYYMMDD. Use this parameter
when specifying -cmd remove_old_alerts. All alerts received up to and
including the specified date are deleted.
-keep_days The number of days to keep job or group definition history. Use this
parameter when specifying -cmd erase_jobs_history. All versions older
than the specified number of days will be deleted.
-force The command to force the component to recycle. Valid values are:
Y
N
When -cmd recycle is specified for an agent (-t CTM_Agent), you can
specify the -force to force Control-M/Agent to recycle even if jobs are
running on the agent or remote host computer through the agent.
ccmcli example
Use the following command to perform the administrative task of starting Control-M/Server on the alpine
host computer from the command prompt.
ccmcli -pf dailyuser -s alpha -t CTM_Server -n alpha_server -h alpine -cmd start
The following command keeps the last 15 days of job definition history for user user014 and deletes the
older versions of the job definition history. The output of the utility shows the number of versions before
and after the deletion. However, jobs can be running while the utility is executing so the difference
between them is not necessarily the number of versions that were deleted.
ccmcli -u user014 -p pass104 -cmd erase_jobs_history -keep_days 15 -s server04
Utility output:
Number of old versions before deletion: 8512.
Number of old versions after deletion: 3478.
427
Control-M Utilities Guide
ctm_menu
ctm_menu (Control-M Main Menu) is a utility that invokes an interactive menu that provides access to a
variety of functions and utilities that are used to maintain Control-M/Server. To run the ctm_menu utility,
see Running the ctm_menu utility (on page 428).
Control-M Manager: Enables you to check, start and stop Control-M/Server, Control-M/Server
database, and Control-M/Server Configuration Agent.
Database Menu: Facilitates day-to-day maintenance and diagnostics of Control-M/Server database.
You can also access the Database Menu directly, as described in dbu_menu (on page 563).
Security Authorization: Enables you to adds delete users/groups and backup and restore security
definition tables in the Control-M Security database.
Parameter Customization: Enables you to view and edit communication parameters.
Host Group: List, edit and delete host groups. For more information, see ctmhostgrp (on page 392)
View HostID details: Enables you to view HostID details
Agent Status: View and edit Control-M/Agent details
Troubleshooting: Enables you to set diagnostics and various restart procedures.
ctmag
The Agent Configuration (ctmag) utility is a Java application used to maintain Control-M/Agent
configuration parameters, and to view and modify most of the operating system parameters. If the user
running the utility is not an administrator, changes made to agent configuration parameters will not be
saved. Running the ctmag utility interactively is described in Control-M/Agent parameters. To run the
ctmag utility, see Running the ctmag utility (on page 429).
428
Control-M Utilities Guide
ctmagcfg
The ctmagcfg interactively configures Control-M/Agents. This utility can also be accessed as a Java
application. For more information, see Control-M/Agent parameters.
To run the ctmagcfg utility, see Running the ctmagcfg utility (on page 429).
ctmagcln
The ctmagcln utility sends a request to all available Control-M/Agents, or to a specified Control-M/Agent,
to remove all output files and exit status files that are no longer needed. This utility should run while
Control-M/Server is up and running. The files that are no longer needed are determined according to the
Maximum Days to Retain Output Files parameter. For more information, see the description of the Output
parameters parameter. To run the ctmagcln utility, see Running the ctmagcln utility (on page 430).
The New Day procedure can request that Agents remove OUTPUT files and exit status files that are no
longer needed. In an environment with multiple Agents, it can take a long time to send the cleanup
request to the Agents during New Day. BMC recommends that you use the
AGENTS_CLEANUP_IN_NEWDAY configuration parameter to disable this action during the New Day
procedure, and instead use the ctmagcln utility. For more information, see the description of the
Configuration parameters configuration parameter.
The ctmagcln utility can be run as a daily job. A message is added to the IOALOG when the cleanup of
the Agents has ended.
429
Control-M Utilities Guide
Parameter Description
* Specifies that all Agents remove OUTPUT files and exit status files that
are no longer needed.
agentName Specifies that the specified agent must remove OUTPUT files and exit
status files that are no longer needed.
outputRetainDays Specifies the number of days that OUTPUT files must be retained before
being removed. Default: 1
NOTE: BMC recommends running ctmagcln as soon as possible after the New Day procedure is complete.
430
Control-M Utilities Guide
ctmdiskspace
The ctmdiskspace utility checks the amount of free disk space on a device and displays the result. The
utility returns a "failed" status if the current free space is below the specified limit.
The ctmdiskspace utility can be included in the Control-M Watchdog process. For more information, see
Watchdog process parameters. To run the ctmdiskspace utility, see Running the ctmdiskspace utility (on
page 431).
ctmdiskspace parameters
The following table describes the parameters of this command:
Parameter Description
amount Specifies the minimum amount (%, K, or M) of free space on the device
as a whole number (integer).
For example: -limit 25%
path_name Specifies the full path name of the device. Multiple devices can be
specified on the command line (see the second example below).
More than one -path <pathName> statement can be specified for each run of the ctmdiskspace utility.
431
Control-M Utilities Guide
ctmkeygen
The ctmkeygen utility generates SSH private and public key pairs. To run the ctmkeygen utility, see
Running the ctmkeygen utility (on page 432).
When creating or modifying the job owner definition, you can choose to use either public or private key
authentication instead of password authentication. For more information about using the Control-M
Configuration Manager, see Introduction to Control-M Configuration Manager.
The ctmkeygen utility manages the key table that contains the logical key name as the unique table key,
the private key, and the key passphrase (encrypted). The generated public key (unencrypted) is stored in
a file.
432
Control-M Utilities Guide
433
Control-M Utilities Guide
Action Description
add Creates a new entry in the key table. It also verifies that a key with the same
name does not exist. All the parameters are mandatory.
update Modifies the details of an existing entry in the key table. The entry includes the
same fields as used to create a new key pair. The updated entry replaces the
existing entry in the key table in the database and the public key file. The
passphrase must match the one that was used to create the existing key.
For the optional parameters, if a value not specified, the value stored in the
Control-M/Server database is used.
delete Deletes the entry associated with the logical key name. The passphrase must
match the one that was used to create the existing key.
list Returns a list of lines, each containing: the logical key name, type, bits, and
format.
export Exports the details of the keys stored in the key table to a text file.
ctmkeygen -action export -filename
$HOME/ctm_server/data/key_details.txt
import Imports the details of the keys stored in the key table. Using the import
parameter enables you to:
prepare and save files of keys that can be reused
specify utility input longer than the number of characters allowed in the
command line
ctmkeygen -action import -filename
$HOME/ctm_server/data/key_details.txt
434
Control-M Utilities Guide
Parameter Description
-name Logical name of the key that is used as a unique identifier. It also determines
the name of the public key file. The name is comprised of letters, numbers,
and underscores.
-type Specifies the standard used for the key. Mandatory when used with add,
optional when used with update. Valid values are:
RSA
DSA
-bits Specifies the strength of the encryption key in bits. Mandatory when used
with add, optional when used with update. Valid values are:
512
768
1024
2048
3076
The minimum value of the bits must be at least equal to the minimum value
of bits specified for the SSH server.
-format Specifies the public key file format. It must match the format used by the
SSH server. Mandatory when used with add, optional when used with
update. Valid values are:
openssh – for OpenSSH servers
ssh2 – for ssh2 servers
-path Specifies the location where the public key file is created.
-filename Specifies the public key name. The format of the file depends on what is
specified for the –format parameter, described above.
-data Describes what action to take with the imported data from the text file.
Specify one of the following:
append the details of the SSH keys from the imported text file are added
to the existing SSH keys
435
Control-M Utilities Guide
Parameter Description
truncate the details of the SSH keys from the imported text file replace
the existing SSH keys
Parameter Value
passphrase myphrase
type dsa
bits 512
format ssh2
path /home/ctm900
436
Control-M Utilities Guide
437
Control-M Utilities Guide
ctmkeystore_mng
The ctmkeystore_mng utility enables you to do the following actions:
For Remedy – create, modify, and delete user names and passwords.
For Blowfish – add, apply, and restore encrypted keys for user authorizations (job owners
credentials).
To work with Do Remedy, first activate this utility.
To run the ctmkeystpre_mng utility, see Running the ctmkeystore_mng utility (on page 438).
The options in this menu and in all other menus provided by this utility can be selected by typing the
option number or command letter and pressing <Enter>.
REMEDY Keystore
Specify the ctmkeystore_mng utility to create, modify, and delete Remedy user names and passwords.
To access the Remedy Keystore menu, see Running the REMEDY Keystore menu (on page 439). To
create, delete or modify the user and passwords, see the following:
438
Control-M Utilities Guide
Parameter Description
user Specifies a user name. Specify an alphanumeric value from 1 through 127
characters long.
439
Control-M Utilities Guide
BLOWFISH Keystore
Specify the ctmkeystore_mng utility to add, apply, and restore encrypted keys for user authorizations (job
owners credentials). For information about changes to the Blowfish key in Control-M/Agent, see
agkeystore (on page 419). To access the BLOWFISH keystore menu, see Running the BLOWFISH
Keystore Menu (on page 441).
440
Control-M Utilities Guide
Parameter Description
Apply new key Replaces the old data with the re-encrypted data
This option requires Control-M/Server to be down to replace the old
passwords with the new encrypted passwords.
NOTE: New users that were added after the Add new key procedure but
before the Apply new key procedure was carried out, must be
re-encrypted with new Blowfish key.
441
Control-M Utilities Guide
ctmldnrs
The ctmldnrs utility creates and loads the Manual Conditions file. This file contains prerequisite conditions
that are required by jobs in the Active Jobs database but will not be added to the Conditions/Resources
table without manual intervention. These conditions fall into two categories:
Conditions that are never added automatically by scheduled jobs because manual confirmation is
always desired.
Conditions that are normally added automatically by scheduled jobs but the jobs that add them are
not scheduled for the day.
Prerequisite conditions in the Manual Conditions file can be made available to the system using the load
option of ctmldnrs (see below), using the ctmcontb utility (see ctmcontb (on page 339)), using the Job
prerequisites window, or using the WHY option in the job menu. To run the ctmldnrs, see Running the
ctmldnrs utility (on page 442).
The ctmldnrs utility identifies conditions that should be in the Manual Conditions file by searching for all
prerequisite conditions required for submission of jobs on the particular day. The search for prerequisite
conditions is performed by checking the In Conditions parameters of the job processing definitions for all
jobs in the Active Jobs database. Then, the utility eliminates any "non-manual" conditions that satisfy
either of the following criteria:
The prerequisite condition already exists in the Conditions/Resources table.
The prerequisite condition is added to the Conditions/Resources table by an Out Conditions or
DO COND job processing parameter in a job scheduled to run that day.
Prerequisite conditions that do not meet the above criteria are assumed to be manual conditions and are
placed in the Manual Conditions file. To load and create manual conditions file, see Loading prerequisite
conditions from manual conditions file (on page 469) and Creating the manual conditions file (on page
469).
442
Control-M Utilities Guide
[-IGNOREOUT <condition-mask>]
[-IGNORECODES <condition-mask>]
[-INCLUDE_FUTURE_ODATES ]
For more information on the ctmldnrs utility, see ctmldnrs utility options (on page 443) and ctmldnrs
utility parameters (on page 444).
Parameter Description
-LOAD Load prerequisite conditions from the Manual Conditions file to the
Conditions/Resources table
443
Control-M Utilities Guide
Parameter Description
INPUT Name and full path of a file containing parameters for the utility.
In this file, each parameter and its values (if any) are on a separate
line with the same syntax they would have on the command line.
Using the -input_file parameter enables you to do the following:
prepare and save files of utility parameters that can be reused
specify utility input longer than the number of characters
allowed in the command line
ADDMODE YES – When the new Manual Conditions file is created, conditions
from the previous file are retained in the new file.
NO – The Manual Conditions file is recreated and all previous
conditions are deleted. Default.
IGNOREIN All conditions that satisfy the specified condition name are ignored
when the file is created.
444
Control-M Utilities Guide
Parameter Description
-INCLUDE_FUTURE_ Specifies the action to be taken with jobs that are in Wait ODATE state
ODATES When this parameter is specified, jobs in Wait ODATE state are included in
the utility processing.
When this parameter is not specified, jobs in Wait ODATE state are
excluded from the processing of the ctmldnrs utility (default).
Conditions added by ctmldnrs with a date reference (month and day) that is
later than the current Control-M/Server date (ODATE) are deleted by the
Control-M/Server New Day processing a day before that date arrives. If this
action is not the intended action, set New Day processing to not perform old
conditions cleanup. You can manually delete the old conditions a few days
after they are no longer required.
EXAMPLE: Set the Ignore New Day Conditions parameter to Y by using the
ctmsys utility.
Specify * in the
<Control-MServerHomeDir>/ctm_server/data/dbs_ignrcond.
dat
file (all the conditions are ignored).
ctmlog
The ctmlog utility creates a report from entries in the Control-M log or deletes entries in the Control-M
log. To run the ctmlog utility, see Running the ctmlog utility (on page 445).
445
Control-M Utilities Guide
listss Prints a report for a specific <subsystem> Subsystem to include in the report.
subsystem. Specify one of the following:
SU Supervisor
TR Tracker
SL Selector
CD Download, Database update
NS Communication with agent
computers
LG Agent utilities
UT Utilities
WD Watchdog
list Prints a report of all entries. <hours> When running ctmlog in the list mode
and there is a number between 1 to
48 following the list action, then
ctmlog treats this number as the
number of hours earlier than when
the log was specified to be
generated.
If this number is not within the range
between 1 to 48, then the ctmlog
utility expects the number to be
either in the format yyyymmdd or
yymmdd.
listord Prints a report of entries for a <Order ID> Order ID to include in the report.
specific Order ID.
The Order ID as displayed in the Job
Details window of Control-M/EM is a
base 36 number. If you want to
specify the Order ID here as a base
10 number, precede the number with
an asterisk and enclose the result in
quotation marks (for example,
"*1234").
listjob Prints a report including all entries <Job no.> Job number to include in the report.
for a specific job number.
446
Control-M Utilities Guide
listmsg Prints a report of messages with a <msgid> Message ID to include in the report.
specific message ID.
listjobname Prints a report including all entries <jobName> The name of the job whose entries
for the specified job name. should be printed in the report.
Parameter Description
<From Date> Starting and ending dates and times for the range of entries to be scanned by the
<From Time> specified action. Date is specified in yyyymmdd format. Time is specified in hhmm
<To Date> format.
<To Time>
"*" Asterisk enclosed in quotation marks. Scan all entries in the Control-M log (without
regard to date or time).
<Output> Full path name to which the report should be sent (optional). If this parameter is not
specified, the output is routed to the default output device. This parameter is not
applicable for the delete action.
<Report Width> Width (in columns) of the report to generate. Specify a number in the range of 80 – 132
(default is 80). This parameter can only be specified if the Output parameter is
specified.
447
Control-M Utilities Guide
The following command produces a report of all entries in the Control-M log relating to downloads to the
Control-M/EM database and to Control-M/Server database updates, without regard to date or
time. The report is output to file gdrprt.txt in 132-column format:
ctmlog listss CD "*" ~<controlm_owner>/ctm_server/user1/gdrprt.txt
132
ctmsys
The ctmsys utility is an interactive utility for maintaining:
Shout Destination tables (for directing Shout messages).
Control-M system parameters. For more information, see System configuration.
To run the ctmsys utility, see Running the ctmsys utility (on page 448).
Shout Destination tables associate logical output destinations (specified in Shout and Do Shout statements
in job processing definitions) with physical destination names. For more information, see the description
of the Shout facility in Shout destination management.
You can do the following from the ctmsys utility:
Creating/Updating a shout destination table (on page 450)
Shout Destination table parameters (on page 451)
Creating a new entry in a shout destination table (on page 452)
Modifying an existing entry in a shout destination table (on page 452)
Deleting an existing entry in a shout destination table (on page 453)
Editing an active shout destination table (on page 453)
Listing existing shout destination tables (on page 453)
Deleting an existing shout destination table by name (on page 454)
Accessing the Control-M system parameters from the ctmsys utility (on page 454)
Customizing the New Day procedure (on page 455)
448
Control-M Utilities Guide
ctmsys
The following menu is displayed:
+------------------------------------------------+
| Control-M SYSTEM MAINTENANCE UTILITY |
| Main Menu |
+------------------------------------------------+
q) Quit
Enter option:
The options in this menu and in all other menus provided by this utility can be selected by typing the
option number or command letter and pressing <Enter>.
1) Create/Modify a Table
2) Set SMART Folder
3) List Tables
4) Delete Table
449
Control-M Utilities Guide
450
Control-M Utilities Guide
Item Description
U—Specific user. If the user is not logged onto the data center
when the Shout message is sent, the message is placed in the
user’s mail.
M – User’s mail.
O – System console.
L – Control-M/Server log.
Logical Name Name used in the Shout or Do Shout parameter of the job
processing definition to identify the recipient of the Shout
message.
Physical Name For Destination Type U, name of a user in the data center.
For Destination Type M, e-mail address of the user (for example,
[email protected]).
For Destination Type T, terminal ID or full path name (max. 96
characters) of a file. If the file exists, the message will be
appended to the end of the file.
For Destination Type P, the full path name of the program
file/script that will perform the Shout operation.
For Destination Types O, L, and E, no physical name is specified
because each of these is a unique destination.
451
Control-M Utilities Guide
452
Control-M Utilities Guide
453
Control-M Utilities Guide
454
Control-M Utilities Guide
ctmunixcfg
The ctmunixcfg enables you to interactively view and modify most of the configuration parameters in the
OS.dat file. This utility can also be accessed as a Java application. For more information, see
Control-M/Agent parameters.
To run the ctmunixcfg utility, see Running the ctmunixcfg utility (on page 456).
455
Control-M Utilities Guide
ctmwincfg
The ctmwincfg utility enables you to view and modify application support for Windows. For a description
of the parameters in the ctmwincfg utility, Control-M application support configuration.
This utility can also be accessed as a Java application. For more information, see System configuration.
456
Control-M Utilities Guide
ecaqrtab
The ecaqrtab utility performs operations on the Quantitative Resources table. These operations include:
Listing quantitative resources. To list quantitative resources, see Listing quantitative resources (on
page 459)
Adding/deleting a quantitative resource. To add and delete quantitative resources, see Adding a
Quantitative resource (on page 460) and Deleting a quantitative resource (on page 460)
Manually changing availability of a quantitative resource. To manually change the availability of a
quantitative resource, see Altering the availability of a quantitative resource (on page 460)
To run the ecaqrtab, see Running the ecaqrtab utility (on page 457)
457
Control-M Utilities Guide
Parameter Description
ADD Defines a new Quantitative resource and sets the maximum availability
for the resource.
<QR_Name> Name of the Quantitative resource. For the LIST option, QR_Name can
include wildcard character * to indicate any number of characters
(including none). If * is specified, enclose the name in quotation marks,
for example, "LVL*". When invoked by the server or agent, specify "*"
(including the quotation marks) to include all existing Quantitative
resources (default when invoked by the server).
<Max> Maximum availability for the specified resource. Can only be specified
with the ADD and UPDATE options.
<Output> Full path name to which the report should be sent (optional). If not
specified, output is routed to the default output device. This parameter
can only be specified with the LIST option.
<fullPathFile Name and full path of a file containing parameters for the utility. In this
Name> file, each parameter and its values (if any) are on a separate line with
the same syntax they would have on the command line. Using the
-input_file parameter enables you to:
Prepare and save files of utility parameters that can be reused.
Specify utility input longer than the number of characters allowed in the
command line.
-input_file
~<controlmOwner>/ctm_server/data/ecaqrtab_p
arms.txt
The path that is specified for this parameter must be accessible by the
Control-M/Server account (even if this utility is requested by
Control-M/Agent.
458
Control-M Utilities Guide
Parameter Description
Free Number of units of the resource currently available for use. This
represents the difference between Max Avail and Used.
459
Control-M Utilities Guide
+--------------------------------------------------------------+
CPU@linda L 10 0 10 0
CPU@linda L 20 0 15 5
MEM@diana L 10 0 0 10
Tape2 L 12 2 2 10
460
Control-M Utilities Guide
emmftcli
The emmftcli utility enables you to search for file transfers in Control-M based on search and filter
parameters from a command line. The utility creates a csv file according to the parameters defined. You
must run this utility from the Control-M/EM server computer.
461
Control-M Utilities Guide
EXAMPLE: Search all file transfers in the current day for application APPL1 and jobname job001 to the
file out.csv
emmftcli -u <emuser> -p <pass> -s GUI-server-name -o out.csv -search -ap APPL1 -j job001
-d 1
EXAMPLE: Search all file transfers in the last 24 hours that contain the text file in the filename to the file
out.csv
emmftcli -u <emuser> -p <pass> -s GUI-server-name -o c:\mft\out.csv -search -filename
"*file*" -l 24
EXAMPLE:Search all file transfers that contain the text free text to the file out.csv
emmftcli -u <emuser> -p <pass> -s GUI-server-name -o out.csv -search -t free text
For information about the parameters, see emmftcli parameters (on page 463).
462
Control-M Utilities Guide
emmftcli parameters
The following table describes emmftcli parameters. For search with special characters (non alpha
numeric) use quotes.
Parameter Description
-h Shows usage.
-search Search for File Transfer records according to the specified filter
options
-t Defines free text to search, search for all File Transfer records that
contain the specified text in the pre-defined fields (* are treated
as any other character). If specified, all other search filter
parameters are ignored.
-f Filters by Filename
463
Control-M Utilities Guide
Parameter Description
-tf Determines the period to search for file transfers by date and time
according to the following format:
yyyy/mm/ddThh:mm:ss-yyyy/mm/ddThh:mm:ss
NOTE: The date and times must be in UTC (GMT+00:00).
464
Control-M Utilities Guide
emcha -restore
The emcha -restore utility restores high availability data to the Control-M/EM primary or secondary host.
The following table describes emcha parameters.
Parameter Description
Primary Sets the primary host to active and the secondary to stand-by.
Sets the primary host components desired state to Up and the
secondary host components to Down.
Secondary Sets the secondary host to active and the primary to stand-by.
Sets the secondary host components desired state to Up and
the primary host components to Down..
erase_audit_data
The erase_audit_data utility deletes records written prior to the specified date.
When erase_audit_data is invoked, it uses a script to delete records written before a specified date. If the
-U and -P parameters are not specified, the Control-M/EM database owner (DBO) user name and
password are prompted for. The erase_audit_data utility can delete large numbers of audit records. To
run the erase_audit_data utility, see Running the erase_audit_data utility (on page 465).
465
Control-M Utilities Guide
Parameter Description
-date A date in YYYYMMDD format (for example, 20070915), which sets the
selection criteria for obsolete jobs. Default: two days before the current
date
When cleanup of audit information from the Control-M/EM database is automatic, the MaxAuditsToDelete
parameter specifies the maximum number of audit records to delete during each automatic cleanup
operation. If the number of audit records to clean is higher than this number, no records are deleted. The
default is 400000 records. If the number of audit records to clean is higher than the MaxAuditsToDelete
parameter, a message is issued to the GUI Server diagnostic log asking you to clean audit records
manually using the erase_audit_data utility. You can use the Control-M/EM Administration facility to
change the automatic cleanup of audit information settings.
466
Control-M Utilities Guide
purge_xalerts
The purge_xalerts utility deletes exception alerts from the Exception Alerts table in the Control-M/EM
database. To run the purge_xalerts utility, see Running the purge_xalerts utility (on page 467).
The deleted exception alerts are no longer displayed in the XAlerts window either within an hour or after
you restart the CMS, whichever occurs first.
For more information about exception alerts, see Managing exception alerts.
Parameter Description
keep_days Defines the number of days for which exception alerts are kept in the
Control-M/EM database.
467
Control-M Utilities Guide
purge_runinfo
There are two main tables in Control-M/Forecast:
AVG_RUN_INFO: Calculates job run times. This table migrates by default, even if you choose not
to migrate Forecast data.
RUNINFO_HISTORY: Generates Forecast reports using the Reporting facility. The
RUNINFO_HISTORY table is a larger table than the AVG_RUN_INFO table and it contains run
information used by the Control-M/Forecast Server.
In the last 90 days, for each job execution, a record is entered in the RUNINFO_HISTORY table. The
RunTimeHistoryDays system parameter determines how many days the data is kept in the
RUNINFO_HISTORY table. The parameter can be set for fewer days, or it can be set to zero (0).
Forecast reports (Reporting Facility) keeps only one day of data and no other forecast features are
affected. The purge_runinfo maintenance utility needs to run periodically to maintain this table and to
clean out Control-M/Forecast run information. The settings are site-specific. The utility is located in one of
the following directories, depending on your operating system:
EMHome\bin (on Windows)
EMHome/scripts (on UNIX)
The log files of the purge_runinfo utility are located in the installation log directory both in UNIX and in
Windows. The log file that shows the run flow of the utility is called purge_runinfo_run.log.
468
Control-M Utilities Guide
469
Control-M Utilities Guide
Parameter Description
<Condition Name> All conditions in the input file that satisfy the specified characters are
loaded or listed.
Specify "*" by itself to load/list all conditions.
When using both open and closed square brackets ([ and ]), the
condition name must be enclosed in quotation marks (for example,
"RATE[A1]").
<Filename> Path name of the input Manual Conditions file. If this parameter is
not specified, the default input file is:
UNIX
<Control-M Server Home
dir>/ctm_server/tmp/ctmldnrs.dat
Windows
<Control-M Server Home
dir>\ctm_server\temp\ctmldnrs.dat
470
Control-M Utilities Guide
set_agent_mode
Use the set_agent_mode utility to enable or disable the non-root mode of Control-M/Agent on UNIX. The
utility changes the permissions of several agent files and directories to allow the agent to work in the
mode that is selected. This utility must be run by the root user and only needs to be run once to set a
mode. Each time the agent is started (or restarted) it will continue to use the mode that was set until
such time that the mode is changed. To run the set_agent_mode utility, see Running the set_agent_mode
utility (on page 472).
471
Control-M Utilities Guide
When Control-M/Agent is started by the agent owner user, only jobs where the agent owner is the job
owner can be run. To run jobs with different owners, define the passwords of the owners and then use
the set_agent_mode utility to enable non-root mode. Both actions must be performed to allow jobs to be
submitted. For more information about how to define the passwords of the owners, see Control-M/Agent
security or ctmsetown (on page 597).
Option Description
Enable non root mode enables the agent to run jobs by any job owner and registers it in
the /etc/ctm.conf file
Disable non root mode returns the agent to the state it was in after the installation
Prepare the agent for returns the agent to the state it was in after the installation and
non root uninstall removes it from the /etc/ctm.conf file
472
Control-M Utilities Guide
473
Control-M Utilities Guide
Control-M/Server: <SERVER_HOME>/ctm_server/health_check/log
Control-M/Agent: <AGENT_HOME>/ctm/proclog
Control-M/Archive: <EM_HOME>/ctm_em/archive/health_check/log
The log file name is constructed as follows:
<your_data_collector>_<TIME_STAMP>_<OS_TYPE>_<HOSTNAME>_display.log
where <your_data_collector> is the relevant of the following:
474
Control-M Utilities Guide
em_data_collector
ctms_data_collector
ctma_data_collector
arc_data_collector
The Health Check utility package files are saved to the following directories:
Control-M: <EM_HOME>/hcu_package
Control-M/Server: <SERVER_HOME>/health_check/hcu_package
Control-M/Agent: <AGENT_HOME>/hcu_package
Control-M/Archive: <EM_HOME>/archive/health_check/hcu_package
The package files names are constructed as follows:
Control-M: em_data_<TIME_STAMP>_<OS_TYPE>_<HOSTNAME>.zip
Control-M/Server: ctms_data_<TIME_STAMP>_<OS_TYPE>_<HOSTNAME>.zip
Control-M/Agent: ctma_data_<TIME_STAMP>_<OS_TYPE>_<HOSTNAME>.zip
Control-M/Archive: arc_data_<TIME_STAMP>_<OS_TYPE>_<HOSTNAME>.zip
In UNIX, substitute tar.z instead of zip.
475
Control-M Utilities Guide
Collects the performance measurements, send the package to shared location and assign issue
number to the package:
em_data_collector -U <dbo_user> -P <dbo_pwd> -F MSR -out=/home/issues
-issue=ISS112233
Control-M/Archive
The following examples describe the commands for running the Health Check utility for
Control-M/Archive:
Collects information of all Profiles for the last seven days:
arc_data_collector -U <dbo_user> -P <dbo_pwd> -days=7 -F ALL
Collects information of the CNF category :
arc_data_collector -U archive -P empass -D ARC -C CNF
Collects logs from the past 5 days:
arc_data_collector -U <dbo_user> -P <dbo_pwd> -days=5
476
Control-M Utilities Guide
Parameter Description
passwordInfo For Categories and Profiles that access a Control-M database, you
need to specify <dbo_user> and <dbo_pwd>, which means the
following:
Running the Health Check utility with default parameters:
• Control-M: Requires dbo parameters.
• Control-M/Server: Requires dbo parameters
• Control-M/Archive: Requires dbo parameters
Running the Health Check utility with non-default parameters:
• Control-M:
o Categories that do not require dbo parameters: OS, CNF,
LOG
o Categories that require dbo parameters: DB, DBT, SCH,
TBL, COM, MSR_GSR, MSR_GTW, MSR_DB
NOTE: All Profiles require dbo parameters.
• Control-M/Server:
o Categories that do not require dbo parameters: CNF, OS,
LOG, TBL, INST, FNC
o Categories that require dbo parameters: DB, MSR_CTM
NOTE: All Profiles require dbo parameters.
• Control-M/Archive:
o Categories that do not require dbo parameters: CNF, LOG,
o Categories that require dbo parameters: DB, TBL
NOTE: All Profiles require dbo parameters.
Control-M/Agent and Control-M Application plug ins: Do not
require dbo parameters.
Components (optional) Products and applications for which the utility can gather
data.
477
Control-M Utilities Guide
Parameter Description
478
Control-M Utilities Guide
479
Control-M Utilities Guide
Category Definition
INST (UNIX) For all components handled, collects the content of the following:
BMCINSTALL/installed/
BMCINSTALL/log/
BMCINSTALL/uninstall/
Collects all files with user ownership from the /tmp directory.
Lists all directories and folders under the component installation path.
NOTE: Running Health Check utility with INST will gather significant information only if the error
situation occurred after the file copying phase of the installation. If you specify the INST Category
parameter, you must also specify one or more component parameters. If you specify the INST Category
parameter, do not specify any of the following:
Categories other than INST
Profiles
480
Control-M Utilities Guide
Category Definition
OS Defines the Operating System related physical resource. This information includes the
following:
Hardware configuration
Kernel parameters
Swap space
Scheduled tasks
Start up files
Resource consumption
Network settings
Database logs
NOTE: If you do not specify any Category parameter, the Health Check utility collects data for all Categories.
In general, if you specify a Category, you must also specify one or more components. However, for the following
Categories, do not specify a component:
OS
DB
You can also specify multiple Categories. In such a case, for each Category the utility gathers data by each relevant
component specified.
481
Control-M Utilities Guide
Category Definition
482
Control-M Utilities Guide
Category Definition
483
Control-M Utilities Guide
Category Definition
Category Definition
484
Control-M Utilities Guide
Category Definition
485
Control-M Utilities Guide
Category Definition
486
Control-M Utilities Guide
Category Definition
487
Control-M Utilities Guide
Category Definition
488
Control-M Utilities Guide
Category Definition
489
Control-M Utilities Guide
Profile Definition
ENV Collects environment data. This includes information from the following
Categories:
OS
DB
MSR Collects measurement data. This includes information from the following
Categories:
MSR_ENV
MSR_GSR
MSR_GTW
MSR_DB
490
Control-M Utilities Guide
Profile Definition
LOG_CGF Collects environment data and Control-M configuration data. This includes
information from the following Categories:
OS
DB
COM
LOG
DBT
SCH
TBL
CNF
BIM Collects BMC Batch Impact Manager data. This includes information from the
following Categories:
COM
LOG
DBT
SCH
TBL
CNF
EXPORT_BIM Collects Batch Impact Manager (BIM) data by exporting the active net,
statistics, calendars, global conditions and datacenter relationship.
NOTE: This profile is not included by default and needs to be specifically
included in the command line.
491
Control-M Utilities Guide
Profile Definition
Profile Definition
492
Control-M Utilities Guide
Profile Definition
493
Control-M Utilities Guide
Profile Definition
494
9
9
Database maintenance
The database maintenance utilities can be used to maintain the various Control-M databases and to
import and export information to and from additional databases.
Many of the tasks performed by the database maintenance utilities can also be performed using the
Control-M Configuration Manager or the root menu. However, by including a utility command in the
command line of a job processing definition, you can run the utility at a predetermined time or under a
predetermined set of conditions without being present.
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
The following sections describe the Control-M/EM and Control-M/Server database and interactive utilities:
Control-M/EM utilities (on page 496)
Control-M/Server utilities (on page 544)
Interactive database utilities (on page 570)
495
Control-M Utilities Guide
Control-M/EM utilities
This table lists the Control-M/EM utilities for database maintenance.
db_check (on page 497) The db_check utility provides the following information
about Control-M/EM databases:
Size of the database
Availability of space in the database
Verification of database integrity.
Automatic database and transaction log monitoring
em_SQL (on page 518) The em_SQL utility enables you to connect to the database
from the command line.
loader (on page 519) The loader utility is used to load default data to the
Control-M/EM database.
sweep (on page 520) The sweep utility deletes jobs that are no longer active
from the Control-M/EM and Control-M/Server databases.
496
Control-M Utilities Guide
util (on page 527) Performs the following functions from the command line:
Export data from the Control-M/EM database
Import data to the Control-M/EM database
Delete the Control-M/EM database
Clear the Control-M/EM database
Build the Control-M/EM database
Export a specified definition folder
Import a specified definition folder
Import Control-M/Forecast data
Export Control-M/Forecast data
Remove Control-M/Forecast data (to save disk space)
db_check
The db_check utility provides the following information about Control-M/EM databases:
Size of the database
Availability of space in the database
Verification of database integrity
Automatic database and transaction log monitoring
To run the db_check utility, see Running the db_check utility (on page 497).
NOTE: The db_check utility can only be invoked in Control-M/Enterprise Manager. The db_check utility is
not relevant for Windows. It is not available for an Oracle Server.
497
Control-M Utilities Guide
Parameter Description
498
Control-M Utilities Guide
The db_check utility is not relevant for Windows and works only with databases on a Sybase Adaptive
server. This utility is not available for Oracle server.
db_check_space
The db_check_space utility provides the following information for Control-M/EM databases that use Oracle
database servers.
Total size and availability of space in the /tmp directory
Total size and availability of space in the database
Percentage of total space in the database that is currently available
NOTE: The db_check_space utility cannot be used for Oracle database client installations and is not
relevant for Windows. The db_check_space utility can only be invoked in Control-M/Enterprise Manager.
To run the db_check space utility, see Running the db_check_space_utility (on page 499).
499
Control-M Utilities Guide
Parameter Description
-U <userName> User name. If not specified in the command line, you are prompted to
provide this information when the utility runs.
-P <password> Password. If not specified in the command line, you are prompted to
provide this information when the utility runs.
This utility is also available from the root menu by selecting the 2 - Troubleshooting Menu option and then
the 1 - Database Troubleshooting option. For more information, see Control-M diagnostics.
500
Control-M Utilities Guide
em_database_menu
The em_database_menu utility can be invoked interactively to facilitate day-to-day maintenance and
diagnostics of Control-M/EM database running with PostgreSQL, Oracle and MSSQL databases. On
Windows, the utility is called em_database_menu.bat.
NOTE: The Database Utilities Menu is only relevant for PostgreSQL, Oracle and MSSQL database
functionality.
To facilitate day-to-day maintenance and diagnostics of Control-M/Server database running with
PostgreSQL, Oracle and MSSQL databases, use the dbu_menu utility, as described in dbu_menu (on page
563).
The Database Utilities menu and the resulting sub-menus are described in the following:
Accessing the Database Utilities Menu (on page 503)
Database Utilities Menu using Oracle
Database Utilities Menu using MSSQL
The sub-menus and certain options from the em_database_menu utility can be invoked from the
command line. For database menu options see em_database_menu options (on page 502).
501
Control-M Utilities Guide
em_database_menu options
The following table describes the utilities with the related options from the em_database_menu:
502
Control-M Utilities Guide
503
Control-M Utilities Guide
Cold Database PostgreSQ Exports the Control-M/EM database schema to the specified file.
Backup L
The following Control-M/EM components must be shut down prior to activating
(Running the MSSQL this backup:
DBUColdBackup utility
(on page 571))
Gateway
GUI server
BMC Batch Impact Manager
Control-M/Forecast
Global Conditions Server
Control-M Configuration Management Server
Control-M Configuration Agent
Backup File: Full path to the file into which the database should be backed up.
Administrator password: Password of the database server administrator.
Cold Database PostgreSQ Imports the Control-M/EM database schema from the file specified in Backup Fil
Restore L parameter of the Cold Database Backup option.
(Running the MSSQL NOTE: This option is not enabled if Control-M database server is running.
DBUColdRestore utility
Restore File: Value and location specified in the Backup File parameter of the
(on page 572))
Cold Database Backup option.
Administrator password: Password of the database server administrator.
Extend database Oracle (Oracle and MSSQL only) Extends the database size. Contact your DBA for
assistance in performing this action if you are not comfortable performing it
MSSQL
yourself.
504
Control-M Utilities Guide
Database Parameters PostgreSQL Control-M/EM: Displays the configuration parameters of the server
(Running the DBUShow utility database and the Control-M/EM database client.
(on page 584)) MSSQL
Control-M/Server: Displays the configuration parameters of the Server
Oracle database and the Control-M/Server database client.
NOTE: Configuration parameters are sorted alphabetically.
505
Control-M Utilities Guide
Database Storage Report PostgreSQL Control-M/EM: Displays the attributes of the Control-M/EM database in
the server database.
(DBUStorage (on page 581)) MSSQL
Control-M/Server: Displays the attributes of the Control-M/Server
Oracle database in the Server database
DB Name
Type
Size (refers to the operating system disk space)
Free
Used
Used percentage
Message (Warns the user when there is diminished disk space
capacity within the Control-M/EM database server)
Database Version PostgreSQL Displays the general description of the database server, and includes the
version number.
(Running the DBUVersion MSSQL
utility (on page 577))
Oracle
List All Active PostgreSQL List all active transactions of the Control-M/EM or Control-M/Server
Transactions database for the database user.
MSSQL
(Running the
DBUTransactions utility (on Oracle
page 582))
Consistency Check MSSQL Checks tables in the database. Run this option when you suspect that
there is database corruption.
Oracle
arc_database_menu
The arc_database_menu utility can be invoked interactively to facilitate day-to-day maintenance and
diagnostics of Control-M Workload Archiving running with PostgreSQL database.
NOTE: On Windows, the utility is called arc_database_menu.bat.
The Database Utilities menu and the resulting sub-menus are described in arc_database_menu options
(on page 507).
506
Control-M Utilities Guide
arc_database_menu options
The following table describes the utilities with the related options from the arc_database_menu:
507
Control-M Utilities Guide
508
Control-M Utilities Guide
Option Description
509
Control-M Utilities Guide
Option Description
Build Database Creates a Control-M Workload Archiving schema on the database server.
NOTE: This option is only enabled on Control-M Workload Archiving
running with either an existing or a dedicated database server.
Passwords: Database Owner, Database server administrator
510
Control-M Utilities Guide
Option Description
Cold Database Backup Exports the Control-M Workload Archiving database schema to
the specified file.
Parameters available:
Backup File
Full path to the file into which the database must be backed up.
Passwords: Database Owner, Database server administrator
NOTE: This option is not enabled if Control-M Workload
Archiving server is running.
511
Control-M Utilities Guide
Option Description
Hot Database Restore NOTE: Only enabled when Control-M Workload Archiving is
running with a dedicated database server.
Online restore of the PostgreSQL database server file system and
the Control-M Workload Archiving database. When this option
completes successfully, the previous PostgreSQL database server
file system is saved to the following location:
<pghome_directory/old_pgsql_<date of operation>
If Control-M Workload Archiving database does not exist in the
<pghome_directory> it is saved in the following location:
<db location>/<db name>_old_<date of operation>
NOTE: This option is not enabled if the Control-M Workload
Archiving database server is running.
Parameters available:
Restore Directory
Full path to the directory from which the server file system and
Control-M Workload Archiving databases must be restored.
Archive Directory
Value and location specified in the Archive Directory parameter of
the Set Database Archive Mode option.
NOTE: When this action is finished successfully, the PosgreSQL
database server archive mode switches to off, and the
PosgreSQL database server shuts down.
NOTE: The specified directory must be exported from the
PostgreSQL database server with the same parameter values as
the destination PostgreSQL database server.
512
Control-M Utilities Guide
Option Description
Cold Database Imports the Control-M Workload Archiving database schema from
Restore the file specified in Backup File parameter of the Cold Database
Backup option.
NOTE: This option is not enabled if Control-M Workload
Archiving server is running.
Parameters available:
Restore File
Value and location specified in the Backup File parameter of the
Cold Database Backup option.
Passwords: Database Owner, Database server administrator
513
Control-M Utilities Guide
Option Description
514
Control-M Utilities Guide
Option Description
Database Storage Report Displays the following attributes of the Control-M Workload
Archiving database in the server database:
DB Name
Type
Size (refers to the operating system disk space)
Free
Used
Used percentage
Message (Warns the user when there is diminished disk
space capacity within the Control-M Workload Archiving
database server)
Passwords: Database Owner, Database server
administrator
Database Version Displays the general description of the database server. This
includes the version number.
Passwords: Database Owner, Database server
administrator
List All Active List all active transactions of the Control-M Workload
Transactions Archiving database for the database user.
Passwords: Database Owner, Database server
administrator
em_rebuild_database
The em_rebuild_database utility can be invoked to rebuild the Control-M/EM database in the specified
PostgreSQL server database.
On Windows, the utility is called em_rebuild_database.bat.
If the new DBO is different than the original DBO, you need to use the original DBO to log into
Control-M/EM client components until the new DBO is added to the Authorizations list with all required
permissions.
To run the em_rebuild database utility, see Running the em_rebuild_database utility (on page 515)
515
Control-M Utilities Guide
516
Control-M Utilities Guide
Parameters Description
Host Interface Name of the host computer for the PostgreSQL database server on which
Name Control-M/EM is installed.
Port Number Communications port on which the PostgreSQL database server listens
for queries.
Database Name for the Control-M/EM database. This name must be unique within
Name the PostgreSQL database server.
517
Control-M Utilities Guide
em_SQL
The em_SQL utility enables you to connect to the database from the command line. This utility is
automatically installed on Windows computers during installation of the GUI Server component. To run
the em_SQL parameter, see Running the em_SQL utility (on page 518).
Parameter Description
-P <password> Password.
NOTE: The P must be specified in uppercase.
518
Control-M Utilities Guide
loader
The loader utility is used to load default data to the Control-M/EM database. This utility should only be
used if you ran a clean database operation and want to restore default data to the folders. To run the
loader utility see Running the loader utility (on page 519).
519
Control-M Utilities Guide
Field Description
-d <directory> The directory in which the files with the default data is located.
-f <fileName> The full path of the file in which the loaded data is saved.
-db The name of the database to which you want to load the data.
<databaseName> Optional
sweep
The sweep utility deletes jobs that are no longer active from the Control-M/EM and Control-M/Server
databases. These jobs are referred to as obsolete jobs and are defined in Obsolete criteria (see
below).The sweep utility is available in Control-M/EM installations only. To run the sweep utility, see
Running the sweep utility (on page 520).
For reports that are generated by the sweep utility, see Utility reports (on page 523).
For return codes see Return codes (on page 525)
To see the criteria used by the sweep utility to determine whether a job or folder is obsolete, see
Obsolete criteria (on page 525).
520
Control-M Utilities Guide
• Windows: Open a command prompt window where Control-M/EM is installed. You do not need
to be in the Control-M/EM database directory.
2. Type the following command:
o (Windows)
sweep [-U <userName> -P <password> | -PF <passwordFile>]
-S <serverName> [-Local] [-Date <YYYYMMDD>]
[-Test | -Sync] [-Timeout <maxSeconds>]
[-Cyclic <maxFiles>] [-H | -Help] [-Force]
[-Interval <milliseconds>]
o (UNIX)
em sweep [-U <userName> -P <password> | -PF <passwordFile>] -S
<serverName> [-Local] [-Date <YYYYMMDD>] [-Test | -Sync] [-Timeout
<maxSeconds>] [-Cyclic <maxFiles>] [-H | -Help] [-Force] [-Interval
<milliseconds>]
The parameters are described in the following table. The flags are not case sensitive.
3. Press Enter.
The parameters are processed and several reports are generated.
Avoid updating of the job or folder definitions when the sweep utility is running.
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the sweep utility, see sweep utility parameters (on page 522).
521
Control-M Utilities Guide
Parameter Description
-PF Flat file that contains an unencrypted user name and password on
passwordFile separate lines in the following format:
user=user_name
password=password
-Local Deletes all obsolete jobs and folders from the Control-M/EM database
only.
You cannot use the -Sync and -Test flags when using -Local.
You can use -Local and -Force to delete obsolete jobs and folders
from modified or locked folders in the Control-M/EM database.
Log sweep_sync.txt is not updated when the utility is activated with
-Local.
If -Local is not used, the sweep utility behaves as it did before version
6.3.01, deleting jobs from both the Control-M/EM and Control-M/Server
databases.
-Date A date in YYYYMMDD format (for example, 20080915), which sets the
YYYYMMDD selection criteria for obsolete jobs. Default: two days before the current
date date
-Timeout Maximum time in seconds to wait for pending callbacks to return with
maxSeconds responses to UPLOAD and remote DELETE requests. Default: 900 seconds
(15 minutes).
-Test This flag causes the sweep utility to scan all job definitions and generate
the sweep_obsolete.txt file, which consists of a report of the current
obsolete jobs and folders, without actually deleting the jobs.
522
Control-M Utilities Guide
Parameter Description
-Cyclic maxFiles The maximum number of cyclic files for sweep execution log (up to 500
messages each). Default: The execution log is written to one sequential
log file without a timestamp.
-Force This flag causes the sweep utility to scan all folders, including those that
are modified or locked, for obsolete jobs. Use -Force only when you are
certain there are no definitions in the Control-M/Server database that were
not previously downloaded into the Control-M/EM database.
-Interval This flag sets the time to wait between executing the DELETE and
milliseconds UPLOAD commands (in milliseconds).
It may be required to avoid time-out problems in Gateway or Control-M.
By default, there is no interval.
Utility reports
The reports that are generated by the sweep utility are described in the following table:
In the sweep_obsolete.txt file, the report for obsolete jobs has the following format:
delete job folder_id job_id ctm_name folder_name job_name mem_name
In the sweep_obsolete.txt file, the report for obsolete folders has the following format:
delete folder folder_id ctm_name folder_name folder_lib
523
Control-M Utilities Guide
The MaxObsoleteJobs system parameter controls the size of the GUI Server memory by limiting the
number of obsolete jobs stored in the GUI Server. The default value is 100000.This parameter should only
be changed after consulting with BMC Customer Support.
In the sweep_sync.txt file, the report for non-synchronized folders has the following format:
upload folder folder_id ctm_name folder_name folder_lib
Only the last versions of the sweep_obsolete.txt and sweep_sync.txt reports are saved.
524
Control-M Utilities Guide
Return codes
The following table describes Sweep utility return codes:
Return
code Description
0 Success (all of the obsolete jobs were deleted, however there may be
commands in the sync file that must be run later). If necessary, run the
sweep utility again.
2 Partial success (some obsolete jobs were not deleted). Run the sweep utility
again to delete the remaining jobs or folders.
Obsolete criteria
The following describes the criteria used by the sweep utility to determine whether a job or folder is
obsolete.
If the ACTIVE_TILL parameter is specified the following elements are considered as obsolete:
A regular job, which is not part of a SMART Folder, is considered as obsolete if the following is true:
ACTIVE_FROM < ACTIVE_TILL and ACTIVE_TILL < obsolete date.
A RBC is considered as obsolete if:
ACTIVE_FROM < ACTIVE_TILL and ACTIVE_TILL < obsolete date.
A SMART Folder is considered as obsolete if:
All of its RBCs are obsolete (the relationship between the RBCs is always OR).
A regular folder is considered obsolete if:
All the jobs in the folder are obsolete.
A job that is part of a SMART Folder is defined as obsolete if one of the following conditions is true:
• the SMART Folder is obsolete
• it satisfies the obsolete criteria according to it own ACTIVE_TILL/ACTIVE_FROM and has no RBCs
525
Control-M Utilities Guide
526
Control-M Utilities Guide
util
util is a multi-purpose utility that can perform the following functions from the command line:
Import and export data to and from the Control-M/EM database
Delete, clear, and build the Control-M/EM database
Import and export a specified definition folder
Import, export, and remove (to save disk space) Control-M/Forecast data
When version management mode is selected (default), the following additional functions are available
from the command line:
Export or import of scheduling definitions, either with or without the history of changes made
Export or import of a specified definition folder, either with or without the history of changes made
All the functions use DB_ARGS in the following format:
527
Control-M Utilities Guide
528
Control-M Utilities Guide
Field Description
-T <level> Database debug level (Valid values are in the range: 1 - 9).
529
Control-M Utilities Guide
Function Description
-export Exports job processing definitions, such as calendars, Control-M data, etc
from the Control-M/EM database to an ASCII text file.
The data in the mentioned file is separated by field and record delimiters.
For more information, see Configure the util utility to recognize different
delimiters (on page 537).
Usage: Specify the following command:
util <DB_ARGS> -export [-silent] [-cdbg <1 - 5>] {-type
<all | def | cal | sys |dc | user | alert | gc | maint
| collect | view |filter | report | hier | audit |
history | bim_forecast | statistics | workload |
active_nets | mft | [wcm]>} {-type net {-name
{<name>}}} [-file <file> | -file - | -dir <dir>]
[-without_def_history]
NOTE: If the database is exported to a file, you are prompted for a
filename. The file that is created is a flat file.
If you use FTP to transfer the exported file, use binary mode.
If -type all is specified, the job’s running information history is not
returned. Specify -type history separately if it is required.
-type def includes site standard and site customization definitions.
If -without_def_history is specified, only the current version of the
job’s definition is exported. This option is relevant when version
management mode is selected (default). For more information, see
Using Control-M.
530
Control-M Utilities Guide
Function Description
531
Control-M Utilities Guide
Function Description
-build_schema Builds the Control-M/EMdatabase. It defines the structure and the type of
contents of each data element in the database.
Usage: Specify the following command:
util <DB_ARGS> -build_schema [-cdbg <1-5>]
NOTE:
Stop all Control-M/EM components before doing this operation.
To load default data to the Control-M/EM database, run the loader
utility.
532
Control-M Utilities Guide
Function Description
If you use FTP to transfer the imported file, use binary mode.
-type def includes site standard and site customization definitions.
If -without_def_history is specified, only the current version of the
definition folder is imported. This option is relevant when version
management mode is enabled (default). For more information, see
the Using Control-M.
533
Control-M Utilities Guide
Paramete Description
r
534
Control-M Utilities Guide
Paramete Description
r
535
Control-M Utilities Guide
Paramete Description
r
536
Control-M Utilities Guide
537
Control-M Utilities Guide
\t Horizontal tab
\f Form feed
\x1B Escape
restore_host_config
The Control-M/EM restore_host_config utility automates the recovery process to perform updates in the
host name configuration in the following situations:
538
Control-M Utilities Guide
539
Control-M Utilities Guide
Setting the interface name in the database and configuration files for cloud
computers
This procedure describes how to set the interface name in the database and configuration files when
Control-M/EM is running on a cloud environment.
To set the interface name:
From a command line type one of the following:
• UNIX: em restore_host_config –interface_name [-silent] [-name <new interface name>]
[[-password <dbo password>] or [-password_file [<file_path>]]]
• Windows: restore_host_config –interface_name [-silent] [-name <new interface name>]
[[-password <dbo password>] or [-password_file [<file_path>]]]
NOTE:
<new interface name> is the new interface name to publish. This parameter cannot be defined
on AWS computers.
540
Control-M Utilities Guide
If the -silent flag is not specified and optional parameters are not defined in the command line,
the script asks for the relevant input interactively.
Setting the profile name in the database and configuration files for an
alternative/virtual host name
This procedure describes how to set the profile name in the database and configuration files with the
utilization of the BMC_EM_PROFILE_NAME environment variable.
To set the profile name:
From a command line type one of the following:
• UNIX: em restore_host_config –profile_name [-silent] [-name <new profile name>]
[-internal_only [-host_port] [-ctm_name] [-sync_files] [-clients]] [[-password <dbo password>]
or [-password_file [<file_path>]]]
• Windows: restore_host_config –profile_name [-silent] [-name <new profile name>]
[-internal_only [-host_port] [-ctm_name] [-sync_files] [-clients]] [[-password <dbo password>]
or [-password_file [<file_path>]]]
NOTE:
<new profile name> is the new profile name to configure. This parameter cannot be specified if
the BMC_EM_PROFILE_NAME environment variable is already defined with the required name.
If the -silent flag is not specified and optional parameters are not defined in the command line,
the script asks for the relevant input interactively.
If the environment is running with a local (dedicated) PostgreSQL database server, that requires
modification to the database server host name, define the -reconf_db parameter and then
define the -profile_name parameter.
If the setting is for the computer's internal communication processes only,then the -internal_only
flag must be specified. Otherwise all communication configuration is affected by the new profile
name. This might occur if the profile name is not configured with the DNS name of the computer.
The following exception flags refer to rare usage cases where the -internal only flag is defined:
Use the –host_port flag when the CTL communication parameters, configured by the HostPort
system parameter, need to be customized with the new profile name.
Use the –ctm_name flag when the Control-M/Server running on the specific host needs to be
customized with the new profile name.
Use the –sync_files flag when there are distributed Control-M/EM installations on other hosts
where the file synchronization needs to be customized with the new profile name.
To see specific details on the exception flag, define the -profile_name -internal_only -help
flag.
541
Control-M Utilities Guide
542
Control-M Utilities Guide
543
Control-M Utilities Guide
Control-M/Server utilities
This table lists the Control-M/Server utilities for database maintenance.
ctmcheckmirror (on page 548) The ctmcheckmirror utility checks the mirroring of the
Control-M/Server database and displays the status.
ctmdbbck (on page 549) The ctmdbbck utility backs up the Control-M/Server
database in the following cases:
Control-M/Server was installed by using a dedicated
PostgreSQL database server. Do not use this utility if
Control-M/Server was installed with an Oracle database
(either existing or dedicated) or an existing PostgreSQL
database.
To back up an existing Oracle database or an existing
PostgreSQL database, use the ctm_backup_bcp utility
(described on ctm_backup_bcp (on page 546)).
Control-M/Server was installed by using an MSSQL
database server.
ctmdbcheck (on page 552) The ctmdbcheck utility displays information about the
memory capacity and the status of the Control-M/Server
database.
ctmdbopt (on page 556) The ctmdbopt utility calculates database statistics.
544
Control-M Utilities Guide
ctmdbrst (on page 557) The ctmdbrst utility restores the Control-M/Server database
in the following cases:
Control-M/Server was installed by using a dedicated
PostgreSQL database server. Do not use this utility if
Control-M/Server was installed with an Oracle database
(either existing or dedicated) or an existing PostgreSQL
database.
To restore an existing Oracle database or a PostgreSQL
database, use the ctm_restore_bcp utility (described on
ctm_restore_bcp (on page 547)).
Control-M/Server was installed by using an MSSQL
database server.
ctmdbspace (on page 559) The ctmdbspace utility checks the data and log usage in
the Control-M/Server database and displays the usage.
ctmdbtrans (on page 559) The ctmdbtrans utility lists the active transactions in the
database.
ctmdbused (on page 560) The ctmdbused utility displays the size (in MB), amount,
and percentage of current space usage in the
Control-M/Server database data and log.
ctmreindex (on page 561) The ctmreindex utility accesses the Control-M/Server
database, reads the data dictionary, reads the index
definitions, and then reorganizes indexes. (UNIX only)
dbversion (on page 562) The dbversion utility retrieves the database server version
and tests the connectivity of the Control-M/Server database
in use.
545
Control-M Utilities Guide
ctm_backup_bcp
The ctm_backup_bcp utility exports data from a Control-M/Server database to the
~<controlm_owner>/ctm_server/backup_db directory. Each database folder is backed up as a
separate ASCII file. To run the ctm_backup_bcp utility see Running the ctm_backup_bcp utility (on page
546).
The user running the ctm_backup_bcp utility must have access permission to create the directory
~<controlm_owner>/ctm_server/backup_db.
The time taken to backup the Control-M/Server database using the ctm_backup_bcp utility can be
shortened by choosing not to backup the Control-M log information (the IOALOG table).
Differences between the ctm_backup_bcp and ctmdbbck utilities
ctm_backup_bcp exports the data in the Control-M/Server database. The ctmdbbck utility backs up an
image of the database for later restoration using ctmdbrst.
When using ctm_backup_bcp, you cannot specify the backup directory.
ctm_backup_bcp backs up each database folder to a separate ASCII file. ctmdbbck backs up the
entire database to a single binary file.
For all databases, except PostgreSQL, when using ctmdbbck and ctmdbrst, the restored database
must be the same size as the original database. When using ctm_backup_bcp and ctm_restore_bcp,
the original and restored databases do not need to be the same size.
The ctmdbbck and ctmdbrst utilities are not relevant for Oracle databases, whether dedicated or existing.
546
Control-M Utilities Guide
ctm_backup_bcp example
Messages similar to the following examples are displayed:
backing up contents of CMS_NODGRP
backing up contents of CMR_AGSTAT
backing up contents of CMS_AGCOMM
backing up contents of CMS_AGSRVTIM
backing up contents of CMR_AJF
backing up contents of CMS_JOBDEF
backing up contents of CMS_USERS
…
Database backup ended successfully.
ctm_backup_bcp -n
In this case, Control-M/Server does not display the confirmation prompt and does not issue messages.
Only progress dots are displayed.
ctm_restore_bcp
The ctm_restore_bcp utility imports the Control-M/Server database from the
~<controlm_owner>/ctm_server/backup_db directory. The content of this directory was created
by the ctm_backup_bcp utility. To run the ctm_backup_bcp utility, see Running the ctm_restore_bcp
utility (on page 548).
Differences between the ctm_restore_bcp and ctmdbrst utilities:
ctm_restore_bcp imports files created by ctm_backup_bcp. ctmdbrst restores a backup created by
ctmdbbck.
When using ctm_restore_bcp, you cannot specify the directory containing the exported files.
You can only use ctm_restore_bcp if Control-M/Server is down.
ctm_restore_bcp imports ASCII files. ctmdbrst restores from a binary file.
ctm_restore_bcp
Restoring contents of database.
This procedure DELETES any information in main database
Please confirm [y/n]: y
547
Control-M Utilities Guide
ctmcheckmirror
The ctmcheckmirror utility checks the mirroring of the Control-M/Server database and displays the status.
To run the ctmcheckmirror utility, see Running the ctmcheckmirror utility (on page 549).
For more information about database mirroring, see Mirroring parameters.
548
Control-M Utilities Guide
ctmdbbck
The ctmdbbck utility backs up the Control-M/Server database in the following cases:
Control-M/Server was installed by using a dedicated PostgreSQL database server. Do not use this
utility if Control-M/Server was installed with an Oracle database (either existing or dedicated) or an
existing PostgreSQL database.
To back up an existing Oracle database or an existing PostgreSQL database, use the ctm_backup_bcp
utility (described on ctm_backup_bcp (on page 546)).
Control-M/Server was installed by using an MSSQL database server.
For information about Archive mode, see Set Database Archive Mode referred to in the table in Accessing
the Database Utilities Menu (on page 503).
NOTE: When using PostgreSQL, after specifying this utility you are prompted to enter the DBA password
to access the Control-M/Server database.
The following describe how to run the utility, backing up the Control-M/Server database and running in
silent mode together with an example:
Running the ctmdbbck utility (on page 550)
Backing up the Control-M/Server database (on page 550)
Backing up the Control-M/Server database (PostgreSQL) (on page 551)
Running the ctmdbbck in silent mode (on page 552)
ctmdbbck utility example (on page 552)
549
Control-M Utilities Guide
550
Control-M Utilities Guide
551
Control-M Utilities Guide
ctmdbcheck
The ctmdbcheck utility displays information about the memory capacity and the status of the
Control-M/Server database.
The ctmdbcheck utility can be run as a cyclic job. To run the ctmdb check utility, see Running the
ctmdbcheck utility (on page 553).
NOTE: If the -n switch is specified in the ctmdbcheck command, only database capacity information is
returned, and database thresholds and integrity are not checked.
For performance reasons, run the ctmdbcheck utility during non-peak hours or when Control-M/Server is
down. If you need to determine database sizes frequently, use the ctmdbused command. This command
displays the size (in MB) of the data and log components of the database plus the amount and percentage
of space currently that is used in each component.
552
Control-M Utilities Guide
553
Control-M Utilities Guide
Parameter Description
554
Control-M Utilities Guide
Field Description
db total Total amount of memory (in KB) allocated for the database.
data Total amount of memory (in KB) allocated to the Data partition of the
database.
log Total amount of memory (in KB) allocated to the Log partition of the
database.
In addition to the above fields, ctmdbcheck also returns one of the following messages describing the
current database status:
Database is OK.
WARNING: Database is more than half full.
ATTENTION: Database log segment is more than 90% full.
ATTENTION: Database is more than 80% full.
555
Control-M Utilities Guide
ctmdbopt
The ctmdbopt utility calculates database statistics. This utility wraps the relevant database packages that
collect statistics on all Control-M/Server database folders. You can run this utility while Control-M/Server is
running.
The ctmdbopt utility collects folder and index statistics on the Control-M schema by using the
DBMS_STATS package. It affects all Control-M/Server for UNIX and Microsoft Windows database folders.
The statistics helps the optimizer to choose the fastest way to retrieve data (full folder scan, index scan,
or any other way).
Gathering statistics improves database performance. BMC recommends that you run this utility on a daily
basis, so that the database optimizer has updated statistics. To run the ctmdbopt command, see Running
the ctmdbopt utility (on page 557).
556
Control-M Utilities Guide
ctmdbrst
The ctmdbrst utility restores the Control-M/Server database in the following cases:
Control-M/Server was installed by using a dedicated PostgreSQL database server. Do not use this
utility if Control-M/Server was installed with an Oracle database (either existing or dedicated) or an
existing PostgreSQL database.
To restore an existing Oracle database or a PostgreSQL database, use the ctm_restore_bcp utility
(described on ctm_restore_bcp (on page 547)).
Control-M/Server was installed by using an MSSQL database server.
For more information about backup types, see Database operation and maintenance.
To run the ctmbrst utility, see Running the ctmbrst utility (on page 557) and to run in silent mode see
Running the ctmdbrst in silent mode (on page 558). To restore the Control-M/Server database, see
Restoring the Control-M/Server database (on page 558).
557
Control-M Utilities Guide
• To invoke the ctmdbrst utility for Control-M/Server installed with PostgreSQL, run the following
command (this mode is UNIX only):
ctmdbrst [ -p<administrator password>]
[ -f<administrator password file>]
[ -d<full path of backup directory/file>]
[ -a<full path of archive directory>]
[ -m<restore mode H/C>]
• Enter the following command at the command prompt to use the interactive menu (this mode is
Windows only):
ctmdbrst
For the Control-M parameter name, see Parameter name cross references (on page 31).
The following command causes the Control-M/Server database to be restored from the default backup
device:
ctmdbrst
558
Control-M Utilities Guide
ctmdbspace
The ctmdbspace utility checks the data and log usage in the Control-M/Server database and displays the
usage. The utility returns a "failed" status if the usage exceeds the specified limit. To run the ctmdbspace,
see Running the ctmdbspace utility (on page 559).
ctmdbspace can be included in the Control-M Watchdog process. For more information, see Watchdog
process parameters.
ctmdbtrans
The ctmdbtrans utility lists the active transactions in the database. A transaction is defined as the unit of
work performed by Control-M in the database. Each transaction is assigned a unique name identifying
that specific unit of work.
You may be asked by technical support to run this utility and to provide them with the output for
debugging purposes.
Another way to list active transactions in the database, is to select "List Active Transactions" from the
Troubleshooting menu. To run the ctmdbtrans utility and to run in silent mode, see Running the
ctmdbtrans utility (on page 559) and Running the ctmdbtrans utility in batch mode (on page 560).
559
Control-M Utilities Guide
ctmdbused
The ctmdbused utility displays the size (in MB), amount, and percentage of current space usage in the
Control-M/Server database data and log. To run a ctmbused utility see Running the ctmbused utility (on
page 560).
560
Control-M Utilities Guide
ctmdbused
Use this utility if you need to determine Control-M/Server database sizes frequently.
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on running the ctmbused utility, see ctmbused utility example (on page 561).
ctmreindex
The ctmreindex utility accesses the Control-M/Server database, reads the data dictionary, reads the index
definitions, and then reorganizes indexes. (UNIX only)
This utility is relevant only on Control-M/Server with a Sybase database.
The Control-M/Server Sybase database must be running so that the required index operations can be
performed. However, this utility should be run only when database activity is low.
561
Control-M Utilities Guide
This utility enables Control-M/Server database queries to execute faster by ensuring that indexes are
well-balanced. For more information about indexes, refer to Sybase manuals. To run the ctmreindex
utility, see Running the ctmreindex utility (on page 562).
dbversion
The dbversion utility retrieves the database server version and tests the connectivity of the
Control-M/Server database in use. The database can be any one of the following database servers:
Oracle, MSSQL, or PostgreSQL. To run the dbversion utility, see Running the dbversion utility (on page
562).
562
Control-M Utilities Guide
dbu_menu
The dbu_menu utility can be invoked interactively to facilitate day-to-day maintenance and diagnostics of
Control-M/Server database running with PostgreSQL, Oracle and MSSQL databases. On Windows, the
utility is called dbu_menu.bat.
NOTE: The Database Utilities Menu is only relevant for PostgreSQL, Oracle and MSSQL database
functionality. You can also access the database menu from the ctm_menu utility and select Database
Menu.
To facilitate day-to-day maintenance and diagnostics of Control-M/EM database use the
em_database_menu utility, as described in em_database_menu options (on page 502).
563
Control-M Utilities Guide
Database
Option Server Description
Start Database PostgreSQL Only enabled when Control-M/Server is running with a dedicated database server. Starts t
database server, and services involved.
(Running the
DBUStart NOTE: If this option is invoked on Control-M/Server running with an existing database, an
utility (on message is displayed.
page 575))
Stop Database PostgreSQL Only enabled when Control-M Server is running with a dedicated database server.
(Running the Stops the PostgreSQL database server, and services involved.
DBUStop
NOTE: If this option is invoked on Control-M/Server running with an existing database, an
utility (on
message is displayed.
page 576))
Set Database PostgreSQL Only enabled when Control-M/Server is running with a dedicated PostgreSQL database ser
Archive Mode the archive mode of the PostgreSQL database server.
(DBUArchive) Parameters available:
Mode
On
Off (default)
Archive Directory (only available when Mode is ON)
Full directory path to which the database server logs are archived.
NOTE: This directory should be empty. When Archive mode is On, the Hot Database Ba
is enabled.
Oracle
564
Control-M Utilities Guide
Database
Option Server Description
Extend Oracle Extends the size of the existing user database datafile, or adds a new datafile, to provide e
Database for schema objects.
MSSQL
Parameters:
Mode: Current or New
Current – a current data file is extended
New – an additional data file will be added to the database
Directory Path: the full directory path to the new datafile if parameter mode is set to N
Administrator Password: DBA password (for Oracle only)
Size: specified in MB
(MSSQL only) Type: Data or Log
565
Control-M Utilities Guide
Update Database Statistics PostgreSQL Updates statistic procedures in the database server.
(DBUUpdateStatistics) MSSQL
Oracle
Database Consistency Check PostgreS MSSQL: Performs allocation checks and verifies the structural and logi
QL integrity of all objects in the database
MSSQL Oracle: Detects bad blocks and checks table and index schema
consistency.
Cold Database Backup PostgreSQL Exports the Control-M/Server database schema to the specified file whe
Control-M/Server is shut down.
(DBUColdbackup (on page 571)) MSSQL
The following Control-M/Server components must be shut down prior t
activating this backup:
Control-M/Server Configuration Agent (shut_ca)
Control-M/Server (shut_ctm)
Parameters:
Backup File: Full path to the file into which the database should b
backed up.
Administrator password: Password of the PostgreSQL database
server administrator
566
Control-M Utilities Guide
Hot Database Restore PostgreSQL Only enabled when Control-M/Server is active and running with a
dedicated PostgreSQL database server.
(DBUHotRestore)
Online restore of the PostgreSQL database server file system and the
Control-M/Server databases. When this option completes successfully,
previous PostgreSQL database server file system is saved to the follow
location:
<pghome_directory/old_pgsql_<date of operation>
If Control-M/Server databases do not exist in the <pghome_directory>
is saved in the following location:
<db location>/<db name>_old_<date of operation>
The PostgreSQL database server and the following Control-M/Server
components must be shut down for this option to be enabled:
Control-M/Server Configuration Agent (shut_ca)
Control-M/Server (shut_ctm)
Parameters:
Restore Directory: Full path to the directory from which the server
system and Control-M/Server databases should be restored.
Archive Directory: Value and location specified in the Archive Direc
parameter of the Set Database Archive Mode option.
NOTE: When this action is finished successfully, the PosgreSQL
database server archive mode switches to off, and the PosgreSQL
database server shuts down.
The specified directory should be exported from the PostgreSQL
database server with the same parameter values as the destination
PostgreSQL database server.
567
Control-M Utilities Guide
Cold Database Restore PostgreSQL Imports the Control-M/Server database schema from the file specified
Backup File parameter of the Cold Database Backup option.
(DBUColdRestore (on page 572)) MSSQL
NOTE: The following Control-M/Server components must be shut down
for this option to be enabled:
Control-M/Server Configuration Agent (shut_ca)
Control-M/Server (shut_ctm)
Parameters:
Restore File: Value and location specified in the Backup File param
of the Cold Database Backup option.
Administrator password: Password of the PostgreSQL database ser
administrator.
restore_host_config
The Control-M/Server restore_host_config utility automates the recovery process to perform updates in
the host name configuration in the following situations:
Host name data restore in Disaster Recovery sites
Database server communication parameter property updates
Removing the high-availability secondary host data
The following procedures describe how to use the restore_host_config utility:
Restoring Control-M/Server hostname and configuration data during Disaster Recovery (on page 568)
Reconfiguring the database server connection data (on page 569)
Removing the secondary high-availability installation component data in the Control-M/Server
database (on page 569)
568
Control-M Utilities Guide
<Control-M/Server_home>\ctm_server\scripts\
2. Type the following command:
restore_host_config -dr [-primary/secondary]
569
Control-M Utilities Guide
570
Control-M Utilities Guide
Return codes
The return codes listed in the following table are issued by the interactive database utilities.
Return
code Description
571
Control-M Utilities Guide
Parameter Description
-BACKUP_FILE Full path to the file into which the database should be
backed up. Mandatory.
572
Control-M Utilities Guide
DBUColdRestore
[ -TRACE_LEVEL <error|log|info> ]
[ -HELP ]
[ -RESTORE_FILE <Full Path of Restore File Name> ]
[ -ADMINISTRATOR_PASSWORD <Administrator Password> ]
For more details about the DBUColdRestore utility, see DBUColdRestore utility parameters (on page
573).
The following example describes a utility DBUColdRestore sample output:
restore completed
Parameter Description
573
Control-M Utilities Guide
Parameter Description
-BACKUP_DIRECTORY Full path to the directory into which the database should
be backed up. Mandatory.
574
Control-M Utilities Guide
575
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error. Optional.
Use this option only when instructed to do so by BMC Customer
Support. Using this option can slow performance and use extra
disk space.
576
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error.
Optional.
NOTE: Use this option only when instructed to do so by BMC
Customer Support. Using this option can slow performance and
use extra disk space.
577
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error.
Optional.
NOTE: Use this option only when instructed to do so by BMC
Customer Support. Using this option can slow performance and
use extra disk space.
DBUStatus
The DBUStatus utility displays database client details for all supported databases.
Control-M/Server: Displays various PostgreSQL server and client details.
Control-M/EM: Displays various server and client details.
DB Type
Is Up
Is Remote DB
Last Startup Time
DB Server OS Version
DB Server Host Name
DB Server OS Type
DB Server Archive Directory
DB Server Port
DB Client OS Version
DB Client Host Name
578
Control-M Utilities Guide
DB Client OS Type
Number of Connections
Number of Backend Processes
DB Server Version
DB Client Version
To run the DBUStatus utility, see Running the DBUStatus utility (on page 579).
579
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error.
Optional.
NOTE: Use this option only when instructed to do so by BMC
Customer Support. Using this option can slow performance and
use extra disk space.
580
Control-M Utilities Guide
DBUStorage
The DBUStorage utility displays the following attributes of Control-M/EM or Control-M/Server for all
supported databases:
DB Name
Type
Size - refers to the operating system disk space
Free
Used
Used percentage
Location
Message - Warns the user when there is diminished disk space capacity within the Control-M/EM
database server
Recommendation
581
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error.
Optional.
Use this option only when instructed to do so by BMC Customer
Support. Using this option can slow performance and use extra
disk space.
582
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error.
Optional.
Use this option only when instructed to do so by BMC Customer
Support. Using this option can slow performance and use extra
disk space.
583
Control-M Utilities Guide
Parameter Description
-TRACE_LEVEL Trace level. Valid values: error, log, info. Default: error.
Optional.
Use this option only when instructed to do so by BMC Customer
Support. Using this option can slow performance and use extra
disk space.
584
Control-M Utilities Guide
585
10
10
Security
The security utilities define the security authorizations for various users and Control-M components,
including:
User registration and password changes
Access to databases and other components
By including a utility command in the command line of a job processing definition, you can run the utility
at a predetermined time or under a predetermined set of conditions without being present.
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
The following utilities are used to define security authorizations for various users and Control-M
components:
emcryptocli (on page 586): Creates an encrypted version of the password you submit.
ctmsec (on page 588): Protects Control-M against unauthorized usage or modification.
ctmsetown (on page 597): Manages the details of Control-M/Agent and remote host users.
ctmpasswd (on page 602): Enables you to change the Control-M/Server User’s password for accessing
the database.
ctmpwd (on page 603): (Windows only) Create and modify Control-M/Agent users and passwords.
emcryptocli
The emcryptocli utility creates an encrypted version of the password you submit. To run the emcryptocli
utility, see Creating an encrypted password using the emcryptocli utility (on page 587).
If the Control-M/EM database administrator user name or password is changed in the Control-M/EM
database, it must also be updated manually in all relevant mcs.ini files. By default, the password is
encrypted in the mcs.ini file. Use the emcryptocli utility to generate the encrypted version of your new
password.
Usage: You can invoke emcryptocli in either of the following modes:
Trial mode: You submit the new password and emcryptocli creates an output text file in the
specified location containing the encrypted version of that password. You can copy the encrypted text
to appropriate places in the mcs.ini file manually.
Operational mode: When you submit your username and new password, emcryptocli creates an
encrypted version of the password and inserts it in the appropriate places in the text of the mcs.ini
file. mcs.ini is saved automatically.
586
Control-M Utilities Guide
Item Description
<output file (Trial Mode only) Full path name of the output file created by
name> emcryptocli. The file contains the encrypted version of the password
that was submitted.
<path to mcs.ini> (Operation Mode only) Full path name of the mcs.ini file (for example,
windir\system32\mcs.ini).
587
Control-M Utilities Guide
ctmsec
The ctmsec utility can be invoked in interactive or batch mode. For more information about Control-M
security concepts, see Control-M security .
The ctmsec utility is used to:
Add, delete, or modify specific users in the Control-M Security database
Add, delete, or modify specific groups in the Control-M Security database
Assign authorizations to a user or group to perform actions on a Folder
Assigns authorizations to a user or group to perform actions relating to Control-M entities
The following topics are discussed in this section:
Security considerations (on page 588)
Security maintenance utility (Interactive mode) (on page 589)
Security maintenance utility (Batch mode) (on page 594)
Exporting security definition folders (on page 596)
Importing security definition folders (on page 597)
For the Control-M parameter name, see Parameter name cross references (on page 31).
Security considerations
Control-M/Server includes security features that protect Control-M against unauthorized usage or
modification. These features enhance the standard UNIX and Windows security, and provides an
additional application-level security layer. Using Control-M security, you can specify actions that each
Control-M/EM user or Control-M/Server user is authorized to perform. These authorizations are used to
perform security checks each time one of the following actions is attempted:
Accessing a Folder (to add, delete, or modify a job definition)
Ordering, selecting and submitting a job.
Commands affecting jobs in Active Jobs database (for example, Hold, Confirm, Rerun).
Maintenance of Control-M entities (for example, calendars, prerequisite conditions).
Security verifications for the above actions are implemented according to the specifications in a database
of authorizations. This database can be modified by the security officer or systems manager to meet the
needs of the enterprise. For more information, see Security maintenance utility (Interactive mode) (on
page 589)
Control-M provides the following levels of application security for users not explicitly defined in the
Control-M Security database:
588
Control-M Utilities Guide
Restricted: A user not defined in the Control-M Security database is regarded as having no
authorizations and cannot perform any function requiring security authorization.
Unrestricted: A user not defined in the Control-M Security database is regarded as having all
Control-M application authorizations.
The security level is determined by the value of the Control-M system parameter Full Security. If SSL is
installed, Secure Sockets Layer encryption and compression provide security for Control-M/Server
communication with Control-M/EM and Control-M/Agents. For more information, see the SSL
Management.
Regardless of which level is implemented, a user, for whom one or more authorizations have been
assigned in the Security database, can only perform those actions. The user of each job processing
definition must be defined as a user on the agent computer, otherwise, Control-M/Agent will not execute
the job.
When working with the Control-M/Server Security facility, wildcard characters are available for all options.
Wildcard characters * and $ are translated during runtime security checking. (For example, if User1 is
granted full Folder authorization for folder ACC*, Control-M allows User1 to update or order any folder
whose name starts with ACC).
Valid wildcard characters:
* represents any number of characters (including none).
$ represents a single character.
Wildcard character authorizations do not override full name authorizations. (For example, if User1 from
the example above is also defined to have only Read privileges for ACC999, Control-M will not allow User1
to update or order folder ACC999).
589
Control-M Utilities Guide
If there are no authorizations defined for the user, the user inherits the authorizations for the group.
If there are authorizations defined for a user, these authorizations take precedence.
When defining an authorization for a user (for example, Folder), use of the (D)efault setting enables
the specific authorization (for example, Read) defined for the group.
If all of a user’s authorizations for a specific Control-M element (for example, Folder) are defined with
a (D)efault setting, the user’s authorizations for that element can be deleted more efficiently.
Authorizations not specifically defined for a group, or for a user not belonging to a group, revert to
the Full Security parameter setting. See ctmsys (on page 448)
Certain functions of the ctmsec utility can be activated directly from a command line. For more
information, see Security maintenance utility (Batch mode) (on page 594). In addition, certain functions
of the ctmsec utility can be activated using the Control-M Configuration Manager. For more information,
see Control-M security.
The security of Sub-folders and jobs within Sub-folders is determined according the security that is set for
SMART folders.
User maintenance
The User Maintenance option of the ctmsec utility is used to add, delete, or modify specific users in the
Control-M Security database.
Each Control-M/EM user who performs actions affecting the Control-M/Server database or jobs in the
Active Jobs database must be defined in the Control-M Security database when full security is on. In
addition, all other users who invoke Control-M Security utilities must be defined in the Security database
and assigned appropriate privileges.
If the user in the commands listed below is a Control-M/Agent user, then the <user> format is
<username@HOST_ID>.
590
Control-M Utilities Guide
• Delete an existing user by specifying the user name to delete which is deleted from the Security
database.
• Modify an existing user by doing the following:
c. Type the name of the user.
d. Select the information that you want to modify.
• Copy an existing user by doing the following:
e. In the FROM user field, type the exact name of the user to be copied.
f. In the TO user field, type a new user name for the Control-M/EM user (maximum 30
characters, case-sensitive).
g. Enter Y to add the new user.
NOTE: Description (maximum length 50 characters) is optional and for documentation purposes only.
Group (maximum length 32 characters) is optional and if used the user inherits all authorizations
defined for the group that are not specifically defined for the user.
Group maintenance
Each user who has a user account on the Control-M/Server computer and who is defined in the Control-M
Security database, can be defined as part of a group. Belonging to a group is optional. All users belonging
to a group inherit the authorizations defined for the group.
Select Option 2 from the Security Maintenance Main Menu to display the Group Maintenance menu.
Group Maintenance Menu
-----------------------
1) List Groups
2) Add Group
3) Delete Group
4) Modify Group Information
q) Quit
Enter option:
591
Control-M Utilities Guide
Folder authorization
This option is used to assign authorizations to a user or group to perform actions on a Folder.
Select Option 3 from the Security Maintenance Main Menu to display the Folder Authorization menu.
For more information about the types of authorization that can be granted using this option, see Folder
Authorization options in Security maintenance utility (Batch mode) (on page 594).
592
Control-M Utilities Guide
The Y setting enables authorization for the action (for example, Read), N disables the
authorization, and (D)efault uses the authorization defined for the user’s group. If the user
was previously authorized for this folder, the user’s current authorizations are displayed;
otherwise, all authorizations are set to N.
b. Type s to save your changes.
• Delete folder authorization by typing the folder name you want to delete.
593
Control-M Utilities Guide
Entities authorization
This option assigns authorizations to a user or group to perform actions relating to Control-M entities.
For more information about the types of authorization that can be granted using this option, see Entities
Authorization Option in Security maintenance utility (Batch mode) (on page 594).
594
Control-M Utilities Guide
595
Control-M Utilities Guide
[-FORCE {Y|N|D}]
[-ORDER {Y|N|D}]
[-CONFIRM {Y|N|D}]
[-DELETE {Y|N|D}]
[-WHY {Y|N|D}]
[-RERUN {Y|N|D}]
[-OUTPUT {Y|N|D}]
[-LOG {Y|N|D}]
[-STATISTICS {Y|N|D}]
[-ZOOM_AND_SAVE {Y|N|D}]
[-KILL_JOB {Y|N|D}]
Use the following command to delete Active Jobs database authorizations:
ctmsec -ACT_DELETE {<user>|<group>} <owner> <host>
NOTE: If the user in the commands listed above is a Control-M/Agent user, then the <user> format is
<username@host_id>.
Entities authorization options
The entity authorization options of the ctmsec command are used to assign authorizations to users and
groups to perform actions relating to Control-M entities.
Use the following command to list entity authorizations:
ctmsec -ENTITY_LIST {<user>|<group>}
Use the following command to update entity authorizations:
ctmsec -ENTITY_UPDATE {<user>|<group>}
{LOG|QR|Control|CALENDAR|CONDITION}
[-ADD {Y|N|D}] [-DELETE {Y|N|D}] [-CHANGE {Y|N|D}]
Use the following command to delete entity authorizations:
ctmsec -ENTITY_DELETE {<user>|<group>}
{LOG|QR|Control|CALENDAR|CONDITION}
NOTE: If the user in the commands listed above is a Control-M/Agent user, then the <user> format is
<username@host_id>.
596
Control-M Utilities Guide
The file created by the EXPORT option of the ctmsec utility can be modified before security definitions are
imported back to the same (or a different) Control-M/Server installation. This is different from the file that
is created using the Backup Security Definition Folders option of the Security Authorization Menu (which
cannot be modified).
Use the following command to export Control-M Security Definition folders:
ctmsec -EXPORT <fileName>
<fileName> is the full path name of the file to be exported.
ctmsec -EXPORT /home/controlm/securedata
ctmsetown
The ctmsetown command line utility manages the authentication credentials of job owners for both local
and agentless jobs. In addition, the ctmsetown utility also enables the authentication details of users to
be imported or exported from different Control-M environments. To run the ctmsetown utility see Running
the ctmsetown utility (on page 598).
When a job is submitted, Control-M/Server attempts to find the owner and hostname authentication
details.
If the owner and hostname are found, Control-M/Server uses these credentials.
If the specified hostname is not found, Control-M/Server tries to find the owner on host <All>.
If the run_as is found on host <All>, Control-M/Server uses these credentials.
If the run_as is not found on the specified hostname or on host <All>, Control-M/Server uses empty
credentials.
Using ctmsetown through Control-M/Agent, the functionality of the ctmsetown utility (when invoked from
Control-M/Agent), is limited to updating passwords of existing owners. Using the utility, job owner
passwords can be updated through Control-M/Agent for:
597
Control-M Utilities Guide
598
Control-M Utilities Guide
Action Description
delete Removes the security details of an owner entry. The owner name and host
name must match an existing entry in the folder.
export Exports the security details of the existing users to a text file.
ctmsetown -action export -filename
$HOME/ctm_server/data/user_report.txt
import Imports the details of the users stored in the specified import file.
599
Control-M Utilities Guide
Parameter Description
-run as (Owner) Specifies the name of the user under whose name the job will run.
-host Specifies the name of the computer where the owner of the job is defined.
Specify <All> to include all hosts.
ctmsetown -action delete -run_as s -host "<All>"
-password Specifies the password of the owner. The password cannot exceed 120
characters.
-old password Specifies the existing password that the user is changing. This parameter is
mandatory only when the ctmsetown utility is executed from the agent.
-key name The logical name of the key. The key itself is kept in a separate folder with
its passphrase. For more information about generating and maintaining the
key, see ctmkeygen. The same key can be used for multiple users.
-pass phrase (Used if -keyname is defined) Specifies the phrase used to encrypt the key
itself.
-file name Specifies the name of the file that contains the security details of the users.
The filename cannot exceed 1024 characters.
This parameter is used only when either -action export or -action import is
specified.
-data Describes what action to take with the data from the imported text file.
Valid actions are:
append details of the users from the imported text file are added
to the existing users
truncate details of the users from the imported text file replace the
details of the existing users
600
Control-M Utilities Guide
601
Control-M Utilities Guide
ctmpasswd
The ctmpasswd utility enables the administrator to change the Control-M/Server User’s password for
accessing the database. Only an administrator can change the password. To run the ctmpassword utility,
see Running the ctmpasswd utility (on page 602).
602
Control-M Utilities Guide
ctmpwd
The ctmpwd utility (Windows only) adds, updates, and deletes Control-M/Agent users and passwords. In
addition, it changes security settings for the agent directories and cmd.exe. It also lists all users in the
Control-M/Agent password file. (This utility replaces the ctmcpt utility in earlier versions.)
To run ctmpwd, you must be an administrator on the computer.
NOTE: You must manually give Logon as a Batch job rights to a new user.
603
Control-M Utilities Guide
604
Control-M Utilities Guide
ctmpwd parameters
The following table describes the ctmpwd utility parameters:
Parameter Description
verify Verifies that the user and password. Valid values are:
Y (default)
N - Does not verify that the user and password are correct.
sub_application Adds the group SID (instead of the user SID) to cmd.exe and the
agent directories.
agent Name of the agent that the utility is designated to run on. For more
information, see Considerations for running utilities.
ctmpwd examples
In the following example, the ctmpwd utility enables the Control-M/Agent administrator to modify
passwords for users who have forgotten their password.
-admin_password
BMC recommends that the administrator first use the following command to establish a password for user
ADMIN:
ctmpwd -action add -user ADMIN -password <user_admin_password>
In the following example, the user is added but the group’s SID is registered.
ctmpwd –action add –user user1 –password user1 –group Everyone
605
11
11
Statistics and reporting
The statistics and reporting utilities generate and display various statistics.
By including a utility command in the command line of a job processing definition, you can run the utility
at a predetermined time or under a predetermined set of conditions without being present.
Some of the parameter names changed for Control-M version 8.0.00 and above, terminology from
previous versions is still supported. For a complete list of the parameter names, see Abbreviations and
conventions.
The following utilities generate and display various statistics:
bim_report (on page 606): Generates reports for services that have completed execution.
emreportcli (on page 608): Enables for the automation of the batch report execution process in a
selected format.
ctmjsa (on page 612): Compiles and records runtime data from the Statistical Details table.
ctmruninf (on page 615): Displays runtime data from the Statistical Details table of the
Control-M/Server database.
ctmstats (on page 618): Displays and deletes statistical data from the Statistical Summary table of the
Control-M/Server database.
bim_report
Generates reports for services that have completed execution.
The bim_report utility can be run both on Microsoft Windows and UNIX operating systems from their
respective command lines. To run the utility see Running the bim_report utility (on page 606).
606
Control-M Utilities Guide
-P <password>
[-O <output file name>]
[-N <service name>]
[-F <from date>]
[-T <to date>]
For the Control-M parameter name, see Parameter name cross references (on page 31). For more details
on the bim_report utility, see bim_report utility parameters (on page 607) and bim_report utility example
(on page 608).
Parameter Description
-U username Name of the Control-M/EM user running the report, for security purposes.
Mandatory.
-P password Password of the Control-M/EM user running the report, for security
purposes. Mandatory.
-O output file Name and full path of the output file that will contain the generated
name report. Optional. If not specified, the report is displayed on the screen but
is not saved in a file.
-N service name Name of the service that should be listed in the report. Optional. If not
specified, the report runs for all services.
-F from date Services whose order date (Odate) is the same as, or later than, this from
date value are included in the report. The date and time format is
DD/MM/YYYY_HH:MI:SS or MM/DD/YYYY_HH:MI:SS format (depending
on the value of the DateFormat system parameter). Optional.
If not specified, services whose order date was on the previous day
or later are included in the report.
-T to date Services whose order date (Odate) is the same as, or earlier than, this to
date value are included in the report. The date and time format is
DD/MM/YYYY_HH:MI:SS or MM/DD/YYYY_HH:MI:SS format (depending
on the value of the DateFormat system parameter). Optional.
If not specified, services whose order date is the current date and
time or earlier are included in the report.
607
Control-M Utilities Guide
emreportcli
The emreportcli utility enables the automation of the batch report execution process in a selected format.
This utility runs only on Windows in batch mode. To run the emreportcli utility, see Running the
emreportcli utility (on page 608).
You must specify Control-M/EM server login information when you invoke this utility.
Usage: Either of the following two options can be used to activate the emreportcli utility:
Parameters can be entered as command line parameters
An input arguments file can be generated with XML specifications. For more information, see
emreportcli input arguments file (on page 610)
608
Control-M Utilities Guide
Parameter Description
Password File name Flat file containing an unencrypted username and password in the following
format: user=username password=password.
If both -U and -pf are specified, an error message is generated. If neither is
specified, an online prompt is issued for the Control-M/EM database owner
name and password.
609
Control-M Utilities Guide
Param Specifies the name and value for each parameter in the form
name=value. Wildcard can be used for text fields.
610
Control-M Utilities Guide
filepath Specifies the full filename of the output file (which will be
overwritten if it previously existed)
Dynamically resolved keys can be included when specifying
the filepath attribute: {date}, {time}, and {counter}.
For filepath=D:\Test.doc (that is, no key), the output file
is: D:\Test.doc.
For filepath=D:\Test-{date}.doc, the output
file is D:\Test-May22, 2008.doc.
For filepath=D:\Test{counter}.doc, the first
output file is D:\Test1.doc, and the next output
file is D:\Test2.doc.
611
Control-M Utilities Guide
ctmjsa
The ctmjsa utility compiles runtime data from the Statistical Details table and records it in the Statistics
Summary table of the Control-M/Server database. This utility must be run by a Control-M/Server user.
Each time it is run, this utility:
Scans the statistical data for jobs that terminated with OK status. The jobs scanned can be limited to
a range of dates as described below.
Computes the average run time and standard deviation for each job for which data was found.
Records the statistical data in a summary table in the Control-M/Server database (from which the
data is made available to Control-M/EM).
No other output is generated by this utility.
Display the summary data filtered according to specified parameters.
Statistical data is only accumulated when the Control-M system parameter Statistics is set to Y.
Operational parameter Statistics Mode determines the mode to be used to compile summary statistics:
JOBNAME or MEMNAME. The default is MEMNAME.
If the Statistics Mode parameter was changed from File name to JOBNAME or back since the last run of
the ctmjsa utility, you can cleanup the statistics from the previous mode by running the following
command: ctmstats –delete. The Statistics Mode parameter can be changed through ctm_menu by
choosing Parameter Customization Menu =>Advanced Communication and Operational
Parameters =>Statistics Mode.
For more information about runtime statistical data, see the information about runtime statistics in
Control-M Forecast parameters. To run the ctmjsa utility, see Running the ctmjsa utility (on page 612).
612
Control-M Utilities Guide
NOTE: If the Statistics Mode parameter is JOBNAME, FILE_NAME and FILE_PATH fields in the Statistical
Summary table are blank. If the Statistics Mode parameter is FILENAME, the Job Name field is blank.
For the Control-M parameter name, see Parameter name cross references (on page 31). For more
information, see ctmjsa utility parameters (on page 613) and ctmjsa utility example (on page 614).
Parameter Description
-<delta1> Unsigned number used to establish the starting date for statistical data to
be compiled. This date is determined by subtracting <delta1> from
<date> (for example, if <delta1> is 10 and <date> is 991220, the
starting date is 991210).
-<delta2> Unsigned number used to establish the ending date for statistical data to
be compiled. This date is determined by adding <Delta2> to <Date> (for
example, if <Delta2> is 5 and <Date> is 991220, the ending date is
991225).
<date> Date used together with <Delta1> and <Delta2> to determine the range
of dates used for compiling statistical data. The date is expressed in
yyyymmdd or yymmdd format.
"*" Asterisk enclosed in quotation marks. Specifies that the utility collects all
statistical data available without regard to date.
-list Display data from the Statistical Summary table filtered according to
specified sub parameters. Use this option after you have updated the
summary table. Output includes the Folder name for each job. This
information is also available from Control-M/EM in the Statistics window.
Filter Specify one of the following options and its sub parameter, or specify the
null character " " to display statistics for all jobs. This works the same
way as "*", which should be enclosed in quotation marks. ? Represents
any single character.
613
Control-M Utilities Guide
Parameter Description
614
Control-M Utilities Guide
ctmruninf
The ctmruninf utility displays runtime data from the Statistical Details table of the Control-M/Server
database. An option is available to delete data from this table. The jobs scanned for both options can be
limited to a range of dates as described below. To run the ctmruninf utiilty. see Running the ctmruninf
utility (on page 615).
Statistical data is only accumulated when the Control-M/Server system parameter Statistics is set to Y.
For more information about runtime statistical data, see the information about runtime statistics in
Control-M Forecast parameters.
615
Control-M Utilities Guide
Parameter Description
-list Displays data from the Statistical Details table within the dates
specified in the From Date and To Date parameters. The data listed
can be limited by using the Filter subparameter (described in this
table).
-delete Deletes data from the Statistical Details table in the range specified in
the From Date and To Date parameters.
"*" Asterisk enclosed in quotation marks. Specifies that the utility should
list all statistical data currently available, without regard to date.
<Filter Specify one of the following options and its associated subparameter
or leave blank to display the statistics for all jobs in the range.
-JOBNAME <jobName>
Identify the job by the first 10 characters in its Job Name
parameter.
-FILE_NAME <file name>
Identify the job by its file name parameter.
-FILE_PATH <path>
Identify jobs by their file path parameter specifications.
-HOSTID <hostid>
Identify jobs by their Host ID parameter (agent computer).
-ORDERID <orderid>
Identify jobs by their Order ID parameter.
Each of the sub parameters in the filter can include the following
wildcard characters:
* represents any number of characters (including none). Any
parameter including * should be enclosed in quotation marks (see the
third example below).
? represents any single character
616
Control-M Utilities Guide
Parameter Description
-total Displays the total CPU and elapsed times for the jobs selected.
-purge Purge data from the Statistical Details table based on the number of
job executions.
Running the ctmruninf utility with the -PURGE option performs the
statistics cleanup as if it was done during New Day with the
RUNINF_PURGE_MODE set to 0 (default).
The Statistics algorithm (JOBNAME or MEMNAME) and the
RUNINF_PURGE_LIMIT parameter are taken from the config.dat
table, if configured.
NOTE: You can speed up the New Day procedure by specifying N for
the STATISTICS_CLEANUP_IN_NEWDAY parameter and running
ctmruninf -PURGE in a job that is run daily. Only the last n run
information records of a job are kept, where n is the value of
RUNINF_PURGE_LIMIT (default 20).
617
Control-M Utilities Guide
ctmstats
The ctmstats utility displays and deletes statistical data from the Statistical Summary table of the
Control-M/Server database. The data scanned for both options can be limited to a range of dates. The
Statistical Summary table is created using the ctmjsa utility. To run the ctmstats utility see Running the
ctmstats utility (on page 618).
Statistical data is only accumulated when the Control-M system parameter Statistics is set to Y. For more
information, see System Parameters referred to in ctmsys (on page 448).
618
Control-M Utilities Guide
Parameter Description
-list Displays data from the Statistical Summary table within the dates
specified by the From Date and To Date parameters. The data listed
can be limited with use of the Filter sub-parameter (see below).
-delete Deletes data from the Statistical Summary table in the range specified
by the From Date and To Date parameters.
"∗" Asterisk enclosed in quotation marks. Specifies that the utility should
list all statistical data currently available, without regard to date.
<Filter> Specify one of the following options and its associated subparameter
or leave blank to display the statistics for all jobs in the range.
-JOBNAME <jobName>
Identify the job by its Job Name parameter.
-HOSTID <hostid>
Identify jobs by their host id parameter (agent computer).
-total Displays a line that contains the total CPU and elapsed times for the
jobs selected.
619
Control-M Utilities Guide
620
12
12
Upgrade
The migrate_dc utility promotes Control-M/Server job processing definition formats from earlier versions
of Control-M.
The migrate_dc utility is part of the Control-M upgrade process. The migrate_dc utility converts
Control-M/Server job processing definition formats within the Control-M/EM database. The
Control-M/Server job processing definition formats are converted from the Control-M/Server data formats
in the earlier version to the data formats in the new version. For more information about upgrade, see
Control-M Upgrade.
NOTE: Do not use this utility if you have not yet installed and upgraded to a new version of Control-M/EM
and Control-M/Server.
The upgrade process was previously called Migration. Control-M/Server is sometimes called Data Center.
migrate_dc
Use the migrate_dc utility to promote the job processing definition formats in Control-M/EM from an
earlier versions to Control-M/Server to the format of the current version. To promote using Control-M
Configuration Manager, see Promoting Control-M/Server data formats on Control-M/EM. To run the utility,
see Running the migrate_dc utility (on page 621).
NOTE: There is no rollback procedure from changes made by the migrate_dc utility. Before using the
migrate_dc utility, backup all your data
The destination Control-M/Server must be defined in COMM folder before executing the migrate_dc utility.
By default, all job definitions are converted to a format that is consistent with the standards for the
current version.
If you upgraded Control-M/Server on UNIX or on Windows to a version earlier than 6.4.01, or if you
upgraded Control-M for OS/390 to a version earlier than 6.4.01, and then want to run the migrate_dc
utility in Control-M/EM database for the upgraded Control-M definitions, you must specify -version
{700|800|900} in the migrate_dc command line to prevent the current version format from being
applied to the jobs for this Control-M.
621
Control-M Utilities Guide
622
Control-M Utilities Guide
Parameter Description
old_dc the source Control-M/Server (data center) name, as defined in the COMM
folder
migrate_dc example
The following is an example of migrate_dc usage:
Use the migrate_dc utility to promote Control-M/Server job processing definition formats in the
Control-M/EM database on computer saturn from version 6.3.01 Control-M/Server data formats to version
9.0.00 Control-M/Server data formats.
The following table lists the names and definitions used in this example:
Parameter Name
dataCenter jupiter
(Control-M/Server)
623
Control-M Utilities Guide
Parameter Name
624
13
13
Forecast
The forecastcli utility enables you to perform a Load Forecast operation in batch mode. The main outputs
are, for the specified date:
Service information (only available if you have the Control-M Batch Impact Manager Add-on installed)
Service information includes a summary of the business services identified by Control-M/Forecast. If
at least one service is identified as late, a warning is indicated in the output.
Job information (always available)
Job information is ordered for a specific future date. You can specify whether or not the estimated
run times are included in the output.
To run the forecastcli utility, see Running the forecastcli utility (on page 625)
625
Control-M Utilities Guide
forecastcli parameters
The following table describes the parameters of the forecastcli commands:
Parameter Description
-odate Indicates the forecast report date (or number of days from current
date). Required.
Valid values are:
-scenario <name> Indicates the name of the forecast scenario that is applied to the
forecast.
-run_time Indicates type of run time that is used for the forecast.
Valid values are:
Min Minimum
Max Maximum
-job_info_file Indicates the file name where the job information output is saved. The
<file_name> output is in CSV format. Required.
-service_info_file Indicates the file name where the service information output is saved.
<file_name> The output is in CSV format.
-hide_times The estimated job start and end time will not be printed in the job
information output file.
/? or /h Displays usage.
626
Control-M Utilities Guide
forecastcli examples
The following are forecastcli examples:
To know, on a daily basis, which services or jobs will be ordered on the following day, run the following
command. The output files, services.csv and jobs.csv, list the services and jobs, indicating their run times
and statuses.
forecastcli -u emuser -p empass -s emserv1 -odate +1 -job_info_file jobs.csv
-service_info_file services.csv
The following command generates a forecast for February 17, 2009. The job information is written to the
out.csv file.
forecastcli -u emuser -p empass -s emserv1 -odate 20090217 -job_info_file
out.csv
The following command generates a forecast to obtain a list of the jobs that will run on all data centers
with names beginning with "A" for February 17, 2009. The run times are not included in the output file in
order to compare it to another job list forecasted for another date.
forecastcli -u emuser -p empass -s emserv1 -odate 20090217 -dc_name A*
-job_info_file out.csv /hide_times
627
14
14
Batch Discovery
Using Batch Discovery, critical batch services defined and monitored with Control-M/EM and Control-M
Batch Impact Manager can be output in CSV files and imported into the BMC Atrium CMDB to enhance
control over change processes and system failures, and provide a view of the critical batch processes in
the IT environment. To run the Batch Discovery utility, see Running the Batch Discovery utility (on page
628).
628
Control-M Utilities Guide
Parameter Description
Return
code Description
0 Success
1 Failure
255 Failure
629
15
15
Unsupported utilities
The following utilities are provided "as is."
BMC does not support these utilities and assumes no responsibility for problems that may occur as a
result from using these utilities. BMC advises users not to use these utilities:
addevice
addto_interfaces_file
ags
ajf
ctm_backup_aut
ctm_grj
ctm_jcl
ctm_mirrordb_bck
ctm_newday
ctm_shout
ctm_sysout_down
ctm_sysout_hndl
ctm2snmp
ctmdbcount
ctmeditjcl
ctmgtsch
ctmjckdl
ctmjcopy
ctmlbsel
ctmmksch
ctmshdst
ctmsnmp
ctmtunnelreq
ctmweb
630
Control-M Utilities Guide
CtoSrvDa
dbbackupora
dbbackupsyb
dbcheckora
dbchecksyb
dbloadora
dbloadsyb
dbrestoreora
dbrestoresyb
dbunloadora
dbunloadsyb
dbupstatora
dbupstatsyb
dsdisp
dsmk
ecacontb
shdest
upg_ping
631