Running the composer program

About this task

To configure your environment to use composer, set the PATH and TWS_TISDIR variables by running one of the following scripts:
On UNIX® operating systems:
  • . ./TWA_home/TWS/tws_env.sh for Bourne and Korn shells
  • . ./TWA_home/TWS/tws_env.csh for C shells
On Windows® operating systems:
  • TWA_home\TWS\tws_env.cmd

Then use the following syntax to run commands from the composer user interface:

composer [custom_parameters] [-file customPropertiesFile][connection_parameters] ["command[&[command]][...]"]

where:
custom_parameters
Sets the working directory or current folder using the following syntax:
-cf /foldername
The current directory from where commands are submitted. The default current directory is the root (/).
-file customPropertiesFile
The custom properties file where you can specify connection parameters or custom parameters that override the values specified in the useropts, localopts and jobmanager.ini files. Connection parameters specified in the custom properties file must have the following syntax:
HOST=hostname
  PORT=port
  PROTOCOL=http/https
  PROXY=proxyName
  PROXYPORT=proxyPortNumber
  PASSWORD=password
  TIMEOUT=seconds
  USERNAME=username
  CURRENT FOLDER=/foldername
connection_parameters
If you are using composer from the master domain manager, the connection parameters were configured at installation time and do not need to be supplied, unless you do not want to use the default values.
If you are using composer from the command line client on another workstation, the connection parameters might be supplied by one or more of these methods:
  • Stored in the localopts file
  • Stored in the useropts file
  • Supplied to the command in a parameter file
  • Supplied to the command as part of the command string

For an overview of these options see Setting up options for using the user interfaces. For full details of the configuration parameters Configuring command-line client access authentication.

Note: If you are using composer from the command-line client on another workstation, for the following subset of scheduling objects, the composer command line connects to the server by using an HTTPS connection:
  • jobs
  • job streams
  • folders
  • run cycle groups
  • workload applications
  • access control lists
  • security domains
  • security roles
In this case, the command-line client assembles the full set of connection parameters in the following order:
  1. Parameters specified in the command string itself
  2. Parameters specified in the custom properties file
  3. Parameters specified in the useropts file
  4. Parameters specified in the localopts file
  5. Parameters specified in the jobmanager.ini file
Valid values include:
[-host hostname]
The name of the host that you want to access by using wappman command line.
[-port port_number]
The TCP/IP port number used to connect to the specified host.
[-protocol {http | https}]
The protocol used to connect to the specified host.
[-proxy proxyName]
The name of the proxy server used when accessing a command-line client.
[-proxyport proxyPortNumber]
The TCP/IP port number of the proxy server used when accessing using a command-line client.
[-jwt JSON Web Token]
Specify the JWT to be used for authentication between the master domain manager and agents. You can retrieve the token from the Dynamic Workload Console. This parameter is mutually exclusive with the username and password parameters. The JWT authentication applies to the commands you launch in the shell where you specify the JWT.
[-username user_name]
An HCL Workload Automation user with sufficient privileges to perform the operation. This parameter is mutually exclusive with the jwt parameter.
[-password password]
The password of the HCL Workload Automation user. This parameter is mutually exclusive with the jwt parameter.
[-timeout seconds]
The timeout in seconds when accessing using a command-line client. The default is 3600 seconds.
[-defaultws twscpu]
The default workstation. This workstation is used when you run composer commands without specifying a workstation.
If host, port, and protocol parameters are specified in a file, all of them must be specified in the same file.

The composer command-line program is installed automatically when installing the master domain manager. It must be installed separately on top of an HCL Workload Automation agent workstation or stand-alone on a node outside the HCL Workload Automation network. The feature that installs the composer command-line program is named Command Line Client that is installed together with the fault-tolerant agent and dynamic agent.

You can use the composer command line both in batch and in interactive mode.

When running composer in interactive mode, you first launch the composer command-line program and then, from the composer command line prompt, you run commands one at a time, for example:
    composer –username  admin2  –password  admin2pwd
       add myjobs.txt 
       create myjobs.txt from jobs=@
When running composer in batch mode, you launch the composer command-line program specifying as input parameter the command to be issued. When the command is processed, the composer command-line program exits, for example,
    composer –f “c:\TWS\network\mylocalopts” add myjobs.txt
Note: If you use the batch mode to issue more than one command from within the composer, make sure you manage the semi-colon (;) character in one of the following ways:
  • Using double quotation marks, for example:
    composer "delete dom=old_domain; noask"
  • Using a space character, for example:
    composer delete dom=old_domain noask
  • Escaping the ; character, for example:
    composer delete dom=old_domain \; noask
Other examples on how to use the command, assuming connection parameters are set in the local configuration scripts, are the following:
  • Runs print and version commands, and quits:
    composer "p parms&v"
  • Runs print and version commands, and then prompts for a command:
    composer "p parms&v&"
  • Reads commands from cmdfile:
    composer cmdfile
  • Pipes commands from cmdfile to composer:
    cat cmdfile | composer 
  • Authenticates using JWT:
    composer -jwt igJraVRiOiTls2l.....JUNnrWmdC-kR
Note: On Windows workstations, if the User Account Control (UAC) is turned on and the UAC exception list does not contain the cmd.exe file, you must open the DOS command prompt shell with the "Run As Admnistrator" option to run composer on your workstation as a generic user different from Administrator or HCL Workload Automation user.