General
The job statement is generated by the Automation Engine automatically in case of type “Automation Engine (AE)” or “OS/390 JCL” is selected in the z/OS (OS/390) tab of the job object. There is no way to bypass the creation.
The parameters for the job statement are taken from the z/OS (OS/390) tab of the job object. If mandatory fields – like “Job Name” – are empty, the AE will use default values.
<Please see attached file for image>
Duplicate job statements and vanished z/OS jobs
When a job statement is entered in the Pre-Process or Process tab the JCL stream will contain 2 JOB statements. The internal reader will split it up into 2 jobs, that means there are 2 jobs running in JES out of 1 job in the Automation Engine.
<Please see attached file for image>

The JCL is generated by the Automation Engine in the following order:
- JOB statement generated out of the OS/390 tab
- JCL from the Pre-Process tab
- Job messenger step; start step – JCL from include “HEADER.MVS”
- JCL from the Process tab
- Job messenger step; end step – JCL from include “TRAILER.MVS”
In this example the JCL will look like:
//JAAJRNEY JOB ,'TSCHO',CLASS=A,MSGCLASS=1,NOTIFY=UC4SCJ,PRTY=0,
// USER=UC4JOE,PASSWORD=,TIME=15
/*JOBPARM S=S901
//SO12 EXEC PGM=UC4START,COND=EVEN
//STEPLIB DD DISP=SHR,DSN=UC4SCJ.UC412.UCXJM25.LOAD
//WO12 EXEC SCJREST,
// TYPE=PR
//UC4IN DD *
OPTION JOURNALKEY(SCJ1)
SELECT JOBNAME=*
ACTION STEPHIRC (4095)
//*=======
/*
//* <-------- END_HEADER -------->
//TESTJOB1 JOB 'TSCHO',CLASS=A,MSGCLASS=V,NOTIFY=UC4SCJ
//STEP#001 EXEC PGM=IEFBR14
//* <------- BEGIN_TRAILER ------>
//EO12 EXEC PGM=UC4END,COND=EVEN,REGION=64M
//STEPLIB DD DISP=SHR,DSN=UC4SCJ.UC412.UCXJM25.LOAD
//*
As there are now 2 JOB statements in the JCL stream the internal reader splits it up into 2 jobs. In the example above it is split into a job with the name “JAAJRNEY” and a second one “TESTJOB1”.
- The first job contains just the generated JOB statement and the job start messenger.
- The second job contains the JCL and the job end messenger.
The Automation Engine cannot determine the correct job start and job end, because the job start and end messenger steps are in different JES jobs now. In Automic the job will get the status “ENDED_VANISHED – disappeared”.
Therefore it is not recommended to enter JOB statements in the Pre-Process or Process tab. Note: There are different reasons why a z/OS job can get an “ENDED_VANISHED – disappeared” status, duplicate job statements is just one of them.
Best practice – z/OS job design
It is recommended to design the z/OS job in the following way:
- Use the z/OS (OS/390) tab parameter fields for the job statement
- Enter all JCL which should be between job statement and first step into the pre-process tab, e.g. output or route statements, joblib, etc.
- Place all JCL – job steps – in the process tab
- The Automation Engine will add the header and trailer steps at the correct position
Here an example how a job can look like:
<Please see attached file for image>

<Please see attached file for image>

<Please see attached file for image>

The JCL of the example job will look like:
//JAAJRNFA JOB ,'TSCHO',CLASS=A,MSGCLASS=1,NOTIFY=UC4SCJ,PRTY=0,
// USER=UC4JOE,PASSWORD=,TIME=15
/*JOBPARM S=S901
//SO12 EXEC PGM=UC4START,COND=EVEN
//STEPLIB DD DISP=SHR,DSN=UC4SCJ.UC412.UCXJM25.LOAD
//WO12 EXEC SCJREST,
// TYPE=PR
//UC4IN DD *
OPTION JOURNALKEY(SCJ1)
SELECT JOBNAME=*
ACTION STEPHIRC (4095)
//*=======
/*
//* <-------- END_HEADER -------->
//STEP#001 EXEC PGM=IEFBR14
//* <------- BEGIN_TRAILER ------>
//EO12 EXEC PGM=UC4END,COND=EVEN,REGION=64M
//STEPLIB DD DISP=SHR,DSN=UC4SCJ.UC412.UCXJM25.LOAD
//*