CICS START (INTERVAL) starts an interval timer that will trigger at specified intervals. It enables programs to start timers, manage timer operations, and handle interval timer starting in CICS applications.
CICS START (INTERVAL) is a command that allows programs to start an interval timer that will trigger at specified intervals. It provides timer starting capabilities, interval management, and timer control for CICS applications.
12345678910EXEC CICS START INTERVAL(interval-name) [TIME(duration)] [AFTER(duration)] [AT(time-value)] [TRANSID(transaction-id)] [FROM(data-area)] [LENGTH(data-length)] [RESP(response-code)] END-EXEC
123456789101112131415161718192021222324252627WORKING-STORAGE SECTION. 01 INTERVAL-NAME PIC X(8) VALUE 'MYTIMER'. 01 INTERVAL-DURATION PIC S9(8) COMP VALUE 6000. *> 60 seconds 01 TRANSACTION-ID PIC X(4) VALUE 'T001'. 01 PASSED-DATA PIC X(50) VALUE 'Hello from interval timer'. 01 DATA-LENGTH PIC S9(8) COMP VALUE 50. 01 RESPONSE-CODE PIC S9(8) COMP. PROCEDURE DIVISION. *> Start an interval timer EXEC CICS START INTERVAL(INTERVAL-NAME) TIME(INTERVAL-DURATION) TRANSID(TRANSACTION-ID) FROM(PASSED-DATA) LENGTH(DATA-LENGTH) RESP(RESPONSE-CODE) END-EXEC. IF RESPONSE-CODE = DFHRESP(NORMAL) DISPLAY 'Interval timer started successfully' DISPLAY 'Timer name: ' INTERVAL-NAME DISPLAY 'Duration: ' INTERVAL-DURATION ' hundredths of seconds' DISPLAY 'Transaction: ' TRANSACTION-ID ELSE DISPLAY 'Error starting interval timer: ' RESPONSE-CODE END-IF.
Think of CICS START (INTERVAL) like setting a repeating alarm:
Create a program that starts an interval timer to run every 30 seconds.
Write a program that starts a delayed interval timer.
Implement error handling for the START (INTERVAL) command.