Knowledge Base > Automation Engine and Target Systems > Micro Focus JES > Jobs in Micro Focus JES

Jobs in Micro Focus JES

The Mainframe Transaction Option (MTO) is a Micro Focus Enterprise Server (MF ES) component. This JES engine facilitates the execution of z/OS jobs (JES jobs) under Windows and Unix.

The Automation Engine can be used to start jobs in Micro Focus JES and process JCL files. These are then stored in the Server's file system. Jobs are started using the program CASSUB.

An AE agent for Windows processes the jobs in MF JES.

Creating a Job

  1. Click the  button in the toolbar. A window opens which lists all the available object types including the objects for the individual platforms. Select JOBS.WIN.

  2. Assign a suitable name for the Job object and open it. Now click the Notification tab

  3. A Windows agent executes the job. Select the agent which runs on the computer on which MF ES is available.

  4. In order to execute the job, the agent requires login information. This data is stored in the form of Login objects. Select the suitable one in "Login".

  5. Now click the Windows tab. In the upper left area, you can define how the generated job report should be handled. You can store it in the databaseA database is an organized collection of data including relevant data structures. or as a file.

  6. Specify type COM.

  7. The command that should be specified indicates the path to program CASSUB. Use the start parameters -r and -j to specify the JCL Server environment and the complete path to the JCL file. The JCL Server Region Name describes the MF MTO Services. This value is available in the MF Enterprise Server Administration.

  8. Store and close the Job object after having completed your configurationA set of constituent components that make up a system. This includes information on how the components are connected including the settings applied.. The Job object can now be integrated in your processing.

Architecture

The job starts via CASSUB in the Micro Focus Enterprise Server. An exit is called when the job starts and during its execution. It writes the synchronization files for the agent (*.log, *.inf and *.can files).

Agent Variables in Micro Focus JES

The following environment variables are available in the user environment under which the JES Server has started:

Environment Variable

Description

UC4_MF_JES_OUTPUT=

Path in which the exit should write the control files for the agent or communicates with the agent (*.log, *.inf, *.can).

Ensure that the variable UC4_MF_JES_OUTPUT contains one single path which is defined with a closing backslash "\". Otherwise, there is no functioning communication between agent and Exit. 

Examples:

Correct: UC_MF_JES_OUTPUT = c:\AUTOMIC\Agent\Microfocus\temp\
Incorrect: UC_MF_JES_OUTPUT = c:\AUTOMIC\Agent\Microfocus\temp
Incorrect: UC_MF_JES_OUTPUT = c:\AUTOMIC\temp\;c:\temp

UC4_MF_TRACE=

Trace which the exit writes in the tracefile with open extend (specified in UC4_MF_TRACE_FILE)

Possible values:
Y  = The exit writes a trace.
N = No trace is written.

UC4_MF_TRACE_FILE=

Complete file name of the trace file

UC4_MF_DELAY=

Delay in seconds the EXIT waits if the *.INF file cannot be found.

Note that the default value is 500 ms.

It is important that the specified value is as low as possible because it affects ALL JES jobs and not only those started with AE. If there are jobs in AE that do not end, the exit was too quick and the agent had no time to create the *.INF file after job start. It cannot be created before because the JobID results from the job start. Automic recommends specifying value 100.

Example for a JES-Exit Trace File

2007.12.14/13:53:58.95->MFJUXIT EC = 01 Jobnum = 01406 Jobname = ????????
2007.12.14/13:53:58.95->MFJUXIT UC4_MF_JES_OUTPUT = C:\AUTOMIC\
2007.12.14/13:53:58.95->MFJUXIT UC4_MF_TRACE_FILE = c:\trc.txt
2007.12.14/13:53:58.95->MFJUXIT UC4_MF_DELAY = 5000
2007.12.14/13:53:58.95->MFJUXIT UC4_MF_DELAY (converted to number) = 000005000
2007.12.14/13:53:59.11->MFJUXIT EC = 25 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.17->MFJUXIT EC = 03 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.20->MFJUXIT EC = 08 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.20->MFJUXIT EC = 09 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.23->MFJUXIT EC = 10 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.23->MFJUXIT EC = 08 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.25->MFJUXIT EC = 09 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.26->MFJUXIT EC = 10 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.26->MFJUXIT EC = 08 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.26->MFJUXIT EC = 09 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.30->MFJUXIT EC = 10 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.31->MFJUXIT EC = 08 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.31->MFJUXIT EC = 09 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.33->MFJUXIT EC = 10 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.34->MFJUXIT EC = 05 Jobnum = 01406 Jobname = JCLTEST
2007.12.14/13:53:59.34->MFJUXIT inf-file not found waiting 000005000 ms
2007.12.14/13:54:05.26->MFJUXIT EC = 02 Jobnum = 01406 Jobname = JCLTEST

 

The Micro Focus Enterprise Server serves administrative purposes; jobs are maintained, started and stopped in JES.

 

The following example describes how to start a JES job in batch mode without the agent; the CASSUB is manually set:

C:\Documents and Settings\Ni\My Documents\Micro Focus\Net Express 5.0\WORKAREA>cassub -lUC4 -jC:\es-jcldemo\jclbatch.jcl
JCLCM0901I JOB01407 ???????? Event-job-ready action is:  0 (Continue). 12:59:10
JCLCM0925I JOB01407 JCLTEST  Event-job-stmt-info action is:  0 (Continue). 12:59
:10
JCLCM0187I JOB01407 JCLTEST  JOB  SUBMITTED (JOBNAME=JCLTEST,JOBNUM=01407) 12:59
:10
JCLCM0180I JOB01407 JCLTEST  Job ready for execution. 12:59:10
Processed "C:\es-jcldemo\jclbatch.jcl"
C:\Documents and Settings\Ni\My Documents\Micro Focus\Net Express 5.0\WORKAREA>

The Exit creates the *.inf file for the agent which checks it and writes to the log file. This does not happen if a job is started in batch mode.