Running the composer program

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

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

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

where:
custom_parameters
Sets the working directory or current folder:
-cf /foldername
-file customerPropertiesFile
Indicates an alternate custom properties file containing the settings for either the customer parameters or the connection parameters, or both, used in place of the useropts and localopts files.
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
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:
[-username user_name]
An IBM Workload Scheduler user with sufficient privileges to perform the operation.
[-password password]
The password of the IBM Workload Scheduler user.
[-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.
[-timeout seconds]
The timeout in seconds when accessing using a command-line client. The default is 3600 seconds.
[-cf /foldername
The current directory from where commands are submitted. The default current directory is the root (/).
[-file custom_properties_file]
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
If host, port, and protocol parameters are specified in a file, all of them must be specified in the same file.

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 
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 IBM Workload Scheduler user.