/* Declarations. */ DCL VAR(&RAND_NBR) TYPE(*DEC) LEN(15 5) DCL VAR(&WAIT) TYPE(*DEC) LEN(5 0) LOOP: /* Reset statistics. */ WRKDSKSTS OUTPUT(*PRINT) RESET(*YES) DLTSPLF FILE(QPWCDSKS) SPLNBR(*LAST) /* Wait for 5 minutes. */ DLYJOB DLY(300) /* Print report. */ WRKDSKSTS OUTPUT(*PRINT) RESET(*NO) /* Get a "random" number between 0-1. */ CALL PGM(#CEERAN0) PARM(&RAND_NBR) /* We want to wait between 0 and 60 minutes before taking + another sample, so mulitple random number by 3600 to get + the wait time. + */ CHGVAR VAR(&WAIT) VALUE(&RAND_NBR * 3600) DLYJOB DLY(&WAIT) /* Do it again. */ GOTO CMDLBL(LOOP)