Syntax diagram for script and executable job type

Purpose

If you set JOBCMD to (script) or (executable), you can choose between the following native job types:
  • Script
  • Executable
This section provides detailed information about the syntax diagram for the script and executable job types. The following syntax rules apply:
  • The JOBCMD keyword is required for executable and optional for script job types.

Format


1  JOBREC
1+ 
1  ENVVARid (  environment variable name=value )
1  ...
2?  EXTENSION (  extension of script file )
2?  INTRACTV (
3.1! NO
3.1 YES
2 )
2?  JOBCMD (
3.1! SCRIPT
3.1 EXECUTABLE
2 )
2?  JOBPWD (
3.1! NO
3.1 YES
2 )
2?  JOBUSR (  user name )
1+ 
1?  PARMid (  parameter )
1  ...
3?  STDERROR (  standard error file path )
3?  STDINPUT (  standard input file path )
3?  STDOUTPUT (  standard output file path )
3?  WRKDIR (  working dir path )
3?  WSNAME (  workstation name )

Parameters

ENVVARid(environment variable name=value)
The environment variable that the task launcher must set before submitting the job. You can specify a series of ENVVARid keywords, where id is a unique numeric value, including null and zero.
Use the following format, which is case sensitive:
ENVVARid(environment variable name=value)
Where:
environment variable name
The name of the environment variable.
value
The value associated with the environment variable.
EXTENSION(extension of script file)
The extension (bat, vbs, etc.) of the script file launched by the job. This keyword is valid only when JOBCMD is set to SCRIPT.
INTRACTV(YES|NO)
Specifies if a Windows job runs interactively on the Windows desktop. This keyword is valid only for jobs running on Windows HCL Workload Automation Agent workstations.
JOBCMD(EXECUTABLE|SCRIPT)
The content of the job definition member. Valid values are:
SCRIPT
The job definition member contains the command or script to be run. You can add the EXTENSION keyword to specify the file extension.
EXECUTABLE
The job definition member invokes the job that is to be run, which is stored locally on the HCL Workload Automation Agent workstation. If you did not set any value for the WRKDIR keyword, you must specify the fully qualified path to the job.
JOBPWD(YES|NO)
Specifies that the user name set in JOBUSR or by using the job-submit exit EQQUX001 is associated with a password. If you set JOBPWD to YES, HCL Workload Automation for Z searches for the user password in the USRPSW keyword of the USRREC statement (for details, see Customization and Tuning).

Typically, the password is required for users who schedule jobs to run on Windows workstations. Set JOBPWD to NO if the user works with UNIX workstations.

JOBUSR(user name)
The user name for running the script or executable, if required.
If the user schedules jobs to run on Windows workstations, ensure that a user password is also defined (see the JOBPWD keyword).
  • If you are defining a Windows domain user, use the following format:
    JOBUSR(domainName\user1)
  • If you are defining a Windows user in the username@internet_domain format, use the following format:
    JOBUSR('administrator@mywindom.com')

To specify the user name, you can also use the job-submit exit EQQUX001. This user name overrides the value specified for JOBUSR. In turn, the value specified for JOBUSR overrides the value specified for USRNAM in the USRREC statement.

PARMid(parameter)
The parameter to be used when running the script or command. You can specify a series of PARMid keywords, where id is a unique numeric value, including null and zero.
STDERROR(standard error file path)
The fully qualified name of the file where the standard error must be redirected.
STDINPUT(standard input file path)
The fully qualified name of the file to be used as standard input.
STDOUTPUT(standard output file path)
The fully qualified name of the file to be used as standard output.
WRKDIR(working dir path)
The fully qualified path to the directory where the script or command is to be run.
WSNAME(workstation_name)
The name of the workstation from which user name and password must be retrieved. User name and password can be specified in the statement, using the JOBUSR and JOBPWD keywords, or can be associated to a workstation with the USRREC statement. With the WSNAME keyword, you can specify a workstation where the user name and password are stored, which is different from the workstation where the job runs.

Examples

The following is an example of a JOBREC statement to invoke the script ALLOCATE.BAT stored locally on the HCL Workload Automation Agent workstation:
//JOBREC                           
WRKDIR(C:\)                        
STDERROR(D:\MYDIR\ERROR.TXT)       
STDINPUT(D:\MYDIR\INPUT.TXT)       
STDOUTPUT(D:\MYDIR\OUTPUT.TXT)     
STDOUTPUT(D:\MYDIR\NEWT.TXT)       
JOBCMD(EXECUTABLE)                 
PARM(300)                          
PARM2(ELEMENT)                     
//END JOBREC                       
D:\MYDIR\ALLOCATE.BAT
The following is an example of a JOBREC statement to run the command DIR on the directory C:\PROGRAM on the HCL Workload Automation Agent workstation:
//JOBREC                
WRKDIR(C:\PROGRAM)      
JOBCMD(SCRIPT)          
EXTENSION(vbs)          
//END JOBREC            
DIR