HCL Workload Automation, Version 9.4

jobprop

Use the jobprop command on a job definition to set variables locally for a job on dynamic agents.

You can use this command on a native or executable job to set variable value that you can pass in a successive job in the same job stream. The values are set at run time.

Syntax

jobprop  variable value

Arguments

variable
The variable name.
value
The value for variable.

Comments

Variable names are case-sensitive. If variable names or values contain spaces, they must be included in single quotes.

Examples

On UNIX operating systems the jobprop utility set the following variables in the NC125133#JOBA executable job:
  • VAR1 variable set to value1 value.
  • VAR2 variable set to value2 value.
  • VAR3 variable set to value3 value.
  • VAR4 variable set to value4 value.
NC125133#JOBA
 TASK
    <?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/
scheduling/1.0/jsdl" xmlns:
jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle">
  <jsdl:application name="executable">
    <jsdle:executable interactive="false">
    <jsdle:script>#!/bin/sh
. /home/ITAuser/TWA/TWS/tws_env.sh
jobprop VAR1 value1
jobprop VAR2 value2
jobprop VAR3 value3
jobprop VAR4 value4
</jsdle:script>
    </jsdle:executable>
  </jsdl:application>
</jsdl:jobDefinition>
 DESCRIPTION "Sample Job Definition"
 RCCONDSUCC "RC>=0"
 RECOVERY STOP
On Windows operating systems, the jobprop utility set the following variables in the WIN1#JOB1 executable job:
  • var1 variable set to value1 value.
  • var2 variable set to value2 value.
  • var3 variable set to value3 value.
  • var4 variable set to value4 value.
WIN1#JOB1
 TASK
    <?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/
scheduling/1.0/jsdl" xmlns:
jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle">
  <jsdl:application name="executable">
    <jsdle:executable interactive="false">
    <jsdle:script>
call C:\Progra~1\HCL\TWA\TWS\tws_env.cmd
jobprop var1 value1
jobprop var2 value2
jobprop var3 value3
jobprop var4 value4
</jsdle:script>
    </jsdle:executable>
  </jsdl:application>
</jsdl:jobDefinition>
 DESCRIPTION "Sample Job Definition"
 RCCONDSUCC "RC>=0"
 RECOVERY STOP
Note: Before running the jobprop utility in the job definition, ensure you run the tws_env.cmd command with the correct syntax call <TWS_INST_DIR>\TWS\tws_env.cmd where <TWS_INST_DIR> is the HCL Workload Automation installation directory.