How to test schedules and jobs using the Scheduler Job Management TESTLIB feature?
search cancel

How to test schedules and jobs using the Scheduler Job Management TESTLIB feature?

book

Article ID: 25854

calendar_today

Updated On:

Products

Scheduler Job Management

Issue/Introduction

Scheduler allows the testing of a new schedule or job without executing the actual JCL. This is possible through the use of the TESTLIB feature.

This Knowledge Document provides setup instructions for using the TESTLIB.

 

 

 

 

Resolution

The use of library type "TESTLIB" allows a dummy job to be submitted and executed so that new schedules and jobs can be tested. With this feature, you can verify jobs sequence and condition code checking.

Here are the TESTLIB setup requirements and how to test it:

. Create a member named CAJUTSTB in the JCL library that is allocated to ddname JCLMASTR in the Scheduler started task job. (By default, JCLMASTR DD is where all your Scheduler's JCL libraries are defined.) Copy member CAJUTSTB from the Scheduler CAIJCL data set into your CAJUTSTB member. Provide a valid JOB statement and change the STEPLIB DD data set name to your Scheduler load library. Alter the EXEC statement to the following:

//TESTSTEP EXEC PGM=CAJUTSTB,PARM='T=03'

. To test a job, define job JOBTESTX using LIBRARY TYPE=TESTLIB. Run JOBTESTX which will execute for 3 seconds. The following will appear in the syslog:

IEF403I JOBTESTX STARTED - TIME=12.10.51
+CACU092I CAJUTSTB PGM IS GOING TO WAIT FOR 0003 SECONDS
IEF404I JOBTESTX - ENDED - TIME=12.10.54

Once the job ends, Scheduler will show status as complete.

In addition to the job execution time, the job can be set to end with a specific return code or Abend.

Example: Test Parm . . T=005,F=0008 in the job base record, will run for 5 seconds and return a RC of 08.

This enables you to test for condition code checking. Test Parm . . T=005,A=322, will run for 5 seconds and return a User Abend of 322.

When testing an entire schedule, set the LIBRARY TYPE=TESTLIB in the schedule base record.