Next Task Code not Invoked in Timer Task
search cancel

Next Task Code not Invoked in Timer Task

book

Article ID: 91684

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

I have a timer task triggered every 5 mins which invokes a Cobol program. The timer task  starts correctly.
The program then does a DC RETURN NEXT TASK CODE 'TASK2'  but the task is never executed.
 

Environment

Release:
Component: IDMS

Resolution

DC RETURN NEXT TASK CODE doesn't work for a background task because there is no terminal where we would normally display the ENTC prompt.

As an alternative, code another SET TIMER START with a delay of 1 second instead of the DC RETURN NEXT TASK CODE.
For example:
SET TIMER START INTERVAL TIME-1-SECOND TASK CODE 'TASK2' PRIORITY 240.
DC RETURN.

The work field would be defined as:
   03 TIME-1-SECOND PIC S9(8) COMP VALUE 1.