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

Document ID : KB000025854
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

CA Scheduler JM 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 TESTLIB.

 

Intstructions:

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 CA Scheduler JM started task job. (By default, JCLMASTR DD is where all your CA Scheduler's JCL libraries are defined.) Copy member CAJUTSTB from the CA Scheduler CAIJCL data set into your CAJUTSTB member. Provide a valid JOB statement and change the STEPLIB DD data set name to your CA 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, CA 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.

 

Additional Information:

CA Scheduler Job Management Installation Guide, Step 21: Update System Libraries.
CA Scheduler Job Management Online Guide, 5.2.2.1 Job Definition.

 

As always, please contact CA Technologies support for CA Scheduler if you have further questions.