z/OS Job Statement / Job Card creation in Jobs

Document ID : KB000088338
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Detailed Description and Symptoms

General

The job statement is generated by Automic automatically in case of type 'Automic' or 'OS/390 JCL' is selected in the OS/390 tab of the job object. There is no way to avoid the creation.
The parameters for the job statement are taken from the 'Runtime options' in the OS/390 tab of the job object. If mandatory fields – like 'Job name' – are empty, Automic will use default values.

 

 0EMb0000001Qqjy.png

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 Automic.

 0EMb0000001Qqk3.png

The JCL is generated by Automic in the following order:

· JOB statement generated out of the OS/390 tab

· JCL from the Pre-Process tab

·  Automic job messenger step; start step – JCL from include 'HEADER.MVS'

· JCL from the Process tab

·  Automic job messenger step; end step – JCL from include 'TRAILER.MVS'

 

In this example the JCL will look like:

//JAADUODY JOB USER=UC4SCJ,PASSWORD=

//JMLDS    EXEC PGM=UCXJM25M,COND=EVEN,

// PARM='TRAP(OFF)/JNR=1732014 MNR=1977 PNR=2078 IPA=10.8.8.72

//             TYP=S DBG=0 RET=&RETCODE 2>&1'

//STEPLIB  DD  DISP=SHR,DSN=UC4SCJ.UC4600A.UCXJM25.LOAD

//SYSTCPD DD DISP=SHR,DSN=SNET.TCPIPLST(DATA)

//SYSPRINT DD SYSOUT=*

//    SET RETCODE='HIGHEST'

//* <-------- END_HEADER -------->

//TECMTDUM JOB ,CLASS=A,MSGCLASS=V,TIME=15

//STEP01   EXEC PGM=IEFBR14

//* <------- BEGIN_TRAILER ------>

//JMLDE    EXEC PGM=UCXJM25M,COND=EVEN,

// PARM='JNR=1732014 MNR=1977 PNR=2078 IPA=10.8.8.72

//             TYP=E STP=1 RET=&RETCODE 2>&1'

//STEPLIB  DD  DISP=SHR,DSN=UC4SCJ.UC4600A.UCXJM25.LOAD

//SYSTCPD DD DISP=SHR,DSN=SNET.TCPIPLST(DATA)

//SYSPRINT DD SYSOUT=*

//*

 

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 "JAADUODY" and a second one "TECMTDUM".

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.

Automic 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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Resolution:
Best practice – z/OS job design in Automic

It is recommended to design the z/OS job in the following way:

· Use the OS/390 tab 'Runtime options' 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

· Automic will add the header and trailer steps at the correct position in this case

 Here an example how a job can look like in Automic:

0EMb0000001Qqk8.png

0EMb0000001QqkD.png

0EMb0000001QqkI.png

 

 
The JCL of the example job will look like:

//TECMTDUM JOB CLASS=A,MSGCLASS=V,USER=UC4SCJ,PASSWORD=,TIME=15

/*JOBPARM S=S901

//JMLDS    EXEC PGM=UCXJM25M,COND=EVEN,

// PARM='TRAP(OFF)/JNR=1732019 MNR=1977 PNR=2088 IPA=10.8.8.72

//             TYP=S DBG=0 RET=&RETCODE 2>&1'

//STEPLIB  DD  DISP=SHR,DSN=UC4SCJ.UC4800A.UCXJM25.LOAD

//SYSTCPD DD DISP=SHR,DSN=SNET.TCPIPLST(DATA)

//SYSPRINT DD SYSOUT=*

//    SET RETCODE='HIGHEST'

//* <-------- END_HEADER -------->

//STEP01   EXEC PGM=IEFBR14

//* <------- BEGIN_TRAILER ------>

//JMLDE    EXEC PGM=UCXJM25M,COND=EVEN,

// PARM='JNR=1732019 MNR=1977 PNR=2088 IPA=10.8.8.72

//             TYP=E STP=1 RET=&RETCODE 2>&1'

//STEPLIB  DD  DISP=SHR,DSN=UC4SCJ.UC4800A.UCXJM25.LOAD

//SYSTCPD DD DISP=SHR,DSN=SNET.TCPIPLST(DATA)

//SYSPRINT DD SYSOUT=*

//*