submit docommand

You can use the submit docommand command to schedule the start of a command as a job.

Overview

You can use the command to schedule the start of a command as a job and if needed, with pre-defined conditions. You must have submit access for the job to run the command. If you want to use the alias keyword for the job, make sure the job name in the database is specified along with the keyword.

You can also perform this action from any workstation other than the master domain manager. In such cases you must meet the following requirements:
  • Valid credentials defined in the useropts file to connect to the master domain manager through WebSphere Application Server Liberty Base.
  • Authorized to perform submit commands in the security file stored on the master domain manager.

Syntax and command line options

Before you run the command as a job, you must specify options such as the command and required permissions. There are mandatory and optional parameters which you can use to schedule the start of a command. You can enter the command as follows:
submit docommand | sbd = <[folder/]workstation#]><"cmd"><alias[=name]>
<[into=[[folder/]workstation#]{jobstream_id;schedid |[folder/]jobstreamname([hhmm[date]])}]><[joboption[;...]>
Note: On Windows operating system, when you launch a submit docommand, you must mask the equal (=) sign as '\='\.
For example, to set the local variable var1 to hello you must issue the following command:
%sbd "set var1\"=\"hello"

You can add the parameters according to the specific results you want to achieve. The only mandatory parameter is cmd. The details required with each parameters are as follows:

workstation

Specify the name of the workstation on which you want to run the job. You can use wildcard characters and in such cases, the job is started on all the matching workstations. You cannot specify a domain or workstation class.

cmd

You must specify a valid command and can use up to 255 characters. The command is treated as a job and all the job rules are applicable. You must enclose the entire command in double quotation marks (").

into=[folder/]jobstream_instance

Specify the jobstream instance to start a job. You can also provide the folder that contains the job stream definition. If you do not specify any jobstream, the jobs are added to the default job stream JOBS. The associated files of JOBS job stream are always located at the root (/).

Select the job stream instance as follows:

[[folder/]workstation#][folder/]jobstreamname([hhmm[ date]])
or
[[folder/]workstation#]jobstream_id ;schedid
joboption

The optional parameters to customize the launch of a job. You can specify one or more of the following options.

Important: You must use the semicolon (;) before adding any of the below mentioned job options to filter the results.
Table 1. joboption
Options Reference
at= hhmm [timezone|tz tzname] [+n days | [mm/dd | mm/dd[/yy]]] | [absolute | abs] at
deadline= time [timezone | tz][+n day[s] [mm/dd | mm/dd[/yy]]] deadline
follows=[workstation#]{jobstreamname[time [mm/dd[/yy]]][.job | @] | jobstream_id.job;schedid}| job[,...] [if 'condition_name[| condition_name][| ...]'] The scheduler classifies follows dependencies as internal when they are specified only with the job name and are classified as external when they are specified in workstation#[folder/] jobstreamName.jobName format. follows
maxdur=[time] [onmaxdur action] maxdur
mindur=[time] [onmindur action] mindur
logon You can specify the user name to run the job.
until time [timezone|tz tzname][+n day[s]] | [;onuntil action] until
confirmed confirmed
critical critical
wait When the object specified in the dependency is not found, the HCL Workload Automation performs a second check on the dependency after pre-defined time. You can specify this time in seconds. The submission is performed, if the object specified in the dependency is created during the wait interval, otherwise the job is not submitted.
nocheck If you use the parameter in command line option, no check will be performed when an object mentioned in the dependency is not found. The job will continue to run without the dependency.
Restriction: Not supported for internet work dependencies.
recovery You can specify the recovery options for the job. For more information, see recovery.
recoveryjob You can enter the name of the job, if it is different from the job which you have specified in jobname. You must have the submit access for the job specified to add this parameter.
abendprompt "text" You can write a text which you want to display, when a job ends abnormally. The text an contain up to 64 characters. For more information, see abendprompt "text".

Examples

  1. To submit a rm command into the job stream JOBS with a follows dependency, run the following command:
    submit docommand = "rm apfile";follows sked3
  2. To submit a sort command with the alias sortit and place the job in the job stream reports with an at time of 5:30 p.m., run the following command:
    sbd "sort < file1 > file2";alias=sortit;into=reports;at=1730
  3. To submit chmod commands on all workstations with names beginning with site, run the following command:
    sbd site@#"chmod 444 file2";alias