Thursday, 8 October 2015

Chapter 13: Micro Focus Jobs



Chapter 13: Micro Focus Jobs

Micro Focus Jobs 

The Micro Focus Net Express JCL engine lets you run your mainframe JCL and COBOL 
programs in a Windows environment. 
You can schedule and control your Micro Focus jobs using CA Workload Automation AE 
and CA WA Agent for Micro Focus. The agent provides an interface to the Micro Focus 
Net Express JCL engine. 
Notes: 
■ To run a Micro Focus job, your system requires CA WA Agent for Windows and CA 
WA Agent for Micro Focus. 
■ You must install the CA WA Agent for Windows and CA WA Agent for Micro Focus 
on the same computer where the Micro Focus Enterprise server is installed. 
■ You must set the oscomponent.cmdprefix.force parameter in the agentparam.txt 
file, as follows: 
oscomponent.cmdprefix.force=false Define a Micro Focus Job 
330 User Guide 
Define a Micro Focus Job 
You can define a Micro Focus (MICROFOCUS) job to run your mainframe JCL and COBOL 
programs in a Windows environment. 
Notes: 
■ To run a Micro Focus job, your system requires CA WA Agent for Windows and CA 
WA Agent for Micro Focus. 
■ You must install the CA WA Agent for Windows and CA WA Agent for Micro Focus 
on the same computer where the Micro Focus Enterprise server is installed. 
■ You must set the oscomponent.cmdprefix.force parameter in the agentparam.txt 
file, as follows: 
oscomponent.cmdprefix.force=false 
Follow these steps: 
1. Insert a job and specify the following attributes in the definition: 
job_type: MICROFOCUS 
Specifies that the job type is Micro Focus. 
machine 
Specifies the name of the machine on which the job runs. 
mf_jcl_name 
Specifies the path to and name of a JCL file to run. 
mf_server 
Specifies the server name or the IP address and port of the Micro Focus 
Enterprise Server. 
 Define a Micro Focus Job 
Chapter 13: Micro Focus Jobs 331 
2. (Optional) Specify optional Micro Focus attributes: 
■ envvars 
■ fail_codes 
■ job_class 
■ job_terminator 
■ max_exit_success 
■ mf_user 
■ mf_version 
■ os_user 
■ success_codes 
3. (Optional) Specify common attributes that apply to all jobs. 
The Micro Focus job is defined. 
Notes: 
■ Attributes that have a default value automatically apply to the job definitions; 
therefore, they are optional. For example, jobs with no specified job type are 
defined as command jobs by default. Other optional attributes specify information 
that is not required but affects how or when a job runs, such as attributes that 
specify scheduling conditions. 
■ Some optional attributes are common to all job types but others apply to certain 
jobs types only. Optional attributes that apply to all job types are known as 
common optional attributes. For more information about common optional 
attributes and the values that you can specify for them (including their default 
values when applicable), see the Reference Guide. 
■ For information about required attributes and job type specific optional attributes, 
see the procedure topics that provide instructions for defining jobs. 
■ This guide provides instructions for defining jobs interactively. You also create job 
definitions in script files and then import them using the jil command or use CA 
WCC to define them. For more information about the JIL command and JIL syntax, 
see the Reference Guide. For more information about using CA WCC to define the 
job, see the CA Workload Control Center Workload Scheduling Guide. 
 Attributes with Default Values 
332 User Guide 
Example: Pass the JCL by Content 
This example passes the contents of the JCL file to the Micro Focus Enterprise Server 
with IP address 172.31.255.255 and port 2222. The contents of the if.jcl file is read and 
passed to the server. 
insert_job: mf_job_by_content 
job_type: MICROFOCUS 
machine: mfagent 
mf_server_address_type: ADDRESS 
mf_server: "tcp:172.31.255.255:2222" 
mf_jcl_type: CONTENT 
mf_jcl_name: "C:\Program Files\micro focus\es-jcldemo\if.jcl" 
Example: Pass the JCL by Reference 
This example passes the name of the JCL file to the Micro Focus Enterprise Server. The 
server reads and submits the named file. The job runs under the Micro Focus user ID 
named MFUSER01. 
insert_job: mf_job_by_reference 
job_type: MICROFOCUS 
machine: mfagent 
mf_server_address_type: NAME 
mf_server: mfprod 
mf_jcl_type: REFERENCE 
mf_jcl_name: "C:\Program Files\micro focus\es-jcldemo\if.jcl" 
mf_user: MFUSER01@mfprod 
Attributes with Default Values 
Attributes that have a default value automatically apply to the job definition. Therefore, 
you do not have to specify those attributes in the definition. Your agent administrator 
can define some default values on the agent in the agentparm.txt file. 
If you specify the attribute in a job definition, it overrides the default. 
The following Micro Focus job attributes have default values: 
fail_codes 
Defines which exit codes indicate job failure. 
Default: Any exit code other than 0 (The job interprets any code other than zero as 
failure.) 
 Attributes with Default Values 
