Previous Topic

Next Topic

Book Contents

Book Index

Command

Indicates an operating system command line entry to be submitted as a job. Use this parameter to specify an operating system command to execute by Control-M. The command must be specified exactly as it would be specified in a terminal for the specific computer.

NOTE: This parameter is not relevant in z/OS environments.

Additional Information

Description

Usage

This parameter can be used only if the What parameter is Command. In this case, the Command parameter is required.

Length

1 through 512 characters

Case Sensitive

  • Microsoft Windows: No
  • UNIX: Yes

Invalid Characters

None

Variable Name

Yes. A Variable or expression can be specified as all or part of the value for this parameter.

Alternate Names

  • Control‑M/EM Utilities: CMDLINE
  • Reporting Facility: CMD LINE
  • Control‑M/Server Utilities: -cmdline
  • Control‑M/EM API: command

Computer specific information

  • Commands submitted to a UNIX computer are executed using the Bourne shell.
  • For Control-M/Agent for iSeries (AS/400) version 2.1.3,commands must not include single quotation marks (‘ ‘).If quotation marks are necessary, use double quotation marks (" ") only.
  • For Windows agents: When specifying variables in the CMDLINE or COMMAND parameters on Control-M/Agent for Windows, the variable prefix must be specified as %%%% instead of %%.

Control-M creates a temporary file that contains the command. This file is submitted for execution, and is monitored and analyzed in the same manner as a regular job.

The command can include any combination of text and variables. However, the length of the command after resolution of variables must not exceed 999 characters. For more information about variables, see Control-M Variable facility.

EXAMPLE: OpenVMS

BACKUP DUA0:[000000...] MUA0:MONBKP/SAVE

UNIX

tar cvf /dev/rmt0 -c /home

iSeries (AS/400)

SAVLIB LIB(LIB_1 LIB_2) DEV(TAP02)

Using variables in a command)

The command in this job uses the Control‑M ctmcontb utility to delete all prerequisite conditions that are more than five days old.

Variable Assignment:

%%A=%%CALCDATE %%DATE -365

%%B=%%CALCDATE %%DATE -5

Command:ctmcontb deletefrom %%A %%B

Parent Topic

General parameters