1 / 36

Batch Job Process

Batch Job Process. Sabrina. Batch Overview (WI). 1. Schedule: Early morning around 1:30am 2. Frequency: Daily 3. Process: run several steps sequentially and each step perform one small function 4. Function: Post transaction, update tables and generate reports. Step1.

tino
Download Presentation

Batch Job Process

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Batch Job Process Sabrina

  2. Batch Overview (WI) 1. Schedule: Early morning around 1:30am 2. Frequency: Daily 3. Process: run several steps sequentially and each step perform one small function 4. Function: Post transaction, update tables and generate reports

  3. Step1 Creates a report of ‘POS CUSTOMER INFORMATION CHANGE’ Program: WIHF958 Input: WIHF/MAINTLOG WIHF/STATE WIHF/CUSTOMER Output: Report File (Bank no is ‘090’, report no is ‘030’ )

  4. Step1

  5. Step1 Logic: process MAINTLOG records using below matching criteria • MLOG_TIMESTAMP > STATE_LAST_PROCESS • MLOG_FILE_ID = 'CUST' • MLOG_USER_SOURCE = 'P'

  6. Step1 01 WIHFR030-REPORT-RECORD. 02 R030-STATE-ID PIC 999 COMP-3. 02 R030-REPORT-NO PIC 999 COMP-3. 02 R030-SORT-KEY PIC X(25) VALUE SPACES. 02 FILLER REDEFINES R030-SORT-KEY. 03 R030-FIELD1 PIC 999 COMP-3. 03 R030-FIELD2 PIC 999 COMP-3. 03 R030-SORT-KEY-AREA. 05 R030-SORT-CUST-ID PIC 9(09) COMP-3. 05 R030-SORT-DATE-TIME PIC X(16). 02 R030-CUST-ID PIC 9(09). 02 R030-CUST-NAME PIC X(20). 02 R030-CUST-FIELD-ID PIC 9(04). 02 R030-CUST-OLD-DATA PIC X(20). 02 R030-CUST-NEW-DATA PIC X(20). 02 R030-FILLER PIC X(98).

  7. Step1 Questions: 1.Can we display POS ID in the report? Answer: yes, we can get POS ID from field MLOG_TERMINAL_ID in the MAINTLOG table 2.Can customer update their information from POS by themselves? Answer: no, they can request operator to update.

  8. Step2 Build daily transaction file and determine customer transfer Program: WIHF911 Input: WIHF/TXNLOG WIHF/TXNSALE WIHF/CUSTOMER WIHF/TXNXREF Update: WIHF/TRMSTR WIHF/TXNLOG Output : Transaction file Report file (bank no 090, report no 036)

  9. Step2

  10. Step2

  11. Step2 Logic: Process TXNLOG and go to three different process flow based on transaction status 1. TXNL-STATUS-NEW: • Get transaction timestamp from TNXSALE to know what transaction we need to process, then write transaction file 2) Get customer ID from TXNXREF first, then get sale customer information from customer table 3) Check if duplicated customer exist, if found duplicated customer, update TRMSTR accordingly and write transfer report. 4) Update status to ‘P’ in TXNLOG file

  12. Step2 2. ITXNL-STATUS-POSTED: update status to ‘D’ in TXNL file 3. TXNL-STATUS-DELETED, delete from TXNLOG file

  13. Step2 How to check duplicated customer? 1) Based on last name and first name to check customer table 2) If customer id equal sale customer id, try to check if there’s another customer with same last name and first name 3) If get another customer id, check last name, first name, first eight bytes of street address and date of birth

  14. Step2 What needs to be done when duplicated customer found? • If TRMSTR already have this transfer record: sale customer is primary id, another duplicated customer id is secondary id • If TRMSTR has secondary transfer • If TRMSTR has primary transfer • If 1),2),3) have matching records, then write transfer report. Else, will insert TRMSTR table.

  15. Step2 Layout for transaction file: 01 WIHF-TXN-RECORD. 10 TXN-CUST-ID PIC 9(09) USAGE COMP-3. 10 TXN-TRANS-NBR PIC 9(09) USAGE COMP-3. 10 TXN-YEAR PIC 9(05) USAGE COMP-3. 10 TXN-AGENT-ID PIC 9(09) USAGE COMP-3.

  16. Step2

  17. Step2 A report is created for both duplicate and possible duplicate customers *01 WIHFR023-REPORT-RECORD. 05 R023-STATE-ID PIC 999 COMP-3. 05 R023-REPORT-NO PIC 999 COMP-3. 05 R023-SORT-KEY PIC X(25) VALUE SPACES. 05 FILLER REDEFINES R023-SORT-KEY. 07 R023-FIELD1 PIC 999 COMP-3. 07 R023-FIELD2 PIC 999 COMP-3. 07 R023-CUST-ID PIC 9(09) COMP-3. 07 R023-SEQ-NBR PIC 9(07) COMP-3. 07 FILLER PIC X(12). 05 R023-PRIMARY-CUST-INFO PIC X(61). 05 R023-SECONDARY-CUST-INFO PIC X(61).

  18. Step3 Generate a report of permit sold thru admin terminal Program WIHF955 Input : WIHF/TXNSALE WIHF/AGENT WIHF/TXNXREF WIHF/CUSTOMER WIHF/TXNAPPROVAL (get approval code) Output: report

  19. Step3 Report layout

  20. Step3 Report layout

  21. Step3 Logic: driver is TXNSALE table, matching criteria as below WHERE TXNS_TIMESTAMP >= :BEG-TIMESTAMP AND TXNS_TIMESTAMP <= :END-TIMESTAMP AND TXNS_AGENT <> 2713 AND TXNS_SOURCE_IND IN ('A','C') AND (TXNS_STATUS IN ('A','P') OR (TXNS_STATUS IN ('V','R') AND TXNS_NEXT_DAY_REV = 'Y')) AND AGENT_ACH_ACCT_IND <> 'N' Notes: • BEG-TIMESTAMP and END-TIMESTAMP will control we process the transaction for the whole day until we cutoff transaction • As soon as the record is posted, and the transaction is reversed or voided, next day reversal flag will be set to “Y”.

  22. Step4 Generate report of transaction sold by agent Program: WIHF940 Input: transaction file WIHF/TXNSALE WIHF/VRSFEEMASTER WIHF/TXNAPPROVAL Update: WIHF/AGENT WIHF/AGENTACCUM OUTPUT: REPORT (bank no is 090, report no is 006)

  23. Step4 Report layout: 01 WIHFR006-REPORT-RECORD. 02 R006-STATE-ID PIC 999 COMP-3. 02 R006-REPORT-NO PIC 999 COMP-3. 02 R006-SORT-KEY PIC X(25) VALUE SPACES. 02 FILLER REDEFINES R006-SORT-KEY. 03 R006-FIELD1 PIC 999 COMP-3. 03 R006-FIELD2 PIC 999 COMP-3. 03 R006-SORT-KEY-AREA. 05 R006-SORT-REC-IND-A PIC 9(3) COMP-3. 05 R006-SORT-AGENT-NBR PIC 9(9) COMP-3. 05 R006-SORT-REC-IND-B PIC 9(3) COMP-3. 05 R006-SORT-APPR-TYPE PIC 9(3) COMP-3. 05 FILLER PIC X(10). 02 R006-AGENT-NBR PIC 9(09). 02 R006-AGENT-NAME PIC X(40). 02 R006-APPR-TYPE PIC 9(04). 02 R006-APPR-DESC PIC X(40). 02 R006-TOTAL-SOLD PIC 9(07). 02 R006-TOTAL-AMOUNT PIC 9(07)V99.

  24. Step4 Three fields from Agent table: 1) AGENT_ACH_ACCT_IND : C = Checking S = Savings N = None T = Test 2) AGENT_CUR_ONL_TXN 3) AGENT_CUR_OFF_TXN We need to bypass trans with no ACH processing

  25. Step4 Some fields from AGENTACCM table: • AACCM_NBR_APPRS • AACCM_AG_APPR_COST • AACCM_ST_APPR_COST

  26. Step4 Logic: Process every record from transaction file • Only process active, reprinted, superseded transactions • Only process if Agent is ACH agent • Get state cost and agent cost from TXNAPPROVAL table to compute total sale • Update AGENT table and AGENTACCM table

  27. Step5 Create report file for dealers not returned paperwork Program WIHFE108 Input: WIHF/DEALERPLATE (driver) WIHF/REGISTRATION WIHF/REGISTRATIONTYPE WIHF/DEALER WIHF/DEALEROWNERSHIP WIHF/CUSTOMER WIHF/BUSINESS OUTPUT: REPORT

  28. Step5 *01 WIHFR108-REPORT-RECORD. 02 R108-STATE-ID PIC 999 COMP-3. 02 R108-REPORT-NO PIC 999 COMP-3. 02 R108-SORT-KEY PIC X(25) VALUE SPACES. 02 FILLER REDEFINES R108-SORT-KEY. 03 R108-FIELD1 PIC 999 COMP-3. 03 R108-FIELD2 PIC 999 COMP-3. 03 R108-SORT-KEY-AREA. 05 R108-SORT-PLATE-NBR PIC X(10). 05 FILLER PIC X(11). 02 R108-CUSTOMER-ID PIC 9(09) COMP-3. 02 R108-EXP-YEAR PIC 9(04). 02 R108-CONTACT-NAME PIC X(32). 02 R108-DEALER-ID PIC 9(11). 02 R108-PROCESS-DATE PIC 9(09) COMP-3. 02 FILLER PIC X(110).

  29. Step5

  30. Step5

  31. Step5 Logic: Process DEALERPLATE and then do below for each matching record: • Get dealer id: using table DEALERPLATE (REG_ID) and REGISTRATION (REG_ID), validate using dealer table • Get expire date : WIHF/REGISTRATIONTYPE • Get customer id: DEALEROWNERSHIP table, validate customer id using customer table • Get contact name: BUSINESS table based on customer id • Print below report based on value REG-SEQ-NO-TYPE Report 108: ATV DEALER PLATES TO ISSUE ON DATE REPORT (REG-SEQ-NO-TYPE = 12) Report 109: SNOW DEALER PLATES TO ISSUE ON DATE REPORT (REG-SEQ-NO-TYPE = 13)

  32. Step6 Post all TXN sales that haven’t been posted Program: WIHF910 Input : transaction file WIHF/TXNSALE Update: WIHF/SALESTOT WIHF/AGENT WIHF/AGENTACT WIHF/TXNHIST output: report file ALS phone file

  33. Step6 Logic: Get each record from transaction file, then do below checking first: 1. Check transaction posted flag: process ‘not-posted’ transaction from TXNSALE table 2. Check transaction no charge flag: If transaction is ‘no charge’, update post flag as ‘Y’ in TXNSALE table 3. Check transaction status: if transaction is invalidated, update post flag as ‘Y’ in TXNSALE 4. Check Agent ACH account indicator: If agent is no ACH, update post flag as ‘Y’ in TXNSALE 5. Check Agent reprint indicator: if transaction is agent reprint, update post flag as ‘Y’ in TXNSALE 6. Check reversed transaction If transaction is reversed and transaction status is reversed or voided, insert it to WIHF/VOIDTXN 7. Check transaction status: process active, reprinted, voided transaction and bypass other transactions

  34. Step6 After validation, we will proceed posting: • Accumulate TXNS-AGENT-COST and TXNS-STATE-COST: If agent has sales ,do below update: 1) insert records to TXNHIST table 2) insert records to agent activity table AGENTACT 2. Add void sales to

  35. Step6

More Related