Difference between revisions of "Information Systems:Overnight ENDOFWEEK"

From uniWIKI
Jump to navigation Jump to search
Line 3: Line 3:
 
- Run run the same programs as the [[Overnight ENDOFDAY|End of Day]].
 
- Run run the same programs as the [[Overnight ENDOFDAY|End of Day]].
   
  +
* [[EODWEEKLY]]
- Run weekly updates and reports.
 
  +
  +
This is called by the scheduler (job name ENDOFWEEK) every Sunday, at 1:00AM. It puts the computer into an application restricted state. If it fails, it will be cancelled by the backup; which starts at 3:00AM.
  +
  +
* [[EODUPDW]]
  +
  +
This rebuilds ASW search files, and runs IC calcs (Inventory Control calculations). It is called by EODWEEKLY.
  +
  +
* [[EODRPTW]]
  +
  +
Runs report of inventory onhand, and validate that SROSRO (), SROITR (), WHOLOP (), and WHOLTR () all balance with each other.
  +
   
 
==EODWEEKLY==
 
==EODWEEKLY==

Revision as of 11:30, 9 February 2016

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.

This is called by the scheduler (job name ENDOFWEEK) every Sunday, at 1:00AM. It puts the computer into an application restricted state. If it fails, it will be cancelled by the backup; which starts at 3:00AM.

This rebuilds ASW search files, and runs IC calcs (Inventory Control calculations). It is called by EODWEEKLY.

Runs report of inventory onhand, and validate that SROSRO (), SROITR (), WHOLOP (), and WHOLTR () all balance with each other.


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 MAI and RET.   */
                                                                             
            OVRPRTF    FILE(QPQUPRFIL) OUTQ(PRT01)                           
            RUNQRY     QRY(STOCKST03A)                                       
            DLTOVR     FILE(QPQUPRFIL)

/* Compare summary of WHOLTR to WHOLOP, and summary of SROITR to summary   */
/* of WHOLTR.                                                              */
                                                                             
             CALL       PGM(BALTRANS) PARM('UP1480BFVA')