Information Systems:EODREBLD
Jump to navigation
Jump to search
This rebuilds/updates master and statistic files used by Web Orders and InfoNet. These are built as part of the overnight processing instead of when a user requests the information. This also clears work files and spool files. It is submitted to QBATCH by EOD, to run after the restricted state has ended; about 5:00AM.
/* clear files and folders for Web Orders */
/* there are some Unix commands run in Qshell that sometimes fail, so */
/* submit it to batch and wait for it to complete. If it doesn't, it */
/* won't affect the end of day - but the image and specification in Web */
/* Orders may not be correct. */
SBMJOB CMD(CALL PGM(WSOVERNIT1)) JOBQ(QS36EVOKE)
DLYJOB DLY(420)
/* Build consolidated item master file (XXITEMP). This must run before */
/* Web Order files are rebuilt. */
CALL PGM(ITEMINFOCA)
/* rebuild files for Web Orders */
CALL PGM(WSOVERNIT2)
/* Run End of Day housekeeping. */
CALL PGM(EODCLR)
/* Build summary file of lost sales */
/* (ITEMSTAT uses this file, so this has to run first) */
CLRPFM FILE(SUMVENLST)
CALL PGM(BLDSUMLST)
/* Rebuild item statistics file (XXSTATSP) */
CLRPFM FILE(XXSTATSP)
CALL PGM(ITEMSTAT)
/* Rebuild promo results files (for InfoNet) */
CALL PGM(PXRESBUILD)
/* Build summary file of sales (including brand) by customer */
/* (for IN_CUSTSLS) */
CALL PGM(BLDCSTSL2) PARM(' ')
/* Build summary file of freight vs sales (current and previous month) */
CALL PGM(BLDSUMFRT) PARM(' ')
CALL PGM(BLDSUMFRTP)
/* Build summary file to validate Analyser */
CALL PGM(BLDANAWRK)
/* Search for duplicate keys in ANOSTK */
RUNQRY QRY(ANOSTKCNT1) QRYFILE((*LIBL/ANOSTK))
RUNQRY QRY(ANOSTKCNT2) QRYFILE((*LIBL/ANOCOUNT))
/* Build file of sales order pattern - sales by the hour */
CALL PGM(BLDORDLIN) PARM(' ')
/* Build file of sales order statistics by day */
CALL PGM(BLDDAYLINF)
/* Build file of PO fill rates */
CALL PGM(BLDPOFRT) PARM(' ')
/* Build file of sales and budget by item account group */
CALL PGM(BLDSLSBUD) PARM(' ')
/* Build summary file of lost sales by warehouse */
CLRPFM FILE(SUMWHSLST)
CALL PGM(BLDWHSLST)
/* Build file of VEBA by province by day */
CALL PGM(BLDVEBA) PARM(' ')
/* send email that rebuild is complete */
CHGVAR VAR(&SMSG) VALUE('Statistics files rebuild +
is complete')
CHGVAR VAR(&LMSG) VALUE(&SMSG)
CALL PGM(OPMSGSEND) PARM(&SMSG &LMSG)