Difference between revisions of "Information Systems:Overnight ENDOFDAY"
| Line 84: | Line 84: | ||
CLRPFM FILE(XXITEMP) |
CLRPFM FILE(XXITEMP) |
||
| − | /* Rebuild statistics files, and update summary files. |
+ | /* Rebuild statistics files, and update summary files. As this can run */ |
| − | /* |
+ | /* while users are on the system, submit job to QBATCH so that it will */ |
| − | /* system is brought back up again. This gets it out of |
+ | /* run after the system is brought back up again. This gets it out of */ |
| − | /* state sooner. |
+ | /* the restricted state sooner. */ |
| − | SBMJOB CMD(CALL PGM(EODREBLD)) JOBQ(QS36EVOKE) |
+ | SBMJOB CMD(CALL PGM(EODREBLD)) JOBQ(QS36EVOKE) |
| + | '''EODBUTEMP''' |
||
| + | |||
| + | /* Hold BRMS maintenance report so it doesn't print. */ |
||
| + | |||
| + | OVRPRTF FILE(QP1AEP) HOLD(*YES) |
||
| + | |||
| + | /* Call BRMS Maintenance to expire tape '999999'. It has a one day */ |
||
| + | /* retention, but still must be expired before it can be used again. */ |
||
| + | /* Note that this temporary backup won't work if it runs before midnight.*/ |
||
| + | |||
| + | STRMNTBRM RMVLOGE(*NONE) RUNCLNUP(*NO) RTVVOLSTAT(*NO) + |
||
| + | CHGJRN(*NO) PRTEXPMED(*NO) PRTVSNRPT(*NO) + |
||
| + | PRTBKUACT(*NO) PRTRCYRPT(*NONE) |
||
| + | |||
| + | /* Delete BRMS maintenance report */ |
||
| + | |||
| + | DLTSPLF FILE(QP1AEP) SPLNBR(*LAST) |
||
| + | |||
| + | /* Run BRMS control group UNITEMP, which will save user data files only. */ |
||
| + | |||
| + | STRBKUBRM CTLGRP(UNITEMP) SBMJOB(*NO) |
||
| + | |||
| + | '''EODUPD''' |
||
| + | |||
| + | /* GENERATE BILLS TO SUPPLIERS FOR COOP AND VEDI */ |
||
| + | /* this has to run first so that generated entries will be included in */ |
||
| + | /* the updates. */ |
||
| + | |||
| + | CXBILL03C |
||
| + | CALL PGM(CXBILL06) |
||
| + | |||
| + | /* CALCULATE CLOSING PERIOD AS YESTERDAY'S PERIOD (TODAY MINUS 1) */ |
||
| + | |||
| + | CHGASWLDA TYPE(*DATDZ) RELVAL(-1) STARTPOS(001) |
||
| + | RTVDTAARA DTAARA(*LDA (1 8)) RTNVAR(&DATEC) |
||
| + | CHGVAR VAR(&DATE) VALUE(&DATEC) |
||
| + | GETPERIOD DATE(&DATE) PERIOD(&PERIOD) |
||
| + | CHGVAR VAR(&PERIODC) VALUE(&PERIOD) |
||
| + | |||
| + | /* PRINT INVOICE JOURNAL */ |
||
| + | |||
| + | RTVASWPAR PGM(DMC352) PAID(INVJOURNAL) USER(*ALL) |
||
| + | CHGASWLDA TYPE(*DATDZ) RELVAL(-1) STARTPOS(082) |
||
| + | CHGASWLDA VALUE(&PERIODC) TYPE(*CHAR) STARTPOS(090) + |
||
| + | |||
| + | POSITIONS(6) |
||
| + | EXCASWPGM PGM(DMC352) PARM(N) |
||
| + | |||
| + | /* RUN NIGHTLY DIS TO FIN */ |
||
| + | |||
| + | RTVASWPAR PGM(GCFC751) PAID(DIS2FIN) USER(*ALL) |
||
| + | CHGASWLDA TYPE(*DATDZ) RELVAL(-1) STARTPOS(082) |
||
| + | CHGASWLDA VALUE(&PERIODC) TYPE(*CHAR) STARTPOS(090) + |
||
| + | POSITIONS(6) |
||
| + | EXCASWPGM PGM(GCFC751) PARM(N) |
||
| + | |||
| + | /* REBUILD TIME AXIS FILE */ |
||
| + | |||
| + | RTVASWPAR PGM(DMC951) PAID(TIMEAXIS) USER(*ALL) |
||
| + | CHGASWLDA VALUE(&PERIODC) TYPE(*CHAR) STARTPOS(007) + |
||
| + | POSITIONS(6) |
||
| + | EXCASWPGM PGM(DMC951) PARM(N) |
||
| + | |||
| + | /* REBUILD A/R CREDIT TIME AXIS */ |
||
| + | |||
| + | RTVASWPAR PGM(GDMC195) PAID(ARAXIS) USER(*ALL) |
||
| + | EXCASWPGM PGM(GDMC195) PARM(N) |
||
| + | |||
| + | /* REBUILD A/R AND A/P TOTALS */ |
||
| + | |||
| + | RTVASWPAR PGM(FSC880) PAID(ARAPREBLD) USER(*ALL) |
||
| + | EXCASWPGM PGM(FSC880) PARM(N) |
||
| + | |||
| + | /* UPDATE ASW ITEM COST WITH EFFECTIVE VEBA FROM CCP */ |
||
| + | |||
| + | CALL PGM(IXRUP880) |
||
| + | |||
| + | /* CLEAR PURCHASE SUGGESTIONS FROM YESTERDAY */ |
||
| + | /* NOTE - PERIODIC SUGGESTED ORDERS ARE FLAGGED TO NOT CLEAR */ |
||
| + | |||
| + | RTVASWPAR PGM(DIC801) PAID(CLRSUGPO) USER(*ALL) |
||
| + | CHGASWLDA TYPE(*DATDZ) STARTPOS(1) |
||
| + | EXCASWPGM PGM(DIC801) PARM(N) |
||
| + | |||
| + | RTVASWPAR PGM(INVC431) PAID(PURSUG2MAI) USER(*ALL) |
||
| + | EXCASWPGM PGM(INVC431) PARM(N) |
||
| + | |||
| + | RTVASWPAR PGM(INVC431) PAID(PURSUG3MAI) USER(*ALL) |
||
| + | EXCASWPGM PGM(INVC431) PARM(N) |
||
| + | |||
| + | /* keep copy of purchase suggestions as there are sometimes questions */ |
||
| + | /* about whether something was generated here, or manually */ |
||
| + | |||
| + | CPYF FROMFILE(UP1480BFVA/SROPUH) + |
||
| + | TOFILE(UP1480BFVA/SROPUH.B1) MBROPT(*REPLACE) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | CPYF FROMFILE(UP1480BFVA/SROPUL) + |
||
| + | TOFILE(UP1480BFVA/SROPUL.B1) MBROPT(*REPLACE) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* CALCULATE ITEMS THAT WILL HAVE A 5% INCREASE IN COST OR 5% DECREASE */ |
||
| + | /* IN GROSS MARGIN % and email buyer (This must be done before Domino */ |
||
| + | /* is taken down) */ |
||
| + | |||
| + | CALL PGM(IXRIQ405) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* SEND ANY 'READY' PROMOS TO ECU */ |
||
| + | |||
| + | ECUPROMO |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* ADJUST DEMAND BY ITEMS ON PROMO */ |
||
| + | |||
| + | PXDEMAND |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* USE AVERAGE PURCHASE COST FOR MAIN WAREHOUSE IN SROSRO TO UPDATE */ |
||
| + | /* PURCHASE COST FOR RET WAREHOUSE IN SROSRO AND AVERAGE PURCHASE */ |
||
| + | /* COST IN BASE MASTER FILE SROPRG */ |
||
| + | /* do not share open data path, as SRBPRG may not be open for update */ |
||
| + | |||
| + | OVRDBF FILE(SRBPRG) TOFILE(SRBPRG) SHARE(*NO) |
||
| + | CALL PGM(AVGCST01) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* RUN MISCELLANEOUS BILLING */ |
||
| + | |||
| + | CALL PGM(CXBILL) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* FTP SALES ORDERS WITH NO INVOICED LINES */ |
||
| + | |||
| + | CALL PGM(INVCUP300) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* REBUILD PROMO RESULTS FILES */ |
||
| + | |||
| + | CALL PGM(PXRESBUILD) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* FOR VEDI AND COOP BILLING, SETTLE INVOICES TO TRANSFERS */ |
||
| + | |||
| + | CALL PGM(CXBILL07) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* CANCEL ANY HELD POS ORDERS THAT ARE FOUR DAYS OLD OR OVER */ |
||
| + | |||
| + | CALL PGM(IOPMIN04) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* DELETE ITEMS NOTES THAT HAVE EXPIRED */ |
||
| + | |||
| + | CALL PGM(DMRUP101) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
| + | /* TRY TO REORGANIZE CARRIER INTERFACE FILE */ |
||
| + | |||
| + | RGZPFM FILE(ATLASPF) |
||
| + | MONMSG MSGID(CPF0000) |
||
| + | |||
- Sends the second email message - 'Daily overnite processing ended normally' - at about 2:15AM. |
- Sends the second email message - 'Daily overnite processing ended normally' - at about 2:15AM. |
||
Revision as of 12:14, 4 January 2016
The scheduler starts this job at 1:00AM; every morning except Sunday - when the End of Week is called. This job will -
- End all programs that use ASW or extension files, and end subsystems so users cannot sign on.
- Do a 'temporary' backup of data libraries only. This uses tape '999999', which has a retention period of one day so that it can be over written every night. It can be used if something happens during the overnight processing, to quickly restore a file the next day if needed (without having to call the tape from off site storage), and to rebuild the test environment.
- Run updates, reports, and housekeeping (clear work files and out queues, and delete unnecessary spool files).
The program is EODDAILY in library UNIPHARMIT.
- Sends the first email message - 'EOD starting (2:15 3:00 5:00 6:30)'.
- Calls EODEND2, which will end all processes that can use either ASW or extension files. This does not end Domino, so that I.T. staff will receive the emails being sent.
/* End EDI monitors for SPS Commerce and EDI Gateway */
EDIENDMON
EDIENDEDIG
/* End subsystems that run user jobs */
ENDSBS SBS(QINTER) OPTION(*IMMED)
ENDSBS SBS(QBATCH) OPTION(*IMMED)
ENDSBS SBS(DCRF) OPTION(*IMMED)
ENDSBS SBS(UP1480BS) OPTION(*IMMED)
ENDSBS SBS(TLABARCODE) OPTION(*IMMED)
ENDSBS SBS(BC400SERVR) OPTION(*IMMED)
ENDSBS SBS(MONITOR2) OPTION(*IMMED)
/* End IMS, IMP, IOP, OMS, and EMA */
CHGDTAARA DTAARA(IMSWITCH) VALUE('STOP ')
CHGDTAARA DTAARA(IMPSWITCH) VALUE('STOP ')
CHGDTAARA DTAARA(IOPSWITCH) VALUE('STOP ')
CHGDTAARA DTAARA(OMSWITCH) VALUE('STOP ')
CHGDTAARA DTAARA(EMASWITCH) VALUE('STOP ')
ENDIMSJOB
ENDIMPJOB
ENDIOPJOB
ENDOMSJOB
ENDEMAJOBS
ENDIMSSUB OPTION(*IMMED)
ENDIMPSUB OPTION(*IMMED)
ENDIOPSUB OPTION(*IMMED)
ENDOMSSUB OPTION(*IMMED)
ENDEMASUB OPTION(*IMMED)
/* End Web servers, pause for one minute, then end subsystem */
ENDTCPSVR SERVER(*HTTP) HTTPSVR(WEBSMART)
ENDTCPSVR SERVER(*HTTP) HTTPSVR(WEBTEST)
ENDTCPSVR SERVER(*HTTP) HTTPSVR(WEBINTER)
DLYJOB DLY(60)
ENDSBS SBS(QHTTPSVR) DELAY(60)
/* Explicity end Telnet server with a 5 minute delay - otherwise */
/* there could be a problem with the RF guns */
ENDTCPSVR SERVER(*TELNET)
DLYJOB DLY(300)
- Calls EOD
/* Do temporary backup. This is to restore files if update program */
/* bombs. It can be used to do a quick restore if say, a user deletes */
/* something they shouldn't. And it is used to rebuild test libraries. */
CALL PGM(EODBUTEMP)
/* Run End of Day - updates, reports, and housekeeping */
CHGASWCOM COMPANY(VA)
CALL PGM(EODUPD)
CALL PGM(EODRPT)
CALL PGM(EODCLR)
/* Clear consolidated item master file (XXITEMP). This is rebuilt in */
/* EODREBLD, but as it is used by so many jobs, it can be cleared only */
/* in the Application Restricted State. */
RCLRSC
CLRPFM FILE(XXITEMP)
/* Rebuild statistics files, and update summary files. As this can run */
/* while users are on the system, submit job to QBATCH so that it will */
/* run after the system is brought back up again. This gets it out of */
/* the restricted state sooner. */
SBMJOB CMD(CALL PGM(EODREBLD)) JOBQ(QS36EVOKE)
EODBUTEMP
/* Hold BRMS maintenance report so it doesn't print. */
OVRPRTF FILE(QP1AEP) HOLD(*YES)
/* Call BRMS Maintenance to expire tape '999999'. It has a one day */
/* retention, but still must be expired before it can be used again. */
/* Note that this temporary backup won't work if it runs before midnight.*/
STRMNTBRM RMVLOGE(*NONE) RUNCLNUP(*NO) RTVVOLSTAT(*NO) +
CHGJRN(*NO) PRTEXPMED(*NO) PRTVSNRPT(*NO) +
PRTBKUACT(*NO) PRTRCYRPT(*NONE)
/* Delete BRMS maintenance report */
DLTSPLF FILE(QP1AEP) SPLNBR(*LAST)
/* Run BRMS control group UNITEMP, which will save user data files only. */
STRBKUBRM CTLGRP(UNITEMP) SBMJOB(*NO)
EODUPD
/* GENERATE BILLS TO SUPPLIERS FOR COOP AND VEDI */
/* this has to run first so that generated entries will be included in */
/* the updates. */
CXBILL03C
CALL PGM(CXBILL06)
/* CALCULATE CLOSING PERIOD AS YESTERDAY'S PERIOD (TODAY MINUS 1) */
CHGASWLDA TYPE(*DATDZ) RELVAL(-1) STARTPOS(001)
RTVDTAARA DTAARA(*LDA (1 8)) RTNVAR(&DATEC)
CHGVAR VAR(&DATE) VALUE(&DATEC)
GETPERIOD DATE(&DATE) PERIOD(&PERIOD)
CHGVAR VAR(&PERIODC) VALUE(&PERIOD)
/* PRINT INVOICE JOURNAL */
RTVASWPAR PGM(DMC352) PAID(INVJOURNAL) USER(*ALL)
CHGASWLDA TYPE(*DATDZ) RELVAL(-1) STARTPOS(082)
CHGASWLDA VALUE(&PERIODC) TYPE(*CHAR) STARTPOS(090) +
POSITIONS(6)
EXCASWPGM PGM(DMC352) PARM(N)
/* RUN NIGHTLY DIS TO FIN */
RTVASWPAR PGM(GCFC751) PAID(DIS2FIN) USER(*ALL)
CHGASWLDA TYPE(*DATDZ) RELVAL(-1) STARTPOS(082)
CHGASWLDA VALUE(&PERIODC) TYPE(*CHAR) STARTPOS(090) +
POSITIONS(6)
EXCASWPGM PGM(GCFC751) PARM(N)
/* REBUILD TIME AXIS FILE */
RTVASWPAR PGM(DMC951) PAID(TIMEAXIS) USER(*ALL)
CHGASWLDA VALUE(&PERIODC) TYPE(*CHAR) STARTPOS(007) +
POSITIONS(6)
EXCASWPGM PGM(DMC951) PARM(N)
/* REBUILD A/R CREDIT TIME AXIS */
RTVASWPAR PGM(GDMC195) PAID(ARAXIS) USER(*ALL)
EXCASWPGM PGM(GDMC195) PARM(N)
/* REBUILD A/R AND A/P TOTALS */
RTVASWPAR PGM(FSC880) PAID(ARAPREBLD) USER(*ALL)
EXCASWPGM PGM(FSC880) PARM(N)
/* UPDATE ASW ITEM COST WITH EFFECTIVE VEBA FROM CCP */
CALL PGM(IXRUP880)
/* CLEAR PURCHASE SUGGESTIONS FROM YESTERDAY */
/* NOTE - PERIODIC SUGGESTED ORDERS ARE FLAGGED TO NOT CLEAR */
RTVASWPAR PGM(DIC801) PAID(CLRSUGPO) USER(*ALL)
CHGASWLDA TYPE(*DATDZ) STARTPOS(1)
EXCASWPGM PGM(DIC801) PARM(N)
RTVASWPAR PGM(INVC431) PAID(PURSUG2MAI) USER(*ALL)
EXCASWPGM PGM(INVC431) PARM(N)
RTVASWPAR PGM(INVC431) PAID(PURSUG3MAI) USER(*ALL)
EXCASWPGM PGM(INVC431) PARM(N)
/* keep copy of purchase suggestions as there are sometimes questions */
/* about whether something was generated here, or manually */
CPYF FROMFILE(UP1480BFVA/SROPUH) +
TOFILE(UP1480BFVA/SROPUH.B1) MBROPT(*REPLACE)
MONMSG MSGID(CPF0000)
CPYF FROMFILE(UP1480BFVA/SROPUL) +
TOFILE(UP1480BFVA/SROPUL.B1) MBROPT(*REPLACE)
MONMSG MSGID(CPF0000)
/* CALCULATE ITEMS THAT WILL HAVE A 5% INCREASE IN COST OR 5% DECREASE */
/* IN GROSS MARGIN % and email buyer (This must be done before Domino */
/* is taken down) */
CALL PGM(IXRIQ405)
MONMSG MSGID(CPF0000)
/* SEND ANY 'READY' PROMOS TO ECU */
ECUPROMO
MONMSG MSGID(CPF0000)
/* ADJUST DEMAND BY ITEMS ON PROMO */
PXDEMAND
MONMSG MSGID(CPF0000)
/* USE AVERAGE PURCHASE COST FOR MAIN WAREHOUSE IN SROSRO TO UPDATE */
/* PURCHASE COST FOR RET WAREHOUSE IN SROSRO AND AVERAGE PURCHASE */
/* COST IN BASE MASTER FILE SROPRG */
/* do not share open data path, as SRBPRG may not be open for update */
OVRDBF FILE(SRBPRG) TOFILE(SRBPRG) SHARE(*NO)
CALL PGM(AVGCST01)
MONMSG MSGID(CPF0000)
/* RUN MISCELLANEOUS BILLING */
CALL PGM(CXBILL)
MONMSG MSGID(CPF0000)
/* FTP SALES ORDERS WITH NO INVOICED LINES */
CALL PGM(INVCUP300)
MONMSG MSGID(CPF0000)
/* REBUILD PROMO RESULTS FILES */
CALL PGM(PXRESBUILD)
MONMSG MSGID(CPF0000)
/* FOR VEDI AND COOP BILLING, SETTLE INVOICES TO TRANSFERS */
CALL PGM(CXBILL07)
MONMSG MSGID(CPF0000)
/* CANCEL ANY HELD POS ORDERS THAT ARE FOUR DAYS OLD OR OVER */
CALL PGM(IOPMIN04)
MONMSG MSGID(CPF0000)
/* DELETE ITEMS NOTES THAT HAVE EXPIRED */
CALL PGM(DMRUP101)
MONMSG MSGID(CPF0000)
/* TRY TO REORGANIZE CARRIER INTERFACE FILE */
RGZPFM FILE(ATLASPF)
MONMSG MSGID(CPF0000)
- Sends the second email message - 'Daily overnite processing ended normally' - at about 2:15AM.
- Resets the submit time for this job on the scheduler to 1:00AM. This is in case a warehouse supervisor has delayed it.