Information Systems:Overnight ENDOFWEEK
Jump to navigation
Jump to search
The scheduler starts this job at 1:00AM on Sundays. It calls EODWEEKLY, which will -
- Run run the same programs as the End of Day.
- Run weekly updates and reports.
EODWEEKLY
/* send email that weekly overnight process is starting */
CHGVAR VAR(&SMSG) VALUE('EOW starting (2:30 3:00 +
5:00 6:30)')
CHGVAR VAR(&LMSG) VALUE(&SMSG)
CALL PGM(OPMSGSEND) PARM(&SMSG &LMSG)
/* End all processes that use either ASW or extension files. This is */
/* so that the temporary backup can save all files, and because some of */
/* the ASW jobs cannot run if any other jobs are using their files. */
CALL PGM(EODEND2)
/* run End of Day processing */
CALL PGM(EOD)
/* run weekly jobs */
CALL PGM(EODUPDW)
CALL PGM(EODRPTW)
/* send email that weekly overnight process ended normally */
CHGVAR VAR(&SMSG) VALUE('Weekly overnite processing +
ended Normally')
CHGVAR VAR(&LMSG) VALUE('This message means there +
were no errors that halted processing. If +
this message is not sent, it means the +
full backup cancelled this job.')
CALL PGM(OPMSGSEND) PARM(&SMSG &LMSG)
EODUPDW
/* Calculate IC CALCS period as calendar year and month (not fiscal) */
CHGASWLDA TYPE(*DATDZ) STARTPOS(001)
RTVDTAARA DTAARA(*LDA (1 6)) RTNVAR(&PERIOD)
/* Periodic balance update */
RTVASWPAR PGM(DIR345B) PAID(BALUPDATE) USER(*ALL)
CHGASWLDA TYPE(*PERDZ) STARTPOS(001)
CHGASWLDA TYPE(*PERDZ) STARTPOS(007)
EXCASWPGM PGM(DIR345B) PARM(N)
/* Rebuild item search fields */
RTVASWPAR PGM(DMC981) PAID(ITEMSEARCH) USER(*ALL)
CHGASWLDA TYPE(*PERDZ) STARTPOS(007)
EXCASWPGM PGM(DMC981) PARM(N)
/* Rebuild name search fields */
RTVASWPAR PGM(GDMC981) PAID(NAMESEARCH) USER(*ALL)
CHGASWLDA TYPE(*PERDZ) STARTPOS(007)
EXCASWPGM PGM(GDMC981) PARM(N)
/* Inventory calculations */
RTVASWPAR PGM(INVC401) PAID(ICCALCS) USER(*ALL)
CHGASWLDA VALUE(&PERIOD) TYPE(*CHAR) STARTPOS(226) +
POSITIONS(6)
EXCASWPGM PGM(INVC401) PARM(N)
EODRPTW
/* Print onhand inventory at cost by item account group for both warehouses */
OVRPRTF FILE(QPQUPRFIL) OUTQ(PRT01)
RUNQRY QRY(STOCKST03A)
DLTOVR FILE(QPQUPRFIL)