Chapter 13: Micro Focus Jobs 333 
job_terminator 
Specifies whether to terminate the job if its containing box fails or terminates. 
Default: n (The job does not terminate if its containing box fails or terminates.) 
max_exit_success 
Defines the maximum exit code that the job can exit with and be considered a 
success. 
Default: 0 (The job interprets only zero as job success.) 
mf_jcl_type 
Specifies whether to pass the JCL by content or by reference to the Micro Focus 
Enterprise Server. 
Default: CONTENT (The job passes the contents of the JCL file physically to the 
server.) 
mf_server_address_type 
Specifies whether the mf_server attribute value is the server name or the IP 
address and port of the Micro Focus Enterprise Server. 
Default: NAME (The job assumes that the name of the Micro Focus Enterprise 
Server is specified.) 
mf_version 
Specifies the environment on the mainframe that manages the job you want to run. 
Default: JES2 (The job assumes that the environment is JES2.) 
success_codes 
Defines which exit codes indicate job success. 
Default: 0 (The job interprets zero as success.) 
Note: For more information about JIL job types and other job definition attributes, the 
values that you can specify for those attributes, and JIL syntax, see the Reference Guide. 
Example: Specify the JES3 Environment 
This example runs the JCL file in the JES3 environment. The mf_version attribute 
overrides JES2, the default environment. 
insert_job: mf_job_with_version_jes3 
job_type: MICROFOCUS 
machine: mfagent 
mf_server_address_type: NAME 
mf_server: mfprod 
mf_jcl_type: REFERENCE 
mf_jcl_name: "C:\Program Files\micro focus\es-jcldemo\if.jcl" 
mf_version: JES3 Pass Variables as Parameters to a JCL File 
334 User Guide 
Pass Variables as Parameters to a JCL File 
You can pass variables as parameters to a JCL file. 
Follow these steps: 
1. Define a Micro Focus job (see page 330). 
2. Add the following attribute to the job definition: 
envvars: parm_name=parm_value[, parm_name=parm_value...] 
parm_name 
Defines the name of a new environment variable or specifies the name of an 
existing environment variable. 
parm_value 
Specifies the value of the environment variable. 
3. (Optional) Add an envvars attribute for each additional variable that you want to 
pass. 
4. Run the job. 
The specified variables are passed as parameters to the Micro Focus program. 
Note: For more information about JIL job types and other job definition attributes, the 
values that you can specify for those attributes, and JIL syntax, see the Reference Guide. 
Example: Pass SORT and MAX as Parameters to the JCL file 
Suppose that you want to pass SORT for symbolic variable VAR1 and MAX for symbolic 
variable VAR2 in the following JCL file named mfprog.jcl: 
//MFIDSAL1 JOB 'DAVINDER',CLASS=A,MSGCLASS=A,NOTIFY=MFIDSA 
//*--------------------------------------------------------------- 
//* 
//*--------------------------------------------------------------- 
//STEP1 EXEC PGM=%VAR1,PARM='%VAR2' 
//STEPLIB DD DSN=CEE.SCEERUN,DISP=SHR 
// DD DSN=MFIDSA.DSA.LOAD,DISP=SHR 
//SYSPRINT DD SYSOUT=* 00510000 
//CEEDUMP DD SYSOUT=* 00520000 
//SYSUDUMP DD SYSOUT=* 00530000 
//OLDLIB DD DISP=(OLD),DSN=MFE.PROCLIB.L01 Pass Variables as Parameters to a JCL File 
Chapter 13: Micro Focus Jobs 335 
The parameter values are specified in the job definition using the envvars attribute as 
follows: 
insert_job: mf_job_with_envars 
job_type: MICROFOCUS 
machine: mfagent 
mf_server_address_type: NAME 
mf_server: mfprod 
mf_jcl_type: CONTENT 
mf_jcl_name: "C:\Program Files\microfocus\es-jcldemo\mfprog.jcl" 
mf_user: MFUSER01@mfprod 
envvars: VAR1=SORT 
envvars: VAR2=MAX 
The following JCL is submitted to the Micro Focus Enterprise Server when the job runs: 
//MFIDSAL1 JOB 'DAVINDER',CLASS=A,MSGCLASS=A,NOTIFY=MFIDSA 
//*--------------------------------------------------------------- 
//* 
//*--------------------------------------------------------------- 
//STEP1 EXEC PGM=SORT,PARM='MAX' 
//STEPLIB DD DSN=CEE.SCEERUN,DISP=SHR 
// DD DSN=MFIDSA.DSA.LOAD,DISP=SHR 
//SYSPRINT DD SYSOUT=* 00510000 
//CEEDUMP DD SYSOUT=* 00520000 
//SYSUDUMP DD SYSOUT=* 00530000 
//OLDLIB DD DISP=(OLD),DSN=MFE.PROCLIB.L01 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.