The Delay Job (DLYJOB) command works well when I want a job to run overnight while I'm not in the office, but presents a problem when I want to submit jobs on Friday to run on Saturday or Sunday. DLYJOB will handle this if I specify an interval to wait instead of a time to resume, but who wants to figure out how many seconds until 3 o'clock, Sunday morning? For this reason, I developed the DLYDATTIM command and program (Figures 8 and 9, on page 72) which, like DLYJOB, accept a resume time parameter, but unlike DLYJOB also accept a resume date parameter. Now we can submit all weekend overnight processing on Friday afternoon, and everything executes when it should.
TechTalk: Improving on DLYJOB
Figure 8 Command DLYDATTIM
DLYDATTIM: CMD PROMPT('Delay Until Date/Time') PARM KWD(DATE) TYPE(*DATE) MIN(1) PROMPT('Date') PARM KWD(TIME) TYPE(*TIME) MIN(1) PROMPT('Time')
TechTalk: Improving on DLYJOB
Figure 9 CL program DAT002CL
DAT002CL: + PGM PARM(&DATEIN &TIME) DCL VAR(&DATE) TYPE(*CHAR) LEN(6) DCL VAR(&DATEIN) TYPE(*CHAR) LEN(7) DCL VAR(&QDATE) TYPE(*CHAR) LEN(6) DCL VAR(&QDATEIN) TYPE(*CHAR) LEN(6) DCL VAR(&QTIME) TYPE(*CHAR) LEN(6) DCL VAR(&TIME) TYPE(*CHAR) LEN(6) CHGVAR VAR(&DATE) VALUE(%SST(&DATEIN 2 6)) RETRY: + RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATEIN) CVTDAT DATE(&QDATEIN) TOVAR(&QDATE) TOFMT(*YMD) TOSEP(*NONE) /* If requested date has already passed, quit */ IF COND(&QDATE *GT &DATE) THEN(RETURN) /* If requested date is same as system date. If not yet + requested time, wait */ IF COND(&QDATE *EQ &DATE) THEN(DO) RTVSYSVAL SYSVAL(QTIME) RTNVAR(&QTIME) IF COND(&QTIME *LT &TIME) THEN(DLYJOB RSMTIME(&TIME)) RETURN ENDDO /* If requested date has not yet arrived, wait until next day */ IF COND(&QDATE *LT &DATE) THEN(DLYJOB RSMTIME(000000)) GOTO CMDLBL(RETRY) ENDPGM
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online