CBL TRUNC(BIN) IDENTIFICATION DIVISION. PROGRAM-ID. JL0F30. *---------------------------------------------------------------* 000700* AUTHOR : GREG MENZIES * 00070000 000800* DATE : 08/05/1999 * 00080000 * DESCRIPTION : * * * 001100* THIS BATCH TRANSACTION READS A FILE CONTAINING DELIVERY * 00110000 001200* PERIODS FOR PRODUCTS DELIVERED TO STORES WHICH ARE TO BE * 00120000 001300* CALCULATED IN THIS RUN. * 00130000 001400* THE FILE IS IN PARTITION/STORE/PRODUCT/DATE/TIME SEQUENCE. * 00140000 * * 001600* THE INPUT FILE CONTAINS THE FOLLOWING RECORD TYPES :- * 00160000 * * 001800* 01 HEADER * 00180000 001900* FREQUENCY = 1 PER STORE/PRODUCT * 00190000 002000* CONTAINS INFORMATION ABOUT THE STORE/PRODUCT WHICH * 00200000 002100* IS INDEPENDANT OF DATE/TIME SPECIFIC PROCESSING. * 00210000 002200* * 00220000 002300* 02 CONTROLS DETAIL * 00230000 002400* FREQUENCY = MANY PER STORE/PRODUCT * 00240000 002500* CONTAINS DATE/TIME SPECFIC DATA CONCERNING THE * 00250000 002600* CALCULATION CONTROLS APPLICABLE FOR A STORE/PRODUCT. * 00260000 002700* * 00270000 002800* 03 OTHER DETAIL * 00280000 002900* FREQUENCY = MANY PER STORE/PRODUCT * 00290000 003000* CONTAINS SUCH DATE/TIME SPECFIC DATA CONCERNING THE * 00300000 003100* STORE/PRODUCTS AS - * 00310000 003200* FORECAST SALES, PROMOTIONS, TRADING %'S, BOOKSTOCK, * 00320000 003300* CUSTOMER ORDERS. * 00330000 003400* * 00340000 003500* * 00350000 003600* THIS PROGRAM ACTS AS THE CONTROLLING MODULE IN THE PROCESS * 00360000 003700* OF CALCULATING FORECAST ORDER QUANTITIES FOR THE INPUT * 00370000 003800* STORE/PRODUCT/PROCESS PERIODS. * 00380000 003900* * 00390000 004000* HERE, ANY REMAINING DATABASE ACCESS IS PERFORMED BEFORE * 00400000 004100* FORMATTING ALL REQUIRED DATA INTO JLF40LNK AND CALLING THE * 00410000 004200* GENERIC ORDER CALCULATION MODULE JL0F40. * 00420000 004300* * 00430000 *---------------------------------------------------------------* 004320* * 00432000 004330* ------------------ ------------------ * 00433000 004340* º JLF30I01 º------ SORT ---------| JLF30I01 | * 00434000 004350* ºINPUT FROM F20 º º |INPUT FROM F25 | * 00435000 004360* ------------------ º ------------------ * 00436000 004330* ------------------ º ------------------ * 00433000 004340* º JLF30I02 º-------\ º /---------| JLF30I03 | * 00434000 004350* ºINPUT FROM BR º º º º |INPUT FROM BR | * 00435000 004350* ºREPORTING GROUP º º º º |STORES TO EXCLUDE * 00435000 004360* ------------------ º º º ------------------ * 00436000 004370* ------------------ º º º * 00437000 004380* º VXJJ0ALL º-----\ º º º * 00438000 004390* ºALLOCATIONS DB2 º º º º º ----------------- * 00439000 004391* ºTABLE º º º º º /------->º JL0F40LNK º * 00439100 004392* ------------------ º º º º º ºCALCULATION º * 00439200 004393* ------------------ V V V V V ºLINKAGE DATA º * 00439300 004394* º VXJJ0BBP º ------------- ----------------- * 00439400 004395* ºPRODUCT IN STOREº--->º º | * 00439500 004396* ºDB2 TABLE º º º V * 00439600 004397* ------------------ º º ------ * 00439700 004398* ------------------ º º | | * 00439800 004399* º VXJJ0BPR º º º | F40|-- * 00439900 004400* ºBASE PRODUCT º--->º º ------ | * 00440000 004401* º(TPNB) DB2 TABLEº º º | F50|-- * 00440100 004402* ------------------ º º ------ | * 00440200 004403* ------------------ º º | F55| * 00440300 004404* º VXJJ0ALP º--->º º ------ * 00440400 004405* ºALLOCATION º º º ----------------- * 00440500 004406* ºPATTN DB2 TABLEº º º º JLF30O01 º * 00440600 004407* ------------------ º º ºPRODUCT LEVEL º * 00440700 004408* ------------------ º º---->ºFORECAST ORDER º * 00440800 004409* º VXJJ0BDL º--->º JL0F30 º ºQTYS AND OPS º * 00440900 004410* ºDEVELOPMENT º º º ºDATA º * 00441000 004411* ºLINES DB2 TABLE º º º ----------------- * 00441100 004412* ------------------ º º ----------------- * 00441200 004413* ------------------ º º º JLF30O02 º * 00441300 004414* º VXJJ0ROT º--->º º---->ºORDER JOURNAL | * 00441400 004415* ºRETAIL OUTLET º º º ºDIAGNOSTICS º * 00441500 004416* ºDB2 TABLE º º º º º * 00441600 004417* ------------------ º º ----------------- * 00441700 004418* ------------------ º º ----------------- * 00441800 004419* º VXJJ0OLD º--->º º º JLF30O03 º * 00441900 004420* ºORDER DETAILS º º º---->ºPRODUCT PROFILEº * 00442000 004421* ºDB2 TABLE º º º ºDIAGNOSTICS º * 00442100 004422* ------------------ º º º º * 00442200 004423* ------------------ º º ----------------- * 00442300 004424* º VXJJ0BSP º--->º º ----------------- * 00442400 004425* ºBASE PRODUCT IN º º º---->º JLF30O04 º * 00442500 004426* ºBRANCH SALES º ------------- ºFORECAST º * 00442600 004427* ------------------ A | ºALLOCATION DATAº * 00442700 004428* ------------------ º | ----------------- * 00442800 004429* º VXJJ0PAR º--------/ | ----------------- * 00442900 004430* ºPARAMETER RECORDº |\----->º JLF30O05 º * 00443000 004431* ºDB2 TABLE º | º REJECT INPUT º * 00443100 004432* ------------------ | º FROM F25 º * 00443200 004433* | ----------------- * 00443300 004434* | ----------------- * 00443400 004435* \----->º JLF30O05 º * 00443500 004436* º REJECT INPUT º * 00443600 004437* º FROM F20 º * 00443700 004438* ----------------- * 00443800 004439***************************************************************** 00443900 004440*---------------------------------------------------------------* 00444000 004450* AMENDMENT HISTORY * 00445000 004460*---------------------------------------------------------------* 00446000 004470* DATE WHO DESCRIPTION * 00447000 004480* 08/05/1999 GM FIRST RELEASE * 00448000 004490* * 00449000 004500*---------------------------------------------------------------* 00450000 004480* 27/01/2000 GM CHANGES FOR ANTICIPATED WASTE AND WASTAGE * 00448000 004480* ROUNDING PROCESSES AS PART OF V5.1, BUT * 00448000 004480* IMPLEMENTED NOW READY FOR THE MEAT TRIAL * 00448000 004480* BEGINNING IN MARCH. * 00448000 004500*---------------------------------------------------------------* 00450000 014300* 24/05/2000 RP CRV51 CHANGES. * 014400* * 014500* TSD125. WHEN RETRIEVING BSPS USE CODE LIFE OR * 014600* STOCKED PRODUCT END DATE WHICHEVER IS * 014700* THE SOONER. * 014800* * 014900* TSD141. LOOKUP LEGACY SYSTEM USING ORDER GROUP* 015000* AND PASS TO JLF40. * 015100* * 015200* TSD132. PASS PALLET ROUNDING INFO TO JLF40. * 015300* * 015400* TSD122. DOUBLE KNOCK ON SAFETY STOCK. * 015500* * 015600* TSD113. PASS OPEN-FOR-TRADE TO JLF40. * 015700* * 015800* TSD151. PASS CAPACITY TO JLFODIAG * 015900* AND REMOVE PRODUCT CAPPED MESSAGE. * 016000* * 016100* TSD121. USE VARIABLE EXPECTED SHELF LIFE. * 016200* USE MULTIPLE ACTUAL CODE LIFE. * 016300* CALC OF EXPECTED EXPIRY DATE USING PAR* 016310* * 016320* TSD123. CHANGE CALC FOR MAX IN STOCK. * 016330* * 016340* TSD111. AMEND TO EXPECTED OUT OF STOCK * 016800* * 016900* VER5.3. MOVE ALLOC SNGLS TO JLFOD * 016400*---------------------------------------------------------------* 013510* 19/06/2000 GM DEMAND LINE TOP-UP CHANGES * 01351000 013550*---------------------------------------------------------------* 01355000 017020* 10/07/2000 DL CHANGES FOR VOLUME SMOOTHING V4.6 * 01 017020* * 01 017020* READ 'C' PRIORITY CAPACITY % FROM THE PAR * 01 017020* TABLE AND PASS IT TO F40 VIA LINKAGE. * 01 017020* * 01 017020* MAINTAIN COUNTS FOR PRIORITY 3 AND 4 ORDERS. * 01 013550*---------------------------------------------------------------* 01355000 017820* 11/08/2000 RP CORRECT SETTING OF JLF40-EXP-SHELF-LIFE * 01 013550*---------------------------------------------------------------* 01355000 017820* 23/08/2000 GM CORRECT TO INCLUDE PALLET DELIVERIES * 01 017820* (DELY_IND = 'P'). * 01 017820* RE-INSTATE THE CHECKING OF JLF40-ERROR-CODE=1 * 01 017900*---------------------------------------------------------------* 01 017820* 24/08/2000 GM CORRECT TO USE THE APPROPRIATE SUBSCRIPT * 01 017820* WHEN MOVING ORDER DIAGNOSTIC DATA FROM * 01 017820* JLF40-DAY-TABLE TO THE JLFODIAG FILE IN * 01 017820* B-820-CREATE-ORD-DIAG SECTION (I.E. * 01 017820* WX10-DATA-SUB2 NOT WX10-DATA-SUB1). * 01 017820* * 01 017820* CORRECT SETTING OF ALT MERCH UNIT RND % * 01 017900*---------------------------------------------------------------* 01 017820* 07/09/2000 GM DO NOT OUTPUT THE PROMOTIONAL SAFETY STOCK % * 01 017820* IF THE PRODUCT IS NOT ON PROMOTION - THIS IS * 01 017820* CURRENTLY LEADING TO CONFUSION WHEN LOOKING * 01 017820* AT SAFETY STOCK DIAGNOSTICS. * 01 017820* * 01 017820* ADD DIAGNOSTIC DISPLAYS CONCERNING DKSS. * 01 017900*---------------------------------------------------------------* 01 017820* 24/10/2000 RB REMOVE CONDITION OF EOC QTY BEING > ZERO * 01 017820* FOR CREATING AN EOC RECORD FOR SHORT LIFE * 01 017820* PRODUCTS SEE * 01 017820* B-780-CREATE-JLFOEOOC-FILE * 01 017820* SET OLD CURSOR RETRIEVAL TO HAVE AN END DATE * 01 017820* INTO THE FUTURE TO CATCH ALL OUSTANDING * 01 017820* ORDERS SEE * 01 017820* B-550-RETRIEVE-OLD * 01 017900*---------------------------------------------------------------* 01 017820* 25/10/2000 GM CHANGES MADE FOR THE FOLLOWING :- * 01 017820* * 01 017820* * PROMOTIONAL RUN DOWN TO START 14 DAYS FROM * 01 017820* END OF THE PROMOTION INSTEAD OF 7. * 01 017820* * 01 017820* * INTRODUCE PROCESSING FOR NEW CLASSIFICATION * 01 017820* OF PRODUCTS - MEDIUM LIFE. * 01 021400* * 01 021500* * AMEND THE DECISION PROCESS THAT OUTPUTS * 01 021600* THE "TARGET" STOCK FIGURE FOR DISPLAY ON * 01 021600* PRODUCT PROFILE (PPH) TO INCLUDE THE TYPE OF * 01 021600* CALCULATION THAT HAS BEEN USED. * 01 017900*---------------------------------------------------------------* 01 021800* 30/10/2000 RP APPLIED CHANGES TO CORRECT PROCESSING OF * 01 021900* MULTI-CODELIFE PRODS WHERE THE APPORTIONED * 01 022000* QTY > REVISED QTY. * 01 022100*---------------------------------------------------------------* 01 * 10/01/2001 VM CR V6.0 CHANGES(TSD297) - ADD TWO NEW FILE * 01 * JLF30I02 (BRREPGRP) AND JLF30I03 (BRROCAP), * 01 * ESTABLISH IF THE A PRODUCT ON I01 IS HERCULES * * BY CHECKING THE PRODUCT SUBGROUPS AGAINST * * SUBGROUP ON BBREPGRP, AND THE STORE ON BRROCAP* * SETS JLF40-EXCL-SHELF-CAP-IND TO Y OR N * 01 * ACCORDINGLY. *---------------------------------------------------------------* 01 * 23/01/2001 VM CR V6.0 CHANGES(TSD258A) - INCLUDE ANOTHER * 01 * READ ON THE PAR TABLE, KEY=ABSMINSS (*ABSOLUTE* 01 * MINIMUM SAFTEY STOCK). MOVE THIS VALUE TO * * JLF40-ABS-MIN-SFTY-STK-PC IN THE JLF40LNK AREA* * IN READINESS FOR CALL TO JL0F40. * 022100*---------------------------------------------------------------* 01 022400* 12/03/2001 CAW SPLIT INPUT FILER I01 INTO I01/I04 * 02240000 022500* TO IMPROVE PERFORMANCE . REMOVE DISPLAY I17/W20 02250000 022600*---------------------------------------------------------------* 02260000 022610* 03/04/2001 CAW HANDLE DATE RANGE OF ZERO TIME AND REJECT * 02261003 022620* WITH MESSAGE I24. + RC=16 AT END-OF-JOB * 02262003 022630*---------------------------------------------------------------* 02263003 023000* 03/04/2001 CAW V2.0 VERSION SPLIT OLD CURSOR INTO OLD,ORD,OLC* 02300000 023100* COMPONENTS FOR PERFORMANCE ENHANCE. * 02310000 023101* 16/05/2001 ALSO COMMENT OUT ALL HERCULES CODE (NOT REQD) * 02310100 023102*---------------------------------------------------------------* 02310200 023103* 27/03/2001 GM CR VERSION 7 * 02310300 023104* TSD303 - * 02310400 023105* * READ THE NEW CAPACITY CAPPING CONTROL * 02310500 023106* AND PASS TO JL0F40. DO NOT SET THE CAPACITY * 02310600 023107* CAPPING EXCLUSION INDICATOR FOR ANY HERCULES * 02310700 023108* PRODUCTS. * 02310800 023109* * READ MMD TABLE AND PASS DATA TO JL0F40. * 02310900 023110* * PREVENT MM ALLOCATIONS BEING WRITTEN TO * 02311000 023120* THE FORECAST ALLOCATIONS FILE. * 02312000 023130* * 02313000 023140* TSD327 - * 02314000 023150* * READ THE UNIT SIZE FROM THE HEADER ON INPUT * 02315000 023160* FILE JLFOFCST RATHER THAN FROM THE BPR TABLE. * 02316000 023170* * 02317000 023180* TSD337 - * 02318000 023190* * READ NEW CONTROL TOP-UP DEMAND FILL % FROM * 02319000 023200* INPUT AND PASS TO JL0F40 (PREVIOUSLY A PAR * 02320000 023300* TABLE ENTRY "DEMTOPSN" WHICH IS TO BE * 02330000 023301* REMOVED AS PART OF THIS CHANGE) * 02330100 025210*---------------------------------------------------------------* 02521000 023000* 12/07/2001 RC HANDLE BSP TABLE CHANGES * 02300000 023200*---------------------------------------------------------------* 02320000 023000* 30/07/2001 DL CRV80A. * 02300000 023104* TSD357 - * 02310400 023105* * READ THE NEW EXCLUDE ANTICIPATED WASTE TIME * 02310500 023106* PARAMETER FROM THE PAR TABLE AND PASS TO * 02310600 023106* JL0F40. * 02310600 023200*---------------------------------------------------------------* 02320000 023000* 08/08/2001 CAW ADD WITHUR TO OLD SELECT AND REMOVE DUPLICATE * 02300000 023104* SELECT STATEMENT * 02310400 023200*---------------------------------------------------------------* 02320000 025403* 23/11/2001 CAW FIX OLC-CD-LIFE ON MULTI CODE PRODUCTS * 02540300 025405*---------------------------------------------------------------* 02540500 025520* 19/12/2001 CAW FIX MAX-IN-CODE ON EARLY CONFIRMS * 02552000 025800*---------------------------------------------------------------* 02580000 025810* 21/12/2001 CAW FIX MU TO CHECK OLD FOR VARIANT TPN STOCK. * 02581001 SG1 *---------------------------------------------------------------* 02350000 017820* 12/01/2002 GM > CARDIFF UNIVERSITY CHANGES < * 01 017820* INTRODUCTION OF THE TI FACTOR (TRIAL) * 01 017820* * 01 017820* * READ THE PAR TABLE TO PICK UP THE 10 TI * 01 017820* VALUES (ONE FOR EACH 0-9 COR VALUE) * 01 017820* (IN THIS TRIAL, TI IS CALCULATED OUTSIDE * 01 017820* OF THE CR ORDER CALC). * 01 017820* * WHEN CALLING JL0F40 FOR A PRODUCT, MATCH * 01 017820* AND PASS THROUGH LINKAGE THE APPROPRIATE * 01 017820* TI VALUE FOR THE PRODUCTS COR USING * 01 017820* EXISTING FIELD JLF40-COR-PC. * 01 017820* * DISPLAY THE TI USED FOR A PRODUCT IN F40. * 01 017900*---------------------------------------------------------------* 01 SG1 * 23/11/2001 SG CR COPYBOOK CHANGES.JLFORDER,JLFOPROF, * LO * SG1 * JLFOALLO CHANGED BY RETAINING THE NUMBER * LO * SG1 * OF FILLERS TO 5 FOR BETTER PERFORMANCE * O 5 * SG1 * AS AGREED BY THE CR * * SG1 *---------------------------------------------------------------* 02350000 CRV90B* 21/02/2002 GAC CHANGES FOR TSD 442: * 01 CRV90B* EXTRACT NEW COLUMN, LOAD_REF FROM OLD AND ADD * 01 CRV90B* TO WHERE CLAUSE OF ORD * 01 CRV90B* * 01 CRV90B* GAC CHANGES FOR TSD 448: * 01 CRV90B* ADD FUNCTIONALITY TO CHECK IF A PRODUCT IS * 01 CRV90B* SUBJECT TO DEGRADING SALES. IF SO, THE SHELF * 01 CRV90B* LIFE OF THE PRODUCT IS ADJUSTED TO REFLECT THE * 01 CRV90B* END DATE OF IT'S CORRESPONDING SALES PERIOD. * 01 CRV90B* THE NEW SHELF LIFE IS THEN TAKEN INTO ACCOUNT * 01 CRV90B* FOR THE DETAILED ORDER CALCULATION IN JL0F40 * 01 CRV90B* * 01 CRV90B* GAC CHANGES FOR TSD CARDIFF UNIVERSITY CHANGES: * 01 CRV90B* ADD NEW FIELD, JLFOD-ADJ-SAFE-STK-QTY TO * 01 CRV90B* RECORD OF JLFODIAG FILE * 01 CRV90B* * 01 CRV90B* GAC CHANGES FOR TSD 448: * 01 CRV90B* SET NEW FLAG ON JLF40LNK TO INDICATE WHETHER THE* 01 CRV90B* PRODUCT IS A DEGRADING LINE. ALSO POPULATE THE * 01 CRV90B* JLF40LNK EXPIRY DATE IF THE PRODUCT IS DEGRADING* 01 CRV90B* (OTHERWISE SET TO SPACES) * 01 CRV90B* * 01 CRV90B* READ OLD AND CALCULATE THE MAXIMUM STOCK IN CODE* 01 CRV90B* IF PRODUCT IS DEGRADING (CURRENTLY ONLY * 01 CRV90B* PERFORMED WHEN A SHORT LIFE PRODUCT) * 01 CRV90B*---------------------------------------------------------------* 01355000 017820* 14/06/2002 GM > CARDIFF UNIVERSITY CHANGES < * 01 017820* INTRODUCTION OF THE TI FACTOR (TRIAL) * 01 017820* * 01 017820* * OUTPUT THE ADJUSTED SAFETY STOCK FIGURE * 01 017820* (WHERE APPLICABLE) TO THE FILE FOR UPDATE * 01 017820* TO THE PPH TABLE. * 01 *---------------------------------------------------------------* 01355000 CRV10B* 04/09/2002 SB CHANGES FOR TSD470 - CRV10B * 01355000 CRV10B* ORDER UP TO CALCULATION * 01355000 CRV10B* REQUIREMENT TO CALCULATE ORDERS WITHOUT, * 01355000 CRV10B* WHERE AT ALL POSSIBLE, USING FORECAST SALES. * 01355000 CRV10A*---------------------------------------------------------------* 01355000 CRV10B* 30/09/2002 SB CHANGES FOR TSD522 - CRV10B * 01355000 CRV10B* REVISION OF TI APPLICATION * 01355000 CRV10A*---------------------------------------------------------------* 01355000 CRV10C* 07/10/2002 SB CHANGES FOR TSD468 - CRV10C * 01355000 CRV10C* SET STORE/DEPARTMENT TO RECOVERY STATUS * 01355000 CRV10B*---------------------------------------------------------------* 01355000 CRV10C* 08/10/2002 SB CHANGES FOR TSD519 - CRV10C * 01355000 CRV10C* EXTENDED LEADTIMES * 01355000 CRV10C* ALLOW INDIVIDUAL ORDER GROUP LEADTIMES * 01355000 CRV10B*---------------------------------------------------------------* 01355000 CRV11A* 10/12/2002 RP TSD561 * 03270014 CRV11A* ADD PROCESSING OF CASE-SAFETY-PC * 03280008 CRV11A*---------------------------------------------------------------* 03290008 CRV11A* 21/01/2003 GM TSD544 * 03270014 CRV11A* CATER FOR NEW DELY-IND VALUE OF 'S' * 03280008 CRV10B*---------------------------------------------------------------* 01355000 033300* 02/06/2003 PHIL WHITEHURST IR118400 * 03330000 033400* PREVENT OC7 IN SECTION B-410 * 03340000 033500* CHECK SUBSCRIPT TABLE LIMITS AND FOR END OF ENTRIES * 03350000 033600*---------------------------------------------------------------* 03360000 033700* 12/06/2003 TONY JONES CRSUM03A * 03370000 033800* INTRODUCTION OF MM RESERVES, PLUS FIX TO BD BACK-TO-BACK * 03380000 033900* ALLOCATIONS. ADDS MMR AND JLALRESV PROCESSING. * 03390005 * COMMENT OUT UNNECESSARY BTROCAP/BRREPGRP CODING. * 03400010 034000*---------------------------------------------------------------* 03400000 CRAUTA* 01/08/2003 SB CHANGES FOR TSD491 - CRAUT03 * 01355000 CRAUTA* STANDING ORDER CALCULATION METHOD * 01355000 CRAUTA* & * 01355000 CRAUTA* CC01BASE DATE USED TO LOAD DATE ARRAY HAS BEEN* 01355000 CRAUTA* REPLACED WITH ORDCALC PAR DATE. * 01355000 CRAUTA*---------------------------------------------------------------* 01355000 * 31/10/2003 DOH PREVENT A PRODUCT BEING CALCULATED USING THE * 01355000 * CRSUPP STANDING ORDER CALC METHOD ON ANY GIVEN DAY * 01355000 * WHERE THERE IS A NULL SOO VALUE FOR THAT * 01355000 * PRODUCT/DAY. * 01355000 *---------------------------------------------------------------* 01355000 SUM04B* 28/05/2004 PS AMENDED TO HANDLE CENTRAL STACK BUILD (666) * 00316002 SUM04B* (CRSUM04B) CAPACITY SEPARATELY FROM ALL OTHER OFFER SHELF * 00316002 SUM04B* CAPACITIES. 555'S ARE STILL SUBJECT TO * 00316002 SUM04B* PROMOTION RUNDOWN WHEREAS 666'S ARE NOT. * 00316002 SUM04B*---------------------------------------------------------------* 01080800 * 29/07/2004 DOH OBTAIN STORE OPEN DATE ON CHANGE OF STORE SO * 00316002 * (CRAUT04A) THAT IT CAN BE USED BY JL0F40 FOR STANDING * 00316002 * ORDER PRODUCTS. * 00316002 *---------------------------------------------------------------* 01080800 * 24/01/2005 DOH TSD795; CEASE RETRIEVING DEMAND LINE AND ORDER * 00316002 * (CRSPR05A) UP TO PARMS FROM THE PAR TABLE. INSTEAD PASS * 00316002 * THE DEMAND LINE BASIC ROUNDING PERCENTAGES * 00316002 * OBTAINED BY JL0F20 TO JL0F40. * 00316002 * TSD825; AMENDED FOR NEW STOCK FILL INDICATORS * 00316002 * TSD826; READ NEW INPUT FILE OF GAP ORDERS TO * 00316002 * TAKE ACCOUNT OF THE NEW GAP ORDER SHELF * 00316002 * CAPACITY CONTROL. * 00316002 *---------------------------------------------------------------* 01080800 * 31/08/2005 GTM SIMPLER REPLENISHMENT - SAFETY STOCK TRIAL * 00371001 * (CRAUT05A) READ TWO NEW PAR TABLE ENTRIES TO ESTABLISH A * 00372001 * LIST OF STORES AND SUBGROUPS WHICH FORM PART * 00373001 * OF THE TRIAL. * 00374001 * IT IS A REQUIREMENT OF THE TRIAL THAT THE "TI" * 00375001 * PROCESSING (PERFORMED IN MODULE JL0F40) BE * 00376001 * SWITCHED OFF FOR THE TRIAL STORES/SUBGROUPS. * 00377001 *---------------------------------------------------------------* 00378000 * 21/09/2005 GTM TSD940 - PROMOTIONAL STOCK RUN DOWN - B2B * 00371001 * (CRAUT05B) ACCEPT NEW INPUT FIELD JL25B-NEXT-PROM-SHELF-CAP 0372001 * FROM THE JLFOFCST INPUT FILE AND PASS TO JL0F40 00373001 * VIA NEW LINKAGE FIELD JLF40-NEXT-PROM-SHELF-CAP 00374001 *---------------------------------------------------------------* 00378000 WIN06B* 17/11/2005 HSC THE PROGRAM HAS TO BE AMENDED TO GET THE PROMO-* 00371001 WIN06A* (CRWIN06A) TION RUN-DOWN DAYS FROM THE PAR TABLE BASED ON * 00372001 WIN06B* THE SPECIFIC STREAM AS CURRENTLY THE NUMBER OF * 00373001 WIN06B* DAYS IS HARD CODED * 00374001 WIN06A*---------------------------------------------------------------* 01080800 WIN06B* 07/12/2005 AW TSD935 - FOR DOTCOM STORES WHOSE PRODUCTS HAVE * 00371001 WIN06A* (CRWIN06A) A CODE LIFE OF 21 DAYS OR LESS, ADJUST THE * 00372001 WIN06B* CODE LIFE BY A VALUE TAKEN FROM A FILE OF * 00373001 WIN06B* DOTCOM STORE/PRODUCTS OR IF NOT FOUND ON THIS * 00374001 WIN06B* FILE THEN FROM A DEFAULT VALUE SET UP ON THE * 00373001 WIN06B* PAR TABLE. * 00374001 WIN06B*---------------------------------------------------------------* 01080800 * 12/01/2006 DOH SUBSTITUTE CR FORECAST SALES WITH DOTCOM * * (CRWIN06A) EXPECTED SALES. * 00316002 *---------------------------------------------------------------* 01080800 * 08/05/2006 AJB TSD1009 - AVAILABILTY OPTIMISED ORDER * 00371001 * (CRSPR06B) CALCULATION FOR SHORT LIFE PRODUCTS. * 00372001 WIN06B*---------------------------------------------------------------* 01080800 * 19/06/2006 GAC BFZ/ LFZ LOOKUP FIELD PRECISION INCREASED TO 12* 00371001 * (CR049058) DECIMAL PLACES (POST TSD1009). * 00372001 *---------------------------------------------------------------* 01080800 AUT06B* 30/08/2006 GAC BSD1047 - ADD PROCESSING TO ALLOW JL0F47 TO * 00371001 AUT06B* (CRAUT06B) CALCULATE SHELF CAPACITY ORDER QUANTITY TO * 00372001 AUT06B* CONSIDER IN THE CALC FOR THE FINAL ORDER QTY. * 00372001 *---------------------------------------------------------------* 01080800 GCTEST* 09/11/2006 GAC DISPLAYS TEMPORARILY ADDED TO DIAGNOSE ERROR * 01080800 GCTEST* IN MAXIMUM STOCK IN CODE - CAT STORE ONLY. * *---------------------------------------------------------------* AUT06D* 22/11/2006 GAC ADD WT40 TABLE TO JLF046 LINKAGE. * 01080800 *---------------------------------------------------------------* AUT06D* 24/11/2006 GAC FIX BUG WHERE NULL WW-OLD-APPRT-ORD-QTY-NULL * AUT06D* RESULTS IN SPURIOUS ROW BEING ADDED TO WT40 * AUT06D* ARRAY WITH AN ORDER QUANTITY DERIVED FROM THE * AUT06D* PREVIOUS ROW RETRIEVED. * *---------------------------------------------------------------* JFM07A* 22/01/2007 GAC ALLOW FOR A SET OF DIAGNOSTICS FOR EACH STORE/* JFM07A* PRODUCT/ DELIVERY TO BE PASSED BACK TO JL0F30.* JFM07A* CURRENTLY ONLY ONE SET IS PASSED BACK FOR * JFM07A* MULTIPLE DELIVERIES, PERTAINING TO THE LAST * JFM07A* ORDER CALCULATION IN THE RUN FOR THAT STORE/ * JFM07A* PRODUCT. * *---------------------------------------------------------------* * 22/01/2007 GWE REMOVE REDUNDANT PROCESSING FOR BR COPYBOOKS * *---------------------------------------------------------------* AUT07A* 29/06/2007 GAC ADD DELIVERY TIME TO OLD ARRAY LINKAGE, * AUT07A* REQUIRED BY JLF46 TO DETERMINE STOCK ON * AUT07A* HAND WHEN A LATE DELIVERY. * AUT07A*---------------------------------------------------------------* AUT07A* AMENDED BY : ABHI P V * AUT07A* DATE : 16/07/2007 * AUT07A* CCID : CRAUT07A * AUT07A* PURPOSE : TSD 1106 PROCUREMENT,PROCUREMENT,FINAL ORDER * AUT07A* CALCULATION. * AUT07A* CHANGES : TWO NEW COLUMNS PROC_REM_RSVE_QTY & * AUT07A* PROC_LST_FORCED_DT HAVE BEEN ADDED IN THE * AUT07A* SELECT OF ALLOCATION TABLE. * AUT07A* THESE VALUES ALONG WITH FINAL_RSVE_QTY WILL THEN * AUT07A* BE PASSED THRU' LINKAGE TO JL0F40/46 PROGRAMS. * AUT07A* CHECK FOR LABEL 'AUT07A'. * AUT07A*---------------------------------------------------------------* AUT07A* 16/08/2007 GAC REQUIREMENT 1155B - CATER FOR ADJUSTMENT * AUT07A* PERCENTAGE TO BE APPLIED TO THE FIRST * AUT07A* BSP DERIVED DAY SALES TO HANDLE CHANGE FROM * AUT07A* JLFOFCST PERIODS TO WHOLE DAYS. * *---------------------------------------------------------------* AUT07B* 26/09/2007 AJD CHANGE ACCESS TO VXJJ0BSP TO USE CALLS TO THE * AUT07B* (CRAUT07B) MODULE JL0F26. * AUT07B*---------------------------------------------------------------* AUT07B* 18/10/2007 GAC 1106 - ACCOMMODATE FUTURE RESERVES (JLALRESV).* AUT07B* (CRAUT07B) * AUT07B*---------------------------------------------------------------* JFM08A* AMENDED BY : BHARATHI S * JFM08A* DATE : 15/11/2007 * JFM08A* CCID : CRJFM08A * JFM08A* PURPOSE : TSD 1136B - CHANGES TO GAP ORDER. * JFM08A* CHANGES : PROGRAM AMENDED TO USE NEW GAP PROCESSING LOGIC * JFM08A* TO DO ORDER CALCULATION WHEN PRODUCT IS GAP * JFM08A* ORDERED USING NEW GAP CONTROL(GC). * JFM08A*---------------------------------------------------------------* SPR08A* AMENDED BY : SHEKHAR SHARMA * SPR08A* DATE : 10/03/2008 * SPR08A* CCID : CRSPR08A * SPR08A* PURPOSE : TSD 1010C - AVAILABILITY AND WASTE CONTROL. * SPR08A* CHANGES : THE PROCESS OF GETTING THE WASTE SENSITIVITY * SPR08A* : VALUE FROM PAR/EXCEPTION FILE IS REPLACED WITH A * SPR08A* : WASTE CONTROL VALUE COMING FROM JLFOCNTL FILE * SPR08A* : FOR EACH STORE/BPR_TPN FOR ALL THE DEMAND PERIODS* SPR08A* : THIS WASTE CONTROL VALUE WILL BE CONVERTED INTO * SPR08A* : WASTE SENSITIVITY VALUE BY CALLING THE NEW MODULE* SPR08A* : JL0F48. * SPR08A*---------------------------------------------------------------* SPR08A* 06/06/2008 GAC - CORRECT SUBSCRIPT OF FUTURE RESERVE IND. * SPR08A* (SPR08A) * SPR08C*---------------------------------------------------------------* SPR08B* AMENDED BY : ABHI P V * SPR08B* DATE : 08/07/2008 * SPR08B* CCID : CRSPR08B * SPR08B* PURPOSE : TSD 1136B FIXES. * SPR08B* CHANGES : FIX TO CAPTURE GAP STOCK CORRECTION WITH * SPR08B* NEGATIVE BOOK STOCK VALUE DURING GAP SCAN. * SPR08B*---------------------------------------------------------------* SPR08B* AMENDED BY : JAGANNATHA PUNAJI * SPR08B* DATE : 27/06/2008 * SPR08B* CCID : CRSPR08B * SPR08B* PURPOSE : TSD 1010C - AVAILABILITY AND WASTE CONTROL. * SPR08B* : (ADDITIONAL CR TO CALCULATE NWS VALUE) * SPR08B* CHANGES : THE NWS VALUE WILL BE CALCULATED BY TAKING THE * SPR08B* : DAILY EDS & DAILY PTP FOR STORE/PRODUCT FOR EACH * SPR08B* : DEMAND PERIOD.THIS PROCESSING IS BEING INTRODUCED* SPR08B* : ONLY FOR THE BFFO PRODUCTS * SPR08B*---------------------------------------------------------------* SPR08C* AMENDED BY : NAGARAJ MADEGOWDA * SPR08C* DATE : 08/05/2008 * SPR08C* CCID : CRSPR08C * SPR08C* PURPOSE : TSD 1179 MINIMUM PROMOTION CAPACITY FOR * SPR08C* FRESH FOOD. * SPR08C* CHANGES : ACCEPT NEW INPUT FIELDS JL25B-MIN-PROM-CAP AND * SPR08C* JL25B-MIN-PROM-REQ-IND FROM THE JLFOFCST INPUT * SPR08C* FILE AND PASS TO JL0F40 VIA NEW LINKAGE FIELDS * SPR08C* JLF40-MIN-PROM-CAP AND JLF40-MIN-PROM-REQ-IND * SPR08C*---------------------------------------------------------------* SPR08C* AMENDED BY : JAGANNATHA PUNAJI * SPR08C* DATE : 11/07/2008 * SPR08C* CCID : CRSPR08C * SPR08C* PURPOSE : ADD QUERYNO LINE TO THE READNEXT_VXJJ0OLD CURSOR * SPR08C* : AND TO A SELECT STATEMENT IN THE V-330-READ-ORD * SPR08C* : SECTION FOR EFFICIENCY REASONS * SPR08C*---------------------------------------------------------------* AUT08A*---------------------------------------------------------------* AUT08A* AMENDED BY : PRAHLAD SHETTY * AUT08A* DATE : 21/07/2008 * AUT08A* CCID : CRAUT08A * AUT08A* PURPOSE : 1> CONSIDER THE MAXIMUM POSSIBLE SHELF LIFE FOR * AUT08A* : BFFO ELIGIBILITY. * AUT08A* : 2> SET THE SHELF LIFE ON THE STORE ORDER LINE TO * AUT08A* : THE SHELF LIFE SPECIFIC TO THE DELIVERY DAY. * AUT08A*---------------------------------------------------------------* AUT08B* AMENDED BY : PRAHLAD SHETTY * AUT08B* DATE : 14/08/2008 * AUT08B* CCID : CRAUT08B * AUT08B* PURPOSE : CPT CHANGES * AUT08B* : 1) CHANGE ALL SUBSCRIPTS FIELDS IN THE PROGRAM * AUT08B* FROM S999 COMP-3 TO S9(4) COMP FOR EFFICIENCY * AUT08B* : 2) MOVE SPACES TO JLF40-PER-STR-DATE FOR THE NEXT* AUT08B* FROOCCURRENCE IN THE ARRAY (IF < THE 75TH ENTRY),* AUT08B* AS PROGRAM JL0F40 CHECKS THIS FIELD FOR SPACES TO* AUT08B* END THE LOOP. * AUT08A*---------------------------------------------------------------* AUT08B* AMENDED BY : GREG CROZIER * AUT08B* DATE : 22/08/2008 * AUT08B* CCID : CRAUT08B - TSD1185B - BFFO ORDER CALC CHANGES. * AUT08B* PURPOSE : 1) INCORPORATE GAP SCAN CORRECTION INTO THE * AUT08B* : ACTUAL BOOKSTOCK (NOTE: POSTPONED UNTIL CR * AUT08B* : FOR 1136B COMPLETED) * AUT08B* : 2) FIX TO STOP EARLY DELIVERY RESULTING IN REQ * AUT08B* : DEL DT BEING CHANGED. * AUT08B*---------------------------------------------------------------* JFM09A* AMENDED BY : ROY ELLIFF * JFM09A* DATE : 03/02/2009 * JFM09A* CCID : CRJFM09A. * JFM09A* PURPOSE : PART WEEK ORDERING. * JFM09A* CHANGES TO WASTAGE ROUNDING. * SPR08C*---------------------------------------------------------------* WIN09A* AMENDED BY : ABHI P V * WIN09A* DATE : 04/12/2008 * WIN09A* CCID : CRWIN09A * WIN09A* PURPOSE : TSD 1249 : CORRECTION TO GAP ORDER. * WIN09A* CHANGES : ENHANCED AS PER 1249 REQUIREMENT TO CONSIDER * WIN09A* : PRE-DELIVERY-SALES & WASTAGE VALUES WHILE * WIN09A* : CALCULATING GAP STOCK CORRECTION (GSC) VALUE. * WIN09A* : THIS CALCULATION WILL BE APPLICABLE ONLY TO * WIN09A* : PRODUCTS GAP SCANNED WITH NEW GAP CONTROL(GC). * WIN09A* : USE THIS GSC VALUE TO DERIVE "EXPECTED B/S. DUE * WIN09A* : TO GAP" VALUE TO BE USED IN ORDER CALC ALGORITHM.* WIN09A*---------------------------------------------------------------* WIN09A* AMENDED BY : GREG CROZIER * WIN09A* DATE : 19/01/2009 * WIN09A* CCID : CRWIN09A - TSD1185B - BFFO ORDER CALC CHANGES. * WIN09A* PURPOSE : 1) INCORPORATE GAP SCAN CORRECTION INTO THE * WIN09A* : ACTUAL BOOKSTOCK (REINSTATE CODE). * WIN09A*---------------------------------------------------------------* JFM09C* AMENDED BY : GREG CROZIER * JFM09C* DATE : 25/02/2009 * JFM09C* CCID : CRJFM09C. * JFM09C* PURPOSE : PART WEEK ORDERING. * JFM09C* PART WEEK ORDERING CONTROLS NOW ON JLFOCNTL SO * JFM09C* WE CAN REMOVE ALL THE CODE FROM 03/02/2009 * SPR08C*---------------------------------------------------------------* SUM09A* AMENDED BY : ANJU GANESH * 00580000 SUM09A* DATE : 08/04/2009 * 00581000 SUM09A* CCID : CRSUM09A. * 00582000 SUM09A* PURPOSE : TSD 1010E- DEVOLOP NEW ORDER CALCULATION CONTROLS* 00583000 SUM09A* REPLACE THE EXISTING PAR TABLE PROCESSING FOR * 00584000 SUM09A* IRP, SRP, MAXIMUM SHELF LIFE & ACCEPTABLE AVLBLTY* 00585000 SUM09A* WITH NEW ORDER CALCULATION CONTROLS * 00586000 SUM09A*---------------------------------------------------------------* 00587000 SUM09A* AMENDED BY : SIMI SASEENDRAN * SUM09A* DATE : 23/12/2008 * SUM09A* CCID : CRSUM09A - TSD1213 - REMOVE FIXED FILL PROCESSING* SUM09A* : FROM PROMOTION STOCK DELIVERY DAY * SUM09A* PURPOSE : MOVE JL25B-FIXED-FILL-IND OF FORECAST FILE TO * SUM09A* : JL0F40 AND JL0F46 LINKAGE VARIABLES * SPR08C*---------------------------------------------------------------* SUM09B*---------------------------------------------------------------* 00587000 SUM09B* AMENDED BY : SANTOSH HEBSUR * SUM09B* DATE : 21/04/2009 * SUM09B* CCID : CRSUM09A - TSD1064 - CAPACITY CAPPING ON * SUM09B* : PROMOTION PRODUCTS * SUM09B* PURPOSE : CALCULATE THE NWS VALUE FOR NON BFFO PRODUCTS AS * SUM09B* : WELL BEFORE PASSING THE VALUES TO JL0F48. THE * SUM09B* : CHANGE IS MADE SO THAT THE CAPACITY CAPPING RULES* SUM09B* : ARE APPLIED WHEN THE PRODUCT GOES ON PROMOTION. * SUM09B* : IF A NON BFFO PRODUCT IS ON PROMOTION THEN THE * SUM09B* : NWS CALCULATIONS ARE CARRIED FOR THE PRODUCT. * SUM09B*---------------------------------------------------------------* AUT09A* AMENDED BY : JAGANNATHA PUNAJI * AUT09A* DATE : 07/07/2009 * AUT09A* CCID : CRAUT09A * AUT09A* PURPOSE : CPT_5127 * AUT09A* CHANGES : A NEW SECTION HAS BEEN CODED WHICH HOLDS ALL THE * AUT09A* : ISO & WF DATES BETWEEN -35 DAYS AGO AND 49 DAYS * AUT09A* : INTO THE FUTURE IN AN ARRAY.THIS WILL COVER THE * AUT09A* : RANGE OF DATES TYPICALLY TO BE ENCOUNTERED IN * AUT09A* : ORDER CALCULATION.THE BELOW SET OF SECTIONS HAVE * AUT09A* : BEEN AMMENDED TO REFER THESE DATES INSTEAD OF * AUT09A* : CALLING THE DATE ROUTINE DIRECTLY FROM THESE SEC * AUT09A* : TIONS. * AUT09A* : 1)B-357-SET-EXP-SHELF-LIFE * AUT09A* : 2)B-585-LOAD-TAB * AUT09A* : 3)B-800-CREATE-OUTPUT * AUT09A* : 4)B-450-RETRIEVE-BSP * AUT09A*---------------------------------------------------------------* AUT09A* AMENDED BY : ANJU GANESH * AUT09A* DATE : 03/08/2009 * AUT09A* CCID : CRAUT09A * AUT09A* PURPOSE : BFFO CHANGES FOR ASC (1275B) * AUT09A* CHANGES : PASS ACTUAL DELIVERY DATE AND TIME TO BFFO TO * AUT09A* : DETERMINE WHETHER A DELIVERY IS CONFIRMED TO THE * AUT09A* : BOOKSTOCK OR NOT - * AUT09A* : FETCH ACT_DEL_DATE, ACT_DEL_TIME, END_OF_WAVE_IND* AUT09A* : IN READNEXT_VXJJ0OLD CURSOR AND REMOVE THE CALL * AUT09A* : V-330-READ-ORD * AUT09A*---------------------------------------------------------------* SPR10A* AMENDED BY : JAGANNATHA P * SPR10A* DATE : 11/11/2009 * SPR10A* CCID : CRSPR10A * SPR10A* PURPOSE : TSD 1285A BFFO STABILITY ORDER CALC CHANGES * SPR10A* CHANGES : CALCULATE THE NOTIONAL WEEKLY SALES (NWS) BY * SPR10A* : CONSIDERING THE PTG TABLE. IF THERE IS NO ENTRY * SPR10A* : FOUND ON THE PTG TABLE FOR A PARTICULAR STORE, * SPR10A* : PRODUCT,REPORTING GROUP,WEEK COMBINATION THEN * SPR10A* : CALCULATE THE NOTIONAL WEEKLY SALES (NWS) BY * SPR10A* : REFERRING THE PTP TABLE. * SPR10A* : AND COMMENTED FEW DISPLAY STATEMENTS. * SPR10A*---------------------------------------------------------------* SUM10A* AMENDED BY : JAGANNATHA P * SUM10A* DATE : 16/04/2010 * SUM10A* CCID : CRSUM10A * SUM10A* PURPOSE : TSD1284 BFFO ORDER DIAGNOSTICS * SUM10A* CHANGES : AMENDED THE FIELD NAMES (RENAME/ADDED) WHILE * SUM10A* : POPULATING THE FIELDS OF JLFODIAX FILE AS * SUM10A* : APPLICABLE TO THE UPDATED COPYBOOK LAYOUT OF * SUM10A* : JLF46LNK & JLFODIAX. * SUM10A*---------------------------------------------------------------* SUM10A* AMENDED BY : SANTOSH HEBSUR * SUM10A* DATE : 30/04/2010 * SUM10A* CCID : CRSUM10A * SUM10A* PURPOSE : TSD1283 BFFO FORECAST ORDER * SUM10A* CHANGES : THE FOLLOWING CHANGES ARE DONE TO THE CODE. * SUM10A* : 1) CHANGES ARE MADE TO ALLOW FORECAST ORDER TO * SUM10A* : USE BFFO ORDER CALCULATION ONLY WHEN THE * SUM10A* : "BFFOFCST" SWITCH IN PAR IS SET TO "ON". * SUM10A* : 2) CHANGES ARE MADE TO GET THE BSP EXPECTED DAILY* SUM10A* : SALES UPTO A MAXIMUM OF 42 DAYS FOR BFFO * SUM10A* : FORECAST ORDERS. * SUM10A* : 3) VXJJ0OJX TABLE IS QUERIED TO GET THE * SUM10A* : PROCUREMENT SIGMA FOR THE STORE/PRODUCT FOR * SUM10A* : THE REQUIRED DELIVERY DATE AND ORDER TYPE OF * SUM10A* : THE FIRST RECORD IN THE FORECAST FILE. * SUM10A* : 4) CHANGES ARE MADE TO POPULATE THE VALUES GOT * SUM10A* : IN THE NEW F46 LINKAGE FIELDS INTO * SUM10A* : CORRESPONDING JLFODIAX FILE FIELDS. * SUM10A*---------------------------------------------------------------* SUM10B* AMENDED BY : NAGARAJ MADEGOWDA/ ABHI P V * SUM10B* DATE : 21/06/2010 * SUM10B* CCID : CRSUM10B * SUM10B* PURPOSE : TSD1348-CAGE SPLIT CODELIFE ALLOCATION * SUM10B* CHANGES : CHANGES ARE MADE TO BUILD WT40- ARRAY BY * SUM10B* : ALLOCATING CODELIFE FOR SPLIT BY CAGE DELIVERIES * SUM10B* : FIX DONE SO THAT CODE LIFE ALLOCATION IS DONE * SUM10B* : CORRECTLY FOR BFFO PRODUCTS WITH MULTIPLE CAGE * SUM10B* : DELIVERY & MULTIPLE CODE-LIFE. * SUM10B* : FIX SHOULD ALSO HANDLE BFFO PRODUCTS WITH * SUM10B* : SINGLE CAGE DELIVERY WITH MULTIPLE CODE-LIFE & * SUM10B* : MULTIPLE CAGE DELIVERY WITH SINGLE CODE-LIFE. * SUM10B*---------------------------------------------------------------* SUM10B* AMENDED BY : PURNIMA PATANGIA * SUM10B* DATE : 22/06/2010 * SUM10B* CCID : CRSUM10B * SUM10B* PURPOSE : TSD1305 DEACTIVATE PARALLEL ORDER * SUM10B* CHANGES : THE FOLLOWING CHANGES HAS BEEN DONE IN THE CODE. * SUM10B* : 1) PARALLEL ORDER CALCULATION PRIOR TO BFFO * SUM10B* : ORDER CALC HAS BEEN REMOVED. * SUM10B* : 2) REFERENCE TO ORD-REC-TYPES WHICH RELATE TO THE* SUM10B* : PARALLEL ORDER CALCULATION THAT HAS BEEN * SUM10B* : REMOVED. * SUM10B*---------------------------------------------------------------* SUM10B* AMENDED BY : PURNIMA PATANGIA * SUM10B* DATE : 28/07/2010 * SUM10B* CCID : CRSUM10B TSD 1305 CR * SUM10B* PURPOSE : TSD1305 DEACTIVATE PARALLEL ORDER * SUM10B* CHANGES : CHANGES HAS BEEN MADE TO WRITE EOOC FILE FOR * SUM10B* : SHORT LIFE BFFO PRODUCT. * SUM10B*---------------------------------------------------------------* SUM10C* AMENDED BY : ABHI P V SUM10C* DATE : 10/08/2010 * SUM10C* CCID : CRSUM10B TSD 1348 CR 01. * SUM10C* PURPOSE : TSD1348-CAGE SPLIT CODELIFE ALLOCATION * SUM10C* CHANGES : NEW LOGIC ADDED TO HANDLE SCENARIO WHERE * SUM10C* : OLD ENTRIES CANNOT BE MACTHED WITH OLC ENTRIES * SUM10C* : USING EITHER BEST-FIT OR MIX-N-MATCH METHOD. * SUM10B*---------------------------------------------------------------* SUM10C* AMENDED BY : PURNIMA PATANGIA * SUM10C* DATE : 02/09/2010 * SUM10C* CCID : CRSUM10C TSD 1283 CR 03. * SUM10C* PURPOSE : TSD1283-STREAM WISE BFFO FORECAST SWITCH * SUM10C* CHANGES : CHENGES HAS BEEN MADE TO EXISTING LOGIC TO * SUM10C* : INTRODUCE STREAM WISE FORECAST SWITCH FOR BFFO * SUM10C* : PRODUCTS. * SUM10B*---------------------------------------------------------------* SUM10D* AMENDED BY : SOWMYA S SUM10D* DATE : 13/09/2010 * SUM10D* CCID : CRSUM10D TSD 1283 CR 04. * SUM10D* PURPOSE : TSD1283-CR4 PERFORMANCE IMPROVEMENTS * SUM10D* CHANGES : CHANGES DONE TO MOVE BFZ-LFZ ARRAY VALUES TO * SUM10D* : JLF46 LINKAGE ONLY ONCE. * SUM10B*---------------------------------------------------------------* SPR11A* AMENDED BY : NANDINI MYLAPUR * SPR11A* DATE : 10/11/2010 * SPR11A* CCID : CRSPR11A * SPR11A* PURPOSE : BFFO FIX FOR NO D-TYPE RECORDS. * SPR11A* CHANGES : CHANGES HAVE BEEN MADE TO AVOID THE FAILURE OF * SPR11A* : BFFO PRODUCTS IF THERE WERE NO DEMAND RECORDS TO * SPR11A* : PROCESS AND SUCH RECORDS WILL BE WRITTEN TO A * SPR11A* : REJECT FILE. * SUM10B*---------------------------------------------------------------* SPR11A* AMENDED BY : NANDINI MYLAPUR * SPR11A* DATE : 25/10/2010 * SPR11A* CCID : CRSPR11A * SPR11A* PURPOSE : TSD1364-IMPROVED PROMOTION RUNDOWN SETTINGS * SPR11A* CHANGES : REMOVED THE EXISTING VXJJ0PAR TABLE QUERY FOR THE* SPR11A* : KEY "PROMRD#". * SPR11A* : CHANGED THE WT20-CONTROL-DATA TO INCLUDE ONE MORE* SPR11A* : FIELD WT20-PROM-RUNDOWN-CTL-DAYS IN WORKING * SPR11A* : STORAGE SECTION. * SPR11A* : ALSO CHANGED THE RECORD LENGTH OF THE REJECT * SPR11A* : JLFOCNTL FILE. * SUM10B*---------------------------------------------------------------* SPR11A* AMENDED BY : PURNIMA PATANGIA SPR11A* DATE : 25/10/2010 * SPR11A* CCID : CRSPR11A * SPR11A* PURPOSE : TSD1314B-DOTCOM CONFIRMED ORDERS FEED * SPR11A* CHANGES : TO AMEND THE ORDER CALCULATION PROCESS TO INCLUDE* SPR11A* : PROCESSING OF DOTCOM ENABLED SALES DATA ALONG * SPR11A* : WITH DOTCOM ONLY SALE FEED WHILE CALCULATING THE * SPR11A* : ORDERS. * SPR11A*---------------------------------------------------------------* SPR11A* AMENDED BY : PURNIMA PATANGIA * SPR11A* DATE : 07/01/2011 * SPR11A* CCID : CRSPR11A * SPR11A* PURPOSE : TSD1314B-CR1-DOTCOM CONFIRMED ORDERS FEED * SPR11A* CHANGES : CHANGES HAS BEEN DONE TO CHECK PROCESS INDICATOR * SPR11A* : FROM DOT COM FILE FOR SPACES/N AS WELL FOR SALES * SPR11A* : CALCULATION.IF IT IS SPACES LAST AVAILABLE * SPR11A* : INDICATOR WILL BE USED AND ACCORDINGLY SALES * SPR11A* : WILL BE DECIDED. * SPR11A*---------------------------------------------------------------* SPR11B* NAME : PURNIMA PATANGIA * SPR11B* DATE : 17/12/2010 * SPR11B* CCID : CRSPR11B-TSD1371-COMMON CODE REALIGNMENT * SPR11B* AMENDMENT : FOR UN-SPLIT ORDER HEADERS PICK UP DISTRIBUTED * SPR11B* : QTY FROM POS TABLE RATHER THAN REVISED ORDER * SPR11B* : QTY AFTER THE END-OF-WAVE CONDITION HAS OCCURED * SPR11B* : (PICK EXPIRED) * SPR11A*---------------------------------------------------------------* SUM11A* NAME : DEEPTI KARANTH * SUM11A* DATE : 18/04/2011 * SUM11A* CCID : CRSUM11A TSD1414-CHANGES TO DISPLAY MODELS * SUM11A* AMENDMENT : ADD DISPLAY QUANTITY FOR ACTUAL AND EXPECTED * SUM11A* : STOCK OF JLFODIAG FILE. * SUM11A*---------------------------------------------------------------* SUM11A* NAME : SIMI SASEENDRAN * SUM11A* DATE : 15/04/2011 * SUM11A* CCID : CRSUM11A-TSD1315B * SUM11A* AMENDMENT : CHANGES TO INVOKE BETTER GROCERY ORDER CALC * SUM11A* : FOR STORE/PRODUCT COMBINATIONS HAVING SHELF LIFE* SUM11A* : GREATER THAN MAXIMUM FRESH CODE LIFE AND CALC * SUM11A* : METHOD AS 'B' OR 'R' * SUM11A*---------------------------------------------------------------* SUM11A* NAME : RASHMI JHA * SUM11A* DATE : 27/04/2011 * SUM11A* CCID : CRSUM11A-TSD1398-PTP MANAGEMENT * SUM11A* AMENDMENT : CHANGE REQUIRED DUE TO CHANGE IN LENGTH OF WOR- * SUM11A* : KING STORAGE VARIABLE FOR PTP-DAY VALUE FROM * SUM11A* : 99.9% TO 999.9% * SUM11A*---------------------------------------------------------------* SUM11B* AMENDED BY : SANDEEP JAIN * SUM11B* DATE : 06/05/2011 * SUM11B* CCID : CRSUM11B * SUM11B* PURPOSE : TSD1355-FIRST STORE ORDER FOR A NEWLY RANGED * SUM11B* : PRODUCTS. * SUM11B* CHANGES : AMENDED THE LOGIC TO ZEROISE THE SALES FOR NEWLY * SUM11B* : RANGED PRODUCTS BEFORE IT IS STOCKED IN THE STORE* SUM11B* : DEPENDING ON STOCK START DATE VALUE IN INPUT FILE* SUM11A*---------------------------------------------------------------* SPR12A* AMENDED BY : KAVITHA R * SPR12A* DATE : 21/10/2011 * SPR12A* CCID : CRSPR12A * SPR12A* PURPOSE : TSD1404A- STOCK SHARE * SPR12A* CHANGES : THE PROGRAM IS AMENDED TO POPULATE JLFODIAH FILE * SPR12A* : WITH A NEW FIELD JLFOH-ALT-MERCH-UNITS * SUM11B*---------------------------------------------------------------* SPR12A* AMENDED BY : RACHEL LALITHA A * SPR12A* DATE : 26/10/2011 * SPR12A* CCID : CRSPR12A * SPR12A* PURPOSE : TSD1402 - FEATURE SPACE PROMOTION * SPR12A* CHANGES : AMENDED TO READ THREE NEW KEYS FROM PAR TABLE AND* SPR12A* : PASS THOSE VALUES TO JL0F46. * SPR12A*---------------------------------------------------------------* SPR12A* AMENDED BY : RACHEL LALITHA A * SPR12A* DATE : 15/11/2011 * SPR12A* CCID : CRSPR12A * SPR12A* PURPOSE : TSD1403A - BGO ENHANCEMENT * SPR12A* CHANGES : AMENDED TO INCLUDE TWO NEW FIELDS DESIRABLE SHELF* SPR12A* : FILL PERCENTAGE AND DESIRABLE SHELF FILL ORDER * SPR12A* : IN JLFODIAH FILE. * SPR12A* : CALL B-475-SET-ANTIC-WASTE-SALES BEFORE JLF42 * SPR12A* : LINKAGE WILL BE POPULATED FROM JLF40 TO CALCULATE* SPR12A* : ANTICIPATED WASTE VALUE TO CALCULATE THE * SPR12A* : REMAINING PROMOTIONAL SALES CALCULATION IN JLF42 * SPR12A*---------------------------------------------------------------* SPR12A* AMENDED BY : RACHEL LALITHA A * SPR12A* DATE : 17/11/2011 * SPR12A* CCID : CRSPR12A * SPR12A* PURPOSE : TSD1403B - SERVICE IMPROVEMENTS * SPR12A* CHANGES : THE FOLLOWING CHANGES HAVE BEEN MADE: * SPR12A* CHANGES : 1.GET THE BBP DATA FROM HEADER RECORD RATHER * SPR12A* : FROM BBP READ THEREBY DECOMMISSIONING ALL * SPR12A* : REFERENCES TO BBP TABLE. * SPR12A* : 2.AVOID REDUNDANT CLOSURE OF READNEXT-VXJJ0ASF * SPR12A* : CURSOR. * SPR12A* : 3.CHECK ON PTG EXISTENCE AT STORE LEVEL. * SPR12A*---------------------------------------------------------------* SPR12D* AMENDED BY : SURAJ SEKHAR PUROHIT * SPR12D* DATE : 01/03/2012 * SPR12D* CCID : CRSPR12D * SPR12D* PURPOSE : TSD 1466H- ENTERPRISE COBOL MIGRATION * SPR12D* CHANGES : THE PROGRAM WAS REGENERATED WITH THE NEW TYPE * SPR12D* : AND PROCESSOR GROUPS * SPR12D* : ALSO INCLUDED COMPILER OPTION TRUNC(BIN) * SPR12D* : IN THE PROGRAM * SPR12D*---------------------------------------------------------------* SPR12D* AMENDED BY : KAVITHA R * SPR12D* DATE : 03/05/2012 * SPR12D* CCID : CRSPR12D * SPR12D* PURPOSE : TSD 1403CR1 FIX * SPR12D* CHANGES : CHANGES DONE SO THAT CORRECT PROM END DATE & * SPR12D* : NEXT PROM CAPACITY ( EXCLUDING STACK BUILD) IS * SPR12D* : CONSIDERED FOR BGO CALCULATION LOGIC. * SPR12D* : 1. PROCESSING THE TWO NEW FIELDS * SPR12D* : WT10-BACK-BACK-PROM-CAP AND * SPR12D* : JL25B-ACT-PROM-END-DATE FROM JLF25 INPUT FILE * SPR12D* : AND POPULATING INTO JLF42 LINKAGE. * SPR12D* : 2. JLF42-NEXT-PROM-SHELF-CAP IS CALCULATED AS * SPR12D* : WT10-BACK-BACK-PROM-CAP. * SPR12D* : 3. REPLACE JLF42-PROM-END-DATE WITH * SPR12D* : JL25B-ACT-PROM-END-DATE. * SPR12D*---------------------------------------------------------------* SUM12A* AMENDED BY : KAVITHA R * SUM12A* DATE : 09/05/2012 * SUM12A* CCID : CRSUM12A * SUM12A* PURPOSE : TSD 1190CR2 * SUM12A* CHANGES : CHANGES DONE TO WRITE CALC METHOD INDICATOR (Y/N)* SUM12A* : IN JLFORDER FILE ONLY WHEN THE CALC METHOD IS "I"* SUM12A* : FOR 21 DAYS. * SUM12A* : JLFORDER COPY BOOK IS CHANGED TO INCLUDE NEW * SUM12A* : FIELD JLFOR-CALC-METH-I-IND. * SPR12D*---------------------------------------------------------------* SUM12A* AMENDED BY : RACHEL LALITHA * SUM12A* DATE : 06/06/2012 * SUM12A* CCID : CRSUM12A * SUM12A* PURPOSE : TSD1473 - BGO ENHANCEMENTS * SUM12A* CHANGES : THE FOLLOWING CHANGES HAVE BEEN MADE: * SUM12A* : 1. LEAD TIME WHICH WAS IN TERMS OF INTERVALS IS * SUM12A* : CONVERTED TO NUMBER OF DAYS. * SUM12A* : 2. AMENDED THE SECTION B-450-RETRIEVE-BSP SO THAT* SUM12A* : WHEN STKD-PROD-ENDT IS > 21 DAYS THEN ALSO * SUM12A* : SALES WILL BE PICKED FOR 21 DAYS FROM BSP. * SUM12A* : 3. AMENDED THE LOGIC TO CHOOSE THE WEEK TO WRAP * SUM12A* : SALES FOR THOSE WEEKS WHICH HAS MISSING BSP * SUM12A* : SALES . * SPR12D*---------------------------------------------------------------* SUM12B* AMENDED BY : POOJA GOWDA M * SUM12B* DATE : 06/07/2012 * SUM12B* CCID : CRSUM12B * SUM12B* PURPOSE : TSD - 1404CR1 - BGO STOCKSHARE WHOLE DAY * SUM12B* CHANGES : AS NEW FIELD IS BEING ADDED TO JLFORDER,JLFODIAG * SUM12B* JLFODIAH COPYBOOKS, BELOW CHANGES ARE DONE:- * SUM12B* 1.POPULATE THE NEW FIELD JLFOR-NOTNL-CALC-DATE * SUM12B* IN SECTIONS B-810-CREATE-ORDERS, * SUM12B* B-A10-CREATE-ORDERS,B-C10-CREATE-ORDERS FROM * SUM12B* WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1). * SUM12B* 2.POPULATE THE NEW FIELD JLFOD-NOTNL-CALC-DATE * SUM12B* IN B-820-CREATE-ORD-DIAG FROM * SUM12B* JLF40-NOTNL-CALC-DATE(WX10-DATA-SUB1), * SUM12B* B-A20-CREATE-ORD-DIAG FROM * SUM12B* JLF46-NOTNL-CALC-DATE(WX10-DATA-SUB1), * SUM12B* B-C20-CREATE-ORD-DIAG FROM * SUM12B* JLF42-NOTNL-CALC-DATE(WX10-DATA-SUB1). * SUM12B* 3.POPULATE THE NEW FIELD JLFOH-NOTNL-CALC-DATE * SUM12B* IN SECTION B-D20-CREATE-ORD-DIAH FROM * SUM12B* JLF42-NOTNL-CALC-DATE(WX10-DATA-SUB1). * SPR12D*---------------------------------------------------------------* SPR13A* AMENDED BY : RAVI P * SPR13A* DATE : 30/11/2012 * SPR13A* CCID : CRSPR13A * SPR13A* PURPOSE : TSD - 1440 1N ORDER CALC CHANGES * SPR13A* CHANGES : WHEN THE STORE/PRODUCT IS IN OLD FORCASTING, GET * SPR13A* THE PROM IND FROM XSA-NIA TABLE AND FOR NEW* SPR13A* FORECASTING GET THE PROM IND FROM XSB-RST TABLE * SPR13A* FOR FUTURE WEEKS WHICH IS NOT AVAILABLE IN * SPR13A* JLFOFCST FILE. * SPR13A*---------------------------------------------------------------* SPR13B* AMENDED BY : RACHEL LALITHA A * SPR13B* DATE : 19/12/2012 * SPR13B* CCID : CRSPR13B * SPR13B* PURPOSE : TSD - 1534 - BGO FEEDS INTO DEPOT ORDERING SYSTEM* SPR13B* CHANGES : THE FOLLOWING CHANGES HAS BEEN DONE : * SPR13B* : 1. A NEW FIELD JLFOR-SALES-ORDER IS INCLUDED IN * SPR13B* : JLFORDER COPY BOOK AND IT IS POPULATED IN THE * SPR13B* : SECTIONS B-810-CREATE-ORDERS,B-A10-CREATE-ORDERS,* SPR13B* : B-C10-CREATE-ORDERS AND B-620-JLF40-PERIOD. * SPR13B* : 2. A NEW FIELD JLFOH-FILLR-STOCK IS INCLUDED IN * SPR13B* : JLFODIAH COPY BOOK AND IT IS POPULATED IN THE * SPR13B* : SECTION B-D20-CREATE-ORD-DIAH. * SPR13A*---------------------------------------------------------------* SUM13A* AMENDED BY : SURAJ SEKHAR PUROHIT * SUM13A* DATE : 02/04/2013 * SUM13A* CCID : CRSUM13A * SUM13A* PURPOSE : TSD - 1536A RATIO PACK ORDERING * SUM13A* CHANGES : AMENDED THE CODE TO * SUM13A* : 1.FIND NEXT RATIO PACK DELIVERY DATE * SUM13A* : 2.POPULATE THE FIELDS JLF42-ADD-SHELF-CAP-FLEX, * SUM13A* : JLF42-ADD-SHELF-CAP, JLF42-RATIO-PACK-CAP, * SUM13A* : JLF42-RATIO-PACK-CTL-FTR,JLF42-EST-SALES-NEXT-RP* SUM13A* : -DEL,JLF42-NXT-RP-DEL-DT * SUM13A* : 3.AMENDED SECTIONS B-980-AO-CREATE-OUTPUT, * SUM13A* : B-D20-CREATE-ORD-DIAH AND B-C20-CREATE-ORD-DIAG* SUM13A* : TO INCLUDE THE NEW FIELDS RELATED TO RATIO PACK* SUM13A* : 4.INCLUDED A NEW SECTION TO CALCULATE RATIO PACK * SUM13A* : DELIVERY B-982-RATIO-PACK-PROCESSING * SUM13A* : 4.INCLUDED NEW CURSORS READNEXT_VXJJ0OLD_RPKAND * SUM13A* : READNEXT_VXJJ0ALL_RPK FOR FETCHING NEXT RATIO * SUM13A* : PACK DELIVERY DATES. * SUM13A*---------------------------------------------------------------* CRSUP1*---------------------------------------------------------------* CRSUP1* AMENDED BY : RAJESH KAKE * CRSUP1* DATE : 10/07/2013 * CRSUP1* CCID : CRSUP1 * CRSUP1* PURPOSE : INTALISING THE OLD CURSOR DATA AT A-100 PARA. * CRSUP1* CHANGES : THE FOLLOWING CHANGES HAS BEEN DONE AT A-100. * CRSUP1* : 1. INTAILIZING WT40-OLD-CURSOR-DATA ARRAY * SUM13A*---------------------------------------------------------------* SUM13A* AMENDED BY : POOJA GOWDA M * SUM13A* DATE : 07/06/2013 * SUM13A* CCID : CRSUM13A * SUM13A* PURPOSE : TSD - 1312 SOLVING THE PROCUREMENT TRAP * SUM13A* CHANGES : BELOW CODE CHANGES ARE DONE AS PER THE REQUIREMENT SUM13A* TO CALCULATE THE ANTICIPATED WASTE ACCURATELY THE * SUM13A* THE CURRENT PROCESS IS SUPPLEMENTED WITH THE VIEW * SUM13A* OF PROCUREMENT ORDER QUANTITIES, THEIR EXPECTED * SUM13A* DELIVERY DATES AND EXPIRY DATES BASED ON THEIR * SUM13A* UPON THE STANDARD EXPECTED SHELF LIFE OF THE * SUM13A* PRODUCT FOR THAT DAY. * SUM13A*---------------------------------------------------------------* SUM13B* AMENDED BY : RACHEL LALITHA A * SUM13B* DATE : 05/09/2013 * SUM13B* CCID : CRSUM13B * SUM13B* PURPOSE : TSD - 1536A PRODUCTION FIX TO ADDRESS DOTCOM * SUM13B* : SALES ISSUE. * SUM13B* CHANGES : THE DECLARATION LEVEL FOR WF01-RPKCALC FIELD IS * SUM13B* CHANGED FROM 03 TO 05 LEVEL. * SUM13B*---------------------------------------------------------------* SUM13B* AMENDED BY : AJESH * SUM13B* DATE : 12/09/2013 * SUM13B* CCID : CRSUM13C * SUM13B* PURPOSE : TSD - 1536A PRODUCTION FIX TO ADDRESS ESOH * SUM13B* CHANGES : RATIO PACK OUTSTANDING QUANTITY IS PASSED TO * SUM13B* JL0F42 PROGRAM. * SUM13B*---------------------------------------------------------------* SUM13C* AMENDED BY : RACHEL LALITHA A * SUM13C* DATE : 30/09/2013 * SUM13C* CCID : CRSUM13C * SUM13C* PURPOSE : TSD - 1536A FIX * SUM13C* CHANGES : AMENDED READNEXT_VXJJ0OLD_RPK CURSOR ALSO * SUM13C* REPLACED READNEXT_VXJJ0ALL_RPK WITH * SUM13C* READNEXT_VXJJ0OJD_RPK * SUM13C*---------------------------------------------------------------* SPR14A* AMENDED BY : PALLAVI RAJAREDDY * SPR14A* DATE : 03/12/2013 * SPR14A* CCID : CRSPR14A * SPR14A* PURPOSE : TSD - 1559 POTENTIAL REDUCTIONS IN ORDERING * SPR14A* CHANGES : TO CALCULATE POTENTIAL REDUCTION EXPIRY AND SALES* SPR14A* USING DATA AVAILABLE IN RDD AND RDT TABLES. * SPR14A* PASS THESE VALUES TO JL0F46 VIA LINKAGE VARIABLES* SPR14A* RECEIVE THE EXISTING EXPIRY VALUE AND REDUCTION * SPR14A* SALES AND OUTPUT IT TO JLFODIAX FILE. * SPR14A*---------------------------------------------------------------* SPR14B*---------------------------------------------------------------* SPR14B* AUTHOR : ROHIT * SPR14B* DATE : 23/02/2014 * SPR14B* CCID : CRSPR14B * SPR14B* PURPOSE : TSD - OPP - 11121 * SPR14B* DESCRIPTION : THIS PROGRAM HAS BEEN AMMENDED TO ADD A NEW * SPR14B* DATE ROUTINE. * SPR14B* WARNING MESSAGE THAT DENOTES THAT THERE ARE MORE* SPR14B* THAN 4 WEEKS OF DATE AVAILABLE IN BSP,AND ONLY * SPR14B* 4 WEEKS OF DATA WILL BE CONSIDERED FOR THE SALES* SPR14B* WRAPPING LOGIC HAS BEEN REMOVED * SPR14B*---------------------------------------------------------------* SPR14D* AMENDED BY : PALLAVI RAJAREDDY * SPR14D* DATE : 14/04/2014 * SPR14D* CCID : CRSPR14D * SPR14D* PURPOSE : TSD - 1559 CR - SALES ROUNDING * SPR14D* CHANGES : REDUCTION SALES USED IN PR EXPIRY CALCULATION * SPR14D* SHOULD BE ROUNDED IF RDT SALES IS AN INTEGER, * SPR14D* WHICH MEANS FOR ALL NON SELL BY WEIGTH ITEMS. * SPR14D* ALSO TO HANDLE WHEN RDN_AT_SCN_IND COLUMN IS NULL* SPR14D* IN RDD TABLE. * SPR14D*---------------------------------------------------------------* SUM14A*---------------------------------------------------------------* SUM14A* AMENDED BY : ROHIT * SUM14A* DATE : 24/06/2014 * SUM14A* CCID : CRSUM14A * SUM14A* PURPOSE : TSD - 1587 DIRECT DEPOT FORECAST * SUM14A* CHANGES : SET WT10-BOOKSTOCK-USED FIELD TO 0 FOR A VIRTUAL * SUM14A* STORE * SUM14A*-------------------------------------------------------------- * SUM14B*---------------------------------------------------------------* SUM14B* AMENDED BY : ROHIT * SUM14B* DATE : 07/08/2014 * SUM14B* CCID : CRSUM14B * SUM14B* PURPOSE : TSD - 1587 * SUM14B* CHANGES : REDUCE THE CPU TIME BY STORING A VIRTUAL STORE * SUM14B* INTO A WORKING STORAGE VARIABLE * SPR14D*---------------------------------------------------------------* KFACTR* AMENDED BY : ROY ELLIFF * KFACTR* DATE : 29/10/2014 * KFACTR* CHANGES : REPLACE BBN TABLE WITH NWS TABLE TO GET K-FACTOR * KFACTR* CALCULATED USING NGF NWS. * SPR14D*---------------------------------------------------------------* 143S01* AMENDED BY : SWATHI SHETTY * 143S01* DATE : 28/11/2014 * 143S01* CCID : 143S01 * 143S01* PURPOSE : TSD - 1600 * 143S01* CHANGES : HANDLE THE NEW FIELDS LIKE STORE MANAGER FIXED * 143S01* ORDER QUANTITY AND THE NEW INDICATOR WHICH IS * 143S01* USED FOR IDENTIFYING A STORE MANAGER FIXED ORDER.* 143S01***************************************************************** 142S02* AUTHOR : PURNIMA AND PALLAVI RAJAREDDY * 142S02* DATE : 02/12/2014 * 142S02* CCID : 142S02 * 142S02* PURPOSE : BGO PHASE 2 - US-3,16 * 142S02* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO CAP * 142S02* MAX-DAYS-COVER WITH CODE-LIFE WHEN * 142S02* MAX-DAYS-COVER IS GREATER THAN CODELIFE. * 142S02* ALSO INTRODUCING CALC-METHOD "O" FOR * 142S02* BFO-FILL-OPTIMAL AND "P" FOR BGO-REPL-OPTIMAL * 142S02* AS PART OF BGO. * 142S02*---------------------------------------------------------------* 143S01* AMENDED BY : KAVITHA RAVIKUMAR * 143S01* DATE : 01/11/2014 * 143S01* CCID : 143S01 * 143S01* PURPOSE : TSD - 1600 * 143S01* CHANGES : HANDLE JLFOFCST COPYBOOK FORMAT CHANGES. * 143S01***************************************************************** 142S03* AUTHOR : VEDA * 142S03* DATE : 26/12/2014 * 142S03* CCID : 142S03 * 142S03* PURPOSE : BGO PHASE 2 - US-21 * 142S03* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO APPLY THE LONG * 142S03* LIFE FRESH FUNCTIONALITY ONLY TO THE TRIAL GROUP* 142S03* OF STORES/SUBGROUP UNDER THE STORE GROUPING AND * 142S03* SUBGROUP GROUPING 'BGOMCOVR'. * 142S03***************************************************************** 142S03* AUTHOR : PURNIMA PATANGIA * 142S03* DATE : 24/12/2014 * 142S03* CCID : 142S03 * 142S03* PURPOSE : BGO PHASE 2 - US-11,9 * 142S03* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO POPULATE * 142S03* BACKROOM SENSITIVITY, MAX DAYYS COVER CAPPED * 142S03* INDICATOR,BACKROOM IMPACT AND LSAB VALUES TO * 142S03* JLFODIAH FILE. * TA1226***************************************************************** TA1226* AUTHOR : THIRUPAL * TA1226* DATE : 26/12/2014 * TA1226* CCID : 142S03 * TA1226* PURPOSE : BGO PHASE 2 - US-10 * TA1226* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO GET THE SHELF * TA1226* SPACE FOR THE FUTURE 21 DAYS, TO USE IN LSAB * TA1226* CALCULATION IN JL0F43 PROGRAM * TA1226***************************************************************** PP2S05*---------------------------------------------------------------* PP2S05* AUTHOR : PURNIMA PATANGIA * PP2S05* DATE : 26/12/2014 * PP2S05* CCID : PP2S05 * PP2S05* PURPOSE : BGO PHASE 2 - US-22 * PP2S05* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO PAR KEY FOR MAX* PP2S05* CASE % AND PASS THE SAME TO JL0F42 PROGRAM FOR * PP2S05* CALC-METH "P" & "O" * PP2S05*---------------------------------------------------------------* 152S06*---------------------------------------------------------------* VR2S06* AUTHOR : VEDA R * 152S06* DATE : 24/02/2015 * VR2S06* CCID : VR2S06 * 152S06* PURPOSE : BGO PHASE 2 * VR2S06* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO INCLUDE SPACES * VR2S06* FOR THE CAPPED INDICATOR FOR THE PRODUCTS WHICH * VR2S06* ARE NOT ACTIVATED FOR LONG LIFE FRESH. * 152S06*---------------------------------------------------------------* KS2S09* NAME : KAVITHA GANGADHAR * KS2S09* DATE : 21/05/2015 * KS2S09* CCID : PERFORMANCE FIX * KS2S09* PURPOSE : REMOVING THE OLD FORECASTING REFERENCE TO SAVE * 03774003 KS2S09* CPU. * KS2S09***************************************************************** AB2S10*---------------------------------------------------------------* PS2S11* AUTHOR : PRAHLAD SHETTY * PS2S11* DATE : 01/07/2015 * PS2S11* CCID : PS2S11 * PS2S11* PURPOSE : ORDERING FOR FUTURE UNCERTAINTY * PS2S11* DESCRIPTION : CALCULATE K FACTOR DYNAMICALLY BASED ON THE * PS2S11* DYNAMIC NWS VALUE * PP2S12* AUTHOR : PURNIMA PATANGIA * SM1588* DATE : 12/08/2015 * SM1588* CCID : SM1588 * SM1588* PURPOSE : ORDERING FOR FUTURE UNCERTAINTY * SM1588* DESCRIPTION : IF NO NWS KNOWN FOR SOME OF THE DAYS BUT THERE * SM1588* IS NWS DATA FOR THE CURRENT DAY THEN WE NEED TO * PP2S12* USE PREVIOUS USED NWS. * SMJU15*---------------------------------------------------------------* PP2S13* AUTHOR : PURNIMA PATANGIA * PP2S13* DATE : 04/09/2015 * PP2S13* CCID : PP2S13 * PP2S13* PURPOSE : ORDERING FOR FUTURE UNCERTAINTY * PP2S13* DESCRIPTION : AS PART OF THIS STORY WE HAVE INCLUDED BELOW * PP2S13* CHANGES * PP2S13* 1. IF OFU FUNCTIONALITY IS ON CALCULATE K-MAX * PP2S13* USING K-MAX VALUE FROM CUSTOMER TREND FILE AND * PP2S13* PAR VALUES. * PP2S13* 2. IF NWS IS MISSING FOR ANY DAY THEN USE LAST * PP2S13* AVAILABLE NWS FOR THE MISSING DAYS * SMJU15*---------------------------------------------------------------* SM2S13*---------------------------------------------------------------* SM2S13* AUTHOR : SIREESHA MUPPARAJU * SM2S13* DATE : 31/07/2015 * SM2S13* CCID : SM2S13 * SM2S13* PURPOSE : MARGIN OF ERROR IN PAR * SM2S13* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO READ "MARGIN * SM2S13* OF ERROR" VALUE FROM PAR TABLE AND WILL PASS * SM2S13* IT TO F43 FOR FURTHER CALCULATION. * SMJU15*---------------------------------------------------------------* AB2S10*---------------------------------------------------------------* AB2S10* AUTHOR : AMIT KUMAR BHOL * AB2S10* DATE : 16/06/2015 * AB2S10* CCID : AB2S10 * AB2S10* PURPOSE : BFFO PRE DEMAND DELIVERY ISSUE * AB2S10* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO INCLUDE THE * AB2S10* DELIVERY STSTUS INDICATOR WHICH WILL PASS TO F46* AB2S10* FOR FURTHER CALCULATION. * 034000*---------------------------------------------------------------* 03400000 162S24* AUTHOR : SHILPA.B.S * 162S24* DATE : 23/02/2016 * 162S24* CCID : 162S24 * 162S24* PURPOSE : BGO PHASE 2 - SO-1249 * 162S24* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO PASS THE * 162S24* PRE-OFFER-DELIVERY DATE INDICATOR FROM JL0F25 * 162S24* PROGRAM TO JL0F42. * 162S24***************************************************************** RD2S19* AUTHOR : RANI DHARA E * RD2S19* DATE : 16/12/2015 * RD2S19* CCID : RD2S19 * RD2S19* PURPOSE : SO-811 INPUTS TO UNCERTAINTY CALCUALTION * RD2S19* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO CREATE A NEW * RD2S19* OUTPUT FILE WITH THE FIELDS REQUIRED FOR * RD2S19* UNCERTAINTY CALCUALTION. * RD2S21*---------------------------------------------------------------* AVRS32* AUTHOR : RAMYA AV * AVRS32* DATE : 18/07/2016 * AVRS32* CCID : AVRS32 * AVRS32* PURPOSE : SO-998 LM-CR PRODUCTION FEEDBACK LOOP * AVRS32* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO CONSIDER THE * AVRS32* REFINED PROCUREMENT/PRODUCTION ORDER DURING * AVRS32* CALCULATION OF NEX DAYS TARGET PROC/PROD ORDER * AVRS32*---------------------------------------------------------------* AVRS34* AUTHOR : RAMYA AV * AVRS34* DATE : 27/07/2016 * AVRS34* CCID : AVRS34 * AVRS34* PURPOSE : SO-998 LM-CR PRODUCTION FEEDBACK LOOP * AVRS34* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO INCLUDE PROC/ * AVRS34* PROD INDICATOR CHECK BEFORE WRITING INTO DIAG * AVRS34* OUTPUT FILE AND REMOVED PPD CHECK * AVRS34*---------------------------------------------------------------* NJ2S35* AMENDED BY : NAVODITA JAISWAL * NJ2S35* DATE : 16/08/2016 * NJ2S35* CCID : NJ2S35 * NJ2S35* PURPOSE : SO-2255 : AVAILABILITY LEVEL * NJ2S35* CHANGES : THIS PROGRAM HAS BEEN AMENDED TO INCLUDE NEW * NJ2S35* FIELD WASTE-CONTROL-VERN WHICH HAS AVAILABILY * NJ2S35* VERSION AND CONTROL LEVEL WHICH WILL BE REFERRED * NJ2S35* FOR BOTH BFFO AND BGO COMPONENT AND WILL BE * NJ2S35* REFERRED IN CORROSPONDING DIAGNOSTICS TABLES. * NJ2S35*---------------------------------------------------------------* 161S21***************************************************************** 161S21* AUTHOR : NEHA TIKARYA * 161S21* DATE : 16/05/2016 * 161S21* CCID : 161S21 * 161S21* PURPOSE : SO-1325 TURN OFF THE SMFO IMPACT ON ORDER CALC * 161S21* : DURING AN ALLOCATION PERIOD * 161S21* DESCRIPTION : THIS PROGRAM HAS BEEN AMENDED TO FETCH A NEW * 161S21* PAR KEY 'SMFORESV' TO CONTROL SMFO IMPACT ON * 161S21* ORDER CALC DURING AN ALLOCATION PERIOD AND * 161S21* PASSING THIS PAR KEY TO -F40,-F42 AND -F46 * 161S21* MODULE THROUGH LINKAGE. * 161S21*---------------------------------------------------------------* 162S40* AUTHOR : SHILPA.B.S * 162S40* DATE : 20/10/2016 * 162S40* CCID : 162S40 * 162S40* PURPOSE : SO - 2795 * 162S40* DESCRIPTION : CUSTOMER ORDERS FOR NON STOCKED PRODUCTS. * 162S40* SWITCH TO OLD ORDER CALC IF THE CUSTOMER ORDERS * 162S40* ARE FOR NON RANGED PRODUCTS. * 162S40***************************************************************** 161S26* AUTHOR : SHWETHA.C.P * 161S26* DATE : 13/12/2016 * 161S26* CCID : 161S26 * 161S26* PURPOSE : SO - 2970 * 161S26* DESCRIPTION : FOR BGO AND BFFO PRODUCTS SUM OF STANDARD * 161S26* CAPACITY AND ADDITIONAL CAPACITY WILL BE * 161S26* DISPLAYED ON PRODUCT PROFILE AND FUTURE PRODUCT* 161S26* PROFILE SCREEN, SHELF CAP /SAFE COLUMN * 161S26***************************************************************** AVRS42* AUTHOR : RAMYA AV * AVRS42* DATE : 02/12/2016 * AVRS42* CCID : AVRS42 * AVRS42* PURPOSE : SO - 837 * AVRS42* DESCRIPTION : FORECASTING TO PROVIDE INPUTS USED IN DAILY * AVRS42* : K-FACTOR CALC * AVRS42* : KA/KB VALUES ARE NOW AVAILABLE ON ESP TABLE. * AVRS42* : HENCE REFERENCE OF INPUT FILE 12 I.E. CUSTOMER * AVRS42* : TREND HAS BEEN REMOVED. INPUT FILE11 REFERED * AVRS42* : FOR PRODUCT CO-EFFICIENT FACTOR IS EMPTY AND * AVRS42* : DEFAULT VALUES FROM PAR IS USED ALWAYS, HENCE * AVRS42* : FILE 11 HAS BEEN REMOVED * AVRS42* NOTE : ALL CODE WITH TAG AVRDEL SHOULD BE REMOVED ONCE * AVRS42* : TRAILS OF KA/KB ACTIVATION IS SUCCESSFULLY COMPL* AVRS42* : -ETED(PHASE 2) * AVRS42***************************************************************** KS2S45* AUTHOR : KAVITHA GANGADHAR * KS2S45* DATE : 20/01/2017 * KS2S45* CCID : KS2S45 * KS2S45* PURPOSE : SO-2995 * KS2S45* DESCRIPTION : CHANGED TO HAVE STORE GROUPING FOR BFFO SLOW * KS2S45* : SELLER LINES. * KS2S45***************************************************************** 171S47***************************************************************** 171S47* AUTHOR : NEHA TIKARYA * 171S47* DATE : 07/02/2017 * 171S47* CCID : 171S47 * 171S47* PURPOSE : SO-3158 * 171S47* DESCRIPTION : CHANGED TO HAVE STORE/PRODUCT GROUPING FOR BGO * 171S47* : SLOW SELLER LINES AND PAR SWITCH TO ON AND OFF * 171S47* : BGO2 SLOW SELLER FUNCTIONALITY * 171S47***************************************************************** ENVIRONMENT DIVISION. *--------------------* CONFIGURATION SECTION. 004900* COPY CONFCPY. 00490000 *--------------------* INPUT-OUTPUT SECTION. *--------------------* FILE-CONTROL. 005400 SELECT INPUT-FILE ASSIGN TO JLF30I01 00540000 005500 FILE STATUS IS FS01-INPUT. 00550000 024100 SELECT INPUT4-FILE ASSIGN TO JLF30I04 02410000 024200 FILE STATUS IS FS01-INPUT4. 02420000 035700 SELECT JLALRESV ASSIGN TO JLF30I05 03570003 035800 FILE STATUS IS JLALRESV-STATUS. 03580003 SELECT INPUT6-FILE ASSIGN TO JLF30I06 03570003 FILE STATUS IS FS01-INPUT6. 03580003 WIN06B SELECT JLDOTCOM ASSIGN TO JLF30I07 03570003 WIN06B FILE STATUS IS JLDOTCOM-STATUS. 03580003 WIN06A SELECT DOTCOM-SALES-FILE ASSIGN TO JLF30I08 FILE STATUS IS FS01-INPUT8. SELECT JLFOLKUP-FILE ASSIGN TO JLF30I09 FILE STATUS IS JLFOLKUP-STATUS. SELECT JLFOEXCP-FILE ASSIGN TO JLF30I10 FILE STATUS IS JLFOEXCP-STATUS. AVRDEL SELECT JLPRDCEF-FILE ASSIGN TO JLF30I11 AVRDEL FILE STATUS IS JLPRDCEF-STATUS. AVRDEL SELECT JLCSTRND-FILE ASSIGN TO JLF30I12 AVRDEL FILE STATUS IS JLCSTRND-STATUS. AVRS32 SELECT JLFOREFD-FILE ASSIGN TO JLF30I13 AVRS32 FILE STATUS IS JLFOREFD-STATUS. 005700 SELECT OUTPUT-FILE1 ASSIGN TO JLF30O01 00570000 005800 FILE STATUS IS FS01-OUTPUT. 00580000 005900 SELECT OUTPUT-FILE2 ASSIGN TO JLF30O02 00590000 006000 FILE STATUS IS FS02-OUTPUT. 00600000 006100 SELECT OUTPUT-FILE3 ASSIGN TO JLF30O03 00610000 006200 FILE STATUS IS FS03-OUTPUT. 00620000 006300 SELECT OUTPUT-FILE4 ASSIGN TO JLF30O04 00630000 006400 FILE STATUS IS FS04-OUTPUT. 00640000 006600 SELECT REJECT-FILE1 ASSIGN TO JLF30O05 00660000 006700 FILE STATUS IS FS01-REJECT. 00670000 006800 SELECT REJECT-FILE2 ASSIGN TO JLF30O06 00680000 006900 FILE STATUS IS FS02-REJECT. 00690000 018700 SELECT JLFODKSS-FILE ASSIGN TO JLF30O07 018800 FILE STATUS IS JLFODKSS-STATUS. 019500 SELECT JLFOEOOC-FILE ASSIGN TO JLF30O08 019600 FILE STATUS IS JLFOEOOC-STATUS. SELECT JLFODIAX-FILE ASSIGN TO JLF30O09 FILE STATUS IS JLFODIAX-STATUS. SUM11A SELECT JLFODIAH-FILE ASSIGN TO JLF30O10 SUM11A FILE STATUS IS JLFODIAH-STATUS. RD2S19 SELECT JLUNCCAL-FILE ASSIGN TO JLF30O11 RD2S19 FILE STATUS IS JLUNCCAL-STATUS. 007000 00700000 007100 00710000 DATA DIVISION. *-------------* FILE SECTION. *-------------* 007700 FD INPUT-FILE 00770000 007800 BLOCK CONTAINS 0 CHARACTERS 00780000 007900 LABEL RECORD IS STANDARD. 00790000 008200 00820000 008100 COPY JLFOFCST. 00810000 027600 FD INPUT4-FILE 02760000 027700 BLOCK CONTAINS 0 CHARACTERS 02770000 027800 LABEL RECORD IS STANDARD. 02780000 027900 02790000 01 JLF20-INPUT4-REC. 03830017 NJ2S35 COPY JLFOCNTL. 02810000 FD INPUT6-FILE 02760000 BLOCK CONTAINS 0 CHARACTERS 02770000 LABEL RECORD IS STANDARD. 02780000 COPY JLFOGAPS. 02810000 00570001 WIN06B FD JLDOTCOM 02760000 WIN06B BLOCK CONTAINS 0 CHARACTERS 02770000 WIN06B LABEL RECORD IS STANDARD. 02780000 WIN06B 02790000 WIN06A COPY JLDOTCOM. 02810000 00600001 WIN06A FD DOTCOM-SALES-FILE LABEL RECORDS ARE STANDARD RECORDING MODE IS F BLOCK CONTAINS 0 RECORDS. 00570001 COPY JLDTCMES. 00570001 00570001 FD JLFOEXCP-FILE LABEL RECORDS ARE STANDARD RECORDING MODE IS F BLOCK CONTAINS 0 RECORDS. 00570001 COPY JLFOEXCP. 00570001 00570001 FD JLFOLKUP-FILE LABEL RECORDS ARE STANDARD RECORDING MODE IS F BLOCK CONTAINS 0 RECORDS. 00570001 COPY JLFOLKUP. 00570001 00570001 AVRDEL FD JLPRDCEF-FILE AVRDEL LABEL RECORDS ARE STANDARD AVRDEL RECORDING MODE IS F AVRDEL BLOCK CONTAINS 0 RECORDS. AVRDEL AVRDEL COPY JKPRDCEF. AVRDEL AVRDEL FD JLCSTRND-FILE AVRDEL LABEL RECORDS ARE STANDARD AVRDEL RECORDING MODE IS F AVRDEL BLOCK CONTAINS 0 RECORDS. AVRDEL AVRDEL COPY JKCSTRND. AVRS32 FD JLFOREFD-FILE AVRS32 LABEL RECORDS ARE STANDARD AVRS32 RECORDING MODE IS F AVRS32 BLOCK CONTAINS 0 RECORDS. AVRS32 AVRS32 COPY JLFOREFD. 00570001 008800 FD OUTPUT-FILE1 00880000 BLOCK CONTAINS 0 RECORDS LABEL RECORDS OMITTED. 009200 01 JLF30-ORDER-FORECAST-FILE. 00920000 SG1 ********************************************************** ******** SG1 ********JLFORDER LAYOUT CHANGED TO REDUCE THE FILLER SIZE* ******** SG1 ********************************************************** ******** 009300 COPY JLFORDER. 00930000 009500 FD OUTPUT-FILE2 00950000 009600 BLOCK CONTAINS 0 RECORDS 00960000 009700 LABEL RECORDS OMITTED. 00970000 009800 00980000 009900 01 JLF30-ORDER-DIAGNOSTIC-FILE. 00990000 AVRS32 COPY JLFODIAG. 010100 01010000 010200 FD OUTPUT-FILE3 01020000 010300 BLOCK CONTAINS 0 RECORDS 01030000 010400 LABEL RECORDS OMITTED. 01040000 010500 01050000 010600 01 JLF30-ORDER-PRODPROF-FILE. 01060000 SG1 ********************************************************** ******** SG1 ********JLFOPROF LAYOUT CHANGED TO REDUCE THE FILLER SIZE* ******** SG1 ********************************************************** ******** 010700 COPY JLFOPROF. 01070000 010800 01080000 010900 FD OUTPUT-FILE4 01090000 011000 BLOCK CONTAINS 0 RECORDS 01100000 011100 LABEL RECORDS OMITTED. 01110000 011200 01120000 011300 01 JLF30-ALLOC-FORECAST-FILE. 01130000 SG1 ********************************************************** ******** SG1 ********JLFOALLO LAYOUT CHANGED TO REDUCE THE FILLER SIZE* ******** SG1 ********************************************************** ******** 011400 COPY JLFOALLO. 01140000 011500 01150000 011800 FD REJECT-FILE1 01180000 011900 BLOCK CONTAINS 0 RECORDS 01190000 012000 LABEL RECORDS OMITTED. 01200000 012100 01210000 SUM11A 01 JLF30-REJECT-FORECAST-FILE PIC X(145). 01220000 012300* COPY JLFOFCST. 01230000 012400 01240000 012500 FD REJECT-FILE2 01250000 012600 BLOCK CONTAINS 0 RECORDS 01260000 012700 LABEL RECORDS OMITTED. 01270000 012800 01280000 SPR11A 01 JLF30-REJECT-CONTROL-FILE PIC X(138). 01290000 013000* COPY JLFOCNTL. 01300000 013100 01310000 025100 FD JLFODKSS-FILE 025200 BLOCK CONTAINS 0 RECORDS 025300 LABEL RECORDS OMITTED. 025400 025500 01 JLF30-JLFODKSS-FILE. 025600 COPY JLFODKSS. 025700 FD JLFODIAX-FILE BLOCK CONTAINS 0 RECORDS LABEL RECORDS OMITTED. 026600 01 JLFOX-JLFODIAX-REC. NJ2S35 COPY JLFODIAX. SUM11A FD JLFODIAH-FILE SUM11A BLOCK CONTAINS 0 RECORDS SUM11A LABEL RECORDS OMITTED. 026600 SUM11A 01 JLFOH-JLFODIAH-REC. NJ2S35 COPY JLFODIAH. 026600 026700 FD JLFOEOOC-FILE 026800 BLOCK CONTAINS 0 RECORDS 026900 LABEL RECORDS OMITTED. 027900 027100 01 JLFOE-JLFOEOOC-FILE. 027200 COPY JLFOEOOC. 028200 048000 04800003 048100 FD JLALRESV 04810004 048200 RECORD CONTAINS 60 CHARACTERS 04820004 048300 BLOCK CONTAINS 0 RECORDS 04830003 048400 LABEL RECORDS ARE STANDARD. 04840004 048500 04850003 048600 COPY JLALRESV. 04860004 048700 04870000 RD2S19 FD JLUNCCAL-FILE RD2S19 BLOCK CONTAINS 0 RECORDS RD2S19 LABEL RECORDS OMITTED. RD2S19 RD2S19 COPY JLUNCCAL. 048700 04870000 WORKING-STORAGE SECTION. *-----------------------* 01 FS-STATUS. 05 FILLER PIC X(16) 013700 VALUE "FS-STATUS------>". 01370000 013900 05 FS01-INPUT PIC XX. 01390000 036300 05 FS01-INPUT4 PIC XX. 03630000 036400 88 EOF-INPUT4 VALUE "10". 03640000 05 FS01-INPUT6 PIC XX. 03630000 88 EOF-INPUT6 VALUE "10". 03640000 WIN06A 05 FS01-INPUT8 PIC XX. 03630000 88 EOF-INPUT8 VALUE "10". 03640000 05 JLFOLKUP-STATUS PIC XX. 03630000 88 EOF-JLFOLKUP VALUE "10". 03640000 05 JLFOEXCP-STATUS PIC XX. 03630000 88 EOF-JLFOEXCP VALUE "10". 03640000 014100 05 FS01-OUTPUT PIC XX. 01410000 014200 05 FS02-OUTPUT PIC XX. 01420000 014300 05 FS03-OUTPUT PIC XX. 01430000 014400 05 FS04-OUTPUT PIC XX. 01440000 014600 05 FS01-REJECT PIC XX. 01460000 014700 05 FS02-REJECT PIC XX. 01470000 027400 05 JLFODKSS-STATUS PIC XX. 029100 05 JLFOEOOC-STATUS PIC XX. 051000 05 JLALRESV-STATUS PIC XX. 05100004 WIN06B 05 JLDOTCOM-STATUS PIC XX. 05100004 05 JLFODIAX-STATUS PIC XX. 05100004 SUM11A 05 JLFODIAH-STATUS PIC XX. 05100004 RD2S19 05 JLUNCCAL-STATUS PIC XX. 05100004 AVRS32 05 JLFOREFD-STATUS PIC XX. AVRS32 88 NOT-EOF-JLFOREFD VALUE "00". AVRS32 88 EOF-JLFOREFD VALUE "10". 014900*---------------------------------------------------------------* 01490000 015000 01500000 015100 01 WA-ENDEVOR-FIELDS. 01510000 015200 05 ENDEVOR-FOOTPRINT-SUBSYSTEM-2 PIC X(2) VALUE "JL". 01520000 015300*---------------------------------------------------------------* 01530000 015400 01540000 01 WA-ACCUMULATORS. 05 FILLER PIC X(16) VALUE "WA-ACCUMULATORS>". 038800 05 WA01-RECS-INPUT PIC S9(9) COMP-3 VALUE +0. 03880001 038900 05 WA01-RECS-INPUT4 PIC S9(9) COMP-3 VALUE +0. 03890001 05 WA01-RECS-INPUT6 PIC S9(9) COMP-3 VALUE +0. 03890001 05 WA01-RECS-JLFOEXCP PIC S9(9) COMP-3 VALUE +0. 02110006 05 WA01-RECS-JLFOLKUP PIC S9(9) COMP-3 VALUE +0. 02110006 039100 05 WA01-RECS-OUTPUT1 PIC S9(9) COMP-3 VALUE +0. 03910001 039200 05 WA01-RECS-OUTPUT2 PIC S9(9) COMP-3 VALUE +0. 03920001 039300 05 WA01-RECS-OUTPUT3 PIC S9(9) COMP-3 VALUE +0. 03930001 039400 05 WA01-RECS-OUTPUT4 PIC S9(9) COMP-3 VALUE +0. 03940001 016500 01650000 039600 05 WA01-RECS-REJECT1 PIC S9(9) COMP-3 VALUE +0. 03960001 039700 05 WA01-RECS-REJECT2 PIC S9(9) COMP-3 VALUE +0. 03970001 039800 05 WA01-RECS-JLFODKSS PIC S9(9) COMP-3 VALUE +0. 03980001 039900 05 WA01-RECS-JLFOEOOC PIC S9(9) COMP-3 VALUE +0. 03990001 053400 05 WA01-RECS-JLALRESV PIC S9(9) COMP-3 VALUE +0. 05340004 05 WA01-RECS-JLFODIAX PIC S9(9) COMP-3 VALUE +0. 02110006 SUM11A 05 WA01-RECS-JLFODIAH PIC S9(9) COMP-3 VALUE +0. 02110006 RD2S19 05 WA01-RECS-JLUNCCAL PIC S9(9) COMP-3 VALUE +0. 02110006 AVRS32 05 WA01-RECS-JLFOREFD PIC S9(9) COMP-3 VALUE +0. WIN06B 05 WA01-RECS-JLDOTCOM PIC S9(9) COMP-3 VALUE +0. 05340004 WIN06A 05 WA01-DOTCOM-SALES PIC S9(9) COMP-3. 02110006 05 WA01-DOTCOM-SUBSTN PIC S9(9) COMP-3. 02110006 016800 01680000 016900 05 WA01-STORES-PROCESSED PIC S9(7) COMP-3 VALUE +0. 01690000 040200 05 WA01-PRODUCTS-PROCESSED PIC S9(9) COMP-3 VALUE +0. 04020001 040300 05 WA01-BSP-FETCHED PIC S9(9) COMP-3 VALUE +0. 04030001 SPR13A 05 WA01-ESP-FETCHED PIC S9(9) COMP-3 VALUE +0. 04030001 AUT07B 05 WA01-SFB-FETCHED PIC S9(9) COMP-3 VALUE +0. 04030001 040400 05 WA01-OLD-FETCHED PIC S9(9) COMP-3 VALUE +0. 04040001 041200 05 WA01-OLC-READ PIC S9(9) COMP-3 VALUE +0. 04120000 040500 05 WA01-ALL-FETCHED PIC S9(9) COMP-3 VALUE +0. 04050001 040600 05 WA01-ALP-FETCHED PIC S9(9) COMP-3 VALUE +0. 04060001 040800 05 WA01-BPR-FETCHED PIC S9(9) COMP-3 VALUE +0. 04080001 040900 05 WA01-BDL-FETCHED PIC S9(9) COMP-3 VALUE +0. 04090001 SUM13A 05 WA01-OLD-RP-FETCHED PIC S9(9) COMP-3 VALUE +0. 04090001 SUM13C 05 WA01-OJD-RP-FETCHED PIC S9(9) COMP-3 VALUE +0. 04090001 041000 05 WA01-OGP-FETCHED PIC S9(9) COMP-3 VALUE +0. 04100001 041100 05 WA01-ASF-FETCHED PIC S9(9) COMP-3 VALUE +0. 04110001 SPR08B 05 WA01-PTP-FETCHED PIC S9(9) COMP-3 VALUE +0. SPR10A 05 WA01-PTG-FETCHED PIC S9(9) COMP-3 VALUE +0. 041208*----- 27/03/2001 - GM ---------------------------------------* 04120800 041209 05 WA01-MMD-FETCHED PIC S9(9) COMP-3 VALUE +0. 04120900 041210*-------------------------------------------------------------* 04121000 CRV90B 05 WA01-DSF-FETCHED PIC S9(9) COMP-3 VALUE +0. 04120900 CRV10B 05 WA01-PRIMARY-OJD-FETCHED PIC S9(9) COMP-3 VALUE +0. 04120900 CRV10B 05 WA01-SECONDARY-OJD-FETCHED PIC S9(9) COMP-3 VALUE +0. 04120900 CRAUTA 05 WA01-SOO-READ PIC S9(9) COMP-3 VALUE +0. 04120900 CRAUTA 05 WA01-SOP-READ PIC S9(9) COMP-3 VALUE +0. 04120900 SUM10A 05 WA01-OJX-READ PIC S9(9) COMP-3 VALUE +0. 04120900 SUM11A 05 WA01-OJG-READ PIC S9(9) COMP-3 VALUE +0. 04120900 SUM11A 05 WA01-PPD-READ PIC S9(9) COMP-3 VALUE +0. 04120900 SPR12A 05 WA01-PTG-STORE-COUNT PIC S9(9) COMP-3 VALUE +0. SUM10B 05 WA01-OLD-REVSD-QTY-SUM PIC S9(9) COMP-3 VALUE +0. 04030001 SUM10B 05 WA01-OLC-PICK-QTY-SUM PIC S9(9) COMP-3 VALUE +0. 04030001 SUM12A 05 WA01-XSA-NIA-FETCHED PIC S9(9) COMP-3 VALUE +0. SPR13A 05 WA01-XSB-RSC-FETCHED PIC S9(9) COMP-3 VALUE +0. TA1226 05 WA01-XSB-RST-FETCHED PIC S9(9) COMP-3 VALUE +0. SPR14A 05 WA01-RDD-FETCHED PIC S9(9) COMP-3 VALUE +0. SPR14A 05 WA01-RDT-FETCHED PIC S9(9) COMP-3 VALUE +0. TA1226 05 WA01-XSB-STACK-FETCHED PIC S9(9) COMP-3 VALUE +0. 04350001 017800 01780000 055410 05 WA01-MM-RSVE-CURSOR-ROW-COUNT PIC S9(9) COMP VALUE +0. 05541006 055420 05 WA01-BD-RSVE-CURSOR-ROW-COUNT PIC S9(9) COMP VALUE +0. 05542006 055500 05550000 041300 05 WA01-NO-OF-CASES PIC S9(7) COMP-3 VALUE +0. 04130001 041400 05 WA01-NO-OF-ZERO-ORDERS PIC S9(7) COMP-3 VALUE +0. 04140001 041500 05 WA01-NO-OF-PRIORITY1 PIC S9(7) COMP-3 VALUE +0. 04150001 041600 05 WA01-NO-OF-PRIORITY2 PIC S9(7) COMP-3 VALUE +0. 04160001 041800 05 WA01-NO-OF-PRIORITY3 PIC S9(7) COMP-3 VALUE +0. 04180001 041900 05 WA01-NO-OF-PRIORITY4 PIC S9(7) COMP-3 VALUE +0. 04190001 042100 05 WA01-NO-OF-OOT PIC S9(7) COMP-3 VALUE +0. 04210001 018400 01840000 042300 05 WA01-NO-OF-CALC-METH-1 PIC S9(7) COMP-3 VALUE +0. 04230001 042400 05 WA01-NO-OF-CALC-METH-2 PIC S9(7) COMP-3 VALUE +0. 04240001 042500 05 WA01-NO-OF-CALC-METH-3 PIC S9(7) COMP-3 VALUE +0. 04250001 042600 05 WA01-NO-OF-CALC-METH-4 PIC S9(7) COMP-3 VALUE +0. 04260001 042700 05 WA01-NO-OF-CALC-METH-5 PIC S9(7) COMP-3 VALUE +0. 04270001 042800 05 WA01-NO-OF-CALC-METH-6 PIC S9(7) COMP-3 VALUE +0. 04280001 042900 05 WA01-NO-OF-CALC-METH-7 PIC S9(7) COMP-3 VALUE +0. 04290001 043000 05 WA01-NO-OF-CALC-METH-8 PIC S9(7) COMP-3 VALUE +0. 04300001 043100 05 WA01-NO-OF-CALC-METH-9 PIC S9(7) COMP-3 VALUE +0. 04310001 043300 05 WA01-NO-OF-CALC-METH-A PIC S9(7) COMP-3 VALUE +0. 04330001 043400 05 WA01-NO-OF-CALC-METH-B PIC S9(7) COMP-3 VALUE +0. 04340001 043500 05 WA01-NO-OF-CALC-METH-C PIC S9(7) COMP-3 VALUE +0. 04350001 CRV10B 05 WA01-NO-OF-CALC-METH-D PIC S9(7) COMP-3 VALUE +0. 04350001 CRV10B 05 WA01-NO-OF-CALC-METH-E PIC S9(7) COMP-3 VALUE +0. 04350001 CRV10C 05 WA01-NO-OF-CALC-METH-F PIC S9(7) COMP-3 VALUE +0. 04350001 CRAUTA 05 WA01-NO-OF-CALC-METH-I PIC S9(7) COMP-3 VALUE +0. 04350001 SUM11A 05 WA01-NO-OF-CALC-METH-Y PIC S9(7) COMP-3 VALUE +0. 04350001 SUM11A 05 WA01-NO-OF-CALC-METH-Z PIC S9(7) COMP-3 VALUE +0. 04350001 142S02 05 WA01-NO-OF-CALC-METH-P PIC S9(7) COMP-3 VALUE +0. 04350001 142S02 05 WA01-NO-OF-CALC-METH-O PIC S9(7) COMP-3 VALUE +0. 04350001 018420*---------------------------------------------------------------* 01842033 018420 01842033 018500 01 WF-CONSTANTS. 01850000 018600 05 FILLER PIC X(16) 01860000 018700 VALUE "WF-CONSTANTS--->". 01870000 018800 01880000 018900 05 WF01-JL0F32 PIC X(6) VALUE "JL0F32". 01890000 018900 05 WF01-JL0F26 PIC X(8) VALUE "JL0F26 ". 01890000 019000 01900000 019100 05 WF01-PROGRAM-ID PIC X(6) VALUE "JL0F30". 01910000 019200 05 WF01-JLF30I01 PIC X(8) VALUE "JLF30I01". 01920000 05 WF01-JLF30I02 PIC X(8) VALUE "JLF30I02". 01920000 05 WF01-JLF30I03 PIC X(8) VALUE "JLF30I03". 01920000 044800 05 WF01-JLF30I04 PIC X(8) VALUE "JLF30I04". 04480000 059200 05 WF01-JLF30I05 PIC X(8) VALUE "JLF30I05". 05920004 05 WF01-JLF30I06 PIC X(8) VALUE "JLF30I06". 05920004 WIN06B 05 WF01-JLF30I07 PIC X(8) VALUE "JLF30I07". 05920004 WIN06A 05 WF01-JLF30I08 PIC X(8) VALUE "JLF30I08". 05920004 05 WF01-JLF30I09 PIC X(8) VALUE "JLF30I09". 05920004 05 WF01-JLF30I10 PIC X(8) VALUE "JLF30I10". 05920004 AVRS32 05 WF01-JLF30I13 PIC X(8) VALUE "JLF30I13". 019300 05 WF01-JLF30O01 PIC X(8) VALUE "JLF30O01". 01930000 019400 05 WF01-JLF30O02 PIC X(8) VALUE "JLF30O02". 01940000 019500 05 WF01-JLF30O03 PIC X(8) VALUE "JLF30O03". 01950000 019600 05 WF01-JLF30O04 PIC X(8) VALUE "JLF30O04". 01960000 019700 05 WF01-JLF30O05 PIC X(8) VALUE "JLF30O05". 01970000 019800 05 WF01-JLF30O06 PIC X(8) VALUE "JLF30O06". 01980000 033800 05 WF01-JLF30O07 PIC X(8) VALUE "JLF30O07". 035800 05 WF01-JLF30O08 PIC X(8) VALUE "JLF30O08". 05 WF01-JLF30O09 PIC X(8) VALUE "JLF30O09". SUM11A 05 WF01-JLF30O10 PIC X(8) VALUE "JLF30O10". RD2S19 05 WF01-JLF30O11 PIC X(8) VALUE "JLF30O11". CRAUT3 05 WF01-ORDCALC PIC X(7) VALUE "ORDCALC". 019900 05 WF01-VXJJ0BSP PIC X(8) VALUE "VXJJ0BSP". 01990000 SPR13A 05 WF01-VXJJ0ESP PIC X(8) VALUE "VXJJ0ESP". 01990000 AUT07B 05 WF01-VXJJ0SFB PIC X(8) VALUE "VXJJ0SFB". 01990000 020000 05 WF01-VXJJ0OLD PIC X(8) VALUE "VXJJ0OLD". 02000000 046500 05 WF01-VXJJ0OLC PIC X(8) VALUE "VXJJ0OLC". 04650000 020100 05 WF01-VXJJ0ALL PIC X(8) VALUE "VXJJ0ALL". 02010000 020200 05 WF01-VXJJ0ALP PIC X(8) VALUE "VXJJ0ALP". 02020000 020400 05 WF01-VXJJ0BPR PIC X(8) VALUE "VXJJ0BPR". 02040000 020500 05 WF01-VXJJ0BDL PIC X(8) VALUE "VXJJ0BDL". 02050000 034600 05 WF01-VXJJ0OGP PIC X(8) VALUE "VXJJ0OGP". 020600 05 WF01-VXJJ0PAR PIC X(8) VALUE "VXJJ0PAR". 02060000 036800 05 WF01-VXJJ0ASF PIC X(8) VALUE "VXJJ0ASF". 020700 05 WF01-JL0F40 PIC X(8) VALUE "JL0F40". 02070000 046510*----- 27/03/2001 - GM ---------------------------------------* 04651000 046520 05 WF01-VXJJ0MMD PIC X(8) VALUE "VXJJ0MMD". 04652000 046521*-------------------------------------------------------------* 04652100 CRV90B 05 WF01-VXJJ0DSF PIC X(8) VALUE "VXJJ0DSF". 04652000 CRV10B 05 WF01-VXJJ1OJD PIC X(8) VALUE "VXJJ1OJD". 04652000 CRV10B 05 WF01-VXJJ2OJD PIC X(8) VALUE "VXJJ2OJD". 04652000 CRAUT3 05 WF01-VXJJ0SOO PIC X(8) VALUE "VXJJ0SOO". 04652000 CRAUT3 05 WF01-VXJJ0SOP PIC X(8) VALUE "VXJJ0SOP". 04652000 SUM10A 05 WF01-VXJJ0OJX PIC X(8) VALUE "VXJJ0OJX". 04652000 SUM11A 05 WF01-VXJJ0OJG PIC X(8) VALUE "VXJJ0OJG". 04652000 SUM11A 05 WF01-VXJJ0PPD PIC X(8) VALUE "VXJJ0PPD". 04652000 020800 02080000 020900 03 WF01-CO-LVL-CONTROLS. 02090000 021000 05 WF01-CO-LVL-CNTL. 02100000 021100 07 WF01-CO-LVL-CNTLS PIC S9(3) VALUE +0. 02110000 021200 07 FILLER PIC X(247). 02120000 021300 05 WF01-SDEVSAFE PIC S9(3) VALUE +0. 02130000 021400 05 WF01-MDEVSAFE PIC S9(3) VALUE +0. 02140000 021500 05 WF01-LDEVSAFE PIC S9(3) VALUE +0. 02150000 021600 05 WF01-PROMSAFE PIC S9(3) VALUE +0. 02160000 022300 05 WF01-NSFRDCAS PIC S9(3) VALUE +0. 02230000 022400 05 WF01-OOTCHECK PIC S9(3) VALUE +0. 02240000 022500 05 WF01-CAPCHECK PIC S9(3) VALUE +0. 02250000 022600*----- 19/06/2000 --------------------------------------------* 02260000 022600 05 WF01-DEMTOPS1 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-DEMTOPS2 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-DEMTOPS3 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-DEMTOPS4 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-DEMTOPS5 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-DEMTOPS6 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-DEMTOPS7 PIC S9(3) VALUE +0. 02260000 038900 05 WF01-EXPDATAM PIC S9(3) VALUE +0. 039000 05 WF01-EXPDATPM PIC S9(3) VALUE +0. 039000 05 WF01-CCAPPC PIC S9(3) VALUE +0. 039000 05 WF01-OCMEDDAY PIC S9(3) VALUE +0. 039000 05 WF01-OCMEDCAP PIC S9(3) VALUE +0. 039000 05 WF01-ABSMINSS PIC S9(3) VALUE +0. PP2S05 05 WF01-BGOMAXCS PIC S9(3) VALUE +0. SM2S13 05 WF01-BGOMOE PIC S9(3) VALUE +0. PP2S13 05 WF01-OFFUKMAX PIC S9(3) VALUE +0. SUM13A 05 WF01-PROCTRAP. 02100000 SUM13A 07 WF01-PROCTRAP-CTRL PIC X(8) VALUE SPACES. 02110000 SUM13A 07 FILLER PIC X(242). 02120000 021000 05 WF01-EXCL-WASTE-TM. 02100000 021100 07 WF01-EXCLWSTM PIC 9(8) VALUE 0. 02110000 021200 07 FILLER PIC X(242). 02120000 PS2S11 05 WF01-OFUGRID-KEY. 02100000 PS2S11 07 WF01-OFUGRID PIC X(7) VALUE "OFUGRID". 02110000 PS2S11 07 WF01-STREAM PIC X. 02120000 AVRS42 05 WF01-NEWKFAC-KEY. AVRS42 07 WF01-NEWKFAC PIC X(7) VALUE "NEWKFAC". AVRS42 07 WF01-STRM PIC X. KS2S45 05 WF01-SLOWSEL-KEY. KS2S45 07 WF01-SLOWSEL PIC X(7) VALUE "SLOWSEL". KS2S45 07 WF01-STREM PIC X. 171S47 05 WF01-BGO-SLOWSEL-KEY. 171S47 07 WF01-BGO-SLOWSEL PIC X(8). 171S47 05 WF01-BGO-SLOWSEL-PAR-DATA PIC X(1). 161S21 05 WF01-SMFO-RESV-ALLOC-X. 161S21 07 WF01-SMFO-RESV-ALLOC-KEY PIC X. 161S21 07 FILLER PIC X(249). 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 022600 05 WF01-TI-COR0 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR1 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR2 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR3 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR4 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR5 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR6 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR7 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR8 PIC S9(3) VALUE +0. 02260000 022600 05 WF01-TI-COR9 PIC S9(3) VALUE +0. 02260000 022600*-------------------------------------------------------------* 02260000 CRV10B 05 WF01-OUP2MDD PIC S9(3) VALUE +0. CRV10B 05 WF01-TIRNDEFF PIC S9(3) VALUE +0. CRV10C 05 WF01-LEADTIMES. 02100000 CRV10C 07 WF01-CONTDATA PIC S9(3) VALUE +0. 02260000 CRV10C 07 FILLER PIC X(01) VALUE SPACES. 02120000 CRV10C 02120000 CRV10C 07 WF01-LEADTIME-TAB OCCURS 30. 02120000 CRV10C 02120000 CRV10C 09 WF01-ORDER-GROUP PIC X(02) VALUE SPACES. 02120000 CRV10C 09 WF01-LEADTIME PIC S9(3) VALUE +0. 02120000 05 WF01-OPT-ORDER-CAL-X. 02100000 07 WF01-OPT-ORDER-CAL PIC S9V99. 02110000 07 FILLER PIC X(245). 02120000 05 WF01-K-FACTOR-X. 02100000 07 WF01-K-FACTOR PIC S999V99. 02110000 07 FILLER PIC X(243). 02120000 01047100 SUM09A 05 WF01-MIN-SALES-THRESHOLD-X. 01048000 SUM09A 07 WF01-MIN-SALES-THRESHOLD 01049000 SUM09A PIC S9(5)V9(2). 01050000 SUM09A 07 FILLER PIC X(246). 01051000 SUM09A 05 WF01-ROTTYPE-X. 01052000 SUM09A 07 WF01-ROTTYPE PIC X(3). 01053000 SUM09A 07 FILLER PIC X(247). 01054000 05 WF01-OPT-ORDER-HRS-X. 02100000 07 WF01-OPT-ORDER-HRS PIC 99. 02110000 07 FILLER PIC X(248). 02120000 SUM10A 05 WF01-BFFOFCST-X. 01052000 SUM10A 07 WF01-BFFOFCST PIC X(3). 01053000 SUM10A 07 FILLER PIC X(247). 01054000 SUM11A 05 WF01-BGOCALC-X. 01052000 SUM11A 07 WF01-BGOCALC PIC X(6). 01053000 SUM11A 07 FILLER PIC X(244). 01054000 SUM13B 05 WF01-RPKCALC. 01052000 SUM13B 07 WF01-RPKCALC-X OCCURS 12 TIMES. 01053000 SUM13A 08 WF01-RPKCALC-COLLID-X PIC X. 01054000 SUM13A 08 WF01-RPKCALC-OC-X PIC X. 01054000 SUM13A 08 WF01-RPKCALC-OF-X PIC X. 01054000 SUM13B 07 FILLER PIC X(214). 01053000 SUM11A 05 WF01-BGOLEADTM-X. 01052000 SUM11A 07 WF01-BGOLEADTM PIC 9(3). 01053000 SUM11A 07 FILLER PIC X(247). 01054000 SUM11A 05 WF01-BGOMINGP-X. 01052000 SUM11A 07 WF01-BGOMINGP PIC 9(3). 01053000 SUM10A 07 FILLER PIC X(247). 01054000 SPR12A 05 WF01-BFFODS-X. 01052000 SPR12A 07 WF01-BFFODS PIC S9(1)V9(4). 01053000 SPR12A 07 FILLER PIC X(245). 01054000 SPR12A 05 WF01-BFFOFEAF-X. 01052000 SPR12A 07 WF01-BFFOFEAF PIC S9(1)V9(2). 01053000 SPR12A 07 FILLER PIC X(247). 01054000 SPR12A 05 WF01-BFFO1TCH-X. 01052000 SPR12A 07 WF01-BFFO1TCH PIC S9(1)V9(4). 01053000 SPR12A 07 FILLER PIC X(245). 01054000 SPR08B 05 WF01-MIDDAY PIC X(8) VALUE "12.00.00". SPR11A 05 WF01-PROCESS-IND-Y PIC X(1) VALUE "Y". SPR11A 05 WF01-PROCESS-IND-M PIC X(1) VALUE "M". SPR11A 05 CURR-DTCM-PRCS-IND PIC X(1) VALUE "N". 08840000 SPR11A 05 PREV-DTCM-PRCS-IND PIC X(1) VALUE "N". 08840000 SPR14A 05 WF01-PTRDNDAY-X. SPR14A 07 WF01-PTRDNDAY PIC 9(3). SPR14A 07 FILLER PIC X(247). SPR14A 05 WF01-PER PIC 9(3) VALUE 100. KFACTR 05 WF01-ZERO-KFACT PIC S999V99 COMP-3 VALUE ZERO. 068200/ 06820000 PS2S11 05 WF01-OFUGRID-SWITCH. 01052000 PS2S11 07 WF01-OFUGRID-IND PIC X(2). 01053000 PS2S11 07 FILLER PIC X(248). 01054000 AVRS42 05 WF01-K-FACT-TRAIL. AVRS42 07 WF01-KA-TRAIL-IND PIC X(1). AVRS42 07 FILLER PIC X(249). KS2S45 05 WF01-SLOWSEL-TRAIL. KS2S45 07 WF01-SLOWSEL-IND PIC X(1). KS2S45 07 FILLER PIC X(249). 068300******************************************************************06830000 068400* HOST VARIABLES. *06840000 068500******************************************************************06850000 068600 06860000 TA1226 01 WH-BGO2-SHELF. 06900004 TA1226 03 WH-CR-PART-NO PIC X(2). 06910004 TA1226 03 WH-RO-NO PIC S9(5) COMP-3. 06920004 TA1226 03 WH-SG-CD PIC X(5). 06930004 TA1226 03 WH-BPR-TPN PIC S9(9) COMP-3. 06930004 TA1226 03 WH-BGO-EXP-STEP-EFF-DT PIC X(10). 06940004 TA1226 03 WH-BGO-EXP-STEP-END-DT PIC X(10). 06950004 TA1226 03 WH-STEP-DATE PIC X(10). 06950004 TA1226 03 WH-STEP-PLUS21-DATE PIC X(10). 06950004 TA1226 03 WH-BGO-OFFER-SHELF-CAP PIC S9(4) COMP. 06960004 TA1226 03 WH-BGO-OFFER-CAP-NULL PIC S9(4) COMP VALUE 0. 07010029 TA1226 03 WH-BGO-PRE-OFFER-DEL-DATE PIC X(10). 06960004 TA1226 03 WH-BGO-OFFER-DATE-NULL PIC S9(4) COMP VALUE 0. 07010029 068700* THIS DATA GROUP HOLDS THE HOST VARIABLES RETURNED FROM THE 06870004 068800* BD_RSVE_CURSOR CURSOR. 06880004 068900 06890004 069000 01 WH01-BD-RSVE-CURSOR-ROW. 06900004 069100 03 WH01-CR-PART-NO PIC X(2). 06910004 069200 03 WH01-RO-NO PIC S9(5) COMP-3. 06920004 069300 03 WH01-BPR-TPN PIC S9(9) COMP-3. 06930004 069400 03 WH01-RSVE-EFFV-DT PIC X(10). 06940004 069500 03 WH01-RSVE-END-DT PIC X(10). 06950004 069600 03 WH01-ALLOC-PATTERN PIC X(5). 06960004 070100 03 WH01-APPORTION-IND PIC X(1). 07010029 069700 06970000 SPR08B 01 WH02-PTP-ROW. SPR08B 03 WH02-CR-PART-NO PIC X(2). SPR08B 03 WH02-RETAIL-OUTLET-NO PIC S9(5) COMP-3. SPR08B 03 WH02-BASE-PRODUCT-NO PIC S9(9) COMP-3. SPR08B 03 WH02-PTP-YRWK PIC X(6). SPR08B 03 WH02-CURR-SG-CD-1 PIC X(5). SPR08B 03 WH02-CURR-SG-CD-2 PIC X(5). SPR08B 03 WH02-CURR-SG-CD-3 PIC X(5). SPR08B 03 WH02-CURR-SG-CD-4 PIC X(5). SPR08B 03 WH02-CURR-SG-CD-5 PIC X(5). PS2S11 03 WH03-CURR-SG-CD-1 PIC X(5). PS2S11 03 WH03-CURR-SG-CD-2 PIC X(5). PS2S11 03 WH03-CURR-SG-CD-3 PIC X(5). PS2S11 03 WH03-CURR-SG-CD-4 PIC X(5). PS2S11 03 WH03-CURR-SG-CD-5 PIC X(5). SPR10A 03 WH02-PREV-PTP-YRWK PIC X(6). SPR10A 03 WH02-PREV-PTG-YRWK PIC X(6). 069700 06970000 SPR12A 01 WH03-PTG-EXISTENCE-CHECK. SPR12A 03 WH03-PTP-TESCO-YEAR1 PIC X(4). SPR12A 03 WH03-PTP-TESCO-WEEK1 PIC X(2). SPR12A 03 WH03-PTP-TESCO-YEAR2 PIC X(4). SPR12A 03 WH03-PTP-TESCO-WEEK2 PIC X(2). SPR12A 03 WH03-PTP-TESCO-YEAR3 PIC X(4). SPR12A 03 WH03-PTP-TESCO-WEEK3 PIC X(2). SPR12A 03 WH03-PTP-TESCO-YEAR4 PIC X(4). SPR12A 03 WH03-PTP-TESCO-WEEK4 PIC X(2). 069700 06970000 SPR14A 01 WH04-REQ-DEL-DATE PIC X(10). SPR14A 01 WH04-PREV-REQ-DEL-DATE PIC X(10). 069800/ 06980000 069900******************************************************************06990000 070000* INDICATOR VARIABLES. *07000000 070100******************************************************************07010000 070200 07020000 022800 01 WI-FLAGS. 02280000 05 F PIC X(16) 023000 VALUE "WI-FLAGS------->". 02300000 023100 05 WI01-END-OF-INPUT PIC X(01). 02310000 023200 88 END-OF-INPUT VALUE "Y". 02320000 023300 88 NOT-END-OF-INPUT VALUE "N". 02330000 TA1226 05 WI01-END-OF-SHELF PIC X(01). 02310000 TA1226 88 END-OF-SHELF VALUE "Y". 02320000 TA1226 88 NOT-END-OF-SHELF VALUE "N". 02330000 TA1226 05 WI01-XSB-RST-STATUS PIC X(01). 01410065 TA1226 88 XSB-RST-OPEN VALUE "O". 01420065 TA1226 88 XSB-RST-CLOSED VALUE "C". 01430065 TA1226 05 WI01-END-OF-XSB-RST PIC X(01). 01440065 TA1226 88 END-XSB-RST VALUE "Y". 01450065 TA1226 88 NOT-END-XSB-RST VALUE "N". 01460065 TA1226 05 WI01-XSB-STACK-STATUS PIC X(01). 01410065 TA1226 88 XSB-STACK-OPEN VALUE "O". 01420065 TA1226 88 XSB-STACK-CLOSED VALUE "C". 01430065 TA1226 05 WI01-END-XSB-STACK PIC X(01). 02310000 TA1226 88 END-XSB-STACK VALUE "Y". 02320000 TA1226 88 NOT-END-XSB-STACK VALUE "N". 02330000 SUM14A 05 WI-GRP-EXISTS-IND PIC X. SUM14A 88 WI-GRP-EXISTS VALUE "Y". SUM14A 88 WI-GPH-NOT-EXISTS VALUE "N". PS2S11 05 WI-GRP-EXISTS-OFU-IND PIC X. PS2S11 88 WI-GRP-EXISTS-OFU VALUE "Y". PS2S11 88 WI-GPH-NOT-EXISTS-OFU VALUE "N". KS2S45 05 WI-SLOW-STORE-EXISTS PIC X. KS2S45 88 WI-SLOW-EXISTS VALUE "Y". KS2S45 88 WI-SLOW-NOT-EXISTS VALUE "N". 171S47 05 WI-BSLOW-STORE-EXISTS PIC X. 171S47 88 WI-BSLOW-EXISTS VALUE "Y". 171S47 88 WI-BSLOW-NOT-EXISTS VALUE "N". AVRS42 05 WI-STORE-EXISTS-IND PIC X. AVRS42 88 WI-STO-EXISTS VALUE "Y". AVRS42 88 WI-STO-NOT-EXISTS VALUE "N". AVRS42 05 WI-REP-EXISTS-IND PIC X. AVRS42 88 WI-REP-EXISTS VALUE "Y". AVRS42 88 WI-REP-NOT-EXISTS VALUE "N". SUM14A 05 WI-EXISTS-IND PIC X. SUM14A 88 WI-EXISTS VALUE "Y". SUM14A 88 WI-NOT-EXISTS VALUE "N". 142S03 142S03 05 WI-SGZ-EXISTS-IND PIC X. 142S03 88 WI-SGZ-EXISTS VALUE "Y". 142S03 88 WI-SGZ-NOT-EXISTS VALUE "N". 142S03 PS2S11 05 WI-SGZ-EXISTS-OFU-IND PIC X. PS2S11 88 WI-SGZ-OFU-EXISTS VALUE "Y". PS2S11 88 WI-SGZ-OFU-NOT-EXISTS VALUE "N". 142S03 142S03 05 WI-ROZ-EXISTS-IND PIC X. 142S03 88 WI-ROZ-EXISTS VALUE "Y". 142S03 88 WI-ROZ-NOT-EXISTS VALUE "N". 023500 05 WI01-BSP-STATUS PIC X(01). 02350000 023600 88 BSP-SFB-OPEN VALUE "O". 02360000 023700 88 BSP-SFB-CLOSED VALUE "C". 02370000 023800 05 WI01-END-OF-BSP PIC X(01). 02380000 023900 88 END-BSP-SFB VALUE "Y". 02390000 024000 88 NOT-END-BSP-SFB VALUE "N". 02400000 024100 05 WI01-MISSING-BSP PIC X(01). 02410000 024200 88 MISSING-BSP VALUE "Y". 02420000 024300 88 NOT-MISSING-BSP VALUE "N". 02430000 024500 05 WI01-ALP-STATUS PIC X(01). 02450000 024600 88 ALP-OPEN VALUE "O". 02460000 024700 88 ALP-CLOSED VALUE "C". 02470000 024800 05 WI01-END-OF-ALP PIC X(01). 02480000 024900 88 END-ALP VALUE "Y". 02490000 025000 88 NOT-END-ALP VALUE "N". 02500000 025100 05 WI01-MISSING-ALP PIC X(01). 02510000 025200 88 MISSING-ALP VALUE "Y". 02520000 025300 88 NOT-MISSING-ALP VALUE "N". 02530000 025500 05 WI01-BDL-STATUS PIC X(01). 02550000 025600 88 BDL-OPEN VALUE "O". 02560000 025700 88 BDL-CLOSED VALUE "C". 02570000 025800 05 WI01-END-OF-BDL PIC X(01). 02580000 025900 88 END-BDL VALUE "Y". 02590000 026000 88 NOT-END-BDL VALUE "N". 02600000 SUM13A 05 WI01-OLD-RP-STATUS PIC X(01). 02550000 SUM13A 88 OLD-RP-OPEN VALUE "O". 02560000 SUM13A 88 OLD-RP-CLOSED VALUE "C". 02570000 SUM13A 05 WI01-END-OF-OLD-RP PIC X(01). 02580000 SUM13A 88 END-OLD-RP VALUE "Y". 02590000 SUM13A 88 NOT-END-OLD-RP VALUE "N". 02600000 SUM13C 05 WI01-OJD-RP-STATUS PIC X(01). 02550000 SUM13C 88 OJD-RP-OPEN VALUE "O". 02560000 SUM13C 88 OJD-RP-CLOSED VALUE "C". 02570000 SUM13C 05 WI01-END-OF-OJD-RP PIC X(01). 02580000 SUM13C 88 END-OJD-RP VALUE "Y". 02590000 SUM13C 88 NOT-END-OJD-RP VALUE "N". 02600000 026100 05 WI01-MISSING-BDL PIC X(01). 02610000 026200 88 MISSING-BDL VALUE "Y". 02620000 026300 88 NOT-MISSING-BDL VALUE "N". 02630000 026310 05 WI01-BDL-DEV-LINE-ENDT-NN PIC S9(4) COMP VALUE 0. 02631000 026320 88 BDL-DEV-LINE-ENDT-NU VALUE -1. 02632000 CRV10B 05 WI01-OJD-ORD-QTY-NN PIC S9(4) COMP VALUE 0. CRV10B 88 OJD-ORD-QTY-NN VALUE -1. CRSUPP 05 WI01-SOO-ORD-CASES-NN PIC S9(4) COMP VALUE 0. 88 SOO-ORD-CASES-NN VALUE +0. 88 SOO-ORD-CASES-NULL VALUE -1. SUM10A 05 WI01-OJX-PROCUREMENT-SIGMA-NN SUM10A PIC S9(4) COMP VALUE 0. SUM10A 88 OJX-PROCUREMENT-SIGMA-NN SUM10A VALUE +0. SUM10A 88 OJX-PROCUREMENT-SIGMA-NULL SUM10A VALUE -1. SUM11A 05 WI01-OJG-PROCUREMENT-SIGMA-NN SUM11A PIC S9(4) COMP VALUE 0. SUM11A 88 OJG-PROCUREMENT-SIGMA-NN SUM11A VALUE +0. SUM11A 88 OJG-PROCUREMENT-SIGMA-NULL SUM11A VALUE -1. SUM11A SUM11A 05 WI01-DEFAULT-LDTM-X PIC X(1). SUM11A 88 DEFAULT-LDTM VALUE "Y". SUM11A 88 NO-DEFAULT-LDTM VALUE "N". SUM11A SUM11A 05 WI01-FIRST-D PIC X(1). SUM11A 88 FIRST-D-FOUND VALUE "Y". SUM11A 88 FIRST-D-NOT-FOUND VALUE "N". SUM11A SUM11A 05 WI01-FIRST-D-FILLUP PIC X(1). SUM11A 88 FIRST-FILLUP-FOUND VALUE "Y". SUM11A 88 FIRST-FILLUP-NOT-FOUND VALUE "N". SUM11A SUM10B 05 WI01-OLD-DATE-CHANGE PIC X(01). SUM10B 88 OLD-DATE-CHANGE VALUE "Y". SUM10B 88 NO-OLD-DATE-CHANGE VALUE "N". SUM10B 05 WI01-PERFORM-LOOP PIC X(01). SUM10B 88 PERFORM-LOOP VALUE "Y". SUM10B 88 END-PERFORM-LOOP VALUE "N". SUM10B 05 WI01-OLC-MATCH-FOUND PIC X(01). SUM10B 88 OLC-MATCH-FOUND VALUE "Y". SUM10B 88 NO-OLC-MATCH-FOUND VALUE "N". SUM10B 05 WI01-END-OF-INNER-LOOP PIC X(01). SUM10B 88 END-OF-INNER-LOOP VALUE "Y". SUM10B 88 NO-END-OF-INNER-LOOP VALUE "N". SUM10B 05 WI01-REM-QTY-PROCESSED PIC X(01). SUM10B 88 REM-QTY-PROCESSED VALUE "Y". SUM10B 88 NO-REM-QTY-PROCESSED VALUE "N". SUM10B 05 WI01-FIRST-TIME-PROCESS PIC X(01). SUM10B 88 FIRST-TIME-PROCESS VALUE "Y". SUM10B 88 NO-FIRST-TIME-PROCESS VALUE "N". SUM10B 05 WI01-ADJUST-VALUE-FND PIC X(01). SUM10B 88 ADJUST-VALUE-FND VALUE "Y". SUM10B 88 NO-ADJUST-VALUE-FND VALUE "N". SUM10C 05 WI01-DIFF-VALUE-FND PIC X(01). SUM10C 88 DIFF-VALUE-FND VALUE "Y". SUM10C 88 NO-DIFF-VALUE-FND VALUE "N". 026340 05 WI01-OLD-STATUS PIC X(01). 02634000 026350 88 OLD-OPEN VALUE "O". 02635000 026360 88 OLD-CLOSED VALUE "C". 02636000 SUM10B 05 WI01-OLC-STATUS PIC X(01). 02634000 SUM10B 88 OLC-OPEN VALUE "O". 02635000 SUM10B 88 OLC-CLOSED VALUE "C". 02636000 SPR11B 05 WI01-REVSD-OLD-QTY-NN PIC S9(4) COMP VALUE 0. SPR11B 88 OLD-REVSD-QTY-NN VALUE -1. 026370 05 WI01-END-OF-OLD PIC X(01). 02637000 026380 88 END-OLD VALUE "Y". 02638000 026390 88 NOT-END-OLD VALUE "N". 02639000 026400 05 WI01-MISSING-OLD PIC X(01). 02640000 026500 88 MISSING-OLD VALUE "Y". 02650000 026600 88 NOT-MISSING-OLD VALUE "N". 02660000 026800 05 WI01-BPR-STATUS PIC X(01). 02680000 026900 88 BPR-FOUND VALUE "Y". 02690000 027000 88 BPR-NOT-FOUND VALUE "N". 02700000 SUM11A 05 WI01-PPD-STATUS PIC X(01). 02710000 SUM11A 88 PPD-FOUND VALUE "Y". 02720000 SUM11A 88 PPD-NOT-FOUND VALUE "N". 02730000 027400 05 WI01-ALL-STATUS PIC X(01). 02740000 027500 88 ALL-FOUND VALUE "Y". 02750000 027600 88 ALL-NOT-FOUND VALUE "N". 02760000 045100 05 WI01-ASF-STATUS PIC X(01). 045200 88 ASF-OPEN VALUE "O". 045300 88 ASF-CLOSED VALUE "C". 045400 05 WI01-END-OF-ASF PIC X(01). 045500 88 END-ASF VALUE "Y". 045600 88 NOT-END-ASF VALUE "N". 048200 046901*----- 27/03/2001 - GM ---------------------------------------* 04690100 046902 05 WI01-MISSING-MMD PIC X(01). 04690200 046903 88 MISSING-MMD VALUE "Y". 04690300 046904 88 NOT-MISSING-MMD VALUE "N". 04690400 046905*-------------------------------------------------------------* 04690500 SUM13A 05 WI01-PROCTRAP-FLAG PIC X(01). 04690200 SUM13A 88 PROCTRAP-PROCESSING VALUE "Y". 04690300 SUM13A 88 NOT-PROCTRAP-PROCESSING VALUE "N". 04690400 sum13a SPR11B 05 WI01-PICKEXP-FLAG PIC X(01). 04690200 SPR11B 88 PICKEXP-PROCESSING VALUE "Y". 04690300 SPR11B 88 NOT-PICKEXP-PROCESSING VALUE "N". 04690400 SPR11B SPR11B 05 WW-DUMMY PIC S9(4) COMP. 04690100 SPR11B SUM11B 05 WI01-PROD-STK-STDT-FOUND PIC X(01). 01461000 SUM11B 88 PROD-STK-STDT-FOUND VALUE "Y". 01462000 SUM11B 88 PROD-STK-STDT-NOT-FOUND VALUE "N". 01463000 CRV90B 05 WI01-DEGRADING-SHELF-LIFE 04690200 CRV90B PIC X(01) OCCURS 75. 04690200 CRV90B 88 DEGRADING-SHELF-LIFE VALUE "Y". 04690300 CRV90B 88 NOT-DEGRADING-SHELF-LIFE VALUE "N". 04690400 CRV90B 05 WI01-DSF-FOUND PIC X(01). 04690200 CRV90B 88 DSF-FOUND VALUE "Y". 04690300 CRV90B 88 DSF-NOT-FOUND VALUE "N". 04690400 CRV10B 05 WI01-OJD-FOUND PIC X(01). 04690200 CRV10B 88 OJD-FOUND VALUE "Y". 04690300 CRV10B 88 OJD-NOT-FOUND VALUE "N". 04690400 CRAUTA 04690400 CRAUTA 05 WI01-SOO-FOUND PIC X(01). 04690200 CRAUTA 88 SOO-FOUND VALUE "Y". 04690300 CRAUTA 88 SOO-NOT-FOUND VALUE "N". 04690400 CRAUTA 04690400 CRAUTA 05 WI01-SOP-FOUND PIC X(01). 04690200 CRAUTA 88 SOP-FOUND VALUE "Y". 04690300 CRAUTA 88 SOP-NOT-FOUND VALUE "N". 04690400 CRAUTA 04690400 CRAUTA 05 WI01-SO-CALC-METHOD PIC X(01). 04690200 CRAUTA 88 SO-CALC-METHOD VALUE "Y". 04690300 CRAUTA 88 NOT-SO-CALC-METHOD VALUE "N". 04690400 CRAUTA 04690400 CRV90B 05 WI01-AT-LEAST-1-DEG-SHELF-LIFE 04690200 CRV90B PIC X(01). 04690200 CRV90B 88 AT-LEAST-1-DEG-SHELF-LIFE 04690300 CRV90B VALUE "Y". 04690300 CRV90B 88 NO-DEG-SHELF-LIFE-ENTRIES VALUE "N". 04690400 046907 05 WI01-RECORD-TYPE PIC X(01). 04690700 046908 88 HEADER-RECORD VALUE "1". 04690800 046909 88 FORECAST-DETAIL VALUE "2". 04690900 046910 88 CONTROL-DETAIL VALUE "3". 04691000 046912 05 WI01-PROCESS-RO-TPN PIC X(01). 04691200 046913 88 PROCESS-CURR-RO-TPN VALUE "Y". 04691300 046914 88 PROCESS-NEXT-RO-TPN VALUE "N". 04691400 046919 04691900 046916 05 WI01-PROCESS-LOOP PIC X(01). 04691600 046917 88 PROCESS-LOOP VALUE "Y". 04691700 046918 88 END-PROCESS-LOOP VALUE "N". 04691800 046919 04691900 SPR08A 05 WI01-NEW-PROCESS-LOOP PIC X(01). 04691600 SPR08A 88 NEW-PROCESS-LOOP VALUE "Y". 04691700 SPR08A 88 END-NEW-PROCESS-LOOP VALUE "N". 04691800 046919 04691900 SUM13C 05 WI01-OJD-FETCH-LOOP PIC X(01). 04691600 SUM13C 88 OJD-FETCHED VALUE "Y". 04691700 SUM13C 88 OJD-NOT-FETCHED VALUE "N". 04691800 SUM13A 04691900 SPR08B 05 WI01-NWS-PROCESS-LOOP PIC X(01). SPR08B 88 NWS-PROCESS-LOOP VALUE "Y". SPR08B 88 END-NWS-PROCESS-LOOP VALUE "N". SPR08B 028700 05 WI01-SALES-LOOP PIC X(01). 02870000 028800 88 FIND-SALES VALUE "Y". 02880000 028900 88 SALES-FOUND VALUE "N". 02890000 SPR08B 05 WI01-EDS-LOOP PIC X(01). SPR08B 88 SEARCH-EDS VALUE "Y". SPR08B 88 EDS-FOUND VALUE "N". AUT09A 05 WI01-DATE-IND PIC X(01). AUT09A 88 DATE-FOUND VALUE "Y". AUT09A 88 DATE-NOT-FOUND VALUE "N". SPR10A SUM13A 05 WI01-DATE1-IND PIC X(01). SUM13A 88 DATE1-FOUND VALUE "Y". SUM13A 88 DATE1-NOT-FOUND VALUE "N". SPR10A SPR10A 05 WI01-PTG-IND PIC X(01). SPR10A 88 PTG-FOUND VALUE "Y". SPR10A 88 PTG-NOT-FOUND VALUE "N". SPR10A 029100 05 WI01-PRODUCT-ALLOC-IND PIC X(01). 02910000 029200 88 PRODUCT-ON-ALLOCATION VALUE "Y". 02920000 029300 88 PRODUCT-NOT-ON-ALLOCATION VALUE "N". 02930000 046927 04692700 046928 04692800 046929*----- 27/03/2001 - GM ---------------------------------------* 04692900 046930 05 WI01-MM-PRODUCT-ALLOC-IND PIC X(01). 04693000 046931 88 PRODUCT-ON-MM-ALLOCATION VALUE "Y". 04693100 046932 88 PRODUCT-NOT-ON-MM-ALLOCATION VALUE "N". 04693200 046933*-------------------------------------------------------------* 04693300 046927 04692700 029410 05 WI01-DEV-LINE-TYPE PIC X(01). 02941007 029420 88 DEVELOPMENT-LINE-PRODUCT VALUE "Y" "S" "M" "L". 02942007 029430 88 NOT-DEVELOPMENT-LINE-PRODUCT VALUE "N". 02943007 029431 88 STANDARD-DEVELOPMENT-LINE VALUE "Y" "S". 02943107 029432 88 MEDIUM-DEVELOPMENT-LINE VALUE "M". 02943207 029433 88 LARGE-DEVELOPMENT-LINE VALUE "L". 02943307 051300 02944007 045700 05 WI01-PROCESS-DKSS-FLAG PIC XX. 045800 88 PROCESS-DKSS VALUE "ON". 051300 02944007 CRV10B 05 WI01-WRITING-ORD-DIAG PIC X(01). CRV10B 88 FIRST-ORD-DIAG VALUE "Y". CRV10B 88 NOT-FIRST-ORD-DIAG VALUE "N". 05 WI05-RO-IND PIC X(01). 88 RO-TO-BE-INCLUDED VALUE "Y". 88 RO-NOT-TO-BE-INCLUDED VALUE "N". SPR11B 05 WI-ORD-INV-NO-NN PIC S9(4) COMP VALUE 0. SPR11B 88 ORD-INV-NO-NU VALUE -1. SPR11B 05 WI-POS-IND PIC X. SPR11B 88 WI-POS-FOUND VALUE "Y". SPR11B 88 WI-POS-NOT-FOUND VALUE "N". 047200* 05 WI06-SG-IND PIC X(01). 04720000 047300* 88 SUBGRP-IS-HERCULES VALUE "Y". 04730000 047400* 88 SUBGRP-IS-NOT-HERCULES VALUE "N". 04740000 171S47 171S47 05 WI-SLOW-PROD-EXISTS1-IND PIC X. 171S47 88 WI-SLOW-PROD-EXISTS1 VALUE "Y". 171S47 88 WI-SLOW-PROD-NOT-EXISTS1 VALUE "N". 171S47 061900 05 FILLER PIC X(01) VALUE SPACE. 06190000 062000 88 REJECTED-TPNS VALUE "Y". 06200000 062100 06210000 CRV90B 05 WI06-JL007-DATE-FOUND PIC X(01). CRV90B 88 JL007-DATE-FOUND VALUE "Y". CRV90B 88 JL007-DATE-NOT-FOUND VALUE "N". CRV90B 05 WI07-JL007-VALID-RC PIC X(01). CRV90B 88 JL007-VALID-RC VALUE "Y". CRV90B 88 JL007-INVALID-RC VALUE "N". CRV10B 05 WI08-FIRST-ORDER-TO-CALC PIC X(01). CRV10B 88 FIRST-ORDER-TO-CALC VALUE "Y". CRV10B 88 NOT-FIRST-ORDER-TO-CALC VALUE "N". CRV10B 086500 05 FILLER PIC X(01). 08650000 086600 88 WI09-NOT-END-OF-MM-RSVE-CURSOR VALUE "N". 08660000 086700 88 WI09-END-OF-MM-RSVE-CURSOR VALUE "Y". 08670000 086800 08680000 086900 05 FILLER PIC X(01). 08690000 087000 88 WI10-MM-RSVE-CURSOR-CLOSED VALUE "N". 08700000 087100 88 WI10-MM-RSVE-CURSOR-OPEN VALUE "Y". 08710000 087200 08720000 087300 05 FILLER PIC X(01). 08730000 087400 88 WI11-NOT-END-OF-BD-RSVE-CURSOR VALUE "N". 08740000 087500 88 WI11-END-OF-BD-RSVE-CURSOR VALUE "Y". 08750000 087600 08760000 087700 05 FILLER PIC X(01). 08770000 087800 88 WI12-BD-RSVE-CURSOR-CLOSED VALUE "N". 08780000 087900 88 WI12-BD-RSVE-CURSOR-OPEN VALUE "Y". 08790000 SPR08B SPR08B 05 FILLER PIC X(01). SPR08B 88 WI10-PTP-CURSOR-CLOSED VALUE "N". SPR08B 88 WI10-PTP-CURSOR-OPEN VALUE "Y". SPR08B SPR08B 05 FILLER PIC X(01). 088200 88 WI13-NOT-END-OF-JLALRESV VALUE "N". 08820004 088300 88 WI13-END-OF-JLALRESV VALUE "Y". 08830004 088400 08840000 CRAUTA 05 FILLER PIC X(01). 02910000 CRAUTA 88 WI14-STANDING-ORDER VALUE "Y". 02920000 CRAUTA 88 WI14-NOT-STANDING-ORDER VALUE "N". 02930000 CRAUTA WIN06B 05 FILLER PIC X(01). 08810004 WIN06B 88 WI15-NOT-END-OF-JLDOTCOM VALUE "N". 08820004 WIN06B 88 WI15-END-OF-JLDOTCOM VALUE "Y". 08830004 WIN06B 08840000 SPR10A 05 FILLER PIC X(01). SPR10A 88 WI16-PTG-CURSOR-CLOSED VALUE "N". SPR10A 88 WI16-PTG-CURSOR-OPEN VALUE "Y". WIN06B 08840000 SUM10D 05 WI17-F46-LOOKUP-ACTIVE PIC X(01) VALUE "Y". SUM11A 05 WI17-F42-LOOKUP-ACTIVE PIC X(01) VALUE "Y". SPR12A 05 WI18-ONETOUCH-POP-IND PIC X(01). SPR12A 05 FILLER PIC X(01) VALUE "N". SPR12A 88 WI19-NO-PTG-FOR-STORE VALUE "N". SPR12A 88 WI19-PTG-FOR-STORE VALUE "Y". 088400 08840000 SUM12A 05 WI20-CALC-METH-I-IND PIC X(01). SUM12A 88 WI20-CALC-METH-I VALUE "Y". SUM12A 88 WI20-NOT-CALC-METH-I VALUE "N". WIN06B 08840000 SUM12A 05 FILLER PIC X(01) VALUE "N". SUM12A 88 WI21-XSA-NIA-NOT-FOUND VALUE "N". SUM12A 88 WI21-XSA-NIA-FOUND VALUE "Y". SUM12A 05 FILLER PIC X(01) VALUE "N". SUM12A 88 WI22-CURR-DATE-NOT-FOUND VALUE "N". SUM12A 88 WI22-CURR-DATE-FOUND VALUE "Y". SUM12A 05 FILLER PIC X(01) VALUE "N". SUM12A 88 WI23-WRAP-WEEK-NOT-FOUND VALUE "N". SUM12A 88 WI23-WRAP-WEEK-FOUND VALUE "Y". WIN06B 08840000 SPR14A 05 FILLER PIC X(01). SPR14A 88 WI24-PR-CNTL-SET VALUE "Y". SPR14A 88 WI24-PR-CNTL-NOT-SET VALUE "N". SPR14A 05 FILLER PIC X(01). SPR14A 88 WI25-END-OF-RDD-CURSOR VALUE "Y". SPR14A 88 WI25-NOT-END-OF-RDD-CURSOR VALUE "N". SPR14A 05 FILLER PIC X(01). SPR14A 88 WI26-PR-DATA-FOUND VALUE "Y". SPR14A 88 WI26-PR-DATA-NOT-FOUND VALUE "N". SPR14A 05 FILLER PIC X(01). SPR14A 88 WI27-END-OF-RDT-CURSOR VALUE "Y". SPR14A 88 WI27-NOT-END-OF-RDT-CURSOR VALUE "N". SPR14A 05 FILLER PIC X(01). SPR14A 88 WI28-END-OF-RDD1-CURSOR VALUE "Y". SPR14A 88 WI28-NOT-END-OF-RDD1-CURSOR VALUE "N". SPR14A 05 FILLER PIC X(01). SPR14A 88 WI29-PR-PER-SET VALUE "Y". SPR14A 88 WI29-PR-PER-NOT-SET VALUE "N". SPR14D 05 FILLER PIC X(01). SPR14D 88 WI30-RDT-SALES-INT VALUE "Y". SPR14D 88 WI30-RDT-SALES-DEC VALUE "N". SPR14D 08840000 SPR14D 05 FILLER PIC X(01). SPR14D 88 WI31-SALES-ROUNDED VALUE "Y". SPR14D 88 WI31-SALES-NOT-ROUNDED VALUE "N". PS2S11 05 FILLER PIC X(01). PS2S11 88 WI32-INVALID-PARAM VALUE "I". PS2S11 88 WI32-VALID-PARAM VALUE "V". PS2S11 03 FILLER PIC X. PS2S11 88 WI33-INVALID-FACTOR-MAX VALUE "I". PS2S11 88 WI33-VALID-FACTOR-MAX VALUE "V". PS2S11 03 FILLER PIC X. PS2S11 88 WI34-INVALID-FACTOR-MIN VALUE "I". PS2S11 88 WI34-VALID-FACTOR-MIN VALUE "V". PS2S11 03 WI35-ORDR-FUT-UNCERTN-IND PIC X. PS2S11 88 WI35-ORDR-FUT-UNCERTN-YES VALUE "Y". PS2S11 88 WI35-ORDR-FUT-UNCERTN-NO VALUE "N". AVRS42 03 WI36-USE-ESP-KA-KB-VALUES PIC X. AVRS42 88 WI36-ESP-VALUES-YES VALUE "Y". AVRS42 88 WI36-ESP-VALUES-NO VALUE "N". 088400 08840000 CRV90B 01 WD-DATES. 02950000 CRV90B 05 F PIC X(16) 02960000 CRV90B VALUE "WD-DATES---->". 02970000 CRV90B 05 WD01-EFFECTIVE-END-DATE PIC X(10). 02980000 CRV90B 02980000 SUM10B 05 WD01-PREV-REQ-DEL-DT PIC X(10). SPR14A 05 WD-YESTERDAY-DATE PIC X(10). SPR14A 05 WD-TOMORROW-DATE PIC X(10). CRV90B 02980000 029500 01 WM-MESSAGES. 02950000 029600 05 F PIC X(16) 02960000 029700 VALUE "WM-MESSAGES---->". 02970000 029800 05 WM01-INPUT-FILE PIC X(11) 02980000 029900 VALUE "C01 - " . 02990000 030000 05 WM02-OUTPUT-FILE PIC X(11) 03000000 030100 VALUE "C02 - " . 03010000 030200 05 WM03-REJECT-FILE PIC X(11) 03020000 030300 VALUE "C03 - " . 03030000 030400 05 WM04-CURSOR-ERROR. 03040000 030500 07 FILLER PIC X(6) VALUE "W04 - ". 03050000 030600 07 FILLER PIC X(10) VALUE "PART NO = ". 03060000 030700 07 WM04-CR-PART-NO PIC X(2). 03070000 030800 07 FILLER PIC X(9) VALUE " STORE = ". 03080000 030900 07 WM04-RO-NO PIC 9(5). 03090000 031000 05 WM05-JL0F32-ERROR. 03100000 031100 07 FILLER PIC X(36) 03110000 031200 VALUE "C05 - JL0F32 ERROR, RETURN CODE = ". 03120000 031300 07 WM05-RETURN-CODE PIC X(2). 03130000 031400 05 WM06-JL0001-ERROR. 03140000 031500 07 FILLER PIC X(39) 03150000 031600 VALUE "C06 - JL0001 CALL ERROR, RETURN CODE = ". 03160000 031700 07 WM06-RETURN-CODE PIC X(1). 03170000 031800 05 WM07-EMPTY-INPUT. 03180000 031900 07 FILLER PIC X(11) 03190000 032000 VALUE "W07 - FILE ". 03200000 032100 07 WM07-FILE-NAME PIC X(8). 03210000 032200 07 FILLER PIC X(43) 03220000 032300 VALUE " CONTAINS NO RECORDS, PROCESSING TERMINATED". 03230000 032400 05 WM07-NO-HEADER. 03240000 032500 07 FILLER PIC X(11) 03250000 032600 VALUE "C07 - FILE ". 03260000 032700 07 WM07-FILE-ERR PIC X(8). 03270000 032800 07 FILLER PIC X(43) 03280000 032900 VALUE " FIRST RECORD IS NOT OF TYPE HEADER". 03290000 033000 05 WM08-CURSOR-EMPTY. 03300000 033100 07 FILLER PIC X(6) VALUE "W09 - ". 03310000 033200 07 FILLER PIC X(8). 03320000 033300 88 WM08-ALP-CURSOR VALUE "VXJJ0ALP". 03330000 033400 88 WM08-BDL-CURSOR VALUE "VXJJ0BDL". 03340000 033500 88 WM08-BSP-CURSOR VALUE "VXJJ0BSP". 03350000 033600 88 WM08-OLD-CURSOR VALUE "VXJJ0OLD". 03360000 053100 88 WM08-ASF-CURSOR VALUE "VXJJ0ASF". 033700 07 FILLER PIC X(33) 03370000 033800 VALUE " CURSOR IS EMPTY, THIS IS INVALID". 03380000 033900 05 WM09-INVALID-DATE. 03390000 034000 07 FILLER PIC X(6) VALUE "C09 - ". 03400000 034100 07 WM09-DATE PIC X(10). 03410000 034200 07 FILLER PIC X(35) 03420000 034300 VALUE " COULD NOT BE MATCHED AND CONVERTED". 03430000 034400 05 WM10-DB2-ERR-CONTINUE. 03440000 034500 07 FILLER PIC X(14) VALUE "W10 - MISSING ". 03450032 034600 07 WM10-TABLE PIC X(08) VALUE SPACES. 03460000 034700 07 FILLER PIC X(13) 03470000 034800 VALUE " FOR PART-NO ". 03480000 034900 07 WM10-PART-NO PIC X(02) VALUE SPACES. 03490000 035000 07 FILLER PIC X(10) 03500000 035100 VALUE " STORE-NO ". 03510000 035200 07 WM10-RO-NO PIC X(05) VALUE SPACES. 03520000 035300 07 FILLER PIC X(09) 03530000 035400 VALUE " BPR-TPN ". 03540000 035500 07 WM10-BPR-TPN PIC X(09) VALUE SPACES. 03550000 035600 07 FILLER PIC X(12) 03560031 035700 VALUE " DATE RANGE ". 03570000 035800 07 WM10-ST-DATE PIC X(10) VALUE SPACES. 03580000 035900 07 FILLER PIC X(03) 03590031 036000 VALUE " - ". 03600000 036100 07 WM10-EN-DATE PIC X(10) VALUE SPACES. 03610000 036200 07 FILLER PIC X(38) 03620032 036300 VALUE " PROCESSING CONTINUES WITH NEXT RO/TPN". 03630032 036400 05 WM11-INVALID-REC-TYPE. 03640000 036500 07 FILLER PIC X(6) VALUE "C11 - ". 03650000 036600 07 FILLER PIC X(34) 03660000 036700 VALUE "INVALID RECORD TYPE ENCOUNTERED - ". 03670000 036800 07 WM11-RECORD-TYPE PIC X(02) VALUE SPACES. 03680000 036900 05 WM12-INVALID-HEADER. 03690000 037000 07 FILLER PIC X(6) VALUE "W12 - ". 03700000 037100 07 FILLER PIC X(35) 03710000 037200 VALUE "INVALID NUMBER OF HEADER RECORDS - ". 03720000 037300 07 WM12-RECORD-COUNT PIC 9(07) VALUE ZEROES. 03730000 037400 07 FILLER PIC X(23) 03740000 037500 VALUE " - FOR STORE/PRODUCT - ". 03750000 037600 07 WM12-RO-NO PIC 9(05) VALUE ZEROES. 03760000 037700 07 FILLER PIC X(03) 03770000 037800 VALUE " / ". 03780000 037900 07 WM12-BPR-TPN PIC 9(09) VALUE ZEROES. 03790000 038000 05 WM14-ZERO-DETAILS. 03800000 038100 07 FILLER PIC X(6) VALUE "W14 - ". 03810000 038200 07 FILLER PIC X(05) 03820000 038300 VALUE "ZERO ". 03830000 038400 07 WM14-RECORD-DESC PIC X(08) VALUE SPACES. 03840000 038500 07 FILLER PIC X(20) 03850000 038600 VALUE " DETAIL RECORDS FOR ". 03860000 038700 07 WM14-RO-NO PIC 9(05) VALUE ZEROES. 03870000 038800 07 FILLER PIC X(03) 03880000 038900 VALUE " / ". 03890000 039000 07 WM14-BPR-TPN PIC 9(09) VALUE ZEROES. 03900000 039100 05 WM15-INVALID-DETAILS. 03910000 039200 07 FILLER PIC X(6) VALUE "W15 - ". 03920000 039300 07 FILLER PIC X(35) 03930000 039400 VALUE "UNEVEN NUMBER OF FORECAST & CONTROL". 03940000 039500 07 FILLER PIC X(20) 03950000 039600 VALUE " DETAIL RECORDS FOR ". 03960000 039700 07 WM15-RO-NO PIC 9(05) VALUE ZEROES. 03970000 039800 07 FILLER PIC X(03) 03980000 039900 VALUE " / ". 03990000 040000 07 WM15-BPR-TPN PIC 9(09) VALUE ZEROES. 04000000 040100 05 WM16-OUT-OF-SEQ. 04010000 040200 07 FILLER PIC X(6) VALUE "W16 - ". 04020000 040300 07 FILLER PIC X(35) 04030000 040400 VALUE "DETAIL RECORDS OUT OF SEQUENCE FOR ". 04040000 040500 07 WM16-RO-NO PIC 9(05) VALUE ZEROES. 04050000 040600 07 FILLER PIC X(03) 04060000 040700 VALUE " / ". 04070000 040800 07 WM16-BPR-TPN PIC 9(09) VALUE ZEROES. 04080000 040900 05 WM17-JL0F40-MSG. 04090000 041000 07 WM17-ID PIC X(1). 04100000 041100 07 FILLER PIC X(5) VALUE "17 - ". 04110000 041200 07 WM17-RO-NO PIC 9(05) VALUE ZEROES. 04120000 041300 07 FILLER PIC X(03) 04130000 041400 VALUE " / ". 04140000 041500 07 WM17-BPR-TPN PIC 9(09) VALUE ZEROES. 04150000 041600 07 FILLER PIC X(03) 04160000 041700 VALUE " - ". 04170000 074600 07 WM17-MSG. 07460000 074700 09 WM17-I14 PIC XXX VALUE SPACES. 07470000 074800 09 FILLER PIC X(67) VALUE SPACES. 07480000 074900 07490000 041810 05 WM18-REC-COUNT-MSG. 04181010 041820 07 WM18-ID PIC X(1) VALUE "I". 04182010 041830 07 FILLER PIC X(5) VALUE "18 - ". 04183010 041840 07 FILLER PIC X(10) 04184012 041850 VALUE "NUMBER OF ". 04185012 041851 07 WM18-SUBJECT PIC X(20) VALUE SPACES. 04185110 041860 07 FILLER PIC X(3) 04186011 041870 VALUE " = ". 04187010 041891 07 WM18-COUNT PIC 9(7) VALUE ZEROES. 04189110 041892 05 WM19-CALC-METH-MSG. 04189233 041893 07 WM19-ID PIC X(1) VALUE "I". 04189333 041894 07 FILLER PIC X(5) VALUE "19 - ". 04189433 041895 07 FILLER PIC X(15) 04189533 041896 VALUE "NUMBER OF TYPE ". 04189633 041897 07 WM19-CALC-METH PIC X(02) VALUE SPACES. 04189733 041898 07 FILLER PIC X(3) VALUE " - ". 04189833 041899 07 WM19-METH-DESC PIC X(40) VALUE SPACES. 04189933 041900 07 FILLER PIC X(3) 04190033 041901 VALUE " = ". 04190133 041902 07 WM19-COUNT PIC 9(7) VALUE ZEROES. 04190233 041892 05 WM20-ALP-NOT-FOUND. 04189233 041894 07 FILLER PIC X(6) VALUE "W20 - ". 04189433 041894 07 FILLER PIC X(18) 04189433 034800 VALUE "ALP NOT FOUND FOR ". 03480000 034900 07 WM20-PART-NO PIC X(02) VALUE SPACES. 03490000 035000 07 FILLER PIC X(1) 03500000 035100 VALUE "/". 03510000 035200 07 WM20-RO-NO PIC X(05) VALUE SPACES. 03520000 035300 07 FILLER PIC X(1) 03530000 035400 VALUE "/". 03540000 035500 07 WM20-BPR-TPN PIC X(09) VALUE SPACES. 03550000 041894 07 FILLER PIC X(07) 04189433 034800 VALUE " - LFD=". 03480000 035500 07 WM20-LAST-FRCD-DT PIC X(10) VALUE SPACES. 03550000 041894 07 FILLER PIC X(39) 04189433 034800 VALUE " - CONT PROCESS AS IF NOT ON ALLOCATION". 03480000 062000 05 WM21-OGP-TABLE-EXCEEDED. 062100 07 FILLER PIC X(6) VALUE "C21 - ". 062200 07 FILLER PIC X(25) 062300 VALUE "OGP TABLE OCCURS EXCEEDED". 062000 05 WM22-PAR-DKSS-SETTING. 062100 07 FILLER PIC X(6) VALUE "I22 - ". 062200 07 FILLER PIC X(29) 062300 VALUE "PAR TABLE DKSS PROCESS IND = ". 062200 07 WM22-PARDKSS PIC X(03). 079500 05 WM23-STORE-MESS. 07950000 079600 07 FILLER PIC X(6) VALUE "I23 - ". 07960000 079700 07 FILLER PIC X(16) 07970000 079800 VALUE "STARTING STORE ". 07980000 079900 07 WM23-PART-NO PIC X(02) VALUE SPACES. 07990000 080000 07 FILLER PIC X(1) VALUE "/". 08000000 080100 07 WM23-RO-NO PIC X(05) VALUE SPACES. 08010000 041900 04190000 080300 05 WM24-REJ-TPN. 08030000 080400 07 FILLER PIC X(6) VALUE "I24 - ". 08040000 080500 07 FILLER PIC X(17) 08050000 080600 VALUE "REJECTING TPN ". 08060000 080700 07 WM24-MESS PIC X(05) VALUE SPACES. 08070000 080800 07 FILLER PIC X(1) VALUE "=". 08080000 080810 07 WM24-PART-NO PIC X(02) VALUE SPACES. 08081000 080820 07 FILLER PIC X(1) VALUE "/". 08082000 080900 07 WM24-RO-NO PIC X(05) VALUE SPACES. 08090000 081000 07 FILLER PIC X(1) VALUE "-". 08100000 081100 07 WM24-TPN PIC X(09) VALUE SPACES. 08110000 081200 08120000 081201*----- 27/03/2001 - GM ---------------------------------------* 08120100 081202 05 WM25-INVALID-UNIT-SIZE. 08120200 081203 07 FILLER PIC X(27) 08120300 081204 VALUE "W25 - INVALID UNIT SIZE OF ". 08120400 081205 07 WM25-UNIT-SIZE PIC 9(5)V99 VALUE ZEROES. 08120500 081206 07 FILLER PIC X(11) 08120600 081207 VALUE " - PART-NO ". 08120700 081208 07 WM25-PART-NO PIC X(02) VALUE SPACES. 08120800 081209 07 FILLER PIC X(10) 08120900 081210 VALUE " STORE-NO ". 08121000 081211 07 WM25-RO-NO PIC X(05) VALUE SPACES. 08121100 081212 07 FILLER PIC X(09) 08121200 081213 VALUE " BPR-TPN ". 08121300 081214 07 WM25-BPR-TPN PIC X(09) VALUE SPACES. 08121400 081215 07 FILLER PIC X(35) 08121500 081216 VALUE " PROCESS CONTINUES WITH NEXT RO/TPN". 08121600 081217 05 WM26-MMD-NOT-FOUND. 08121700 081218 07 FILLER PIC X(6) VALUE "W26 - ". 08121800 081219 07 FILLER PIC X(18) 08121900 081220 VALUE "MMD NOT FOUND FOR ". 08122000 081221 07 WM26-PART-NO PIC X(02) VALUE SPACES. 08122100 081222 07 FILLER PIC X(1) 08122200 081223 VALUE "/". 08122300 081224 07 WM26-RO-NO PIC X(05) VALUE SPACES. 08122400 081225 07 FILLER PIC X(1) 08122500 081226 VALUE "/". 08122600 081227 07 WM26-BPR-TPN PIC X(09) VALUE SPACES. 08122700 081228 07 FILLER PIC X(08) 08122800 081229 VALUE " DEL DT=". 08122900 081230 07 WM26-REQ-DEL-DT PIC X(10) VALUE SPACES. 08123000 081231 07 FILLER PIC X(07) 08123100 081232 VALUE " TYPE =". 08123200 081233 07 WM26-ALLOC-TYPE PIC X(1) VALUE SPACES. 08123300 081234 07 FILLER PIC X(19) 08123400 081235 VALUE " - PRODUCT REJECTED". 08123500 081217 05 WM27-PAR-NOT-FOUND. 08121700 081219 07 FILLER PIC X(48) 08121900 081220 VALUE "W27 - NO AAWCTIME ROW ON PAR TABLE. DEFAULT USED". 08122000 090400 05 WM28-JJ0009-ERROR. 09040001 090500 07 FILLER PIC X(39) VALUE 09050001 090600 "C01 - JJ0009 CALL ERROR, RETURN CODE = ". 09060001 090700 07 WM-JJ0009-CODE PIC -999. 09070001 081236*-------------------------------------------------------------* 08123600 042300 04230000 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 062000 05 WM29-TI-COR-SETTING. 062100 07 FILLER PIC X(6) VALUE "I29 - ". 062200 07 FILLER PIC X(30) 062300 VALUE "PAR TABLE TI VALUE FOR COR OF ". 062200 07 WM29-COR PIC X(01). 062200 07 FILLER PIC X(03) 062300 VALUE " = ". 062200 07 WM29-TI PIC 9(03). 022600*-------------------------------------------------------------* 02260000 CRV90B 05 WM30-JL007-INV-RC. 08121700 CRV90B 07 FILLER PIC X(25) VALUE 09050001 CRV90B "W30 - JL0007 INVALID RC: ". 09060001 CRV90B 07 WM30-JL007-ERROR PIC X(80). 08121900 041900 04190000 114200 05 WM31-TOO-MANY-RESERVES. 11420004 114300 07 FILLER PIC X(36) VALUE 11430004 114400 "C31 - TOO MANY RESERVES FOR WS TABLE". 11440004 114500 11450004 CRAUTA 05 WM32-NO-SO-VALUES. 08121700 CRAUTA 07 FILLER PIC X(49) VALUE 09050001 CRAUTA "W32 - STANDING ORDER CALC METHOD - BUT NO VALUES ". 09060001 CRAUTA 07 FILLER PIC X(19) VALUE 09050001 CRAUTA "FOUND FOR PRODUCT: ". 09060001 CRAUTA 07 WM32-BPR-TPN PIC X(09) VALUE SPACES. 08121900 CRAUTA 07 FILLER PIC X(11) VALUE 09050001 CRAUTA " IN STORE: ". 09060001 CRAUTA 07 WM32-RO-NO PIC X(05) VALUE SPACES. 08121900 041900 04190000 CRAUT3 07 WM33-BLANK-PARAM. CRAUT3 09 FILLER PIC X(6) VALUE "C33 - ". CRAUT3 09 WM33-PARAM-KEY PIC X(8). CRAUT3 09 FILLER PIC X(40) CRAUT3 VALUE " HAS A BLANK DATA VALUE, THIS IS INVALID". CRAUT3 CRAUT3 07 WM34-INVALID-PARAM. CRAUT3 09 FILLER PIC X(6) VALUE "C34 - ". CRAUT3 09 WM34-PARAM-KEY PIC X(8). CRAUT3 09 FILLER PIC X(26) CRAUT3 VALUE " HAS AN INVALID DATA VALUE". 041900 04190000 WIN06B 05 WM35-EMPTY-DOTCOM-FILE. 03180000 WIN06B 07 FILLER PIC X(18) VALUE 03190000 WIN06B "W35 - DOTCOM FILE ". 03200000 WIN06B 07 WM35-FILE-NAME PIC X(8). 03210000 WIN06B 07 FILLER PIC X(43) VALUE 03220000 WIN06B " CONTAINS NO RECORDS, PROCESSING CONTINUING". 03230000 WIN06B 04210000 WIN06B 05 WM36-MISSING-DFLT-CL-VALUE. 03180000 WIN06B 07 FILLER PIC X(38) VALUE 03190000 WIN06B "C36 - DEFAULT CODE LIFE VALUE FOR DAY ". 03200000 WIN06B 07 WM36-DAY PIC 9(2). 03210000 WIN06B 07 FILLER PIC X(27) VALUE 03190000 WIN06B " MISSING FROM THE PAR TABLE". 03200000 WIN06A 04210000 WIN06A 05 WM38-DOTCOM-SALES-SUBSTNS. 07 FILLER PIC X(42) 01892080 VALUE "I38 - FILE JLF30I08 : DOTCOM SALES USED = ". 07 WM38-DOTCOM-SALES-CNT PIC 9(9). 05 WM39-JLF46-TABLE. SPR11A 07 FILLER PIC X(6) VALUE "W39 - ". SPR11A 07 WM39-RO-NO PIC 9(05) VALUE ZEROES. SPR11A 07 FILLER PIC X(03) VALUE " / ". SPR11A 07 WM39-BPR-TPN PIC 9(09) VALUE ZEROES. SPR11A 07 FILLER PIC X(03) VALUE " - ". 07 FILLER PIC X(28) VALUE "NO DEMAND PERIOD ENTRY FOUND". AUT07B 05 WM40-JLM26-WARNING. AUT07B 07 FILLER PIC X(14) AUT07B VALUE "W40 - JLF26 - ". AUT07B 07 WM40-WARNING PIC X(79). AUT07B 05 WM41-JLM26-CRITICAL. AUT07B 07 FILLER PIC X(14) AUT07B VALUE "C41 - JLF26 - ". AUT07B 07 WM41-CRITICAL PIC X(79). SPR08A SPR08A 05 WM42-JLM48-CRITICAL. SPR08A 07 FILLER PIC X(14) SPR08A VALUE "W42 - JLF48 - ". SPR08A 07 WM42-CRITICAL PIC X(79). 08310000 SPR08B 05 WM43-PTP-NOT-FOUND. SPR08B 07 FILLER PIC X(28) SPR08B VALUE "I43 - PTP ROW NOT FOUND FOR ". SPR08B 07 WM43-CR-PART-NO PIC X(2). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM43-RETAIL-OUTLET-NO PIC 9(5). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM43-BASE-PRODUCT-NO PIC 9(9). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM43-CURR-SG-CD PIC X(5). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM43-PTP-YRWK PIC X(6). 041900 04190000 SUM10B 05 WM44-NEW-PTP-DATE-CHECK. SUM10B 07 FILLER PIC X(38) SUM10B VALUE "I44 - PERIOD/SALES DATES DO NOT MATCH ". SPR08B 07 WM44-CR-PART-NO PIC X(2). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM44-RETAIL-OUTLET-NO PIC 9(5). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM44-BASE-PRODUCT-NO PIC 9(9). SPR08B 07 FILLER PIC X(1) VALUE "/". SPR08B 07 WM44-CURR-SG-CD PIC X(5). SPR08B SUM09A 05 WM45-WASTE-SENS. SUM09A 07 FILLER PIC X(6) VALUE "I45 - ". SUM09A 07 FILLER PIC X(31) SUM09A VALUE "FAILED AT PART NO/STORE/PRODUCT". SUM09A 07 WM45-PART-NO PIC X(02) VALUE SPACES. SUM09A 07 FILLER PIC X(1) VALUE "/". SUM09A 07 WM45-RO-NO PIC X(05) VALUE SPACES. SUM09A 07 FILLER PIC X(1) VALUE "/". SUM09A 07 WM45-BPR-TPN PIC S9(9) VALUE ZEROS. JFM09A SPR10A* 05 WM46-PTG-NOT-FOUND. SPR10A* 07 FILLER PIC X(28) SPR10A* VALUE "I46 - PTG ROW NOT FOUND FOR ". SPR10A* 07 WM46-CR-PART-NO PIC X(2). SPR10A* 07 FILLER PIC X(1) VALUE "/". SPR10A* 07 WM46-RETAIL-OUTLET-NO PIC 9(5). SPR10A* 07 FILLER PIC X(1) VALUE "/". SPR10A* 07 WM46-BASE-PRODUCT-NO PIC 9(9). SPR10A* 07 FILLER PIC X(1) VALUE "/". SPR10A* 07 WM46-CURR-SG-CD PIC X(5). SPR10A* 07 FILLER PIC X(1) VALUE "/". SPR10A* 07 WM46-PTG-YRWK PIC X(6). SUM09A SUM10B 05 WM47-JL0F46-MSG. 04090000 SUM10B 07 WM47-ID PIC X(1). 04100000 SUM10B 07 FILLER PIC X(5) VALUE "47 - ". 04110000 SUM10B 07 WM47-RO-NO PIC 9(05) VALUE ZEROES. 04120000 SUM10B 07 FILLER PIC X(03) 04130000 SUM10B VALUE " / ". 04140000 SUM10B 07 WM47-BPR-TPN PIC 9(09) VALUE ZEROES. 04150000 SUM10B 07 FILLER PIC X(03) 04160000 SUM10B VALUE " - ". 04170000 SUM10B 07 WM47-MSG. 07460000 SUM10B 09 WM47-I14 PIC XXX VALUE SPACES. 07470000 SUM10B 09 FILLER PIC X(67) VALUE SPACES. 07480000 SUM09A SUM11A 05 WM48-JL0F42-MSG. 04090000 SUM11A 07 WM48-ID PIC X(1). 04100000 SUM11A 07 FILLER PIC X(5) VALUE "48 - ". 04110000 SUM11A 07 WM48-RO-NO PIC 9(05) VALUE ZEROES. 04120000 SUM11A 07 FILLER PIC X(03) 04130000 SUM11A VALUE " / ". 04140000 SUM11A 07 WM48-BPR-TPN PIC 9(09) VALUE ZEROES. 04150000 SUM11A 07 FILLER PIC X(03) 04160000 SUM11A VALUE " - ". 04170000 SUM11A 07 WM48-MSG. 07460000 SUM11A 09 WM48-I14 PIC XXX VALUE SPACES. 07470000 SUM11A 09 FILLER PIC X(67) VALUE SPACES. 07480000 SUM11A SUM11A 05 WM49-JLM41-CRITICAL. SUM11A 07 FILLER PIC X(14) SUM11A VALUE "W49 - JLF41 - ". SUM11A 07 WM49-CRITICAL PIC X(79). SUM11A SUM11A PS2S11 03 WM50-INVALID-K-FACTOR-MAX. PS2S11 05 PIC X(33) VALUE PS2S11 "C50 - INVALID MAXIMUM K-FACTOR - ". PS2S11 05 WM50-K-FACTOR-MAX PIC X(3). PS2S11 05 FILLER PIC X(41) VALUE SPACES. 083100 08310000 PS2S11 03 WM51-INVALID-K-FACTOR-MIN. PS2S11 05 PIC X(33) VALUE PS2S11 "C51 - INVALID MINIMUM K-FACTOR - ". PS2S11 05 WM51-K-FACTOR-MIN PIC X(3). PS2S11 05 FILLER PIC X(41) VALUE SPACES. CRAUT3 PS2S11 03 WM52-INVALID-CP. PS2S11 05 PIC X(39) VALUE PS2S11 "C52 - INVALID PRODUCT COEFFICIENT CP - ". PS2S11 05 WM52-CP PIC X(3). PS2S11 05 FILLER PIC X(38) VALUE SPACES. PS2S11 03 WM53-INVALID-KA. PS2S11 05 PIC X(30) VALUE PS2S11 "C53 - INVALID RANDOMNESS KA - ". PS2S11 05 WM53-KA PIC X(4). PS2S11 05 FILLER PIC X(42) VALUE SPACES. PS2S11 03 WM54-INVALID-KB. PS2S11 05 PIC X(38) VALUE PS2S11 "C54 - INVALID CUSTOMER TREND LAG KB - ". PS2S11 05 WM54-KB PIC X(5). PS2S11 05 FILLER PIC X(34) VALUE SPACES. SUM11A 01 WR05-REJECT-FORECAST-REC PIC X(145). 08123800 083100 08310000 NJ2S35 01 WR06-REJECT-CONTROL-REC PIC X(138). 08124000 CRAUT3 081242 01 WT-TABLES. 08124200 081243 02 F PIC X(16) 08124300 081244 VALUE "WT-TABLES------>". 08124400 081245* 08124500 081246*01 WT01-TABLE. 08124600 081247* 05 FILLER PIC X(16) VALUE 08124700 081248* "WT01-TABLE=====>". 08124800 081249* 08124900 081250* 05 WT01-REP-GROUP-TABLE. 08125000 081260* 10 WT01-BR-SUB-PG-CODE PIC X(5) OCCURS 999 TIMES 08126000 081270* INDEXED BY WT01-IND . 08127000 081280* 08128000 081290*01 WT02-TABLE. 08129000 081300* 05 FILLER PIC X(16) VALUE 08130000 081400* "WT02-TABLE=====>". 08140000 081500* 08150000 081600*01 WT02-RO-CAP-REC. 08160000 081700* 05 WT02-RO-TAB OCCURS 300 TIMES 08170000 081800* INDEXED WT02-IND. 08180000 081900* 10 WT02-RETAIL-OUTLET-NO PIC 9(5). 08190000 082000* 10 WT02-RETAIL-OUTLET-NO-X REDEFINES 08200000 082100* WT02-RETAIL-OUTLET-NO PIC X(5). 08210000 082101* 08210100 SPR10B 042800 01 WT10-FORECAST-TABLE. 04280000 042900 03 WT10-HEADER-REC. 04290000 066500 05 WT10-KEY-DATA. 066600 07 WT10-RECORD-TYPE PIC X. 066700 88 WT10-HEADER-RECORD VALUE "1". 066800 88 WT10-DETAIL-RECORD VALUE "2". 066900 07 WT10-CR-PART-NO PIC XX. 067000 07 WT10-RETAIL-OUTLET-NO PIC 9(5). 067100 07 WT10-BASE-PRODUCT-NO PIC 9(9). 067200 05 WT10-DGRP-CODE PIC XXX. 067300 05 WT10-ORDER-GROUP PIC XX. 067400 05 WT10-SUB-PG-CODE. 067500 07 WT10-PROD-GRP-DIV-IND PIC X. 067600 07 WT10-PROD-GRP-DEPT-CODE 067700 PIC X. 067800 07 WT10-PROD-GRP-SECT-CODE 067900 PIC X. 068000 07 WT10-PROD-GRP-PRDGRP-CODE 068100 PIC X. 068200 07 WT10-PROD-GRP-SGRP-CODE 068300 PIC X. 068400 05 WT10-ST-PERD-STK-POS PIC S9(5)V99 COMP-3. 05 FILLER PIC X(7). 068800 05 WT10-BOOKSTOCK-USED PIC S9(5)V99 COMP-3. 068900 05 WT10-BOOK-STOCK-DT PIC X(10). 069000 05 WT10-BOOK-STOCK-TM PIC X(8). 069100 05 WT10-NEXT-ORDER-TYPE PIC X. 069200 05 WT10-STKD-PROD-ENDT PIC X(10). 069300 05 WT10-SALES-TO-MIDNITE PIC S9(5)V99 COMP-3. 069400 05 WT10-EST-SALES-USED PIC X. 083502*----- 27/03/2001 - GM ---------------------------------------* 08350200 083503 05 WT10-UNIT-SIZE PIC S9(5)V99 COMP-3. 08350300 SUM11A 05 WT10-DISPLAY-MDL-QTY PIC S9(4) COMP. SUM11B 05 WT10-STKD-PROD-STDT PIC X(10). SPR12A 05 WT10-NOTNL-WKLY-SALES PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-BBP-SAVED-NWS PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-COR-PC PIC S9(4) COMP. SPR12A 05 WT10-RO-BPR-SCAP PIC S9(4) COMP. SPR12A 05 WT10-FIXED-ORD-QTY-1 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-FIXED-ORD-QTY-2 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-FIXED-ORD-QTY-3 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-FIXED-ORD-QTY-4 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-FIXED-ORD-QTY-5 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-FIXED-ORD-QTY-6 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-FIXED-ORD-QTY-7 PIC S9(5)V9(2) COMP-3. SPR12A 05 WT10-SFTY-STK-TREND-IND PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-1 PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-2 PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-3 PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-4 PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-5 PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-6 PIC X(1). SPR12A 05 WT10-SPEC-DEL-IND-7 PIC X(1). SUM13A 05 WT10-RATIO-PACK-IND PIC X(1). SUM13A 05 FILLER PIC X(17). 083506*-------------------------------------------------------------* 08350600 045700 03 WT10-PERIOD-ROW OCCURS 75. 04570000 045800 05 FILLER PIC X(17). 04580000 045900 05 WT10-DETAIL-DATA. 04590000 069900 07 WT10-DELY-REQ-DATE PIC X(10). 070000 07 WT10-DELY-REQ-TIME PIC X(8). 070100 07 WT10-PERD-END-DATE PIC X(10). 070200 07 WT10-PERD-END-TIME PIC X(8). 070300 07 WT10-ORDER-TYPE PIC X. 070400 07 WT10-PERD-CALC-TYPE PIC X. 070500 07 WT10-NOTNL-CALC-DATE PIC X(10). 070600 07 WT10-NOTNL-CALC-TIME PIC X(8). 070700 07 WT10-STOCK-CENTRE-NO PIC 9(5). 070800 07 WT10-PERD-OS-ORD-QTY PIC S9(5)V99 COMP-3. 070900 07 WT10-DELY-IND PIC X. 071000 07 WT10-SPECIAL-ORDER-QTY PIC S9(5)V99 COMP-3. 071100 07 WT10-ALLOC-IND PIC X. 071200 07 WT10-FIRST-ORD-TYPE-OF-DAY 071300 PIC X. 071400 07 WT10-LAST-ORDER PIC X. 071500 07 WT10-PALLET-ROUND-IND PIC X. 071600 07 WT10-ALT-MERCH-UNITS PIC 9(4). 071700 07 WT10-ALT-MERCH-UNITS-RND PIC 9(3). 071800 07 WT10-OPEN-FOR-TRADE PIC X. 143s01 07 WT10-STK-FILL-IND PIC X. 143s01 07 WT10-STK-FILL-WK-IND PIC X. 143s01 07 WT10-PICK-METH PIC X. 143s01 07 WT10-PERD-OS-ORD-QTY-RP PIC S9(5)V99 COMP-3. 143S01 07 WT10-SMFO-ORDER-QTY PIC S9(5)V99 COMP-3. 143S01 07 WT10-SMFO-ORDER-IND PIC X. 071900 07 WT10-FCAST-SALES-CAL PIC S9(5)V99 COMP-3. 072000 07 WT10-PERD-HOURLY-PTP PIC 999. 072100 07 WT10-PROM-IND PIC X. 072200 88 WT10-ON-PROMOTION VALUE "Y". 072300 07 WT10-OFFER-END-DATE PIC X(10). 072400 07 WT10-OFFER-SHELF-CAP PIC S9(5)V99 COMP-3. 072500 07 WT10-SAVED-NWS PIC S9(5)V99 COMP-3. 07 WT10-PERD-PTP-TO-MIDNITE PIC S999 COMP-3. 07 WT10-STEP-IMPACT-TYPE PIC X. SUM04B 07 WT10-666-SHELF-CAP PIC S9(4) COMP. AUT05B 07 WT10-NEXT-PROM-SHELF-CAP PIC S9(5)V99 COMP-3. AUT07A 07 WT10-DMND-ADJMT-PERC PIC S9(3) COMP-3. SPR08C 07 WT10-MIN-PROM-CAP PIC S9(5)V99 COMP-3. SPR08C 07 WT10-MIN-PROM-REQ-IND PIC X. SUM09A 07 WT10-FIXED-FILL-IND PIC X. SPR12D 07 WT10-BACK-BACK-PROM-CAP SPR12D PIC S9(5)V99 COMP-3. SPR12D 07 WT10-ACT-PROM-END-DATE PIC X(10). SUM13A 07 WT10-RATIO-PACK-CAP PIC S9(9) COMP. SUM13A 07 WT10-RATIO-PACK-CTL-FTR SUM13A PIC S9(3)V9(2) COMP-3. 162s24 07 WT10-PRE-OFR-DEL-IND PIC X(1). AVRS32 07 WT10-PREV-ORD-QTY PIC S9(5)V99 COMP-3. AVRS32 07 WT10-PROD-EXT-IND PIC X(1). AVRS32 07 WT10-PROD-CALC-IND PIC X(1). AVRS34 07 WT10-ORD-REC-TYPE PIC 9(1). 048000 04800000 048100 01 WT20-CONTROL-TABLE. 04810000 048200 02 WT20-PERIOD-ROW OCCURS 75. 04820000 048300 03 WT20-RO-TPNB-PERIOD-REC. 04830000 048400 05 WT20-RECORD-TYPE PIC X(1). 04840000 048500 05 WT20-KEY-DATA. 04850000 048600 07 WT20-CR-PART-NO PIC XX. 04860000 048700 07 WT20-RETAIL-OUTLET-NO PIC 9(5). 04870000 048800 07 WT20-BASE-PRODUCT-NO PIC 9(9). 04880000 048900 07 WT20-DELY-REQ-DATE PIC X(10). 04890000 049000 07 WT20-DELY-REQ-TIME PIC X(08). 04900000 049100 07 WT20-SUB-PG-CODE PIC X(5). 04910000 049200 05 WT20-PERIOD-DATA. 04920000 049300 07 WT20-PERD-END-DATE PIC X(10). 04930000 049400 07 WT20-PERD-END-TIME. 04940000 049500 09 WT20-PERD-END-HOUR PIC X(2). 04950000 049600 09 FILLER PIC X(6). 04960000 049700 07 WT20-ORDER-TYPE PIC X(01). 04970000 049800 05 WT20-CONTROL-DATA. 04980000 049900 07 WT20-ACC-WSTGE-PERC PIC 999. 04990000 050000 07 WT20-CNTL-CODE-LIFE PIC 999. 05000000 050100 07 WT20-COVER-DAYS PIC 999. 05010000 075100 07 WT20-PROM-STK-RUN-DOWN-PC PIC 999. 050300 07 WT20-FILL-SAFETY-PC PIC 999. 05030000 050400 07 WT20-SHELF-FILL-CAP-PC PIC 999. 05040000 050500 07 WT20-SALE-SAFE-PC PIC 999. 11990008 050710 07 WT20-CODE-SAFE-PC PIC 999. 12000008 050700 07 WT20-CUBE-SAFE-PC PIC 999. 12010008 072200 07 WT20-POS-SALES-DEVI-PC PIC 999. 072300 07 WT20-NEG-SALES-DEVI-PC PIC 999. 050800 05080000 085533*----- 27/03/2001 - GM ---------------------------------------* 08553300 085534 07 WT20-T-DMND-FCTR PIC 999. 08553400 085535 07 WT20-CAPACITY-CAPPING PIC 999. 08553500 085536*-------------------------------------------------------------* 08553600 085537 08553700 CRV11A 07 WT20-CASE-SAFETY-PC PIC 999. 12100008 CRV10A 07 WT20-EXTERNAL-CALC-METHOD PIC X(1). CRV10C 07 WT20-RECOVERY-STATUS PIC X(1). 05090000 07 WT20-DEML-RND1-PC PIC 9(3). 07 WT20-DEML-RND2-PC PIC 9(3). 07 WT20-DEML-RND3-PC PIC 9(3). 07 WT20-GAP-ORD-PC PIC 9(3). SPR08A 07 FILLER PIC X(2). SPR08A 07 WT20-WASTE-CONTROL-VALUE PIC S9(4) COMP. 07 WT20-PWO-ES-CONTROL-VALUE PIC S9(4) COMP. 07 WT20-PWO-ESOH-CONTROL-VALUE PIC S9(4) COMP. SUM09A 07 WT20-STORE-SHELF-LIFE PIC 999. 01805000 SUM09A 07 WT20-SRP-IRP-PC PIC 999. 01806000 SPR11A 07 WT20-PROM-RUNDOWN-CTL-DAYS PIC 999. NJ2S35 07 WT20-WASTE-CONTROL-VER PIC X(6). SPR14A 07 WT20-POT-REDN-CNTL PIC X. 050900 05090000 051000 01 WT30-CALENDAR-DATA. 05100000 051100 03 WT30-CALENDAR-ROW OCCURS 50. 05110000 051200 05 WT30-CCYY-MM-DD PIC X(10). 05120000 051300 05 WT30-TESCO-YEAR PIC 9(4). 05130000 051400 05 WT30-TESCO-WEEK PIC 9(2). 05140000 051500 05 WT30-DAY-NO PIC 9(1). 05150000 SPR08B SPR08B 01 WT30-PTP-CALENDAR-DATA. SPR08B 03 WT30-PTP-TESCO-YEAR PIC 9(4). SPR08B 03 WT30-PTP-TESCO-WEEK PIC 9(2). SPR08B 03 WT30-PTP-DAY-NO PIC 9(1). SPR08B 051700 01 WT40-OLD-CURSOR-DATA. 05170000 085100 03 WT40-OLD-CURSOR-TABLE OCCURS 126. 05180000 051900 05 WT40-REQ-DEL-DATE PIC X(10). 05190000 AUT08B 05 WT40-BFFO-REQ-DEL-DATE PIC X(10). 05190000 052000 05 WT40-ORDER-TYPE PIC X(01). 05200000 052100 05 WT40-CODE-DATE PIC X(10). 05210000 052200 05 WT40-REVSD-ORD-QTY PIC S9(5) USAGE COMP-3. 05220000 052200 05 WT40-REQ-DEL-TM PIC X(8). AUT09A 05 WT40-ACT-DEL-DATE PIC X(10). AUT09A 05 WT40-ACT-DEL-TIME PIC X(8). AB2S10 05 WT40-ORD-DELIVERY-STS PIC X(1). 053800 05380000 SUM10B* TEMP OLD ARRAY TO BE USED IN MULTIPLE CAGE-SPLIT & CD-LIFE. SUM10B 01 WT41-OLD-TEMP-CURSOR-DATA. SUM10B 03 WT41-OLD-TEMP-CURSOR-TABLE OCCURS 50. SUM10B 05 WT41-OLD-TEMP-REC. SUM10B 07 WT41-OLD-REVSD-ORD-QTY PIC S9(4) COMP. SUM10B 07 WT41-OLD-CODE-LIFE PIC S9(4) COMP. SUM10B 07 WT41-OLD-ADJUST-QTY PIC S9(4) COMP. SUM10B 07 WT41-OLD-WT40-POSN PIC S9(4) COMP. SUM10B 07 WT41-OLD-MATCH-FOUND PIC X(01). SUM10B SUM10B* TEMP OLC ARRAY TO BE USED IN MULTIPLE CAGE-SPLIT & CD-LIFE. SUM10B 01 WT42-OLC-TEMP-CURSOR-DATA. SUM10B 03 WT42-OLC-CURSOR-TABLE OCCURS 50. SUM10B 05 WT42-OLC-CURSOR-REC. SUM10B 07 WT42-OLC-CD-LIFE PIC S9(4) COMP. SUM10B 07 WT42-OLC-PICK-QTY PIC S9(5)V9(2) COMP-3. SUM10B 07 WT42-OLC-MATCH-FOUND PIC X(01). 053800 05380000 052400 01 WT50-BSP-CURSOR-DATA. 05240000 052500 03 WT50-BSP-SALES-YRWK. 05250000 052600 05 WT50-BSP-TESCO-YEAR PIC X(4). 05260000 052700 05 WT50-BSP-TESCO-WEEK PIC X(2). 05270000 052800 03 WT50-BSP-SALES-FIELDS. 05280000 052900 05 WT50-BSP-SALES1 PIC S9(5)V99 COMP-3. 05290000 053000 05 WT50-BSP-SALES2 PIC S9(5)V99 COMP-3. 05300000 053100 05 WT50-BSP-SALES3 PIC S9(5)V99 COMP-3. 05310000 053200 05 WT50-BSP-SALES4 PIC S9(5)V99 COMP-3. 05320000 053300 05 WT50-BSP-SALES5 PIC S9(5)V99 COMP-3. 05330000 053400 05 WT50-BSP-SALES6 PIC S9(5)V99 COMP-3. 05340000 053500 05 WT50-BSP-SALES7 PIC S9(5)V99 COMP-3. 05350000 053600 03 WT50-BSP-DAILY-SALES REDEFINES WT50-BSP-SALES-FIELDS. 05360000 053700 05 WT50-BSP-DAYS-SALES PIC S9(5)V99 COMP-3 OCCURS 7. 05370000 082200 075500 01 WT60-OGP-DATA. 075600 03 WT60-OGP-TABLE OCCURS 1 TO 100 075700 DEPENDING ON WX60-OGP-COUNT 075800 ASCENDING KEY IS WT60-OG-CD 075900 INDEXED BY WX60-INDEX. 076000 05 WT60-OG-CD PIC XX. 076100 05 WT60-LEGACY-ID PIC XX. 082200 132000* THIS TABLE HOLDS THE MERGED MM/BD RESERVE DETAILS FOR THE 13200003 132100* CURRENT STORE/PRODUCT BEING PROCESSED. 13210003 132200 01 WT61-RESOLVED-RESERVE-TABLE. 13220004 132300 03 WT61-COUNT PIC S9(4) COMP. 13230003 132400 03 WT61-MAX PIC S9(4) COMP VALUE 50. 13240004 132500 03 WT61-RESERVE-ENTRY OCCURS 0 TO 50 TIMES 13250004 132600 DEPENDING ON WT61-COUNT 13260003 132700 INDEXED BY WT61-IX 13270003 133200 WT61-IX2 13320019 133300 WT61-IX3. 13330019 132900 05 WT61-RSVE-EFFV-DT PIC X(10). 13290009 133000 05 WT61-RSVE-END-DT PIC X(10). 13300009 133500 05 WT61-CURR-RSVE-QTY PIC S9(5)V99 COMP-3. 13350014 05 WT61-CURR-RSVE-FUTURE-IND PIC X. 133200 05 WT61-ALLOC-PATTERN PIC X(5). 13320003 133810 05 WT61-APPORTION-IND PIC X(1). 13381030 133700 05 WT61-ALLOC-TYPE PIC X(1). 13370000 133300 13330003 WIN06B 01 WT70-DOTCOMCL-TABLE. 05100000 WIN06B 03 WT70-DOTCOM-CL-ENTRY OCCURS 21 TIMES 05110000 WIN06B INDEXED BY WT70-IX. 05110000 WIN06B 05 WT70-DOTCOM-CL PIC 99. 05120000 WIN06B 05 WT70-DOTCOM-CL-ADJ PIC 99. 05130000 WIN06B 05160000 WIN06A 01 WT80-CR-FCST-SALES-TABLE. 03 WT80-PERIOD-TABLE OCCURS 75 TIMES. 05110000 05 WT80-DAY-FCST-SALES PIC S9(5)V99 COMP-3. 05 WT80-DAY-FCST-NWS PIC S9(5)V99 COMP-3. AVRS42 01 WT85-KA-TREND-TABLE. AVRS42 03 WT85-KA-KB-TABLE OCCURS 50 TIMES. AVRS42 05 WT85-KA PIC S9(1)V9(2) USAGE COMP-3. AVRS42 05 WT85-TREND PIC S9(3)V9(3) USAGE COMP-3. AUT09A 01 WT90-ALL-DATES. 05160000 AUT09A 03 WT90-ISO-WF-CONV OCCURS 84 TIMES. 05160000 AUT09A 05 WT90-ISO-FORMAT PIC X(10). 05160000 AUT09A 05 WT90-WF-FORMAT. 05160000 AUT09A 07 WT90-WF-TESCO-YEAR PIC 9(4). 05160000 AUT09A 07 WT90-WF-TESCO-WEEK PIC 9(2). 05160000 AUT09A 07 WT90-WF-DAY-NO PIC 9(1). 05160000 05160000 SUM12A 01 WT95-WRAP-SALES-ARRAY-DATA. SUM12A 03 WT95-WRAP-SALES-ARRAY OCCURS 5 TIMES. SUM12A 05 WT95-RTL-YEAR-WK PIC 9(6). SUM12A 05 WT95-PTG-PTP-DONE PIC X(1). SUM12A 05 WT95-PTG-ENTRY PIC X(1). SUM12A 05 WT95-PTP-S-ENTRY PIC X(1). SUM12A 05 WT95-XSA-NIA-DONE PIC X(1). SUM12A 05 WT95-XSA-NIA-FOUND PIC X(1). 05160000 SUM13A 01 WT96-DEL-DATES-ARRAY-DATA. SUM13A 03 WT96-DEL-DATE-OLD OCCURS 25 TIMES. SUM13A 05 WT96-DEL-DATES PIC X(10). SUM13C 01 WT97-OJDDEL-DATES-ARRAY-DATA. SUM13C 03 WT97-DEL-DATE-OJD OCCURS 25 TIMES. SUM13C 05 WT97-DEL-DATES PIC X(10). 05160000 053900 01 WW-MISC-WORK-FIELDS. 05390000 054000 03 F PIC X(16) 05400000 054100 VALUE "WW-MISC ------->". 05410000 054200 03 WW01-CURRENT-PROCESSING. 05420000 054300 05 WW01-CURR-PART-NO PIC XX VALUE " ". 05430000 054400 05 WW01-CURR-RO-NO-DB2 PIC S9(5)V COMP-3 VALUE +0. 05440000 054500 05 WW01-CURR-RO-NO PIC 9(5) VALUE ZEROES. 05450000 AUT08B 05 WW01-PREV-RO-NO PIC 9(5) VALUE ZEROES. 05450000 054600 05 WW01-CURR-BPR-TPN PIC 9(9) VALUE ZEROES. 05460000 054700 05 WW01-CURR-BPR-TPN-DB2 PIC S9(9) COMP-3 VALUE +0. 05470000 054800 05 WW01-CURR-SG-CD PIC X(5) VALUE SPACES. 05480000 PS2S01 05 WW01-OFU-SG-CD PIC X(5) VALUE SPACES. 05480000 142S03 05 WW01-PREV-SG-CD PIC X(5) VALUE SPACES. 05480000 PS2S11 05 WW01-PREV-OFU-SGCD PIC X(5) VALUE SPACES. 05480000 AVRS42 05 WW01-PREV-KFA-SGCD PIC X(5) VALUE SPACES. 089000 05 WW01-PREV-OLD-REQ-DEL-DT PIC X(10) VALUE SPACES. 05480000 AVRS32 05 WW01-EXIST PIC X. 054900 03 WW01-CURRENT-VALUES. 05490000 055000 05 WW01-SG-CD PIC X(5) VALUE SPACES. 05500000 055100 05 FILLER REDEFINES WW01-SG-CD. 05510000 055200 07 WW01-DIV PIC X(1). 05520000 055300 07 FILLER PIC X(4). 05530000 055400 05 FILLER REDEFINES WW01-SG-CD. 05540000 055500 07 WW01-DEP PIC X(2). 05550000 055600 07 FILLER PIC X(3). 05560000 055700 05 FILLER REDEFINES WW01-SG-CD. 05570000 055800 07 WW01-SEC PIC X(3). 05580000 055900 07 FILLER PIC X(2). 05590000 056000 05 FILLER REDEFINES WW01-SG-CD. 05600000 056100 07 WW01-PSG PIC X(4). 05610000 056200 07 FILLER PIC X(1). 05620000 056300 05 FILLER REDEFINES WW01-SG-CD. 05630000 056400 07 WW01-SGP PIC X(5). 05640000 056500 05650000 WIN06B 05 WW01-STORE-PROD-KEY. 05450000 WIN06B 07 WW01-KEY-RO-NO PIC 9(5). 05450000 WIN06B 07 WW01-KEY-BPR-TPN PIC 9(9). 05460000 WIN06A 05 WW01-EXP-SHELF-LIFE PIC S9(3). 61322400 AUT08A 05 WW01-MAX-SHELF-LIFE PIC S9(3). 61322400 WIN06A 05 WW01-ZZD-DIFF-IN-DAYS PIC S9(3). 05910000 * 02900031 WIN06A 05 WW01-DTCMES-KEY. 07 WW01-DTCMES-PART-NO PIC XX. 07 WW01-DTCMES-RO-NO PIC 9(5). 07 WW01-DTCMES-PROD-NO PIC 9(9). 07 WW01-DTCMES-SALES-DT PIC X(10). 05 WW01-JLF40-KEY. 07 WW01-JLF40-CR-PART-NO PIC XX. 07 WW01-JLF40-RO-NO PIC 9(5). 07 WW01-JLF40-BPR-TPN PIC 9(9). 07 WW01-JLF40-SALES-DT PIC X(10). 056500 05650000 SUM10B 05 WW01-OLD-CURSOR-TEMP-REC. 05650000 SUM10B 07 WW01-OLD-TEMP-REVSD-QTY PIC S9(4) COMP. 05650000 sUM10B 07 WW01-OLD-TEMP-CD-LIFE PIC S9(4) COMP. 05650000 SUM10B 07 WW01-OLD-TEMP-ADJ-QTY PIC S9(4) COMP. 05650000 SUM10B 07 WW01-OLD-WT40-POSN PIC S9(4) COMP. SUM10B 07 WW01-OLD-TEMP-MATCH-FND PIC X(01). 05650000 056500 05650000 SUM10B 05 WW01-OLC-REM-QTY PIC S9(5)V9(2) COMP-3 VALUE +0.05650000 SUM10B 05 WW01-CUR-OLD-QTY PIC S9(4) COMP VALUE +0. 05650000 SUM10B 05 WW01-OLD-ADJUST-QTY PIC S9(4) COMP VALUE +0. 05650000 SUM10C 05 WW01-DIFF-QTY PIC S9(4) COMP VALUE +0. 05650000 SUM10C 05 WW01-DIFF-QTY1 PIC S9(4) COMP VALUE +0. 05650000 SUM10B 05 WW01-NEXT-OLD-QTY PIC S9(4) COMP VALUE +0. 05650000 SUM10B 05 WW01-BEST-FIT-RECS PIC S9(4) COMP. 05650000 SUM10C 05 WW01-MIX-MTCH-RECS PIC S9(4) COMP. 05650000 SUM10C 05 WW01-NEW-WT40-RECS PIC S9(4) COMP. 05650000 SUM10B 05 WW01-PREV-ORD-TYPE PIC X. 05650000 056600 05 WW01-CURR-DATE PIC X(10). 05660000 AUT09A 05 WW01-CURR-DATE-ISO PIC X(10). 05660000 056700 05 WW01-DATE-DAY PIC S9(3) COMP. 05670000 056800 05 WW01-SQLCODE PIC -(9)9. 05680000 056900 05 WW01-RECS-INPUT PIC -(7)9. 05690000 099600 05 WW01-RECS-INPUT4 PIC -(7)9. 09960000 057000 05 WW01-RECS-OUTPUT PIC -(7)9. 05700000 057100 05 WW01-RECS-REJECT PIC -(7)9. 05710000 057200 05 WW01-STORES-PROCESSED PIC -(7)9. 05720000 057300 05730000 057400 05 WW01-START-DATE PIC X(10). 05740000 057500 05 WW01-END-DATE PIC X(10). 05750000 057400 05 WW01-XXX-START-DATE PIC X(10). 05740000 057500 05 WW01-XXX-END-DATE PIC X(10). 05750000 057600 05 WW01-LAST-DELIVERY-DATE PIC X(10). 05760000 057700 05 WW01-END-EXTRACT-DATE PIC X(10). 05770000 057800 05 WW01-ORD-CALC-DATE PIC X(10). 05780000 057900 05 WW01-ORD-CALC-TIME PIC X(08). 05790000 058000 05800000 058100 05 WW01-BSP-START-DATE. 05810000 058200 07 WW01-STRT-BSP-YRWK PIC X(6). 05820000 058400 07 WW01-STRT-BSP-DAY PIC X(1). 05840000 058500 05 WW01-BSP-END-DATE. 05850000 058600 07 WW01-END-BSP-YRWK PIC X(6). 05860000 058800 07 WW01-END-BSP-DAY PIC X(1). 05880000 058900 05 WW01-BDL-START-DATE PIC X(10). 05890000 059000 05 WW01-BDL-END-DATE PIC X(10). 05900000 059100 05 WW01-DIFF-IN-DAYS PIC S9(3) VALUE +0. 05910000 059200 05 WW01-OLD-START-DATE PIC X(10). 05920000 059300 05 WW01-OLD-END-DATE PIC X(10). 05930000 059400 05 WW01-ALP-START-DATE PIC X(10). 05940000 059500 05 WW01-ALP-END-DATE PIC X(10). 05950000 085500 05 WW01-ASF-SALES-DATE PIC X(10). 059600 05960000 059700 05 WW01-HEADER-RECS-IN PIC S9(7) COMP-3 VALUE +0. 05970000 059800 05 WW01-FORECAST-RECS-IN PIC S9(7) COMP-3 VALUE +0. 05980000 059900 05 WW01-CONTROL-RECS-IN PIC S9(7) COMP-3 VALUE +0. 05990000 060000 06000000 060100 05 WW01-TARGET-STOCK PIC S9(7) COMP-3 VALUE +0. 06010000 05 WW01-SUB-PG-CODE PIC X(05). 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 05 WW01-COR-PC PIC 9(03). 022600*-------------------------------------------------------------* 02260000 CRAUTA 05 WW01-SO-PREV-PER-STR-DATE PIC X(10). 060200 06020000 SUM11B 03 WW01-STK-PROD-ST-DATE. SUM11B 05 WW01-STK-PROD-ST-YRWK. SUM11B 07 WW01-STK-PROD-ST-YR PIC 9(4). SUM11B 07 WW01-STK-PROD-ST-WK PIC 9(2). SUM11B 05 WW01-STK-PROD-ST-DNO PIC 9(1). 060200 06020000 060300 01 WW01-DCLVXJJ0HTB. 06030000 060400 03 FILLER PIC X(17). 06040000 060500 03 WW01-HOURLY-PTPS. 06050000 060600 05 WW01-PTP PIC S9(4) COMP OCCURS 24. 06060000 060700 03 FILLER PIC X(17). 06070000 076900 07690000 SUM13A 01 WW01-RPKCALC. 06030000 SUM13A 03 WW01-RPKCALC-OC-X PIC X. 06040000 SUM13A 03 WW01-RPKCALC-OF-X PIC X. 06050000 076900 07690000 077000 01 WW02. 07700000 077800 03 WW02-APPORTIONMENT-PC PIC S9(3)V9(3) COMP-3. 07780000 141600 14160008 SPR11B 01 WW-OLD-REVSD-ORD-QTY PIC S9(4) USAGE COMP. 01784205 SUM14B 01 WW-PREV-RO-NO PIC 9(5). PS2S11 01 WW-PREV-STORE PIC 9(5). AVRS42 01 WW-PREV-STORE1 PIC 9(5). KS2S45 01 WW-PREV-STORE2 PIC 9(5). 171S47 01 WW-PREV-STORE3 PIC 9(5). 142S03 01 WW-PREV-STORE-NO PIC 9(5). 141600 14160008 141700 01 WW03. 14170008 141800 03 WW03-NEXT-DEL-DATE PIC X(10). 14180008 141900 03 WW03-LAST-DEL-SUB PIC S9(4) COMP. 14190008 CRAUT3 CRAUT3 01 WW04-TESCO-YEAR-WEEK. CRAUT3 05 WW04-TESCO-YEAR PIC 9(4). 05130000 CRAUT3 05 WW04-TESCO-WEEK PIC 9(2). 05140000 CRAUT3 CRAUT3 01 WW05-PREV-TESCO-YEAR-WEEK PIC 9(6). CRAUT3 01 WW06-JLF20-KEY. 00417000 03 WW06-CR-PART-NO PIC XX. 03 WW06-RETAIL-OUTLET-NO PIC 9(5). 03 WW06-BASE-PRODUCT-NO PIC 9(9). 03 WW06-DELY-REQ-DATE PIC X(10). 03 WW06-DELY-REQ-TIME PIC X(8). 01 WW07-JLF25-KEY. 00417000 03 WW07-CR-PART-NO PIC XX. 03 WW07-RETAIL-OUTLET-NO PIC 9(5). 03 WW07-BASE-PRODUCT-NO PIC 9(9). 03 WW07-DELY-REQ-DATE PIC X(10). 03 WW07-DELY-REQ-TIME PIC X(8). AVRS32 01 WW07-JLRFD-KEY. 00417000 AVRS32 03 WW07-RFD-CR-PART-NO PIC XX. AVRS32 03 WW07-RFD-RETAIL-OUTLET-NO PIC 9(5). AVRS32 03 WW07-RFD-BASE-PRODUCT-NO PIC 9(9). AVRS32 03 WW07-RFD-DELY-REQ-DATE PIC X(10). AVRS32 03 WW07-RFD-DELY-REQ-TIME PIC X(8). 01 WW09-JLF46-DEFAULT-FIELDS. 00417000 03 WW09-MAX-SHELF-LIFE PIC 9(3). 03 WW09-WASTE-MAPPING-HOURS PIC 9(2). 03 WW09-IN-ROTATE-PERCENT PIC S9(1)V9(2). 03 WW09-STOCK-ROTATE-PERCENT PIC S9(1)V9(2). 03 WW09-K-FACTOR PIC S9(3)V9(2). 03 WW09-LOOKUP-TABLE. 05 WW09-LOOKUP-TAB OCCURS 1000. 07 WW09-Z-VALUE PIC S9V99 COMP-3 VALUE 0. 07 WW09-BFZ-VALUE PIC S9V9(12) COMP-3 VALUE 0. 07 WW09-LFZ-VALUE PIC S9V9(12) COMP-3 VALUE 0. 01 WW10-JLF46-MISC. 00417000 03 WW10-JLF46-KEY. 05 WW10-F46-CR-PART-NO PIC XX. 05 WW10-F46-RO-NO PIC S9(5). 05 WW10-F46-BPR-TPN PIC S9(9). 03 WW10-JLFEX-KEY. 05 WW10-FEX-CR-PART-NO PIC XX. 05 WW10-FEX-RO-NO PIC S9(5). 05 WW10-FEX-BPR-TPN PIC S9(9). 03 WW10-JLF46-PROCESSED PIC X. SPR08B SUM11A 01 WW10-JLF42-MISC. 00417000 SUM11A 03 WW10-JLF42-KEY. SUM11A 05 WW10-F42-CR-PART-NO PIC XX. SUM11A 05 WW10-F42-RO-NO PIC S9(5). SUM11A 05 WW10-F42-BPR-TPN PIC S9(9). SUM11A 03 WW10-JLF42-PROCESSED PIC X. SUM11A 03 WW10-PICK-METH PIC X. SUM11A 03 WW10-MAX-DATE-ISO PIC X(10). 05160000 SUM11A 03 WW10-MAX-DATE-WF PIC X(7). 05160000 SUM11A 03 WW10-LEADTIME PIC 9(3). 05160000 SUM11A 03 WW10-ACT-LEADTIME PIC 9(3). 05160000 SUM11A 03 WW10-LEADTIME-DAYS PIC S9(5) COMP-3. 05160000 SUM11A 03 WW10-CALC-INTERVAL-DAYS PIC 9(3). 05160000 SUM11A 03 WW10-SUB1 PIC S9(4) COMP VALUE +0. SUM11A 03 WW10-SUB2 PIC S9(4) COMP VALUE +0. SUM11A SUM11A 03 WW10-REQ-DEL-DT-CALC PIC X(10). SUM11A 03 WW10-REQ-DEL-TM-CALC PIC X(08). SUM11A 03 WW10-REQ-DEL-TM-CALC-N REDEFINES WW10-REQ-DEL-TM-CALC. SUM11A 05 WW10-REQ-DEL-HRS-CALC PIC 9(2). SUM11A 05 FILLER PIC X(6). SUM11A SUM11A 03 WW10-REQ-DEL-DT-FIRSTD PIC X(10). SUM11A 03 WW10-REQ-DEL-TM-FIRSTD PIC X(08). SUM11A 03 WW10-REQ-DEL-TM-FIRSTD-N REDEFINES SUM11A WW10-REQ-DEL-TM-FIRSTD. SUM11A 05 WW10-REQ-DEL-HRS-FIRSTD PIC 9(2). SUM11A 05 FILLER PIC X(6). SUM11A 03 WW10-NOT-CAL-DT-FIRSTD PIC X(10). SUM11A 03 WW10-NOT-CAL-TM-FIRSTD PIC X(08). SUM11A 03 WW10-ORDER-TYPE-FIRSTD PIC X. SUM11A SUM11A 03 WW10-REQ-DEL-DT-FIRSTD-F PIC X(10). SUM11A 03 WW10-REQ-DEL-TM-FIRSTD-F PIC X(08). SUM11A 03 WW10-NOT-CAL-DT-FIRSTD-F PIC X(10). SUM11A 03 WW10-NOT-CAL-TM-FIRSTD-F PIC X(08). SUM11A SUM11A 03 WW10-NOT-CAL-TM-PBS PIC X(08). SUM11A 03 WW10-NOT-CAL-TM-PBS-N REDEFINES WW10-NOT-CAL-TM-PBS. SUM11A 05 WW10-NOT-CAL-HRS-PBS PIC 9(2). SUM11A 05 FILLER PIC X(6). SUM11A 03 WW10-REQ-DEL-TM-PBS PIC X(08). SUM11A 03 WW10-REQ-DEL-TM-PBS-N REDEFINES SUM11A WW10-REQ-DEL-TM-PBS. SUM11A 05 WW10-REQ-DEL-HRS-PBS PIC 9(2). SUM11A 05 FILLER PIC X(6). SUM11A SUM11A 03 WW10-PPD-REQ-DEL-TM PIC X(08). SUM11A 03 WW10-PPD-REQ-DEL-TM-N REDEFINES WW10-PPD-REQ-DEL-TM. SUM11A 05 WW10-PPD-REQ-DEL-HRS PIC 9(2). SUM11A 05 FILLER PIC X(6). SUM11A 03 WW10-PPD-CALC-RUN-TM PIC X(08). SUM11A 03 WW10-PPD-CALC-RUN-TM-N REDEFINES WW10-PPD-CALC-RUN-TM. SUM11A 05 WW10-PPD-CALC-RUN-HRS PIC 9(2). SUM11A 05 FILLER PIC X(6). SUM11A 05160000 SPR08B 01 WW11-VARIABLES. SPR08B 03 WW11-EDS-NEW-PTP OCCURS 75. SPR08B 05 WW11-EXPECTED-DAILY-SALES PIC S9(5)V9(2) COMP-3. SPR08B 05 WW11-NOTNL-WKLY-SALES PIC S9(5)V9(2) COMP-3. SPR08B 05 WW11-NEW-PTP-DATE PIC X(10). SPR08B 03 WW11-NEXT-DAY-DATE PIC X(10). SUM11A 03 WW11-DAY-PTP PIC S9(3)V9(1) COMP-3. 060800* 06080000 SUM09A 01 WW12-VARIABLES. 02040103 SUM09A 03 WW12-SALES-RATE OCCURS 75. 02040203 SUM09A 05 WW12-SALES-RATE-THRESHOLD PIC S9(5)V9(2) COMP-3. 02041003 02042000 AUT09A 01 WW14. AUT09A 05 WW14-DIFF-IN-DAYS PIC S9(3) VALUE +0. 05910000 02042000 SUM10A 01 WW15-VARIABLES. SUM10A 05 WW15-NO-OF-DAYS-BSP-SALES-RQD PIC S9(4) COMP. 05910000 SUM10A 05 WW15-DATE-TILL-BSP-SALES-RQD PIC X(7). 02042000 SUM10A 05 WW15-LAST-BSP-TESCO-YRWK. 02042000 SUM10A 10 WW15-LAST-BSP-TESCO-YEAR PIC X(4). 02042000 SUM10A 10 WW15-LAST-BSP-TESCO-WEEK PIC X(2). 02042000 SUM10A 02042000 SUM10C 01 WW16-BFFOFCST-KEY. 01052000 SUM10C 05 WW16-BFFOFCST PIC X(7) VALUE "BFFOFCT". 01053000 SUM10C 05 WW16-BFFO-DATABASE-ID PIC X(1). 01053000 02042000 SUM10C 01 WW17-BGOCALC-KEY. 01052000 SUM10C 05 WW17-BGOCALC PIC X(7) VALUE "BGOCALC". 01053000 SUM10C 05 WW17-BGO-DATABASE-ID PIC X(1). 01053000 02042000 SUM11A 01 WW18-DISPMOD-QTY. 01052000 SUM11A 05 WW18-DIS-EXPCTD-BOOKSTK PIC S9(5)V99 COMP-3. 01053000 SUM11A 05 WW18-DIS-ACTUAL-BOOKSTK PIC S9(5)V99 COMP-3. 01053000 SUM11A 05 WW18-DIS-A-BKSTK PIC S9(5)V99 COMP-3. 01053000 SUM10A 02042000 SPR12A 01 WW19-ONETOUCH PIC S9(1)V9(2) COMP-3. SPR12A 01 WW20-BBP-VALUES. SPR12A 05 WW20-NOTNL-WKLY-SALES PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-BBP-SAVED-NWS PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-COR-PC PIC S9(4) COMP. SPR12A 05 WW20-RO-BPR-SCAP PIC S9(4) COMP. SPR12A 05 WW20-FIXED-ORD-QTY-1 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-FIXED-ORD-QTY-2 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-FIXED-ORD-QTY-3 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-FIXED-ORD-QTY-4 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-FIXED-ORD-QTY-5 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-FIXED-ORD-QTY-6 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-FIXED-ORD-QTY-7 PIC S9(5)V9(2) COMP-3. SPR12A 05 WW20-SFTY-STK-TREND-IND PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-1 PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-2 PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-3 PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-4 PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-5 PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-6 PIC X(1). SPR12A 05 WW20-SPEC-DEL-IND-7 PIC X(1). SPR12A SPR12A 01 WW21-PREV-RO-NO PIC S9(5) COMP-3 VALUE ZERO. SPR12A SUM12A 01 WW22-CURR-21-DAYS PIC X(10). SUM12A 01 WW23-GET-STKD-PROD-ENDT PIC X(10). SPR12A SUM12A 01 WW24-WRAP-WK-VALUES. SUM12A 05 WW24-START-DATE PIC X(10). SUM12A 05 WW24-WRAP-YEAR-WEEK PIC 9(6). SUM12A 05 WW24-CURR-WEEK-DAY7 PIC X(10). SUM12A 05 WW24-CURR-MINUS-ONE-YRWK SUM12A PIC 9(6). SUM12A 05 WW24-CURR-MINUS-ONE-WEEK-DAY7 SUM12A PIC X(10). SUM12A 05 WW24-CURR-YEAR-WEEK. SUM12A 07 WW24-CURR-YEAR PIC 9(4). SUM12A 07 WW24-CURR-WEEK PIC 9(2). SUM12A 01 WW24-CURR-CCYYWWD. SUM12A 05 WW24-CURR-YRWK PIC 9(6). SUM12A 05 WW24-DAY-NO PIC 9(1) VALUE 7. SPR12A SPR13B 01 WW25-SALES-ORDER PIC S9(4) COMP SPR13B VALUE -9999. SPR13B 01 WW26-FILLER-STOCK PIC S9(4) COMP SPR13B VALUE -9999. SUM13A 01 WW27-RPKCALC-KEYS. 01052000 SUM13A 05 WW27-RPKCALC-KEY PIC X(7) VALUE "RPKCALC". 01053000 SUM13A 01 WW28-RPKCALC-DATABASE-ID PIC X(1). 01053000 SPR14A 01 WW29-PR-PERC PIC 9(1)V99. SPR14A 01 WW29-PR-DAY1-PERC PIC 9(1)V99. SPR14A 01 WW29-PR-DAY2-PERC PIC 9(1)V99. SPR14A 01 WW29-RDD-RED-QTY PIC S9(5)V9(2) COMP-3. SPR14D 01 WW29-SALES. SPR14D 05 WW29-REDN-SALES PIC S9(5)V9(2). SPR14D 05 WW29-REDN-SALES-DET REDEFINES WW29-REDN-SALES. SPR14D 10 WW29-REDN-SALE-INT PIC S9(5). SPR14D 10 WW29-REDN-SALE-DEC PIC 9(2). SPR14D 01 WW30-RDT. SPR14D 05 WW30-RDT-RED-QTY PIC S9(5)V9(2). SPR14D 05 WW30-RDT-RED-QTY-DET REDEFINES WW30-RDT-RED-QTY. SPR14D 10 WW30-RDT-RED-INT PIC S9(5). SPR14D 10 WW30-RDT-RED-DEC PIC 9(2). SPR14D 01 WW31-ROUND-SALES PIC S9(5) COMP-3. SPR14D 01 WW32-SALES-DIFFERENCE PIC S9(5) COMP-3. 060900 01 WW-SQLCA. 06090000 061000 05 WW-SQLCAID PIC X(8). 06100000 061100 05 WW-SQLCABC PIC -(9)9. 06110000 061200 05 WW-SQLCD PIC -(9)9. 06120000 061300 05 WW-SQLERRMC PIC X(70). 06130000 061400 05 WW-SQLERRP PIC X(8). 06140000 061500 05 WW-SQLERRD PIC -(9)9. 06150000 061600 05 WW-SQLWARN PIC X(8). 06160000 061700 05 WW-SQLEXT PIC X(8). 06170000 061800 05 WW-X PIC 9(1). 06180000 061900* 06190000 088300 01 WW-NULL-FLAGS. 088400 03 WW-OLD-CD-LIFE-NN PIC S9(4) COMP VALUE ZERO. 088500 88 WW-OLD-CD-LIFE-NULL VALUE -1. 088510 03 WW-OLD-APPRT-ORD-QTY-NN PIC S9(4) COMP VALUE ZERO. 088520 88 WW-OLD-APPRT-ORD-QTY-NULL VALUE -1. 088521 03 WW-ORD-END-OF-WAVE-NN PIC S9(4) COMP VALUE ZERO. 088522 88 WW-ORD-END-OF-WAVE-IND-NULL VALUE -1. 088600 03 WW-OLC-CD-LIFE-NN PIC S9(4) COMP VALUE ZERO. 088700 88 WW-OLC-CD-LIFE-NULL VALUE -1. 088800 03 WW-OLC-PICK-QTY-NN PIC S9(4) COMP VALUE ZERO. 088900 88 WW-OLC-PICK-QTY-NULL VALUE -1. SPR13A 03 WW-JKNSFCHK-EXIST PIC X(02). PS2S11 01 WW-PAR-DATA. PS2S11 03 WW-CP PIC X(3). 00690000 PS2S11 03 FILLER REDEFINES WW-CP. 00690000 PS2S11 05 WW-CP-NUM PIC 9(3). 00690000 PS2S11 00690000 PS2S11 03 WW-CP-CALC PIC S9V99 COMP-3. 00690000 PS2S11 00690000 PS2S11 03 WW-KA PIC X(4). 00690000 PS2S11 03 FILLER REDEFINES WW-KA. 00690000 PS2S11 05 WW-KA-NUM PIC 9(4). 00690000 PS2S11 00690000 PS2S11* THE PICTURE CLAUSE S9(3)V99 COMP-3 IS USED INSTEAD OF 00690000 PS2S11* S9(2)V99 COMP-3 TO IMPROVE THE PERFORMANCE. 00690000 PS2S11 03 WW-KA-CALC-DFLT PIC S9(3)V99 COMP-3. 00690000 PS2S11 03 WW-KA-CALC PIC S9(3)V99 COMP-3. 00690000 PS2S11 00690000 PS2S11 03 WW-KB PIC X(5). 00690000 PS2S11 03 FILLER REDEFINES WW-KB. 00690000 PS2S11 05 WW-KB-NUM PIC 9(5). 00690000 PS2S11 00690000 PS2S11* THE PICTURE CLAUSE S9(2)V99999 COMP-3 IS USED INSTEAD OF 00690000 PS2S11* S9V99999 COMP-3 TO IMPROVE THE PERFORMANCE. 00690000 PS2S11 03 WW-KB-CALC-DFLT PIC S9(2)V99999 COMP-3. 00690000 PS2S11 03 WW-KB-CALC PIC S9(2)V99999 COMP-3. 00690000 PS2S11 PS2S11 03 WW-K-FACTOR-MIN-CALC PIC S99V99 COMP-3. PS2S11 03 WW-K-FACTOR-MAX-CALC PIC S99V99 COMP-3. PS2S11 03 WW-VALIDATE-K-FACTOR-MAX-X PIC X(3). PS2S11 03 FILLER REDEFINES PS2S11 WW-VALIDATE-K-FACTOR-MAX-X. PS2S11 05 WW-VALIDATE-K-FACTOR-MAX PIC 9(3). PS2S11 PS2S11 03 WW-VALIDATE-K-FACTOR-MIN-X PIC X(3). PS2S11 03 FILLER REDEFINES PS2S11 WW-VALIDATE-K-FACTOR-MIN-X. PS2S11 05 WW-VALIDATE-K-FACTOR-MIN PIC 9(3). PS2S11 03 WW-DEFAULT-K-FACTOR-MAX PIC S9(3)V99 COMP-3. PS2S11 03 WW-DEFAULT-K-FACTOR-MIN PIC S9(3)V99 COMP-3. PS2S11 03 WW-PROD-COEFFICIENT-DFLT PIC S9(7)V9(7) USAGE COMP-3. PS2S11 03 WW-PROD-COEFFICIENT-CALC PIC S9(7)V9(7) USAGE COMP-3. 01 WX-SUBSCRIPTS. 05 F PIC X(16) VALUE "WX-SUBSCRIPTS==>". AUT08B 05 WX01-SUB PIC S9(4) COMP VALUE +0. AUT08B 05 WX01-F46 PIC S9(4) COMP VALUE +0. SUM11A 05 WX01-F42 PIC S9(4) COMP VALUE +0. AUT08B 05 WX01-ORY-SUB PIC S9(4) COMP VALUE +0. SUM11A 05 WX01-ORH-SUB PIC S9(4) COMP VALUE +0. AUT08B 05 WX01-LKUP PIC S9(4) COMP VALUE +0. TA1226 05 WX01-BGO2 PIC S9(4) COMP VALUE +0. TA1226 05 WX02-BGO2 PIC S9(4) COMP VALUE +0. AUT08B 05 WX10-DATE-SUB PIC S9(4) COMP VALUE +0. 06240000 AUT08B 05 WX10-DATE-MAX PIC S9(4) COMP VALUE +50. 06250000 AUT08B 05 WX10-DATA-SUB1 PIC S9(4) COMP VALUE +0. 06260000 AUT08B 05 WX10-DATA-SUB2 PIC S9(4) COMP VALUE +0. 06270000 AUT08B 05 WX10-DATA-SUB3 PIC S9(4) COMP VALUE +0. 06270000 SPR14A 05 WX10-DATA-SUB4 PIC S9(4) COMP VALUE +0. AUT08B 05 WX10-DATA-MAX PIC S9(4) COMP VALUE +75. 06280000 AUT08B 05 WX10-NEW-SUB PIC S9(4) COMP VALUE +0. 00 AUT08B 05 WX20-SO-SUB PIC S9(4) COMP VALUE +0. AUT08B 05 WX20-SO-MAX PIC S9(4) COMP VALUE +75. AUT08B 05 WX20-SO-SUB2 PIC S9(4) COMP VALUE +0. AUT08B 05 WX20-SO-SUB2-MAX PIC S9(4) COMP VALUE +50. SUM10B 05 WX42-OLC-SUB1 PIC S9(4) COMP VALUE +0. SUM10C 05 WX42-OLC-SUB2 PIC S9(4) COMP VALUE +0. SUM10C 05 WX42-OLC-SUB3 PIC S9(4) COMP VALUE +0. SUM10B 05 WX42-OLC-SUB-COUNT PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SUB2 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-TEMP-SUB2 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-TEMP-SUB3 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SUB3 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SUB4 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SUB5 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SUB6 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SORT1 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SORT2 PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-SUB-COUNT PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-START-SUB PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-INIT-SUB PIC S9(4) COMP VALUE +0. SUM10B 05 WX41-OLD-LAST-SUB PIC S9(4) COMP VALUE +0. AUT08B 05 WX60-OGP-MAX PIC S9(4) COMP VALUE +100. AUT08B 05 WX60-OGP-COUNT PIC S9(4) COMP VALUE +0. AUT08B 05 WX10-DATA-SUB1-NEW PIC S9(4) COMP VALUE +0. AUT08B 05 WX70-DATA-SUB1 PIC S9(4) COMP VALUE +0. AUT08B 05 WX70-DATA-SUB2 PIC S9(4) COMP VALUE +0. AUT08B 05 WX80-WT40-SUB1 PIC S9(4) COMP VALUE +0. AUT09A 05 WX90-WT90-SUB PIC S9(4) COMP VALUE +0. AUT09A 05 WX90-WT90-SUB1 PIC S9(4) COMP VALUE +0. AUT09A 05 WX90-WT90-SUB2 PIC S9(4) COMP VALUE +0. AUT09A 05 WX90-WT90-SUB3 PIC S9(4) COMP VALUE +0. AUT09A 05 WX90-WT90-SUB4 PIC S9(4) COMP VALUE +0. SUM11A 05 WX90-WT90-SUB5 PIC S9(4) COMP VALUE +0. SPR14A 05 WX90-WT90-SUB6 PIC S9(4) COMP VALUE +0. AUT09A 05 WX90-WT90-MAX PIC S9(4) COMP VALUE +84. SPR12A 05 WX10-B475-SUB1 PIC S9(4) COMP VALUE +0. SPR12A 05 WX10-B475-SUB2 PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-DATE-SUB2 PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-DATE-SUB PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-DATE-SUB1 PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-NEW-SUB PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-NEW-SUB1 PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-CURR-MINUS-ONE-SUB PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-PREWK-DATE-SUB PIC S9(4) COMP VALUE +0. SUM12A 05 WX22-SUB PIC S9(4) COMP VALUE +0. SUM12A 05 WX95-SUB PIC S9(4) COMP VALUE +0. SUM12A 05 WX95-MAX PIC S9(4) COMP VALUE +0. DIS12A* 05 WX95-DISP PIC S9(4) COMP VALUE +0. SUM13A 05 WX96-DATE-SUB PIC S9(4) COMP VALUE +0. SUM13A 05 WX96-DATE-MAX PIC S9(4) COMP VALUE +25. SUM13A 05 WX96-RPK-SUB PIC S9(4) COMP VALUE +0. SUM13A 05 WX97-DATE-SUB PIC S9(4) COMP VALUE +0. SUM13A 05 WX97-DATE-MAX PIC S9(4) COMP VALUE +25. SUM13A 05 WX98-DATA-SUB PIC S9(4) COMP VALUE +0. SUM13A 05 WX98-DATA-MAX PIC S9(4) COMP VALUE +25. AVRS42 05 WX99-SUB PIC S9(4) COMP VALUE +0. 015390 01571001 01 W-SIMPLER-REPLEN-TRIAL. 01572001 01573001 015400* SAFETY STOCK TRIAL CRITERIA FROM THE PAR TABLE 01574001 015410* 01575001 015440* STORES - UP TO 50 STORES ALLOWED 01579001 015450 01582001 03 W-SRSSTROS-CRITERIA. 01583001 05 W-SRSST-STORE OCCURS 50 INDEXED BY W-SRSSTRO-IX. 01588001 07 W-SRSST-RO-NO PIC X(4). 01589001 07 PIC X. 01590001 015560 01593001 03 W-SRSSTSGS-CRITERIA. 01593101 05 W-SRSST-SUB-GROUP OCCURS 40 INDEXED BY W-SRSSTSG-IX. 01593201 07 W-SRSST-SG-CD PIC X(5). 01593301 07 PIC X. 01593401 015560 01593501 03 W-SRSSTROS-FLAG PIC X. 01594001 88 STORE-IN-SRSS-TRIAL VALUE "Y". 01595001 88 STORE-NOT-IN-SRSS-TRIAL VALUE "N". 01596001 03 W-SRSSTSGS-FLAG PIC X. 01596101 88 SG-IN-SRSS-TRIAL VALUE "Y". 01596201 88 SG-NOT-IN-SRSS-TRIAL VALUE "N". 01596301 015600 01597001 JFM08A 01 W-GAP-CONTROL-VRBLES. 01572001 JFM08A 03 WW-GAP-STK-CORR PIC S9(5)V99 COMP-3. JFM08A 03 WW-GAP-EXPCTD-BOOKSTK PIC S9(5)V99 COMP-3. AUT08B 03 WW-GAP-STK-CORR-ACTUAL-BS PIC S9(5)V99 COMP-3. 015600 01598001 AVRS42 01 WW-PREVIOUS-NWS PIC S9(5)V9(2) COMP-3. 015600 01598001 063000* WORKING STORAGE FOR CALLING DATE RETRIEVAL ROUTINE 06300000 063200 COPY JLCC01WS. 06320000 063400 COPY JL01XLNK. 06340000 063500 06350000 AUT07B COPY JLF26LNK. 06340000 06350000 063600 COPY ZZDATPAR. 06360000 NJ2S35 COPY JLF40LNK. KS2S45 COPY JLF46LNK. NJ2S35 COPY JLF42LNK. 06380000 NJ2S35 COPY JLF41LNK. 03481001 064000 COPY JLMSGWS. 06400000 064100 06410000 064200 COPY JLDB2EWS. 06420000 120700* * CAW ADDED LINK FOR JJ0009 CALLS 12070001 120800 COPY JJ009LNK. 12080001 109100* CAW 10910000 CRV90B COPY JL007LNK. 12080001 12090001 CRAUT3 COPY JLDATWS. 12090001 CRAUT3 12090001 NJ2S35 COPY JLF48LNK. 064300*-- GM -- 05/07/2000 -------------------------------------------* 06430000 064200 COPY ZFFTPRNT. 06420000 064300*---------------------------------------------------------------* 06430000 SPR13A COPY JLF30WS. AVRDEL COPY JLKFACWS. 064300 06430000 064400 EXEC SQL INCLUDE SQLCA 06440000 064500 END-EXEC. 06450000 064600 06460000 064700 EXEC SQL INCLUDE VXJJ0ALL 06470000 064800 END-EXEC. 06480000 064900 06490000 065000 EXEC SQL INCLUDE VXJJ0ALP 06500000 065100 END-EXEC. 06510000 065200 06520000 065500 06550000 065600 EXEC SQL INCLUDE VXJJ0BPR 06560000 065700 END-EXEC. 06570000 065800 06580000 066200 EXEC SQL INCLUDE VXJJ0BDL 06620000 066300 END-EXEC. 06630000 066400 06640000 CRV10B EXEC SQL INCLUDE VXJJ0OJD 06650000 CRV10B END-EXEC. 06660000 CRV10B 06670000 066500 EXEC SQL INCLUDE VXJJ0OLD 06650000 066600 END-EXEC. 06660000 066700 06670000 094100 EXEC SQL INCLUDE VXJJ0ORD 094200 END-EXEC. 097600 094400 EXEC SQL INCLUDE VXJJ0OLC 094500 END-EXEC. 097900 066800 EXEC SQL INCLUDE VXJJ0ROT 06680000 066900 END-EXEC. 06690000 067000 06700000 067100 EXEC SQL INCLUDE VXJJ0PAR 06710000 067200 END-EXEC. 06720000 098500 06730000 090400 EXEC SQL INCLUDE VXJJ0OGP 090500 END-EXEC. 098800 090700 EXEC SQL INCLUDE VXJJ0ASF 067200 END-EXEC. 06720000 098500 06730000 152300 EXEC SQL INCLUDE VXJJ0MMR 15230000 152400 END-EXEC. 15240000 152500 15250000 109774*----- 27/03/2001 - GM ---------------------------------------* 10977400 109775 EXEC SQL INCLUDE VXJJ0MMD 10977500 109776 END-EXEC. 10977600 109777*-------------------------------------------------------------* 10977700 CRV90B EXEC SQL INCLUDE VXJJ0DSF 10977500 CRV90B END-EXEC. 10977600 109778 10977800 CRAUT3 EXEC SQL INCLUDE VXJJ0SOO 10977500 CRAUT3 END-EXEC. 10977600 CRAUT3 10977800 CRAUT3 EXEC SQL INCLUDE VXJJ0SOP 10977500 069700 END-EXEC. 06970000 069800 06980000 SPR11B EXEC SQL INCLUDE VXJJ0POS 10977500 SPR11B END-EXEC. 06970000 069800 06980000 SPR11B EXEC SQL INCLUDE VXJJ0POD SPR11B END-EXEC. SPR11B EXEC SQL INCLUDE VXJJ0POH JFM09A END-EXEC. 06970000 JFM09A 06980000 SPR08B EXEC SQL INCLUDE VXJJ0PTP 069700 END-EXEC. 06970000 069800 06980000 SPR10A EXEC SQL INCLUDE VXJJ0PTG JFM09A END-EXEC. 06970000 SUM10A 06980000 SUM10A EXEC SQL INCLUDE VXJJ0OJX JFM09A END-EXEC. 06970000 JFM09A 06980000 SUM11A EXEC SQL INCLUDE VXJJ0OJG SUM11A END-EXEC. 06970000 JFM09A 06980000 SUM11A EXEC SQL INCLUDE VXJJ0PPD JFM09A END-EXEC. 06970000 JFM09A 06980000 SUM12A EXEC SQL INCLUDE VXJJ0XSA SUM12A END-EXEC. SUM12A EXEC SQL INCLUDE VXJJ0NIA JFM09A END-EXEC. 06970000 JFM09A 06980000 SPR13A EXEC SQL INCLUDE VXJJ0XSB SPR13A END-EXEC. SPR13A EXEC SQL INCLUDE VXJJ0DST SPR13A END-EXEC. SPR13A EXEC SQL INCLUDE VXJJ0RSC SPR13A END-EXEC. SPR13A EXEC SQL INCLUDE VXJJ0RST SPR13A END-EXEC. SPR13A EXEC SQL INCLUDE VXJJ0NWS JFM09A END-EXEC. 06970000 JFM09A 06980000 SUM13A EXEC SQL INCLUDE VXJJ0RPK JFM09A END-EXEC. 06970000 JFM09A 06980000 SPR14A EXEC SQL INCLUDE VXJJ0RDD SPR14A END-EXEC. SPR14A SPR14A EXEC SQL INCLUDE VXJJ0RDT JFM09A END-EXEC. 06970000 SUM14A EXEC SQL INCLUDE VXJJ0ROZ SUM14A END-EXEC. 06970000 SUM14A SUM14A EXEC SQL INCLUDE VXJJ0GPH AJIPOC END-EXEC. 06970000 142S03 EXEC SQL INCLUDE VXJJ0SGZ SUM14A END-EXEC. 06970000 SUM14A 171S47 EXEC SQL INCLUDE VXJJ0PGZ 171S47 END-EXEC. 06970000 171S47 069900 EXEC SQL DECLARE READNEXT_VXJJ0BDL CURSOR 06990000 070000 FOR SELECT DEV_LINE_STDT 07000000 070100 ,DEV_LINE_ENDT 07010000 070200 ,DEV_LINE_SIZE 07020000 070300 FROM VXJJ0BDL 07030000 070400 WHERE CR_PART_NO = :BDL-CR-PART-NO 07040000 070500 AND RO_NO = :BDL-RO-NO 07050000 070600 AND BPR_TPN = :BDL-BPR-TPN 07060000 070700* AND (DEV_LINE_STDT BETWEEN :WW01-BDL-START-DATE 07070000 070800* AND :WW01-BDL-END-DATE 07080000 070900* OR DEV_LINE_ENDT BETWEEN :WW01-BDL-START-DATE 07090000 071000* AND :WW01-BDL-END-DATE) 07100000 071100 ORDER BY DEV_LINE_STDT 07110000 071200 FOR READ ONLY 07120000 WITH UR 071300 END-EXEC. 07130000 071400 07140000 071500 EXEC SQL DECLARE READNEXT_VXJJ0OLD CURSOR 07150000 103600 FOR SELECT OLD.REQ_DEL_DT ,OLD.ORD_TYPE 121300 ,OLD.ORD_NO 12130000 ,OLD.CD_LIFE ,OLD.REVSD_ORD_QTY ,OLD.APPRT_ORD_QTY CRV90B ,OLD.LOAD_REF ,ORD.REQ_DEL_TM AUT09A ,ACT_DEL_DATE AUT09A ,ACT_DEL_TIME AUT09A ,END_OF_WAVE_IND SPR11B ,ORD.LOAD_CLOSE_DT 21780005 SPR11B ,ORD.OG_CD 21790005 SPR11B ,ORD.INV_NO 21800005 AB2S10 ,ORD.DELIVERY_STATUS 121700 FROM VXJJ0OLD OLD 12170000 ,VXJJ0ORD ORD 121800 WHERE OLD.CR_PART_NO = :OLD-CR-PART-NO 12180000 121900 AND OLD.RO_NO = :OLD-RO-NO 12190000 122000 AND OLD.BPR_TPN = :OLD-BPR-TPN 12200000 122100 AND OLD.REQ_DEL_DT BETWEEN 12210000 106000 :WW01-OLD-START-DATE AND :WW01-OLD-END-DATE AND OLD.CR_PART_NO = ORD.CR_PART_NO AND OLD.RO_NO = ORD.RO_NO AND OLD.REQ_DEL_DT = ORD.REQ_DEL_DT AND OLD.ORD_TYPE = ORD.ORD_TYPE AND OLD.LOAD_REF = ORD.LOAD_REF AND OLD.ORD_NO = ORD.ORD_NO 107400 107500 ORDER BY REQ_DEL_DT, ORD_TYPE 072700 FOR READ ONLY 07270000 WITH UR SPR08C QUERYNO 90001 072800 END-EXEC. 07280000 072900 07290000 122900 EXEC SQL DECLARE READNEXT_VXJJ0OLC CURSOR 12290000 123000 FOR SELECT OLC.CD_LIFE , OLC.PICK_QTY 12300000 123100 FROM VXJJ0OLC OLC 12310000 123200 WHERE OLC.CR_PART_NO = :OLD-CR-PART-NO 12320000 123300 AND OLC.RO_NO = :OLD-RO-NO 12330000 123400 AND OLC.BPR_TPN = :OLD-BPR-TPN 12340000 123500 AND OLC.REQ_DEL_DT = :OLD-REQ-DEL-DT 12350000 123600 AND OLC.ORD_TYPE = :OLD-ORD-TYPE 12360000 SUM10B ORDER BY OLC.PICK_QTY 12370000 132010 WITH UR 123800 END-EXEC. 12380000 123900 12390000 072900 07290000 073000 EXEC SQL DECLARE READNEXT_VXJJ0ALP CURSOR 07300000 073100 FOR SELECT REQ_DEL_DT 07310000 073200 ,APPORTIONMENT_PC 07320000 073300 ,ALLOC_PATTERN 07330000 073400 ,NEW_LINE_QTY 07340000 073500 ,DEMO_IND 07350000 073600 ,ROUND_UP_IND 07360000 073700 FROM VXJJ0ALP 07370000 073800 WHERE CR_PART_NO = :ALP-CR-PART-NO 07380000 073900 AND RO_NO = :ALP-RO-NO 07390000 074000 AND BPR_TPN = :ALP-BPR-TPN 07400000 074100* AND (REQ_DEL_DT >= :WW01-ALP-START-DATE 07410025 074110 AND (REQ_DEL_DT > :WW01-ALP-START-DATE 07411025 074200 AND REQ_DEL_DT <= :WW01-ALP-END-DATE) 07420000 074300 ORDER BY REQ_DEL_DT 07430000 074400 FOR READ ONLY 07440000 WITH UR 074500 END-EXEC. 07450000 074600 07460000 098400 EXEC SQL DECLARE READNEXT_VXJJ0OGP CURSOR 098500 FOR SELECT OG_CD 098600 ,LEGACY_ID 098700 FROM VXJJ0OGP 098800 ORDER BY OG_CD 098900 FOR READ ONLY WITH UR 099000 END-EXEC. 099100 105700 EXEC SQL DECLARE READNEXT_VXJJ0ASF CURSOR 105800 FOR SELECT SALES_DATE 105900 ,PREV_FCST_EDS 106100 FROM VXJJ0ASF 106200 WHERE CR_PART_NO = :ASF-CR-PART-NO 106300 AND RO_NO = :ASF-RO-NO 106400 AND BPR_TPN = :ASF-BPR-TPN 106500 AND SALES_DATE >= :ASF-SALES-DATE 106510 AND SALES_DATE - 7 DAYS <= :ASF-SALES-DATE 106700 ORDER BY SALES_DATE 074400 FOR READ ONLY 07440000 WITH UR 074500 END-EXEC. 07450000 074600 07460000 074700 07470000 164700* THIS CORSOR RETRIEVES ALL THE MM RESERVES. 16470006 164800 16480000 164900 EXEC SQL 16490000 165000 DECLARE MM_RSVE_CURSOR CURSOR FOR 16500006 165100 SELECT CR_PART_NO 16510000 165200 , RO_NO 16520000 165300 , BPR_TPN 16530000 165400 , RSVE_EFFV_DT 16540000 165500 , RSVE_END_DT 16550000 165600 , CURR_RSVE_QTY 16560000 165700 FROM VXJJ0MMR 16570000 165800 WHERE CR_PART_NO BETWEEN :JL01X-CR-PART-NO-FROM 16580000 165900 AND :JL01X-CR-PART-NO-TO 16590000 166000 ORDER BY CR_PART_NO 16600000 166100 , RO_NO 16610000 166200 , BPR_TPN 16620000 166300 , RSVE_EFFV_DT 16630000 166400 WITH UR 16640000 166500 END-EXEC. 16650000 166600 16660000 166700 16670000 166800* THIS CURSOR RETRIEVES ALL THE BD RESERVES. 16680000 166900 16690000 167000 EXEC SQL 16700000 167100 DECLARE BD_RSVE_CURSOR CURSOR FOR 16710000 167200 SELECT TEMP1.CR_PART_NO 16720000 167300 , TEMP1.RO_NO 16730000 167400 , TEMP1.BPR_TPN 16740000 167500 , TEMP1.EFFV_DT 16750000 167600 , TEMP1.END_DT 16760000 167700 , TEMP1.ALLOC_PATTERN 16770000 168900 , CASE WHEN TEMP1.TOTAL_APP_PC ^= 0 16890029 169000 THEN "Y" ELSE "N" END AS APPORTION_IND 16900029 167800 FROM ( 16780000 167900 SELECT CR_PART_NO 16790000 168000 , RO_NO 16800000 168100 , BPR_TPN 16810000 168200 , ALLOC_PATTERN 16820000 168300 , MIN(REQ_DEL_DT) AS EFFV_DT 16830000 168400 , MAX(REQ_DEL_DT) AS END_DT 16840000 169800 , SUM(APPORTIONMENT_PC) AS TOTAL_APP_PC 16980029 168500 FROM VXJJ0ALP 16850000 168600 WHERE CR_PART_NO BETWEEN :JL01X-CR-PART-NO-FROM 16860000 168700 AND :JL01X-CR-PART-NO-TO 16870000 169200 AND ALLOC_PATTERN ^= " " 16920016 168900 GROUP BY CR_PART_NO 16890000 169000 , RO_NO 16900000 169100 , BPR_TPN 16910000 169200 , ALLOC_PATTERN 16920000 169300 ) AS TEMP1 16930000 169400 ORDER BY TEMP1.CR_PART_NO 16940000 169500 , TEMP1.RO_NO 16950000 169600 , TEMP1.BPR_TPN 16960000 170100 , TEMP1.EFFV_DT 17010017 169800 WITH UR 16980000 169900 END-EXEC. 16990000 170000 17000000 SPR10A*CURSOR TO RETRIEVE THE SPECIAL PERIOD'S DAILY PTP SPR10A EXEC SQL SPR10A DECLARE PTG_CURSOR CURSOR FOR SPR10A SELECT TESCO_YEAR, SPR10A TESCO_WEEK, SPR10A PTP_DAY_1, SPR10A PTP_DAY_2, SPR10A PTP_DAY_3, SPR10A PTP_DAY_4, SPR10A PTP_DAY_5, SPR10A PTP_DAY_6, SPR10A PTP_DAY_7 SPR10A FROM VXJJ0PTG SPR10A WHERE CR_PART_NO = :WH02-CR-PART-NO SPR10A AND RO_NO = :WH02-RETAIL-OUTLET-NO SPR10A AND TESCO_YEAR || TESCO_WEEK SPR10A = :WH02-PTP-YRWK SPR10A AND SG_CD IN( :WH02-CURR-SG-CD-1, SPR10A :WH02-CURR-SG-CD-2, SPR10A :WH02-CURR-SG-CD-3, SPR10A :WH02-CURR-SG-CD-4, SPR10A :WH02-CURR-SG-CD-5) SPR10A AND BPR_TPN IN (0,:WH02-BASE-PRODUCT-NO) SPR10A ORDER BY SG_CD DESC SPR10A ,BPR_TPN DESC SPR10A FETCH FIRST ROW ONLY 169800 WITH UR 16980000 169900 END-EXEC. 16990000 170000 17000000 SPR08B* CURSOR TO RETRIEVE THE DAILY PTP. SPR08B EXEC SQL 16700000 SPR08B DECLARE PTP_CURSOR CURSOR FOR 16710000 SPR08B SELECT TESCO_YRWK, SUM12A TESCO_YRWK_END, SPR08B PTP_DAY_1, SPR08B PTP_DAY_2, SPR08B PTP_DAY_3, SPR08B PTP_DAY_4, SPR08B PTP_DAY_5, SPR08B PTP_DAY_6, SPR08B PTP_DAY_7, SUM12A PTP_TYPE SPR08B FROM VXJJ0PTP SPR08B WHERE CR_PART_NO = :WH02-CR-PART-NO SPR08B AND RO_NO = :WH02-RETAIL-OUTLET-NO SPR08B AND TESCO_YRWK <= :WH02-PTP-YRWK SPR08B AND SG_CD IN( :WH02-CURR-SG-CD-1, SPR08B :WH02-CURR-SG-CD-2, SPR08B :WH02-CURR-SG-CD-3, SPR08B :WH02-CURR-SG-CD-4, SPR08B :WH02-CURR-SG-CD-5) SPR08B AND BPR_TPN IN (0,:WH02-BASE-PRODUCT-NO) SUM11A AND TESCO_YRWK_END >= :WH02-PTP-YRWK SPR08B ORDER BY SG_CD DESC SPR08B ,BPR_TPN DESC SPR08B FETCH FIRST ROW ONLY SPR08B WITH UR SUM13A END-EXEC. SUM13A 17010000 SUM13A* CURSOR TO RETRIEVE RP PRODUCTS FROM OLD/ORD SUM13A EXEC SQL 16700000 SUM13A DECLARE READNEXT_VXJJ0OLD_RPK CURSOR FOR 16710000 SUM13A SELECT SUM13A DISTINCT OLD.REQ_DEL_DT SUM13A FROM VXJJ0OLD OLD SUM13A ,VXJJ0RPK RPK SUM13A WHERE OLD.CR_PART_NO = :OLD-CR-PART-NO SUM13A AND OLD.RO_NO = :OLD-RO-NO SUM13A AND OLD.BPR_TPN = RPK.BPR_TPN SUM13A AND OLD.REQ_DEL_DT BETWEEN SUM13A :WW01-START-DATE AND :WW01-OLD-END-DATE SUM13C AND RPK.COMP_BPR_TPN = :RPK-COMP-BPR-TPN SUM13C AND ((OLD.REVSD_ORD_QTY + OLD.DEC_DEL_ADJ) > 0 SUM13C OR ((OLD.REVSD_ORD_QTY + OLD.DEC_DEL_ADJ) = 0 SUM13C AND EXISTS (SELECT 1 SUM13C FROM VXJJ0OLD OLD1 SUM13C WHERE OLD1.CR_PART_NO = :OLD-CR-PART-NO SUM13C AND OLD1.RO_NO = :OLD-RO-NO SUM13C AND OLD1.REQ_DEL_DT = OLD.REQ_DEL_DT SUM13C AND OLD1.BPR_TPN = :RPK-COMP-BPR-TPN SUM13C AND OLD1.ORD_TYPE = OLD.ORD_TYPE SUM13C AND OLD1.ORIG_ORD_QTY = 0 SUM13C AND (OLD1.REVSD_ORD_QTY + OLD1.DEC_DEL_ADJ) > 0 SUM13C ))) SUM13C ORDER BY OLD.REQ_DEL_DT SUM13A FOR READ ONLY SUM13A WITH UR SUM13A END-EXEC. SUM13A 17010000 SUM13C* CURSOR TO RETRIEVE RP PRODUCTS FROM OJD SUM13A EXEC SQL 16700000 SUM13C DECLARE READNEXT_VXJJ0OJD_RPK CURSOR FOR 16710000 SUM13A SELECT SUM13C DISTINCT OJD.REQ_DEL_DT SUM13C FROM VXJJ0OJD OJD SUM13C ,VXJJ0RPK RPK SUM13C WHERE OJD.CR_PART_NO = :OJD-CR-PART-NO SUM13C AND OJD.RO_NO = :OJD-RO-NO SUM13C AND OJD.BPR_TPN = RPK.BPR_TPN SUM13C AND OJD.REQ_DEL_DT >= :WW01-START-DATE SUM13C AND OJD.ORD_TYPE IN ("F","T") SUM13C AND OJD.ORD_REC_TYPE = 0 SUM13C AND OJD.ORD_QTY > 0 SUM13C AND OJD.DELY_IND <> "N" SUM13C AND RPK.COMP_BPR_TPN = :RPK-COMP-BPR-TPN SUM13C AND NOT EXISTS (SELECT 1 FROM VXJJ0OLD OLD SUM13C WHERE OLD.CR_PART_NO = OJD.CR_PART_NO SUM13C AND OLD.RO_NO = OJD.RO_NO SUM13C AND OLD.BPR_TPN = RPK.BPR_TPN SUM13C AND OLD.REQ_DEL_DT = OJD.REQ_DEL_DT SUM13C AND OLD.ORD_TYPE = OJD.ORD_TYPE) SUM13C ORDER BY OJD.REQ_DEL_DT SUM13A FOR READ ONLY SUM13A WITH UR SPR08B END-EXEC. SPR14A SPR14A* CURSOR TO RETRIEVE LATEST SCAN AND REVIEWS FROM RDD SPR14A EXEC SQL SPR14A DECLARE READNEXT_VXJJ0RDD CURSOR FOR SPR14A SELECT RDD.RED_DATE SPR14A ,RDD.RED_QTY SPR14A ,RDD.APP_ID SPR14A ,VALUE(RDD.RDN_AT_SCN_IND,"N") SPR14A FROM VXJJ0RDD RDD SPR14A WHERE RDD.CR_PART_NO = :RDD-CR-PART-NO SPR14A AND RDD.RO_NO = :RDD-RO-NO SPR14A AND RDD.BPR_TPN = :RDD-BPR-TPN SPR14A AND RDD.RED_DATE IN (:WH04-REQ-DEL-DATE SPR14A ,:WH04-PREV-REQ-DEL-DATE) SPR14A AND RDD.RED_TYPE = "C" SPR14A AND RDD.OOC_DUE_DATE = :WH04-REQ-DEL-DATE SPR14A AND RDD.APP_ID IN ("RR","RT") SPR14A ORDER BY SPR14A RDD.RED_DATE SPR14A ,RDD.RED_TIME SPR14A ,RDD.APP_ID SPR14A ,RDD.RDN_AT_SCN_IND DESC SPR14A FOR READ ONLY SPR14A WITH UR SPR14A END-EXEC. SPR14A* CURSOR TO RETRIEVE QUANTITY SOLD AFTER REDUCTION FROM RDT SPR14A EXEC SQL SPR14A DECLARE RDT_CURSOR CURSOR FOR SPR14A SELECT RDT.RED_DATE SPR14A ,RDT.RED_QTY SPR14A FROM VXJJ0RDT RDT SPR14A WHERE RDT.CR_PART_NO = :RDD-CR-PART-NO SPR14A AND RDT.RO_NO = :RDD-RO-NO SPR14A AND RDT.BPR_TPN = :RDD-BPR-TPN SPR14A AND RDT.RED_DATE >= :RDD-RED-DATE SPR14A FOR READ ONLY SPR14A WITH UR SPR14A END-EXEC. SPR14A* CURSOR TO RETRIEVE OOC DATE FROM RDD SPR14A EXEC SQL SPR14A DECLARE READNEXT2_VXJJ0RDD CURSOR FOR SPR14A SELECT RDD.OOC_DUE_DATE SPR14A FROM VXJJ0RDD RDD SPR14A WHERE RDD.CR_PART_NO = :RDD-CR-PART-NO SPR14A AND RDD.RO_NO = :RDD-RO-NO SPR14A AND RDD.BPR_TPN = :RDD-BPR-TPN SPR14A AND RDD.RED_DATE = :RDT-RED-DATE SPR14A AND RDD.OOC_DUE_DATE >= :WD-YESTERDAY-DATE SPR14A AND RDD.OOC_DUE_DATE <= :WD-TOMORROW-DATE SPR14A AND RDD.RED_TYPE = "C" SPR14A AND (RDD.APP_ID = "RR" SPR14A OR (RDD.APP_ID = "RT" SPR14A AND RDD.RDN_AT_SCN_IND = "Y")) SPR14A ORDER BY RDD.OOC_DUE_DATE SUM13A FOR READ ONLY SUM13A WITH UR SPR08B END-EXEC. 170100 17010000 TA1226* CURSOR TO RETRIEVE SHELF SPACE FOR THE PROMOTIONS. TA1226 EXEC SQL DECLARE READNEXT_XSB_RST CURSOR 04790066 TA1226 FOR SELECT T1.EXP_STEP_EFF_DT 04793099 TA1226 ,T1.EXP_STEP_END_DT 04794099 TA1226 ,T1.OFFER_SHELF_CAP 04796099 TA1226 ,T1.PRE_OFFER_DEL_DATE 05700001 TA1226 FROM VXJJ0XSB T1 04850099 TA1226 WHERE T1.CR_PART_NO = :WH-CR-PART-NO 04852099 TA1226 AND T1.RO_NO = :WH-RO-NO 04853099 TA1226 AND T1.SG_CD = :WH-SG-CD 04854099 TA1226 AND T1.BPR_TPN = :WH-BPR-TPN 04855099 TA1226 AND T1.EXP_STEP_OWNER = "P" 04885099 TA1226 AND T1.RESOLVE_ACTION_IND <> "D" TA1226 AND T1.EXP_STEP_END_DT >= :WH-STEP-DATE 04886299 TA1226 AND T1.EXP_STEP_EFF_DT <= :WH-STEP-PLUS21-DATE 04886399 TA1226 AND EXISTS ( TA1226 SELECT 1 TA1226 FROM VXJJ0DST DST TA1226 , VXJJ0RST RST TA1226 , VXJJ0RSC RSC TA1226 WHERE DST.CR_PART_NO = T1.CR_PART_NO TA1226 AND DST.RO_NO = T1.RO_NO TA1226 AND DST.BPR_TPN = T1.BPR_TPN TA1226 AND DST.STEP_END_DT >= :WH-STEP-DATE TA1226 AND DST.STEP_EFF_DT <= :WH-STEP-PLUS21-DATE TA1226 AND DST.CR_PART_NO = RST.CR_PART_NO TA1226 AND DST.RO_NO = RST.RO_NO TA1226 AND DST.BPR_TPN = RST.BPR_TPN TA1226 AND DST.STEP_ID = RST.STEP_ID TA1226 AND DST.UNDERLYING_STEP_ID = TA1226 RST.UNDERLYING_STEP_ID TA1226 AND DST.STACK_INDEX = 1 TA1226 AND T1.STEP_TYPE_NUM = RST.STEP_TYPE_NUM TA1226 AND RST.STEP_TYPE_NUM = RSC.STEP_TYPE_NUM TA1226 AND RSC.STEP_FUNCTION = "P") TA1226 ORDER BY 1 05840001 TA1226 ,2 05850001 TA1226 WITH UR TA1226 END-EXEC. 04920005 TA1226 TA1226* CURSOR TO RETRIEVE SHELF SPACE FOR THE STACK BUILDS. TA1226 EXEC SQL DECLARE READNEXT_XSB_STACK CURSOR 04790066 TA1226 FOR SELECT 04793099 TA1226 T1.EXP_STEP_EFF_DT 04793099 TA1226 ,T1.EXP_STEP_END_DT 05650001 TA1226 ,T1.OFFER_SHELF_CAP 05690001 TA1226 ,T1.PRE_OFFER_DEL_DATE 05700001 TA1226 ,T1.STEP_TYPE_NUM 05710001 TA1226 FROM VXJJ0XSB T1 05720001 TA1226 WHERE T1.CR_PART_NO = :WH-CR-PART-NO TA1226 AND T1.RO_NO = :WH-RO-NO TA1226 AND T1.SG_CD = :WH-SG-CD TA1226 AND T1.BPR_TPN = :WH-BPR-TPN TA1226 AND T1.STEP_TYPE_NUM IN (555,666) TA1226 AND T1.EXP_STEP_END_DT >= :WH-STEP-DATE TA1226 AND T1.EXP_STEP_EFF_DT <= :WH-STEP-PLUS21-DATE TA1226 ORDER BY 1, 09080000 TA1226 2 TA1226 WITH UR TA1226 END-EXEC. 04920005 074800*===============================================================* 07480000 PROCEDURE DIVISION. 075000*===============================================================* 07500000 075200 A-010-MAIN-PROGRAM SECTION. 07520000 075300*---------------------------------------------------------------* 07530000 075400* SECTION NAME : A-010-MAIN-PROGRAM * 07540000 075500* CALLED BY : NONE * 07550000 075600* CALLS : A-100-INITIALIZE * 07560000 075700* : B-100-PROCESS * 07570000 075800* : C-100-TERMINATE * 07580000 075900* FUNCTION : 1. CONTROLS INITIALISATION, FILE PROCESSING * 07590000 076000* : AND TERMINATION OF THE PROCESS * 07600000 076100*---------------------------------------------------------------* 07610000 076200 A-010-MAIN-001. 07620000 076300 07630000 130000* DISPLAY "F30 VERSION 11.0". 15770016 076400 PERFORM A-100-INITIALIZE. 07640000 076500 07650000 076600 PERFORM B-100-PROCESS 07660000 076700 UNTIL END-OF-INPUT. 07670000 076800 07680000 076900 PERFORM C-100-TERMINATE. 07690000 077000 07700000 077100 GOBACK. 07710000 077200 07720000 077300 A-010-MAIN-EXIT. 07730000 EXIT. 077600 A-100-INITIALIZE SECTION. 07760000 077700*---------------------------------------------------------------* 07770000 077800* SECTION NAME : A-100-INITIALIZE * 07780000 077900* CALLED BY : A-010-MAIN * 07790000 078000* CALLS : JLMSG-DISPLAY-MESSAGE * 07800000 078100* : X-100-READ-INPUT * 07810000 078200* : D-100-LOAD-DATES * 07820000 078300* : V-100-READ-VXJJ0PAR * 07830000 078310* : JL01-CALL-JL0001 * 07831000 078320* FUNCTION : 1. INITIALIZE COUNTS * 07832000 078330* : 2. OPEN INPUT, OUTPUT AND REJECT FILES * 07833000 078340* : 3. PERFORM PACKAGE SWITCH CALL VIA JL0001 * 07834000 078350* : 4. READ INPUT FILE AND SET CURRENT VALUES * 07835000 103600* : 5. GET PARMS FROM PAR TABLE * CRSUP1* : 6. INITIALIZE OLD CURSOR DATA * 078360*---------------------------------------------------------------* 07836000 A-100. 078390 MOVE 0 TO WA01-RECS-INPUT. 07839000 078500 MOVE 0 TO WA01-RECS-OUTPUT1. 07850000 078600 MOVE 0 TO WA01-RECS-OUTPUT2 07860000 WA01-RECS-JLFODIAX. 07880000 078700 MOVE 0 TO WA01-RECS-OUTPUT3. 07870000 078800 MOVE 0 TO WA01-RECS-OUTPUT4. 07880000 079000 MOVE 0 TO WA01-RECS-REJECT1. 07900000 079100 MOVE 0 TO WA01-RECS-REJECT2. 07910000 WIN06A MOVE 0 TO WA01-RECS-JLDOTCOM 07910000 WA01-DOTCOM-SALES WA01-DOTCOM-SUBSTN 079300 MOVE 0 TO WA01-STORES-PROCESSED. 07930000 079400 MOVE 0 TO WA01-PRODUCTS-PROCESSED. 07940000 079500 MOVE 0 TO WA01-BSP-FETCHED. 07950000 SPR13A MOVE 0 TO WA01-ESP-FETCHED. 07950000 AUT07B MOVE 0 TO WA01-SFB-FETCHED. 07950000 079600 MOVE 0 TO WA01-OLD-FETCHED. 07960000 079700 MOVE 0 TO WA01-ALL-FETCHED. 07970000 079800 MOVE 0 TO WA01-ALP-FETCHED. 07980000 080000 MOVE 0 TO WA01-BPR-FETCHED. 08000000 080100 MOVE 0 TO WA01-BDL-FETCHED. 08010000 SUM13A MOVE 0 TO WA01-OLD-RP-FETCHED. 08010000 SUM13C MOVE 0 TO WA01-OJD-RP-FETCHED. 08010000 105900 MOVE 0 TO WA01-OGP-FETCHED. 113900 MOVE 0 TO WA01-ASF-FETCHED. SPR08B MOVE 0 TO WA01-PTP-FETCHED. SPR10A MOVE 0 TO WA01-PTG-FETCHED. 130070*----- 27/03/2001 - GM ---------------------------------------* 13007000 130080 MOVE 0 TO WA01-MMD-FETCHED. 13008000 130090*-------------------------------------------------------------* 13009000 CRV90B MOVE +0 TO WA01-DSF-FETCHED. 13008000 CRV10B MOVE +0 TO WA01-PRIMARY-OJD-FETCHED. 13008000 CRV10B MOVE +0 TO WA01-SECONDARY-OJD-FETCHED. 13008000 SPR12A MOVE +0 TO WA01-PTG-STORE-COUNT. 08072033 SUM12A MOVE +0 TO WA01-XSA-NIA-FETCHED. SPR13A MOVE +0 TO WA01-XSB-RSC-FETCHED. TA1226 MOVE +0 TO WA01-XSB-RST-FETCHED. TA1226 MOVE +0 TO WA01-XSB-STACK-FETCHED. 080300 MOVE +0 TO WA01-NO-OF-CASES 08030000 080400 WA01-NO-OF-ZERO-ORDERS 08040000 080500 WA01-NO-OF-PRIORITY1 08050000 080600 WA01-NO-OF-PRIORITY2 08060000 080600 WA01-NO-OF-PRIORITY3 08060000 080600 WA01-NO-OF-PRIORITY4 08060000 080700 WA01-NO-OF-OOT. 08070000 080720 MOVE +0 TO WA01-NO-OF-CALC-METH-1. 08072033 080730 MOVE +0 TO WA01-NO-OF-CALC-METH-2. 08073033 080740 MOVE +0 TO WA01-NO-OF-CALC-METH-3. 08074033 080750 MOVE +0 TO WA01-NO-OF-CALC-METH-4. 08075033 080760 MOVE +0 TO WA01-NO-OF-CALC-METH-5. 08076033 080770 MOVE +0 TO WA01-NO-OF-CALC-METH-6. 08077033 080780 MOVE +0 TO WA01-NO-OF-CALC-METH-7. 08078033 080790 MOVE +0 TO WA01-NO-OF-CALC-METH-8. 08079033 080791 MOVE +0 TO WA01-NO-OF-CALC-METH-9. 08079133 080791 MOVE +0 TO WA01-NO-OF-CALC-METH-A. 08079133 080791 MOVE +0 TO WA01-NO-OF-CALC-METH-B. 08079133 080791 MOVE +0 TO WA01-NO-OF-CALC-METH-C. 08079133 CRV10B MOVE +0 TO WA01-NO-OF-CALC-METH-D. 08079133 CRV10B MOVE +0 TO WA01-NO-OF-CALC-METH-E. 08079133 CRV10C MOVE +0 TO WA01-NO-OF-CALC-METH-F. 08079133 CRAUTA MOVE +0 TO WA01-NO-OF-CALC-METH-I. 08079133 SUM11A MOVE +0 TO WA01-NO-OF-CALC-METH-Y. 08072033 SUM11A MOVE +0 TO WA01-NO-OF-CALC-METH-Z. 08072033 142S02 MOVE +0 TO WA01-NO-OF-CALC-METH-O. 08072033 142S02 MOVE +0 TO WA01-NO-OF-CALC-METH-P. 08072033 080800 08080000 SUM14B MOVE 0 TO WW-PREV-RO-NO 142S03 WW-PREV-STORE-NO PS2S11 WW-PREV-STORE AVRS42 WW-PREV-STORE1 KS2S45 WW-PREV-STORE2 171S47 WW-PREV-STORE3 SUM12A SET WI20-CALC-METH-I TO TRUE 180100 SET WI10-MM-RSVE-CURSOR-CLOSED TO TRUE 18010000 180200 SET WI12-BD-RSVE-CURSOR-CLOSED TO TRUE 18020000 180300 MOVE +0 TO WA01-MM-RSVE-CURSOR-ROW-COUNT 18030006 180400 WA01-BD-RSVE-CURSOR-ROW-COUNT 18040006 180500 INITIALIZE DCLVXJJ0MMR 18050000 180600 DCLVXJJ0ALP 18060000 180700 WH01-BD-RSVE-CURSOR-ROW 18070004 WIN06A WW01-DTCMES-KEY AUT08A WW01-MAX-SHELF-LIFE AUT07B JLF26LNK-LINKAGE 29140000 AUT08B WW01-PREV-RO-NO SUM12A WT95-WRAP-SALES-ARRAY-DATA SPR13A JLF30-INPUT-FIELDS CRSUP1 WT40-OLD-CURSOR-DATA PP2S12 WW-PAR-DATA AVRDEL WW-JLPCO-REC AVRDEL WW-JLCTD-REC AVRS42 WW-PREVIOUS-NWS 180800 18080000 080900 MOVE WF01-PROGRAM-ID TO JLMSG-PROGRAM-ID 08090000 081000 JLDB2E-PROGRAM-ID. 08100000 081100 08110000 081200 SET NOT-END-OF-INPUT 08120000 081300 TO TRUE. 08130000 081400 08140000 081400 08140000 OPEN INPUT INPUT-FILE INPUT4-FILE INPUT6-FILE 13780000 081400 08140000 081700 IF FS01-INPUT NOT = "00" 08170000 081800 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 08180000 081900 SET JLMSG-C98-FILE-IO-ERROR 08190000 082000 JLMSG-C98-OPEN TO TRUE 08200000 082100 MOVE WF01-JLF30I01 TO JLMSG-C98-FILE-NAME 08210000 082200 MOVE FS01-INPUT TO JLMSG-C98-FILE-STATUS 08220000 082300 PERFORM JLMSG-DISPLAY-MESSAGE 08230000 082400 END-IF. 08240000 082500 08250000 138900 IF FS01-INPUT4 NOT = "00" 13890000 139000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 13900000 139100 SET JLMSG-C98-FILE-IO-ERROR 13910000 139200 JLMSG-C98-OPEN TO TRUE 13920000 139300 MOVE WF01-JLF30I04 TO JLMSG-C98-FILE-NAME 13930000 139400 MOVE FS01-INPUT4 TO JLMSG-C98-FILE-STATUS 13940000 139500 PERFORM JLMSG-DISPLAY-MESSAGE 13950000 139600 END-IF. 13960000 * 13970000 IF FS01-INPUT6 NOT = "00" 13890000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 13900000 SET JLMSG-C98-FILE-IO-ERROR 13910000 JLMSG-C98-OPEN TO TRUE 13920000 MOVE WF01-JLF30I06 TO JLMSG-C98-FILE-NAME 13930000 MOVE FS01-INPUT6 TO JLMSG-C98-FILE-STATUS 13940000 PERFORM JLMSG-DISPLAY-MESSAGE 13950000 END-IF 13960000 * 13970000 082600 OPEN OUTPUT OUTPUT-FILE1. 08260000 082700 08270000 082800 IF FS01-OUTPUT NOT = "00" 08280000 082900 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 08290000 083000 SET JLMSG-C98-FILE-IO-ERROR 08300000 083100 JLMSG-C98-OPEN TO TRUE 08310000 083200 MOVE WF01-JLF30O01 TO JLMSG-C98-FILE-NAME 08320000 083300 MOVE FS01-OUTPUT TO JLMSG-C98-FILE-STATUS 08330000 083400 PERFORM JLMSG-DISPLAY-MESSAGE 08340000 083500 END-IF. 08350000 083600 08360000 083700 OPEN OUTPUT OUTPUT-FILE2. 08370000 083800 08380000 083900 IF FS02-OUTPUT NOT = "00" 08390000 084000 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 08400000 084100 SET JLMSG-C98-FILE-IO-ERROR 08410000 084200 JLMSG-C98-OPEN TO TRUE 08420000 084300 MOVE WF01-JLF30O02 TO JLMSG-C98-FILE-NAME 08430000 084400 MOVE FS02-OUTPUT TO JLMSG-C98-FILE-STATUS 08440000 084500 PERFORM JLMSG-DISPLAY-MESSAGE 08450000 084600 END-IF. 08460000 084700 08470000 084800 OPEN OUTPUT OUTPUT-FILE3. 08480000 084900 08490000 085000 IF FS03-OUTPUT NOT = "00" 08500000 085100 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 08510000 085200 SET JLMSG-C98-FILE-IO-ERROR 08520000 085300 JLMSG-C98-OPEN TO TRUE 08530000 085400 MOVE WF01-JLF30O03 TO JLMSG-C98-FILE-NAME 08540000 085500 MOVE FS03-OUTPUT TO JLMSG-C98-FILE-STATUS 08550000 085600 PERFORM JLMSG-DISPLAY-MESSAGE 08560000 085700 END-IF. 08570000 085800 08580000 085900 OPEN OUTPUT OUTPUT-FILE4. 08590000 086000 08600000 086100 IF FS04-OUTPUT NOT = "00" 08610000 086200 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 08620000 086300 SET JLMSG-C98-FILE-IO-ERROR 08630000 086400 JLMSG-C98-OPEN TO TRUE 08640000 086500 MOVE WF01-JLF30O04 TO JLMSG-C98-FILE-NAME 08650000 086600 MOVE FS04-OUTPUT TO JLMSG-C98-FILE-STATUS 08660000 086700 PERFORM JLMSG-DISPLAY-MESSAGE 08670000 086800 END-IF. 08680000 086900 08690000 087000 OPEN OUTPUT REJECT-FILE1. 08700000 087100 08710000 087200 IF FS01-REJECT NOT = "00" 08720000 087300 MOVE WM03-REJECT-FILE TO JLMSG-TEXT 08730000 087400 SET JLMSG-C98-FILE-IO-ERROR 08740000 087500 JLMSG-C98-OPEN TO TRUE 08750000 087600 MOVE WF01-JLF30O05 TO JLMSG-C98-FILE-NAME 08760000 087700 MOVE FS01-REJECT TO JLMSG-C98-FILE-STATUS 08770000 087800 PERFORM JLMSG-DISPLAY-MESSAGE 08780000 087900 END-IF. 08790000 088000 08800000 088100 OPEN OUTPUT REJECT-FILE2. 08810000 088200 08820000 088300 IF FS02-REJECT NOT = "00" 08830000 088400 MOVE WM03-REJECT-FILE TO JLMSG-TEXT 08840000 088500 SET JLMSG-C98-FILE-IO-ERROR 08850000 088600 JLMSG-C98-OPEN TO TRUE 08860000 088700 MOVE WF01-JLF30O06 TO JLMSG-C98-FILE-NAME 08870000 088800 MOVE FS02-REJECT TO JLMSG-C98-FILE-STATUS 08880000 088900 PERFORM JLMSG-DISPLAY-MESSAGE 08890000 089000 END-IF. 08900000 089100 08910000 116000 OPEN OUTPUT JLFODKSS-FILE. 116100 116200 IF JLFODKSS-STATUS NOT = "00" 116300 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 116400 SET JLMSG-C98-FILE-IO-ERROR 116500 JLMSG-C98-OPEN TO TRUE 116600 MOVE WF01-JLF30O07 TO JLMSG-C98-FILE-NAME 116700 MOVE JLFODKSS-STATUS TO JLMSG-C98-FILE-STATUS 116800 PERFORM JLMSG-DISPLAY-MESSAGE 116900 END-IF. 117000 125100 OPEN OUTPUT JLFOEOOC-FILE. 125200 125300 IF JLFOEOOC-STATUS NOT = "00" 125400 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 125500 SET JLMSG-C98-FILE-IO-ERROR 125600 JLMSG-C98-OPEN TO TRUE 125700 MOVE WF01-JLF30O08 TO JLMSG-C98-FILE-NAME 125800 MOVE JLFOEOOC-STATUS TO JLMSG-C98-FILE-STATUS 125900 PERFORM JLMSG-DISPLAY-MESSAGE 126000 END-IF. 126100 OPEN OUTPUT JLFODIAX-FILE. IF JLFODIAX-STATUS NOT = "00" MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT SET JLMSG-C98-FILE-IO-ERROR JLMSG-C98-OPEN TO TRUE MOVE WF01-JLF30O09 TO JLMSG-C98-FILE-NAME MOVE JLFODIAX-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE END-IF. SUM11A OPEN OUTPUT JLFODIAH-FILE. SUM11A SUM11A IF JLFODIAH-STATUS NOT = "00" SUM11A MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT SUM11A SET JLMSG-C98-FILE-IO-ERROR SUM11A JLMSG-C98-OPEN TO TRUE SUM11A MOVE WF01-JLF30O10 TO JLMSG-C98-FILE-NAME SUM11A MOVE JLFODIAH-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE END-IF. RD2S19 OPEN OUTPUT JLUNCCAL-FILE. RD2S19 RD2S19 IF JLUNCCAL-STATUS NOT = "00" RD2S19 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT RD2S19 SET JLMSG-C98-FILE-IO-ERROR RD2S19 JLMSG-C98-OPEN TO TRUE RD2S19 MOVE WF01-JLF30O11 TO JLMSG-C98-FILE-NAME RD2S19 MOVE JLUNCCAL-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE END-IF. 192300 OPEN INPUT JLALRESV. 19230004 192400 19240004 192500 IF JLALRESV-STATUS NOT = "00" 19250004 192600 SET JLMSG-C98-FILE-IO-ERROR 19260004 192700 JLMSG-C98-OPEN TO TRUE 19270004 192800 MOVE WF01-JLF30I05 TO JLMSG-C98-FILE-NAME 19280004 192900 MOVE JLALRESV-STATUS TO JLMSG-C98-FILE-STATUS 19290004 193000 PERFORM JLMSG-DISPLAY-MESSAGE 19300004 193100 END-IF. 19310004 193200 19320000 WIN06B OPEN INPUT JLDOTCOM. 19230004 WIN06B 19240004 WIN06B IF JLDOTCOM-STATUS NOT = "00" 19250004 WIN06B SET JLMSG-C98-FILE-IO-ERROR 19260004 WIN06B JLMSG-C98-OPEN TO TRUE 19270004 WIN06B MOVE WF01-JLF30I07 TO JLMSG-C98-FILE-NAME 19280004 WIN06B MOVE JLDOTCOM-STATUS TO JLMSG-C98-FILE-STATUS 19290004 WIN06B PERFORM JLMSG-DISPLAY-MESSAGE 19300004 WIN06B END-IF. 19310004 WIN06B 19320000 WIN06A OPEN INPUT DOTCOM-SALES-FILE 05460001 IF FS01-INPUT8 NOT = "00" 13890000 SET JLMSG-C98-FILE-IO-ERROR 05490001 JLMSG-C98-OPEN TO TRUE MOVE WF01-JLF30I08 TO JLMSG-C98-FILE-NAME MOVE FS01-INPUT8 TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE 05530001 END-IF 05540001 05550001 OPEN INPUT JLFOLKUP-FILE 05460001 IF JLFOLKUP-STATUS NOT = "00" 13890000 SET JLMSG-C98-FILE-IO-ERROR 05490001 JLMSG-C98-OPEN TO TRUE MOVE WF01-JLF30I09 TO JLMSG-C98-FILE-NAME MOVE JLFOLKUP-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE 05530001 END-IF 05540001 05540001 OPEN INPUT JLFOEXCP-FILE 05460001 IF JLFOEXCP-STATUS NOT = "00" 13890000 SET JLMSG-C98-FILE-IO-ERROR 05490001 JLMSG-C98-OPEN TO TRUE MOVE WF01-JLF30I10 TO JLMSG-C98-FILE-NAME MOVE JLFOEXCP-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE 05530001 END-IF 05540001 AVRS32 AVRS32 OPEN INPUT JLFOREFD-FILE AVRS32 05460001 AVRS32 IF JLFOREFD-STATUS NOT = "00" 13890000 AVRS32 SET JLMSG-C98-FILE-IO-ERROR 05490001 AVRS32 JLMSG-C98-OPEN TO TRUE AVRS32 MOVE WF01-JLF30I13 TO JLMSG-C98-FILE-NAME AVRS32 MOVE JLFOREFD-STATUS TO JLMSG-C98-FILE-STATUS AVRS32 PERFORM JLMSG-DISPLAY-MESSAGE 05530001 AVRS32 END-IF 05540001 05550001 193300* READ THE FIRST BACK-TO-BACK BD ALLOCATION RESERVE RECORD. 19330004 193400 SET WI13-NOT-END-OF-JLALRESV TO TRUE 19340004 193500 PERFORM XA-READ-JLALRESV 19350004 WIN06B 19240004 WIN06B* READ THE FIRST DOTCOM CODE LIFE RECORD. 19330004 WIN06B SET WI15-NOT-END-OF-JLDOTCOM TO TRUE 19340004 WIN06B PERFORM XB-READ-JLDOTCOM 19350004 193600 19360004 WIN06B IF WI15-END-OF-JLDOTCOM 90060004 WIN06B MOVE WF01-JLF30I07 TO WM35-FILE-NAME 08970000 WIN06B MOVE WM35-EMPTY-DOTCOM-FILE TO JLMSG-TEXT 08980000 WIN06B PERFORM JLMSG-DISPLAY-MESSAGE 08990000 WIN06B END-IF 90060004 WIN06B 19320000 SET JL01X-RUN-ID-REQD TO TRUE. 20110001 201200 SET JL01X-PARTITION-RANGE-REQD TO TRUE. 20120001 091400 09140000 091500 PERFORM JL01-CALL-JL0001. 09150000 091600 09160000 091700 IF NOT JL01X-VALID 09170000 091800 MOVE JL01X-RETURN-CODE TO WM06-RETURN-CODE 09180000 091900 MOVE WM06-JL0001-ERROR TO JLMSG-TEXT 09190000 092000 PERFORM JLMSG-DISPLAY-MESSAGE 09200000 092100 END-IF. 09210000 193600 19360004 089200 PERFORM D-100-LOAD-DATES. 08920000 089300 08930000 SUM12A MOVE 22 TO WX22-DATE-SUB2 SUM12A MOVE WT30-CCYY-MM-DD (WX22-DATE-SUB2) TO SUM12A WW22-CURR-21-DAYS 089300 08930000 089400 PERFORM X-100-READ-INPUT. 08940000 089500 08950000 089600 IF END-OF-INPUT 08960000 089700 MOVE WF01-JLF30I01 TO WM07-FILE-NAME 08970000 089800 MOVE WM07-EMPTY-INPUT TO JLMSG-TEXT 08980000 WIN06B PERFORM JLMSG-DISPLAY-MESSAGE 08990000 090000 SET END-OF-INPUT TO TRUE 09000000 090100 GO TO A-100-EXIT 09010000 090200 END-IF. 09020000 WIN06B 19320000 157700 MOVE JL25A-RETAIL-OUTLET-NO TO WM23-RO-NO. 15770000 157800 MOVE JL25A-CR-PART-NO TO WM23-PART-NO. 15780000 157900 MOVE WM23-STORE-MESS TO JLMSG-TEXT. 15790000 158000 PERFORM JLMSG-DISPLAY-MESSAGE. 15800000 093200 09320000 093300 PERFORM V-100-READ-VXJJ0PAR. 09330000 093400 09340000 KS2S09* PERFORM JKNSFCHK-REL-PHASE-PAR 093400 09340000 158400 PERFORM B-150-INIT-DATA-TABLES. 15840000 093700 09370000 121900 PERFORM E-LOAD-OGP-TABLE. 122000 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 158400 PERFORM A-150-VERIFY-TI-VALUES. 15840000 022600*-------------------------------------------------------------* 02260000 122000 PERFORM X-500-READ-INPUT6 08940000 08950000 IF EOF-INPUT6 08960000 MOVE WF01-JLF30I06 TO WM07-FILE-NAME 08970000 MOVE WM07-EMPTY-INPUT TO JLMSG-TEXT 08980000 PERFORM JLMSG-DISPLAY-MESSAGE 08990000 END-IF 09020000 09020000 SPR12A MOVE "Y" TO WI18-ONETOUCH-POP-IND PERFORM A-200-LOAD-JLFOLKUP 08950000 UNTIL JLFOLKUP-STATUS = "10" OR WX01-LKUP = +1000 08950000 SPR12A IF WI18-ONETOUCH-POP-IND = "Y" SPR12A MOVE 4.99 TO WW19-ONETOUCH SPR12A END-IF 08950000 * READ FIRST EXCEPTION RECORD 08940000 PERFORM X-700-READ-JLFOEXCP 08940000 08940000 AUT09A* GET ALL THE ISO & WF DATES BETWEEN -35 DAYS AGO AND 49 DAYS 08940000 AUT09A* INTO THE FUTURE 08940000 AUT09A PERFORM A-300-LOAD-ISO-WF-DATES 08940000 08940000 SPR14A* COMPUTE MIN AND MAX POTENTIAL REDUCTION PERCENTAGE SPR14A COMPUTE WW29-PR-DAY1-PERC = (WF01-PTRDNDAY / WF01-PER) SPR14A SPR14A COMPUTE WW29-PR-DAY2-PERC = SPR14A ((WF01-PER - WF01-PTRDNDAY) / WF01-PER) 08940000 AVRDEL PERFORM X-800-READ-CSTRND-PRDCEF-FILES . 093800 A-100-EXIT. 09380000 093900 EXIT. 09390000 094000 09400000 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 163500 A-150-VERIFY-TI-VALUES SECTION. 16350000 077700*---------------------------------------------------------------* 07770000 077800* SECTION NAME : A-150-VERIFY-TI-VALUES * 07780000 077900* CALLED BY : A-100-INITIALIZE * 07790000 078000* CALLS : * 07800000 078320* FUNCTION : 1. VERIFY THAT THE TI VALUES RETRIEVED FROM * 07832000 078330* : THE PAR TABLE ARE IN THE RANGE :- * 07833000 078340* : 010 TO 999 (01.0 TO 99.9) * 07834000 078350* : 2. IF A VALUE IS FOUND OUT OF RANGE, SET IT * 07835000 078350* : TO 010 (01.0) WHICH IS THE DEFAULT AND WILL* 07835000 078350* : ALLOW THE CALCULATION TO CONTINUE AS IT * 07835000 078350* : WOULD HAVE PRIOR TO THE CARDIFF UNI CHANGES* 07835000 078360*---------------------------------------------------------------* 07836000 A-150. 163900 16390000 164000 IF WF01-TI-COR0 >= 010 16400000 164000 AND WF01-TI-COR0 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR0 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR1 >= 010 16400000 164000 AND WF01-TI-COR1 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR1 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR2 >= 010 16400000 164000 AND WF01-TI-COR2 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR2 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR3 >= 010 16400000 164000 AND WF01-TI-COR3 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR3 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR4 >= 010 16400000 164000 AND WF01-TI-COR4 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR4 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR5 >= 010 16400000 164000 AND WF01-TI-COR5 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR5 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR6 >= 010 16400000 164000 AND WF01-TI-COR6 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR6 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR7 >= 010 16400000 164000 AND WF01-TI-COR7 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR7 16440000 164500 END-IF. 16450000 16540000 164000 IF WF01-TI-COR8 >= 010 16400000 164000 AND WF01-TI-COR8 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR8 16440000 164500 END-IF. 16450000 164800 16480000 164000 IF WF01-TI-COR9 >= 010 16400000 164000 AND WF01-TI-COR9 <= 999 16400000 164100 THEN 16410000 164200 CONTINUE 16420000 164300 ELSE 16430000 164400 MOVE 010 TO WF01-TI-COR9 16440000 164500 END-IF. 16450000 16540000 165500 A-150-EXIT. 16550000 093900 EXIT. 09390000 09410000 A-200-LOAD-JLFOLKUP SECTION. 09410000 *---------------------------------------------------------------* 09420000 PERFORM X-600-READ-JLFOLKUP 08940000 IF JLFOLKUP-STATUS = "00" ADD +1 TO WX01-LKUP WA01-RECS-JLFOLKUP MOVE JLFEX-Z-VALUE TO WW09-Z-VALUE(WX01-LKUP) MOVE JLFEX-BFZ-VALUE TO WW09-BFZ-VALUE(WX01-LKUP) MOVE JLFEX-LFZ-VALUE TO WW09-LFZ-VALUE(WX01-LKUP) SPR12A IF WF01-BFFO1TCH < JLFEX-BFZ-VALUE SPR12A AND WI18-ONETOUCH-POP-IND = "Y" SPR12A MOVE JLFEX-Z-VALUE SPR12A TO WW19-ONETOUCH SPR12A MOVE "N" TO WI18-ONETOUCH-POP-IND SPR12A END-IF END-IF 16540000 . 16540000 A-200-EXIT. 16550000 093900 EXIT. 09390000 094000 09400000 AUT09A A-300-LOAD-ISO-WF-DATES SECTION. AUT09A*---------------------------------------------------------------* 09420000 AUT09A* SECTION NAME : A-300-LOAD-ISO-WF-DATES * 09430000 AUT09A* CALLED BY : A-100-INITIALIZE * 09440000 AUT09A* FUNCTION : GETS THE ISO & WF DATES BETWEEN -35 DAYS AGO * 09470000 AUT09A* : AND 49 DAYS INTO THE FUTURE.HERE THE INPUT * 09480000 AUT09A* : DATE TO BUILD THE ARRAY IS CURRENT DATE. * 09490000 AUT09A*---------------------------------------------------------------* 09420000 AUT09A A-300. AUT09A* DISPLAY "A-300". AUT09A AUT09A MOVE WW01-CURR-DATE TO WW01-CURR-DATE-ISO AUT09A MOVE -36 TO WW14-DIFF-IN-DAYS AUT09A AUT09A PERFORM VARYING WX90-WT90-SUB FROM 1 BY 1 AUT09A UNTIL WX90-WT90-SUB > WX90-WT90-MAX AUT09A AUT09A MOVE ZEROES TO ZZD-ERROR-CODE AUT09A MOVE "A" TO ZZD-FUNCTION-CODE AUT09A MOVE "ISO" TO ZZD-DATE1-FORMAT AUT09A MOVE WW01-CURR-DATE-ISO TO ZZD-DATE1 AUT09A MOVE "ISO" TO ZZD-DATE2-FORMAT AUT09A COMPUTE WW14-DIFF-IN-DAYS = 1 + WW14-DIFF-IN-DAYS AUT09A MOVE WW14-DIFF-IN-DAYS TO ZZD-DIFF-IN-DAYS AUT09A SPR14B PERFORM ZA-CALL-JL0F32 10860000 AUT09A AUT09A IF ZZD-ERROR-CODE NOT = 00 AUT09A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE AUT09A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT AUT09A PERFORM JLMSG-DISPLAY-MESSAGE AUT09A END-IF AUT09A AUT09A MOVE ZZD-DATE2 TO AUT09A WT90-ISO-FORMAT (WX90-WT90-SUB) AUT09A* DISPLAY "WT90-ISO-FORMAT ( " WX90-WT90-SUB " ) " AUT09A* WT90-ISO-FORMAT (WX90-WT90-SUB) AUT09A AUT09A MOVE ZEROES TO ZZD-ERROR-CODE AUT09A MOVE "A" TO ZZD-FUNCTION-CODE AUT09A MOVE "ISO" TO ZZD-DATE1-FORMAT AUT09A MOVE WT90-ISO-FORMAT (WX90-WT90-SUB) AUT09A TO ZZD-DATE1 AUT09A MOVE "WF" TO ZZD-DATE2-FORMAT AUT09A MOVE -1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 AUT09A AUT09A IF ZZD-ERROR-CODE NOT = 00 AUT09A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE AUT09A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT AUT09A PERFORM JLMSG-DISPLAY-MESSAGE AUT09A END-IF AUT09A AUT09A MOVE ZZD-DATE2(1:4) TO AUT09A WT90-WF-TESCO-YEAR(WX90-WT90-SUB) AUT09A MOVE ZZD-DATE2(5:2) TO AUT09A WT90-WF-TESCO-WEEK(WX90-WT90-SUB) AUT09A MOVE ZZD-DATE2(7:1) TO AUT09A WT90-WF-DAY-NO(WX90-WT90-SUB) AUT09A AUT09A* DISPLAY "WT90-WF-FORMAT (" WX90-WT90-SUB ")" AUT09A* WT90-WF-FORMAT (WX90-WT90-SUB) AUT09A END-PERFORM. AUT09A AUT09A A-300-EXIT. 16550000 093900 EXIT. 09390000 09410000 094100 B-100-PROCESS SECTION. 09410000 094200*---------------------------------------------------------------* 09420000 094300* SECTION NAME : B-100-PROCESS * 09430000 094400* CALLED BY : A-010-MAIN * 09440000 094500* CALLS : B-200-LOAD-DATA-TABLE * 09450000 094600* : X-100-READ-INPUT * 09460000 094700* FUNCTION : 1. CONTROLS PROCESSING FROM INPUT FILE * 09470000 094800* : 2. IF INPUT RECORD SAME AS CURRENT KEY * 09480000 094900* : LOAD INPUT DATA TO WT10 AND WT20 WORK * 09490000 095000* : TABLES ACCORDING TO RECORD-TYPE * 09500000 095100* : 3. IF INPUT RECORD KEY HAS CHANGED * 09510000 095200* : MATCH WT10- AND WT20- WORK TABLES * 09520000 095300* : REPORTING ANY OUT OF SEQUENCE ERRORS * 09530000 095400* : IF ALL MATCHED, PERFORM MAIN PROCESSING * 09540000 095500* : 4. CLEAR WT10 AND WT20 WORK TABLES * 09550000 095600* : 5. LOAD FIRST INPUT DATA FOR NEXT SET OF KEYS * 09560000 095700* : 6. READ NEXT INPUT RECORD * 09570000 095800*---------------------------------------------------------------* 09580000 095900 B-100. 09590000 161100* 16110000 161200* CAW STORE MESSAGE SO WE KNOW HOW FAR ITS GOT. 16120000 161300* 16130000 161400 IF JL25A-RETAIL-OUTLET-NO NOT = WW01-CURR-RO-NO 16140000 161500 MOVE JL25A-RETAIL-OUTLET-NO TO WM23-RO-NO 16150000 161600 MOVE JL25A-CR-PART-NO TO WM23-PART-NO 16160000 161700 MOVE WM23-STORE-MESS TO JLMSG-TEXT 16170000 161800 PERFORM JLMSG-DISPLAY-MESSAGE 16180000 161900 END-IF. 16190000 162000* 16200000 096100 IF JL25A-RETAIL-OUTLET-NO = WW01-CURR-RO-NO AND 09610000 096200 JL25A-BASE-PRODUCT-NO = WW01-CURR-BPR-TPN 09620000 096400 PERFORM B-200-LOAD-DATA-TABLES 09640000 096500 ELSE 09650000 096600 SET PRODUCT-NOT-ON-ALLOCATION TO TRUE 09660000 162006*----- 27/03/2001 - GM ---------------------------------------* 16200600 162007 SET PRODUCT-NOT-ON-MM-ALLOCATION TO TRUE 16200700 162008*-------------------------------------------------------------* 16200800 CRV10B SET FIRST-ORDER-TO-CALC TO TRUE CRAUTA SET WI14-NOT-STANDING-ORDER TO TRUE 096600 PERFORM B-300-PROCESS-RO-TPN 09660000 162610 PERFORM B-150-INIT-DATA-TABLES 16261000 097070 PERFORM B-200-LOAD-DATA-TABLES 09707000 097080 END-IF. 09708000 097090 09709000 097100 PERFORM X-100-READ-INPUT. 09710000 097200 09720000 097300 B-100-EXIT. 09730000 097400 EXIT. 09740000 097500 09750000 163500 B-150-INIT-DATA-TABLES SECTION. 16350000 163600*---------------------------------------------------------------* 16360000 163700* SECTION NAME : B-150-INIT-DATA-TABLE * 16370000 163800*---------------------------------------------------------------* 16380000 163900 16390000 164000 SET PROCESS-CURR-RO-TPN TO TRUE. 16400000 164100 MOVE JL25A-CR-PART-NO TO WW01-CURR-PART-NO. 16410000 164200 MOVE JL25A-RETAIL-OUTLET-NO TO WW01-CURR-RO-NO 16420000 ROT-RO-NO 164300 MOVE JL25A-BASE-PRODUCT-NO TO WW01-CURR-BPR-TPN 16430000 AUT07B MOVE JL25A-SUB-PG-CODE TO WW01-CURR-SG-CD PS2S01 WW01-OFU-SG-CD. 164400 16440000 AUT08B IF WW01-CURR-RO-NO = WW01-PREV-RO-NO AUT08B CONTINUE AUT08B ELSE PERFORM V-800-SELECT-VXJJ0ROT AUT08B MOVE WW01-CURR-RO-NO TO WW01-PREV-RO-NO AUT08B END-IF 164500 INITIALIZE WT10-FORECAST-TABLE 16450000 164600 INITIALIZE WT20-CONTROL-TABLE. 16460000 164700 INITIALIZE DCLVXJJ0OLD. 16470000 164800 16480000 164900 MOVE ZEROES TO WX10-DATA-SUB1 16490000 165000 WX10-DATA-SUB2 16500000 165100 WW01-HEADER-RECS-IN 16510000 165200 WW01-FORECAST-RECS-IN 16520000 165300 WW01-CONTROL-RECS-IN 16530000 SUM12A WX95-SUB SUM12A WX95-MAX. 165400* 16540000 165500 B-150-EXIT. 16550000 165600 EXIT. 16560000 165700 16570000 097600 B-200-LOAD-DATA-TABLES SECTION. 09760000 097700*---------------------------------------------------------------* 09770000 097800* SECTION NAME : B-200-LOAD-DATA-TABLE * 09780000 097900* CALLED BY : B-100-PROCESS * 09790000 098000* CALLS : B-210-LOAD-HEADER-DATA * 09800000 098100* : B-220-LOAD-FORECAST-DATA * 09810000 098200* : B-230-LOAD-CONTROL-DATA * 09820000 098300* : B-230-LOAD-CONTROL-DATA * 09830000 098400* : JLMSG-DISPLAY-MESSAGE * 09840000 098500* FUNCTION : 1. VERIFY RECORD TYPE & CALL APPROPRIATE CODE * 09850000 098600*---------------------------------------------------------------* 09860000 165600 16560000 098800 IF HEADER-RECORD 09880000 099000 PERFORM B-210-LOAD-HEADER-DATA 09900000 099100 ELSE 09910000 099200 IF FORECAST-DETAIL 09920000 099400 PERFORM B-220-LOAD-FORECAST-DATA 09940000 166200 PERFORM B-230-LOAD-CONTROL-DATA 16620000 099500 ELSE 09950000 166400 MOVE JL25A-RECORD-TYPE TO WM11-RECORD-TYPE 16640000 166500 MOVE WM11-INVALID-REC-TYPE TO JLMSG-TEXT 16650000 166600 PERFORM JLMSG-DISPLAY-MESSAGE 16660000 100400 END-IF 10040000 100500 END-IF. 10050000 166900* 16690000 100700 B-200-EXIT. 10070000 100800 EXIT. 10080000 100900 10090000 101000 B-210-LOAD-HEADER-DATA SECTION. 10100000 101100*---------------------------------------------------------------* 10110000 101200* SECTION NAME : B-210-LOAD-HEADER-DATA. * 10120000 101300* CALLED BY : B-200-LOAD-DATA-TABLE * 10130000 101400* CALLS : NONE * 10140000 101500* FUNCTION : 1. LOADS INPUT HEADER REFERENCE DATA * 10150000 101600*---------------------------------------------------------------* 10160000 101700 B-210. 10170000 225000* DISPLAY "B-210-LOAD-HEADER-DATA SECTION". 22500018 101900 ADD 1 TO WW01-HEADER-RECS-IN. 10190000 102000 10200000 102100 INITIALIZE WT10-HEADER-REC 10210000 SUM12A WT95-WRAP-SALES-ARRAY-DATA SUM12A WW24-WRAP-WK-VALUES SUM12A WW24-CURR-YRWK SUM12A PTP-TESCO-YRWK SUM12A PTP-TESCO-YRWK-END 102200 10220000 SUM12A SET WI21-XSA-NIA-NOT-FOUND TO TRUE SUM12A SET WI22-CURR-DATE-NOT-FOUND TO TRUE SUM12A SET WI23-WRAP-WEEK-NOT-FOUND TO TRUE 102200 10220000 102300* MOVE JL25A-HEADER-REC TO WT10-HEADER-REC. 10230000 102400 MOVE JL25A-RO-TPNB-FCST-HDR TO WT10-HEADER-REC. SUM14A************************************************************** SUM14A*****THIS PART OF CODE NEEDS TO BE UNCOMMENTED ONCE STORE **** SUM14A******************GROUPING IS REMOVED************************* SUM14A************************************************************** SUM14A* SET WI-NOT-EXISTS TO TRUE SUM14A* PERFORM B-215-CHECK-VIRTUAL-STORE SUM14A* IF WI-EXISTS SUM14A* MOVE 0 TO WT10-ST-PERD-STK-POS SUM14A* MOVE 0 TO WT10-BOOKSTOCK-USED SUM14A* END-IF SUM14A************************************************************* SUM14A*****NEEDS TO BE COMMENTED ONCE STORE TYPE FROM************** SUM14A*****FROM ROT IS CONFIRMED*********************************** SUM14A************************************************************* SUM14B IF WT10-RETAIL-OUTLET-NO NOT= WW-PREV-RO-NO SUM14A SET WI-GPH-NOT-EXISTS TO TRUE SUM14A PERFORM B-216-CHECK-GPH-STORE SUM14B MOVE WT10-RETAIL-OUTLET-NO SUM14B TO WW-PREV-RO-NO SUM14A END-IF SUM14B IF WI-GRP-EXISTS SUM14B MOVE 0 TO WT10-ST-PERD-STK-POS SUM14B MOVE 0 TO WT10-BOOKSTOCK-USED SUM14B END-IF SUM12A SET WI20-CALC-METH-I TO TRUE. 10240000 102500 PS2S11 IF WF01-OFUGRID-IND = "YY" PS2S11 IF WT10-RETAIL-OUTLET-NO NOT= WW-PREV-STORE PS2S11 SET WI-GPH-NOT-EXISTS-OFU TO TRUE PS2S11 PERFORM B-217-CHECK-GPH-STORE-OFUSTR PS2S11 MOVE WT10-RETAIL-OUTLET-NO PS2S11 TO WW-PREV-STORE PS2S11 END-IF PS2S11 IF WI-GRP-EXISTS-OFU PS2S11 IF WW01-OFU-SG-CD NOT = WW01-PREV-OFU-SGCD PS2S11 SET WI-SGZ-OFU-NOT-EXISTS TO TRUE PS2S11 PERFORM B-99B-CHECK-GPH-SUBGRP-OFU PS2S11 MOVE WW01-OFU-SG-CD PS2S11 TO WW01-PREV-OFU-SGCD PS2S11 IF WI-SGZ-OFU-EXISTS PS2S11 SET WI35-ORDR-FUT-UNCERTN-YES TO TRUE PS2S11 ELSE PS2S11 SET WI35-ORDR-FUT-UNCERTN-NO TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 ELSE PS2S11 SET WI35-ORDR-FUT-UNCERTN-NO TO TRUE PS2S11 END-IF PS2S11 ELSE PS2S11 IF WF01-OFUGRID-IND = "YN" PS2S11 SET WI35-ORDR-FUT-UNCERTN-YES TO TRUE PS2S11 ELSE PS2S11 SET WI35-ORDR-FUT-UNCERTN-NO TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 AVRDEL PERFORM RC-FETCH-OLD-KA-KB AVRS42 AVRS42 EVALUATE WF01-KA-TRAIL-IND AVRS42 WHEN "1" AVRS42 SET WI36-ESP-VALUES-NO AVRS42 TO TRUE AVRS42 WHEN "2" AVRS42 IF WT10-RETAIL-OUTLET-NO NOT= WW-PREV-STORE1 AVRS42 SET WI-STO-NOT-EXISTS AVRS42 TO TRUE AVRS42 PERFORM B-212-CHECK-STORE-GROUP AVRS42 MOVE WT10-RETAIL-OUTLET-NO AVRS42 TO WW-PREV-STORE1 AVRS42 END-IF AVRS42 IF WI-STO-EXISTS AVRS42 IF WW01-OFU-SG-CD NOT= WW01-PREV-KFA-SGCD AVRS42 SET WI-REP-NOT-EXISTS AVRS42 TO TRUE AVRS42 PERFORM B-213-CHECK-REPORTING-GROUP AVRS42 MOVE WW01-OFU-SG-CD AVRS42 TO WW01-PREV-KFA-SGCD AVRS42 IF WI-REP-EXISTS AVRS42 SET WI36-ESP-VALUES-YES AVRS42 TO TRUE AVRS42 ELSE AVRS42 SET WI36-ESP-VALUES-NO AVRS42 TO TRUE AVRS42 END-IF AVRS42 END-IF AVRS42 ELSE AVRS42 SET WI36-ESP-VALUES-NO AVRS42 TO TRUE AVRS42 END-IF AVRS42 WHEN "3" AVRS42 SET WI36-ESP-VALUES-YES AVRS42 TO TRUE AVRS42 WHEN OTHER AVRS42 SET WI36-ESP-VALUES-NO AVRS42 TO TRUE AVRS42 END-EVALUATE AVRS42 . AVRS42 102600 B-210-EXIT. 10260000 102700 EXIT. 10270000 102800 10280000 AVRS42 B-212-CHECK-STORE-GROUP SECTION. AVRS42*---------------------------------------------------------------* AVRS42* SECTION NAME : B-212-CHECK-STORE-GROUP * AVRS42* FUNCTION : CHECKS FOR A CONTROL ACTIVE IN GPH TABLE * AVRS42*---------------------------------------------------------------* AVRS42 MOVE "KFACTSTO" TO GPH-GRP-CD AVRS42 MOVE "O" TO GPH-APLCTN-ID AVRS42 MOVE "ROZ" TO GPH-GRP-TYPE AVRS42 MOVE WT10-RETAIL-OUTLET-NO TO ROZ-RO-NO AVRS42 AVRS42 EXEC SQL AVRS42 SELECT "Y" AVRS42 INTO :WI-STORE-EXISTS-IND AVRS42 FROM VXJJ0GPH GPH AVRS42 ,VXJJ0ROZ ROZ AVRS42 WHERE GPH.GRP_CD = :GPH-GRP-CD AVRS42 AND GPH.APLCTN_ID = :GPH-APLCTN-ID AVRS42 AND GPH.GRP_TYPE = :GPH-GRP-TYPE AVRS42 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE AVRS42 AND ( GPH.GRP_END_DT IS NULL AVRS42 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) AVRS42 AND ROZ.RO_NO = :ROZ-RO-NO AVRS42 AND ROZ.GRP_CD = GPH.GRP_CD AVRS42 AND ROZ.APLCTN_ID = GPH.APLCTN_ID AVRS42 AND ROZ.GRP_TYPE = GPH.GRP_TYPE AVRS42 WITH UR AVRS42 END-EXEC AVRS42 AVRS42 EVALUATE SQLCODE AVRS42 WHEN +0 AVRS42 WHEN -811 AVRS42 CONTINUE AVRS42 WHEN +100 AVRS42 SET WI-STO-NOT-EXISTS TO TRUE AVRS42 WHEN OTHER AVRS42 MOVE "B-212-CHECK-STORE-GROUP" AVRS42 TO JLDB2E-PROCESS-NAME AVRS42 PERFORM JLDB2E-DB2-ERROR AVRS42 SET JLMSG-C99-DB2-ERROR AVRS42 TO TRUE AVRS42 PERFORM JLMSG-DISPLAY-MESSAGE AVRS42 END-EVALUATE AVRS42 . AVRS42 AVRS42 B-213-CHECK-REPORTING-GROUP SECTION. AVRS42*---------------------------------------------------------------* AVRS42* SECTION NAME : B-213-CHECK-REPORTING-GROUP * AVRS42* FUNCTION : CHECKS WHETHER A GIVEN PRODUCT IS A PART OF * AVRS42* : SUBGRP GROUPING 'KFACTREP' * AVRS42*---------------------------------------------------------------* AVRS42 MOVE "KFACTREP" TO GPH-GRP-CD AVRS42 MOVE "O" TO GPH-APLCTN-ID AVRS42 MOVE "SGZ" TO GPH-GRP-TYPE AVRS42 MOVE WW01-OFU-SG-CD(1:1) TO WH03-CURR-SG-CD-1 AVRS42 MOVE WW01-OFU-SG-CD(1:2) TO WH03-CURR-SG-CD-2 AVRS42 MOVE WW01-OFU-SG-CD(1:3) TO WH03-CURR-SG-CD-3 AVRS42 MOVE WW01-OFU-SG-CD(1:4) TO WH03-CURR-SG-CD-4 AVRS42 MOVE WW01-OFU-SG-CD TO WH03-CURR-SG-CD-5 AVRS42 AVRS42 EXEC SQL AVRS42 SELECT "Y" AVRS42 INTO :WI-REP-EXISTS-IND AVRS42 FROM VXJJ0GPH GPH, AVRS42 VXJJ0SGZ SGZ AVRS42 WHERE GPH.GRP_CD = :GPH-GRP-CD AVRS42 AND GPH.APLCTN_ID = :GPH-APLCTN-ID AVRS42 AND GPH.GRP_TYPE = :GPH-GRP-TYPE AVRS42 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE AVRS42 AND ( GPH.GRP_END_DT IS NULL AVRS42 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) AVRS42 AND SGZ.GRP_CD = GPH.GRP_CD AVRS42 AND SGZ.APLCTN_ID = GPH.APLCTN_ID AVRS42 AND SGZ.GRP_TYPE = GPH.GRP_TYPE AVRS42 AND SGZ.SG_CD IN( :WH03-CURR-SG-CD-1, AVRS42 :WH03-CURR-SG-CD-2, AVRS42 :WH03-CURR-SG-CD-3, AVRS42 :WH03-CURR-SG-CD-4, AVRS42 :WH03-CURR-SG-CD-5) AVRS42 WITH UR AVRS42 END-EXEC AVRS42 AVRS42 EVALUATE SQLCODE AVRS42 WHEN +0 AVRS42 WHEN -811 AVRS42 CONTINUE AVRS42 WHEN +100 AVRS42 SET WI-REP-NOT-EXISTS AVRS42 TO TRUE AVRS42 WHEN OTHER AVRS42 MOVE "B-213-CHECK-REPORTING-GROUP" AVRS42 TO JLDB2E-PROCESS-NAME AVRS42 PERFORM JLDB2E-DB2-ERROR AVRS42 SET JLMSG-C99-DB2-ERROR AVRS42 TO TRUE AVRS42 PERFORM JLMSG-DISPLAY-MESSAGE AVRS42 END-EVALUATE AVRS42 . AVRS42 KS2S45 B-214-CHECK-STORE-GROUP SECTION. KS2S45*---------------------------------------------------------------* KS2S45* SECTION NAME : B-214-CHECK-STORE-GROUP * KS2S45* FUNCTION : CHECKS FOR A CONTROL ACTIVE IN GPH TABLE * KS2S45*---------------------------------------------------------------* KS2S45 MOVE "SLOWSTOR" TO GPH-GRP-CD KS2S45 MOVE "O" TO GPH-APLCTN-ID KS2S45 MOVE "ROZ" TO GPH-GRP-TYPE KS2S45 MOVE JLF46-RETAIL-OUTLET-NO TO ROZ-RO-NO KS2S45 KS2S45 EXEC SQL KS2S45 SELECT "Y" KS2S45 INTO :WI-SLOW-STORE-EXISTS KS2S45 FROM VXJJ0GPH GPH KS2S45 ,VXJJ0ROZ ROZ KS2S45 WHERE GPH.GRP_CD = :GPH-GRP-CD KS2S45 AND GPH.APLCTN_ID = :GPH-APLCTN-ID KS2S45 AND GPH.GRP_TYPE = :GPH-GRP-TYPE KS2S45 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE KS2S45 AND ( GPH.GRP_END_DT IS NULL KS2S45 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) KS2S45 AND ROZ.RO_NO = :ROZ-RO-NO KS2S45 AND ROZ.GRP_CD = GPH.GRP_CD KS2S45 AND ROZ.APLCTN_ID = GPH.APLCTN_ID KS2S45 AND ROZ.GRP_TYPE = GPH.GRP_TYPE KS2S45 WITH UR KS2S45 END-EXEC KS2S45 KS2S45 EVALUATE SQLCODE KS2S45 WHEN +0 KS2S45 WHEN -811 KS2S45 CONTINUE KS2S45 WHEN +100 KS2S45 SET WI-SLOW-NOT-EXISTS TO TRUE KS2S45 WHEN OTHER KS2S45 MOVE "B-214-CHECK-STORE-GROUP" KS2S45 TO JLDB2E-PROCESS-NAME KS2S45 PERFORM JLDB2E-DB2-ERROR KS2S45 SET JLMSG-C99-DB2-ERROR KS2S45 TO TRUE KS2S45 PERFORM JLMSG-DISPLAY-MESSAGE KS2S45 END-EVALUATE KS2S45 . KS2S45 AVRS42***************************************************************** SUM14A*B-215-CHECK-VIRTUAL-STORE SECTION. 10290000 SUM14A*---------------------------------------------------------------* 10300000 SUM14A* SECTION NAME : B-215-CHECK-VIRTUAL-STORE * 10310000 SUM14A* CALLED BY : B-210-LOAD-HEADER-DATA * 10320000 SUM14A* CALLS : NONE * 10330000 SUM14A* FUNCTION : 1. CHECKS FOR A VIRTUAL STORE * 10340000 SUM14A* : NEEDS TO BE UNCOMMENTED ONCE STORE GROUPING IS* 10340000 SUM14A* : REMOVED * 10340000 SUM14A*---------------------------------------------------------------* 10360000 SUM14A*B-215. 10370000 SUM14A* DISPLAY "B-215-CHECK-VIRTUAL-STORE SECTION" 22700018 SUM14A* MOVE WT10-CR-PART-NO TO ROT-CR-PART-NO SUM14A* MOVE WT10-RETAIL-OUTLET-NO TO ROT-RO-NO SUM14A* MOVE "O" TO ROT-RO-TYPE-CLASS SUM14A* EXEC SQL SUM14A* SELECT "Y" SUM14A* INTO :WI-EXISTS-IND SUM14A* FROM VXJJ0ROT SUM14A* WHERE CR_PART_NO = :ROT-CR-PART-NO SUM14A* AND RO_NO = :ROT-RO-NO SUM14A* AND RO_TYPE_CLASS = :ROT-RO-TYPE-CLASS SUM14A* FETCH FIRST ROW ONLY SUM14A* WITH UR 17120000 SUM14A* END-EXEC. 17120000 SUM14A*B-215-EXIT. 10463000 SUM14A* EXIT. 10464000 SUM14A* 10465000 SUM14A* 10280000 SUM14A***************************************************************** SUM14A B-216-CHECK-GPH-STORE SECTION. 10290000 SUM14A*---------------------------------------------------------------* 10300000 SUM14A* SECTION NAME : B-216-CHECK-GPH-STORE. * 10310000 SUM14A* CALLED BY : B-210-LOAD-HEADER-DATA * 10320000 SUM14A* CALLS : NONE * 10330000 SUM14A* FUNCTION : 1. CHECKS FOR A CONTROL ACTIVE IN GPH TABLE * 10340000 SUM14A* : NEEDS TO BE COMMENTED ONCE STORE TYPE FROM * 10340000 SUM14A* : ROT IS CONFIRMED * 10340000 SUM14A*---------------------------------------------------------------* 10360000 SUM14A B-216. 10370000 SUM14A* DISPLAY "B-216-CHECK-GPH-STORE SECTION". 22700018 SUM14A MOVE "GMODIRCT" TO GPH-GRP-CD SUM14A MOVE "O" TO GPH-APLCTN-ID SUM14A MOVE "ROZ" TO GPH-GRP-TYPE SUM14A MOVE WT10-RETAIL-OUTLET-NO TO ROZ-RO-NO SUM14A EXEC SQL SUM14A SELECT "Y" SUM14A INTO :WI-GRP-EXISTS-IND SUM14A FROM VXJJ0GPH GPH,VXJJ0ROZ ROZ SUM14A WHERE GPH.GRP_CD = :GPH-GRP-CD SUM14A AND GPH.APLCTN_ID = :GPH-APLCTN-ID SUM14A AND GPH.GRP_TYPE = :GPH-GRP-TYPE SUM14A AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE SUM14A AND ( GPH.GRP_END_DT IS NULL SUM14A OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) SUM14A AND ROZ.RO_NO = :ROZ-RO-NO SUM14A AND ROZ.GRP_CD = GPH.GRP_CD SUM14A AND ROZ.APLCTN_ID = GPH.APLCTN_ID SUM14A AND ROZ.GRP_TYPE = GPH.GRP_TYPE SUM14A WITH UR SUM14A END-EXEC SUM14A EVALUATE SQLCODE 25210000 SUM14A WHEN +0 25220000 SUM14A CONTINUE 25220000 SUM14A WHEN +100 25220000 SUM14A SET WI-GPH-NOT-EXISTS TO TRUE 25230000 SUM14A WHEN OTHER 25250000 SUM14A MOVE "B-216-CHECK-GPH-STORE" 25260000 SUM11A TO JLDB2E-PROCESS-NAME 25270000 SUM14A PERFORM JLDB2E-DB2-ERROR 25280000 SUM14A SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 SUM14A PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SUM14A END-EVALUATE. 25310000 SUM14A B-216-EXIT. 10463000 SUM14A EXIT. 10464000 SUM14A 10465000 SUM14A* 10280000 PS2S11***************************************************************** PS2S11 B-217-CHECK-GPH-STORE-OFUSTR SECTION. 10290000 PS2S11*---------------------------------------------------------------* 10300000 PS2S11* SECTION NAME : B-217-CHECK-GPH-STORE-OFUSTR * 10310000 PS2S11* CALLED BY : B-210-LOAD-HEADER-DATA * 10320000 PS2S11* CALLS : NONE * 10330000 PS2S11* FUNCTION : 1. READ THE GPH/ROZ TABLE FOR THE NEW STORE * 10340000 PS2S11* : GROUPING "OFUSTR" * 10340000 PS2S11*---------------------------------------------------------------* 10360000 PS2S11 B-217. 10370000 PS2S11* DISPLAY "B-217-CHECK-GPH-STORE-OFUSTR" 22700018 PS2S11 MOVE "OFFUSTR" TO GPH-GRP-CD PS2S11 MOVE "O" TO GPH-APLCTN-ID PS2S11 MOVE "ROZ" TO GPH-GRP-TYPE PS2S11 MOVE WT10-RETAIL-OUTLET-NO TO ROZ-RO-NO PS2S11 EXEC SQL PS2S11 SELECT "Y" PS2S11 INTO :WI-GRP-EXISTS-OFU-IND PS2S11 FROM VXJJ0GPH GPH,VXJJ0ROZ ROZ PS2S11 WHERE GPH.GRP_CD = :GPH-GRP-CD PS2S11 AND GPH.APLCTN_ID = :GPH-APLCTN-ID PS2S11 AND GPH.GRP_TYPE = :GPH-GRP-TYPE PS2S11 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE PS2S11 AND ( GPH.GRP_END_DT IS NULL PS2S11 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) PS2S11 AND ROZ.RO_NO = :ROZ-RO-NO PS2S11 AND ROZ.GRP_CD = GPH.GRP_CD PS2S11 AND ROZ.APLCTN_ID = GPH.APLCTN_ID PS2S11 AND ROZ.GRP_TYPE = GPH.GRP_TYPE PS2S11 WITH UR PS2S11 END-EXEC PS2S11 EVALUATE SQLCODE 25210000 PS2S11 WHEN +0 25220000 PS2S11 CONTINUE 25220000 PS2S11 WHEN +100 25220000 PS2S11 SET WI-GPH-NOT-EXISTS-OFU TO TRUE 25230000 PS2S11 WHEN OTHER 25250000 PS2S11 MOVE "B-217-CHECK-GPH-STORE-OFUSTR" 25260000 PS2S11 TO JLDB2E-PROCESS-NAME 25270000 PS2S11 PERFORM JLDB2E-DB2-ERROR 25280000 PS2S11 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 PS2S11 END-EVALUATE. 25310000 PS2S11 B-217-EXIT. 10463000 PS2S11 EXIT. 10464000 SUM14A* 10280000 171S47 B-218-CHECK-STORE-GROUP SECTION. 171S47*---------------------------------------------------------------* 171S47* SECTION NAME : B-218-CHECK-STORE-GROUP * 171S47* FUNCTION : CHECKS FOR A CONTROL ACTIVE IN GPH TABLE * 171S47*---------------------------------------------------------------* 171S47 MOVE "BGOSSSTO" TO GPH-GRP-CD 171S47 MOVE "O" TO GPH-APLCTN-ID 171S47 MOVE "ROZ" TO GPH-GRP-TYPE 171S47 MOVE JLF42-RETAIL-OUTLET-NO TO ROZ-RO-NO 171S47 171S47 EXEC SQL 171S47 SELECT "Y" 171S47 INTO :WI-BSLOW-STORE-EXISTS 171S47 FROM VXJJ0GPH GPH 171S47 ,VXJJ0ROZ ROZ 171S47 WHERE GPH.GRP_CD = :GPH-GRP-CD 171S47 AND GPH.APLCTN_ID = :GPH-APLCTN-ID 171S47 AND GPH.GRP_TYPE = :GPH-GRP-TYPE 171S47 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE 171S47 AND ( GPH.GRP_END_DT IS NULL 171S47 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) 171S47 AND ROZ.RO_NO = :ROZ-RO-NO 171S47 AND ROZ.GRP_CD = GPH.GRP_CD 171S47 AND ROZ.APLCTN_ID = GPH.APLCTN_ID 171S47 AND ROZ.GRP_TYPE = GPH.GRP_TYPE 171S47 WITH UR 171S47 END-EXEC 171S47 171S47 EVALUATE SQLCODE 171S47 WHEN +0 171S47 WHEN -811 171S47 CONTINUE 171S47 WHEN +100 171S47 SET WI-BSLOW-NOT-EXISTS TO TRUE 171S47 WHEN OTHER 171S47 MOVE "B-218-CHECK-STORE-GROUP" 171S47 TO JLDB2E-PROCESS-NAME 171S47 PERFORM JLDB2E-DB2-ERROR 171S47 SET JLMSG-C99-DB2-ERROR 171S47 TO TRUE 171S47 PERFORM JLMSG-DISPLAY-MESSAGE 171S47 END-EVALUATE 171S47 . 171S47 171S47 B-219-CHECK-PRODUCT-GROUP SECTION. 171S47*---------------------------------------------------------------* 171S47* SECTION NAME : B-219-CHECK-STORE-GROUP * 171S47* FUNCTION : CHECKS FOR A CONTROL ACTIVE IN GPH TABLE * 171S47*---------------------------------------------------------------* 171S47 MOVE "BGOSSPRO" TO GPH-GRP-CD 171S47 MOVE "O" TO GPH-APLCTN-ID 171S47 MOVE "PGZ" TO GPH-GRP-TYPE 171S47 MOVE JLF42-BASE-PRODUCT-NO TO PGZ-BPR-TPN 171S47 SET WI-SLOW-PROD-NOT-EXISTS1 TO TRUE 171S47 171S47 EXEC SQL 171S47 SELECT "Y" 171S47 INTO :WI-SLOW-PROD-EXISTS1-IND 171S47 FROM VXJJ0GPH GPH 171S47 ,VXJJ0PGZ PGZ 171S47 WHERE GPH.GRP_CD = :GPH-GRP-CD 171S47 AND GPH.APLCTN_ID = :GPH-APLCTN-ID 171S47 AND GPH.GRP_TYPE = :GPH-GRP-TYPE 171S47 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE 171S47 AND ( GPH.GRP_END_DT IS NULL 171S47 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) 171S47 AND PGZ.BPR_TPN = :PGZ-BPR-TPN 171S47 AND PGZ.GRP_CD = GPH.GRP_CD 171S47 AND PGZ.APLCTN_ID = GPH.APLCTN_ID 171S47 AND PGZ.GRP_TYPE = GPH.GRP_TYPE 171S47 WITH UR 171S47 END-EXEC 171S47 171S47 EVALUATE SQLCODE 171S47 WHEN +0 171S47 WHEN -811 171S47 CONTINUE 171S47 WHEN +100 171S47 CONTINUE 171S47 WHEN OTHER 171S47 MOVE "B-219-CHECK-PRODUCT-GROUP" 171S47 TO JLDB2E-PROCESS-NAME 171S47 PERFORM JLDB2E-DB2-ERROR 171S47 SET JLMSG-C99-DB2-ERROR 171S47 TO TRUE 171S47 PERFORM JLMSG-DISPLAY-MESSAGE 171S47 END-EVALUATE 171S47 . 171S47 102900 B-220-LOAD-FORECAST-DATA SECTION. 10290000 103000*---------------------------------------------------------------* 10300000 103100* SECTION NAME : B-220-LOAD-FORECAST-DATA * 10310000 103200* CALLED BY : B-200-LOAD-DATA-TABLE * 10320000 103300* CALLS : NONE * 10330000 103400* FUNCTION : 1. INCREMENTS WT10 WORK TABLE INDEX * 10340000 103500* : 2. LOADS INPUT RECORD TO WT10 TABLE * 10350000 103600*---------------------------------------------------------------* 10360000 103700 B-220. 10370000 227000* DISPLAY "B-220-LOAD-FORECAST-DATA SECTION". 22700018 171200 17120000 171300* 17130000 171400* * * CAW REJECT RECORD WITH ZERO DATE/TIME RANGE * * 17140000 171500* 17150000 171600 IF JL25B-DELY-REQ-DATE = JL25B-PERD-END-DATE 17160000 171700 AND JL25B-PERD-END-TIME = JL25B-DELY-REQ-TIME 17170000 171800 MOVE "F25" TO WM24-MESS 17180000 171900 MOVE JL25B-RETAIL-OUTLET-NO TO WM24-RO-NO 17190000 172000 MOVE JL25B-CR-PART-NO TO WM24-PART-NO 17200000 172100 MOVE JL25B-BASE-PRODUCT-NO TO WM24-TPN 17210000 172200 MOVE WM24-REJ-TPN TO JLMSG-TEXT 17220004 172300 PERFORM JLMSG-DISPLAY-MESSAGE 17230000 172400 SET REJECTED-TPNS TO TRUE 17240000 172910 SET PROCESS-NEXT-RO-TPN TO TRUE 17291007 172410 GO TO B-220-EXIT 17241000 172500 END-IF. 17250000 172600* 17260000 103900 ADD 1 TO WX10-DATA-SUB1. 10390000 104000 ADD 1 TO WW01-FORECAST-RECS-IN. 10400000 104100 10410000 104200 INITIALIZE WT10-PERIOD-ROW(WX10-DATA-SUB1). 10420000 104300 10430000 104400* MOVE JL25A-DETAIL-DATA 10440000 104500* TO WT10-DETAIL-DATA(WX10-DATA-SUB1). 10450000 104600 MOVE JL25B-RO-TPNB-FCST-REC 10460000 104610 TO WT10-PERIOD-ROW(WX10-DATA-SUB1) 10461000 AVRS32 16620000 AVRS32 PERFORM B-240-LOAD-REFINED-DATA 16620000 104620 . 10462000 104630 B-220-EXIT. 10463000 104640 EXIT. 10464000 104650 10465000 104660 B-230-LOAD-CONTROL-DATA SECTION. 10466000 104670*---------------------------------------------------------------* 10467000 104680* SECTION NAME : B-230-LOAD-CONTROL-DATA * 10468000 104690* CALLED BY : B-200-LOAD-DATA-TABLE * 10469000 104700* CALLS : NONE * 10470000 104800* FUNCTION : 1. INCREMENTS WT10 WORK TABLE INDEX * 10480000 104900* : 2. LOADS INPUT RECORD TO WT10 TABLE * 10490000 105000*---------------------------------------------------------------* 10500000 172300* 17230000 172400 PERFORM X-400-READ-INPUT4 17240000 UNTIL WW06-JLF20-KEY >= WW07-JLF25-KEY 17250000 172600 OR EOF-INPUT4. 17260000 172700 17270000 172800 IF EOF-INPUT4 17280000 OR WW06-JLF20-KEY > WW07-JLF25-KEY 17290000 DISPLAY " NOM=" WW06-JLF20-KEY " > " WW07-JLF25-KEY "*" 17300000 173100 GO TO B-230-EXIT 17310000 173200 END-IF. 17320000 175810* 17581000 175820* * * CAW REJECT RECORD WITH ZERO DATE/TIME RANGE * * 17582000 175830* 17583000 175840 IF JLF20-DELY-REQ-DATE = JLF20-PERD-END-DATE 17584000 175850 AND JLF20-PERD-END-TIME = JLF20-DELY-REQ-TIME 17585000 175860 MOVE "F20" TO WM24-MESS 17586000 175870 MOVE JLF20-RETAIL-OUTLET-NO TO WM24-RO-NO 17587000 175880 MOVE JLF20-CR-PART-NO TO WM24-PART-NO 17588000 175890 MOVE JLF20-BASE-PRODUCT-NO TO WM24-TPN 17589000 177200 MOVE WM24-REJ-TPN TO JLMSG-TEXT 17720000 175892 PERFORM JLMSG-DISPLAY-MESSAGE 17589200 177400 SET REJECTED-TPNS TO TRUE 17740000 177501 SET PROCESS-NEXT-RO-TPN TO TRUE 17750107 175894 GO TO B-230-EXIT 17589401 175895 END-IF. 17589500 175896* 17589600 IF WW06-JLF20-KEY = WW07-JLF25-KEY 17790000 178000 ADD 1 TO WX10-DATA-SUB2 17800000 178100 ADD 1 TO WW01-CONTROL-RECS-IN 17810000 105500 10550000 178300 INITIALIZE WT20-PERIOD-ROW(WX10-DATA-SUB2) 17830000 178400 MOVE JLF20-RO-TPNB-PERIOD-REC 17840000 178500 TO WT20-RO-TPNB-PERIOD-REC(WX10-DATA-SUB2) 17850000 178600 MOVE LOW-VALUES TO JLF20-RO-TPNB-PERIOD-REC 17860000 SUM12A* CHECK FOR CALC-METHOD = I SUM12A IF WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB2) NOT = "I" SUM12A AND WI20-CALC-METH-I-IND = "Y" SUM12A SET WI20-NOT-CALC-METH-I TO TRUE SUM12A END-IF 178700 END-IF. 17870000 105900 10590000 106000 B-230-EXIT. 10600000 106100 EXIT. 10610000 AVRS32 10620000 AVRS32 B-240-LOAD-REFINED-DATA SECTION. 10466000 AVRS32*---------------------------------------------------------------* 10467000 AVRS32* SECTION NAME : B-240-LOAD-REFINED-DATA * 10468000 AVRS32* FUNCTION : LOAD REFINED DATA INTO WT10 ARRAY * 10480000 AVRS32*---------------------------------------------------------------* 10500000 AVRS32* 17230000 AVRS32 PERFORM X-900-READ-JLFOREFD 17240000 AVRS32 UNTIL WW07-JLRFD-KEY >= WW07-JLF25-KEY 17250000 AVRS32 OR EOF-JLFOREFD 17260000 AVRS32 17270000 AVRS32 IF EOF-JLFOREFD 17280000 AVRS32 OR WW07-JLRFD-KEY > WW07-JLF25-KEY 17290000 AVRS32 MOVE 0 TO AVRS32 WT10-PREV-ORD-QTY(WX10-DATA-SUB1) AVRS34 WT10-ORD-REC-TYPE(WX10-DATA-SUB1) AVRS32 MOVE "N" TO AVRS32 WT10-PROD-EXT-IND(WX10-DATA-SUB1) AVRS32 MOVE "N" TO AVRS32 WT10-PROD-CALC-IND(WX10-DATA-SUB1) AVRS32 ELSE AVRS32 MOVE JLRFD-PROD-ORD-QTY TO AVRS32 WT10-PREV-ORD-QTY(WX10-DATA-SUB1) AVRS32 MOVE JLRFD-PROD-EXT-IND TO AVRS32 WT10-PROD-EXT-IND(WX10-DATA-SUB1) AVRS32 MOVE JLRFD-PROD-CALC-IND TO AVRS32 WT10-PROD-CALC-IND(WX10-DATA-SUB1) AVRS34 MOVE JLRFD-ORD-REC-TYPE TO AVRS34 WT10-ORD-REC-TYPE(WX10-DATA-SUB1) AVRS32 END-IF 17320000 AVRS32 . 105900 10590000 106200 10620000 106300 B-300-PROCESS-RO-TPN SECTION. 10630000 106400*---------------------------------------------------------------* 10640000 106500* SECTION NAME : B-300-PROCESS-RO-TPN * 10650000 106600* CALLED BY : B-100-PROCESS * 10660000 106700* CALLS : B-310-VERIFY-INPUT * 10670000 106800* : B-350-CALC-RO-TPN * 10680000 106900* : B-999-DUMP-REJECTS * 10690000 107000* : JLMSG-DISPLAY-MESSAGE * 10700000 107100* FUNCTION : 1. "FILE MATCH" THE INPUT DATA READ * 10710000 107200*---------------------------------------------------------------* 10720000 107300 B-300. 10730000 107410* DISPLAY "PROCESSING===> STORE " WW01-CURR-RO-NO 10741020 107420* DISPLAY "PROCESSING===> PROD " WW01-CURR-BPR-TPN 10742020 107500 10750000 107600 PERFORM B-310-VERIFY-INPUT. 10760000 107700 10770000 107800 IF PROCESS-CURR-RO-TPN 10780000 107900 THEN 10790000 108000 PERFORM B-350-CALC-RO-TPN 10800000 108100 ELSE 10810000 108200 PERFORM B-999-DUMP-REJECTS 10820000 108300 END-IF. 10830000 108400 10840000 108500 B-300-EXIT. 10850000 108600 EXIT. 10860000 108700 10870000 108800 B-310-VERIFY-INPUT SECTION. 10880000 108900*---------------------------------------------------------------* 10890000 109000* SECTION NAME : B-310-VERIFY-INPUT * 10900000 109100* CALLED BY : B-300-PROCESS-RO-TPN * 10910000 109200* CALLS : B-320-OVERLAY-DATA * 10920000 109300* : JLMSG-DISPLAY-MESSAGE * 10930000 109400* FUNCTION : 1. "FILE MATCH" THE INPUT DATA READ * 10940000 109500*---------------------------------------------------------------* 10950000 109600 B-310. 10960000 109700 IF WW01-HEADER-RECS-IN NOT = 1 10970000 109800 THEN 10980000 109900 MOVE WW01-HEADER-RECS-IN TO WM12-RECORD-COUNT 10990000 110000 MOVE WW01-CURR-RO-NO TO WM12-RO-NO 11000000 110100 MOVE WW01-CURR-BPR-TPN TO WM12-BPR-TPN 11010000 110200 MOVE WM12-INVALID-HEADER TO JLMSG-TEXT 11020000 110300 PERFORM JLMSG-DISPLAY-MESSAGE 11030000 110400 SET PROCESS-NEXT-RO-TPN TO TRUE 11040000 110500 GO TO B-310-EXIT 11050000 110600 END-IF. 11060000 110700 11070000 110800 IF WW01-FORECAST-RECS-IN NOT > 0 11080000 110900 THEN 11090000 111000 MOVE "FORECAST" TO WM14-RECORD-DESC 11100000 111100 MOVE WW01-CURR-RO-NO TO WM14-RO-NO 11110000 111200 MOVE WW01-CURR-BPR-TPN TO WM14-BPR-TPN 11120000 111300 MOVE WM14-ZERO-DETAILS TO JLMSG-TEXT 11130000 111400 PERFORM JLMSG-DISPLAY-MESSAGE 11140000 111500 SET PROCESS-NEXT-RO-TPN TO TRUE 11150000 111600 GO TO B-310-EXIT 11160000 111700 END-IF. 11170000 111800 11180000 111900 IF WW01-CONTROL-RECS-IN NOT > 0 11190000 112000 THEN 11200000 112100 MOVE "CONTROL" TO WM14-RECORD-DESC 11210000 112200 MOVE WW01-CURR-RO-NO TO WM14-RO-NO 11220000 112300 MOVE WW01-CURR-BPR-TPN TO WM14-BPR-TPN 11230000 112400 MOVE WM14-ZERO-DETAILS TO JLMSG-TEXT 11240000 112500 PERFORM JLMSG-DISPLAY-MESSAGE 11250000 112600 SET PROCESS-NEXT-RO-TPN TO TRUE 11260000 112700 GO TO B-310-EXIT 11270000 112800 END-IF. 11280000 112900 11290000 113000 IF WW01-FORECAST-RECS-IN NOT = 11300000 113100 WW01-CONTROL-RECS-IN 11310000 113200 THEN 11320000 113300 MOVE WW01-CURR-RO-NO TO WM15-RO-NO 11330000 113400 MOVE WW01-CURR-BPR-TPN TO WM15-BPR-TPN 11340000 113500 MOVE WM15-INVALID-DETAILS TO JLMSG-TEXT 11350000 113600 PERFORM JLMSG-DISPLAY-MESSAGE 11360000 113700 SET PROCESS-NEXT-RO-TPN TO TRUE 11370000 113800 GO TO B-310-EXIT 11380000 113900 END-IF. 11390000 114000 11400000 SPR12A PERFORM V-120-MOVE-BBP. 11401002 114020 11402002 114109 11410902 114100 SET PROCESS-LOOP TO TRUE. 11410000 114200 MOVE 1 TO WX10-DATA-SUB1. 11420000 114300 MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 11430000 114400 TO WW01-START-DATE. 11440000 SUM11A MOVE WT10-PICK-METH(WX10-DATA-SUB1) 12560000 SUM11A TO WW10-PICK-METH 12560000 INITIALIZE JLF40-DATA 11450000 WIN06A WT80-CR-FCST-SALES-TABLE AVRS42 WT85-KA-TREND-TABLE AVRS42 JLF46-KA-TREND-TABLE 114600 PERFORM B-320-OVERLAY-DATA UNTIL END-PROCESS-LOOP. 11460000 114700 11470000 MOVE ROT-RO-DTE-OPEN TO JLF40-RO-OPEN-DATE 114800 MOVE WT10-ST-PERD-STK-POS 11480000 114900 TO JLF40-ST-PERD-STK-POS(1). 11490000 AUT08B* NOTE: THE ACTUAL BOOKSTOCK MAY BE ADJUSTED LATER IF THERE AUT08B* IS A GAP STOCK CORRECTION (SEE B-670) CRV10A MOVE WT10-BOOKSTOCK-USED TO JLF40-ACTUAL-STK-POS(1). 115000 MOVE WT10-SALES-TO-MIDNITE TO JLF40-SALES-TO-MIDNITE. 11500000 155600 MOVE WT10-STKD-PROD-ENDT TO JLF40-STK-PROD-END-DT. 115200 MOVE WT10-NEXT-ORDER-TYPE TO JLF40-NEXT-ORDER-TYPE. 11520000 AUT08B MOVE WT10-BOOK-STOCK-DT TO JLF40-BOOK-STOCK-DT AUT08B MOVE WT10-BOOK-STOCK-TM TO JLF40-BOOK-STOCK-TM 115505 11550500 SPR12A MOVE WW20-RO-BPR-SCAP TO JLF40-STD-SHELF-CAP 11551002 SPR12A MOVE WW20-SPEC-DEL-IND-1 TO JLF40-SPEC-DEL-IND-1 11551102 SPR12A MOVE WW20-SPEC-DEL-IND-2 TO JLF40-SPEC-DEL-IND-2 11551202 SPR12A MOVE WW20-SPEC-DEL-IND-3 TO JLF40-SPEC-DEL-IND-3 11551302 SPR12A MOVE WW20-SPEC-DEL-IND-4 TO JLF40-SPEC-DEL-IND-4 11551402 SPR12A MOVE WW20-SPEC-DEL-IND-5 TO JLF40-SPEC-DEL-IND-5 11551502 SPR12A MOVE WW20-SPEC-DEL-IND-6 TO JLF40-SPEC-DEL-IND-6 11551602 SPR12A MOVE WW20-SPEC-DEL-IND-7 TO JLF40-SPEC-DEL-IND-7 11551702 SPR12A MOVE WW20-FIXED-ORD-QTY-1 TO JLF40-FIXED-ORD-QTY-1 11551802 SPR12A MOVE WW20-FIXED-ORD-QTY-2 TO JLF40-FIXED-ORD-QTY-2 11551902 SPR12A MOVE WW20-FIXED-ORD-QTY-3 TO JLF40-FIXED-ORD-QTY-3 11552002 SPR12A MOVE WW20-FIXED-ORD-QTY-4 TO JLF40-FIXED-ORD-QTY-4 11552102 SPR12A MOVE WW20-FIXED-ORD-QTY-5 TO JLF40-FIXED-ORD-QTY-5 11552202 SPR12A MOVE WW20-FIXED-ORD-QTY-6 TO JLF40-FIXED-ORD-QTY-6 11552302 SPR12A MOVE WW20-FIXED-ORD-QTY-7 TO JLF40-FIXED-ORD-QTY-7 11552402 * *** POPULATE NOTIONAL WEEKLY SALES WITH SAVED NWS *** FOR PROMOTION RUN DOWN SPR12A MOVE WW20-BBP-SAVED-NWS TO JLF40-NOTNL-WKLY-SALES 11552502 11552602 SPR12A MOVE WW20-COR-PC TO WW01-COR-PC 11552602 022600*-------------------------------------------------------------* 02260000 SPR12A MOVE WW20-SFTY-STK-TREND-IND SPR12A TO JLF40-DKSS-SALES-TREND-IND 115531 11553102 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 115506* EVALUATE WW01-COR-PC 02658001 115531* WHEN 0 02659001 115531* MOVE WF01-TI-COR0 TO JLF40-COR-PC 02660001 115531* WHEN 1 02661001 115531* MOVE WF01-TI-COR1 TO JLF40-COR-PC 02662001 115531* WHEN 2 02663001 115531* MOVE WF01-TI-COR2 TO JLF40-COR-PC 02664001 115531* WHEN 3 02665001 115531* MOVE WF01-TI-COR3 TO JLF40-COR-PC 02666001 115531* WHEN 4 02667001 115531* MOVE WF01-TI-COR4 TO JLF40-COR-PC 02668001 115531* WHEN 5 02669001 115531* MOVE WF01-TI-COR5 TO JLF40-COR-PC 02670001 115531* WHEN 6 02671001 115531* MOVE WF01-TI-COR6 TO JLF40-COR-PC 02672001 115531* WHEN 7 02673001 115531* MOVE WF01-TI-COR7 TO JLF40-COR-PC 02674001 115531* WHEN 8 02675001 115531* MOVE WF01-TI-COR8 TO JLF40-COR-PC 02676001 115531* WHEN 9 02677001 115531* MOVE WF01-TI-COR9 TO JLF40-COR-PC 02678001 115531* WHEN OTHER 02679001 115531* MOVE 010 TO JLF40-COR-PC 02680001 115506* END-EVALUATE. 02681001 022600*----- 31/08/2005 - GTM---------------------------------------* 02681101 PERFORM B-699-JL0F40-TI-VALUE. 02681201 022600*-------------------------------------------------------------* 02260000 115531 11553102 115506 SET JLF40-BATCH 11550600 CRV10B FIRST-ORD-DIAG TO TRUE. 11550600 115507 11550700 150400 IF PROCESS-DKSS 150500 SET JLF40-PROCESS-DKSS TO TRUE 150600 ELSE 150700 SET JLF40-DO-NOT-PROCESS-DKSS TO TRUE 150800 END-IF. 150900 *CR V6.ENHANCEMENT. ESTABLISH IF THIS IS A HERCULE PRODUCT BY *CHECKING THOUGH SUBGROUPS HELD ON THE BR FILE BBREPGRP/BRROCAP PERFORM B-340-CHECK-HERCULES-TPN. 150900 115508 B-310-EXIT. 11550800 115509 EXIT. 11550900 115510 11551000 115520 B-320-OVERLAY-DATA SECTION. 11552000 115530*---------------------------------------------------------------* 11553000 115540* SECTION NAME : B-320-OVERLAY-DATA * 11554000 115550* CALLED BY : B-310-VERIFY-INPUT * 11555000 115560* CALLS : NONE * 11556000 115570* : JLMSG-DISPLAY-MESSAGE * 11557000 115580* FUNCTION : 1. MATCH INPUT DETAILS FROM WT10- AND WT20- * 11558000 115590* : AND REPORT IF OUT OF SEQUENCE. * 11559000 115600* : 2. OVERLAY DATA TO JLF40LNK. * 11560000 115700*---------------------------------------------------------------* 11570000 115800 B-320. 11580000 254000* DISPLAY "B-320-OVERLAY-DATA". 25400018 116000 11600000 116100 IF WX10-DATA-SUB1 > 75 11610000 116200 THEN 11620000 116300 SET END-PROCESS-LOOP TO TRUE 11630000 116400 GO TO B-320-EXIT 11640000 116500 END-IF. 11650000 116600 11660000 116700 IF WT10-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES AND 11670000 116800 WT20-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES AND 11680000 116900 WT10-DELY-REQ-TIME(WX10-DATA-SUB1) = SPACES AND 11690000 117000 WT20-DELY-REQ-TIME(WX10-DATA-SUB1) = SPACES 11700000 117100 THEN 11710000 117200 SET END-PROCESS-LOOP TO TRUE 11720000 117300 GO TO B-320-EXIT 11730000 117400 END-IF. 11740000 117500 11750000 117600 IF (WT10-DELY-REQ-DATE(WX10-DATA-SUB1) = 11760000 117700 WT20-DELY-REQ-DATE(WX10-DATA-SUB1)) 11770000 *------------------------------------------------------------ *-------COMMENTED OUT AS IT IS POSSIBLE THAT F20 AND F25 *-------MAY RUN AFTER EACH OTHER RATHER THAN AT THE SAME TIME *-------AND THIS MAY CAUSE DIFFERENT START TIMES TO OCCUR. 117800* AND (WT10-DELY-REQ-TIME(WX10-DATA-SUB1) = 11780000 117900* WT20-DELY-REQ-TIME(WX10-DATA-SUB1)) 11790000 *------------------------------------------------------------ 118000 THEN 11800000 118100 PERFORM B-330-OVERLAY-JLF40LNK 11810000 118200 ELSE 11820000 118300 MOVE WW01-CURR-RO-NO TO WM16-RO-NO 11830000 118400 MOVE WW01-CURR-BPR-TPN TO WM16-BPR-TPN 11840000 118500 MOVE WM16-OUT-OF-SEQ TO JLMSG-TEXT 11850000 118600 PERFORM JLMSG-DISPLAY-MESSAGE 11860000 118700 SET END-PROCESS-LOOP TO TRUE 11870000 118800 SET PROCESS-NEXT-RO-TPN TO TRUE 11880000 118900 GO TO B-320-EXIT 11890000 119000 END-IF. 11900000 119100 11910000 119200 ADD 1 TO WX10-DATA-SUB1. 11920000 119300 11930000 119400 B-320-EXIT. 11940000 119500 EXIT. 11950000 119600 11960000 119700 B-330-OVERLAY-JLF40LNK SECTION. 11970000 119800*---------------------------------------------------------------* 11980000 119900* SECTION NAME : B-330-OVERLAY-JLF40LNK * 11990000 120000* CALLED BY : B-320-OVERLAY-DATA * 12000000 120100* CALLS : NONE * 12010000 120200* FUNCTION : 1. MOVE INPUT DETAILS FROM WT10- AND WT20- * 12020000 120300* : TO JLF40LNK. * 12030000 120400*---------------------------------------------------------------* 12040000 120500 B-330. 12050000 259200* DISPLAY "B-330-OVERLAY-JLF40LNK". 25920018 120700 MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 12070000 120800 TO WW01-END-DATE. 12080000 196000* 19600000 196100* * * PRODUCT IS ONLY ON ALLOC ON DEMAND PERIODS (NOT CALC) CAW 19610000 196200* 19620000 196300 IF WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) = "D" 19630000 201100 AND (WT10-ALLOC-IND(WX10-DATA-SUB1) = "F" OR "V" OR "H") 20110003 121200 SET PRODUCT-ON-ALLOCATION TO TRUE 12120000 121300 END-IF. 12130000 121400 12140000 201104*----- 27/03/2001 - GM ---------------------------------------* 20110400 201708 IF WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) = "D" 20170800 260600 AND (WT10-ALLOC-IND(WX10-DATA-SUB1) = "L" OR "P" OR "R") 26060000 201702 MOVE WT10-ALLOC-IND(WX10-DATA-SUB1) TO 20170200 201703 JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 20170300 201704 SET PRODUCT-ON-MM-ALLOCATION TO TRUE 20170400 201705 END-IF. 20170500 201706*-------------------------------------------------------------* 20170600 201707 20170700 201708 IF WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) = "D" 20170800 201800 IF WT10-DELY-IND(WX10-DATA-SUB1) = 20180000 CRV11A*----- 21/01/2003 - GM ---------------------------------------* CRV11A* "B" OR "Y" OR "P" OR "E" 20181000 CRV11A "B" OR "Y" OR "P" OR "E" OR "S" 20181000 CRV11A*-------------------------------------------------------------* 201900 OR 20190000 203100 (WT10-DELY-IND(WX10-DATA-SUB1) = "N" 20310000 203200 AND WT10-SPECIAL-ORDER-QTY(WX10-DATA-SUB1) > 0) 20320000 203400 MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 20340002 203500 TO WW01-LAST-DELIVERY-DATE 20350002 203600 END-IF 20360002 123000 END-IF. 12300000 123100 12310000 123200 MOVE WW01-CURR-PART-NO TO JLF40-CR-PART-NO. 12320000 123300 MOVE WW01-CURR-RO-NO TO JLF40-RETAIL-OUTLET-NO. 12330000 123400 MOVE WW01-CURR-BPR-TPN TO JLF40-BASE-PRODUCT-NO. 12340000 123500 12350000 123600 MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 12360000 123700 TO JLF40-PER-STR-DATE(WX10-DATA-SUB1). 12370000 AUT08B IF WX10-DATA-SUB1 < 75 AUT08B COMPUTE WX10-DATA-SUB3 = WX10-DATA-SUB1 + 1 AUT08B MOVE SPACES TO JLF40-PER-STR-DATE(WX10-DATA-SUB3) AUT08B END-IF. 123800 MOVE WT10-DELY-REQ-TIME(WX10-DATA-SUB1) 12380000 123900 TO JLF40-PER-STR-TIME(WX10-DATA-SUB1). 12390000 124000 MOVE WT10-PERD-END-DATE(WX10-DATA-SUB1) 12400000 124100 TO JLF40-PER-END-DATE(WX10-DATA-SUB1). 12410000 124200 MOVE WT10-PERD-END-TIME(WX10-DATA-SUB1) 12420000 124300 TO JLF40-PER-END-TIME(WX10-DATA-SUB1). 12430000 124400 MOVE WT10-ORDER-TYPE(WX10-DATA-SUB1) 12440000 124500 TO JLF40-ORDER-TYPE(WX10-DATA-SUB1). 12450000 264000 MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) 26400020 264100 TO JLF40-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1). 26410020 170900 MOVE WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) 124700 TO JLF40-PERIOD-CALC-TYPE(WX10-DATA-SUB1). 12470000 124800 MOVE WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1) 12480000 124900 TO JLF40-NOTNL-CALC-DATE(WX10-DATA-SUB1). 12490000 125000 MOVE WT10-NOTNL-CALC-TIME(WX10-DATA-SUB1) 12500000 125100 TO JLF40-NOTNL-CALC-TIME(WX10-DATA-SUB1). 12510000 125200 MOVE WT10-DELY-IND(WX10-DATA-SUB1) 12520000 125300 TO JLF40-DELY-IND(WX10-DATA-SUB1). 12530000 125400 12540000 125500 MOVE WT10-STOCK-CENTRE-NO(WX10-DATA-SUB1) 12550000 125600 TO JLF40-STOCK-CENTRE-NO(WX10-DATA-SUB1). 12560000 125700 MOVE WT10-PERD-OS-ORD-QTY(WX10-DATA-SUB1) 12570000 125800 TO JLF40-PERD-OS-ORD-QTY(WX10-DATA-SUB1). 12580000 172200 MOVE WT10-SPECIAL-ORDER-QTY(WX10-DATA-SUB1) 126000 TO JLF40-CUST-ORD-QTY(WX10-DATA-SUB1). 12600000 143S01 MOVE WT10-SMFO-ORDER-QTY(WX10-DATA-SUB1) 143S01 TO JLF40-SMFO-ORD-QTY(WX10-DATA-SUB1). 143S01 MOVE WT10-SMFO-ORDER-IND(WX10-DATA-SUB1) 143S01 TO JLF40-SMFO-ORD-IND(WX10-DATA-SUB1). 172400 MOVE WT10-FCAST-SALES-CAL(WX10-DATA-SUB1) 126200 TO JLF40-PERD-FCST-SALES(WX10-DATA-SUB1). 12620000 126300 MOVE WT10-PERD-HOURLY-PTP(WX10-DATA-SUB1) 12630000 126400 TO JLF40-PERD-HOURLY-PTP(WX10-DATA-SUB1). 12640000 126500 12650000 126600 MOVE WT10-PROM-IND(WX10-DATA-SUB1) 12660000 126700 TO JLF40-PROM-IND(WX10-DATA-SUB1). 12670000 173100 MOVE WT10-OFFER-END-DATE(WX10-DATA-SUB1) 126900 TO JLF40-PROM-END-DATE(WX10-DATA-SUB1). 12690000 173300 MOVE WT10-OFFER-SHELF-CAP(WX10-DATA-SUB1) 127100 TO JLF40-PROM-SHELF-CAP(WX10-DATA-SUB1). 12710000 127200 12720000 SUM04B MOVE WT10-666-SHELF-CAP(WX10-DATA-SUB1) SUM04B TO JLF40-666-SHELF-CAP(WX10-DATA-SUB1). 12710000 SUM04B 12720000 AUT05B MOVE WT10-NEXT-PROM-SHELF-CAP(WX10-DATA-SUB1) AUT05B TO JLF40-NEXT-PROM-SHELF-CAP(WX10-DATA-SUB1). 12710000 AUT05B 12720000 MOVE WT10-DMND-ADJMT-PERC(WX10-DATA-SUB1) TO JLF40-DMND-ADJMT-PERC(WX10-DATA-SUB1) SPR08C SPR08C MOVE WT10-MIN-PROM-CAP(WX10-DATA-SUB1) SPR08C TO JLF40-MIN-PROM-CAP(WX10-DATA-SUB1) SPR08C SPR08C MOVE WT10-MIN-PROM-REQ-IND(WX10-DATA-SUB1) SPR08C TO JLF40-MIN-PROM-REQ-IND(WX10-DATA-SUB1) SUM04B 12720000 SUM09A MOVE WT10-FIXED-FILL-IND(WX10-DATA-SUB1) 12660000 SUM09A TO JLF40-FIXED-FILL-IND(WX10-DATA-SUB1) 12670000 SUM04B 12720000 SPR12D MOVE WT10-ACT-PROM-END-DATE(WX10-DATA-SUB1) 12660000 SPR12D TO JLF42-PROM-END-DATE(WX10-DATA-SUB1) 12670000 SPR12D MOVE WT10-BACK-BACK-PROM-CAP(WX10-DATA-SUB1) SPR12D TO JLF42-NEXT-PROM-SHELF-CAP(WX10-DATA-SUB1) SUM13C IF WT10-RATIO-PACK-CAP(WX10-DATA-SUB1) > 0 SUM13A COMPUTE JLF42-PERD-OS-ORD-QTY(WX10-DATA-SUB1)= SUM13A WT10-PERD-OS-ORD-QTY(WX10-DATA-SUB1) + SUM13A WT10-PERD-OS-ORD-QTY-RP(WX10-DATA-SUB1) SUM13C ELSE SUM13C MOVE WT10-PERD-OS-ORD-QTY(WX10-DATA-SUB1) TO SUM13C JLF42-PERD-OS-ORD-QTY(WX10-DATA-SUB1) SUM13C END-IF SUM13C MOVE WT10-PERD-OS-ORD-QTY-RP(WX10-DATA-SUB1) SUM13C TO JLF42-PERD-OS-ORD-QTY-RP(WX10-DATA-SUB1) SUM13A MOVE WT10-RATIO-PACK-CAP(WX10-DATA-SUB1) SUM13A TO JLF42-RATIO-PACK-CAP(WX10-DATA-SUB1) SUM13A MOVE WT10-RATIO-PACK-CTL-FTR(WX10-DATA-SUB1) SUM13A TO JLF42-RATIO-PACK-CTL-FTR(WX10-DATA-SUB1) 162S24 MOVE WT10-PRE-OFR-DEL-IND(WX10-DATA-SUB1) 162S24 TO JLF42-PRE-OFR-DEL-IND(WX10-DATA-SUB1) SUM04B 12720000 173600 IF WT10-SAVED-NWS(WX10-DATA-SUB1) NOT NUMERIC 127260 THEN 12726002 SPR12A MOVE WW20-NOTNL-WKLY-SALES 12727002 127271 TO JLF40-SAVED-NWS(WX10-DATA-SUB1) 12727102 127280 ELSE 12728002 127300 MOVE WT10-SAVED-NWS(WX10-DATA-SUB1) 12730002 127400 TO JLF40-SAVED-NWS(WX10-DATA-SUB1) 12740002 127410 END-IF. 12741002 127500 12750000 127500 MOVE +0 TO JLF40-PERD-ANTIC-WASTE-SALES(WX10-DATA-SUB1). 12750000 127500 12750000 127600 MOVE WT20-CONTROL-DATA(WX10-DATA-SUB1) 12760000 127700 TO JLF40-CONTROL-DATA(WX10-DATA-SUB1). 12770000 127800 12780000 AUT08B MOVE 1 TO WX20-SO-SUB. AUT08A CRAUTA PERFORM CRAUTA UNTIL WX20-SO-SUB > WX20-SO-MAX CRAUTA OR JLF40-PER-STR-DATE (WX20-SO-SUB) = SPACES CRAUTA CRAUTA IF JLF40-EXTERNAL-CALC-METHOD(WX20-SO-SUB) = "I" CRAUTA SET WI14-STANDING-ORDER TO TRUE CRAUTA END-IF AUT08B ADD 1 TO WX20-SO-SUB CRAUTA CRAUTA END-PERFORM CRAUTA 127900 MOVE "N" 12790000 127910 TO JLF40-DEV-LINE-IND(WX10-DATA-SUB1). 12791000 127920 12792000 166500 MOVE WT10-PALLET-ROUND-IND(WX10-DATA-SUB1) TO 166600 JLF40-PALLET-RND-IND(WX10-DATA-SUB1). 175500 MOVE WT10-OPEN-FOR-TRADE(WX10-DATA-SUB1) TO 166800 JLF40-OPEN-FOR-TRADE-IND(WX10-DATA-SUB1). 175700 MOVE WT10-ALT-MERCH-UNITS(WX10-DATA-SUB1) 175800 TO JLF40-ALT-MERCH-UNITS(WX10-DATA-SUB1). 175900 MOVE WT10-ALT-MERCH-UNITS-RND(WX10-DATA-SUB1) 176000 TO JLF40-ALT-MERCH-UNIT-RND(WX10-DATA-SUB1). MOVE WT10-STK-FILL-IND (WX10-DATA-SUB1) TO JLF40-STK-FILL-IND (WX10-DATA-SUB1) MOVE WT10-STK-FILL-WK-IND (WX10-DATA-SUB1) TO JLF40-STK-FILL-WK-IND (WX10-DATA-SUB1) . 127930 B-330-EXIT. 12793000 127940 EXIT. 12794000 127950 12795000 /---------------------------------------------------------------* * SECTION NAME : B-340-CHECK-HERCULES-TPN * * CALLED BY : * * CALLS : * * FUNCTION : CHECK FOR HERCULES PRODUCTS ON THE BR FILE. * * SEARCH BR DATA FOR STORES TO BE EXCLUDED, SUB- * * GROUPS TO BE INCLUDED FOR SHELF CAP UPDATE * *---------------------------------------------------------------* B-340-CHECK-HERCULES-TPN SECTION. 270500* DISPLAY "B-340-CHECK-HERCULES-TPN". 27050018 204070* 20407000 204080* MOVE WT10-SUB-PG-CODE TO WW01-SUB-PG-CODE 20408000 204090* SET WT02-IND TO 1 20409000 204100* SEARCH WT02-RO-TAB 20410000 204200* AT END 20420000 204300* SET RO-TO-BE-INCLUDED TO TRUE 20430000 204400* WHEN WT02-RETAIL-OUTLET-NO-X (WT02-IND) = SPACES 20440000 204500* SET RO-TO-BE-INCLUDED TO TRUE 20450000 204600* WHEN WT02-RETAIL-OUTLET-NO (WT02-IND) = 20460000 204700* WW01-CURR-RO-NO 20470000 204800* SET RO-NOT-TO-BE-INCLUDED TO TRUE 20480000 204900* END-SEARCH 20490000 205000* 20500000 * TABLE OF SUB-GROUPS MAY CONTAIN 3 BYTE SECTION GROUP ENTRIES - * TRY A FULL 5 BYTE MATCH FIRST, THEN GRADUALLY REDUCE 205300* SET SUBGRP-IS-NOT-HERCULES TO TRUE 20530000 205400* MOVE 5 TO WX01-SUB 20540000 205500* PERFORM 20550000 205600* UNTIL SUBGRP-IS-HERCULES 20560000 205700* OR RO-NOT-TO-BE-INCLUDED 20570000 205800* OR WX01-SUB < 1 20580000 205900* 20590000 206000* SET WT01-IND TO 1 20600000 206100* SEARCH WT01-BR-SUB-PG-CODE 20610000 206200* AT END 20620000 206300* MOVE SPACES TO WW01-SUB-PG-CODE(WX01-SUB:1) 20630000 206400* SUBTRACT 1 FROM WX01-SUB 20640000 206500* WHEN WT01-BR-SUB-PG-CODE(WT01-IND) = SPACES 20650000 206600* MOVE SPACES TO WW01-SUB-PG-CODE(WX01-SUB:1) 20660000 206700* SUBTRACT 1 FROM WX01-SUB 20670000 206800* WHEN WT01-BR-SUB-PG-CODE(WT01-IND) = LOW-VALUES 20680000 206900* MOVE SPACES TO WW01-SUB-PG-CODE(WX01-SUB:1) 20690000 207000* SUBTRACT 1 FROM WX01-SUB 20700000 207100* WHEN WT01-BR-SUB-PG-CODE(WT01-IND) = 20710000 207200* WW01-SUB-PG-CODE 20720000 207300* SET SUBGRP-IS-HERCULES TO TRUE 20730000 207400* END-SEARCH 20740000 207500* END-PERFORM. 20750000 207600* 20760000 207700*----- 27/03/2001 - GM ---------------------------------------* 20770000 207800* IF RO-NOT-TO-BE-INCLUDED 20780000 207900* OR SUBGRP-IS-NOT-HERCULES 20790000 208000* MOVE "N" TO JLF40-EXCL-SHELF-CAP-IND 20800000 208100* ELSE 20810000 208200* MOVE "Y" TO JLF40-EXCL-SHELF-CAP-IND 20820000 208300* END-IF. 20830000 208400* 20840000 208500 MOVE "N" TO JLF40-EXCL-SHELF-CAP-IND. 20850000 208600*-------------------------------------------------------------* 20860000 B-340-EXIT. EXIT. 127960 B-350-CALC-RO-TPN SECTION. 12796000 127970*---------------------------------------------------------------* 12797000 127980* SECTION NAME : B-350-CALC-RO-TPN * 12798000 127990* CALLED BY : B-300-PROCESS-RO-TPN * 12799000 128000* CALLS : * 12800000 128100* : * 12810000 128200* : JLMSG-DISPLAY-MESSAGE * 12820000 128300* FUNCTION : 1. PROCESS THE RO/TPN STORED IN W-S * 12830000 128400*---------------------------------------------------------------* 12840000 128500 B-350. 12850000 128700 PERFORM V-110-READ-VXJJ0BPR. 12870000 128800 12880000 128900 IF BPR-FOUND 12890000 129000 THEN 12900000 194200 MOVE BPR-MIN-SHELF-LIFE TO JLF40-MIN-SHELF-LIFE 208927*----- 27/03/2001 - GM ---------------------------------------* 20892700 208928* MOVE BPR-UNIT-SIZE TO JLF40-UNIT-SIZE 20892800 208929 IF WT10-UNIT-SIZE <= +0 20892900 208930 THEN 20893000 288600 INITIALIZE WM25-INVALID-UNIT-SIZE 28860000 288700 MOVE WT10-UNIT-SIZE TO WM25-UNIT-SIZE 28870000 288710 MOVE WW01-CURR-PART-NO TO WM25-PART-NO 28871000 288800 MOVE WW01-CURR-RO-NO-DB2 TO WM25-RO-NO 28880000 288900 MOVE WW01-CURR-BPR-TPN-DB2 TO WM25-BPR-TPN 28890000 289000 MOVE WM25-INVALID-UNIT-SIZE TO JLMSG-TEXT 28900000 289200 PERFORM JLMSG-DISPLAY-MESSAGE 28920000 289201 SET PROCESS-NEXT-RO-TPN TO TRUE 28920100 289202 PERFORM B-999-DUMP-REJECTS 28920200 289203 GO TO B-350-EXIT 28920300 289204 END-IF 28920400 289205 MOVE WT10-UNIT-SIZE TO JLF40-UNIT-SIZE 28920500 289206*-------------------------------------------------------------* 28920600 CRV90B* CHECK IF PRODUCT/ JLF40-PER-STR-DATE(N) IS TAGGED AS HAVING * 28920600 CRV90B* A DEGRADING SHELF LIFE * 28920600 CRV90B* NOTE: FOR EACH DATE ENTRY A FLAG WILL BE SET TO INDICATE * 28920600 CRV90B* WHETHER A DSF ROW WAS APPLICABLE I.E. A DEGRADING * 28920600 CRV90B* SHELF LIFE APPLIED TO THE PRODUCT FOR THE START DATE * 28920600 CRV90B*-------------------------------------------------------------* 28920600 CRV90B PERFORM B-358-CHECK-DEGRAD-SHELF-LIFE CRV90B 183300 PERFORM B-357-SET-EXP-SHELF-LIFE 14100000 183300 14100000 AUT08A PERFORM B-360-MAX-SHELF-LIFE 14100000 129300 ELSE 12930000 129400 PERFORM B-999-DUMP-REJECTS 12940000 129500 GO TO B-350-EXIT 12950000 129600 END-IF. 12960000 129700 12970000 280200* SET DEFAULT VALUES FOR THE BD ALLOCATION VALUES. 28020005 280300 MOVE ZERO TO ALL-REM-RSVE-QTY 28030005 280400 MOVE "2000-01-01" TO ALL-LAST-FORCED-DATE 28040005 281200 MOVE " " TO ALL-ALLOC-TYPE 28120025 AUT07A MOVE ZERO TO ALL-PROC-REM-RSVE-QTY 28030005 AUT07A MOVE "0001-01-01" TO ALL-PROC-LST-FORCED-DT 28040005 280500 28050004 132600 IF PRODUCT-ON-ALLOCATION 13260000 132700 THEN 13270000 132800 PERFORM V-500-READ-VXJJ0ALL 13280000 132900 IF ALL-FOUND 13290000 133000 THEN 13300000 133100 SET NOT-MISSING-ALP TO TRUE 13310000 133200 PERFORM B-400-RETRIEVE-ALP 13320000 133300 IF MISSING-ALP 13330000 133400 THEN 13340000 133500 INITIALIZE WM20-ALP-NOT-FOUND 13350000 133600 MOVE WW01-CURR-PART-NO TO WM20-PART-NO 13360000 133700 MOVE WW01-CURR-RO-NO TO WM20-RO-NO 13370027 133710 MOVE WW01-CURR-BPR-TPN TO WM20-BPR-TPN 13371027 133710 MOVE ALL-LAST-FORCED-DATE TO WM20-LAST-FRCD-DT 13371027 133730 MOVE WM20-ALP-NOT-FOUND TO JLMSG-TEXT 13373000 133731 PERFORM JLMSG-DISPLAY-MESSAGE 13373100 133733 PERFORM V-530-CLOSE-READNEXT-VXJJ0ALP 13373327 133734 END-IF 13373400 133735 ELSE 13373500 133736 PERFORM B-999-DUMP-REJECTS 13373600 133737 GO TO B-350-EXIT 13373700 133738 END-IF 13373800 133739 END-IF. 13373900 133740 13374000 289237*----- 27/03/2001 - GM ------------------------------------------*28923700 289238 IF PRODUCT-ON-MM-ALLOCATION 28923800 289239 PERFORM B-351-MM-ALLOCATION 28923900 133900 END-IF. 13390000 289241*----------------------------------------------------------------*28924100 134000 13400000 283600* IF WE'RE ON ALLOCATION, CHECK FOR BD/MM RESERVES AND APPLY TO 28360004 284100* THE LINKAGE OF JLF40LNK. OTHERWISE, SIMPLY SET 'NO RESERVES'. 28410013 284600* OPEN THE RELEVANT CURSOR ONLY WHEN WE ACTUALLY NEED IT ! 28460004 283800 IF PRODUCT-ON-ALLOCATION 28380004 283900 OR PRODUCT-ON-MM-ALLOCATION 28390004 284800 28480002 142800 MOVE WW01-CURR-BPR-TPN TO WW01-CURR-BPR-TPN-DB2 14280000 142900 MOVE WW01-CURR-RO-NO TO WW01-CURR-RO-NO-DB2 14290000 285100 28510002 285200 IF PRODUCT-ON-MM-ALLOCATION 28520002 285300 AND WI10-MM-RSVE-CURSOR-CLOSED 28530002 284100 PERFORM VGA-OPEN-MM-RSVE-CURSOR 28410001 284200 PERFORM VGB-FETCH-MM-RSVE-CURSOR 28420003 284300 END-IF 28430003 285700 28570002 285800 IF PRODUCT-ON-ALLOCATION 28580002 285900 AND WI12-BD-RSVE-CURSOR-CLOSED 28590002 284500 PERFORM VHA-OPEN-BD-RSVE-CURSOR 28450002 284600 PERFORM VHB-FETCH-BD-RSVE-CURSOR 28460003 284700 END-IF 28470002 284800 28480003 284900 PERFORM B-460-PROCESS-RESERVES 28490001 285400 ELSE 28540012 285500 PERFORM 28550012 285600 VARYING WX10-DATA-SUB1 FROM 1 BY 1 28560012 285700 UNTIL WX10-DATA-SUB1 > 75 28570012 285800 OR JLF40-PER-STR-DATE (WX10-DATA-SUB1) = SPACES 28580012 285900 IF JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" 28590012 286000 MOVE ZERO TO JLF40-RSVE-QTY (WX10-DATA-SUB1) 28600012 286100 MOVE "N" TO JLF40-RSVE-IND (WX10-DATA-SUB1) 28610012 286200 END-IF 28620012 286300 END-PERFORM 28630012 285000 END-IF 28500001 285100 28510004 289243 PERFORM B-450-RETRIEVE-BSP. 28924300 SUM12A MOVE WX95-SUB TO WX95-MAX 134200 13420000 289245 IF MISSING-BSP 28924500 289246 PERFORM B-999-DUMP-REJECTS 28924600 289247 GO TO B-350-EXIT 28924700 134700 END-IF. 13470000 134800 13480000 289250 PERFORM B-500-RETRIEVE-BDL. 28925000 289251 28925100 176620 INITIALIZE WT40-OLD-CURSOR-DATA. 17662000 BUGFIX INITIALIZE JLF46-WT40-OLD-CURSOR-DATA. 17662000 289252 IF BPR-MIN-SHELF-LIFE <= 21 28925200 CRV90B OR AT-LEAST-1-DEG-SHELF-LIFE 289253 PERFORM B-475-SET-ANTIC-WASTE-SALES 28925300 289254 PERFORM B-550-RETRIEVE-OLD 28925400 SUM13A IF PROCTRAP-PROCESSING SUM13A PERFORM XXX-200-PROCTRAP-PROCESSING 28925400 SUM13A END-IF 289255 PERFORM B-600-CALC-MAX-IN-CODE 28925500 SUM13A ELSE SUM13A MOVE "2099-12-31" TO WW01-OLD-END-DATE 289256 END-IF. 28925600 289257 28925700 134900 MOVE WF01-SDEVSAFE TO JLF40-SML-DEV-SAFE-PC. 13490000 135000 MOVE WF01-MDEVSAFE TO JLF40-MED-DEV-SAFE-PC. 13500000 135100 MOVE WF01-LDEVSAFE TO JLF40-LRG-DEV-SAFE-PC. 13510000 135200 MOVE WF01-PROMSAFE TO JLF40-PROM-SAFE-PC. 13520000 135900 MOVE WF01-NSFRDCAS TO JLF40-NON-STKF-RND-PC. 13590000 135910 MOVE WF01-OOTCHECK TO JLF40-OOT-DAYS. 13591000 289270*----- 27/03/2001 - GM ---------------------------------------* 28927000 135911* MOVE WF01-CAPCHECK TO JLF40-CAPACITY-DAYS. 13591100 289272*-------------------------------------------------------------* 28927200 191700 MOVE WF01-EXPDATAM TO JLF40-EXPIRY-DATE-AM-ADJ. 191800 MOVE WF01-EXPDATPM TO JLF40-EXPIRY-DATE-PM-ADJ. 191800 MOVE WF01-CCAPPC TO JLF40-CCAPACITY-PC. 191800 MOVE WF01-OCMEDDAY TO JLF40-MEDIUM-LIFE-DAYS. 191800 MOVE WF01-OCMEDCAP TO JLF40-MEDIUM-LIFE-CAP-DAYS. 289205 MOVE WF01-EXCLWSTM TO JLF40-EXCL-ANTIC-WASTE-TIME. 28920500 CRV10B MOVE WF01-OUP2MDD TO JLF40-ORDER-UP-TO-MAX-DEM-DAYS CRV10B MOVE WF01-TIRNDEFF TO JLF40-PREV-ORD-RND-EFF-TI-PC 161S21 MOVE WF01-SMFO-RESV-AllOC-KEY 161S21 TO JLF40-SMFO-RESV-ALLOC-KEY 135912 13591200 175400 PERFORM B-650-LOOKUP-LEGACY-ID. 175600 CRAUTA IF WI14-STANDING-ORDER CRAUTA PERFORM B-660-OBTAIN-SO-QTY CRAUTA END-IF. CRAUTA PERFORM B-670-CHECK-FOR-GAP-ORDER 192300 PERFORM B-690-SET-OLD-DAY-FCST-SALES. 190600 CRV10B IF FIRST-ORDER-TO-CALC CRV10B PERFORM B-695-OBTAIN-PREV-ORDER-DET CRV10B SET NOT-FIRST-ORDER-TO-CALC TO TRUE CRV10B END-IF. CRV10B 155701 SET PROCESS-LOOP TO TRUE. 15570108 155710 MOVE 1 TO WX10-DATA-SUB1. 15571008 155710 MOVE 1 TO WX10-DATA-SUB2. 15571008 155760 15576008 289306*----- 27/03/2001 - GM ---------------------------------------* 28930600 289307* CONTROL FROM PAR REPLACED WITH 'FULL' CONTROL FROM INPUT * 28930700 289308* PERFORM B-355-SET-DEM-TOP-SHELF-FILL 28930800 289309* UNTIL END-PROCESS-LOOP. 28930900 289310*----- 27/03/2001 - GM ---------------------------------------* 28931000 155760 03125501 289306*----- 31/08/2005 - GTM---------------------------------------* 03125201 135913 PERFORM B-696-CHECK-SIMREP-SS-TRIAL. 03125301 289306*-------------------------------------------------------------* 03125401 SUM09B 22160000 SUM09B PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 22160000 SUM09B UNTIL WX10-DATA-SUB1 > 75 22160000 SUM09B OR (JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" 22160000 SUM09B AND WT10-PROM-IND (WX10-DATA-SUB1) = "Y" ) 22160000 SUM09B END-PERFORM 22160000 SUM09B 22160000 SUM09B IF WX10-DATA-SUB1 <= 75 22160000 SUM12A MOVE 1 TO WX95-SUB SUM09B PERFORM B-711-CREATE-NWS 22160000 SUM09B END-IF 22160000 221600 22160000 PERFORM B-710-COPY-JLF40 13591300 155760 03125501 SUM11A IF (JL01X-RUN-ID NOT = "9" ) OR SUM10B (JL01X-RUN-ID = "9" AND WF01-BFFOFCST = "ON " ) OR SUM11A (JL01X-RUN-ID = "9" AND WF01-BGOCALC(4:3)= "ON ") SUM10B SET NEW-PROCESS-LOOP TO TRUE 07576000 SUM10B MOVE 1 TO WX10-DATA-SUB1-NEW 07577000 SUM10B 07578000 SUM11A SET FIRST-D-NOT-FOUND TO TRUE 07578000 SUM11A SET FIRST-FILLUP-NOT-FOUND TO TRUE 07578000 SUM11A MOVE SPACES TO WW10-ORDER-TYPE-FIRSTD 07578000 SUM11A INITIALIZE DCLVXJJ0PPD 07578000 SUM10B 07578000 SUM11A MOVE JLF46-PER-STR-DATE (1) TO WW10-REQ-DEL-DT-CALC SUM11A MOVE JLF46-PER-STR-TIME (1) TO WW10-REQ-DEL-TM-CALC SUM11A MOVE JLF46-STOCK-CENTRE-NO (1) TO PPD-STK-CTR-NO SUM10B PERFORM UNTIL END-NEW-PROCESS-LOOP 07579000 SUM10B MOVE JLF46-STORE-SHELF-LIFE (WX10-DATA-SUB1-NEW) 07580000 SUM10B TO WW09-MAX-SHELF-LIFE 07581000 SUM11A*----------------------------------------------------------------* SUM11A* GET REQUIRED DELIVERY DATE AND TIME OF FIRST FILL UP D TYPE * SUM11A* RECORD * SUM11A* - TO GET FINAL ORDER LEAD TIME OF PBS PRODUCT * SUM11A* - TO GET PROCUREMENT ORDER LEAD TIME OF PBL PRODUCT * SUM11A* * SUM11A* GET NOTIONAL CALCULATION DATE AND TIME OF FIRST FILL UP D TYPE * SUM11A* RECORD * SUM11A* - TO GET FINAL ORDER LEAD TIME OF PBS PRODUCT * SUM11A*---------------------------------------------------------------* SUM11A IF WW10-ORDER-TYPE-FIRSTD = "T" SUM11A AND FIRST-FILLUP-NOT-FOUND SUM11A AND JLF46-PERIOD-CALC-TYPE (WX10-DATA-SUB1-NEW) = "D" SUM11A AND JLF46-ORDER-TYPE (WX10-DATA-SUB1-NEW) = "F" SUM11A AND (JLF46-DELY-IND (WX10-DATA-SUB1-NEW) NOT = "N" SUM11A OR (JLF46-DELY-IND (WX10-DATA-SUB1-NEW) = "N" SUM11A AND JLF46-CUST-ORD-QTY (WX10-DATA-SUB1-NEW) > 0)) SUM11A MOVE JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) SUM11A TO WW10-REQ-DEL-DT-FIRSTD-F SUM11A MOVE JLF46-PER-STR-TIME (WX10-DATA-SUB1-NEW) SUM11A TO WW10-REQ-DEL-TM-FIRSTD-F SUM11A MOVE JLF46-NOTNL-CALC-DATE (WX10-DATA-SUB1-NEW) SUM11A TO WW10-NOT-CAL-DT-FIRSTD-F SUM11A MOVE JLF46-NOTNL-CALC-TIME (WX10-DATA-SUB1-NEW) SUM11A TO WW10-NOT-CAL-TM-FIRSTD-F SUM11A SET FIRST-FILLUP-FOUND TO TRUE SUM11A END-IF SUM11A*----------------------------------------------------------------* SUM11A* GET REQUIRED DELIEVRY DATE AND TIME OF FIRST D TYPE RECORD * SUM11A* - TO GET FINAL ORDER LEAD TIME OF A PBS PRODUCT * SUM11A* - TO GET PROCUREMENT ORDER LEAD TIME OF A PBL PRODUCT * SUM11A* - TO GET ACTUAL LEAD TIME * SUM11A* * SUM11A* GET NOTIONAL CALCULATION DATE AND TIME OF FIRST D TYPE RECORD * SUM11A* - TO GET FINAL ORDER LEAD TIME OF A PBS * SUM11A*----------------------------------------------------------------* SUM11A IF FIRST-D-NOT-FOUND SUM11A AND JLF46-PERIOD-CALC-TYPE (WX10-DATA-SUB1-NEW) = "D" SUM11A AND (JLF46-DELY-IND (WX10-DATA-SUB1-NEW) NOT = "N" SUM11A OR (JLF46-DELY-IND (WX10-DATA-SUB1-NEW) = "N" SUM11A AND JLF46-CUST-ORD-QTY (WX10-DATA-SUB1-NEW) > 0)) SUM11A MOVE JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) SUM11A TO WW10-REQ-DEL-DT-FIRSTD SUM11A MOVE JLF46-PER-STR-TIME (WX10-DATA-SUB1-NEW) SUM11A TO WW10-REQ-DEL-TM-FIRSTD SUM11A MOVE JLF46-ORDER-TYPE (WX10-DATA-SUB1-NEW) SUM11A TO WW10-ORDER-TYPE-FIRSTD SUM11A MOVE JLF46-NOTNL-CALC-DATE (WX10-DATA-SUB1-NEW) SUM11A TO WW10-NOT-CAL-DT-FIRSTD SUM11A MOVE JLF46-NOTNL-CALC-TIME (WX10-DATA-SUB1-NEW) SUM11A TO WW10-NOT-CAL-TM-FIRSTD SUM11A SET FIRST-D-FOUND TO TRUE SUM11A END-IF SUM10B 07583000 SUM10B ADD +1 TO WX10-DATA-SUB1-NEW 07582000 SUM10B 07583000 SUM10B IF WX10-DATA-SUB1-NEW > 75 07584000 SUM10B OR JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) = SPACES 07585000 SUM10B SET END-NEW-PROCESS-LOOP TO TRUE 07586000 SUM10B END-IF 07587000 SUM10B END-PERFORM 07588000 SUM10B END-IF 07589000 SUM10B IF (( JL01X-RUN-ID NOT = "9" ) OR SUM10B ( JL01X-RUN-ID = "9" AND WF01-BFFOFCST = "ON " )) AND SUM10B WW01-MAX-SHELF-LIFE NOT > WW09-MAX-SHELF-LIFE SUM10B PERFORM B-880-AO-CREATE-OUTPUT SUM10B IF WW10-JLF46-PROCESSED = "Y" SUM10B GO TO B-350-EXIT SUM10B END-IF SUM10B END-IF SMJU15 SUM11A IF (( JL01X-RUN-ID NOT = "9" AND WF01-BGOCALC(1:3)= "ON ") OR SUM11A ( JL01X-RUN-ID = "9" AND WF01-BGOCALC(4:3) = "ON " )) AND SUM11A WW01-MAX-SHELF-LIFE > WW09-MAX-SHELF-LIFE SUM11A PERFORM B-980-AO-CREATE-OUTPUT SUM11A IF WW10-JLF42-PROCESSED = "Y" SUM10B GO TO B-350-EXIT SUM10B END-IF SUM10B END-IF 155760 03125501 135913 PERFORM B-700-CALL-JLF40. 13591300 135914 13591400 135915 EVALUATE JLF40-ERROR-CODE 13591500 135916 WHEN ZEROES 13591600 135917 COMPUTE WA01-NO-OF-CASES = 13591700 135918 WA01-NO-OF-CASES 13591800 135919 + JLF40-NO-OF-CASES 13591900 135920 COMPUTE WA01-NO-OF-ZERO-ORDERS = 13592000 135930 WA01-NO-OF-ZERO-ORDERS 13593000 135940 + JLF40-NO-OF-ZEROCASE 13594000 135950 COMPUTE WA01-NO-OF-PRIORITY1 = 13595000 135960 WA01-NO-OF-PRIORITY1 13596000 135970 + JLF40-NO-OF-PRIORITY-1 13597000 135980 COMPUTE WA01-NO-OF-PRIORITY2 = 13598000 135990 WA01-NO-OF-PRIORITY2 13599000 136000 + JLF40-NO-OF-PRIORITY-2 13600000 135980 COMPUTE WA01-NO-OF-PRIORITY3 = 13598000 135990 WA01-NO-OF-PRIORITY3 13599000 136000 + JLF40-NO-OF-PRIORITY-3 13600000 135980 COMPUTE WA01-NO-OF-PRIORITY4 = 13598000 135990 WA01-NO-OF-PRIORITY4 13599000 136000 + JLF40-NO-OF-PRIORITY-4 13600000 136100 COMPUTE WA01-NO-OF-OOT = 13610000 136200 WA01-NO-OF-OOT 13620000 136300 + JLF40-NO-OF-OOT 13630000 SPR12A IF WW20-SFTY-STK-TREND-IND NOT = SPR12A JLF40-DKSS-SALES-TREND-IND 194710 PERFORM B-750-CREATE-JLFODKSS-FILE 194720 END-IF IF JLF40-SHORT-LIFE PERFORM B-780-CREATE-JLFOEOOC-FILE END-IF 136400 PERFORM B-800-CREATE-OUTPUT 13640000 122000*---------------------------------------------------------------* 12200000 137500 WHEN 1 13750000 137600 MOVE "I" TO WM17-ID 13760000 137700 MOVE WW01-CURR-RO-NO TO WM17-RO-NO 13770000 137800 MOVE WW01-CURR-BPR-TPN TO WM17-BPR-TPN 13780000 137900 MOVE JLF40-ERROR-MSG TO WM17-MSG 13790000 138000 MOVE WM17-JL0F40-MSG TO JLMSG-TEXT 13800000 225600* 22560000 225700* * CAW SUPPRESS I14 MESSAGE AS IT IS NORMAL CASE. 22570000 225800* 22580000 225900 IF WM17-I14 NOT = "I14" 22590000 225900 AND WM17-I14 NOT = "I15" 22590000 226000 PERFORM JLMSG-DISPLAY-MESSAGE 22600000 226100 END-IF 22610000 138200 COMPUTE WA01-NO-OF-CASES = 13820000 138300 WA01-NO-OF-CASES 13830000 138400 + JLF40-NO-OF-CASES 13840000 138500 COMPUTE WA01-NO-OF-ZERO-ORDERS = 13850000 138600 WA01-NO-OF-ZERO-ORDERS 13860000 138700 + JLF40-NO-OF-ZEROCASE 13870000 138800 COMPUTE WA01-NO-OF-PRIORITY1 = 13880000 138900 WA01-NO-OF-PRIORITY1 13890000 139000 + JLF40-NO-OF-PRIORITY-1 13900000 139100 COMPUTE WA01-NO-OF-PRIORITY2 = 13910000 139200 WA01-NO-OF-PRIORITY2 13920000 139300 + JLF40-NO-OF-PRIORITY-2 13930000 135980 COMPUTE WA01-NO-OF-PRIORITY3 = 13598000 135990 WA01-NO-OF-PRIORITY3 13599000 136000 + JLF40-NO-OF-PRIORITY-3 13600000 135980 COMPUTE WA01-NO-OF-PRIORITY4 = 13598000 135990 WA01-NO-OF-PRIORITY4 13599000 136000 + JLF40-NO-OF-PRIORITY-4 13600000 139400 COMPUTE WA01-NO-OF-OOT = 13940000 139500 WA01-NO-OF-OOT 13950000 139600 + JLF40-NO-OF-OOT 13960000 SPR12A IF WW20-SFTY-STK-TREND-IND NOT = SPR12A JLF40-DKSS-SALES-TREND-IND 194710 PERFORM B-750-CREATE-JLFODKSS-FILE 194720 END-IF IF JLF40-SHORT-LIFE PERFORM B-780-CREATE-JLFOEOOC-FILE END-IF 139700 PERFORM B-800-CREATE-OUTPUT 13970000 229000*---------------------------------------------------------------* 22900000 136500 WHEN 8 13650000 136600 MOVE "W" TO WM17-ID 13660000 136700 MOVE WW01-CURR-RO-NO TO WM17-RO-NO 13670000 136800 MOVE WW01-CURR-BPR-TPN TO WM17-BPR-TPN 13680000 136900 MOVE JLF40-ERROR-MSG TO WM17-MSG 13690000 137000 MOVE WM17-JL0F40-MSG TO JLMSG-TEXT 13700000 137100 PERFORM JLMSG-DISPLAY-MESSAGE 13710000 137200 SET PROCESS-NEXT-RO-TPN TO TRUE 13720000 137300 PERFORM B-999-DUMP-REJECTS 13730000 137400 GO TO B-350-EXIT 13740000 230100*---------------------------------------------------------------* 23010000 139800 WHEN OTHER 13980000 139900 MOVE "C" TO WM17-ID 13990000 140000 MOVE WW01-CURR-RO-NO TO WM17-RO-NO 14000000 140100 MOVE WW01-CURR-BPR-TPN TO WM17-BPR-TPN 14010000 140200 MOVE JLF40-ERROR-MSG TO WM17-MSG 14020000 140300 MOVE WM17-JL0F40-MSG TO JLMSG-TEXT 14030000 140400 PERFORM JLMSG-DISPLAY-MESSAGE 14040000 140500 END-EVALUATE. 14050000 140600 14060000 140700 B-350-EXIT. 14070000 140800 EXIT. 14080000 140900 14090000 289427 B-351-MM-ALLOCATION SECTION. 28942700 289428*----- 27/03/2001 - GM ---------------------------------------* 28942800 289429* CHECK MM-ALLOCATION PRODUCTS 28942900 289430*-----------------------------------------------------------------28943000 289431 28943100 289432 SET NOT-MISSING-MMD TO TRUE 28943200 289433 PERFORM B-430-RETRIEVE-MMD 28943300 289434 28943400 SUM03A*GM SET PRODUCT-NOT-ON-MM-ALLOCATION TO TRUE 28943500 289436 28943600 289437 IF MISSING-MMD 28943700 289438 INITIALIZE WM26-MMD-NOT-FOUND 28943800 289439 MOVE WW01-CURR-PART-NO TO WM26-PART-NO 28943900 289440 MOVE WW01-CURR-RO-NO TO WM26-RO-NO 28944000 289441 MOVE WW01-CURR-BPR-TPN TO WM26-BPR-TPN 28944100 289442 MOVE JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 28944200 289443 TO WM26-ALLOC-TYPE 28944300 289444 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 28944400 289445 TO WM26-REQ-DEL-DT 28944500 289446 MOVE WM26-MMD-NOT-FOUND 28944600 289447 TO JLMSG-TEXT 28944700 289448 PERFORM JLMSG-DISPLAY-MESSAGE 28944800 289449 PERFORM B-999-DUMP-REJECTS 28944900 289450 END-IF. 28945000 289451 28945100 289452 B-351-EXIT. 28945200 289453 EXIT. 28945300 289454 28945400 289455*-------------------------------------------------------------* 28945500 197030 B-355-SET-DEM-TOP-SHELF-FILL SECTION. 14 141100*---------------------------------------------------------------* 14110000 197050* SECTION NAME : B-355-SET-DEM-TOP-SHELF-FILL-PC * 14 141300* CALLED BY : B-350-CALC-RO-TPN * 14130000 141400* CALLS : * 14140000 141500* FUNCTION : 1. MOVE THE DEMAND LINE TOP-UP SHELF FILL %'S * 14150000 141600* : FROM THE PAR TABLE TO THE JLF40LNK FOR * 14160000 141700* : THE APPROPRIATE DAY. * 14170000 141900*---------------------------------------------------------------* 14190000 142000 B-355. 14200000 306500* DISPLAY "B-355". 30650018 142200 14220000 155747 IF WX10-DATA-SUB1 > 75 15574708 OR WX10-DATA-SUB2 > 50 15574708 155748 THEN 15574808 155749 SET END-PROCESS-LOOP TO TRUE 15574908 155749 GO TO B-355-EXIT 15574908 155750 END-IF. 15575008 155760 15576008 155740 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 15574008 155760 OR WT30-CCYY-MM-DD(WX10-DATA-SUB2) = SPACES 15576008 155748 THEN 15574808 155749 SET END-PROCESS-LOOP TO TRUE 15574908 155749 GO TO B-355-EXIT 15574908 155750 END-IF. 15575008 155760 15576008 155740 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) < 15574008 155730 WT30-CCYY-MM-DD(WX10-DATA-SUB2) 15573008 155744 ADD 1 TO WX10-DATA-SUB1 15574408 155749 GO TO B-355-EXIT 15574908 155750 END-IF. 15575008 155760 15576008 155740 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) > 15574008 155730 WT30-CCYY-MM-DD(WX10-DATA-SUB2) 15573008 155741 THEN 15574108 155744 ADD 1 TO WX10-DATA-SUB2 15574408 155749 GO TO B-355-EXIT 15574908 155750 END-IF. 15575008 155760 15576008 155740 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = 15574008 155730 WT30-CCYY-MM-DD(WX10-DATA-SUB2) 15573008 155741 THEN 15574108 155760 EVALUATE WT30-DAY-NO(WX10-DATA-SUB2) 15576008 155760 WHEN 1 15576008 155760 MOVE WF01-DEMTOPS1 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN 2 15576008 155760 MOVE WF01-DEMTOPS2 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN 3 15576008 155760 MOVE WF01-DEMTOPS3 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN 4 15576008 155760 MOVE WF01-DEMTOPS4 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN 5 15576008 155760 MOVE WF01-DEMTOPS5 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN 6 15576008 155760 MOVE WF01-DEMTOPS6 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN 7 15576008 155760 MOVE WF01-DEMTOPS7 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 WHEN OTHER 15576008 155760 MOVE WF01-DEMTOPS1 15576008 155760 TO JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) 15576008 155760 END-EVALUATE 15576008 155744 ADD 1 TO WX10-DATA-SUB1 15574408 155749 GO TO B-355-EXIT 15574908 155750 END-IF. 15575008 140600 14060000 140700 B-355-EXIT. 14070000 140800 EXIT. 14080000 141900*---------------------------------------------------------------* 14190000 140900 14090000 205000 B-357-SET-EXP-SHELF-LIFE SECTION. 14100000 205100*---------------------------------------------------------------* 14110000 205200* SECTION NAME : B-357-SET-EXP-SHEL-LIFE * 14120000 205300* CALLED BY : B-350-CALC-RO-TPN * 14130000 205400* CALLS : * 14140000 205500* FUNCTION : 1. SETS JLF40-EXP-SHELF-LIFE FROM BPR TABLE * 14150000 WIN06B* : 2. ADJUSTS THE CODE LIFE IF A DOTCOM STORE * 14150000 205600*---------------------------------------------------------------* 14190000 205700 B-357. 14200000 313900* DISPLAY "B-357". 31390018 205900 PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 206000 UNTIL WX10-DATA-SUB1 > 75 206100 OR JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 206800 CRV90B IF DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) CRV90B CONTINUE CRV90B ELSE AUT09A MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) AUT09A TO ZZD-DATE1 AUT09A* DISPLAY "ZZD-DATE1:" ZZD-DATE1 AUT09A MOVE WX10-DATA-SUB1 TO WX90-WT90-SUB1 AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB1) > ZZD-DATE1 AUT09A OR WX90-WT90-SUB1 > WX90-WT90-MAX AUT09A MOVE 36 TO WX90-WT90-SUB1 AUT09A END-IF 206800 AUT09A SET DATE-NOT-FOUND TO TRUE AUT09A PERFORM VARYING WX90-WT90-SUB1 FROM WX90-WT90-SUB1 BY 1 AUT09A UNTIL WX90-WT90-SUB1 > WX90-WT90-MAX AUT09A OR DATE-FOUND AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB1) = ZZD-DATE1 AUT09A MOVE WT90-WF-FORMAT (WX90-WT90-SUB1) AUT09A TO ZZD-DATE2 AUT09A SET DATE-FOUND TO TRUE AUT09A* DISPLAY "DATE-FOUND" AUT09A* DISPLAY "WT90-WF-FORMAT(" WX90-WT90-SUB1 ")" AUT09A* WT90-WF-FORMAT (WX90-WT90-SUB1) AUT09A* DISPLAY "ZZD-DATE2:" ZZD-DATE2 AUT09A END-IF AUT09A END-PERFORM AUT09A AUT09A IF DATE-NOT-FOUND AUT09A* DISPLAY "DATE-NOT-FOUND B-357" AUT09A MOVE ZEROES TO ZZD-ERROR-CODE AUT09A MOVE "A" TO ZZD-FUNCTION-CODE AUT09A MOVE -1 TO ZZD-DIFF-IN-DAYS 24780000 AUT09A MOVE "ISO" TO ZZD-DATE1-FORMAT AUT09A MOVE "WF" TO ZZD-DATE2-FORMAT SPR14B PERFORM ZA-CALL-JL0F32 10860000 AUT09A AUT09A IF ZZD-ERROR-CODE NOT = 00 AUT09A THEN AUT09A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE AUT09A MOVE WM05-JL0F32-ERROR AUT09A TO JLMSG-TEXT AUT09A PERFORM JLMSG-DISPLAY-MESSAGE AUT09A END-IF AUT09A* DISPLAY "ZZD-DATE2 : " ZZD-DATE2 AUT09A END-IF 207500 EVALUATE ZZD-DATE2(7:1) 207600 WHEN "1" 207700 IF BPR-EXP-SHELF-LIFE-1 > 0 207800 MOVE BPR-EXP-SHELF-LIFE-1 TO 207900 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 208000 ELSE 208100 MOVE BPR-MIN-SHELF-LIFE TO 208200 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 208300 END-IF 208400 WHEN "2" 208500 IF BPR-EXP-SHELF-LIFE-2 > 0 208600 MOVE BPR-EXP-SHELF-LIFE-2 TO 208700 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 208800 ELSE 208900 MOVE BPR-MIN-SHELF-LIFE TO 209000 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 209100 END-IF 209200 WHEN "3" 209300 IF BPR-EXP-SHELF-LIFE-3 > 0 209400 MOVE BPR-EXP-SHELF-LIFE-3 TO 209500 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 209600 ELSE 209700 MOVE BPR-MIN-SHELF-LIFE TO 209800 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 209900 END-IF 210000 WHEN "4" 210100 IF BPR-EXP-SHELF-LIFE-4 > 0 210200 MOVE BPR-EXP-SHELF-LIFE-4 TO 207900 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 210400 ELSE 210500 MOVE BPR-MIN-SHELF-LIFE TO 210600 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 210700 END-IF 210800 WHEN "5" 210900 IF BPR-EXP-SHELF-LIFE-5 > 0 211000 MOVE BPR-EXP-SHELF-LIFE-5 TO 211100 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 211200 ELSE 211300 MOVE BPR-MIN-SHELF-LIFE TO 211400 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 211500 END-IF 211600 WHEN "6" 211700 IF BPR-EXP-SHELF-LIFE-6 > 0 211800 MOVE BPR-EXP-SHELF-LIFE-6 TO 208200 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 212000 ELSE 212100 MOVE BPR-MIN-SHELF-LIFE TO 212200 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 212300 END-IF 212400 WHEN "7" 212500 IF BPR-EXP-SHELF-LIFE-7 > 0 212600 MOVE BPR-EXP-SHELF-LIFE-7 TO 212700 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 212800 ELSE 212900 MOVE BPR-MIN-SHELF-LIFE TO 213000 JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 213100 END-IF 213200 END-EVALUATE WIN06A IF ROT-RO-TYPE-CLASS = "D" 61322400 WIN06A AND JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) <= 21 61322400 WIN06A MOVE WW01-CURR-RO-NO TO WW01-KEY-RO-NO 05450000 WIN06A MOVE WW01-CURR-BPR-TPN TO WW01-KEY-BPR-TPN 05460000 WIN06A PERFORM XB-READ-JLDOTCOM 19350004 WIN06A UNTIL JLDOT-CODE-LIFE-KEY >= WW01-STORE-PROD-KEY 19350004 WIN06A IF JLDOT-CODE-LIFE-KEY = WW01-STORE-PROD-KEY 19350004 WIN06A COMPUTE WW01-EXP-SHELF-LIFE = 61322400 WIN06A JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) - 61322400 WIN06A JLDOT-G-MIN-CODE-LIFE 03630000 WIN06A ELSE 19350004 WIN06A MOVE JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 61322400 WIN06A TO WW01-EXP-SHELF-LIFE 61322400 WIN06A IF JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) > 0 61322400 WIN06B SET WT70-IX TO 1 42990019 WIN06A SEARCH WT70-DOTCOM-CL-ENTRY 43000019 WIN06A VARYING WT70-IX 43000019 WIN06A AT END WIN06B MOVE JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1)61322400 WIN06B TO WM36-DAY 08970000 WIN06B MOVE WM36-MISSING-DFLT-CL-VALUE 08980000 WIN06B TO JLMSG-TEXT 08980000 WIN06B PERFORM JLMSG-DISPLAY-MESSAGE 08990000 WIN06A WHEN WT70-DOTCOM-CL (WT70-IX) 43010019 WIN06A = JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 61322400 WIN06A COMPUTE WW01-EXP-SHELF-LIFE = 61322400 WIN06A JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) - 61322400 WIN06A WT70-DOTCOM-CL-ADJ (WT70-IX) 43030019 WIN06B END-SEARCH 43090019 WIN06A END-IF 43090019 WIN06A END-IF 43090019 WIN06A IF WW01-EXP-SHELF-LIFE < 1 61322400 WIN06A MOVE 1 43030019 WIN06A TO JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 61322400 WIN06A ELSE 61322400 WIN06A MOVE WW01-EXP-SHELF-LIFE 61322400 WIN06A TO JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 61322400 WIN06A END-IF 43090019 CRV90B END-IF CRV90B END-IF 213210 END-PERFORM. 213300 14540000 213400 B-357-EXIT. 14550000 213500 EXIT. 14560000 213600 CRV90B*---------------------------------------------------------------* 14190000 CRV90B 14090000 CRV90B B-358-CHECK-DEGRAD-SHELF-LIFE SECTION. 14100000 CRV90B*---------------------------------------------------------------* 14110000 CRV90B* SECTION NAME : B-358-CHECK-DEGRAD-SHELF-LIFE * 14120000 CRV90B* CALLED BY : B-350-CALC-RO-TPN * 14130000 CRV90B* CALLS : V-760-READ-VXJJ0DSF * 14140000 CRV90B* B-359-CALL-JL007 * 14140000 CRV90B* JLMSG-DISPLAY-MESSAGE * 14140000 CRV90B* FUNCTION : 1. SETS JLF40-EXP-SHELF-LIFE BY CALCULATING * 14150000 CRV90B* THE DIFFERENCE IN DAYS FROM JLF40-PER-STR- * 14150000 CRV90B* DATE AND THE END DATE OF THE EFFECTIVE * 14150000 CRV90B* PERIOD RETURNED BY JL007. * 14150000 CRV90B*---------------------------------------------------------------* 14190000 CRV90B B-358. 14200000 324000* DISPLAY "B-358". 32400018 CRV90B 14090000 CRV90B*-------------------------------------------------------------* 28920600 CRV90B* SET SHELF LIFE FLAG TO A DEFAULT OF NOT DEGRADED FOR THE 75 CRV90B* ENTRIES CORRESPONDING TO THE JLF40 ARRAY CRV90B*-------------------------------------------------------------* 28920600 CRV90B PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 14090000 CRV90B UNTIL WX10-DATA-SUB1 > 75 14090000 CRV90B SET NOT-DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) TO TRUE 14090000 CRV90B SET JLF40-NORMAL-SHELF-LIFE(WX10-DATA-SUB1) TO TRUE CRV90B END-PERFORM 14090000 CRV90B 14090000 CRV90B SET DSF-NOT-FOUND TO TRUE 14090000 CRV90B SET JL007-INVALID-RC TO TRUE 14090000 CRV90B SET JL007-DATE-NOT-FOUND TO TRUE 14090000 CRV90B SET NO-DEG-SHELF-LIFE-ENTRIES CRV90B TO TRUE CRV90B 14090000 CRV90B*-------------------------------------------------------------* 28920600 CRV90B* IF NO ENTRIES IN JLF40 ARRAY, THEN IGNORE... CRV90B*-------------------------------------------------------------* 28920600 CRV90B MOVE 1 TO WX10-DATA-SUB1 28920600 CRV90B IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES OR LOW-VALUES 14090000 CRV90B CONTINUE 14090000 CRV90B ELSE 14090000 CRV90B*-------------------------------------------------------------* 28920600 CRV90B* ...OTHERWISE EXTRACT DSF DETAILS AND PASS TO JL007 CRV90B* TO PICK UP THE 3 EFFECTIVE PERIOD END DATES CRV90B*-------------------------------------------------------------* 28920600 CRV90B PERFORM V-760-READ-VXJJ0DSF CRV90B PERFORM B-359-CALL-JL007 CRV90B END-IF 14090000 CRV90B*-------------------------------------------------------------* 28920600 CRV90B* ASSUME IF FIRST JLF40-PER-STR-DATE ENTRY DOES NOT BRING BACK CRV90B* A DSF ROW OR AN INVALID RETURN CODE HAS BEEN RETURNED BY CRV90B* JL007 THEN THE PRODUCT IS NOT SUBJECT TO DEGRADING SHELF CRV90B* LIFE FOR ALL SUBSEQUENT JLF40-PER-STR-DATE ENTRIES CRV90B* (OTHERWISE WILL HAVE EXCESSIVE PROCESSING FOR NON-DEGRADING CRV90B* PRODUCTS) CRV90B*-------------------------------------------------------------* 28920600 CRV90B IF DSF-FOUND CRV90B AND JL007-VALID-RC CRV90B PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 CRV90B UNTIL WX10-DATA-SUB1 > 75 CRV90B OR JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES OR CRV90B LOW-VALUES CRV90B*-------------------------------------------------------------* 28920600 CRV90B* IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) > CURRENT CRV90B* DSF-DEG-SLIFE-ENDT, READ THE DSF WITH THE CURRENT JLF40 CRV90B* START DATE AND CALL JL007 CRV90B*-------------------------------------------------------------* 28920600 CRV90B IF DSF-FOUND CRV90B AND JL007-VALID-RC CRV90B AND JLF40-PER-STR-DATE(WX10-DATA-SUB1) CRV90B <= DSF-DEG-SLIFE-ENDT CRV90B SET DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) TO TRUE CRV90B ELSE CRV90B PERFORM V-760-READ-VXJJ0DSF CRV90B PERFORM B-359-CALL-JL007 CRV90B IF DSF-FOUND CRV90B AND JL007-VALID-RC CRV90B SET DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) TO TRUE CRV90B END-IF CRV90B END-IF CRV90B*-------------------------------------------------------------* 28920600 CRV90B* FOR A DEGRADING SHELF LIFE PRODUCT ENTRY: CRV90B* FIND THE RELEVANT JL007 PERIOD EFFECTIVE FOR THE CRV90B* JLF40-PER-STR-DATE ENTRY. IF ONE NOT FOUND, TREAT THE CRV90B* ENTRY AS BEFORE (I.E. NOT HAVING A DEGRADING SHELF LIFE) CRV90B*-------------------------------------------------------------* 28920600 CRV90B SET JL007-DATE-NOT-FOUND TO TRUE 14540000 CRV90B 14540000 CRV90B IF DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) CRV90B IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) 14540000 CRV90B >= JL007-PERIOD1-ST 14540000 CRV90B IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) 14540000 CRV90B <= JL007-PERIOD1-END 14540000 CRV90B SET JL007-DATE-FOUND TO TRUE 14540000 CRV90B MOVE JL007-PERIOD1-END 14540000 CRV90B TO WD01-EFFECTIVE-END-DATE 14540000 CRV90B ELSE 14540000 CRV90B IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) 14540000 CRV90B <= JL007-PERIOD2-END 14540000 CRV90B SET JL007-DATE-FOUND TO TRUE 14540000 CRV90B MOVE JL007-PERIOD2-END 14540000 CRV90B TO WD01-EFFECTIVE-END-DATE 14540000 CRV90B ELSE 14540000 CRV90B IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) 14540000 CRV90B <= JL007-PERIOD3-END 14540000 CRV90B SET JL007-DATE-FOUND TO TRUE 14540000 CRV90B MOVE JL007-PERIOD3-END 14540000 CRV90B TO WD01-EFFECTIVE-END-DATE 14540000 CRV90B END-IF 14540000 CRV90B END-IF 14540000 CRV90B END-IF 14540000 CRV90B END-IF 14540000 CRV90B END-IF 14540000 CRV90B 14540000 CRV90B*-------------------------------------------------------------* 28920600 CRV90B* CALCULATE THE DIFFERENCE IN DAYS FROM THE JLF40-PER-STR-DATE CRV90B* AND THE END DATE OF THE EFFECTIVE PERIOD RETURNED BY JL007. CRV90B* THIS DIFFERENCE IS THE PRODUCTS SHELF LIFE. CRV90B*-------------------------------------------------------------* 28920600 CRV90B IF DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) CRV90B AND JL007-DATE-FOUND 14540000 CRV90B MOVE ZEROES TO ZZD-ERROR-CODE CRV90B MOVE "D" TO ZZD-FUNCTION-CODE CRV90B MOVE "ISO" TO ZZD-DATE1-FORMAT CRV90B MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) CRV90B TO ZZD-DATE1 CRV90B MOVE "ISO" TO ZZD-DATE2-FORMAT CRV90B MOVE WD01-EFFECTIVE-END-DATE CRV90B TO ZZD-DATE2 SPR14B PERFORM ZA-CALL-JL0F32 10860000 CRV90B CRV90B CRV90B IF ZZD-ERROR-CODE NOT = 00 CRV90B MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT CRV90B PERFORM JLMSG-DISPLAY-MESSAGE CRV90B ELSE CRV90B MOVE ZZD-DIFF-IN-DAYS 24780000 CRV90B TO JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) 24780000 CRV90B SET JLF40-DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) CRV90B TO TRUE CRV90B SET AT-LEAST-1-DEG-SHELF-LIFE TO TRUE CRV90B MOVE WD01-EFFECTIVE-END-DATE CRV90B TO JLF40-EXPIRY-DATE(WX10-DATA-SUB1) CRV90B END-IF CRV90B ELSE CRV90B SET NOT-DEGRADING-SHELF-LIFE(WX10-DATA-SUB1) CRV90B TO TRUE CRV90B SET JLF40-NORMAL-SHELF-LIFE(WX10-DATA-SUB1) CRV90B TO TRUE CRV90B MOVE SPACES CRV90B TO JLF40-EXPIRY-DATE(WX10-DATA-SUB1) CRV90B END-IF CRV90B END-PERFORM 14090000 CRV90B END-IF CRV90B . 14540000 CRV90B B-358-EXIT. 14550000 CRV90B EXIT. 14560000 CRV90B*---------------------------------------------------------------* 14190000 CRV90B 14560000 CRV90B 14560000 CRV90B B-359-CALL-JL007 SECTION. 14100000 CRV90B*---------------------------------------------------------------* 14110000 CRV90B* SECTION NAME : B-359-CALL-JL007 * 14120000 CRV90B* CALLED BY : B-350-CALC-RO-TPN * 14130000 CRV90B* CALLS : XC-CALL-JL007 * 14140000 CRV90B* JLMSG-DISPLAY-MESSAGE * 14140000 CRV90B* FUNCTION : 1. WHEN ROW RETURNED FROM DSF, CALL JL007 TO * 14150000 CRV90B* RETURN THE NEXT EFFECTIVE DSF PERIODS. * 14150000 CRV90B*---------------------------------------------------------------* 14190000 CRV90B B-359. 14200000 339400* DISPLAY "B-359". 33940018 CRV90B 14540000 CRV90B SET JL007-INVALID-RC TO TRUE 14540000 CRV90B 14540000 CRV90B IF DSF-FOUND 14540000 CRV90B INITIALIZE JL007-INPUT 14540000 CRV90B JL007-OUTPUT 14540000 CRV90B 14540000 312100 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) TO 31210000 312200 JL007-CURRENT-DATE 31220000 CRV90B MOVE DSF-DEG-SLIFE-STDT TO JL007-EFF-DT 14540000 CRV90B MOVE DSF-DEG-SLIFE-ENDT TO JL007-END-DT 14540000 CRV90B MOVE DSF-DEG-SLIFE-PRD TO JL007-PERIOD 14540000 CRV90B MOVE DSF-DEG-SLIFE-MTH TO JL007-MONTH 14540000 CRV90B MOVE DSF-DEG-SLIFE-WK TO JL007-WEEK 14540000 CRV90B MOVE DSF-DEG-SLIFE-DAY TO JL007-DAY 14540000 CRV90B 14540000 CRV90B PERFORM XC-CALL-JL007 14540000 CRV90B 14540000 CRV90B IF JL007-RC NOT = 00 14540000 CRV90B MOVE JL007-ERROR TO WM30-JL007-ERROR CRV90B MOVE WM30-JL007-INV-RC TO JLMSG-TEXT 15840000 CRV90B PERFORM JLMSG-DISPLAY-MESSAGE 15850000 CRV90B ELSE 14540000 CRV90B SET JL007-VALID-RC TO TRUE 14540000 CRV90B END-IF 14540000 CRV90B END-IF 14540000 CRV90B . 14540000 CRV90B B-359-EXIT. 14550000 CRV90B EXIT. 14560000 CRV90B*---------------------------------------------------------------* 14190000 213600 140900 14090000 AUT08A B-360-MAX-SHELF-LIFE SECTION. 14100000 AUT08A*---------------------------------------------------------------* 14110000 AUT08A* SECTION NAME : B-360-MAX-SHELF-LIFE * 14120000 AUT08A* CALLED BY : B-350-CALC-RO-TPN * 14130000 AUT08A* CALLS : * 14140000 AUT08A* FUNCTION : 1. FIND MAXIMUM POSSIBLE SHELF LIFE FOR A * 14150000 AUT08A* : PRODUCT AMONGST ALL THE DAYS IN * 14160000 AUT08A* : CONSIDERATION * 14170000 AUT08A*---------------------------------------------------------------* 14190000 AUT08A B-360. 14200000 AUT08A MOVE JLF40-EXP-SHELF-LIFE (1) AUT08A TO WW01-MAX-SHELF-LIFE AUT08A PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 14330000 AUT08A UNTIL WX10-DATA-SUB1 > 75 14330000 AUT08A OR JLF40-EXP-SHELF-LIFE (WX10-DATA-SUB1) = SPACES 14330000 AUT08A OR LOW-VALUES 14330000 AUT08A IF JLF40-EXP-SHELF-LIFE (WX10-DATA-SUB1) > AUT08A WW01-MAX-SHELF-LIFE AUT08A MOVE JLF40-EXP-SHELF-LIFE (WX10-DATA-SUB1) AUT08A TO WW01-MAX-SHELF-LIFE AUT08A END-IF AUT08A END-PERFORM AUT08A AUT08A IF WX10-DATA-SUB1 = 1 AUT08A MOVE BPR-MIN-SHELF-LIFE AUT08A TO WW01-MAX-SHELF-LIFE AUT08A END-IF AUT08A . 14540000 AUT08A B-360-EXIT. 14550000 CRV90B EXIT. 14560000 CRV90B*---------------------------------------------------------------* 14190000 213600 140900 14090000 141000 B-400-RETRIEVE-ALP SECTION. 14100000 141100*---------------------------------------------------------------* 14110000 141200* SECTION NAME : B-400-RETRIEVE-ALP * 14120000 141300* CALLED BY : B-100-PROCESS * 14130000 141400* CALLS : * 14140000 141500* FUNCTION : 1. OPENS, FETCHES AND CLOSES THE ALP CURSOR * 14150000 141600* : FOR RELEVANT ALLOCATION PATTERN * 14160000 141700* : 2. LOADS THE ALP'S INTO A LOOKUP TABLE * 14170000 141800* : 3. LOADS THE ALLOCATION DATA TO JLF40LNK * 14180000 141900*---------------------------------------------------------------* 14190000 142000 B-400. 14200000 343800* DISPLAY "B-400". 34380018 142200 14220000 142800 MOVE WW01-CURR-BPR-TPN TO WW01-CURR-BPR-TPN-DB2. 14280000 142900 MOVE WW01-CURR-RO-NO TO WW01-CURR-RO-NO-DB2. 14290000 143000 MOVE ALL-LAST-FORCED-DATE TO WW01-ALP-START-DATE. 14300000 143100 MOVE WW01-LAST-DELIVERY-DATE TO WW01-ALP-END-DATE. 14310000 143200 14320000 143300 PERFORM V-510-OPEN-READNEXT-VXJJ0ALP. 14330000 143400 14340000 143500 PERFORM V-520-FETCH-READNEXT-VXJJ0ALP. 14350000 143600 14360000 143700 IF END-ALP 14370000 143900 SET MISSING-ALP TO TRUE 14390000 144000 GO TO B-400-EXIT 14400000 144100 END-IF. 14410000 144200 14420000 144300 SET PROCESS-LOOP TO TRUE. 14430000 144400 MOVE 1 TO WX10-DATA-SUB1. 14440000 144500 14450000 144600 PERFORM UNTIL END-PROCESS-LOOP 14460000 144700 PERFORM B-420-FIND-NEXT-DELIVERY 14470000 144800 END-PERFORM. 14480000 144900 14490000 347200 IF WX10-DATA-SUB1 NOT < 75 OR 34720002 347300 JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 34730002 347400 GO TO B-400-CLOSE-READNEXT 34740002 347500 END-IF. 34750002 347600 34760000 295641*----- 27/03/2001 - GM ---------------------------------------* 29564100 295642* MOVE ALL-ALLOC-TYPE TO JLF40-ALLOC-TYPE. 29564200 295643*----- 27/03/2001 - GM ---------------------------------------* 29564300 145100 MOVE ALL-LAST-FORCED-DATE TO JLF40-LAST-FORCED-DT. 14510000 345100* MOVE ALL-REM-RSVE-QTY TO JLF40-REM-ALLOC-QTY. 34510008 145300 MOVE ALL-ALLCN-STDT TO JLF40-ALLOC-STRT-DT. 14530000 145310 MOVE ALL-ALLCN-ENDT TO JLF40-ALLOC-END-DT. 14531000 145320 MOVE ALL-ORIG-ALLOC-QTY TO JLF40-ORIG-ALLOC-QTY. 14532000 AUT07A MOVE ALL-PROC-LST-FORCED-DT TO JLF40-PROCUR-LAST-FORCED-DT. 14510000 AUT07A MOVE ALL-PROC-REM-RSVE-QTY TO JLF40-PROCURE-RSVE-QTY. 14510000 AUT07A MOVE ALL-REM-RSVE-QTY TO JLF40-FINAL-RSVE-QTY. 34510008 145330 14533000 145340 SET NOT-END-ALP TO TRUE. 14534000 145350 PERFORM UNTIL END-ALP 14535000 145360 PERFORM B-410-ALP-TO-JLF40LNK 14536000 145370 END-PERFORM. 14537000 145380 14538000 346100 IF WX10-DATA-SUB1 NOT < 75 OR 34610000 346200 JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 34620000 346300 GO TO B-400-CLOSE-READNEXT 34630000 346400 END-IF. 34640000 346500 34650000 148800 SET PROCESS-LOOP TO TRUE. 14880000 148900 ADD 1 TO WX10-DATA-SUB1. 14890000 149000 PERFORM UNTIL END-PROCESS-LOOP 14900000 149100 PERFORM B-420-FIND-NEXT-DELIVERY 14910000 149200 END-PERFORM. 14920000 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = JLF40-PER-STR-DATE(WX10-DATA-SUB1 - 1) THEN MOVE JLF40-APPORTION-PC(WX10-DATA-SUB1 - 1) TO JLF40-APPORTION-PC(WX10-DATA-SUB1) MOVE JLF40-NEW-LINE-QTY(WX10-DATA-SUB1 - 1) TO JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) MOVE JLF40-DEMO-IND(WX10-DATA-SUB1 - 1) TO JLF40-DEMO-IND(WX10-DATA-SUB1) MOVE JLF40-ROUND-UP-IND(WX10-DATA-SUB1 - 1) TO JLF40-ROUND-UP-IND(WX10-DATA-SUB1) MOVE JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1 - 1) TO JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) 296501*----- 27/03/2001 - GM ---------------------------------------* 29650100 296502 MOVE ALL-ALLOC-TYPE 29650200 296503 TO JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 29650300 296504*----- 27/03/2001 - GM ---------------------------------------* 29650400 END-IF. 14920000 349000 B-400-CLOSE-READNEXT. 34900000 145390 PERFORM V-530-CLOSE-READNEXT-VXJJ0ALP. 14539000 145400 14540000 145500 B-400-EXIT. 14550000 145600 EXIT. 14560000 145700 14570000 145800 B-410-ALP-TO-JLF40LNK SECTION. 14580000 145900*---------------------------------------------------------------* 14590000 146000* SECTION NAME : B-410-ALP-TO-JLF40LNK * 14600000 146100* CALLED BY : B-400-RETRIEVE-ALP * 14610000 146200* CALLS : * 14620000 146300* FUNCTION : 1. * 14630000 146400* : * 14640000 146500*---------------------------------------------------------------* 14650000 146600 B-410. 14660000 351900* DISPLAY "B-410". 35190018 146800 14680000 350700 IF WX10-DATA-SUB1 > 75 OR 35070000 350800 JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 35080000 350900 SET END-ALP TO TRUE 35090000 351000 GO TO B-410-EXIT 35100000 351100 END-IF. 35110000 351200 35120000 146900 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) >= ALP-REQ-DEL-DT 14690000 180700 18070000 354600* IF WE MOVE FROM ONE PATTERN TO ANOTHER, WE MUST RESET THE 35460005 354700* APPORTIONMENT OTHERWISE WE'LL FORCE-OUT 100% OF THE SECOND 35470005 354800* RESERVE QUANTITY. WE DON'T WANT TO DO THAT ! 35480005 354810* HOWEVER, ALP ROWS FOR NEW LINES SHOULD NOT BE INCLUDED. 35481006 354900 IF ALP-ALLOC-PATTERN NOT = 35490005 355000 JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) 35500005 355010 AND ALP-ALLOC-PATTERN NOT = SPACES 35501007 355020 AND JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) NOT = SPACES 35502007 355100 MOVE ZERO TO JLF40-APPORTION-PC(WX10-DATA-SUB1) 35510005 355200 END-IF 35520005 355300 35530005 180800* SUM THE APPORTIONMENT PERCENTAGES, ENSURING THAT THE MAXIMUM 18080000 180900* OF 100 IS NOT EXCEEDED. 18090000 181000 EVALUATE TRUE 18100000 181100 WHEN JLF40-APPORTION-PC(WX10-DATA-SUB1) = ZERO 18110000 181200 WHEN ALP-APPORTIONMENT-PC = 100 18120000 181300 MOVE ALP-APPORTIONMENT-PC 18130000 181400 TO JLF40-APPORTION-PC(WX10-DATA-SUB1) 18140000 181500 18150000 181600 WHEN ALP-APPORTIONMENT-PC > ZERO 18160000 181700* WHEN A SECOND APPORTIONMENT PERCENTAGE IS PRESENT, THIS VALUE 18170000 181800* MUST BE DECREASED IN PROPORTION TO THE REMAINING RESERVE 18180000 181900* AFTER THE FIRST. THIS IS THE CASE FOR ALL SUCCESSIVE 18190000 182000* PERCENTAGES. 18200000 182100 COMPUTE WW02-APPORTIONMENT-PC ROUNDED = 18210000 182200 ( ( 100 - JLF40-APPORTION-PC(WX10-DATA-SUB1) ) 18220000 182300 / 100 ) 18230000 182400 * ALP-APPORTIONMENT-PC 18240000 182500 ADD WW02-APPORTIONMENT-PC 18250000 182600 TO JLF40-APPORTION-PC(WX10-DATA-SUB1) ROUNDED 18260000 182700 IF JLF40-APPORTION-PC(WX10-DATA-SUB1) > 100 18270000 182800 MOVE 100 TO JLF40-APPORTION-PC(WX10-DATA-SUB1) 18280000 182900 END-IF 18290000 183000 END-EVALUATE 18300000 183100 18310000 183200 18320000 147400 COMPUTE JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) = 14740000 147500 JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) + 14750000 147600 ALP-NEW-LINE-QTY 14760000 147700 IF ALP-DEMO-IND = "Y" 14770000 147800 THEN 14780000 147900 MOVE "Y" TO JLF40-DEMO-IND(WX10-DATA-SUB1) 14790000 148000 END-IF 14800000 148100 IF ALP-ROUND-UP-IND = "Y" 14810000 148200 THEN 14820000 148300 MOVE "Y" TO JLF40-ROUND-UP-IND(WX10-DATA-SUB1) 14830000 148400 END-IF 14840000 148410 MOVE ALP-ALLOC-PATTERN 14841029 148420 TO JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) 14842029 296563*----- 27/03/2001 - GM ---------------------------------------* 29656300 296564 MOVE ALL-ALLOC-TYPE 29656400 296565 TO JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 29656500 296566*----- 27/03/2001 - GM ---------------------------------------* 29656600 148500 ELSE 14850000 148600 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) < ALP-REQ-DEL-DT 14860000 148700 THEN 14870000 148800 SET PROCESS-LOOP TO TRUE 14880000 148900 ADD 1 TO WX10-DATA-SUB1 14890000 149000 PERFORM UNTIL END-PROCESS-LOOP 14900000 149100 PERFORM B-420-FIND-NEXT-DELIVERY 14910000 149200 END-PERFORM 14920000 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = JLF40-PER-STR-DATE(WX10-DATA-SUB1 - 1) THEN MOVE JLF40-APPORTION-PC(WX10-DATA-SUB1 - 1) TO JLF40-APPORTION-PC(WX10-DATA-SUB1) MOVE JLF40-NEW-LINE-QTY(WX10-DATA-SUB1 - 1) TO JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) MOVE JLF40-DEMO-IND(WX10-DATA-SUB1 - 1) TO JLF40-DEMO-IND(WX10-DATA-SUB1) MOVE JLF40-ROUND-UP-IND(WX10-DATA-SUB1 - 1) TO JLF40-ROUND-UP-IND(WX10-DATA-SUB1) MOVE JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1 - 1) TO JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) 297101*----- 27/03/2001 - GM ---------------------------------------* 29710100 297102 MOVE ALL-ALLOC-TYPE 29710200 297103 TO JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 29710300 297104*----- 27/03/2001 - GM ---------------------------------------* 29710400 148800 SET PROCESS-LOOP TO TRUE 14880000 148900 ADD 1 TO WX10-DATA-SUB1 14890000 149000 PERFORM UNTIL END-PROCESS-LOOP 14900000 149100 PERFORM B-420-FIND-NEXT-DELIVERY 14910000 149200 END-PERFORM 14920000 149200 END-IF 14920000 149300 GO TO B-410-EXIT 14930000 149400 END-IF 14940000 149500 END-IF. 14950000 149600 14960000 149700 PERFORM V-520-FETCH-READNEXT-VXJJ0ALP. 14970000 149800 14980000 149900 B-410-EXIT. 14990000 150000 EXIT. 15000000 150100 15010000 150200 B-420-FIND-NEXT-DELIVERY SECTION. 15020000 150300*---------------------------------------------------------------* 15030000 150400* SECTION NAME : B-420-FIND-NEXT-DELIVERY * 15040000 150500* CALLED BY : B-410-ALP-TO-JLF40LNK * 15050000 150600* CALLS : * 15060000 150700* FUNCTION : 1. * 15070000 150800* : * 15080000 150900*---------------------------------------------------------------* 15090000 151000 B-420. 15100000 362000* DISPLAY "B-420". 36200018 363700 IF WX10-DATA-SUB1 >= 75 36370002 151300 THEN 15130000 151400 SET END-PROCESS-LOOP TO TRUE 15140000 151500 GO TO B-420-EXIT 15150000 151600 END-IF. 15160000 151700 15170000 151800 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 15180000 151900 THEN 15190000 152000 SET END-PROCESS-LOOP TO TRUE 15200000 152100 GO TO B-420-EXIT 15210000 152200 END-IF. 15220000 152300 15230000 270700 IF JLF40-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" 27070002 365100 36510004 365200* AVOID UPSETTING MM RELATED ALLOCATION SETTINGS IF THE TWO SHOULD36520004 365300* COINCIDE. 36530004 365400 AND ( NOT ( JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 36540004 365500 = "L" OR "P" OR "R" ) ) 36550004 365600 36560004 270800 IF JLF40-DELY-IND(WX10-DATA-SUB1) = 27080001 CRV11A*----- 21/01/2003 - GM ---------------------------------------* CRV11A* "B" OR "P" OR "Y" OR "E" 27110001 CRV11A "B" OR "P" OR "Y" OR "E" OR "S" 27110001 CRV11A*-------------------------------------------------------------* 271110 SET END-PROCESS-LOOP TO TRUE 27111001 271120 GO TO B-420-EXIT 27112001 271130 END-IF 27113001 272000 IF JLF40-DELY-IND(WX10-DATA-SUB1) = "N" 27200001 272100 AND JLF40-CUST-ORD-QTY(WX10-DATA-SUB1) > 0 27210003 272300 SET END-PROCESS-LOOP TO TRUE 27230001 272310 GO TO B-420-EXIT 27231001 272320 END-IF 27232001 272400 END-IF. 27240001 152600 15260000 272500 ADD 1 TO WX10-DATA-SUB1. 27250001 154100 15410000 154200 B-420-EXIT. 15420000 154300 EXIT. 15430000 154400 15440000 297160*----- 27/03/2001 - GM ---------------------------------------* 29716000 297161 B-430-RETRIEVE-MMD SECTION. 29716100 297162*---------------------------------------------------------------* 29716200 297163* SECTION NAME : B-430-RETRIEVE-MMD * 29716300 297164* CALLED BY : B-100-PROCESS * 29716400 297165* CALLS : * 29716500 297166* FUNCTION : 1. READS JLF40LNK OF INPUT DATA LOOKING FOR * 29716600 297167* : ENTRIES INDICATING AN MM SOURCED ALLOCATION* 29716700 297168* : 2. READS THE MMD'S SINGLETON STYLE * 29716800 297169* : 3. LOADS THE ALLOCATION DATA TO JLF40LNK * 29716900 297170*---------------------------------------------------------------* 29717000 297180 B-430. 29718000 297181* DISPLAY "B-430". 29718100 297182 29718200 297183 MOVE SPACES TO JLF40-LAST-FORCED-DT. 29718300 365500* MOVE +0 TO JLF40-REM-ALLOC-QTY. 36550008 297185 MOVE SPACES TO JLF40-ALLOC-STRT-DT. 29718500 297186 MOVE SPACES TO JLF40-ALLOC-END-DT. 29718600 297187 MOVE +0 TO JLF40-ORIG-ALLOC-QTY. 29718700 297188 29718800 297189 SET PROCESS-LOOP TO TRUE. 29718900 297190 MOVE 1 TO WX10-DATA-SUB1. 29719000 297191 29719100 297192 PERFORM UNTIL END-PROCESS-LOOP 29719200 297193 PERFORM B-435-FIND-MM-DELIVERY 29719300 297194 END-PERFORM. 29719400 297195 29719500 297196 B-430-EXIT. 29719600 297197 EXIT. 29719700 297198 29719800 297199 B-435-FIND-MM-DELIVERY SECTION. 29719900 297200*---------------------------------------------------------------* 29720000 297201* SECTION NAME : B-435-FIND-MM-DELIVERY 29720100 297202* CALLED BY : B-430-RETRIEVE-MMD 29720200 297203* CALLS : * 29720300 297204* FUNCTION : 1. FOR EACH DELIVERY, CHECK IF THE PRODUCT * 29720400 297205* : IS AN MM ALLOCATION. * 29720500 297206*---------------------------------------------------------------* 29720600 297207 B-435. 29720700 297208* DISPLAY "B-435". 29720800 297209 IF WX10-DATA-SUB1 >= 50 29720900 297210 THEN 29721000 297211 SET END-PROCESS-LOOP TO TRUE 29721100 297212 GO TO B-435-EXIT 29721200 297213 END-IF. 29721300 297214 29721400 297215 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 29721500 297216 THEN 29721600 297217 SET END-PROCESS-LOOP TO TRUE 29721700 297218 GO TO B-435-EXIT 29721800 297219 END-IF. 29721900 297220 29722000 297221 29722100 297222 IF JLF40-ALLOC-TYPE (WX10-DATA-SUB1) = "L" OR "P" 29722200 297223 IF JLF40-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" 29722300 297224 IF JLF40-DELY-IND (WX10-DATA-SUB1) = 29722400 CRV11A*----- 21/01/2003 - GM ---------------------------------------* CRV11A* "B" OR "P" OR "Y" OR "E" 29722500 CRV11A "B" OR "P" OR "Y" OR "E" OR "S" 29722500 CRV11A*-------------------------------------------------------------* 297226 OR (JLF40-DELY-IND (WX10-DATA-SUB1) = "N" AND 29722600 297227 JLF40-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) 29722700 297228 PERFORM B-440-PROCESS-MM-DELIVERY 29722800 297229 END-IF 29722900 297230 END-IF 29723000 297231 END-IF. 29723100 297232 29723200 297233 ADD 1 TO WX10-DATA-SUB1. 29723300 297234 29723400 297235 B-435-EXIT. 29723500 297236 EXIT. 29723600 297237 29723700 297238 B-440-PROCESS-MM-DELIVERY SECTION. 29723800 297239*---------------------------------------------------------------* 29723900 297240* SECTION NAME : B-440-PROCESS-MM-DELIVERY 29724000 297241* CALLED BY : B-435-FIND-MM-DELIVERY 29724100 297242* CALLS : * 29724200 297243* FUNCTION : 1. READS THE MMD TABLE USING DATA FROM * 29724300 297244* : JLF40LNK * 29724400 297245* : 2. INITIALISE NON-MM ALLOCATION FIELDS * 29724500 297246*---------------------------------------------------------------* 29724600 297247 B-440. 29724700 297248* DISPLAY "B-440". 29724800 297249 29724900 297250 MOVE +0 TO JLF40-APPORTION-PC (WX10-DATA-SUB1) 29725000 297251 JLF40-NEW-LINE-QTY (WX10-DATA-SUB1). 29725100 297252 MOVE SPACES TO JLF40-DEMO-IND (WX10-DATA-SUB1) 29725200 297253 JLF40-ROUND-UP-IND (WX10-DATA-SUB1) 29725300 297254 JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1). 29725400 297255 29725500 297256 PERFORM V-750-READ-VXJJ0MMD. 29725600 297257 29725700 297258 IF MISSING-MMD 29725800 297259 SET END-PROCESS-LOOP TO TRUE 29725900 297260 ELSE 29726000 297261 MOVE MMD-TOT-ALLOC-QTY 29726100 297262 TO JLF40-NEW-LINE-QTY (WX10-DATA-SUB1) 29726200 297263 END-IF. 29726300 297264* 29726400 297265 B-440-EXIT. 29726500 297266 EXIT. 29726600 297267 29726700 297268*---------------------------------------------------------------* 29726800 154500 B-450-RETRIEVE-BSP SECTION. 15450000 154600*---------------------------------------------------------------* 15460000 154700* SECTION NAME : B-450-RETRIEVE-BSP * 15470000 154800* CALLED BY : * 15480000 154900* CALLS : * 15490000 155000* FUNCTION : 1. OPENS, FETCHES AND CLOSES THE BSP CURSOR * 15500000 155100* : FOR EACH DAYS ESTIMATED SALES * 15510000 155200*---------------------------------------------------------------* 15520000 155300 B-450. 15530000 155400 15540000 376700* DISPLAY "B-450". 37670018 155501 15550108 155600 SET NOT-MISSING-BSP TO TRUE. 15560000 155700 15570000 155701 SET PROCESS-LOOP TO TRUE. 15570108 155710 MOVE 1 TO WX10-DATA-SUB2. 15571008 155720 PERFORM UNTIL END-PROCESS-LOOP 15572008 155730 IF WT30-CCYY-MM-DD(WX10-DATA-SUB2) 15573008 155740 = JLF40-PER-STR-DATE(1) 15574008 155741 THEN 15574108 155742 SET END-PROCESS-LOOP TO TRUE 15574208 155743 ELSE 15574308 155744 ADD 1 TO WX10-DATA-SUB2 15574408 155745 END-IF 15574508 239900 IF WX10-DATA-SUB2 > 50 15574708 155748 THEN 15574808 155749 SET END-PROCESS-LOOP TO TRUE 15574908 155750 END-IF 15575008 155751 END-PERFORM. 15575108 155760 15576008 STRING WT30-TESCO-YEAR(WX10-DATA-SUB2) , WT30-TESCO-WEEK(WX10-DATA-SUB2) DELIMITED BY SIZE INTO WW01-STRT-BSP-YRWK 15580008 END-STRING SUM12A* TO GET THE PREVIOUS YEAR WEEK IN THE FIRST POSITION IN WT95- SUM12A* ARRAY SUM12A MOVE 1 TO WX95-SUB SUM12A MOVE 29 TO SUM12A WX22-PREWK-DATE-SUB SUM12A MOVE WT90-WF-TESCO-YEAR(WX22-PREWK-DATE-SUB) SUM12A TO SUM12A WT95-RTL-YEAR-WK (WX95-SUB)(1:4) SUM12A MOVE WT90-WF-TESCO-WEEK(WX22-PREWK-DATE-SUB) SUM12A TO SUM12A WT95-RTL-YEAR-WK (WX95-SUB)(5:2) 156000 MOVE WT30-DAY-NO(WX10-DATA-SUB2) TO WW01-STRT-BSP-DAY. 15600008 221700 MOVE WT30-CCYY-MM-DD(WX10-DATA-SUB2) TO WW01-ASF-SALES-DATE 156100 15610000 SUM12A IF WT10-STKD-PROD-ENDT > WW22-CURR-21-DAYS SUM12A MOVE SPACES TO WW23-GET-STKD-PROD-ENDT SUM12A ELSE SUM12A MOVE WT10-STKD-PROD-ENDT TO WW23-GET-STKD-PROD-ENDT SUM12A END-IF SUM12A IF WW23-GET-STKD-PROD-ENDT NOT = SPACES 205200 MOVE ZEROES TO ZZD-ERROR-CODE 205300 MOVE "D" TO ZZD-FUNCTION-CODE 205400 MOVE "ISO" TO ZZD-DATE1-FORMAT 205500 MOVE WW01-END-DATE TO ZZD-DATE1 205600 MOVE "ISO" TO ZZD-DATE2-FORMAT SUM12A MOVE WW23-GET-STKD-PROD-ENDT TO ZZD-DATE2 SPR14B PERFORM ZA-CALL-JL0F32 10860000 205900 205900 206000 IF ZZD-ERROR-CODE NOT = 00 157000 THEN 15700000 206200 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 206400 PERFORM JLMSG-DISPLAY-MESSAGE 206500 END-IF 206600 206700 IF BPR-MIN-SHELF-LIFE < ZZD-DIFF-IN-DAYS 157300 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 15730019 157400 END-IF 15740000 157500 ELSE 15750000 207100 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 207200 END-IF 207300 * ADD ANOTHER DAY AS BFFO REQUIRES (CODELIFE + 1 DAY) SALES ADD 1 TO ZZD-DIFF-IN-DAYS SUM10A INITIALIZE WW15-VARIABLES SUM10A* STORE THE CODELIFE(+1 DAY) OF THE PRODUCT SUM10A MOVE ZZD-DIFF-IN-DAYS TO WW15-NO-OF-DAYS-BSP-SALES-RQD 207300 207300 207300*----- 25/10/2000 - GM -----------------------------------------* * ENSURE THAT AT LEAST 14 DAYS OF FORECAST SALES ARE RETRIEVED 207400* IF ZZD-DIFF-IN-DAYS < 7 157600* MOVE +7 TO ZZD-DIFF-IN-DAYS 15760000 207400 IF ZZD-DIFF-IN-DAYS < 14 157600 MOVE +14 TO ZZD-DIFF-IN-DAYS 15760000 *---------------------------------------------------------------* 207600 ELSE 207700 IF ZZD-DIFF-IN-DAYS > 21 207800 MOVE +21 TO ZZD-DIFF-IN-DAYS 207900 END-IF 208000 END-IF AUT09A MOVE WX10-DATA-SUB2 TO WX90-WT90-SUB4 AUT09A MOVE WW01-END-DATE TO ZZD-DATE1 AUT09A* DISPLAY "ZZD-DATE1 : " ZZD-DATE1 AUT09A AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB4) > ZZD-DATE1 AUT09A OR WX90-WT90-SUB4 > WX90-WT90-MAX AUT09A MOVE 36 TO WX90-WT90-SUB4 END-IF AUT09A SET DATE-NOT-FOUND TO TRUE AUT09A AUT09A PERFORM VARYING WX90-WT90-SUB4 FROM WX90-WT90-SUB4 BY 1 AUT09A UNTIL WX90-WT90-SUB4 > WX90-WT90-MAX AUT09A OR DATE-FOUND AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB4) = ZZD-DATE1 SUM10A SUM10A ADD WX90-WT90-SUB4 TO WW15-NO-OF-DAYS-BSP-SALES-RQD SUM10A ADD +1 TO WW15-NO-OF-DAYS-BSP-SALES-RQD SUM10A IF WW15-NO-OF-DAYS-BSP-SALES-RQD <= WX90-WT90-MAX SUM10A MOVE WT90-WF-FORMAT (WW15-NO-OF-DAYS-BSP-SALES-RQD) SUM10A TO WW15-DATE-TILL-BSP-SALES-RQD SUM10A END-IF SUM10A AUT09A ADD ZZD-DIFF-IN-DAYS TO WX90-WT90-SUB4 AUT09A AUT09A*THE ARRAY WHICH HOLDS THE WF IS TESCO WF,SO TO GET THE NORMAL WF AUT09A*ADD +1 TO THE SUBSCRIPT,THIS IS EQUIVALENT OF CONVERTING THE ISO AUT09A*DATE TO WF BY KEEPING THE DIFFERENCE AS ZERO. AUT09A AUT09A ADD +1 TO WX90-WT90-SUB4 AUT09A IF WX90-WT90-SUB4 > 0 AND <= WX90-WT90-MAX AUT09A MOVE WT90-WF-FORMAT (WX90-WT90-SUB4) AUT09A TO ZZD-DATE2 AUT09A SET DATE-FOUND TO TRUE AUT09A* DISPLAY "DATE-FOUND" AUT09A END-IF AUT09A END-IF AUT09A END-PERFORM AUT09A AUT09A IF DATE-NOT-FOUND AUT09A* DISPLAY "DATE-NOT-FOUND B-450" AUT09A MOVE ZEROES TO ZZD-ERROR-CODE 15620000 AUT09A MOVE "A" TO ZZD-FUNCTION-CODE 15630000 AUT09A MOVE "ISO" TO ZZD-DATE1-FORMAT 15640000 AUT09A MOVE "WF" TO ZZD-DATE2-FORMAT 15660000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 AUT09A AUT09A AUT09A IF ZZD-ERROR-CODE NOT = 00 AUT09A THEN 15820000 AUT09A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 15830000 AUT09A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 15840000 AUT09A PERFORM JLMSG-DISPLAY-MESSAGE 15850000 AUT09A END-IF END-IF AUT09A* DISPLAY "ZZD-DATE2 : " ZZD-DATE2 AUT09A MOVE ZZD-DATE2(1:6) TO WW01-END-BSP-YRWK 15870000 AUT09A MOVE ZZD-DATE2(7:1) TO WW01-END-BSP-DAY 15890000 159200 SET PROCESS-LOOP TO TRUE. 15920000 159300 MOVE 1 TO WX10-DATA-SUB1. 15930000 159400 PERFORM UNTIL END-PROCESS-LOOP 15940000 159500 MOVE WT30-CCYY-MM-DD(WX10-DATA-SUB2) 15950008 159600 TO JLF40-SALES-DATE(WX10-DATA-SUB1) 15960000 TA1226 JLF42-BGO2-SALES-DATE(WX10-DATA-SUB1) 15960000 159700 MOVE WT30-TESCO-YEAR(WX10-DATA-SUB2) 15970008 159800 TO JLF40-SALES-YEAR(WX10-DATA-SUB1) 15980000 159900 MOVE WT30-TESCO-WEEK(WX10-DATA-SUB2) 15990008 160000 TO JLF40-SALES-WEEK(WX10-DATA-SUB1) 16000000 160100 MOVE WT30-DAY-NO(WX10-DATA-SUB2) 16010008 160200 TO JLF40-SALES-DAY(WX10-DATA-SUB1) 16020000 160400 MOVE ZEROES TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16040000 PS2S11 JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16040000 228100 JLF40-OLD-DAY-FCST-SALES(WX10-DATA-SUB1) 160500 JLF40-MAX-STK-IN-CODE(WX10-DATA-SUB1) 16050000 160600 JLF40-FCST-OPEN-BKSTK(WX10-DATA-SUB1) 16060000 160700 JLF40-FCST-TRGT-STK(WX10-DATA-SUB1) 16070000 TA1226 JLF42-BGO2-PROM-SHELF-CAP(WX10-DATA-SUB1) 16070000 160900 ADD 1 TO WX10-DATA-SUB1 16090000 160910 ADD 1 TO WX10-DATA-SUB2 16091008 161000 16100000 161100 IF WX10-DATA-SUB1 > 50 16110000 161110 OR WX10-DATA-SUB2 > 50 16111008 161200 THEN 16120000 161300 SET END-PROCESS-LOOP TO TRUE 16130000 161400 END-IF 16140000 161500 END-PERFORM. 16150000 161600 16160000 161700 PERFORM V-200-OPEN-READNEXT-SFB-BSP. 16170000 161900 IF END-BSP-SFB 16190000 162000 THEN 16200000 162200 GO TO B-450-EXIT 16220000 162300 END-IF. 16230000 162400 16240000 162500 SET PROCESS-LOOP TO TRUE. 16250000 162600 MOVE 1 TO WX10-DATA-SUB1. 16260000 SPR11A MOVE "N" TO PREV-DTCM-PRCS-IND SPR11A CURR-DTCM-PRCS-IND AVRS42 INITIALIZE WW-PREVIOUS-NWS 162700 PERFORM UNTIL END-PROCESS-LOOP 16270000 162800 MOVE JLF26-TESCO-YRWK(1:4) TO WT50-BSP-TESCO-YEAR 16280000 162900 MOVE JLF26-TESCO-YRWK(5:2) TO WT50-BSP-TESCO-WEEK 16290000 163100 IF JLF40-SALES-YRWK(WX10-DATA-SUB1) > WT50-BSP-SALES-YRWK16310000 163200 THEN 16320000 163300 IF NOT-END-BSP-SFB 16330000 163400 THEN 16340000 163500 PERFORM V-210-FETCH-READNEXT-SFB-BSP 16350000 163600 ELSE 16360000 163700 ADD 1 TO WX10-DATA-SUB1 16370000 163800 END-IF 16380000 163900 END-IF 16390000 164000 16400000 164100 IF JLF40-SALES-YRWK(WX10-DATA-SUB1) < WT50-BSP-SALES-YRWK16410000 164200 THEN 16420000 164300 ADD 1 TO WX10-DATA-SUB1 16430000 164400 END-IF 16440000 164500 16450000 164500 16450000 164600 IF JLF40-SALES-YRWK(WX10-DATA-SUB1) = WT50-BSP-SALES-YRWK16460000 164700 THEN 16470000 164800 EVALUATE JLF40-SALES-DAY(WX10-DATA-SUB1) 16480000 164900 WHEN 1 16490000 165000 MOVE JLF26-EXP-DAILY-SALES-1 16500000 165100 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-1 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-1 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-1 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 165200 WHEN 2 16520000 165300 MOVE JLF26-EXP-DAILY-SALES-2 16530000 165400 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16540000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-2 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-2 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-2 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 165500 WHEN 3 16550000 165600 MOVE JLF26-EXP-DAILY-SALES-3 16560000 165700 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16570000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-3 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-3 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-3 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 165800 WHEN 4 16580000 165900 MOVE JLF26-EXP-DAILY-SALES-4 16590000 166000 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16600000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-4 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-4 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-4 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 166100 WHEN 5 16610000 166200 MOVE JLF26-EXP-DAILY-SALES-5 16620000 166300 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16630000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-5 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-5 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-5 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 166400 WHEN 6 16640000 166500 MOVE JLF26-EXP-DAILY-SALES-6 16650000 166600 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16660000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-6 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-6 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-6 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 166700 WHEN 7 16670000 166800 MOVE JLF26-EXP-DAILY-SALES-7 16680000 166900 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16690000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-7 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-7 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-7 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 167000 WHEN OTHER 16700000 167100 MOVE JLF26-EXP-DAILY-SALES-1 16710000 167200 TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16720000 WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 MOVE JLF26-FCST-NWS-1 165100 TO JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16510000 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 MOVE JLF26-KA-1 TO WT85-KA(WX10-DATA-SUB1) AVRS42 MOVE JLF26-FORECAST-TREND-1 AVRS42 TO WT85-TREND(WX10-DATA-SUB1) 167300 END-EVALUATE 16730000 167400 16740000 WIN06A MOVE JLF40-SALES-DATE(WX10-DATA-SUB1) TO WW01-JLF40-SALES-DT IF WW01-DTCMES-KEY <= WW01-JLF40-KEY PERFORM B-455-PROCESS-DOTCOM-SALES END-IF SUM11B IF WT10-STKD-PROD-STDT NOT = SPACES SUM11B PERFORM B-457-PROCESS-NEW-RANG-PROD SUM11B END-IF AVRS42 MOVE JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) AVRS42 TO WW-PREVIOUS-NWS 167500 ADD 1 TO WX10-DATA-SUB1 16750000 167600 END-IF 16760000 167700 16770000 167800 IF WX10-DATA-SUB1 > 50 16780000 167900 THEN 16790000 168000 SET END-PROCESS-LOOP TO TRUE 16800000 168100 END-IF 16810000 168200 16820000 168300 END-PERFORM. 16830000 168400 16840000 168400 16840000 AUT07B IF JLF26-SQLCODE = +100 AUT07B SET BSP-SFB-CLOSED TO TRUE AUT07B ELSE AUT07B PERFORM V-220-CLOSE-READNEXT-SFB-BSP AUT07B END-IF. 168700 B-450-EXIT. 16870000 EXIT. 09920031 WIN06A B-455-PROCESS-DOTCOM-SALES SECTION. *---------------------------------------------------------------* 09940031 * SECTION NAME : B-455-PROCESS-DOTCOM-SALES * 09950092 * CALLED BY : B-450-RETRIEVE-BSP * 09960092 * CALLS : XC-DOTCOM-SALES * 09970031 * FUNCTION : REPLACES ANY CR FORECAST SALES IN THE JLF40 * 09980031 * : LINKAGE WITH ANY MATCHING DOTCOM * * : EXPECTED SALES. * *---------------------------------------------------------------* 10000031 B-455. 10010031 10020031 *** READ DOTCOM SALES FILE TO FIND ANY SALES FOR THE CURRENT *** SALES DATE PERFORM UNTIL WW01-DTCMES-KEY >= WW01-JLF40-KEY PERFORM XC-DOTCOM-SALES END-PERFORM IF WW01-DTCMES-KEY = WW01-JLF40-KEY *** REPLACE CR FORECAST SALES WITH DOTCOM EXPECTED SALES SPR11A IF JLDCE-BPR-SALES-QTY >= 0 SPR11A IF JLDCE-DOTCOM-PROC-IND = SPACES SPR11A MOVE PREV-DTCM-PRCS-IND TO CURR-DTCM-PRCS-IND SPR11A ELSE SPR11A MOVE JLDCE-DOTCOM-PROC-IND TO CURR-DTCM-PRCS-IND SPR11A PREV-DTCM-PRCS-IND SPR11A END-IF SPR11A SPR11A IF CURR-DTCM-PRCS-IND = WF01-PROCESS-IND-Y MOVE JLDCE-BPR-SALES-QTY TO JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) SPR11A ADD +1 TO WA01-DOTCOM-SUBSTN SPR11A ELSE SPR11A IF CURR-DTCM-PRCS-IND = WF01-PROCESS-IND-M SPR11A IF JLDCE-BPR-SALES-QTY SPR11A > JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) SPR11A MOVE JLDCE-BPR-SALES-QTY TO SPR11A JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) SPR11A ADD +1 TO WA01-DOTCOM-SUBSTN SPR11A END-IF SPR11A END-IF SPR11A END-IF SPR11A END-IF PERFORM XC-DOTCOM-SALES END-IF . 10720031 B-455-EXIT. 10730031 EXIT. 09920031 SUM11B B-457-PROCESS-NEW-RANG-PROD SECTION. SUM11B*---------------------------------------------------------------* SUM11B* SECTION NAME : B-417-PROCESS-NEWLY-RANGED-PRODUCT * SUM11B* CALLED BY : B-410-STORE-BSP * SUM11B* CALLS : NONE * SUM11B* FUNCTION : ZEAROISE EXPECTED SALES FOR NEWLY RANGED * SUM11B* : PRODUCTS BEFORE STOCK START DATE. * SUM11B*---------------------------------------------------------------* SUM11B B-457. SUM11B IF WW01-STK-PROD-ST-YRWK > WT50-BSP-SALES-YRWK SUM11B MOVE 0 TO SUM11B JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16720000 SUM11B WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16720000 PS2S11 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) SUM11B END-IF SUM11B SUM11B SUM11B IF WW01-STK-PROD-ST-YRWK = WT50-BSP-SALES-YRWK SUM11B IF JLF40-SALES-DAY(WX10-DATA-SUB1) < SUM11B WW01-STK-PROD-ST-DNO SUM11B MOVE 0 TO SUM11B JLF40-DAY-FCST-SALES(WX10-DATA-SUB1) 16720000 SUM11B WT80-DAY-FCST-SALES(WX10-DATA-SUB1) PS2S11 JLF40-DAY-FCST-NWS(WX10-DATA-SUB1) 16720000 PS2S11 WT80-DAY-FCST-NWS(WX10-DATA-SUB1) SUM11B END-IF SUM11B END-IF SUM11B . SUM11B B-457-EXIT. SUM11B EXIT. 393700 B-460-PROCESS-RESERVES SECTION. 39370004 393800*---------------------------------------------------------------* 39380001 393900* SECTION NAME : B-460-PROCESS-RESERVES * 39390001 418800* FUNCTION : THIS SECTION IDENTIFIES ANY MM AND/OR BD * 41880011 418900* ALLOCATION RESERVE THAT MIGHT BE IN EFFECT * 41890011 419000* DURING THE FORECASTING PERIOD. ANY OVERLAPS * 41900011 419100* ARE RESOLVED (WITH MM TAKING PRIORITY) AND * 41910011 419200* RELEVANT DETAILS ARE PASSED TO THE JLF40LNK * 41920011 419300* DATA AREA. * 41930011 394200*---------------------------------------------------------------* 39420001 394300 B-460-START. 39430004 400100* DISPLAY "B-460-START". 40010021 394400 39440003 400300* DISPLAY "PROCESSING STORE/PRODUCT " WW01-CURR-RO-NO-DB2 40030020 400400* "/" WW01-CURR-BPR-TPN-DB2 40040020 396600 39660018 394500* ADVANCE THE MM RESERVE CURSOR UNTIL A POTENTIAL MATCH IS 39450003 394600* FOUND. 39460003 394700 PERFORM VGB-FETCH-MM-RSVE-CURSOR 39470003 398700 UNTIL WI10-MM-RSVE-CURSOR-CLOSED 39870002 398800 OR WI09-END-OF-MM-RSVE-CURSOR 39880002 394900 OR ( MMR-CR-PART-NO > WW01-CURR-PART-NO ) 39490003 395000 OR ( MMR-CR-PART-NO = WW01-CURR-PART-NO 39500003 395100 AND MMR-RO-NO > WW01-CURR-RO-NO-DB2 ) 39510003 395200 OR ( MMR-CR-PART-NO = WW01-CURR-PART-NO 39520003 395300 AND MMR-RO-NO = WW01-CURR-RO-NO-DB2 39530003 395400 AND MMR-BPR-TPN >= WW01-CURR-BPR-TPN-DB2 ) 39540003 395500 39550003 395600* ADVANCE THE BD RESERVE CURSOR UNTIL A POTENTIAL MATCH IS 39560003 395700* FOUND. 39570003 395800 PERFORM VHB-FETCH-BD-RSVE-CURSOR 39580003 399900 UNTIL WI12-BD-RSVE-CURSOR-CLOSED 39990002 400000 OR WI11-END-OF-BD-RSVE-CURSOR 40000002 396000 OR ( WH01-CR-PART-NO > WW01-CURR-PART-NO ) 39600004 396100 OR ( WH01-CR-PART-NO = WW01-CURR-PART-NO 39610004 396200 AND WH01-RO-NO > WW01-CURR-RO-NO-DB2 ) 39620004 396300 OR ( WH01-CR-PART-NO = WW01-CURR-PART-NO 39630004 396400 AND WH01-RO-NO = WW01-CURR-RO-NO-DB2 39640004 396500 AND WH01-BPR-TPN >= WW01-CURR-BPR-TPN-DB2 ) 39650004 396600 39660003 396700* CLEAR THE RESOLVED RESERVES TABLE. 39670003 396800 MOVE ZERO TO WT61-COUNT 39680003 396900 39690003 397000* LOAD THE RESOLVED RESERVES TABLE WITH MM/BD RESERVE DETAILS FOR 39700003 397100* THE CURRENT STORE/PRODUCT COMBINATION. 39710003 397200 PERFORM 39720003 401400 UNTIL ( WI10-MM-RSVE-CURSOR-CLOSED 40140002 401500 OR WI09-END-OF-MM-RSVE-CURSOR 40150002 397400 OR NOT ( MMR-CR-PART-NO = WW01-CURR-PART-NO 39740004 397500 AND MMR-RO-NO = WW01-CURR-RO-NO-DB2 39750004 397600 AND MMR-BPR-TPN = WW01-CURR-BPR-TPN-DB2 ) ) 39760004 401900 AND ( WI12-BD-RSVE-CURSOR-CLOSED 40190002 402000 OR WI11-END-OF-BD-RSVE-CURSOR 40200002 397800 OR NOT ( WH01-CR-PART-NO = WW01-CURR-PART-NO 39780004 397900 AND WH01-RO-NO = WW01-CURR-RO-NO-DB2 39790004 398000 AND WH01-BPR-TPN = WW01-CURR-BPR-TPN-DB2 ) ) 39800004 398100 39810003 398200* ADD AN ENTRY TO THE RESOLVED RESERVES TABLE DEPENDING ON THE 39820003 398300* COMPARISON BETWEEN THE START DATE OF THE TWO RESERVE TYPES. 39830004 398400 EVALUATE TRUE 39840003 402800 WHEN WI10-MM-RSVE-CURSOR-CLOSED 40280002 398500 WHEN WI09-END-OF-MM-RSVE-CURSOR 39850003 398600 WHEN NOT ( MMR-CR-PART-NO = WW01-CURR-PART-NO 39860003 398700 AND MMR-RO-NO = WW01-CURR-RO-NO-DB2 39870003 398800 AND MMR-BPR-TPN = WW01-CURR-BPR-TPN-DB2 ) 39880003 398900 39890003 424200 PERFORM B-461-STORE-BD-RESERVE 42420011 400700 PERFORM VHB-FETCH-BD-RSVE-CURSOR 40070003 400800 40080003 403700 WHEN WI12-BD-RSVE-CURSOR-CLOSED 40370002 400900 WHEN WI11-END-OF-BD-RSVE-CURSOR 40090003 401000 WHEN NOT ( WH01-CR-PART-NO = WW01-CURR-PART-NO 40100004 401100 AND WH01-RO-NO = WW01-CURR-RO-NO-DB2 40110004 401200 AND WH01-BPR-TPN = WW01-CURR-BPR-TPN-DB2 ) 40120004 401300 40130003 425000 PERFORM B-462-STORE-MM-RESERVE 42500011 425100 PERFORM VGB-FETCH-MM-RSVE-CURSOR 42510003 401900 40190004 403300 WHEN MMR-RSVE-EFFV-DT < WH01-RSVE-EFFV-DT 40330004 405100 40510003 425500 PERFORM B-462-STORE-MM-RESERVE 42550011 405200 PERFORM VGB-FETCH-MM-RSVE-CURSOR 40520003 405300 40530003 405400 WHEN MMR-RSVE-EFFV-DT > WH01-RSVE-EFFV-DT 40540004 405500 40550003 426000 PERFORM B-461-STORE-BD-RESERVE 42600011 407300 PERFORM VHB-FETCH-BD-RSVE-CURSOR 40730003 407400 40740003 407500 WHEN OTHER 40750004 407600 40760003 426500 PERFORM B-462-STORE-MM-RESERVE 42650011 408400 40840003 426700* IF THEY START ON THE SAME DAY, BUT THE BD RESERVE PERIOD IS 42670011 426800* LONGER, ADJUST THIS AND GO AROUND THE LOOP AGAIN. 42680011 409400 IF MMR-RSVE-END-DT < WH01-RSVE-END-DT 40940004 410400 MOVE "A" TO ZZD-FUNCTION-CODE 41040003 410500 MOVE +1 TO ZZD-DIFF-IN-DAYS 41050003 410600 MOVE "ISO" TO ZZD-DATE1-FORMAT 41060003 410700 MOVE MMR-RSVE-END-DT TO ZZD-DATE1 41070003 410800 MOVE "ISO" TO ZZD-DATE2-FORMAT 41080003 SPR14B PERFORM ZA-CALL-JL0F32 10860000 206800 427600 MOVE ZZD-DATE2 TO WH01-RSVE-EFFV-DT 42760011 427700 ELSE 42770011 427800 PERFORM VHB-FETCH-BD-RSVE-CURSOR 42780011 411900 END-IF 41190003 412000 41200003 412100 PERFORM VGB-FETCH-MM-RSVE-CURSOR 41210003 412300 41230003 412400 END-EVALUATE 41240003 412500 END-PERFORM 41250003 412600 41260005 412700* IF THERE AREN'T ANY RESERVES, EXIT THIS PROCESSING. 41270005 412800 IF WT61-COUNT = ZERO 41280005 405400 GO TO B-460-FILL-JLF40LNK 40540012 413000 END-IF 41300005 413100 41310003 413200* IF ANY OF THE RESERVE PERIODS OVERLAP, ADJUST THE DATES WITH 41320003 413300* THE MM RESERVES TAKING PRIORITY. 41330003 405900* NOTE. MM RESERVES HAVE NO ALLOC-PATTERN (I.E. EQUAL TO SPACES). 40590012 413400 PERFORM 41340003 413500 VARYING WT61-IX2 FROM 2 BY 1 41350003 413600 UNTIL WT61-IX2 > WT61-COUNT 41360003 413700 SET WT61-IX TO WT61-IX2 41370003 413800 SET WT61-IX DOWN BY 1 41380003 413900 41390003 414000 IF WT61-RSVE-END-DT (WT61-IX) >= 41400003 414100 WT61-RSVE-EFFV-DT (WT61-IX2) 41410003 414200 IF WT61-ALLOC-PATTERN (WT61-IX) = SPACES 41420003 414300 MOVE "A" TO ZZD-FUNCTION-CODE 41430003 414400 MOVE +1 TO ZZD-DIFF-IN-DAYS 41440003 414500 MOVE "ISO" TO ZZD-DATE1-FORMAT 41450003 414600 MOVE WT61-RSVE-END-DT (WT61-IX) TO ZZD-DATE1 41460003 414700 MOVE "ISO" TO ZZD-DATE2-FORMAT 41470003 SPR14B PERFORM ZA-CALL-JL0F32 10860000 206800 414900 MOVE ZZD-DATE2 TO WT61-RSVE-EFFV-DT (WT61-IX2) 41490003 415000 ELSE 41500003 415100 MOVE "A" TO ZZD-FUNCTION-CODE 41510003 415200 MOVE -1 TO ZZD-DIFF-IN-DAYS 41520003 415300 MOVE "ISO" TO ZZD-DATE1-FORMAT 41530003 415400 MOVE WT61-RSVE-EFFV-DT (WT61-IX2) TO ZZD-DATE1 41540003 415500 MOVE "ISO" TO ZZD-DATE2-FORMAT 41550003 SPR14B PERFORM ZA-CALL-JL0F32 10860000 206800 415700 MOVE ZZD-DATE2 TO WT61-RSVE-END-DT (WT61-IX) 41570003 415800 END-IF 41580003 409900 40990000 415900 END-IF 41590003 410100 41010000 410200 END-PERFORM 41020000 410300 41030000 410400* IF THE END DATE IF EARLIER THAN THE START DATE, REMOVE THE 41040000 410500* ENTRY. 41050000 410600 PERFORM 41060000 410700 VARYING WT61-IX FROM 1 BY 1 41070000 410800 UNTIL WT61-IX > WT61-COUNT 41080000 410900 41090000 411000 IF WT61-RSVE-END-DT (WT61-IX) < 41100000 411100 WT61-RSVE-EFFV-DT (WT61-IX) 41110000 411200 41120000 411300 PERFORM 41130000 411400 VARYING WT61-IX2 FROM WT61-IX BY 1 41140000 411500 UNTIL WT61-IX2 >= WT61-COUNT 41150000 411600 MOVE WT61-RESERVE-ENTRY (WT61-IX2 + 1) 41160000 411700 TO WT61-RESERVE-ENTRY (WT61-IX2) 41170000 411800 END-PERFORM 41180000 411900 41190000 412000 SUBTRACT 1 FROM WT61-COUNT 41200000 412100 41210000 412200 END-IF 41220000 412300 41230000 416000 END-PERFORM 41600003 416100 41610005 416200* ADVANCE THE JLALRESV FILE UNTIL A POTENTIAL MATCH IS FOUND. 41620004 416300* THESE RECORDS HOLD THE DETAILS OF FUTURE RESERVES. 41630005 416400* HOWEVER, BEWARE THAT THEY HAVEN'T ALREADY BEEN ROLLED INTO THE 41640005 416500* BD ALLOCATIONS TABLE. 41650005 416600 PERFORM XA-READ-JLALRESV 41660005 416700 UNTIL WI13-END-OF-JLALRESV 41670005 416800 OR ( JLALR-CR-PART-NO > WW01-CURR-PART-NO ) 41680005 416900 OR ( JLALR-CR-PART-NO = WW01-CURR-PART-NO 41690005 417000 AND JLALR-RETAIL-OUTLET-NO > WW01-CURR-RO-NO-DB2 ) 41700005 417100 OR ( JLALR-CR-PART-NO = WW01-CURR-PART-NO 41710005 417200 AND JLALR-RETAIL-OUTLET-NO = WW01-CURR-RO-NO-DB2 41720005 417300 AND JLALR-BASE-PRODUCT-NO > WW01-CURR-BPR-TPN-DB2 ) 41730009 417400 OR ( JLALR-CR-PART-NO = WW01-CURR-PART-NO 41740005 417500 AND JLALR-RETAIL-OUTLET-NO = WW01-CURR-RO-NO-DB2 41750005 417600 AND JLALR-BASE-PRODUCT-NO = WW01-CURR-BPR-TPN-DB2 41760009 417700 AND JLALR-PROD-START-DATE > ALL-LAST-FORCED-DATE ) 41770005 417800 41780005 417900* SET THE REMAINING RESERVE QUANTITY FOR BD RESERVES IN THE 41790005 418000* RESOLVED RESERVE TABLE IF THERE ARE ANY ! 41800005 418100 PERFORM 41810005 418200 UNTIL WI13-END-OF-JLALRESV 41820005 418300 OR NOT ( JLALR-CR-PART-NO = WW01-CURR-PART-NO 41830005 418400 AND JLALR-RETAIL-OUTLET-NO = WW01-CURR-RO-NO-DB2 41840005 418500 AND JLALR-BASE-PRODUCT-NO = WW01-CURR-BPR-TPN-DB2)41850009 412000 41200000 412100 PERFORM 41210000 412200 VARYING WT61-IX FROM 1 BY 1 41220000 412300 UNTIL WT61-IX > WT61-COUNT 41230000 412400 IF WT61-ALLOC-PATTERN (WT61-IX) 41240000 412500 = JLALR-ALLC-GRP-PATT-ID 41250000 419000 MOVE JLALR-REM-ALLOC-QTY 41900009 419100 TO WT61-CURR-RSVE-QTY (WT61-IX) 41910005 MOVE "Y" TO WT61-CURR-RSVE-FUTURE-IND (WT61-IX) 41290000 412800 MOVE JLALR-ALLOC-TYPE 41280000 412900 TO WT61-ALLOC-TYPE (WT61-IX) 41290000 413000 END-IF 41300000 413100 END-PERFORM 41310000 419300 41930005 419400 PERFORM XA-READ-JLALRESV 41940005 419500 END-PERFORM 41950005 412200 . 41220015 412300 B-460-FILL-JLF40LNK. 41230012 412400 41240004 420700D DISPLAY "============== BD/MM RESERVES =============" 42070030 420800D DISPLAY " START END QTY PATTN % TYPE" 42080030 420500D PERFORM 42050022 420600D VARYING WT61-IX FROM 1 BY 1 42060022 420700D UNTIL WT61-IX > WT61-COUNT 42070022 420800D DISPLAY WT61-RSVE-EFFV-DT (WT61-IX) " " 42080022 420900D WT61-RSVE-END-DT (WT61-IX) " " 42090022 421000D WT61-CURR-RSVE-QTY (WT61-IX) " " 42100022 421100D WT61-ALLOC-PATTERN (WT61-IX) " " 42110022 421510D WT61-APPORTION-IND (WT61-IX) " " 42151030 421200D WT61-ALLOC-TYPE (WT61-IX) 42120022 421300D END-PERFORM 42130022 421800D DISPLAY "============== BD/MM RESERVES =============" 42180030 413600 41360012 419700* SET THE RESERVE QUANTITY IN THE JLF40LNK LINKAGE APPROPRIATELY, 41970005 419800* LOOPING THROUGH THE DEMEND PERIODS. 41980005 419900 SET WT61-IX TO 1 41990004 420000 PERFORM 42000004 420100 VARYING WX10-DATA-SUB1 FROM 1 BY 1 42010004 420200 UNTIL WX10-DATA-SUB1 > 75 42020004 420300 OR JLF40-PER-STR-DATE (WX10-DATA-SUB1) = SPACES 42030004 420400 42040004 420500* DEMAND PERIOD ENCOUNTERED. 42050005 420600 IF JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" 42060004 420700 42070005 420800* MOVE THE INDEX OF THE RESOLVED RESERVES TO A POTENTIAL MATCH 42080005 420900* WITH THE DEMEND PERIOD. 42090005 421000 PERFORM 42100004 421100 UNTIL WT61-IX > WT61-COUNT 42110004 421200 OR ( JLF40-PER-STR-DATE (WX10-DATA-SUB1) >= 42120005 421300 WT61-RSVE-EFFV-DT (WT61-IX) 42130005 421400 AND JLF40-PER-STR-DATE (WX10-DATA-SUB1) <= 42140005 421500 WT61-RSVE-END-DT (WT61-IX) ) 42150005 421600 OR ( JLF40-PER-STR-DATE (WX10-DATA-SUB1) <= 42160005 421700 WT61-RSVE-END-DT (WT61-IX) ) 42170005 421800 SET WT61-IX UP BY 1 42180004 421900 END-PERFORM 42190004 422000 42200004 422100* SET THE RESERVES IN THE LINKAGE DEPENDING ON THE COMPARISON 42210005 422200* BETWEEN THE DEMAND PERIOD AND EFFECTIVE DATES. 42220005 422300 EVALUATE TRUE 42230004 422400 WHEN WT61-IX > WT61-COUNT 42240004 422500* NO RESERVE AS WE'RE AT THE END OF THE LIST. 42250005 422600 MOVE ZERO TO JLF40-RSVE-QTY (WX10-DATA-SUB1) 42260005 422700 MOVE "N" TO JLF40-RSVE-IND (WX10-DATA-SUB1) 42270005 422800 42280004 424800* DISPLAY JLF40-PER-STR-DATE (WX10-DATA-SUB1) 42480020 424900* " (" JLF40-ORDER-TYPE (WX10-DATA-SUB1) ") " 42490020 425000* " - NOT ON RESERVE" 42500020 417700 41770004 422900 WHEN JLF40-PER-STR-DATE (WX10-DATA-SUB1) = 42290004 423000 WT61-RSVE-EFFV-DT (WT61-IX) 42300004 423100 AND JLF40-FIRST-ORD-TYPE-OF-DAY (WX10-DATA-SUB1) = 42310005 423200 JLF40-ORDER-TYPE (WX10-DATA-SUB1) 42320005 423300* AT THE START OF THE RESERVE PERIOD, AND FIRST ORDER TYPE OF THE 42330005 423400* DAY. 42340005 423500 MOVE WT61-CURR-RSVE-QTY (WT61-IX) 42350005 423600 TO JLF40-RSVE-QTY (WX10-DATA-SUB1) 42360005 MOVE WT61-CURR-RSVE-FUTURE-IND (WT61-IX) TO JLF40-RSVE-FUTURE-IND (WX10-DATA-SUB1) 423700 MOVE "S" TO JLF40-RSVE-IND (WX10-DATA-SUB1) 42370005 423800 42380004 426200* DISPLAY JLF40-PER-STR-DATE (WX10-DATA-SUB1) 42620020 426300* " (" JLF40-ORDER-TYPE (WX10-DATA-SUB1) ") " 42630020 426400* " STARTS ON " 42640020 426500* WT61-RSVE-EFFV-DT (WT61-IX) " WITH " 42650020 426600* JLF40-RSVE-QTY (WX10-DATA-SUB1) 42660020 418200 41820012 423900 WHEN JLF40-PER-STR-DATE (WX10-DATA-SUB1) >= 42390005 424000 WT61-RSVE-EFFV-DT (WT61-IX) 42400004 424100 AND JLF40-PER-STR-DATE (WX10-DATA-SUB1) <= 42410005 424200 WT61-RSVE-END-DT (WT61-IX) 42420005 424300* WITHIN THE RESERVE PERIOD. 42430005 424400 MOVE WT61-CURR-RSVE-QTY (WT61-IX) 42440005 424500 TO JLF40-RSVE-QTY (WX10-DATA-SUB1) 42450005 MOVE WT61-CURR-RSVE-FUTURE-IND (WT61-IX) TO JLF40-RSVE-FUTURE-IND (WX10-DATA-SUB1) 424600 MOVE "Y" TO JLF40-RSVE-IND (WX10-DATA-SUB1) 42460005 424700 42470004 427700* DISPLAY JLF40-PER-STR-DATE (WX10-DATA-SUB1) 42770020 427800* " (" JLF40-ORDER-TYPE (WX10-DATA-SUB1) ") " 42780020 427900* " IS WITHIN " 42790020 428000* WT61-RSVE-EFFV-DT (WT61-IX) " TO " 42800020 428100* WT61-RSVE-END-DT (WT61-IX) " WITH " 42810020 428200* JLF40-RSVE-QTY (WX10-DATA-SUB1) 42820020 419600 41960004 424800 WHEN OTHER 42480005 424900* NOT WITHIN THE RESERVE PERIOD. 42490005 425000 MOVE ZERO TO JLF40-RSVE-QTY (WX10-DATA-SUB1) 42500005 425100 MOVE "N" TO JLF40-RSVE-IND (WX10-DATA-SUB1) 42510005 421200 42120020 428900* DISPLAY JLF40-PER-STR-DATE (WX10-DATA-SUB1) 42890020 429000* " (" JLF40-ORDER-TYPE (WX10-DATA-SUB1) ") " 42900020 429100* " - NOT ON RESERVE" 42910020 421500 42150020 425200 END-EVALUATE 42520005 425300 42530005 429500* IF AN ALLOCATION APPORTIONMENT HAS BEEN MOVED FORWARD DUE 42950019 429600* TO A NON-DELIVERY DAY, SET THE RESERVE, ETC. 42960019 429700 IF JLF40-RSVE-IND (WX10-DATA-SUB1) = "N" 42970019 429800 AND JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) NOT = SPACES42980019 429900 SET WT61-IX3 TO 1 42990019 430000 SEARCH WT61-RESERVE-ENTRY VARYING WT61-IX3 43000019 430100 WHEN WT61-ALLOC-PATTERN (WT61-IX3) 43010019 430200 = JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) 43020019 430300 MOVE WT61-ALLOC-TYPE (WT61-IX3) 43030019 430400 TO JLF40-ALLOC-TYPE (WX10-DATA-SUB1) 43040019 430500 MOVE WT61-CURR-RSVE-QTY (WT61-IX3) 43050019 430600 TO JLF40-RSVE-QTY (WX10-DATA-SUB1) 43060019 MOVE WT61-CURR-RSVE-FUTURE-IND (WT61-IX3) TO JLF40-RSVE-FUTURE-IND (WX10-DATA-SUB1) 430700 MOVE "Y" 43070019 430800 TO JLF40-RSVE-IND (WX10-DATA-SUB1) 43080019 431000* DISPLAY "SET RESERVE FOR ROLLED-FORWARD ON " 43100026 431100* " TO " 43110026 431110* WT61-RESERVE-ENTRY (WT61-IX3) 43111026 430900 END-SEARCH 43090019 431000 END-IF 43100019 431100 43110000 423000* REVISE THE ALLOCATION TYPE USING THE RESOLVED ALLOCATION TABLE. 42300026 423100 EVALUATE TRUE 42310026 423200 WHEN JLF40-ALLOC-TYPE (WX10-DATA-SUB1) 42320026 423300 = "L" OR "P" OR "R" 42330026 423400 WHEN JLF40-NEW-LINE-QTY (WX10-DATA-SUB1) > 0 42340026 423500 AND JLF40-RSVE-IND (WX10-DATA-SUB1) = "N" 42350026 423600 CONTINUE 42360026 423700 42370026 426800 WHEN (JLF40-RSVE-IND (WX10-DATA-SUB1) = "S" OR "Y") 42680001 432410 AND WT61-IX <= WT61-COUNT 43241025 432420 AND WT61-ALLOC-TYPE (WT61-IX) NOT = SPACE 43242025 423900 MOVE WT61-ALLOC-TYPE (WT61-IX) 42390026 424000 TO JLF40-ALLOC-TYPE (WX10-DATA-SUB1) 42400026 424100 42410026 430700 WHEN JLF40-RSVE-IND (WX10-DATA-SUB1) = "N" 43070017 430800 AND JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) = SPACES43080017 430900 MOVE SPACES 43090017 424000 TO JLF40-ALLOC-TYPE (WX10-DATA-SUB1) 42400026 424100 42410026 424200 WHEN OTHER 42420026 427400 CONTINUE 42740001 424500 42450026 424600 END-EVALUATE 42460026 424700 42470026 425400 END-IF 42540004 425500 42550005 425600 END-PERFORM 42560004 431500 43150008 431600* IF THERE ARE MULTIPLE RESERVE PERIODS, SEE IF WE NEED TO ADJUST 43160008 431700* THE APPORTIONMENT OF THE LAST DELIVERY FOR A BD RESERVE. 43170008 431800 IF WT61-COUNT > 1 43180008 431900 PERFORM B-463-ADJUST-BD-APPORTIONMENT 43190008 432000 END-IF 43200008 434700 43470022 434800* DISPLAY PARAMETERS INPUT TO F40. 43480022 434900D PERFORM 43490022 435000D VARYING WX10-DATA-SUB1 FROM 1 BY 1 43500022 435100D UNTIL WX10-DATA-SUB1 > 75 43510022 435200D OR JLF40-PER-STR-DATE (WX10-DATA-SUB1) = SPACES 43520022 435300D 43530022 435400D IF JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" 43540022 435500D DISPLAY JLF40-PER-STR-DATE (WX10-DATA-SUB1) 43550022 435600D " " JLF40-ALLOC-TYPE (WX10-DATA-SUB1) 43560022 435700D " " JLF40-ALLOC-PATTERN-ID (WX10-DATA-SUB1) 43570022 435800D " " JLF40-NEW-LINE-QTY (WX10-DATA-SUB1) 43580022 435900D " " JLF40-RSVE-IND (WX10-DATA-SUB1) 43590022 436000D " " JLF40-RSVE-QTY (WX10-DATA-SUB1) 43600022 436010D " " JLF40-APPORTION-PC (WX10-DATA-SUB1) 43601027 436100D END-IF 43610022 436200D END-PERFORM 43620022 425700 . 42570004 425800 B-460-EXIT. 42580003 425900 EXIT. 42590003 426000 42600003 442000/ 44200011 442100 B-461-STORE-BD-RESERVE SECTION. 44210011 442200*---------------------------------------------------------------* 44220011 442300* SECTION NAME : B-461-STORE-BD-RESERVE * 44230011 442400* FUNCTION : STORES A BD RESERVE. * 44240011 442500*---------------------------------------------------------------* 44250011 442600 B-461-START. 44260011 442700 44270011 421800* INCREMENT THE TABLE COUNTER AND SEE IF WE'VE BLOWN IT ! 42180012 442800 ADD +1 TO WT61-COUNT 44280011 442900 IF WT61-COUNT > WT61-MAX 44290011 443000 MOVE WM31-TOO-MANY-RESERVES TO JLMSG-TEXT 44300011 443100 PERFORM JLMSG-DISPLAY-MESSAGE 44310011 443200 END-IF 44320011 443300 44330011 443400 SET WT61-IX TO WT61-COUNT 44340011 443500 44350011 422700* STORE THE DETAILS. 42270012 443600 MOVE WH01-RSVE-EFFV-DT 44360011 443700 TO WT61-RSVE-EFFV-DT (WT61-IX) 44370011 443800 MOVE WH01-RSVE-END-DT 44380011 443900 TO WT61-RSVE-END-DT (WT61-IX) 44390011 444000 MOVE ALL-REM-RSVE-QTY 44400011 444100 TO WT61-CURR-RSVE-QTY (WT61-IX) 44410011 MOVE "N" TO WT61-CURR-RSVE-FUTURE-IND (WT61-IX) 444200 MOVE WH01-ALLOC-PATTERN 44420011 444300 TO WT61-ALLOC-PATTERN (WT61-IX) 44430011 439900 MOVE WH01-APPORTION-IND 43990029 440000 TO WT61-APPORTION-IND (WT61-IX) 44000029 428100 MOVE ALL-ALLOC-TYPE 42810025 428200 TO WT61-ALLOC-TYPE (WT61-IX) 42820000 444400 . 44440011 444500 B-461-EXIT. 44450011 444600 EXIT. 44460011 444700 44470011 444800/ 44480011 444900 B-462-STORE-MM-RESERVE SECTION. 44490011 445000*---------------------------------------------------------------* 44500011 445100* SECTION NAME : B-462-STORE-MM-RESERVE * 44510011 445200* FUNCTION : STORES A MM RESERVE. * 44520011 445300*---------------------------------------------------------------* 44530011 445400 B-462-START. 44540011 445500 44550011 426700* TO GUARD AGAINST TWO CONSECUTIVE MM RESERVES WHERE A 42670022 426800* BD RESERVE HAD BEEN INSERTED DUE TO OVERLAP, ENSURE THAT 42680022 426900* THIS MM RESERVE STARTS AFTER THE PREVIOUS OR REUSE IT IF NOT. 42690022 427000 IF WT61-COUNT > 1 42700022 427100 AND MMR-RSVE-EFFV-DT <= WT61-RSVE-EFFV-DT (WT61-COUNT) 42710022 427200 CONTINUE 42720022 427300 ELSE 42730022 427400 42740022 424800* INCREMENT THE TABLE COUNTER AND SEE IF WE'VE BLOWN IT ! 42480012 427600 ADD +1 TO WT61-COUNT 42760022 427700 IF WT61-COUNT > WT61-MAX 42770022 427800 MOVE WM31-TOO-MANY-RESERVES TO JLMSG-TEXT 42780022 427900 PERFORM JLMSG-DISPLAY-MESSAGE 42790022 428000 END-IF 42800022 446000 END-IF 44600011 446100 44610011 446200 SET WT61-IX TO WT61-COUNT 44620011 446300 44630011 425700* STORE THE DETAILS. 42570012 446400 MOVE MMR-RSVE-EFFV-DT 44640011 446500 TO WT61-RSVE-EFFV-DT (WT61-IX) 44650011 446600 MOVE MMR-RSVE-END-DT 44660011 446700 TO WT61-RSVE-END-DT (WT61-IX) 44670011 446800 MOVE MMR-CURR-RSVE-QTY 44680011 446900 TO WT61-CURR-RSVE-QTY (WT61-IX) 44690011 MOVE " " TO WT61-CURR-RSVE-FUTURE-IND (WT61-IX) 447000 MOVE SPACES 44700011 447100 TO WT61-ALLOC-PATTERN (WT61-IX) 44710011 432200 MOVE SPACE 43220000 444300 TO WT61-APPORTION-IND (WT61-IX) 44430029 444400 MOVE SPACE 44440000 432300 TO WT61-ALLOC-TYPE (WT61-IX) 43230000 429400 42940022 429500* IF A PRECEEDING ENTRY WAS A BD RESERVE THAT ENDS AFTER THIS 42950022 429600* MM RESERVE, REPEAT THE BD ENTRY. 42960022 429700 IF WT61-COUNT > 1 42970022 429800 SET WT61-IX2 TO WT61-IX 42980022 429900 SET WT61-IX2 DOWN BY 1 42990022 430000 43000022 430100* LOOK FOR A PRECEEDING BD RESERVE. 43010022 430200 PERFORM 43020022 430300 UNTIL WT61-IX2 < 1 43030022 430400 OR WT61-ALLOC-PATTERN (WT61-IX2) NOT = SPACES 43040022 430500 SET WT61-IX2 DOWN BY 1 43050022 430600 END-PERFORM 43060022 430700 43070022 430800* IF FOUND, SEE IF IT EXTENDS BEYOND THIS MM RESERVE. 43080022 430900 IF WT61-IX2 > ZERO 43090022 431000 AND WT61-RSVE-END-DT (WT61-IX2) > MMR-RSVE-END-DT 43100022 431100 ADD +1 TO WT61-COUNT 43110022 431200 IF WT61-COUNT > WT61-MAX 43120022 431300 MOVE WM31-TOO-MANY-RESERVES TO JLMSG-TEXT 43130022 431400 PERFORM JLMSG-DISPLAY-MESSAGE 43140022 431500 END-IF 43150022 431600 43160022 431700* REPEAT THE PREVIOUS BD RESERVE. 43170022 431800 SET WT61-IX TO WT61-COUNT 43180022 431900 MOVE WT61-RESERVE-ENTRY (WT61-IX2) 43190022 432000 TO WT61-RESERVE-ENTRY (WT61-IX) 43200022 432100 43210022 432200* RE-CALCULATE THE BD RESERVE START DATE. 43220022 432300 MOVE "A" TO ZZD-FUNCTION-CODE 43230022 432400 MOVE +1 TO ZZD-DIFF-IN-DAYS 43240022 432500 MOVE "ISO" TO ZZD-DATE1-FORMAT 43250022 432600 MOVE MMR-RSVE-END-DT TO ZZD-DATE1 43260023 432700 MOVE "ISO" TO ZZD-DATE2-FORMAT 43270022 SPR14B PERFORM ZA-CALL-JL0F32 10860000 206800 432900 MOVE ZZD-DATE2 TO WT61-RSVE-EFFV-DT (WT61-IX) 43290023 433000 END-IF 43300022 433100 END-IF 43310022 447200 . 44720011 447300 B-462-EXIT. 44730011 447400 EXIT. 44740011 447500 44750011 447600/ 44760011 443700 B-463-ADJUST-BD-APPORTIONMENT SECTION. 44370008 443800*---------------------------------------------------------------* 44380008 443900* SECTION NAME : B-463-ADJUST-BD-APPORTIONMENT * 44390008 444000* FUNCTION : ADJUST THE APPORTIONMENT FOR A BD RESERVE, * 44400009 444100* SETTING IT TO 100%. THIS SHOULD OCCUR WHEN * 44410009 444200* WE HAVE BACK-TO-BACK BD RESERVES, AND WHEN * 44420009 444300* THE FINAL DAY OF THE FIRST IS A NON-DELIVERY * 44430015 444400* DAY. * 44440009 444500*---------------------------------------------------------------* 44450008 444600 B-463-START. 44460008 444700 44470008 444800* LOOP THROUGH THE RESERVE PERIODS. 44480008 444900 SET WT61-IX TO 1 44490008 445000 PERFORM 44500008 445100 UNTIL WT61-IX >= WT61-COUNT 44510008 445200 44520008 450500* STOP WHEN WE FIND BACK-TO-BACK BD RESERVES WHERE THE FIRST 45050029 450600* HAS A NON-ZERO APPORTIONMENT. 45060029 445400 PERFORM 44540008 445600 UNTIL WT61-IX >= WT61-COUNT 44560008 445700 OR ( WT61-ALLOC-PATTERN (WT61-IX) NOT = SPACES 44570008 451000 AND WT61-APPORTION-IND (WT61-IX) = "Y" 45100029 445700 AND WT61-ALLOC-PATTERN (WT61-IX + 1) NOT = SPACES ) 44570010 445800 SET WT61-IX UP BY 1 44580010 445900 END-PERFORM 44590010 445900 44590008 446000* WE HAVE BACK-TO-BACK BD RESERVES. 44600008 446100 IF WT61-IX < WT61-COUNT 44610008 446200 44620008 448700* DISPLAY "==> BACK-TO-BACK BD ALLOCATIONS ENCOUNTERED: "44870020 448800* WT61-ALLOC-PATTERN (WT61-IX) " AND " 44880020 448900* WT61-ALLOC-PATTERN (WT61-IX + 1) 44890020 446600 44660009 446700* LOOK FOR THE LAST DELIVERY ASSOCIATED WITH THE FIRST 44670008 446800* BD RESERVE. 44680008 446900 PERFORM 44690008 447000 VARYING WX10-DATA-SUB1 FROM 75 BY -1 44700008 447100 UNTIL WX10-DATA-SUB1 < 1 44710008 447200 OR ( JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D"44720009 447300 AND JLF40-ALLOC-PATTERN-ID (WX10-DATA-SUB1) 44730009 447400 = WT61-ALLOC-PATTERN (WT61-IX) ) 44740009 447600 CONTINUE 44760010 447700 END-PERFORM 44770010 447500 44750008 447900* IF WE'RE FOUND THE LAST DELIVERY, AND THE BD RESEVE ENDS 44790013 448000* SOMETIME AFTERWARDS, DERIVE THE NEXT DELIVERY DATE ETC. TO 44800013 448100* ENSURE THAT THE WHOLE RESERVE WILL BE ORDERED. 44810013 448200 IF WX10-DATA-SUB1 > ZERO 44820013 448300 AND WT61-RSVE-END-DT (WT61-IX) > 44830013 448400 JLF40-PER-STR-DATE (WX10-DATA-SUB1) 44840013 447800 MOVE WX10-DATA-SUB1 44780008 447900 TO WW03-LAST-DEL-SUB 44790008 448000 MOVE JLF40-PER-END-DATE (WX10-DATA-SUB1) 44800008 448100 TO WW03-NEXT-DEL-DATE 44810008 451200* DISPLAY " NEXT DELIVERY SET TO " 45120020 451300* WW03-NEXT-DEL-DATE 45130020 448400 44840008 449610 ADD +1 TO WX10-DATA-SUB1 44961018 449620 44962018 448500* PROCESS THE SUBSEQUENT DEMAND PERIODS, SAVING THE DEMAND PERIOD 44850009 448600* END DATE, UNTIL WE REACH THE NEXT DELIVERY OR END OF THE TABLE. 44860009 448700 PERFORM 44870008 448800 VARYING WX10-DATA-SUB1 FROM WX10-DATA-SUB1 BY 1 44880008 448900 UNTIL WX10-DATA-SUB1 > 75 44890008 449000 OR JLF40-PER-STR-DATE (WX10-DATA-SUB1) = SPACES 44900008 449100 OR WW03-NEXT-DEL-DATE > WT61-RSVE-END-DT (WT61-IX) 44910008 449810 44981016 449900 IF ( JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" 44990016 449300 AND ( ( JLF40-DELY-IND (WX10-DATA-SUB1) = 44930008 449400 "B" OR "P" OR "Y" OR "E" OR "S" ) 44940008 449500 OR ( JLF40-DELY-IND (WX10-DATA-SUB1) = "N" 44950008 449600 AND JLF40-CUST-ORD-QTY (WX10-DATA-SUB1) > ZERO ) ) )44960008 450302 MOVE JLF40-PER-STR-DATE (WX10-DATA-SUB1) 45030216 450303 TO WW03-NEXT-DEL-DATE 45030316 453200* DISPLAY " NEXT DELIVERY SET TO " 45320020 453300* WW03-NEXT-DEL-DATE 45330020 450310 MOVE 75 TO WX10-DATA-SUB1 45031016 450400 ELSE 45040016 450500 IF JLF40-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" 45050016 450600 MOVE JLF40-PER-END-DATE (WX10-DATA-SUB1) 45060016 450700 TO WW03-NEXT-DEL-DATE 45070016 453900* DISPLAY " NEXT DELIVERY SET TO " 45390020 454000* WW03-NEXT-DEL-DATE 45400020 451000 END-IF 45100016 451010 END-IF 45101016 450400 45040008 450500 END-PERFORM 45050008 450600 45060008 451400* IF THE NEXT DELIVERY IS AFTER THE FIRST BD RESERVE ENDS, 45140013 451500* AND THE NEXT DELIVERY IS AFTER THE SECOND BD RESERVE STARTS, 45150013 450800* SET THE APPORTIONMENT TO 100%. 45080009 450900 IF WW03-NEXT-DEL-DATE > WT61-RSVE-END-DT (WT61-IX) 45090008 451800 AND WW03-NEXT-DEL-DATE >= WT61-RSVE-EFFV-DT (WT61-IX + 1)45180014 451000 MOVE +100 45100009 451100 TO JLF40-APPORTION-PC (WW03-LAST-DEL-SUB) 45110008 455300* DISPLAY " SETTING APPORTIONMENT TO 100% ON " 45530020 455400* JLF40-PER-STR-DATE (WW03-LAST-DEL-SUB) 45540020 451400 END-IF 45140008 451500 45150008 451600 END-IF 45160008 451700 45170008 452010 SET WT61-IX UP BY 1 45201011 451800 END-IF 45180008 451900 45190008 452000 END-PERFORM 45200008 452100 . 45210008 452200 B-463-EXIT. 45220008 452300 EXIT. 45230008 452400 45240008 452500/ 45250000 169000 B-475-SET-ANTIC-WASTE-SALES SECTION. 16900000 *---------------------------------------------------------------* 169200* SECTION NAME : B-475-SET-ANTIC-WASTE-SALES * 16920000 169300* CALLED BY : * 16930000 169400* CALLS : * 16940000 169500* FUNCTION : 1. FOR EACH PERIOD THAT CROSSES A CALENDAR * 16950000 169500* : DAY, CALCULATE THE ESTIMATED SALES FROM * 16950000 169500* : THE PERIOD START UP TO THE END OF DAY * 16950000 169500* : FOR USE WITHIN ANTICIPATED WASTE CALC'S * 16950000 169500* : IN F40 AND F50. * 16950000 169600*---------------------------------------------------------------* 16960000 169700 B-475. 16970000 428700* DISPLAY "B-475". 42870018 169900 16990000 169900 SET PROCESS-LOOP TO TRUE. 16990000 169900 MOVE 1 TO WX10-DATA-SUB1. 16990000 169900 MOVE 1 TO WX10-DATA-SUB2. 16990000 169900 PERFORM UNTIL END-PROCESS-LOOP 16990000 098400 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 09840000 098500 OR WX10-DATA-SUB1 > 75 09850000 098600 THEN 09860000 098700 SET END-PROCESS-LOOP TO TRUE 09870000 098800 ELSE 09880000 099900 PERFORM B-476-FIND-DAY-SALES 09990000 100400 ADD 1 TO WX10-DATA-SUB1 10040000 100700 END-IF 10070000 100800 END-PERFORM. 10080000 100900 10090000 168700 B-475-EXIT. 16870000 EXIT. 168900 16890000 169000 B-476-FIND-DAY-SALES SECTION. 16900000 *---------------------------------------------------------------* 169200* SECTION NAME : B-476-FIND-DAY-SALES * 16920000 169300* CALLED BY : * 16930000 169400* CALLS : * 16940000 169500* FUNCTION : 1. FOR EACH PERIOD THAT CROSSES A CALENDAR * 16950000 169500* : DAY, FIND THE ESTIMATED SALES FOR THE DAY * 16950000 169500* : AND APPLY THE PERD-PTP-TO-MIDNITE % TO * 16950000 169500* : DERIVE THE SALES TO MIDNIGHT FIGURE. * 16950000 169600*---------------------------------------------------------------* 16960000 169700 B-476. 16970000 101200 10120000 MOVE +0 TO JLF40-PERD-ANTIC-WASTE-SALES(WX10-DATA-SUB1). 169900 SET FIND-SALES TO TRUE. 16990000 101200 10120000 169900 PERFORM UNTIL SALES-FOUND 16990000 098400 IF JLF40-SALES-DATE(WX10-DATA-SUB2) = SPACES 09840000 098500 OR WX10-DATA-SUB2 > 50 09850000 098600 THEN 09860000 098700 SET SALES-FOUND TO TRUE 09870000 098800 ELSE 09880000 098900 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = 09890000 099000 JLF40-SALES-DATE(WX10-DATA-SUB2) 09900000 099300 THEN 09930000 COMPUTE JLF40-PERD-ANTIC-WASTE-SALES(WX10-DATA-SUB1) = (JLF40-DAY-FCST-SALES(WX10-DATA-SUB2) * WT10-PERD-PTP-TO-MIDNITE(WX10-DATA-SUB1)) / 100 098700 SET SALES-FOUND TO TRUE 09870000 099800 ELSE 09980000 100400 ADD 1 TO WX10-DATA-SUB2 10040000 100600 END-IF 10060000 100700 END-IF 10070000 100800 END-PERFORM. 10080000 100900 10090000 168700 B-476-EXIT. 16870000 EXIT. 168900 16890000 169000 B-500-RETRIEVE-BDL SECTION. 16900000 *---------------------------------------------------------------* 169200* SECTION NAME : B-500-RETRIEVE-BDL * 16920000 169300* CALLED BY : * 16930000 169400* CALLS : * 16940000 169500* FUNCTION : 1. OPENS, FETCHES AND CLOSES THE BDL CURSOR * 16950000 169600*---------------------------------------------------------------* 16960000 169700 B-500. 16970000 435300* DISPLAY "B-500". 43530018 169900 16990000 170000 SET NOT-MISSING-BDL TO TRUE. 17000000 170100 17010000 170200 MOVE WW01-START-DATE TO WW01-BDL-START-DATE. 17020000 170300 MOVE WW01-END-DATE TO WW01-BDL-END-DATE. 17030000 170400 17040000 170500 PERFORM V-400-OPEN-READNEXT-VXJJ0BDL. 17050000 170600 PERFORM V-410-FETCH-READNEXT-VXJJ0BDL. 17060000 170700 IF END-BDL 17070000 170800 THEN 17080000 170801 PERFORM V-420-CLOSE-READNEXT-VXJJ0BDL 17080100 170802 GO TO B-500-EXIT 17080200 170803 END-IF. 17080300 170804 17080400 170805 SET PROCESS-LOOP TO TRUE. 17080500 170806 MOVE 1 TO WX10-DATA-SUB1. 17080600 170807 PERFORM UNTIL END-PROCESS-LOOP 17080700 170808 IF NOT BDL-DEV-LINE-ENDT-NU 17080800 170809 THEN 17080900 170810 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) >= 17081000 170820 BDL-DEV-LINE-STDT AND 17082000 170830 JLF40-PER-STR-DATE(WX10-DATA-SUB1) <= 17083000 170840 BDL-DEV-LINE-ENDT 17084000 170850 THEN 17085000 170860* MOVE BDL-DEV-LINE-SIZE 17086026 170861 MOVE "Y" 17086126 170870 TO JLF40-DEV-LINE-IND(WX10-DATA-SUB1) 17087000 170880 END-IF 17088000 170890 ELSE 17089000 170900 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) >= 17090000 171000 BDL-DEV-LINE-STDT 17100000 171100 THEN 17110000 171200* MOVE BDL-DEV-LINE-SIZE 17120026 171210 MOVE "Y" 17121026 171300 TO JLF40-DEV-LINE-IND(WX10-DATA-SUB1) 17130000 171400 END-IF 17140000 171500 END-IF 17150000 171600 17160000 171700 IF NOT BDL-DEV-LINE-ENDT-NU 17170000 171800 THEN 17180000 171900 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) < 17190000 172000 BDL-DEV-LINE-STDT 17200000 172100 OR JLF40-PER-STR-DATE(WX10-DATA-SUB1) > 17210000 172200 BDL-DEV-LINE-ENDT 17220000 172300 THEN 17230000 172400 MOVE "N" 17240000 172500 TO JLF40-DEV-LINE-IND(WX10-DATA-SUB1) 17250000 172600 END-IF 17260000 172700 ELSE 17270000 172800 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) < 17280000 172900 BDL-DEV-LINE-STDT 17290000 173000 THEN 17300000 173100 MOVE "N" 17310000 173200 TO JLF40-DEV-LINE-IND(WX10-DATA-SUB1) 17320000 173300 END-IF 17330000 173400 END-IF 17340000 173500 17350000 173600 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) = 17360000 173700 BDL-DEV-LINE-ENDT 17370000 173800 THEN 17380000 173900 IF NOT-END-BDL 17390000 174000 THEN 17400000 174100 PERFORM V-410-FETCH-READNEXT-VXJJ0BDL 17410000 174200 END-IF 17420000 174300 END-IF 17430000 174400 17440000 174500 ADD 1 TO WX10-DATA-SUB1 17450000 174600 IF WX10-DATA-SUB1 > 50 17460000 174700 OR JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 17470000 174800 THEN 17480000 174900 SET END-PROCESS-LOOP TO TRUE 17490000 175000 END-IF 17500000 175100 17510000 175200 END-PERFORM. 17520000 175300 17530000 175400 PERFORM V-420-CLOSE-READNEXT-VXJJ0BDL. 17540000 175500 17550000 175600 B-500-EXIT. 17560000 EXIT. 175800 17580000 175900 B-550-RETRIEVE-OLD SECTION. 17590000 *---------------------------------------------------------------* 176100* SECTION NAME : B-550-RETRIEVE-OLD * 17610000 176200* CALLED BY : * 17620000 176300* CALLS : * 17630000 176400* FUNCTION : 1. OPENS, FETCHES AND CLOSES THE OLD CURSOR * 17640000 *---------------------------------------------------------------* 176600 B-550. 17660000 444200* DISPLAY "B-550". 44420018 176620 INITIALIZE WT40-OLD-CURSOR-DATA. 17662000 176630 SET NOT-MISSING-OLD TO TRUE. 17663000 176640 17664000 176650 MOVE ZEROES TO ZZD-ERROR-CODE 17665000 176660 MOVE "A" TO ZZD-FUNCTION-CODE 17666000 176670 MOVE "ISO" TO ZZD-DATE1-FORMAT 17667000 176680 MOVE WW01-START-DATE TO ZZD-DATE1 17668000 176690 MOVE "ISO" TO ZZD-DATE2-FORMAT 17669000 *-- GM - CHG 27/01/00 ----------------------------------------* 176700 IF BPR-MIN-SHELF-LIFE > 10 17670019 176800 THEN 17680000 176900 MOVE -21 TO WW01-DIFF-IN-DAYS 17690000 177000 ELSE 17700000 177100 COMPUTE WW01-DIFF-IN-DAYS = 17710000 177200 +0 - (BPR-MIN-SHELF-LIFE * 2) END-IF *-------------------------------------------------------------* 177500 MOVE WW01-DIFF-IN-DAYS TO ZZD-DIFF-IN-DAYS. 17750000 177600 17760000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 177800 17780000 177800 17780000 177900 IF ZZD-ERROR-CODE NOT = ZEROES 17790000 178000 THEN 17800000 178100 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 17810000 SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 17820000 178300 PERFORM JLMSG-DISPLAY-MESSAGE 17830000 178400 ELSE 17840000 178500 MOVE ZZD-DATE2 TO WW01-OLD-START-DATE 17850000 178600 END-IF 17860000 178700 17870000 178800 MOVE "2099-12-31" TO WW01-OLD-END-DATE. 17880000 178900 17890000 338800 MOVE WW01-CURR-PART-NO TO OLD-CR-PART-NO. 33880001 338900 MOVE WW01-CURR-RO-NO TO OLD-RO-NO. 33890001 339000 MOVE WW01-CURR-BPR-TPN TO OLD-BPR-TPN. 33900001 339100 33910000 179000 PERFORM V-300-OPEN-READNEXT-VXJJ0OLD. 17900000 179100 PERFORM V-310-FETCH-READNEXT-VXJJ0OLD. 17910000 339400* 33940001 339500* * CAW IF IT IS AN "MU" THEN CHECK FOR ALT TPN 33950001 339600* 33960001 339700 IF BPR-BPR-TRANS-EXCN = "Y" 33970001 339800 AND END-OLD 33980001 339900 PERFORM B-555-CHECK-MU 33990001 340000 END-IF. 34000000 179200 17920000 179300 IF END-OLD 17930000 179500 PERFORM V-320-CLOSE-READNEXT-VXJJ0OLD 17950000 179600 GO TO B-550-EXIT 17960000 179700 END-IF. 17970000 179800 17980000 179900 SET PROCESS-LOOP TO TRUE. 17990000 SUM10B SET OLC-CLOSED TO TRUE. 17990000 313300 MOVE 1 TO WX10-DATA-SUB1. 31330000 180100 18010000 180200 PERFORM UNTIL END-PROCESS-LOOP 18020000 313800* * IF NO OLD CODE LIFE GET OLC 31380001 313900 IF WW-OLD-CD-LIFE-NULL 31390000 314000 PERFORM V-340-OPEN-OLC 31400000 314100 PERFORM V-350-READNEXT-OLC 31410000 314200 END-IF 31420000 314300* * LOOP GETTING OLC"S 31430000 314400 IF WW-OLD-CD-LIFE-NULL 31440000 314500 AND OLC-CD-LIFE < 999 31450000 SUM10B INITIALIZE WT41-OLD-TEMP-CURSOR-DATA 17662000 SUM10B WT42-OLC-TEMP-CURSOR-DATA 17662000 SUM10B WA01-OLC-PICK-QTY-SUM 17662000 SUM10B WA01-OLD-REVSD-QTY-SUM 17662000 314700 PERFORM B-560-MOVE-HEAD 31470000 SUM10B SUM10B MOVE +1 TO WX41-OLD-SUB2 SUM10B WX42-OLC-SUB1 SUM10B WX41-OLD-SUB-COUNT SUM10B SUM10B MOVE +0 TO WX42-OLC-SUB-COUNT SUM10B WX41-OLD-LAST-SUB SUM10B SUM10B MOVE OLD-REQ-DEL-DT TO WD01-PREV-REQ-DEL-DT SUM10B MOVE OLD-ORD-TYPE TO WW01-PREV-ORD-TYPE SUM10B MOVE WX10-DATA-SUB1 TO WX41-OLD-TEMP-SUB2 SUM10B PERFORM B-561-BUILD-OLD-ARRAY SUM10B SUM10B SET NO-OLD-DATE-CHANGE TO TRUE SUM10B PERFORM UNTIL OLD-DATE-CHANGE SUM10B OR END-OLD SUM10B* BUILD WT40 & WT41(TEMP OLD) ARRAY UNTIL, DATE CHANGES. SUM10B PERFORM V-310-FETCH-READNEXT-VXJJ0OLD 31650000 SUM10B IF NOT END-OLD SUM10B IF ((OLD-REQ-DEL-DT NOT = SUM10B WD01-PREV-REQ-DEL-DT) SUM10B OR (OLD-ORD-TYPE NOT = SUM10B WW01-PREV-ORD-TYPE)) SUM10B SET OLD-DATE-CHANGE TO TRUE SUM10B ELSE SUM10B ADD +1 TO WX10-DATA-SUB1 SUM10B WX41-OLD-SUB2 SUM10B WX41-OLD-SUB-COUNT SUM10B PERFORM B-560-MOVE-HEAD SUM10B PERFORM B-561-BUILD-OLD-ARRAY SUM10B MOVE OLD-REQ-DEL-DT TO SUM10B WD01-PREV-REQ-DEL-DT SUM10B MOVE OLD-ORD-TYPE TO SUM10B WW01-PREV-ORD-TYPE SUM10B END-IF SUM10B END-IF 315400 END-PERFORM 31540000 SUM10B 314600 PERFORM UNTIL OLC-CD-LIFE > 999 31460000 SUM10B IF WX41-OLD-SUB-COUNT = 1 SUM10B** ONLY MULTIPLE CODE-LIFE NO CAGE-SPLIT PRESENT.SO CREATE AS SUM10B** MANY WT40 ENTRIES FOR THAT REQ-DEL-DATE AS OLC ENTRIES. 314800 PERFORM B-570-MOVE-OLC 31480000 314900 PERFORM B-585-LOAD-TAB 31490000 315000 PERFORM V-350-READNEXT-OLC 31500000 SUM10B IF OLC-CD-LIFE < 999 31500000 SUM10B ADD 1 TO WX10-DATA-SUB1 31500000 SUM10B PERFORM B-563-MOVE-DELVRY 31500000 SUM10B END-IF 31500000 SUM10B ELSE 31500000 SUM10B** MULTIPLE CODE-LIFE PRESENT WITH MULTIPLE CAGE-SPLIT DELIVERIES. SUM10B** SO BUILD WT42 (TEMP OLC ARRAY) BEFORE CALLING B-564 PARA BELOW. SUM10B PERFORM B-562-BUILD-OLC-ARRAY SUM10B PERFORM V-350-READNEXT-OLC 315100 IF OLC-CD-LIFE < 999 31510000 315200 ADD 1 TO WX42-OLC-SUB1 31520000 315300 END-IF 31530000 SUM10B END-IF 315400 END-PERFORM 31540000 SUM10B 31500000 SUM10B IF WX41-OLD-SUB-COUNT > 1 31500000 SUM10B MOVE +0 TO WW01-BEST-FIT-RECS SUM10C WW01-MIX-MTCH-RECS SUM10C WW01-NEW-WT40-RECS SUM10B PERFORM B-564-CAGE-SPLIT-CDLIFE-ALLOC 31500000 SUM10B END-IF 31500000 SUM10B SUM10B ADD +1 TO WX10-DATA-SUB1 SUM10B 31500000 SUM10B 31500000 SUM10B MOVE +0 TO WX41-OLD-TEMP-SUB2 259800 ELSE 315600 PERFORM B-560-MOVE-HEAD 31560000 315700 PERFORM B-580-LOAD-OLD 31570000 315800 PERFORM B-585-LOAD-TAB 31580000 SUM10B* GET NEXT OLD 31640001 SUM10B PERFORM V-310-FETCH-READNEXT-VXJJ0OLD 31650000 SUM10B IF NOT END-OLD 31660000 SUM10B ADD 1 TO WX10-DATA-SUB1 31670000 SUM10B END-IF 18260000 263700 END-IF 316000* CLOSE OLC CURSOR 31600000 SUM10B IF OLC-OPEN 31610000 316200 PERFORM V-360-CLOSE-OLC 31620000 182600 END-IF 18260000 182700 18270000 296000 IF WX10-DATA-SUB1 > 126 18320000 183300 OR END-OLD 18330000 183500 SET END-PROCESS-LOOP TO TRUE 18350000 183600 END-IF 18360000 183700 18370000 183800 END-PERFORM. 18380000 183900 18390000 184000 PERFORM V-320-CLOSE-READNEXT-VXJJ0OLD. 18400000 184100 18410000 184200 B-550-EXIT. 18420000 303000 EXIT. 303100 18440000 345700 B-555-CHECK-MU SECTION. 34570001 345800******************************************************************34580000 345900* CHECK FOR ALTERNATE TPN IF MU BY CALLING MODULE JJ0009 *34590001 346000******************************************************************34600000 346100 34610001 346200 MOVE OLD-RO-NO TO JJ009-RO-NO 34620001 346300 MOVE OLD-BPR-TPN TO JJ009-BPR-TPN 34630001 346310 JJ009-VARIANT-TPN 34631001 346400 MOVE ZEROS TO JJ009-RETURN-CODE 34640001 346600 PERFORM XC-CALL-JJ009. 34660001 346700 34670001 346800 IF JJ009-RETURN-CODE NOT = 0 34680001 346900 DISPLAY "ERROR CALLING JJ0009 : STORE/PRODUCT = " 34690001 347000 JJ009-RO-NO "/" 34700001 347100 JJ009-BPR-TPN 34710001 347200 MOVE JJ009-OUT-SQLCA TO SQLCA 34720001 347300 MOVE "B-555-CHECK-MU SECTION" TO JLDB2E-PROCESS-NAME 34730001 347400 PERFORM JLDB2E-DB2-ERROR 34740001 347500 MOVE JJ009-RETURN-CODE TO WM-JJ0009-CODE 34750001 347600 MOVE WM28-JJ0009-ERROR TO JLMSG-TEXT 34760001 347700 PERFORM JLMSG-DISPLAY-MESSAGE 34770001 347800 END-IF. 34780001 347900* 34790001 348000 IF JJ009-VARIANT-TPN = JJ009-BPR-TPN 34800001 348100 GO TO B-555-EXIT 34810001 348200 END-IF. 34820001 348300* CLOSE PREV CURSOR 34830001 348400 PERFORM V-320-CLOSE-READNEXT-VXJJ0OLD. 34840001 348500* SET DIFF TPN 34850001 348510 DISPLAY "* VARIANT TPN FOUND FOR STORE " OLD-RO-NO 34851001 348600 " TPN WAS " OLD-BPR-TPN 34860001 348610 " USING " JJ009-VARIANT-TPN. 34861001 348611* 34861101 348620 MOVE JJ009-VARIANT-TPN TO OLD-BPR-TPN. 34862001 348700* OPEN CURSOR ON ALT TPN 34870001 348800 PERFORM V-300-OPEN-READNEXT-VXJJ0OLD. 34880001 348900 PERFORM V-310-FETCH-READNEXT-VXJJ0OLD. 34890001 349000* 34900001 349100 B-555-EXIT. 34910001 349200 EXIT. 34920001 180300 18030000 318200 B-560-MOVE-HEAD SECTION. 31820000 318300******************************************************************31830001 318310* MOVE OLD BITS TO TABLE AND CODE LIFE INTO DATE *31831001 318320******************************************************************31832001 * DISPLAY "B-560-MOVE-HEAD" 318400 MOVE OLD-REQ-DEL-DT 31840000 318500 TO WT40-REQ-DEL-DATE(WX10-DATA-SUB1) 31850000 AUT08B WT40-BFFO-REQ-DEL-DATE(WX10-DATA-SUB1) 318600 MOVE OLD-ORD-TYPE 31860000 318700 TO WT40-ORDER-TYPE(WX10-DATA-SUB1) 31870000 318800 MOVE OLD-REVSD-ORD-QTY 31880000 318900 TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 31890000 MOVE ORD-REQ-DEL-TM TO WT40-REQ-DEL-TM(WX10-DATA-SUB1) 319000 MOVE OLD-REQ-DEL-DT TO ZZD-DATE1 31900000 319100 MOVE OLD-CD-LIFE TO ZZD-DIFF-IN-DAYS. 31910000 AUT09A MOVE ORD-ACT-DEL-DATE AUT09A TO WT40-ACT-DEL-DATE(WX10-DATA-SUB1) AUT09A MOVE ORD-ACT-DEL-TIME AUT09A TO WT40-ACT-DEL-TIME(WX10-DATA-SUB1) AB2S10 MOVE ORD-DELIVERY-STATUS AB2S10 TO WT40-ORD-DELIVERY-STS(WX10-DATA-SUB1) WIN06A PERFORM B-595-CHECK-DOTCOM-STORE 32680000 344701* 34470100 344702* CAW FIX EARLY CONFIRMATION OF ORDERS. 34470200 344703* 34470300 344710 IF ORD-ACT-DEL-DATE < OLD-REQ-DEL-DT 34471000 344720 MOVE ORD-ACT-DEL-DATE 34472000 344730 TO WT40-REQ-DEL-DATE(WX10-DATA-SUB1) 34473000 344740 END-IF. 34474000 319200 31920000 SUM10B B-561-BUILD-OLD-ARRAY SECTION. 31820000 SUM10B******************************************************************31830001 SUM10B* BUILD TEMPORARY OLD ARRAY, TO BE USED IN PROCESSING LATER. *31831001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-561-BUILD-OLD-ARRAY" SUM10B 34474000 SUM10B MOVE OLD-REVSD-ORD-QTY TO SUM10B WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10B MOVE WX10-DATA-SUB1 TO SUM10B WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10B MOVE "N" TO SUM10B WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) SUM10B ADD OLD-REVSD-ORD-QTY TO WA01-OLD-REVSD-QTY-SUM SUM10B . 31920000 SUM10B 31930000 SUM10B B-562-BUILD-OLC-ARRAY SECTION. 31820000 SUM10B******************************************************************31830001 SUM10B* BUILD TEMPORARY OLC ARRAY, TO BE USED IN PROCESSING LATER. *31831001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-562-BUILD-OLC-ARRAY" SUM10B 34474000 SUM10B MOVE OLC-PICK-QTY TO SUM10B WT42-OLC-PICK-QTY(WX42-OLC-SUB1) SUM10B MOVE OLC-CD-LIFE TO SUM10B WT42-OLC-CD-LIFE(WX42-OLC-SUB1) SUM10B MOVE "N" TO SUM10B WT42-OLC-MATCH-FOUND(WX42-OLC-SUB1) SUM10B ADD 1 TO WX42-OLC-SUB-COUNT SUM10B ADD OLC-PICK-QTY TO WA01-OLC-PICK-QTY-SUM SUM10B . 31920000 SUM10B 31920000 SUM10B B-563-MOVE-DELVRY SECTION. 31820000 SUM10B******************************************************************31830001 SUM10B* ONLY MULTIPLE CODE-LIFE NO CAGE-SPLIT PRESENT.SO CREATE AS 31831001 SUM10B* MANY WT40 ENTRIES FOR THAT REQ-DEL-DATE AS OLC ENTRIES. 31831001 SUM10B* TAKE THE FIRST WT40 ENTRY CREATED FOR THAT REQ-DEL-DATE AS 31831001 SUM10B* REFERENCE.AND KEEP ON REPLICATIN THEM FOR AS MANY OLC-ENTRIES 31831001 SUM10B* PRESENT, OLC-PICK-QTY WILL BE WRITTEN IN B-570 PARA. 31831001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-563-MOVE-DELVRY" 31820000 SUM10B 31832001 SUM10B MOVE WT40-REQ-DEL-DATE(WX41-OLD-TEMP-SUB2) 31840000 SUM10B TO WT40-REQ-DEL-DATE(WX10-DATA-SUB1) 31850000 SUM10B WT40-BFFO-REQ-DEL-DATE(WX10-DATA-SUB1) SUM10B MOVE WT40-ORDER-TYPE(WX41-OLD-TEMP-SUB2) 31860000 SUM10B TO WT40-ORDER-TYPE(WX10-DATA-SUB1) 31870000 SUM10B MOVE WT40-REVSD-ORD-QTY(WX41-OLD-TEMP-SUB2) 31880000 SUM10B TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 31890000 SUM10B MOVE WT40-REQ-DEL-DATE(WX41-OLD-TEMP-SUB2) 34472000 SUM10B TO WT40-REQ-DEL-DATE(WX10-DATA-SUB1) 34473000 SUM10B MOVE WT40-REQ-DEL-TM(WX41-OLD-TEMP-SUB2) SUM10B TO WT40-REQ-DEL-TM(WX10-DATA-SUB1) SUM10B MOVE WT40-ACT-DEL-DATE(WX41-OLD-TEMP-SUB2) SUM10B TO WT40-ACT-DEL-DATE(WX10-DATA-SUB1) SUM10B MOVE WT40-ACT-DEL-TIME(WX41-OLD-TEMP-SUB2) SUM10B TO WT40-ACT-DEL-TIME(WX10-DATA-SUB1) SUM10B MOVE WT40-ORD-DELIVERY-STS(WX41-OLD-TEMP-SUB2) SUM10B TO WT40-ORD-DELIVERY-STS(WX10-DATA-SUB1) SUM10B . 31920000 SUM10B 31930000 SUM10B B-564-CAGE-SPLIT-CDLIFE-ALLOC SECTION. 31820000 SUM10B******************************************************************31830001 SUM10B* MULTIPLE CODE-LIFE PRESENT WITH MULTIPLE CAGE-SPLIT DELIVERIES. 31831001 SUM10B* SORT OLD-TEMP TABLE (WT42) IN ASCENDING ORDER OF REVSD-ORD-QTY.31832001 SUM10B* THEN MATCH OLD & OLC TEMP TABLE TO SEE IF BEST MATCH IS FOUND. 31832001 SUM10B* IF MATCH FOUND, POPULATE CODE-LIFE FOR THAT ENTRY AND DONT 31832001 SUM10B* PROCESS THAT ENTRY FURTHER.IN CASE ALL OLD & OLC ENTRIES ARE 31832001 SUM10B* MATCHED WITH BEST FIT ALGORITHM, THEN GOOD NO NEED OF CALLING 31832001 SUM10B* COMPLEX LOGIC OF MIX & MATCH B/W OLD & OLC. 31832001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-564-CAGE-SPLIT-CDLIFE-ALLOC" SUM10B 31832001 SUM10B PERFORM B-565-SORT-INTRNL-TABLE 34474000 SUM10B PERFORM B-566-BESTFIT-CDLIFE-ALLOC SUM10B IF WX42-OLC-SUB-COUNT = WW01-BEST-FIT-RECS SUM10B* ALL RECORDS MATCHED , SO COMPLEX LOGIC NOT REQUIRED SUM10B CONTINUE SUM10B ELSE SUM10B MOVE +1 TO WX42-OLC-SUB1 SUM10B WX41-OLD-SUB2 SUM10B WX41-OLD-INIT-SUB SUM10B WX41-OLD-START-SUB SUM10B SUM10B SET NO-END-OF-INNER-LOOP TO TRUE SUM10B SET NO-REM-QTY-PROCESSED TO TRUE SUM10B SET FIRST-TIME-PROCESS TO TRUE SUM10B SET NO-ADJUST-VALUE-FND TO TRUE SUM10B SUM10B IF WA01-OLC-PICK-QTY-SUM = WA01-OLD-REVSD-QTY-SUM SUM10B CONTINUE SUM10B ELSE SUM10B* DIFF. FOUND BETWEEN OLD & OLC SUM FOR A REQ-DEL-DATE. THIS NEEDS SUM10B* TO BE FACTORED WHILE MATCHING OLD & OLC ORDER QUANTITIES. SUM10B SET ADJUST-VALUE-FND TO TRUE SUM10B COMPUTE WW01-OLD-ADJUST-QTY = WA01-OLC-PICK-QTY-SUM - SUM10B WA01-OLD-REVSD-QTY-SUM SUM10B END-IF SUM10B SUM10B PERFORM B-567-MIX-AND-MATCH-CDLIFE UNTIL SUM10B WX42-OLC-SUB1 > WX42-OLC-SUB-COUNT SUM10B END-IF SUM10B SUM10C**IF ALL RECORDS PROCESSED BY BEST-FIT & MIX-MATCH THEN CONINUE SUM10C**ELSE USE BRUTE-FORCE METHOD TO MATCH OLD & OLC ENTRIES. SUM10C IF (WX41-OLD-SUB-COUNT = (WW01-BEST-FIT-RECS + SUM10C WW01-MIX-MTCH-RECS)) SUM10C CONTINUE SUM10C ELSE SUM10C PERFORM B-572-BRUTE-FRCE-CDALLC SUM10C END-IF SUM10B SUM10C**CODE-LIFE HAS BEEN FOUND , EITHER BY BEST-MATCH , MIX & MATCH SUM10C**OR BRUTE-FORCE METHOD. SO IF MATCH FOUND CALL B-585 TO FIND SUM10C**CODE-DATE & POPULATE APPROPRIATE WT40 ENTRY. SUM10C**ELSE, IF MATCH NOT FOUND THAT MEANS OLD QUANTITIES ARE SUM10C**UN-ACCOUNTED FOR IN OLD, SO ZEROISE THOSE ENTRIES. SUM10B SUM10B MOVE WX10-DATA-SUB1 TO WX41-OLD-TEMP-SUB3 SUM10B PERFORM VARYING WX41-OLD-SUB2 FROM 1 BY 1 SUM10B UNTIL WX41-OLD-SUB2 > WX41-OLD-SUB-COUNT SUM10B IF WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) = "N" SUM10B COMPUTE ZZD-DIFF-IN-DAYS = BPR-MIN-SHELF-LIFE - 1 SUM10B MOVE "Y" TO SUM10B WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) SUM10C MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10C TO WX41-OLD-SUB6 SUM10C MOVE 0 TO SUM10C WT40-REVSD-ORD-QTY(WX41-OLD-SUB6) SUM10B ELSE SUM10B MOVE WT41-OLD-CODE-LIFE(WX41-OLD-SUB2) SUM10B TO ZZD-DIFF-IN-DAYS SUM10B END-IF SUM10B MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10B TO WX10-DATA-SUB1 SUM10B PERFORM B-595-CHECK-DOTCOM-STORE SUM10B PERFORM B-585-LOAD-TAB SUM10B ADD WT41-OLD-ADJUST-QTY(WX41-OLD-SUB2) TO SUM10B WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) SUM10B IF (WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) < 0) SUM10B MOVE +0 TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) SUM10B END-IF SUM10B END-PERFORM SUM10B SUM10B MOVE WX41-OLD-TEMP-SUB3 TO WX10-DATA-SUB1 SUM10B SUM10B . SUM10B 31930000 SUM10B B-565-SORT-INTRNL-TABLE SECTION. 34474000 SUM10B******************************************************************31830001 SUM10B* SORT OLD TEMP TABLE (WT41) IN ASCENDING ORDER OF REVSD-ORD-QTY.*31831001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-565-SORT-INTRNL-TABLE" 31832001 SUM10B 31832001 SUM10B PERFORM VARYING WX41-OLD-SORT1 SUM10B FROM 2 BY 1 SUM10B UNTIL WX41-OLD-SORT1 > WX41-OLD-SUB-COUNT SUM10B SUM10B SET PERFORM-LOOP TO TRUE SUM10B PERFORM VARYING WX41-OLD-SORT2 SUM10B FROM WX41-OLD-SORT1 BY -1 SUM10B UNTIL WX41-OLD-SORT2 = 1 SUM10B OR END-PERFORM-LOOP SUM10B IF (WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SORT2) SUM10B >= WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SORT2 - 1)) SUM10B SET END-PERFORM-LOOP TO TRUE SUM10B ELSE SUM10B MOVE WT41-OLD-TEMP-REC(WX41-OLD-SORT2) SUM10B TO WW01-OLD-CURSOR-TEMP-REC SUM10B MOVE WT41-OLD-TEMP-REC(WX41-OLD-SORT2 - 1) SUM10B TO WT41-OLD-TEMP-REC(WX41-OLD-SORT2) SUM10B MOVE WW01-OLD-CURSOR-TEMP-REC SUM10B TO WT41-OLD-TEMP-REC(WX41-OLD-SORT2 - 1) SUM10B END-IF SUM10B END-PERFORM SUM10B END-PERFORM SUM10B SUM10B . 34474000 SUM10B SUM10B B-566-BESTFIT-CDLIFE-ALLOC SECTION. 31820000 SUM10B******************************************************************31830001 SUM10B* SIMPLE MATCHING MATCHING LOGIC, TO SEE IF OLD-REVSD-ORD-QTY & *31831001 SUM10B* OLC-PICK-QTY MATCH.IF MATCH FOUND, CODE-LIFE IS COPIED. *31831001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-566-BESTFIT-CDLIFE-ALLOC" 31832001 SUM10B 34474000 SUM10B PERFORM VARYING WX42-OLC-SUB1 FROM 1 BY 1 SUM10B UNTIL WX42-OLC-SUB1 > WX42-OLC-SUB-COUNT SUM10B SUM10B SET NO-OLC-MATCH-FOUND TO TRUE SUM10B PERFORM VARYING WX41-OLD-SUB2 FROM 1 BY 1 SUM10B UNTIL OLC-MATCH-FOUND SUM10B OR WX41-OLD-SUB2 > WX41-OLD-SUB-COUNT SUM10B OR WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) > SUM10B WT42-OLC-PICK-QTY(WX42-OLC-SUB1) SUM10B IF ((WT42-OLC-PICK-QTY(WX42-OLC-SUB1) = SUM10B WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2)) SUM10B AND WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) = "N") SUM10B SET OLC-MATCH-FOUND TO TRUE SUM10B MOVE "Y" TO WT42-OLC-MATCH-FOUND(WX42-OLC-SUB1) SUM10B WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) SUM10B MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB1) SUM10B TO WT41-OLD-CODE-LIFE(WX41-OLD-SUB2) SUM10B COMPUTE WW01-BEST-FIT-RECS = WW01-BEST-FIT-RECS SUM10B + 1 SUM10B END-IF SUM10B END-PERFORM SUM10B END-PERFORM SUM10B . 31920000 SUM10B 31930000 SUM10B B-567-MIX-AND-MATCH-CDLIFE SECTION. 31820000 SUM10B******************************************************************31830001 SUM10B* LOGIC TO CHECK WHICH ALL COMBINATION OF OLD DELIVERIES WILL *31831001 SUM10B* FIT INTO AN OLC PICK QUANTITY BUCKET. ALSO ADJUSTMENT QUANTITY *31831001 SUM10B* NEEDS TO BE FACTORED IN, IN THIS ALGORITHM. *31831001 SUM10B******************************************************************31832001 SUM10B* DISPLAY "B-567-MIX-AND-MATCH-CDLIFE" 31832001 SUM10B 34474000 SUM10B IF WT42-OLC-MATCH-FOUND(WX42-OLC-SUB1) = "Y" SUM10B OR WT42-OLC-PICK-QTY(WX42-OLC-SUB1) = ZERO SUM10B SUM10B IF WT42-OLC-PICK-QTY(WX42-OLC-SUB1) = ZERO SUM10B MOVE "Y" TO WT42-OLC-MATCH-FOUND(WX42-OLC-SUB1) SUM10B END-IF SUM10B SUM10B ADD +1 TO WX42-OLC-SUB1 SUM10B MOVE +1 TO WX41-OLD-START-SUB SUM10B SET NO-END-OF-INNER-LOOP TO TRUE SUM10B SET NO-REM-QTY-PROCESSED TO TRUE SUM10B SET FIRST-TIME-PROCESS TO TRUE SUM10B ELSE SUM10B IF FIRST-TIME-PROCESS SUM10B MOVE WT42-OLC-PICK-QTY(WX42-OLC-SUB1) TO SUM10B WW01-OLC-REM-QTY SUM10B END-IF SUM10B PERFORM VARYING WX41-OLD-SUB2 SUM10B FROM WX41-OLD-START-SUB SUM10B BY 1 SUM10B UNTIL END-OF-INNER-LOOP SUM10B IF WX41-OLD-SUB2 <= WX41-OLD-SUB-COUNT SUM10B IF WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) = "Y" SUM10B CONTINUE SUM10B ELSE SUM10B MOVE WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10B TO WW01-CUR-OLD-QTY SUM10B COMPUTE WX41-OLD-SUB5 = WX41-OLD-SUB2 + 1 SUM10B SUM10B PERFORM VARYING WX41-OLD-SUB3 SUM10B FROM WX41-OLD-SUB5 SUM10B BY 1 SUM10B UNTIL WT41-OLD-MATCH-FOUND(WX41-OLD-SUB3) = "N" SUM10B OR WX41-OLD-SUB3 > WX41-OLD-SUB-COUNT SUM10B END-PERFORM SUM10B SUM10B IF WX41-OLD-SUB3 > WX41-OLD-SUB-COUNT SUM10B MOVE ZERO TO WW01-NEXT-OLD-QTY SUM10B ELSE SUM10B MOVE WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB3) SUM10B TO WW01-NEXT-OLD-QTY SUM10B END-IF SUM10B PERFORM B-568-ADJUST-QTY-CDLIFE-ALLOC SUM10B END-IF SUM10B ELSE SUM10B SET END-OF-INNER-LOOP TO TRUE SUM10B END-IF SUM10B END-PERFORM SUM10B SUM10B IF REM-QTY-PROCESSED SUM10B PERFORM B-569-FINAL-CDLIFE-ALLOC SUM10B END-IF SUM10B SUM10B IF NO-REM-QTY-PROCESSED SUM10B PERFORM B-571-MIXED-CDLIFE-ALLOC SUM10B END-IF SUM10B END-IF SUM10B . SUM10B SUM10B B-568-ADJUST-QTY-CDLIFE-ALLOC SECTION. SUM10B*---------------------------------------------------------------* 02870004 SUM10B* LOGIC TO CHECK IF CURRENT OLD QUANTITY CAN BE ACCOMMODATED IN * 02890004 SUM10B* THE OLC BUCKET. CONSIDER OLD ENTRY ONLY IF IT COMPLETELY FITS * 02890004 SUM10B* INTO OLC (WITH/WITHOUT ADJUSTMENT). OR IF CURRENT OLD ALONG * 02890004 SUM10B* NEXT UN-MATCHED OLD ENTRY CAN BE ACCOMMODATED INTO OLC BUCKET * SUM10B*---------------------------------------------------------------* 02910004 SUM10B* DISPLAY "B-568-ADJUST-QTY-CDLIFE-ALLOC" 02910004 SUM10B SUM10B IF ((WW01-NEXT-OLD-QTY > 0 AND SUM10B ((WW01-OLC-REM-QTY - WW01-CUR-OLD-QTY SUM10B >= WW01-NEXT-OLD-QTY) OR SUM10B (WW01-OLC-REM-QTY - WW01-CUR-OLD-QTY - SUM10B WW01-OLD-ADJUST-QTY >= WW01-NEXT-OLD-QTY))) SUM10B OR (WW01-OLC-REM-QTY - WW01-CUR-OLD-QTY = 0) SUM10B OR (WW01-OLC-REM-QTY - WW01-CUR-OLD-QTY - SUM10B WW01-OLD-ADJUST-QTY = 0)) SUM10B IF FIRST-TIME-PROCESS SUM10B MOVE WX41-OLD-SUB2 TO WX41-OLD-INIT-SUB SUM10B WX41-OLD-START-SUB SUM10B SET NO-FIRST-TIME-PROCESS TO TRUE SUM10B END-IF SUM10B SUM10B COMPUTE WX41-OLD-LAST-SUB = WX41-OLD-SUB2 * 1 SUM10B COMPUTE WW01-OLC-REM-QTY = WW01-OLC-REM-QTY - SUM10B WW01-CUR-OLD-QTY SUM10B MOVE "C" TO WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) SUM10B IF ((WW01-OLC-REM-QTY - (WW01-OLD-ADJUST-QTY) = 0) AND SUM10B ADJUST-VALUE-FND) SUM10B OR WW01-OLC-REM-QTY = 0 SUM10B MOVE "Y" TO WT42-OLC-MATCH-FOUND(WX42-OLC-SUB1) SUM10B SET REM-QTY-PROCESSED TO TRUE SUM10B SET END-OF-INNER-LOOP TO TRUE SUM10B IF ((WW01-OLC-REM-QTY - WW01-OLD-ADJUST-QTY = 0) AND SUM10B ADJUST-VALUE-FND) SUM10B SET NO-ADJUST-VALUE-FND TO TRUE SUM10B MOVE WW01-OLD-ADJUST-QTY TO SUM10B WT41-OLD-ADJUST-QTY(WX41-OLD-SUB2) SUM10B MOVE ZEROS TO WW01-OLD-ADJUST-QTY SUM10B WW01-OLC-REM-QTY SUM10B END-IF SUM10B END-IF SUM10B END-IF SUM10B . SUM10B SUM10B B-569-FINAL-CDLIFE-ALLOC SECTION. SUM10B*---------------------------------------------------------------* 02870004 SUM10B* COMBINATION OF OLD ENTRIES FOUND WHICH CAN FIT INTO OLC PICK * 02880004 SUM10B* QUANTITY COMPLETELY. SO SET STATUS OF THOSE RECORDS FROM * 02880004 SUM10B* CNFRMED TO MATCHED.ALSO MOVE OLC-CD-LIFE TO MATCHED OLD ENTRIES 02880004 SUM10B*---------------------------------------------------------------* 02910004 SUM10B* DISPLAY "B-569-FINAL-CDLIFE-ALLOC" SUM10B SUM10B PERFORM VARYING WX41-OLD-SUB4 FROM 1 BY 1 UNTIL SUM10B WX41-OLD-SUB4 > WX41-OLD-SUB-COUNT SUM10B IF WT41-OLD-MATCH-FOUND(WX41-OLD-SUB4) = "C" SUM10B MOVE "Y" TO WT41-OLD-MATCH-FOUND(WX41-OLD-SUB4) SUM10B MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB1) SUM10B TO WT41-OLD-CODE-LIFE(WX41-OLD-SUB4) SUM10C ADD +1 TO WW01-MIX-MTCH-RECS SUM10B END-IF SUM10B END-PERFORM SUM10B SUM10B . SUM10B 319400 B-570-MOVE-OLC SECTION. 31940001 319410******************************************************************31941001 * MOVE OLC BITS TO TABLE 319430******************************************************************31943001 * DISPLAY "B-570-MOVE-OLC" 319440 MOVE OLC-CD-LIFE TO ZZD-DIFF-IN-DAYS. 31944000 WIN06A 32680000 WIN06A PERFORM B-595-CHECK-DOTCOM-STORE 32680000 319500* 31950000 319600 IF ORD-END-OF-WAVE-IND = "Y" 31960000 319700 IF NOT WW-OLC-PICK-QTY-NULL 31970000 319800 MOVE OLC-PICK-QTY TO 31980000 319900 WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 31990000 320000 END-IF 32000000 320100 END-IF 32010000 320200 32020000 320300 IF ORD-END-OF-WAVE-IND = "N" 32030000 320400 AND NOT WW-OLD-APPRT-ORD-QTY-NULL 32040000 320500 AND OLD-APPRT-ORD-QTY > OLD-REVSD-ORD-QTY 32050000 320600 PERFORM B-590-CHECK-EXTRA-APPRT 32060000 320700 MOVE OLC-PICK-QTY TO 32070000 320800 WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 32080000 320900 ELSE 32090000 321000 IF (NOT WW-OLC-PICK-QTY-NULL) 32100000 321100 MOVE OLC-PICK-QTY TO 32110000 321200 WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 32120000 321300 END-IF 32130000 321400 END-IF. 32140000 321500 32150000 SUM10B B-571-MIXED-CDLIFE-ALLOC SECTION. SUM10B*---------------------------------------------------------------* 02870004 319420* CURRENT COMBINATION OF OLD DOESN'T FIT INTO OLC BUCKET. SO *31942001 319420* IGNORE THE MOST RECENTLY MATCHED OLD ENTRY, AND START MATCHING *31942001 319420* FROM NEXT OLD RECORD ONWARDS. *31942001 SUM10B*---------------------------------------------------------------* 02910004 SUM10B* DISPLAY "B-571-MIXED-CDLIFE-ALLOC" SUM10B SUM10B IF (WX41-OLD-LAST-SUB > 0 SUM10B AND WT41-OLD-MATCH-FOUND(WX41-OLD-LAST-SUB) NOT= "Y") SUM10B MOVE "N" TO WT41-OLD-MATCH-FOUND(WX41-OLD-LAST-SUB) SUM10B COMPUTE WW01-OLC-REM-QTY = WW01-OLC-REM-QTY + SUM10B WT41-OLD-REVSD-ORD-QTY(WX41-OLD-LAST-SUB) SUM10B END-IF SUM10B SUM10B SET NO-END-OF-INNER-LOOP TO TRUE SUM10B SUM10B IF (WX41-OLD-LAST-SUB = WX41-OLD-INIT-SUB SUM10B AND WT41-OLD-MATCH-FOUND(WX41-OLD-LAST-SUB) NOT= "Y") SUM10B MOVE "N" TO WT41-OLD-MATCH-FOUND(WX41-OLD-INIT-SUB) SUM10B ADD +1 TO WX41-OLD-INIT-SUB SUM10B MOVE WX41-OLD-INIT-SUB TO WX41-OLD-START-SUB SUM10B SET FIRST-TIME-PROCESS TO TRUE SUM10B ELSE SUM10B IF WX41-OLD-LAST-SUB > WX41-OLD-INIT-SUB SUM10B MOVE WX41-OLD-LAST-SUB TO WX41-OLD-START-SUB SUM10B END-IF SUM10B ADD +1 TO WX41-OLD-START-SUB SUM10B IF WX41-OLD-START-SUB > WX41-OLD-SUB-COUNT SUM10B MOVE "N" TO WT42-OLC-MATCH-FOUND(WX42-OLC-SUB1) SUM10B COMPUTE WX42-OLC-SUB1 = WX42-OLC-SUB1 + 1 SUM10B MOVE +1 TO WX41-OLD-START-SUB SUM10B SET FIRST-TIME-PROCESS TO TRUE SUM10B ELSE SUM10B IF WX41-OLD-LAST-SUB > WX41-OLD-INIT-SUB SUM10B PERFORM VARYING WX41-OLD-SUB6 SUM10B FROM WX41-OLD-LAST-SUB SUM10B BY -1 SUM10B UNTIL WT41-OLD-MATCH-FOUND(WX41-OLD-SUB6) = "C" SUM10B OR WX41-OLD-SUB6 = 0 SUM10B END-PERFORM SUM10B MOVE WX41-OLD-SUB6 TO WX41-OLD-LAST-SUB SUM10B END-IF SUM10B END-IF SUM10B END-IF SUM10B . SUM10C SUM10C B-572-BRUTE-FRCE-CDALLC SECTION. SUM10C*----------------------------------------------------------------*02870004 SUM10C**MATCH NOT FOUND USING BEST-FIT OR MIX-N-MATCH BY TRYING TO *31942001 SUM10C**INSERT OLD ENTRIES INTO OLC. SO USE BRUTE FORCE METHOD OF *31942001 SUM10C**ALLOCATING CODE-LIFE FOR OLD ENTRIES FROM OLC ENTRIES. *31942001 SUM10C**---------------------------------------------------------------*02910004 SUM10C* DISPLAY "B-572-BRUTE-FRCE-CDALLC" SUM10C SUM10C MOVE +1 TO WX41-OLD-SUB3 SUM10C WX42-OLC-SUB3 SUM10C PERFORM B-573-FIND-NEXT-OLD SUM10C PERFORM B-574-FIND-NEXT-OLC SUM10C SUM10C MOVE +0 TO WW01-DIFF-QTY SUM10C WW01-DIFF-QTY1 SUM10C SET NO-DIFF-VALUE-FND TO TRUE SUM10C PERFORM UNTIL END-OF-INNER-LOOP SUM10C SUM10C IF NO-DIFF-VALUE-FND SUM10C COMPUTE WW01-DIFF-QTY = SUM10C WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10C - WW01-OLC-REM-QTY SUM10C MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB2) SUM10C TO WT41-OLD-CODE-LIFE(WX41-OLD-SUB2) SUM10C MOVE "Y" TO SUM10C WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) SUM10C SET DIFF-VALUE-FND TO TRUE SUM10C IF (WW01-DIFF-QTY >= 0) SUM10C SUBTRACT WW01-DIFF-QTY FROM SUM10C WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10C MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10C TO WX41-OLD-SUB6 SUM10C MOVE WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) TO SUM10C WT40-REVSD-ORD-QTY(WX41-OLD-SUB6) SUM10C PERFORM B-574-FIND-NEXT-OLC SUM10C ELSE SUM10C SUBTRACT WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10C FROM WW01-OLC-REM-QTY SUM10C PERFORM B-573-FIND-NEXT-OLD SUM10C END-IF SUM10C ELSE SUM10C IF (WW01-DIFF-QTY >= 0) SUM10C ADD 1 TO WX10-DATA-SUB1 SUM10C WW01-NEW-WT40-RECS SUM10C MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10C TO WX41-OLD-TEMP-SUB2 SUM10C PERFORM B-563-MOVE-DELVRY SUM10C MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB2) SUM10C TO ZZD-DIFF-IN-DAYS SUM10C PERFORM B-585-LOAD-TAB SUM10C IF (WW01-DIFF-QTY <= WW01-OLC-REM-QTY) SUM10C MOVE WW01-DIFF-QTY SUM10C TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) SUM10C SUBTRACT WW01-DIFF-QTY FROM WW01-OLC-REM-QTY SUM10C MOVE +0 TO WW01-DIFF-QTY SUM10C SET NO-DIFF-VALUE-FND TO TRUE SUM10C PERFORM B-573-FIND-NEXT-OLD SUM10C ELSE SUM10C SUBTRACT WW01-OLC-REM-QTY FROM WW01-DIFF-QTY SUM10C MOVE WW01-OLC-REM-QTY SUM10C TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) SUM10C PERFORM B-574-FIND-NEXT-OLC SUM10C END-IF SUM10C ELSE SUM10C COMPUTE WW01-DIFF-QTY1 = WW01-DIFF-QTY * -1 SUM10C MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB2) SUM10C TO WT41-OLD-CODE-LIFE(WX41-OLD-SUB2) SUM10C MOVE "Y" TO SUM10C WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) SUM10C IF (WW01-DIFF-QTY1 <= SUM10C WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2)) SUM10C ADD 1 TO WX10-DATA-SUB1 SUM10C WW01-NEW-WT40-RECS SUM10C MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10C TO WX41-OLD-TEMP-SUB2 SUM10C PERFORM B-563-MOVE-DELVRY SUM10C MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB2) SUM10C TO ZZD-DIFF-IN-DAYS SUM10C PERFORM B-585-LOAD-TAB SUM10C MOVE WW01-DIFF-QTY1 SUM10C TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) SUM10C SUBTRACT WW01-DIFF-QTY1 FROM SUM10C WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10C MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10C TO WX41-OLD-SUB6 SUM10C MOVE WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) TO SUM10C WT40-REVSD-ORD-QTY(WX41-OLD-SUB6) SUM10C MOVE +0 TO WW01-DIFF-QTY SUM10C SET NO-DIFF-VALUE-FND TO TRUE SUM10C PERFORM B-574-FIND-NEXT-OLC SUM10C ELSE SUM10C SUBTRACT WT41-OLD-REVSD-ORD-QTY(WX41-OLD-SUB2) SUM10C FROM WW01-OLC-REM-QTY SUM10C MOVE +0 TO WW01-DIFF-QTY SUM10C SET NO-DIFF-VALUE-FND TO TRUE SUM10C PERFORM B-573-FIND-NEXT-OLD SUM10C END-IF SUM10C END-IF SUM10C SUM10C END-IF SUM10C END-PERFORM SUM10C SUM10C IF ((WW01-OLC-REM-QTY > 0) OR SUM10C WX42-OLC-SUB2 < WX42-OLC-SUB-COUNT) SUM10C SET NO-END-OF-INNER-LOOP TO TRUE SUM10C SUBTRACT 1 FROM WX41-OLD-SUB2 SUM10C END-IF SUM10C* SUM10C PERFORM UNTIL END-OF-INNER-LOOP SUM10C IF (WW01-OLC-REM-QTY > 0) SUM10C ADD 1 TO WX10-DATA-SUB1 SUM10C WW01-NEW-WT40-RECS SUM10C MOVE WT41-OLD-WT40-POSN(WX41-OLD-SUB2) SUM10C TO WX41-OLD-TEMP-SUB2 SUM10C PERFORM B-563-MOVE-DELVRY SUM10C MOVE WT42-OLC-CD-LIFE(WX42-OLC-SUB2) SUM10C TO ZZD-DIFF-IN-DAYS SUM10C PERFORM B-585-LOAD-TAB SUM10C MOVE WW01-OLC-REM-QTY TO SUM10C WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) SUM10C END-IF SUM10C PERFORM B-574-FIND-NEXT-OLC SUM10C END-PERFORM SUM10C . SUM10C SUM10C B-573-FIND-NEXT-OLD SECTION. SUM10C*----------------------------------------------------------------*02870004 SUM10C* FIND NEXT UN-MATCHED OLD-ENTRY *31942001 SUM10C*----------------------------------------------------------------*02910004 SUM10C* DISPLAY "B-573-FIND-NEXT-OLD" SUM10C SUM10C PERFORM VARYING WX41-OLD-SUB2 FROM WX41-OLD-SUB3 BY 1 SUM10C UNTIL WT41-OLD-MATCH-FOUND(WX41-OLD-SUB2) = "N" SUM10C OR WX41-OLD-SUB2 > WX41-OLD-SUB-COUNT SUM10C END-PERFORM SUM10C SUM10C IF (WX41-OLD-SUB2 > WX41-OLD-SUB-COUNT) SUM10C SET END-OF-INNER-LOOP TO TRUE SUM10C ELSE SUM10C COMPUTE WX41-OLD-SUB3 = WX41-OLD-SUB2 + 1 SUM10C SET NO-END-OF-INNER-LOOP TO TRUE SUM10C END-IF SUM10C . SUM10C SUM10C B-574-FIND-NEXT-OLC SECTION. SUM10C*----------------------------------------------------------------*02870004 SUM10C* FIND NEXT UN-MATCHED OLC-ENTRY *31942001 SUM10C*----------------------------------------------------------------*02910004 SUM10C* DISPLAY "B-574-FIND-NEXT-OLC" SUM10C SUM10C PERFORM VARYING WX42-OLC-SUB2 FROM WX42-OLC-SUB3 BY 1 SUM10C UNTIL WT42-OLC-MATCH-FOUND(WX42-OLC-SUB2) = "N" SUM10C OR WX42-OLC-SUB2 > WX42-OLC-SUB-COUNT SUM10C END-PERFORM SUM10C SUM10C IF (WX42-OLC-SUB2 > WX42-OLC-SUB-COUNT) SUM10C MOVE 0 TO WW01-OLC-REM-QTY SUM10C SET END-OF-INNER-LOOP TO TRUE SUM10C ELSE SUM10C COMPUTE WX42-OLC-SUB3 = WX42-OLC-SUB2 + 1 SUM10C SET NO-END-OF-INNER-LOOP TO TRUE SUM10C MOVE WT42-OLC-PICK-QTY(WX42-OLC-SUB2) SUM10C TO WW01-OLC-REM-QTY SUM10B END-IF SUM10B . 321500 32150000 321600 B-580-LOAD-OLD SECTION. 32160000 321610******************************************************************32161001 321620* MOVE OLD AS THERE ISNT ANY OLC INTO TABLE *32162001 321630******************************************************************32163001 321700* 32170000 321800 IF ORD-END-OF-WAVE-IND = "Y" 32180000 SPR11B IF PICKEXP-PROCESSING SPR11B SET WI-POS-NOT-FOUND TO TRUE SPR11B IF NOT ORD-INV-NO-NU AND 05641003 SPR11B (ORD-LOAD-CLOSE-DT = "0001-01-01" ) 05641102 SPR11B PERFORM VZA-OBTAIN-DIST-QTY SPR11B IF WI-POS-FOUND SPR11B PERFORM VZB-OBTAIN-REVSD-ORD-QTY SPR11B END-IF SPR11B END-IF SPR11B END-IF 321900 MOVE OLD-REVSD-ORD-QTY TO 32190000 322000 WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 32200000 322100 END-IF 32210000 322200 32220000 322300************************************************************* 32230000 322400 IF ORD-END-OF-WAVE-IND = "N" 32240000 322500 IF (NOT WW-OLD-APPRT-ORD-QTY-NULL) 32250000 322600 IF OLD-REVSD-ORD-QTY > OLD-APPRT-ORD-QTY 32260000 322700 MOVE OLD-REVSD-ORD-QTY TO 32270000 322800 WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 32280000 322900 ELSE 32290000 323000 MOVE OLD-APPRT-ORD-QTY TO 32300000 323100 WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 32310000 323200 END-IF 32320000 323300 ELSE 32330000 AUT06D MOVE OLD-REVSD-ORD-QTY TO AUT06D WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 323900 END-IF 32390000 324000 END-IF. 32400000 324100 32410000 324200 B-585-LOAD-TAB SECTION. 32420000 324210******************************************************************32421001 324220* BACK END PIECE OF THE TABLE LOAD USING THE CODE LIFE *32422001 324230******************************************************************32423001 AUT09A* DISPLAY "B-585-LOAD-TAB". AUT09A MOVE WX10-DATA-SUB1 TO WX90-WT90-SUB2 AUT09A* DISPLAY "ZZD-DATE1 : " ZZD-DATE1 AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB2) > ZZD-DATE1 AUT09A OR WX90-WT90-SUB2 > WX90-WT90-MAX AUT09A MOVE 1 TO WX90-WT90-SUB2 AUT09A END-IF 324300 32430000 AUT09A SET DATE-NOT-FOUND TO TRUE AUT09A AUT09A PERFORM VARYING WX90-WT90-SUB2 FROM WX90-WT90-SUB2 BY 1 AUT09A UNTIL WX90-WT90-SUB2 > WX90-WT90-MAX AUT09A OR DATE-FOUND AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB2) = ZZD-DATE1 AUT09A ADD ZZD-DIFF-IN-DAYS TO WX90-WT90-SUB2 AUT09A IF WX90-WT90-SUB2 > 0 AND <= WX90-WT90-MAX AUT09A MOVE WT90-ISO-FORMAT (WX90-WT90-SUB2) AUT09A TO ZZD-DATE2 AUT09A SET DATE-FOUND TO TRUE AUT09A* DISPLAY "DATE-FOUND" AUT09A END-IF AUT09A END-IF AUT09A END-PERFORM AUT09A AUT09A IF DATE-NOT-FOUND AUT09A* DISPLAY "DATE-NOT-FOUND B-585" AUT09A MOVE ZEROES TO ZZD-ERROR-CODE 32440000 AUT09A MOVE "A" TO ZZD-FUNCTION-CODE 32450000 AUT09A MOVE "ISO" TO ZZD-DATE1-FORMAT 32460000 AUT09A MOVE "ISO" TO ZZD-DATE2-FORMAT 32470000 324800*---------------------------------------------------------------* 32480000 324900*---THE CODE LIFE IS STORED ON THE OLD TABLE MINUS 1 DAY SUCH---* 32490000 325000*---THAT THE VALUE CAN BE ADDED DIRECTLY TO THE DELIVERY DATE---* 32500000 325100*---TO PROVIDE THE CORRECT EXPIRY DATE--------------------------* 32510000 325200*---------------------------------------------------------------* 32520000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 326200 32620000 AUT09A IF ZZD-ERROR-CODE NOT = 00 32540000 AUT09A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 32550000 AUT09A MOVE WM05-JL0F32-ERROR AUT09A TO JLMSG-TEXT AUT09A DISPLAY "B550-2 ZZD-DAT=" ZZDAT-PARM "=" 32570000 AUT09A PERFORM JLMSG-DISPLAY-MESSAGE 32580000 AUT09A END-IF 32610000 AUT09A END-IF 32610000 AUT09A* DISPLAY "ZZD-DATE2 : " ZZD-DATE2 AUT09A MOVE ZZD-DATE2 TO AUT09A WT40-CODE-DATE(WX10-DATA-SUB1) 326200 32620000 AUT09A MOVE OLD-REQ-DEL-DT TO WW01-PREV-OLD-REQ-DEL-DT. 32630000 326400 32640000 326500 B-585-EXIT. 32650000 326600 EXIT. 32660000 326700 32670000 326800 B-590-CHECK-EXTRA-APPRT SECTION. 32680000 297400*---------------------------------------------------------------* 18460000 327000* SECTION NAME : B-590-EXTRA-APPORTIONED * 32700000 297600* CALLED BY : B-550 * 18480000 297700* CALLS : * 18490000 297800* FUNCTION : 1. INSERTS ENTRY FOR APPORTIONED QTY ABOVE * 18500000 297900* : THE REVISED AMOUNT. * 18510000 298000*---------------------------------------------------------------* 18530000 327600 B-590. 32760000 298200 298300 IF OLD-REQ-DEL-DT NOT = WW01-PREV-OLD-REQ-DEL-DT 298400 AND WX10-DATA-SUB1 < 126 298500 SUBTRACT OLD-REVSD-ORD-QTY FROM OLD-APPRT-ORD-QTY 298600 GIVING WT40-REVSD-ORD-QTY(WX10-DATA-SUB1) 298700 MOVE ZEROES TO ZZD-ERROR-CODE 298800 MOVE "A" TO ZZD-FUNCTION-CODE 298900 MOVE -1 TO ZZD-DIFF-IN-DAYS 299000 MOVE "ISO" TO ZZD-DATE1-FORMAT 299100 MOVE OLD-REQ-DEL-DT TO ZZD-DATE1 299200 MOVE "WF" TO ZZD-DATE2-FORMAT SPR14B PERFORM ZA-CALL-JL0F32 10860000 299400 299400 299500 IF ZZD-ERROR-CODE NOT = 00 299600 THEN 299700 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 299900 PERFORM JLMSG-DISPLAY-MESSAGE 300000 END-IF 300100 EVALUATE ZZD-DATE2(7:1) 300200 WHEN "1" 300300 IF BPR-EXP-SHELF-LIFE-1 > 0 300400 MOVE BPR-EXP-SHELF-LIFE-1 TO ZZD-DIFF-IN-DAYS 300500 ELSE 300600 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 300700 END-IF 300800 WHEN "2" 300900 IF BPR-EXP-SHELF-LIFE-2 > 0 301000 MOVE BPR-EXP-SHELF-LIFE-2 TO ZZD-DIFF-IN-DAYS 301100 ELSE 301200 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 301300 END-IF 301400 WHEN "3" 301500 IF BPR-EXP-SHELF-LIFE-3 > 0 301600 MOVE BPR-EXP-SHELF-LIFE-3 TO ZZD-DIFF-IN-DAYS 301700 ELSE 301800 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 301900 END-IF 302000 WHEN "4" 302100 IF BPR-EXP-SHELF-LIFE-4 > 0 302200 MOVE BPR-EXP-SHELF-LIFE-4 TO ZZD-DIFF-IN-DAYS 302300 ELSE 302400 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 302500 END-IF 302600 WHEN "5" 302700 IF BPR-EXP-SHELF-LIFE-5 > 0 302800 MOVE BPR-EXP-SHELF-LIFE-5 TO ZZD-DIFF-IN-DAYS 302900 ELSE 303000 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 303100 END-IF 303200 WHEN "6" 303300 IF BPR-EXP-SHELF-LIFE-6 > 0 303400 MOVE BPR-EXP-SHELF-LIFE-6 TO ZZD-DIFF-IN-DAYS 303500 ELSE 303600 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 303700 END-IF 303800 WHEN "7" 303900 IF BPR-EXP-SHELF-LIFE-7 > 0 304000 MOVE BPR-EXP-SHELF-LIFE-7 TO ZZD-DIFF-IN-DAYS 304100 ELSE 304200 MOVE BPR-MIN-SHELF-LIFE TO ZZD-DIFF-IN-DAYS 304300 END-IF 304400 END-EVALUATE WIN06A PERFORM B-595-CHECK-DOTCOM-STORE 32680000 304500 MOVE ZEROES TO ZZD-ERROR-CODE 304600 MOVE "A" TO ZZD-FUNCTION-CODE 304700 MOVE "ISO" TO ZZD-DATE1-FORMAT 304800 MOVE "ISO" TO ZZD-DATE2-FORMAT SPR14B PERFORM ZA-CALL-JL0F32 10860000 206800 305000 IF ZZD-ERROR-CODE NOT = 00 305100 THEN 305200 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 305400 PERFORM JLMSG-DISPLAY-MESSAGE 305500 ELSE 305600 MOVE ZZD-DATE2 TO WT40-CODE-DATE(WX10-DATA-SUB1) 305700 END-IF 305800 ADD 1 TO WX10-DATA-SUB1 305900 MOVE OLD-REQ-DEL-DT 00 306000 TO WT40-REQ-DEL-DATE(WX10-DATA-SUB1) 00 AUT08B WT40-BFFO-REQ-DEL-DATE(WX10-DATA-SUB1) 306100 MOVE OLD-ORD-TYPE 00 306200 TO WT40-ORDER-TYPE(WX10-DATA-SUB1) 00 MOVE ORD-REQ-DEL-TM 306200 TO WT40-REQ-DEL-TM(WX10-DATA-SUB1) AUT09A MOVE ORD-ACT-DEL-DATE AUT09A TO WT40-ACT-DEL-DATE(WX10-DATA-SUB1) AUT09A MOVE ORD-ACT-DEL-TIME AUT09A TO WT40-ACT-DEL-TIME(WX10-DATA-SUB1) AB2S10 MOVE ORD-DELIVERY-STATUS AB2S10 TO WT40-ORD-DELIVERY-STS(WX10-DATA-SUB1) 306300 END-IF. 306400 00 336000 B-590-EXIT. 33600000 306600 EXIT. 306700 18440000 WIN06A B-595-CHECK-DOTCOM-STORE SECTION. 32680000 WIN06A*---------------------------------------------------------------* 18460000 WIN06A* SECTION NAME : B-595-CHECK-DOTCOM-STORE * 32700000 WIN06A* CALLED BY : B-590 * 18480000 WIN06A* CALLS : * 18490000 WIN06A* FUNCTION : 1. CHECKS IF IT IS A DOTCCOM STORE AND ZZD- * 18500000 WIN06A* : DIFF-IN-DAYS NOT > 21. IF TRUE, ADJUSTS * 18510000 WIN06A* : ZZD-DIFF-IN-DAYS USING THE MINIMUM DOTCOM * 18510000 WIN06A* : GUARANTEED CUSTOMER CODE LIFE. * 18510000 WIN06A*---------------------------------------------------------------* 18530000 WIN06A B-595. 32760000 WIN06A WIN06A IF ROT-RO-TYPE-CLASS = "D" 61322400 WIN06A AND ZZD-DIFF-IN-DAYS <= 21 61322400 WIN06A MOVE WW01-CURR-RO-NO TO WW01-KEY-RO-NO 05450000 WIN06A MOVE WW01-CURR-BPR-TPN TO WW01-KEY-BPR-TPN 05460000 WIN06A PERFORM XB-READ-JLDOTCOM 19350004 WIN06A UNTIL JLDOT-CODE-LIFE-KEY >= WW01-STORE-PROD-KEY 19350004 WIN06A IF JLDOT-CODE-LIFE-KEY = WW01-STORE-PROD-KEY 19350004 WIN06A COMPUTE WW01-ZZD-DIFF-IN-DAYS = 61322400 WIN06A ZZD-DIFF-IN-DAYS - JLDOT-G-MIN-CODE-LIFE 61322400 WIN06A ELSE 19350004 WIN06A MOVE ZZD-DIFF-IN-DAYS TO WW01-ZZD-DIFF-IN-DAYS 61322400 WIN06A IF ZZD-DIFF-IN-DAYS > 0 61322400 WIN06B SET WT70-IX TO 1 42990019 WIN06B SEARCH WT70-DOTCOM-CL-ENTRY VARYING WT70-IX 43000019 WIN06A AT END WIN06A MOVE ZZD-DIFF-IN-DAYS TO WM36-DAY 61322400 WIN06A MOVE WM36-MISSING-DFLT-CL-VALUE 08980000 WIN06A TO JLMSG-TEXT 08980000 WIN06A PERFORM JLMSG-DISPLAY-MESSAGE 08990000 WIN06A WHEN WT70-DOTCOM-CL (WT70-IX) 43010019 WIN06A = ZZD-DIFF-IN-DAYS 61322400 WIN06A COMPUTE WW01-ZZD-DIFF-IN-DAYS = 61322400 WIN06A ZZD-DIFF-IN-DAYS - 61322400 WIN06A WT70-DOTCOM-CL-ADJ (WT70-IX) 43030019 WIN06B END-SEARCH 43090019 WIN06A END-IF 43090019 WIN06A END-IF 43090019 WIN06A IF WW01-ZZD-DIFF-IN-DAYS < 1 61322400 WIN06A MOVE 1 43030019 WIN06A TO ZZD-DIFF-IN-DAYS 61322400 WIN06A ELSE 61322400 WIN06A MOVE WW01-ZZD-DIFF-IN-DAYS 61322400 WIN06A TO ZZD-DIFF-IN-DAYS 61322400 WIN06A END-IF 43090019 306300 END-IF. 306400 00 WIN06A B-595-EXIT. 33600000 306600 EXIT. 306700 18440000 184500 B-600-CALC-MAX-IN-CODE SECTION. 18450000 184600*---------------------------------------------------------------* 18460000 184700* SECTION NAME : B-600-CALC-MAX-IN-CODE * 18470000 184800* CALLED BY : * 18480000 184900* CALLS : * 18490000 185000* FUNCTION : 1. CALCULATES THE MAXIMUM STOCK IN CODE FIGURE* 18500000 185100* : (ASSUMING NIL SALES) FOR EACH DAY FROM THE * 18510000 185200* : ARRAY BUILT FROM THE OLD CURSOR. * 18520000 185300*---------------------------------------------------------------* 18530000 185400 B-600. 18540000 479600* DISPLAY "B-600". 47960018 185600 MOVE 1 TO WX10-DATA-SUB1. 18560000 185700 18570000 185800 PERFORM UNTIL JLF40-SALES-DATE(WX10-DATA-SUB1) = SPACES 18580000 185900 OR WX10-DATA-SUB1 > 50 18590000 186000 18600000 186100 SET PROCESS-LOOP TO TRUE 18610000 186200 MOVE 1 TO WX10-DATA-SUB2 18620000 186300 PERFORM UNTIL END-PROCESS-LOOP 18630000 186400 IF WT40-REQ-DEL-DATE(WX10-DATA-SUB2) <= 18640000 186500 JLF40-SALES-DATE(WX10-DATA-SUB1) 18650000 186600 AND 18660000 186700 WT40-CODE-DATE(WX10-DATA-SUB2) > 18670000 186800 JLF40-SALES-DATE(WX10-DATA-SUB1) 18680000 186900 THEN 18690000 187000 COMPUTE JLF40-MAX-STK-IN-CODE(WX10-DATA-SUB1) = 18700000 187100 JLF40-MAX-STK-IN-CODE(WX10-DATA-SUB1) + 18710000 187200 WT40-REVSD-ORD-QTY(WX10-DATA-SUB2) 18720000 GCTEST* IF (WT10-SUB-PG-CODE = "F16AC" GCTEST* OR WT10-SUB-PG-CODE = "F11AE" GCTEST* OR WT10-SUB-PG-CODE = "F11GG" GCTEST* OR WT10-SUB-PG-CODE = "B45AI" GCTEST* OR WT10-SUB-PG-CODE = "B45AK" GCTEST* OR WT10-SUB-PG-CODE = "B45AM" GCTEST* OR WT10-SUB-PG-CODE = "B45DH" GCTEST* OR WT10-SUB-PG-CODE = "B45EA" GCTEST* OR WT10-SUB-PG-CODE = "B45EB" GCTEST* OR WT10-SUB-PG-CODE = "B45EC" GCTEST* OR WT10-SUB-PG-CODE = "B45EE" GCTEST* OR WT10-SUB-PG-CODE = "B45GE") GCTEST* AND WT10-RETAIL-OUTLET-NO = 9313 GCTEST* AND WX10-DATA-SUB1 < 12 GCTEST* AND BPR-MIN-SHELF-LIFE < 8 GCTEST* AND WT20-EXTERNAL-CALC-METHOD(1) = "A" GCTEST* DISPLAY " " GCTEST* DISPLAY "JLF40-SALES-DATE(" WX10-DATA-SUB1 ")" GCTEST* " = " JLF40-SALES-DATE (WX10-DATA-SUB1) GCTEST* DISPLAY "JLF40-MAX-STK-IN-CODE(" WX10-DATA-SUB1 ")" GCTEST* " = " JLF40-MAX-STK-IN-CODE (WX10-DATA-SUB1) GCTEST* DISPLAY "WT40-REQ-DEL-DATE (" WX10-DATA-SUB2 ")" GCTEST* " = " WT40-REQ-DEL-DATE (WX10-DATA-SUB2) GCTEST* DISPLAY "WT40-CODE-DATE (" WX10-DATA-SUB2 ")" GCTEST* " = " WT40-CODE-DATE (WX10-DATA-SUB2) GCTEST* DISPLAY "WT40-REVSD-ORD-QTY (" WX10-DATA-SUB2 ")" GCTEST* " = " WT40-REVSD-ORD-QTY (WX10-DATA-SUB2) GCTEST* END-IF 187300 END-IF 18730000 187400 18740000 187500 ADD 1 TO WX10-DATA-SUB2 18750000 187600 18760000 310300 IF WX10-DATA-SUB2 > 126 18770000 187800 OR WT40-REQ-DEL-DATE(WX10-DATA-SUB2) = SPACES 18780000 187900 THEN 18790000 188000 SET END-PROCESS-LOOP TO TRUE 18800000 188100 END-IF 18810000 188200 END-PERFORM 18820000 188300 18830000 188400 ADD 1 TO WX10-DATA-SUB1 18840000 188500 18850000 188600 END-PERFORM. 18860000 188700 18870000 188800 B-600-EXIT. 18880000 188900 EXIT. 18890000 189000 18900000 289500 251000 B-650-LOOKUP-LEGACY-ID SECTION. 251100*---------------------------------------------------------------* 251200* SECTION NAME : B-650-LOOKUP-LEGACY-ID * 251300* CALLED BY : * 251400* CALLS : * 251500* FUNCTION : 1. CONVERT OG-CD TO LEGACY-ID * 251600*---------------------------------------------------------------* 251700 B-650. 484100* DISPLAY "B-650". 48410018 251900 SEARCH ALL WT60-OGP-TABLE 273500 AT END MOVE "BR" TO JLF40-LEGACY-SYSTEM 252100 WHEN WT60-OG-CD(WX60-INDEX) = BPR-OG-CD 273700 MOVE WT60-LEGACY-ID(WX60-INDEX) TO JLF40-LEGACY-SYSTEM 252300 END-SEARCH. 252400 B-650-EXIT. EXIT. CRAUTA B-660-OBTAIN-SO-QTY SECTION. CRAUTA*---------------------------------------------------------------* CRAUTA* SECTION NAME : B-660-OBTAIN-SO-QTY * CRAUTA* CALLED BY : B-350-CALC-RO-TPN * CRAUTA* CALLS : B-665-READ-SO-VALUES * CRAUTA* FUNCTION : 1. RETRIEVE STANDING ORDER QTY'S * CRAUTA*---------------------------------------------------------------* CRAUTA B-660. CRAUTA* DISPLAY "B-660". 48410018 CRAUTA CRAUTA INITIALIZE WW01-SO-PREV-PER-STR-DATE CRAUTA WW04-TESCO-YEAR-WEEK CRAUTA WW05-PREV-TESCO-YEAR-WEEK CRAUTA CRAUTA PERFORM CRAUTA VARYING WX20-SO-SUB FROM +1 BY +1 CRAUTA UNTIL WX20-SO-SUB > WX20-SO-MAX CRAUTA OR JLF40-PER-STR-DATE (WX20-SO-SUB) = SPACES CRAUTA CRAUTA IF JLF40-EXTERNAL-CALC-METHOD(WX20-SO-SUB) = "I" CRAUTA CRAUTA PERFORM B-665-READ-SO-VALUES CRAUTA CRAUTA END-IF CRAUTA CRAUTA END-PERFORM CRAUTA . CRAUTA B-660-EXIT. CRAUTA EXIT. CRAUTA CRAUTA B-665-READ-SO-VALUES SECTION. CRAUTA*---------------------------------------------------------------* CRAUTA* SECTION NAME : B-665-READ-SO-VALUES * CRAUTA* CALLED BY : B-660-OBTAIN-SO-QTY * CRAUTA* CALLS : * CRAUTA* FUNCTION : 1. ATTEMPT TO ACCESS SOO AND SOP TO OBTAIN * CRAUTA* THE STANDING ORDER VALUE. * CRAUTA*---------------------------------------------------------------* CRAUTA B-665. CRAUTA* DISPLAY "B-665". 48410018 CRAUTA CRAUTA SET NOT-SO-CALC-METHOD TO TRUE CRAUTA CRAUTA IF JLF40-PER-STR-DATE (WX20-SO-SUB) NOT = CRAUTA WW01-SO-PREV-PER-STR-DATE CRAUTA CRAUTA MOVE JLF40-CR-PART-NO TO SOO-CR-PART-NO CRAUTA MOVE JLF40-RETAIL-OUTLET-NO TO SOO-RO-NO CRAUTA MOVE JLF40-BASE-PRODUCT-NO TO SOO-BPR-TPN CRAUTA MOVE JLF40-PER-STR-DATE (WX20-SO-SUB) TO SOO-TRADING-DATE CRAUTA CRAUTA PERFORM V-780-SELECT-VXJJ0SOO CRAUTA CRAUTA END-IF CRAUTA CRAUTA IF SOO-FOUND CRSUPP IF SOO-ORD-CASES-NN CRAUTA SET SO-CALC-METHOD TO TRUE CRAUTA MOVE SOO-ORD-CASES TO JLF40-STANDING-ORD-QTY (WX20-SO-SUB) END-IF CRAUTA ELSE CRAUTA IF JLF40-PER-STR-DATE (WX20-SO-SUB) NOT = CRAUTA WW01-SO-PREV-PER-STR-DATE CRAUTA CRAUTA PERFORM CRAUTA VARYING WX20-SO-SUB2 FROM +1 BY +1 CRAUTA UNTIL JLF40-PER-STR-DATE (WX20-SO-SUB) = CRAUTA WT30-CCYY-MM-DD (WX20-SO-SUB2) CRAUTA OR WX20-SO-SUB2 > WX20-SO-SUB2-MAX CRAUTA END-PERFORM CRAUTA CRAUTA MOVE WT30-TESCO-YEAR (WX20-SO-SUB2) TO WW04-TESCO-YEAR CRAUTA MOVE WT30-TESCO-WEEK (WX20-SO-SUB2) TO WW04-TESCO-WEEK CRAUTA CRAUTA IF WW04-TESCO-YEAR-WEEK NOT = CRAUTA WW05-PREV-TESCO-YEAR-WEEK CRAUTA CRAUTA MOVE WW04-TESCO-YEAR-WEEK TO SOP-EFF-TESCO-YW CRAUTA MOVE JLF40-CR-PART-NO TO SOP-CR-PART-NO CRAUTA MOVE JLF40-RETAIL-OUTLET-NO TO SOP-RO-NO CRAUTA MOVE JLF40-BASE-PRODUCT-NO TO SOP-BPR-TPN CRAUTA CRAUTA PERFORM V-790-SELECT-VXJJ0SOP CRAUTA END-IF CRAUTA CRAUTA END-IF CRAUTA CRAUTA IF SOP-FOUND CRAUTA CRAUTA SET SO-CALC-METHOD TO TRUE CRAUTA CRAUTA EVALUATE TRUE CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "1" CRAUTA MOVE SOP-ORD-CASES-1 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "2" CRAUTA MOVE SOP-ORD-CASES-2 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "3" CRAUTA MOVE SOP-ORD-CASES-3 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "4" CRAUTA MOVE SOP-ORD-CASES-4 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "5" CRAUTA MOVE SOP-ORD-CASES-5 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "6" CRAUTA MOVE SOP-ORD-CASES-6 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA WHEN WT30-DAY-NO (WX20-SO-SUB2) = "7" CRAUTA MOVE SOP-ORD-CASES-7 CRAUTA TO JLF40-STANDING-ORD-QTY(WX20-SO-SUB) CRAUTA CRAUTA END-EVALUATE CRAUTA* ELSE CRAUTA* ERROR MSG COMMENTED TO PREVENT EXCESSIVE SYSOUT CRAUTA* MOVE JLF40-RETAIL-OUTLET-NO TO WM32-RO-NO 15770000 CRAUTA* MOVE JLF40-BASE-PRODUCT-NO TO WM32-BPR-TPN 15780000 CRAUTA* MOVE WM32-NO-SO-VALUES TO JLMSG-TEXT 15790000 CRAUTA* PERFORM JLMSG-DISPLAY-MESSAGE 15800000 CRAUTA END-IF CRAUTA END-IF CRAUTA CRAUTA IF NOT-SO-CALC-METHOD CRAUTA MOVE "N" CRAUTA TO JLF40-EXTERNAL-CALC-METHOD(WX20-SO-SUB) CRAUTA END-IF CRAUTA CRAUTA MOVE JLF40-PER-STR-DATE (WX20-SO-SUB) CRAUTA TO WW01-SO-PREV-PER-STR-DATE CRAUTA MOVE WW04-TESCO-YEAR-WEEK CRAUTA TO WW05-PREV-TESCO-YEAR-WEEK CRAUTA . CRAUTA CRAUTA B-665-EXIT. CRAUTA EXIT. CRAUTA B-670-CHECK-FOR-GAP-ORDER SECTION. *---------------------------------------------------------------* * SECTION NAME : B-670-CHECK-FOR-GAP-ORDER * * CALLED BY : B-350-CALC-RO-TPN * * CALLS : X-500-READ-INPUT6 * * FUNCTION : CHECK IF THE PRODUCT HAS A GAP ORDER * *---------------------------------------------------------------* B-670. * DISPLAY "B-670". 48410018 SET JLF40-NO-GAP-ORDER-EXISTS TO TRUE JFM08A SET JLF40-NO-NEW-GAP-CNTL-EXISTS JFM08A TO TRUE PERFORM UNTIL EOF-INPUT6 OR JLF27-CR-PART-NO > WW01-CURR-PART-NO 16410000 OR (JLF27-CR-PART-NO = WW01-CURR-PART-NO 16410000 AND JLF27-RETAIL-OUTLET-NO > WW01-CURR-RO-NO) 16420000 OR (JLF27-CR-PART-NO = WW01-CURR-PART-NO 16410000 AND JLF27-RETAIL-OUTLET-NO = WW01-CURR-RO-NO 16420000 AND JLF27-BASE-PRODUCT-NO >= WW01-CURR-BPR-TPN) 16430000 PERFORM X-500-READ-INPUT6 END-PERFORM IF NOT EOF-INPUT6 AND JLF27-CR-PART-NO = WW01-CURR-PART-NO 16410000 AND JLF27-RETAIL-OUTLET-NO = WW01-CURR-RO-NO 16420000 AND JLF27-BASE-PRODUCT-NO = WW01-CURR-BPR-TPN 16430000 SET JLF40-GAP-ORDER-EXISTS TO TRUE JFM08A IF JLF27-NEW-GAP-CNTL-EXISTS JFM08A SET JLF40-NEW-GAP-CNTL-EXISTS JFM08A TO TRUE WIN09A WIN09A COMPUTE WW-GAP-STK-CORR = JLF27-GAP-BKSTK-QTY + WIN09A JLF27-PRE-DLVRY-WASTAGE - WIN09A JLF27-PRE-DLVRY-SALES JFM08A WIN09A IF WW-GAP-STK-CORR < 0 WIN09A MOVE 0 TO WW-GAP-STK-CORR JFM08A END-IF JFM08A JFM08A COMPUTE WW-GAP-EXPCTD-BOOKSTK = JFM08A WT10-ST-PERD-STK-POS - JFM08A WW-GAP-STK-CORR JFM08A JFM08A IF WW-GAP-EXPCTD-BOOKSTK < 0 JFM08A MOVE 0 TO WW-GAP-EXPCTD-BOOKSTK JFM08A END-IF JFM08A WIN09A COMPUTE WW-GAP-STK-CORR-ACTUAL-BS ROUNDED = WIN09A WT10-BOOKSTOCK-USED - WIN09A WW-GAP-STK-CORR WIN09A WIN09A IF WW-GAP-STK-CORR-ACTUAL-BS < 0 WIN09A MOVE 0 TO WW-GAP-STK-CORR-ACTUAL-BS WIN09A END-IF JFM08A JFM08A MOVE WW-GAP-EXPCTD-BOOKSTK JFM08A TO JLF40-ST-PERD-STK-POS (1) WIN09A MOVE WW-GAP-STK-CORR-ACTUAL-BS WIN09A TO JLF40-ACTUAL-STK-POS (1) JFM08A END-IF END-IF . B-670-EXIT. EXIT. 275400 B-690-SET-OLD-DAY-FCST-SALES SECTION. 275500*---------------------------------------------------------------* 275600* SECTION NAME : B-690-SET-OLD-DAY-FCST-SALES * 275700* CALLED BY : * 275800* CALLS : * 275900* FUNCTION : 1. SET OLD-DAY-FCST-SALES FROM ASF * 276000*---------------------------------------------------------------* 276100 B-690. 485800* DISPLAY "B-690" 48580018 276300 IF JLF40-PROCESS-DKSS 276403 AND BPR-MIN-SHELF-LIFE < WT20-CNTL-CODE-LIFE(1) 276500 PERFORM V-700-OPEN-READNEXT-VXJJ0ASF 276600 IF NOT ASF-OPEN 276700 SET JLF40-DO-NOT-PROCESS-DKSS TO TRUE 276800 GO TO B-690-EXIT 276900 END-IF 277000 PERFORM V-710-FETCH-READNEXT-VXJJ0ASF 277100 PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 277200 UNTIL JLF40-DO-NOT-PROCESS-DKSS 277300 OR WX10-DATA-SUB1 > 7 277400 IF ASF-SALES-DATE NOT = 277500 JLF40-SALES-DATE(WX10-DATA-SUB1) 277600 OR END-ASF 277700 SET JLF40-DO-NOT-PROCESS-DKSS TO TRUE 277800 ELSE 277900 MOVE ASF-PREV-FCST-EDS TO 278000 JLF40-OLD-DAY-FCST-SALES(WX10-DATA-SUB1) 278100 PERFORM V-710-FETCH-READNEXT-VXJJ0ASF 278200 END-IF SPR12A END-PERFORM PERFORM V-720-CLOSE-READNEXT-VXJJ0ASF. 278400 B-690-EXIT. 253700 EXIT. 294600 CRV10B B-695-OBTAIN-PREV-ORDER-DET SECTION. CRV10B*---------------------------------------------------------------* CRV10B* SECTION NAME : B-695-OBTAIN-PREV-ORDER-DET * CRV10B* CALLED BY : B-350-CALC-RO-TPN * CRV10B* CALLS : V-765-PRIMARY-READ-VXJJ0OJD * CRV10B* : V-770-SECONDARY-READ-VXJJ0OJD * CRV10B* FUNCTION : 1. OBTAIN PREVIOUS ORDER COMPONENTS * CRV10B*---------------------------------------------------------------* CRV10B B-695. 489300* DISPLAY "B-695" 48930018 CRV10B CRV10B SET PROCESS-LOOP CRV10B OJD-NOT-FOUND TO TRUE CRV10B MOVE 1 TO WX10-DATA-SUB1 CRV10B CRV10B IF JLF40-COR-PC = 010 CRV10B SET OJD-NOT-FOUND TO TRUE CRV10B ELSE CRV10B PERFORM UNTIL END-PROCESS-LOOP CRV10B CRV10B IF WX10-DATA-SUB1 > 75 CRV10B SET END-PROCESS-LOOP TO TRUE CRV10B ELSE CRV10B IF JLF40-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" CRV10B IF JLF40-DELY-IND (WX10-DATA-SUB1) = CRV11A*----- 21/01/2003 - GM ---------------------------------------* CRV11A* "B" OR "P" OR "Y" OR "E" CRV11A "B" OR "P" OR "Y" OR "E" OR "S" CRV11A*-------------------------------------------------------------* CRV10B OR (JLF40-DELY-IND (WX10-DATA-SUB1) = "N" AND CRV10B JLF40-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) CRV10B CRV10B PERFORM V-765-PRIMARY-READ-VXJJ0OJD CRV10B CRV10B IF OJD-NOT-FOUND CRV10B PERFORM V-770-SECONDARY-READ-VXJJ0OJD CRV10B END-IF CRV10B CRV10B SET END-PROCESS-LOOP TO TRUE CRV10B CRV10B END-IF CRV10B END-IF CRV10B END-IF CRV10B CRV10B ADD 1 TO WX10-DATA-SUB1 CRV10B CRV10B END-PERFORM CRV10B END-IF CRV10B CRV10B IF OJD-FOUND CRV10B MOVE OJD-ADJ-SAFE-STK-QTY TO JLF40-PREV-ADJ-SAFE-STK-QTY CRV10B MOVE OJD-RAW-DEMAND TO JLF40-PREV-RAW-DEMAND CRV10B MOVE OJD-ORD-QTY TO JLF40-PREV-RND-DEMAND CRV10B MOVE OJD-EXP-SALES-DP TO JLF40-PREV-EXP-SALES-DP CRV10B MOVE OJD-CALC-METHOD TO JLF40-PREV-CALC-METHOD CRV10B MOVE OJD-SAFE-STK-QTY TO JLF40-PREV-SAFE-STK-QTY CRV10B MOVE OJD-SHELF-FILL-CAP TO JLF40-PREV-SHELF-FILL-CAP CRV10B ELSE CRV10B MOVE +0 TO JLF40-PREV-ADJ-SAFE-STK-QTY CRV10B JLF40-PREV-RAW-DEMAND CRV10B JLF40-PREV-RND-DEMAND CRV10B JLF40-PREV-EXP-SALES-DP CRV10B JLF40-PREV-SAFE-STK-QTY CRV10B JLF40-PREV-SHELF-FILL-CAP CRV10B MOVE 0 TO JLF40-PREV-CALC-METHOD CRV10B END-IF. CRV10B CRV10B B-695-EXIT. CRV10B EXIT. CRV10B 189200*-- GTM - 31/08/2005 -------------------------------------------* 05633201 189100 B-696-CHECK-SIMREP-SS-TRIAL SECTION. 05633301 189200*---------------------------------------------------------------* 05633401 189300* SECTION NAME : B-696-CHECK-SIMREP-SS-TRIAL 05633501 189400* CALLED BY : * 05633601 189500* CALLS : * 05633701 189600* FUNCTION : 1. DETERMINES IF THE STORE AND SUB-GROUP OF * 05633801 189600* : THE PRODUCT BEING PROCESSED ARE PART OF THE* 05633901 189600* : SIMPLER REPLENISHMENT SAFETY STOCK TRIAL. * 05634001 189600* : IF SO, SET THE "TI" VALUE BEING PASSED TO * 05634101 189600* : 010, WHICH EFFECTIVELY SWITCHES OFF THE "TI* 05634201 189600* : PROCESSING IN MODULE JL0F40. * 05634301 189600* : IF THE FIRST TABLE ENTRY IS 0'S THEN NONE * 05634401 189600* : ARE IN THE TRIAL. * 05634501 189600* : IF THE FIRST TABLE ENTRY IS 9'S THEN ALL * 05634601 189600* : ARE IN THE TRIAL. * 05634701 189700*---------------------------------------------------------------* 05634901 189800 B-696. 05635001 115506 SET STORE-NOT-IN-SRSS-TRIAL TO TRUE. 05637003 115506 SET SG-NOT-IN-SRSS-TRIAL TO TRUE. 05636001 190400 05637101 190400 EVALUATE W-SRSST-RO-NO(1) 05637201 190400 WHEN 0000 05637301 115506 SET STORE-NOT-IN-SRSS-TRIAL TO TRUE 05637401 190400 WHEN 9999 05637501 115506 SET STORE-IN-SRSS-TRIAL TO TRUE 05637601 190400 WHEN OTHER 05637701 190400 PERFORM B-697-FIND-SRSS-STORE 05637801 190400 END-EVALUATE. 05637901 190400 05638001 190400 EVALUATE W-SRSST-SG-CD(1) 05638101 190400 WHEN 00000 05638201 115506 SET SG-NOT-IN-SRSS-TRIAL TO TRUE 05638301 190400 WHEN 99999 05638401 115506 SET SG-IN-SRSS-TRIAL TO TRUE 05638501 190400 WHEN OTHER 05638601 190400 PERFORM B-698-FIND-SRSS-SG 05638701 190400 END-EVALUATE. 05638801 190400 05638901 190400 IF STORE-IN-SRSS-TRIAL AND SG-IN-SRSS-TRIAL 05639001 190400 THEN 05639101 DISPLAY "STORE IN TRIAL = " JLF40-RETAIL-OUTLET-NO 05639503 " TPNB IN TRIAL = " JLF40-BASE-PRODUCT-NO 05639609 115531 MOVE 010 TO JLF40-COR-PC 05639201 190400 END-IF. 05639301 190400 05639401 190500 B-696-EXIT. 05639501 255400 EXIT. 05639601 05639701 189100 B-697-FIND-SRSS-STORE SECTION. 05639801 189200*---------------------------------------------------------------* 05639901 189300* SECTION NAME : B-697-FIND-SRSS-STORE 05640001 189400* CALLED BY : * 05640101 189500* CALLS : * 05640201 189600* FUNCTION : 1. SEARCHES PARM TABLE OF TRIAL STORES FOR A * 05640301 189600* : MATCH ON THE STORE BEING PROCESSED. * 05640401 189700*---------------------------------------------------------------* 05641301 189800 B-697. 05641401 190400 05641601 115506 SET STORE-NOT-IN-SRSS-TRIAL TO TRUE. 05641901 115506 05642101 082640 PERFORM VARYING W-SRSSTRO-IX FROM 1 BY 1 05642201 082650 UNTIL W-SRSSTRO-IX > 50 05642301 082650 OR STORE-IN-SRSS-TRIAL 05642401 082650 OR W-SRSST-RO-NO(W-SRSSTRO-IX)(1:4) = 0000 05642507 115506 05642601 082660 IF W-SRSST-RO-NO(W-SRSSTRO-IX)(1:4) = 05642701 082660 JLF40-RETAIL-OUTLET-NO(2:4) 05643406 115506 SET STORE-IN-SRSS-TRIAL TO TRUE 05642901 082730 END-IF 05643301 115506 05643401 082740 END-PERFORM 05643501 082750 . 05643601 190400 05643901 190500 B-697-EXIT. 05644001 255400 EXIT. 05644101 05644201 189100 B-698-FIND-SRSS-SG SECTION. 05644301 189200*---------------------------------------------------------------* 05644401 189300* SECTION NAME : B-698-FIND-SRSS-SG 05644501 189400* CALLED BY : * 05644601 189500* CALLS : * 05644701 189600* FUNCTION : 1. SEARCHES PARM TABLE OF TRIAL SG'S FOR A 05644801 189600* : MATCH ON THE SG OF THE TPNB BEING PROCESSED* 05644901 189700*---------------------------------------------------------------* 05645001 189800 B-698. 05645101 190400 05645301 115506 SET SG-NOT-IN-SRSS-TRIAL TO TRUE. 05645401 115506 05645501 082640 PERFORM VARYING W-SRSSTSG-IX FROM 1 BY 1 05645601 082650 UNTIL W-SRSSTSG-IX > 40 05645707 082650 OR SG-IN-SRSS-TRIAL 05645801 082650 OR W-SRSST-SG-CD(W-SRSSTSG-IX)(1:5) = 00000 05645907 115506 05646001 082660 IF W-SRSST-SG-CD(W-SRSSTSG-IX)(1:5) = 05646101 082660 WT10-SUB-PG-CODE 05646201 115506 SET SG-IN-SRSS-TRIAL TO TRUE 05646301 082730 END-IF 05646401 115506 05646501 082740 END-PERFORM 05646601 082750 . 05646701 190400 05646801 190500 B-698-EXIT. 05646901 255400 EXIT. 05647001 189200*---------------------------------------------------------------* 05647101 296600 05647201 189200*-- GTM - 31/08/2005 -------------------------------------------* 05647301 189100 B-699-JL0F40-TI-VALUE SECTION. 05647401 189200*---------------------------------------------------------------* 05647501 189300* SECTION NAME : B-699-JL0F40-TI-VALUE 05647601 189400* CALLED BY : * 05647701 189500* CALLS : * 05647801 189600* FUNCTION : 1. SETS THE TI VALUE BASED UPON THE TPNB COR * 05647901 189700*---------------------------------------------------------------* 05648001 189800 B-699. 05648101 115506 EVALUATE WW01-COR-PC 05648201 115531 WHEN 0 05648301 115531 MOVE WF01-TI-COR0 TO JLF40-COR-PC 05648401 115531 WHEN 1 05648501 115531 MOVE WF01-TI-COR1 TO JLF40-COR-PC 05648601 115531 WHEN 2 05648701 115531 MOVE WF01-TI-COR2 TO JLF40-COR-PC 05648801 115531 WHEN 3 05648901 115531 MOVE WF01-TI-COR3 TO JLF40-COR-PC 05649001 115531 WHEN 4 05649101 115531 MOVE WF01-TI-COR4 TO JLF40-COR-PC 05649201 115531 WHEN 5 05649301 115531 MOVE WF01-TI-COR5 TO JLF40-COR-PC 05649401 115531 WHEN 6 05649501 115531 MOVE WF01-TI-COR6 TO JLF40-COR-PC 05649601 115531 WHEN 7 05649701 115531 MOVE WF01-TI-COR7 TO JLF40-COR-PC 05649801 115531 WHEN 8 05649901 115531 MOVE WF01-TI-COR8 TO JLF40-COR-PC 05650001 115531 WHEN 9 05650101 115531 MOVE WF01-TI-COR9 TO JLF40-COR-PC 05650201 115531 WHEN OTHER 05650301 115531 MOVE 010 TO JLF40-COR-PC 05650401 115506 END-EVALUATE. 05650501 190400 05650601 190500 B-699-EXIT. 05650701 255400 EXIT. 05650801 189200*---------------------------------------------------------------* 05650901 CRV10B 05651001 189100 B-700-CALL-JLF40 SECTION. 18910000 189200*---------------------------------------------------------------* 18920000 189300* SECTION NAME : B-700-CALL-JL0F40 * 18930000 189400* CALLED BY : * 18940000 189500* CALLS : * 18950000 189600* FUNCTION : 1. CALLS THE JL0F40 TO CALCULATE ORDER QTYS * 18960000 189700*---------------------------------------------------------------* 18970000 189800 B-700. 18980000 496200* DISPLAY "B-700". 49620018 190000 INITIALIZE JLF40-RETURN. 19000000 190100 19010000 339600*-- CAW-- 15/03/2001 -------------------------------------------* 33960000 339700* MOVE ZERO TO ENDEVOR-FOOTPRINT-SUBSYSTEM-C3. 33970000 279800* CALL "JL0F40" USING JLF40-LINKAGE. 190300* CALL WF01-JL0F40 USING JLF40-LINKAGE. 19030000 279810 PERFORM XC-CALL-JLF40. 189700*---------------------------------------------------------------* 18970000 190400 19040000 190500 B-700-EXIT. 19050000 255400 EXIT. 296600 18910000 B-710-COPY-JLF40 SECTION. 18910000 *---------------------------------------------------------------* 18920000 * COPY JLF40 FIELDS TO JLF46 FOR AVAILABILTY OPTIMISED ORDER * 18920000 * CALC * 18920000 *---------------------------------------------------------------* 18920000 INITIALIZE JLF46-RETURN. 19000000 MOVE ZEROS TO WX01-F46 PERFORM B-720-JLF40-PERIOD 75 TIMES. 19010000 MOVE ZEROS TO WX01-F46 PERFORM B-730-JLF40-DAY-TABLE 50 TIMES. 19010000 MOVE JLF40-DETAIL-REFERENCE-DATA TO 19010000 JLF46-DETAIL-REFERENCE-DATA 19010000 . 19040000 B-710-EXIT. 19050000 EXIT. 18910000 SUM11A B-610-COPY-JLF40 SECTION. 18910000 SUM11A*---------------------------------------------------------------* 18920000 SUM11A* COPY JLF40 FIELDS TO JLF42 FOR BGO * 18920000 SUM11A*---------------------------------------------------------------* 18920000 SUM11A* DISPLAY "B-610-COPY-JLF40" 19000000 SUM11A INITIALIZE JLF42-RETURN. 19000000 SUM11A MOVE ZEROS TO WX01-F42 SUM11A PERFORM B-620-JLF40-PERIOD 75 TIMES. 19010000 TA1226*---------------------------------------------------------------* 18920000 TA1226* WHEN CALC METHOD IS P OR O, THEN WE NEED SHELF CAPACITY OF * TA1226* NEXT 21 DAYS FOR EACH D TYPE RECORD. SO POPULATE THE SHELF * TA1226* CAPACITY FROM THE FORECAST FILE TILL LAST D TYPE RECORD, * 18920000 TA1226* THEN COPY THE SHELF CAPACITY FOR THE NEXT 21 DAYS FROM THE * 18920000 TA1226* XSB TABLE * 18920000 TA1226*---------------------------------------- ----------------------* 18920000 TA1226 TA1226 IF WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) = "P" TA1226 OR WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) = "O" TA1226 MOVE ZEROS TO WX01-F42 TA1226 MOVE 1 TO WX01-BGO2 TA1226 SET NOT-END-OF-SHELF TO TRUE TA1226 PERFORM B-621-JLF42-PERIOD UNTIL END-OF-SHELF 19010000 TA1226 MOVE JLF42-BGO2-SALES-DATE(WX01-BGO2) TO TA1226 WH-STEP-DATE TA1226 ZZD-DATE1 TA1226 MOVE ZEROES TO ZZD-ERROR-CODE TA1226 MOVE "A" TO ZZD-FUNCTION-CODE TA1226 MOVE "ISO" TO ZZD-DATE1-FORMAT TA1226 MOVE "ISO" TO ZZD-DATE2-FORMAT TA1226 MOVE 22 TO ZZD-DIFF-IN-DAYS TA1226 PERFORM ZA-CALL-JL0F32 10860000 TA1226 TA1226 IF ZZD-ERROR-CODE NOT = 00 TA1226 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE TA1226 MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT TA1226 PERFORM JLMSG-DISPLAY-MESSAGE TA1226 END-IF TA1226 TA1226 MOVE ZZD-DATE2 TO TA1226 WH-STEP-PLUS21-DATE TA1226 PERFORM B-622-STACK-SHELF-CAP TA1226 PERFORM B-623-PROM-SHELF-CAP TA1226 END-IF SUM11A MOVE ZEROS TO WX01-F42 SUM11A PERFORM B-630-JLF40-DAY-TABLE 50 TIMES. 19010000 SUM11A MOVE JLF40-DETAIL-REFERENCE-DATA TO 19010000 SUM11A JLF42-DETAIL-REFERENCE-DATA 19010000 SUM11A . 19040000 SUM11A B-610-EXIT. 19050000 SUM11A EXIT. SUM11A 18910000 SUM09B B-711-CREATE-NWS SECTION. SUM09B*---------------------------------------------------------------* SUM09B* SECTION NAME : B-711-CREATE-NWS * SUM09B* CALLED BY : B-350-CALC-RO-TPN * SUM09B* CALLS : B-711-A-FIND-DAY-EDS * SUM09B* : B-711-B-FIND-NWS * SUM09B* FUNCTION : GETS THE EDS & PTP AND CALCULATES THE NWS FOR * SUM09B* EACH DEMAND PERIOD. * SUM09B*---------------------------------------------------------------* SUM09B B-711. SUM09B INITIALIZE WW11-VARIABLES SUM09B SET NWS-PROCESS-LOOP TO TRUE SUM09B MOVE WX10-DATA-SUB1 TO WX70-DATA-SUB1 SUM09B SUM09B PERFORM UNTIL END-NWS-PROCESS-LOOP SUM09B SET SEARCH-EDS TO TRUE SUM09B MOVE 1 TO WX70-DATA-SUB2 SUM09B PERFORM B-711-A-FIND-DAY-EDS UNTIL EDS-FOUND SUM09B SUM09B ADD 1 TO WX70-DATA-SUB1 SUM09B IF JLF40-PER-STR-DATE (WX70-DATA-SUB1) = SPACES SUM09B OR WX70-DATA-SUB1 > 75 SUM09B SET END-NWS-PROCESS-LOOP SUM09B TO TRUE SUM09B END-IF SUM09B END-PERFORM SUM09B SUM09B INITIALIZE WH02-PTP-ROW SUM09B SET NWS-PROCESS-LOOP TO TRUE SUM09B MOVE WX10-DATA-SUB1 TO WX70-DATA-SUB1 SUM09B MOVE JLF40-CR-PART-NO TO WH02-CR-PART-NO SUM09B WM43-CR-PART-NO SUM09B WM44-CR-PART-NO SPR10A* WM46-CR-PART-NO SUM09B MOVE JLF40-RETAIL-OUTLET-NO TO WH02-RETAIL-OUTLET-NO SUM09B WM43-RETAIL-OUTLET-NO SUM09B WM44-RETAIL-OUTLET-NO SPR10A* WM46-RETAIL-OUTLET-NO SUM09B MOVE JLF40-BASE-PRODUCT-NO TO WH02-BASE-PRODUCT-NO SUM09B WM43-BASE-PRODUCT-NO SUM09B WM44-BASE-PRODUCT-NO SPR10A* WM46-BASE-PRODUCT-NO SUM09B MOVE WW01-CURR-SG-CD(1:1) TO WH02-CURR-SG-CD-1 SUM09B MOVE WW01-CURR-SG-CD(1:2) TO WH02-CURR-SG-CD-2 SUM09B MOVE WW01-CURR-SG-CD(1:3) TO WH02-CURR-SG-CD-3 SUM09B MOVE WW01-CURR-SG-CD(1:4) TO WH02-CURR-SG-CD-4 SUM09B MOVE WW01-CURR-SG-CD TO WH02-CURR-SG-CD-5 SUM09B WM43-CURR-SG-CD SUM09B WM44-CURR-SG-CD SPR10A* WM46-CURR-SG-CD SUM09B SUM09B PERFORM UNTIL END-NWS-PROCESS-LOOP SUM09B SUM10B IF WW11-NEW-PTP-DATE (WX70-DATA-SUB1) = SPACES SUM10B MOVE WM44-NEW-PTP-DATE-CHECK SUM10B TO JLMSG-TEXT SUM10B PERFORM JLMSG-DISPLAY-MESSAGE SUM10B END-IF SUM09B SUM09B PERFORM B-711-B-FIND-NWS SUM09B SUM12A IF WH02-PTP-YRWK NOT = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A PERFORM SUM12A UNTIL WH02-PTP-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A OR WX95-SUB = WX95-MAX SUM12A ADD 1 TO WX95-SUB SUM12A END-PERFORM SUM12A IF WH02-PTP-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A IF WT95-PTG-PTP-DONE(WX95-SUB) = SPACES SUM12A IF PTG-NOT-FOUND SUM12A IF PTP-PTP-TYPE = "S" SUM12A MOVE "Y" TO SUM12A WT95-PTP-S-ENTRY(WX95-SUB) SUM12A END-IF SUM12A ELSE SUM12A MOVE "Y" TO SUM12A WT95-PTG-ENTRY(WX95-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-PTG-PTP-DONE(WX95-SUB) SUM12A END-IF SUM12A END-IF SUM12A END-IF SUM09B SUM09B ADD 1 TO WX70-DATA-SUB1 SUM09B SUM09B IF JLF40-PER-STR-DATE (WX70-DATA-SUB1) = SPACES SUM09B OR WX70-DATA-SUB1 > 75 SUM09B SET END-NWS-PROCESS-LOOP TO TRUE SUM09B END-IF SUM09B END-PERFORM. SUM09B SUM09B B-711-EXIT. SUM09B EXIT. SUM09B SUM09B B-711-A-FIND-DAY-EDS SECTION. SUM09B*--------------------------------------------------------------* SUM09B* SECTION NAME : B-711-A-FIND-DAY-EDS * SUM09B* CALLED BY : B-711-CREATE-NWS * SUM09B* CALLS : * SUM09B* FUNCTION : IF THE DEMAND IS ONLY FOR A DAY THEN THE EDS * SUM09B* : (EXPECTED DAILY SALES) OF THAT DAY WILL BE * SUM09B* : CONSIDERED.IF THE DEMAND IS FOR MORE THAN A * SUM09B* : DAY THEN THE EDS WILL BE CONSIDERED DEPENDING * SUM09B* : ON THE DELIVERY REQUIRED TIME I.E.,IF THE * SUM09B* : DEMAND PERIOD STARTS BEFORE NOON THEN THE * SUM09B* : CURRENT DAYS EDS & PTP WILL BE CONSIDERED AND * SUM09B* : IF IT IS AFTER NOON THEN THE FOLLOWING DAYS * SUM09B* : EDS & PTP WILL BE CONSIDERED * SUM09B*--------------------------------------------------------------* SUM09B B-711-A. SUM09B* DISPLAY "B-711-A" SUM09B IF JLF40-PER-STR-DATE (WX70-DATA-SUB1) = SUM09B JLF40-SALES-DATE (WX70-DATA-SUB2) SUM09B SUM09B IF JLF40-PER-STR-DATE (WX70-DATA-SUB1) = SUM09B JLF40-PER-END-DATE (WX70-DATA-SUB1) OR SUM09B JLF40-EXP-SHELF-LIFE (WX70-DATA-SUB1) = 1 SUM09BD DISPLAY "DEMAND IS FOR A DAY" SUM09B MOVE JLF40-DAY-FCST-SALES (WX70-DATA-SUB2) SUM09B TO SUM09B WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM09B MOVE JLF40-PER-STR-DATE (WX70-DATA-SUB1) SUM09B TO SUM09B WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM09B SET EDS-FOUND TO TRUE SUM09B ELSE SUM09BD DISPLAY "DEMAND IS FOR MULTIPLE DAYS" SUM09B IF JLF40-PER-STR-TIME (WX70-DATA-SUB1) < WF01-MIDDAY SUM09BD DISPLAY " DELIVERY REQ_TIME IS BEFORE NOON" SUM09B MOVE JLF40-DAY-FCST-SALES (WX70-DATA-SUB2) SUM09B TO SUM09B WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM09B MOVE JLF40-PER-STR-DATE (WX70-DATA-SUB1) SUM09B TO SUM09B WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM09B SET EDS-FOUND TO TRUE SUM09B ELSE SUM09B MOVE ZEROES TO ZZD-ERROR-CODE SUM09B MOVE "A" TO ZZD-FUNCTION-CODE SUM09B MOVE "ISO" TO ZZD-DATE1-FORMAT SUM09B MOVE JLF40-PER-STR-DATE (WX70-DATA-SUB1) SUM09B TO ZZD-DATE1 SUM09B MOVE "ISO" TO ZZD-DATE2-FORMAT SUM09B MOVE 1 TO ZZD-DIFF-IN-DAYS SUM09B SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM09B SUM09B IF ZZD-ERROR-CODE NOT = 00 SUM09B MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SUM09B MOVE WM05-JL0F32-ERROR SUM09B TO JLMSG-TEXT SUM09B PERFORM JLMSG-DISPLAY-MESSAGE SUM09B END-IF SUM09B SUM09B MOVE ZZD-DATE2 TO WW11-NEXT-DAY-DATE SUM09B SUM09B PERFORM UNTIL EDS-FOUND SUM09B SUM09B IF JLF40-SALES-DATE (WX70-DATA-SUB2) = SUM09B WW11-NEXT-DAY-DATE SUM09B MOVE JLF40-DAY-FCST-SALES (WX70-DATA-SUB2) SUM09B TO SUM09B WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM09B MOVE WW11-NEXT-DAY-DATE SUM09B TO SUM09B WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM09B SET EDS-FOUND TO TRUE SUM09B END-IF SUM09B ADD 1 TO WX70-DATA-SUB2 SUM09B IF JLF40-SALES-DATE (WX70-DATA-SUB2) = SPACES SUM09B OR WX70-DATA-SUB2 > 50 SUM09B SET EDS-FOUND SUM09B TO TRUE SUM09B END-IF SUM09B END-PERFORM SUM09B END-IF SUM09B END-IF SUM09B ELSE SUM09B ADD 1 TO WX70-DATA-SUB2 SUM09B IF JLF40-SALES-DATE (WX70-DATA-SUB2) = SPACES SUM09B OR WX70-DATA-SUB2 > 50 SUM09B SET EDS-FOUND TO TRUE SUM09B END-IF SUM09B END-IF. SUM09B SUM09B B-711-A-EXIT. SUM09B EXIT. SUM09B SUM09B B-711-B-FIND-NWS SECTION. SUM09B*---------------------------------------------------------------* SUM09B* SECTION NAME : B-711-B-FIND-NWS * SUM09B* CALLED BY : B-711-CREATE-NWS * SUM09B* CALLS : B-711-BA-FIND-DAILY-PTP * SPR10A* : B-712-BA-EVALUATE-PTG * SUM09B* FUNCTION : COMPUTES THE NOTIONAL WEEKLY SALES * SUM09B*---------------------------------------------------------------* SUM09B B-711-B. SUM09B* DISPLAY "B-711-B" SUM09B SUM09B MOVE ZEROES TO ZZD-ERROR-CODE SUM09B MOVE "A" TO ZZD-FUNCTION-CODE SUM09B MOVE "ISO" TO ZZD-DATE1-FORMAT SUM09B MOVE WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM09B TO ZZD-DATE1 SUM09B MOVE "WF" TO ZZD-DATE2-FORMAT SUM09B MOVE -1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM09B SUM09B IF ZZD-ERROR-CODE NOT = 00 SUM09B MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SUM09B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM09B PERFORM JLMSG-DISPLAY-MESSAGE SUM09B END-IF SUM09B SUM09B MOVE ZZD-DATE2(1:4) TO WT30-PTP-TESCO-YEAR SUM09B MOVE ZZD-DATE2(5:2) TO WT30-PTP-TESCO-WEEK SUM09B MOVE ZZD-DATE2(7:1) TO WT30-PTP-DAY-NO SUM09B SUM09B STRING WT30-PTP-TESCO-YEAR SUM09B , WT30-PTP-TESCO-WEEK SUM09B DELIMITED BY SIZE SUM09B INTO SUM09B WH02-PTP-YRWK SUM09B END-STRING SUM09B MOVE WH02-PTP-YRWK TO WM43-PTP-YRWK SPR10A* WM46-PTG-YRWK SUM09B SPR10A PERFORM B-712-BA-EVALUATE-PTG SPR10A SPR10A IF PTG-NOT-FOUND SPR10A IF WH02-PTP-YRWK NOT = WH02-PREV-PTP-YRWK SPR10A MOVE WH02-PTP-YRWK TO WH02-PREV-PTP-YRWK SUM12A IF PTP-TESCO-YRWK < WH02-PREV-PTP-YRWK AND SUM12A WH02-PREV-PTP-YRWK <= PTP-TESCO-YRWK-END SUM12A CONTINUE SUM12A ELSE SPR10A PERFORM B-711-BA-FIND-DAILY-PTP SUM12A END-IF SPR10A END-IF SPR10A EVALUATE WT30-PTP-DAY-NO SPR10A WHEN 1 SPR10A MOVE PTP-PTP-DAY-1 TO WW11-DAY-PTP SPR10A WHEN 2 SPR10A MOVE PTP-PTP-DAY-2 TO WW11-DAY-PTP SPR10A WHEN 3 SPR10A MOVE PTP-PTP-DAY-3 TO WW11-DAY-PTP SPR10A WHEN 4 SPR10A MOVE PTP-PTP-DAY-4 TO WW11-DAY-PTP SPR10A WHEN 5 SPR10A MOVE PTP-PTP-DAY-5 TO WW11-DAY-PTP SPR10A WHEN 6 SPR10A MOVE PTP-PTP-DAY-6 TO WW11-DAY-PTP SPR10A WHEN 7 SPR10A MOVE PTP-PTP-DAY-7 TO WW11-DAY-PTP SPR10A WHEN OTHER SPR10A MOVE PTP-PTP-DAY-1 TO WW11-DAY-PTP SPR10A END-EVALUATE SPR10A END-IF SUM09B SUM09B IF WW11-DAY-PTP = 0 SPR12A MOVE WW20-NOTNL-WKLY-SALES TO SUM09B WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SUM09B ELSE SUM09B COMPUTE WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) = SUM09B (WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) * 100 ) SUM09B / WW11-DAY-PTP SUM09B END-IF SUM09B MOVE WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SUM09B TO SUM09B JLF40-SAVED-NWS(WX70-DATA-SUB1). SUM09BD DISPLAY "FOR SUBSCRIPT OF :" WX70-DATA-SUB1 SUM09BD DISPLAY "WW11-NEW-PTP-DATE :" SUM09BD WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM09BD DISPLAY "WW11-DAY-PTP :" WW11-DAY-PTP SPR10A* IF PTG-FOUND SPR10A* DISPLAY "PTG YEAR WEEK SELECTED :" PTG-TESCO-YEAR SPR10A* PTG-TESCO-WEEK SPR10A* ELSE SPR10A* DISPLAY "PTP YEAR WEEK SELECTED :" PTP-TESCO-YRWK SPR10A* END-IF SUM09BD DISPLAY "WW11-EXPECTED-DAILY-SALES :" SUM09BD WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM09BD DISPLAY "WW11-NOTNL-WKLY-SALES :" SUM09BD WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SUM09B . SUM09B B-711-B-EXIT. SUM09B EXIT. SUM09B SUM09B B-711-BA-FIND-DAILY-PTP SECTION. SUM09B*----------------------------------------------------------------* SUM09B* SECTION NAME :B-711-BA-FIND-DAILY-PTP * SUM09B* CALLED BY :B-711-B-FIND-NWS * SUM09B* CALLS :VGD-OPEN-PTP-CURSOR * SUM09B* :VGE-FETCH-PTP-CURSOR * SUM09B* :VGF-CLOSE-PTP-CURSOR * SUM09B* FUNCTION : * SUM09B*----------------------------------------------------------------* SUM09B B-711-BA. SUM09B* DISPLAY "B-711-BA" SUM09B INITIALIZE DCLVXJJ0PTP SUM09B SUM09B IF NOT WI10-PTP-CURSOR-OPEN SUM09B PERFORM VGD-OPEN-PTP-CURSOR SUM09B END-IF SUM09B SUM09B PERFORM VGE-FETCH-PTP-CURSOR SUM09B PERFORM VGF-CLOSE-PTP-CURSOR. SUM09B SUM09B B-711-BA-EXIT. SUM09B EXIT. SUM09B SPR10A B-712-BA-EVALUATE-PTG SECTION. SPR10A*----------------------------------------------------------------* SPR10A* SECTION NAME :B-712-BA-EVALUATE-PTG * SPR10A* CALLED BY :B-711-B-FIND-NWS * SPR10A* :B-890-B-FIND-NWS * SPR10A* FUNCTION : * SPR10A*----------------------------------------------------------------* SPR10A B-712-BA. SPR10A SPR12A IF WH02-RETAIL-OUTLET-NO NOT = WW21-PREV-RO-NO SPR12A SET WI19-NO-PTG-FOR-STORE TO TRUE SPR12A SET PTG-NOT-FOUND TO TRUE SPR12A PERFORM YYA-CHECK-PTG-EXIST-FOR-STORE SPR12A MOVE WH02-RETAIL-OUTLET-NO TO WW21-PREV-RO-NO SPR12A END-IF SPR12A SPR12A IF WI19-PTG-FOR-STORE SPR12A IF WH02-PTP-YRWK NOT = WH02-PREV-PTG-YRWK SPR12A MOVE WH02-PTP-YRWK TO WH02-PREV-PTG-YRWK SPR12A SET PTG-NOT-FOUND TO TRUE SPR12A PERFORM B-713-BA-FIND-DAILY-PTG SPR12A END-IF SPR10A END-IF SPR10A SPR10A IF PTG-FOUND SPR10A EVALUATE WT30-PTP-DAY-NO SPR10A WHEN 1 SPR10A MOVE PTG-PTP-DAY-1 TO WW11-DAY-PTP SPR10A WHEN 2 SPR10A MOVE PTG-PTP-DAY-2 TO WW11-DAY-PTP SPR10A WHEN 3 SPR10A MOVE PTG-PTP-DAY-3 TO WW11-DAY-PTP SPR10A WHEN 4 SPR10A MOVE PTG-PTP-DAY-4 TO WW11-DAY-PTP SPR10A WHEN 5 SPR10A MOVE PTG-PTP-DAY-5 TO WW11-DAY-PTP SPR10A WHEN 6 SPR10A MOVE PTG-PTP-DAY-6 TO WW11-DAY-PTP SPR10A WHEN 7 SPR10A MOVE PTG-PTP-DAY-7 TO WW11-DAY-PTP SPR10A WHEN OTHER SPR10A MOVE PTG-PTP-DAY-1 TO WW11-DAY-PTP SPR10A END-EVALUATE SPR10A END-IF. SPR10A SPR10A B-712-BA-EXIT. SPR10A EXIT. SPR10A SPR10A B-713-BA-FIND-DAILY-PTG SECTION. SPR10A*----------------------------------------------------------------* SPR10A* SECTION NAME :B-713-BA-FIND-DAILY-PTG * SPR10A* CALLED BY :B-712-BA-EVALUATE-PTG * SPR10A* CALLS :VGG-OPEN-PTG-CURSOR * SPR10A* :VGH-FETCH-PTG-CURSOR * SPR10A* :VGI-CLOSE-PTG-CURSOR * SPR10A* FUNCTION : * SPR10A*----------------------------------------------------------------* SPR10A B-713-BA. SPR10A* DISPLAY "B-713-BA" SPR10A INITIALIZE DCLVXJJ0PTG SPR10A SPR10A IF NOT WI16-PTG-CURSOR-OPEN SPR10A PERFORM VGG-OPEN-PTG-CURSOR SPR10A END-IF SPR10A SPR10A PERFORM VGH-FETCH-PTG-CURSOR SPR10A SPR10A PERFORM VGI-CLOSE-PTG-CURSOR. SPR10A SPR10A B-713-BA-EXIT. SUM09B EXIT. SUM09B B-720-JLF40-PERIOD SECTION. 18910000 *---------------------------------------------------------------* 18920000 ADD +1 TO WX01-F46 MOVE JLF40-PER-STR-DATE(WX01-F46) TO JLF46-PER-STR-DATE(WX01-F46) MOVE JLF40-PER-STR-TIME(WX01-F46) TO JLF46-PER-STR-TIME(WX01-F46) MOVE JLF40-PER-END-DATE(WX01-F46) TO JLF46-PER-END-DATE(WX01-F46) MOVE JLF40-PER-END-TIME(WX01-F46) TO JLF46-PER-END-TIME(WX01-F46) MOVE JLF40-PERIOD-CALC-TYPE(WX01-F46) TO JLF46-PERIOD-CALC-TYPE(WX01-F46) MOVE JLF40-NOTNL-CALC-DATE(WX01-F46) TO JLF46-NOTNL-CALC-DATE(WX01-F46) MOVE JLF40-NOTNL-CALC-TIME(WX01-F46) TO JLF46-NOTNL-CALC-TIME(WX01-F46) MOVE JLF40-ORDER-TYPE(WX01-F46) TO JLF46-ORDER-TYPE(WX01-F46) MOVE JLF40-DELY-IND(WX01-F46) TO JLF46-DELY-IND(WX01-F46) MOVE JLF40-PALLET-RND-IND(WX01-F46) TO JLF46-PALLET-RND-IND(WX01-F46) MOVE JLF40-ALT-MERCH-UNIT-RND(WX01-F46) TO JLF46-ALT-MERCH-UNIT-RND(WX01-F46) MOVE JLF40-ALT-MERCH-UNITS(WX01-F46) TO JLF46-ALT-MERCH-UNITS(WX01-F46) MOVE JLF40-FIRST-ORD-TYPE-OF-DAY(WX01-F46) TO JLF46-FIRST-ORD-TYPE-OF-DAY(WX01-F46) MOVE JLF40-LAST-ORDER(WX01-F46) TO JLF46-LAST-ORDER(WX01-F46) MOVE JLF40-OPEN-FOR-TRADE-IND(WX01-F46) TO JLF46-OPEN-FOR-TRADE-IND(WX01-F46) MOVE JLF40-EXP-SHELF-LIFE(WX01-F46) TO JLF46-EXP-SHELF-LIFE(WX01-F46) MOVE JLF40-STOCK-CENTRE-NO(WX01-F46) TO JLF46-STOCK-CENTRE-NO(WX01-F46) MOVE JLF40-DEV-LINE-IND(WX01-F46) TO JLF46-DEV-LINE-IND(WX01-F46) MOVE JLF40-CUST-ORD-QTY(WX01-F46) TO JLF46-CUST-ORD-QTY(WX01-F46) 143S01 MOVE JLF40-SMFO-ORD-QTY(WX01-F46) TO 143S01 JLF46-SMFO-ORD-QTY(WX01-F46) 143S01 MOVE JLF40-SMFO-ORD-IND(WX01-F46) TO 143S01 JLF46-SMFO-ORD-IND(WX01-F46) MOVE JLF40-ALLOC-SNGLS(WX01-F46) TO JLF46-ALLOC-SNGLS(WX01-F46) MOVE JLF40-ST-PERD-STK-POS(WX01-F46) TO JLF46-ST-PERD-STK-POS(WX01-F46) MOVE JLF40-PERD-OS-ORD-QTY(WX01-F46) TO JLF46-PERD-OS-ORD-QTY(WX01-F46) MOVE JLF40-PERD-FCST-SALES(WX01-F46) TO JLF46-PERD-FCST-SALES(WX01-F46) MOVE JLF40-PERD-HOURLY-PTP(WX01-F46) TO JLF46-PERD-HOURLY-PTP(WX01-F46) MOVE JLF40-PERD-ANTIC-WASTE(WX01-F46) TO JLF46-PERD-ANTIC-WASTE(WX01-F46) MOVE JLF40-PERD-ANTIC-WASTE-SALES(WX01-F46) TO JLF46-PERD-ANTIC-WASTE-SALES(WX01-F46) MOVE JLF40-EN-PERD-STK-POS(WX01-F46) TO JLF46-EN-PERD-STK-POS(WX01-F46) MOVE JLF40-PROM-IND(WX01-F46) TO JLF46-PROM-IND(WX01-F46) MOVE JLF40-PROM-END-DATE(WX01-F46) TO JLF46-PROM-END-DATE(WX01-F46) MOVE JLF40-PROM-SHELF-CAP(WX01-F46) TO JLF46-PROM-SHELF-CAP(WX01-F46) MOVE JLF40-666-SHELF-CAP(WX01-F46) TO JLF46-666-SHELF-CAP(WX01-F46) MOVE JLF40-SAVED-NWS(WX01-F46) TO JLF46-SAVED-NWS(WX01-F46) MOVE JLF40-NEXT-PROM-SHELF-CAP(WX01-F46) TO JLF46-NEXT-PROM-SHELF-CAP(WX01-F46) MOVE JLF40-DMND-ADJMT-PERC(WX01-F46) TO JLF46-DMND-ADJMT-PERC(WX01-F46) SPR08C MOVE JLF40-MIN-PROM-CAP(WX01-F46) TO SPR08C JLF46-MIN-PROM-CAP(WX01-F46) SPR08C MOVE JLF40-MIN-PROM-REQ-IND(WX01-F46) TO SPR08C JLF46-MIN-PROM-REQ-IND(WX01-F46) SUM09A MOVE JLF40-FIXED-FILL-IND(WX01-F46) TO SUM09A JLF46-FIXED-FILL-IND(WX01-F46) MOVE JLF40-ALLOC-TYPE(WX01-F46) TO JLF46-ALLOC-TYPE(WX01-F46) MOVE JLF40-RSVE-QTY(WX01-F46) TO JLF46-RSVE-QTY(WX01-F46) MOVE JLF40-RSVE-IND(WX01-F46) TO JLF46-RSVE-IND(WX01-F46) MOVE JLF40-APPORTION-PC(WX01-F46) TO JLF46-APPORTION-PC(WX01-F46) MOVE JLF40-ALLOC-PATTERN-ID(WX01-F46) TO JLF46-ALLOC-PATTERN-ID(WX01-F46) MOVE JLF40-NEW-LINE-QTY(WX01-F46) TO JLF46-NEW-LINE-QTY(WX01-F46) MOVE JLF40-DEMO-IND(WX01-F46) TO JLF46-DEMO-IND(WX01-F46) MOVE JLF40-ROUND-UP-IND(WX01-F46) TO JLF46-ROUND-UP-IND(WX01-F46) MOVE JLF40-DMND-END-DT(WX01-F46) TO JLF46-DMND-END-DT(WX01-F46) MOVE JLF40-DMND-END-TIME(WX01-F46) TO JLF46-DMND-END-TIME(WX01-F46) MOVE JLF40-CAPACITY(WX01-F46) TO JLF46-CAPACITY(WX01-F46) MOVE JLF40-COVER-EXP-SALES(WX01-F46) TO JLF46-COVER-EXP-SALES(WX01-F46) MOVE JLF40-EXP-SALES-IN-CDLF7(WX01-F46) TO JLF46-EXP-SALES-IN-CDLF7(WX01-F46) MOVE JLF40-EXP-SALES-IN-CALC(WX01-F46) TO JLF46-EXP-SALES-IN-CALC(WX01-F46) MOVE JLF40-EXP-SALES-IN-DMND(WX01-F46) TO JLF46-EXP-SALES-IN-DMND(WX01-F46) MOVE JLF40-ANTIC-WASTE-IN-CALC(WX01-F46) TO JLF46-ANTIC-WASTE-IN-CALC(WX01-F46) MOVE JLF40-ANTIC-WASTE-IN-DMND(WX01-F46) TO JLF46-ANTIC-WASTE-IN-DMND(WX01-F46) MOVE JLF40-OS-ORD-IN-CALC(WX01-F46) TO JLF46-OS-ORD-IN-CALC(WX01-F46) MOVE JLF40-EXPIRY-DATE(WX01-F46) TO JLF46-EXPIRY-DATE(WX01-F46) MOVE JLF40-SAFE-STK-QTY(WX01-F46) TO JLF46-SAFE-STK-QTY(WX01-F46) MOVE JLF40-SALE-SAFE-STK-QTY(WX01-F46) TO JLF46-SALE-SAFE-STK-QTY(WX01-F46) MOVE JLF40-PRM-SAFETY-STK-QTY(WX01-F46) TO JLF46-PRM-SAFETY-STK-QTY(WX01-F46) MOVE JLF40-DEV-SAFETY-STK-QTY(WX01-F46) TO JLF46-DEV-SAFETY-STK-QTY(WX01-F46) MOVE JLF40-CODE-SAFE-STK-QTY(WX01-F46) TO JLF46-CODE-SAFE-STK-QTY(WX01-F46) MOVE JLF40-CUBE-SAFE-STK-QTY(WX01-F46) TO JLF46-CUBE-SAFE-STK-QTY(WX01-F46) MOVE JLF40-PURE-CUBE-SAFE-STK-QTY(WX01-F46) TO JLF46-PURE-CUBE-SAFE-STK-QTY(WX01-F46) MOVE JLF40-ADJ-SAFETY-STK-QTY(WX01-F46) TO JLF46-ADJ-SAFETY-STK-QTY(WX01-F46) MOVE JLF40-CALC-METHOD(WX01-F46) TO JLF46-CALC-METHOD(WX01-F46) MOVE JLF40-RAW-DEMAND(WX01-F46) TO JLF46-RAW-DEMAND(WX01-F46) MOVE JLF40-CR-CASE-QTY(WX01-F46) TO JLF46-CR-CASE-QTY(WX01-F46) MOVE JLF40-FINAL-CASE-QTY(WX01-F46) TO JLF46-FINAL-CASE-QTY(WX01-F46) MOVE JLF40-ORDER-PRIORITY(WX01-F46) TO JLF46-ORDER-PRIORITY(WX01-F46) MOVE JLF40-OUT-OF-TOLERANCE(WX01-F46) TO JLF46-OUT-OF-TOLERANCE(WX01-F46) MOVE JLF40-SALES-DEVI-TOL-IND(WX01-F46) TO JLF46-SALES-DEVI-TOL-IND(WX01-F46) MOVE JLF40-ACTUAL-STK-POS(WX01-F46) TO JLF46-ACTUAL-STK-POS(WX01-F46) MOVE JLF40-STANDING-ORD-QTY(WX01-F46) TO JLF46-STANDING-ORD-QTY(WX01-F46) MOVE JLF40-STK-FILL-IND(WX01-F46) TO JLF46-STK-FILL-IND(WX01-F46) MOVE JLF40-STK-FILL-WK-IND(WX01-F46) TO JLF46-STK-FILL-WK-IND(WX01-F46) MOVE JLF40-GAP-ORDER-SNGLS-QTY(WX01-F46) TO JLF46-GAP-ORDER-SNGLS-QTY(WX01-F46) MOVE JLF40-FULL-FILL-CAP-RND(WX01-F46) TO JLF46-FULL-FILL-CAP-RND(WX01-F46) MOVE JLF40-EXP-DEMAND-RND(WX01-F46) TO JLF46-EXP-DEMAND-RND(WX01-F46) MOVE JLF40-ALT-MERCH-RND(WX01-F46) TO JLF46-ALT-MERCH-RND(WX01-F46) MOVE JLF40-PROM-RUN-DOWN-RND(WX01-F46) TO JLF46-PROM-RUN-DOWN-RND(WX01-F46) MOVE JLF40-DISC-RUN-DOWN-RND(WX01-F46) TO JLF46-DISC-RUN-DOWN-RND(WX01-F46) MOVE JLF40-CUST-ORD-RND(WX01-F46) TO JLF46-CUST-ORD-RND(WX01-F46) 143S01 MOVE JLF40-SMFO-ORD-RND(WX01-F46) TO 143S01 JLF46-SMFO-ORD-RND(WX01-F46) MOVE JLF40-ALLOC-RND(WX01-F46) TO JLF46-ALLOC-RND(WX01-F46) MOVE JLF40-PALLET-RND(WX01-F46) TO JLF46-PALLET-RND(WX01-F46) MOVE JLF40-GAP-ORD-RND(WX01-F46) TO JLF46-GAP-ORD-RND(WX01-F46) MOVE JLF40-CONTROL-DATA(WX01-F46) TO JLF46-CONTROL-DATA(WX01-F46) MOVE JLF40-RSVE-FUTURE-IND(WX01-F46) TO JLF46-RSVE-FUTURE-IND(WX01-F46) SPR14A MOVE ZERO TO SPR14A JLF46-POT-REDN-EXPIRY(WX01-F46) SPR14A JLF46-REDN-SALES(WX01-F46) AVRS32 MOVE WT10-PREV-ORD-QTY(WX01-F46) TO AVRS32 JLF46-PREV-ORD-QTY(WX01-F46) AVRS32 MOVE WT10-PROD-EXT-IND(WX01-F46) TO AVRS32 JLF46-PROD-EXT-IND(WX01-F46) AVRS32 MOVE WT10-PROD-CALC-IND(WX01-F46) TO AVRS32 JLF46-PROD-CALC-IND(WX01-F46) . 19040000 B-720-EXIT. 19050000 EXIT. 19040000 SUM11A B-620-JLF40-PERIOD SECTION. 18910000 SUM11A*---------------------------------------------------------------* 18920000 SUM11A* DISPLAY "B-620-JLF40-PERIOD" SUM11A ADD +1 TO WX01-F42 SUM11A MOVE JLF40-PER-STR-DATE(WX01-F42) TO SUM11A JLF42-PER-STR-DATE(WX01-F42) SUM11A MOVE JLF40-PER-STR-TIME(WX01-F42) TO SUM11A JLF42-PER-STR-TIME(WX01-F42) SUM11A MOVE JLF40-PER-END-DATE(WX01-F42) TO SUM11A JLF42-PER-END-DATE(WX01-F42) SUM11A MOVE JLF40-PER-END-TIME(WX01-F42) TO SUM11A JLF42-PER-END-TIME(WX01-F42) SUM11A MOVE JLF40-PERIOD-CALC-TYPE(WX01-F42) TO SUM11A JLF42-PERIOD-CALC-TYPE(WX01-F42) SUM11A MOVE JLF40-NOTNL-CALC-DATE(WX01-F42) TO SUM11A JLF42-NOTNL-CALC-DATE(WX01-F42) SUM11A MOVE JLF40-NOTNL-CALC-TIME(WX01-F42) TO SUM11A JLF42-NOTNL-CALC-TIME(WX01-F42) SUM11A MOVE JLF40-ORDER-TYPE(WX01-F42) TO SUM11A JLF42-ORDER-TYPE(WX01-F42) SUM11A MOVE JLF40-DELY-IND(WX01-F42) TO SUM11A JLF42-DELY-IND(WX01-F42) SUM11A MOVE JLF40-PALLET-RND-IND(WX01-F42) TO SUM11A JLF42-PALLET-RND-IND(WX01-F42) SUM11A MOVE JLF40-ALT-MERCH-UNIT-RND(WX01-F42) TO SUM11A JLF42-ALT-MERCH-UNIT-RND(WX01-F42) SUM11A MOVE JLF40-ALT-MERCH-UNITS(WX01-F42) TO SUM11A JLF42-ALT-MERCH-UNITS(WX01-F42) SUM11A MOVE JLF40-FIRST-ORD-TYPE-OF-DAY(WX01-F42) TO SUM11A JLF42-FIRST-ORD-TYPE-OF-DAY(WX01-F42) SUM11A MOVE JLF40-LAST-ORDER(WX01-F42) TO SUM11A JLF42-LAST-ORDER(WX01-F42) SUM11A MOVE JLF40-OPEN-FOR-TRADE-IND(WX01-F42) TO SUM11A JLF42-OPEN-FOR-TRADE-IND(WX01-F42) SUM11A MOVE JLF40-EXP-SHELF-LIFE(WX01-F42) TO SUM11A JLF42-EXP-SHELF-LIFE(WX01-F42) SUM11A MOVE JLF40-STOCK-CENTRE-NO(WX01-F42) TO SUM11A JLF42-STOCK-CENTRE-NO(WX01-F42) SUM11A MOVE JLF40-CUST-ORD-QTY(WX01-F42) TO SUM11A JLF42-CUST-ORD-QTY(WX01-F42) 143S01 MOVE JLF40-SMFO-ORD-QTY(WX01-F42) TO 143S01 JLF42-SMFO-ORD-QTY(WX01-F42) 143S01 MOVE JLF40-SMFO-ORD-IND(WX01-F42) TO 143S01 JLF42-SMFO-ORD-IND(WX01-F42) 143S01 MOVE JLF40-SMFO-ORD-RND(WX01-F42) TO 143S01 JLF42-SMFO-ORD-RND(WX01-F42) SUM11A MOVE JLF40-ALLOC-SNGLS(WX01-F42) TO SUM11A JLF42-ALLOC-SNGLS(WX01-F42) SUM11A MOVE JLF40-ST-PERD-STK-POS(WX01-F42) TO SUM11A JLF42-ST-PERD-STK-POS(WX01-F42) SUM11A MOVE JLF40-PERD-FCST-SALES(WX01-F42) TO SUM11A JLF42-PERD-FCST-SALES(WX01-F42) SUM11A MOVE JLF40-PERD-HOURLY-PTP(WX01-F42) TO SUM11A JLF42-PERD-HOURLY-PTP(WX01-F42) SUM11A MOVE JLF40-PERD-ANTIC-WASTE(WX01-F42) TO SUM11A JLF42-PERD-ANTIC-WASTE(WX01-F42) SUM11A MOVE JLF40-PERD-ANTIC-WASTE-SALES(WX01-F42) TO SUM11A JLF42-PERD-ANTIC-WASTE-SALES(WX01-F42) SUM11A MOVE JLF40-EN-PERD-STK-POS(WX01-F42) TO SUM11A JLF42-EN-PERD-STK-POS(WX01-F42) SUM11A MOVE JLF40-PROM-IND(WX01-F42) TO SUM11A JLF42-PROM-IND(WX01-F42) SUM11A MOVE JLF40-PROM-SHELF-CAP(WX01-F42) TO SUM11A JLF42-PROM-SHELF-CAP(WX01-F42) SUM13A JLF42-PROM-SHELF-CAP-OLD(WX01-F42) SUM11A MOVE JLF40-666-SHELF-CAP(WX01-F42) TO SUM11A JLF42-666-SHELF-CAP(WX01-F42) SUM11A MOVE JLF40-SAVED-NWS(WX01-F42) TO SUM11A JLF42-SAVED-NWS(WX01-F42) SUM11A MOVE JLF40-MIN-PROM-CAP(WX01-F42) TO SUM11A JLF42-MIN-PROM-CAP(WX01-F42) SUM11A MOVE JLF40-MIN-PROM-REQ-IND(WX01-F42) TO SUM11A JLF42-MIN-PROM-REQ-IND(WX01-F42) SUM11A MOVE JLF40-FIXED-FILL-IND(WX01-F42) TO SUM11A JLF42-FIXED-FILL-IND(WX01-F42) SUM11A MOVE JLF40-ALLOC-TYPE(WX01-F42) TO SUM11A JLF42-ALLOC-TYPE(WX01-F42) SUM11A MOVE JLF40-RSVE-QTY(WX01-F42) TO SUM11A JLF42-RSVE-QTY(WX01-F42) SUM11A MOVE JLF40-RSVE-IND(WX01-F42) TO SUM11A JLF42-RSVE-IND(WX01-F42) SUM11A MOVE JLF40-APPORTION-PC(WX01-F42) TO SUM11A JLF42-APPORTION-PC(WX01-F42) SUM11A MOVE JLF40-ALLOC-PATTERN-ID(WX01-F42) TO SUM11A JLF42-ALLOC-PATTERN-ID(WX01-F42) SUM11A MOVE JLF40-NEW-LINE-QTY(WX01-F42) TO SUM11A JLF42-NEW-LINE-QTY(WX01-F42) SUM11A MOVE JLF40-DEMO-IND(WX01-F42) TO SUM11A JLF42-DEMO-IND(WX01-F42) SUM11A MOVE JLF40-ROUND-UP-IND(WX01-F42) TO SUM11A JLF42-ROUND-UP-IND(WX01-F42) SUM11A MOVE JLF40-DMND-END-DT(WX01-F42) TO SUM11A JLF42-DMND-END-DT(WX01-F42) SUM11A MOVE JLF40-DMND-END-TIME(WX01-F42) TO SUM11A JLF42-DMND-END-TIME(WX01-F42) SUM11A MOVE JLF40-CAPACITY(WX01-F42) TO SUM11A JLF42-CAPACITY(WX01-F42) SUM11A MOVE JLF40-COVER-EXP-SALES(WX01-F42) TO SUM11A JLF42-COVER-EXP-SALES(WX01-F42) SUM11A MOVE JLF40-EXP-SALES-IN-CDLF7(WX01-F42) TO SUM11A JLF42-EXP-SALES-IN-CDLF7(WX01-F42) SUM11A MOVE JLF40-EXP-SALES-IN-CALC(WX01-F42) TO SUM11A JLF42-EXP-SALES-IN-CALC(WX01-F42) SUM11A MOVE JLF40-EXP-SALES-IN-DMND(WX01-F42) TO SUM11A JLF42-EXP-SALES-IN-DMND(WX01-F42) SUM11A MOVE JLF40-ANTIC-WASTE-IN-CALC(WX01-F42) TO SUM11A JLF42-ANTIC-WASTE-IN-CALC(WX01-F42) SUM11A MOVE JLF40-ANTIC-WASTE-IN-DMND(WX01-F42) TO SUM11A JLF42-ANTIC-WASTE-IN-DMND(WX01-F42) SUM11A MOVE JLF40-OS-ORD-IN-CALC(WX01-F42) TO SUM11A JLF42-OS-ORD-IN-CALC(WX01-F42) SUM11A MOVE JLF40-EXPIRY-DATE(WX01-F42) TO SUM11A JLF42-EXPIRY-DATE(WX01-F42) SUM11A MOVE JLF40-SAFE-STK-QTY(WX01-F42) TO SUM11A JLF42-SAFE-STK-QTY(WX01-F42) SUM11A MOVE JLF40-SALE-SAFE-STK-QTY(WX01-F42) TO SUM11A JLF42-SALE-SAFE-STK-QTY(WX01-F42) SUM11A MOVE JLF40-PRM-SAFETY-STK-QTY(WX01-F42) TO SUM11A JLF42-PRM-SAFETY-STK-QTY(WX01-F42) SUM11A MOVE JLF40-CODE-SAFE-STK-QTY(WX01-F42) TO SUM11A JLF42-CODE-SAFE-STK-QTY(WX01-F42) SUM11A MOVE JLF40-CUBE-SAFE-STK-QTY(WX01-F42) TO SUM11A JLF42-CUBE-SAFE-STK-QTY(WX01-F42) SUM11A MOVE JLF40-PURE-CUBE-SAFE-STK-QTY(WX01-F42) TO SUM11A JLF42-PURE-CUBE-SAFE-STK-QTY(WX01-F42) SUM11A MOVE JLF40-ADJ-SAFETY-STK-QTY(WX01-F42) TO SUM11A JLF42-ADJ-SAFETY-STK-QTY(WX01-F42) SUM11A MOVE JLF40-CALC-METHOD(WX01-F42) TO SUM11A JLF42-CALC-METHOD(WX01-F42) SUM11A MOVE JLF40-CR-CASE-QTY(WX01-F42) TO SUM11A JLF42-CR-CASE-QTY(WX01-F42) SUM11A MOVE JLF40-FINAL-CASE-QTY(WX01-F42) TO SUM11A JLF42-FINAL-CASE-QTY(WX01-F42) SUM11A MOVE JLF40-ORDER-PRIORITY(WX01-F42) TO SUM11A JLF42-ORDER-PRIORITY(WX01-F42) SUM11A MOVE JLF40-OUT-OF-TOLERANCE(WX01-F42) TO SUM11A JLF42-OUT-OF-TOLERANCE(WX01-F42) SUM11A MOVE JLF40-SALES-DEVI-TOL-IND(WX01-F42) TO SUM11A JLF42-SALES-DEVI-TOL-IND(WX01-F42) SUM11A MOVE JLF40-ACTUAL-STK-POS(WX01-F42) TO SUM11A JLF42-ACTUAL-STK-POS(WX01-F42) SUM11A MOVE JLF40-STK-FILL-IND(WX01-F42) TO SUM11A JLF42-STK-FILL-IND(WX01-F42) SUM11A MOVE JLF40-STK-FILL-WK-IND(WX01-F42) TO SUM11A JLF42-STK-FILL-WK-IND(WX01-F42) SUM11A MOVE JLF40-GAP-ORDER-SNGLS-QTY(WX01-F42) TO SUM11A JLF42-GAP-ORDER-SNGLS-QTY(WX01-F42) SUM11A MOVE JLF40-FULL-FILL-CAP-RND(WX01-F42) TO SUM11A JLF42-FULL-FILL-CAP-RND(WX01-F42) SUM11A MOVE JLF40-EXP-DEMAND-RND(WX01-F42) TO SUM11A JLF42-EXP-DEMAND-RND(WX01-F42) SUM11A MOVE JLF40-ALT-MERCH-RND(WX01-F42) TO SUM11A JLF42-ALT-MERCH-RND(WX01-F42) SUM11A MOVE JLF40-CUST-ORD-RND(WX01-F42) TO SUM11A JLF42-CUST-ORD-RND(WX01-F42) SUM11A MOVE JLF40-ALLOC-RND(WX01-F42) TO SUM11A JLF42-ALLOC-RND(WX01-F42) SUM11A MOVE JLF40-PALLET-RND(WX01-F42) TO SUM11A JLF42-PALLET-RND(WX01-F42) SUM11A MOVE JLF40-GAP-ORD-RND(WX01-F42) TO SUM11A JLF42-GAP-ORD-RND(WX01-F42) SUM11A MOVE JLF40-CONTROL-DATA(WX01-F42) TO SUM11A JLF42-CONTROL-DATA(WX01-F42) SUM11A MOVE JLF40-RSVE-FUTURE-IND(WX01-F42) TO SUM11A JLF42-RSVE-FUTURE-IND(WX01-F42) SPR13B MOVE ZERO TO SPR13B JLF42-BGO-SALES-ORDER(WX01-F42) SUM13A JLF42-ADD-SHELF-CAP(WX01-F42) SUM13A JLF42-ADD-SHELF-CAP-FLEX(WX01-F42) SUM13A JLF42-EST-SALES-NEXT-RP-DEL(WX01-F42) SUM13A MOVE SPACES TO SUM13A JLF42-NXT-RP-DEL-DT(WX01-F42) SUM11A . 19040000 SUM11A B-620-EXIT. 19050000 SUM11A EXIT. 19040000 TA1226 B-621-JLF42-PERIOD SECTION. 18910000 TA1226*---------------------------------------------------------------* 18860000 TA1226* SECTION NAME : B-621-JLF42-PERIOD * 18870000 TA1226* CALLED BY : B-610-COPY-JLF40 * 18880000 TA1226* CALLS : * 18900000 TA1226* FUNCTION : COPY THE SHELF SPACE FROM F40 ARRAY * 18920000 TA1226*---------------------------------------------------------------* 18950000 TA1226 ADD +1 TO WX01-F42 TA1226 IF JLF42-PER-STR-DATE(WX01-F42) > SPACES TA1226 IF JLF40-PER-STR-DATE(WX01-F42) TA1226 = JLF42-BGO2-SALES-DATE(WX01-BGO2) TA1226 MOVE JLF40-PROM-SHELF-CAP(WX01-F42) TA1226 TO JLF42-BGO2-PROM-SHELF-CAP(WX01-BGO2) TA1226 ADD 1 TO WX01-BGO2 TA1226 END-IF TA1226 ELSE TA1226 SET END-OF-SHELF TO TRUE TA1226 END-IF TA1226 . 19040000 TA1226 B-621-EXIT. 19050000 TA1226 EXIT. TA1226 B-622-STACK-SHELF-CAP SECTION. TA1226*---------------------------------------------------------------* 18860000 TA1226* SECTION NAME : B-622-STACK-SHELF-CAP * 18870000 TA1226* CALLED BY : B-610-COPY-JLF40 * 18880000 TA1226* CALLS : * 18900000 TA1226* FUNCTION : GET THE SHELF CAPACITY FOR THE STACK BUILDS * 18920000 TA1226*---------------------------------------------------------------* 18950000 TA1226 PERFORM V-940-OPEN-READNEXT-XSB-STACK 16323400 TA1226 PERFORM V-950-FETCH-READNEXT-XSB-STACK 16323500 TA1226 PERFORM UNTIL END-XSB-STACK 10910065 TA1226 MOVE WX01-BGO2 TO WX02-BGO2 TA1226 PERFORM B-624-LOAD-STACK 10920065 TA1226 PERFORM V-950-FETCH-READNEXT-XSB-STACK 10930067 TA1226 END-PERFORM 16324000 TA1226 PERFORM V-960-CLOSE-READNEXT-XSB-STACK 16324200 TA1226 . TA1226 B-622-EXIT. TA1226 EXIT. TA1226 TA1226 B-623-PROM-SHELF-CAP SECTION. TA1226*---------------------------------------------------------------* 18860000 TA1226* SECTION NAME : B-622-STACK-SHELF-CAP * 18870000 TA1226* CALLED BY : B-610-COPY-JLF40 * 18880000 TA1226* CALLS : * 18900000 TA1226* FUNCTION : GET THE SHELF CAPACITY FOR THE PROMOTIONS * 18920000 TA1226*---------------------------------------------------------------* 18950000 TA1226 PERFORM V-910-OPEN-READNEXT-XSB-RST 16323400 TA1226 PERFORM V-920-FETCH-READNEXT-XSB-RST 16323500 TA1226 TA1226 MOVE WX01-BGO2 TO WX02-BGO2 TA1226 PERFORM UNTIL END-XSB-RST 10910065 TA1226 PERFORM B-625-ASSIGN-PROM-CAP 10920065 TA1226 PERFORM V-920-FETCH-READNEXT-XSB-RST 10930067 TA1226 END-PERFORM 16324000 TA1226 10950049 TA1226 PERFORM V-930-CLOSE-READNEXT-XSB-RST 16324200 TA1226 . TA1226 B-623-EXIT. TA1226 EXIT. TA1226 B-624-LOAD-STACK SECTION. 18850000 TA1226*---------------------------------------------------------------* 18860000 TA1226* SECTION NAME : B-624-LOAD-STACK * 18870000 TA1226* CALLED BY : B-622-STACK-SHELF-CAP * 18880000 TA1226* CALLS : * 18900000 TA1226* FUNCTION : ADD THE JLF42 SHELF SPACE ARRAY FOR STACKS * 18920000 TA1226*---------------------------------------------------------------* 18950000 TA1226 B-624. 18960000 TA1226 18970000 TA1226* DISPLAY "B-624-LOAD-STACK " 18970000 TA1226 PERFORM VARYING WX01-F42 FROM WX02-BGO2 BY 1 TA1226 UNTIL WX01-F42 > (WX02-BGO2 + 21) TA1226 IF (JLF42-BGO2-SALES-DATE(WX01-F42) >= WH-BGO-EXP-STEP-EFF-DT TA1226 AND JLF42-BGO2-SALES-DATE(WX01-F42) <= WH-BGO-EXP-STEP-END-DT TA1226 )OR TA1226 (WH-BGO-OFFER-DATE-NULL = 0 TA1226 AND (JLF42-BGO2-SALES-DATE(WX01-F42) >= TA1226 WH-BGO-PRE-OFFER-DEL-DATE) TA1226 AND (JLF42-BGO2-SALES-DATE(WX01-F42) <= TA1226 WH-BGO-EXP-STEP-END-DT)) TA1226 TA1226 IF WH-BGO-OFFER-CAP-NULL = 0 TA1226 ADD WH-BGO-OFFER-SHELF-CAP TO TA1226 JLF42-BGO2-PROM-SHELF-CAP(WX01-F42) TA1226 ELSE TA1226 ADD ZEROS TO TA1226 JLF42-BGO2-PROM-SHELF-CAP(WX01-F42) TA1226 END-IF TA1226 END-IF TA1226 END-PERFORM TA1226 . TA1226 B-624-EXIT. 17174833 TA1226 EXIT. 18530000 TA1226 B-625-ASSIGN-PROM-CAP SECTION. 17060020 TA1226*---------------------------------------------------------------* 18860000 TA1226* SECTION NAME : B-625-ASSIGN-PROM-CAP * 18870000 TA1226* CALLED BY : B-623-PROM-SHELF-CAP * 18880000 TA1226* CALLS : * 18900000 TA1226* FUNCTION : ADD THE JLF42 SHELF SPACE ARRAY FOR PROMOTIONS* 18920000 TA1226*---------------------------------------------------------------* 18950000 TA1226 PERFORM VARYING WX01-F42 FROM WX02-BGO2 BY 1 TA1226 UNTIL WX01-F42 > (WX01-BGO2 + 22) TA1226 IF (JLF42-BGO2-SALES-DATE(WX01-F42) >= WH-BGO-EXP-STEP-EFF-DT TA1226 AND JLF42-BGO2-SALES-DATE(WX01-F42) <= WH-BGO-EXP-STEP-END-DT TA1226 ) OR TA1226 (WH-BGO-OFFER-DATE-NULL = 0 TA1226 AND (JLF42-BGO2-SALES-DATE(WX01-F42) >= TA1226 WH-BGO-PRE-OFFER-DEL-DATE) TA1226 AND (JLF42-BGO2-SALES-DATE(WX01-F42) <= TA1226 WH-BGO-EXP-STEP-END-DT)) TA1226 TA1226 IF WH-BGO-OFFER-CAP-NULL = 0 TA1226 ADD WH-BGO-OFFER-SHELF-CAP TO TA1226 JLF42-BGO2-PROM-SHELF-CAP(WX01-F42) TA1226 ELSE TA1226 ADD ZEROS TO TA1226 JLF42-BGO2-PROM-SHELF-CAP(WX01-F42) TA1226 END-IF TA1226 END-IF TA1226 END-PERFORM. TA1226 B-625-EXIT. TA1226 EXIT. 19040000 18910000 B-730-JLF40-DAY-TABLE SECTION. 18910000 *---------------------------------------------------------------* 18920000 ADD +1 TO WX01-F46 MOVE JLF40-DAY-TABLE(WX01-F46) TO JLF46-DAY-TABLE(WX01-F46) . 19040000 B-730-EXIT. 19050000 EXIT. SUM11A B-630-JLF40-DAY-TABLE SECTION. 18910000 SUM11A*---------------------------------------------------------------* 18920000 SUM11A* DISPLAY "B-630-JLF40-DAY-TABLE" 18920000 SUM11A ADD +1 TO WX01-F42 SUM11A MOVE JLF40-DAY-TABLE(WX01-F42) TO SUM11A JLF42-DAY-TABLE(WX01-F42) SUM11A . 19040000 SUM11A B-630-EXIT. 19050000 EXIT. SUM10A B-740-POPUL-JLF46-MISSNG-SALES SECTION. 19040000 SUM10A*----------------------------------------------------------------* SUM10A* SECTION NAME :B-740-POPUL-JLF46-MISSNG-SALES * SUM10A* CALLED BY :B-880-AO-CREATE-OUTPUT * SUM10A* CALLS :NONE * SUM10A* FUNCTION :POPULATES THE MISSING BSP EXPECTED DAILY SALES * SUM10A* :INTO THE F46 LINKAGE VARIABLES. * SUM10A*----------------------------------------------------------------* SUM10A 19040000 SUM12A PERFORM BA-540-GET-WRAP-WEEK DIS12A* IF WW01-CURR-RO-NO = 9101 DIS12A* DISPLAY "WT95-ARRAY:YEAR-WK/PTG-PTP-DONE/" DIS12A* "PTG-ENTRY/PTP-S-ENTRY/XSA-NIA-DONE/XSA-NIA-FOUND" DIS12A* PERFORM VARYING WX95-DISP FROM 1 BY 1 UNTIL WX95-DISP > 5 DIS12A* DISPLAY " "WT95-RTL-YEAR-WK(WX95-DISP)" /" DIS12A* WT95-PTG-PTP-DONE(WX95-DISP)" /" DIS12A* WT95-PTG-ENTRY(WX95-DISP)" /" DIS12A* WT95-PTP-S-ENTRY(WX95-DISP)" /" DIS12A* WT95-XSA-NIA-DONE(WX95-DISP)" /" DIS12A* WT95-XSA-NIA-FOUND(WX95-DISP) DIS12A* END-PERFORM DIS12A* END-IF SUM12A MOVE 1 TO WX01-SUB SUM12A PERFORM UNTIL SUM12A JLF40-SALES-YRWK (WX01-SUB) = WW24-WRAP-YEAR-WEEK SUM12A OR WX01-SUB > 50 SUM12A ADD 1 TO WX01-SUB SUM12A END-PERFORM SUM10A SET DATE-NOT-FOUND TO TRUE 19040000 SUM10A MOVE 1 TO WX10-DATE-SUB 19040000 SUM10A PERFORM UNTIL WX10-DATE-SUB > WX10-DATE-MAX 19040000 SUM10A OR DATE-FOUND 19040000 SUM10A IF WT30-TESCO-YEAR(WX10-DATE-SUB) 19040000 SUM10A = WW15-LAST-BSP-TESCO-YEAR 19040000 SUM10A AND WT30-TESCO-WEEK(WX10-DATE-SUB) 19040000 SUM10A = WW15-LAST-BSP-TESCO-WEEK 19040000 SUM10A ADD +7 TO WX10-DATE-SUB 19040000 SUM10A SET DATE-FOUND TO TRUE 19040000 SUM10A ELSE 19040000 SUM10A ADD +1 TO WX10-DATE-SUB 19040000 SUM10A END-IF 19040000 SUM10A END-PERFORM 19040000 SUM10A 19040000 SUM12A*POPULATE THE FUTURE DAY'S SALES WITH WRAP WEEK SALES. sm1588 SUM10A PERFORM 19040000 SUM10A UNTIL WX10-DATE-SUB > 50 19040000 SUM10A OR (JLF46-SALES-CCYYMMD (WX10-DATE-SUB) 19040000 SUM10A > WW15-DATE-TILL-BSP-SALES-RQD ) 19040000 SUM10A 19040000 SUM10A 19040000 SUM10A 19040000 SUM12A MOVE 1 TO WX22-SUB SUM12A PERFORM SUM12A UNTIL WX22-SUB > 7 SUM12A OR (JLF46-SALES-CCYYMMD (WX10-DATE-SUB) 19040000 SUM12A > WW15-DATE-TILL-BSP-SALES-RQD ) 19040000 BUGFIX OR WX10-DATE-SUB > 50 SUM10A MOVE JLF46-DAY-FCST-SALES (WX01-SUB) 19040000 SUM10A TO JLF46-DAY-FCST-SALES (WX10-DATE-SUB) 19040000 SUM10A WT80-DAY-FCST-SALES (WX10-DATE-SUB) 19040000 AVRS42 MOVE WW-PREVIOUS-NWS PS2S11 TO JLF46-DAY-FCST-NWS(WX10-DATE-SUB) SUM10A WT80-DAY-FCST-NWS (WX10-DATE-SUB) 19040000 AVRS42 IF WI36-ESP-VALUES-YES AVRS42 MOVE JLF46-KA(WX01-SUB) AVRS42 TO WT85-KA(WX10-DATE-SUB) AVRS42 JLF46-KA(WX10-DATE-SUB) AVRS42 MOVE JLF46-TREND(WX01-SUB) AVRS42 TO WT85-TREND(WX10-DATE-SUB) AVRS42 JLF46-TREND(WX10-DATE-SUB) AVRS42 END-IF SUM12A ADD 1 TO WX22-SUB SUM12A WX01-SUB SUM10A 19040000 SUM10A 19040000 SUM10A ADD 1 TO WX10-DATE-SUB 19040000 SUM10A END-PERFORM 19040000 SUM12A SUBTRACT 7 FROM WX01-SUB SUM10A 19040000 SUM10A END-PERFORM 19040000 SUM10A 19040000 SUM10A . 19040000 SUM10A B-740-EXIT. 19040000 SUM10A EXIT. 19040000 18910000 SUM11A B-640-POPUL-JLF42-MISSNG-SALES SECTION. 19040000 SUM11A*----------------------------------------------------------------* SUM11A* SECTION NAME :B-640-POPUL-JLF42-MISSNG-SALES * SUM11A* CALLED BY :B-980-AO-CREATE-OUTPUT * SUM11A* CALLS :NONE * SUM11A* FUNCTION :POPULATES THE MISSING BSP EXPECTED DAILY SALES * SUM11A* :INTO THE F42 LINKAGE VARIABLES. * SUM11A*----------------------------------------------------------------* SUM12A SUM12A PERFORM BA-540-GET-WRAP-WEEK DIS12A* IF WW01-CURR-RO-NO = 9101 DIS12A* DISPLAY "WT95-ARRAY:YEAR-WK/PTG-PTP-DONE/" DIS12A* "PTG-ENTRY/PTP-S-ENTRY/XSA-NIA-DONE/XSA-NIA-FOUND" DIS12A* PERFORM VARYING WX95-DISP FROM 1 BY 1 UNTIL WX95-DISP > 5 DIS12A* DISPLAY " "WT95-RTL-YEAR-WK(WX95-DISP)" /" DIS12A* WT95-PTG-PTP-DONE(WX95-DISP)" /" DIS12A* WT95-PTG-ENTRY(WX95-DISP)" /" DIS12A* WT95-PTP-S-ENTRY(WX95-DISP)" /" DIS12A* WT95-XSA-NIA-DONE(WX95-DISP)" /" DIS12A* WT95-XSA-NIA-FOUND(WX95-DISP) DIS12A* END-PERFORM DIS12A* END-IF SUM12A MOVE 1 TO WX01-SUB SUM12A PERFORM UNTIL SUM12A JLF40-SALES-YRWK (WX01-SUB) = WW24-WRAP-YEAR-WEEK SUM12A OR WX01-SUB > 50 SUM12A ADD 1 TO WX01-SUB SUM12A END-PERFORM SUM11A SET DATE-NOT-FOUND TO TRUE 19040000 SUM11A MOVE 1 TO WX10-DATE-SUB 19040000 SUM11A PERFORM UNTIL WX10-DATE-SUB > WX10-DATE-MAX 19040000 SUM11A OR DATE-FOUND 19040000 SUM11A IF WT30-TESCO-YEAR(WX10-DATE-SUB) 19040000 SUM11A = WW15-LAST-BSP-TESCO-YEAR 19040000 SUM11A AND WT30-TESCO-WEEK(WX10-DATE-SUB) 19040000 SUM11A = WW15-LAST-BSP-TESCO-WEEK 19040000 SUM11A ADD +7 TO WX10-DATE-SUB 19040000 SUM11A SET DATE-FOUND TO TRUE 19040000 SUM11A ELSE 19040000 SUM11A ADD +1 TO WX10-DATE-SUB 19040000 SUM11A END-IF 19040000 SUM11A END-PERFORM 19040000 SUM11A 19040000 SUM12A*POPULATE THE FUTURE DAY'S SALES WITH WRAP WEEK SALES. SUM11A 19040000 SUM11A PERFORM 19040000 SUM11A UNTIL WX10-DATE-SUB > 50 19040000 SUM11A OR (JLF42-SALES-CCYYMMD (WX10-DATE-SUB) 19040000 SUM11A > WW10-MAX-DATE-WF ) 19040000 SUM11A 19040000 SUM11A 19040000 SUM12A MOVE 1 TO WX22-SUB SUM12A PERFORM SUM12A UNTIL WX22-SUB > 7 SUM12A OR WX10-DATE-SUB > 50 SUM12A OR (JLF42-SALES-CCYYMMD (WX10-DATE-SUB) SUM12A > WW10-MAX-DATE-WF ) SUM11A MOVE JLF42-DAY-FCST-SALES (WX01-SUB) 19040000 SUM11A TO JLF42-DAY-FCST-SALES (WX10-DATE-SUB) 19040000 SUM11A WT80-DAY-FCST-SALES (WX10-DATE-SUB) 19040000 SUM12A ADD 1 TO WX22-SUB SUM12A WX01-SUB SUM11A 19040000 SUM11A 19040000 SUM11A ADD 1 TO WX10-DATE-SUB SUM11A END-PERFORM 19040000 SUM12A SUBTRACT 7 FROM WX01-SUB SUM11A END-PERFORM 19040000 SUM11A . 19040000 SUM11A B-640-EXIT. 19040000 SUM11A EXIT. 19040000 18910000 255600 B-750-CREATE-JLFODKSS-FILE SECTION. 255700*---------------------------------------------------------------* 255800* SECTION NAME : B-750-CREATE-JLFODKSS * 255900* CALLED BY : * 256000* CALLS : * 256100* FUNCTION : 1. WRITES CHANGES OF SALES-TREND-IND TO * 256200* : DKSS FILE. * 256300*---------------------------------------------------------------* 256400 B-750. 498400* DISPLAY "B-750". 49840018 256600 MOVE WW01-CURR-PART-NO TO JLF30-CR-PART-NO. 256700 MOVE WW01-CURR-RO-NO TO JLF30-RETAIL-OUTLET-NO. 256800 MOVE WW01-CURR-BPR-TPN TO JLF30-BASE-PRODUCT-NO. 256900 MOVE JLF40-DKSS-SALES-TREND-IND TO JLF30-SFTY-STK-TREND-IND. 298100 499000* DISPLAY "B-750 1". 49900018 257100 PERFORM Y-700-WRITE-JLFODKSS. 499200* DISPLAY "B-750 2". 49920018 298500 257300 B-750-EXIT. 190600 EXIT. 19060000 298800 19070000 282300 B-780-CREATE-JLFOEOOC-FILE SECTION. 282400*---------------------------------------------------------------* 282500* SECTION NAME : B-780-CREATE-JLFOEOOC * 282600* CALLED BY : * 282700* CALLS : * 282800* FUNCTION : 1. WRITES EXPECTED OUT OF CODE QUANTITY TO * 282900* : EOOC FILE. * 283000*---------------------------------------------------------------* 283100 B-780. 500600* DISPLAY "B-780". 50060018 283300 PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 283500 UNTIL WX10-DATA-SUB1 > 75 283600 OR JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 501000* DISPLAY "B-780 1 " 50100018 283700 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) NOT = 283800 JLF40-PER-END-DATE(WX10-DATA-SUB1) *****************AND JLF40-PERD-ANTIC-WASTE(WX10-DATA-SUB1) > 0 501400* DISPLAY "B-780 2 " 50140018 283900 MOVE WW01-CURR-PART-NO TO JLFOE-CR-PART-NO 284000 MOVE WW01-CURR-RO-NO TO JLFOE-RETAIL-OUTLET-NO 284100 MOVE WW01-CURR-BPR-TPN TO JLFOE-BASE-PRODUCT-NO 284200 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) TO 284300 JLFOE-DATE 284400 MOVE JLF40-PERD-ANTIC-WASTE(WX10-DATA-SUB1) TO 284500 JLFOE-EXP-OOC-QTY 284700 PERFORM Y-710-WRITE-JLFOEOOC 284800 END-IF 284900 END-PERFORM. 285000 285100 B-780-EXIT. 190600 EXIT. 19060000 190700 19070000 SUM10B B-790-CREATE-JLFOEOOC-FOR-BFFO SECTION. SUM10B*---------------------------------------------------------------* SUM10B* SECTION NAME : B-790-CREATE-JLFOEOOC-FOR-BFFO * SUM10B* CALLED BY : B-880-AO-CREATE-OUTPUT * SUM10B* CALLS : Y-710-WRITE-JLFOEOOC * SUM10B* FUNCTION : 1. WRITES EXPECTED OUT OF CODE QUANTITY TO * SUM10B* : EOOC FILE FOR BFFO PRODUCTS. * SUM10B*---------------------------------------------------------------* SUM10B B-790. SUM10B* DISPLAY "B-790". 50060018 SUM10B PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 SUM10B UNTIL WX10-DATA-SUB1 > 75 SUM10B OR JLF46-PER-STR-DATE(WX10-DATA-SUB1) = SPACES SUM10B IF JLF46-PER-STR-DATE(WX10-DATA-SUB1) NOT = SUM10B JLF46-PER-END-DATE(WX10-DATA-SUB1) SUM10B MOVE WW01-CURR-PART-NO TO JLFOE-CR-PART-NO SUM10B MOVE WW01-CURR-RO-NO TO JLFOE-RETAIL-OUTLET-NO SUM10B MOVE WW01-CURR-BPR-TPN TO JLFOE-BASE-PRODUCT-NO SUM10B MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO SUM10B JLFOE-DATE SUM10B MOVE JLF46-PERD-ANTIC-WASTE(WX10-DATA-SUB1) TO SUM10B JLFOE-EXP-OOC-QTY SUM10B PERFORM Y-710-WRITE-JLFOEOOC SUM10B END-IF SUM10B END-PERFORM. SUM10B SUM10B B-790-EXIT. SUM10B EXIT. 19060000 SUM10B SUM11A B-790-CREATE-JLFOEOOC-FOR-BGO SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-790-CREATE-JLFOEOOC-FOR-BGO * SUM11A* CALLED BY : B-980-AO-CREATE-OUTPUT * SUM11A* CALLS : Y-710-WRITE-JLFOEOOC * SUM11A* FUNCTION : 1. WRITES EXPECTED OUT OF CODE QUANTITY TO * SUM11A* : EOOC FILE FOR BGO PRODUCTS. * SUM11A*---------------------------------------------------------------* SUM11A B-790. SUM11A PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 SUM11A UNTIL WX10-DATA-SUB1 > 75 SUM11A OR JLF42-PER-STR-DATE(WX10-DATA-SUB1) = SPACES SUM11A IF JLF42-PER-STR-DATE(WX10-DATA-SUB1) NOT = SUM11A JLF42-PER-END-DATE(WX10-DATA-SUB1) SUM11A MOVE WW01-CURR-PART-NO TO JLFOE-CR-PART-NO SUM11A MOVE WW01-CURR-RO-NO TO JLFOE-RETAIL-OUTLET-NO SUM11A MOVE WW01-CURR-BPR-TPN TO JLFOE-BASE-PRODUCT-NO SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) TO SUM11A JLFOE-DATE SUM11A MOVE JLF42-PERD-ANTIC-WASTE(WX10-DATA-SUB1) TO SUM11A JLFOE-EXP-OOC-QTY SUM11A PERFORM Y-710-WRITE-JLFOEOOC SUM11A END-IF SUM11A END-PERFORM. SUM11A SUM11A B-790-BGO-EXIT. SUM10B EXIT. 19060000 SUM10B 190800 B-800-CREATE-OUTPUT SECTION. 19080000 190900*---------------------------------------------------------------* 19090000 191000* SECTION NAME : B-800-CREATE-OUTPUT * 19100000 191100* CALLED BY : * 19110000 191200* CALLS : * 19120000 191300* FUNCTION : 1. CREATES JLF30O01/02/03/04 FILES * 19130000 191400*---------------------------------------------------------------* 19140000 191500 B-800. 19150000 503700* DISPLAY "B-800". 50370018 191700 19170000 * SUM10A* FOR A BFFO PRODUCT, USE BFFO ALGORITHM ONLY WHEN ITS NOT A SUM10A* FORECAST RUN, OR IF ITS A FORECAST RUN THE CONTROL SHOULD BE SUM10A* SET TO "ON". * 191700 19170000 CRV10C SET PROCESS-LOOP TO TRUE. CRV10C MOVE 1 TO WX10-DATA-SUB1. CRV10C MOVE WF01-CONTDATA TO WW01-DIFF-IN-DAYS. 19240000 CRV10C CRV10C PERFORM UNTIL END-PROCESS-LOOP CRV10C CRV10C IF WX10-DATA-SUB1 > 30 19940000 CRV10C SET END-PROCESS-LOOP TO TRUE CRV10C END-IF CRV10C CRV10C IF WF01-ORDER-GROUP(WX10-DATA-SUB1) CRV10C = WT10-ORDER-GROUP CRV10C MOVE WF01-LEADTIME(WX10-DATA-SUB1) CRV10C TO WW01-DIFF-IN-DAYS CRV10C CRV10C IF WW01-DIFF-IN-DAYS < +6 CRV10C MOVE +6 TO WW01-DIFF-IN-DAYS CRV10C END-IF CRV10C IF WW01-DIFF-IN-DAYS > +21 CRV10C MOVE +21 TO WW01-DIFF-IN-DAYS CRV10C END-IF CRV10C CRV10C SET END-PROCESS-LOOP TO TRUE CRV10C END-IF CRV10C CRV10C ADD +1 TO WX10-DATA-SUB1 CRV10C CRV10C END-PERFORM 191700 19170000 AUT09A MOVE WW01-START-DATE TO ZZD-DATE1 AUT09A MOVE WW01-DIFF-IN-DAYS TO ZZD-DIFF-IN-DAYS AUT09A* DISPLAY "ZZD-DATE1 :" ZZD-DATE1 AUT09A MOVE WX10-DATA-SUB1 TO WX90-WT90-SUB3 AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB3) > ZZD-DATE1 AUT09A OR WX90-WT90-SUB3 > WX90-WT90-MAX AUT09A MOVE 36 TO WX90-WT90-SUB3 AUT09A END-IF 192600 19260000 AUT09A SET DATE-NOT-FOUND TO TRUE 206800 AUT09A PERFORM VARYING WX90-WT90-SUB3 FROM WX90-WT90-SUB3 BY 1 AUT09A UNTIL WX90-WT90-SUB3 > WX90-WT90-MAX AUT09A OR DATE-FOUND AUT09A IF WT90-ISO-FORMAT (WX90-WT90-SUB3) = ZZD-DATE1 AUT09A ADD ZZD-DIFF-IN-DAYS TO WX90-WT90-SUB3 AUT09A IF WX90-WT90-SUB3 > 0 AND <= WX90-WT90-MAX AUT09A MOVE WT90-ISO-FORMAT (WX90-WT90-SUB3) AUT09A TO ZZD-DATE2 AUT09A SET DATE-FOUND TO TRUE AUT09A* DISPLAY "DATE-FOUND" AUT09A END-IF AUT09A END-IF AUT09A END-PERFORM 206800 AUT09A IF DATE-NOT-FOUND AUT09A* DISPLAY "DATE-NOT-FOUND B-800" AUT09A MOVE ZEROES TO ZZD-ERROR-CODE 19180000 AUT09A MOVE "A" TO ZZD-FUNCTION-CODE 19190000 AUT09A MOVE "ISO" TO ZZD-DATE1-FORMAT 19200000 AUT09A MOVE "ISO" TO ZZD-DATE2-FORMAT 19220000 206800 SPR14B PERFORM ZA-CALL-JL0F32 10860000 AUT09A 19280000 AUT09A IF ZZD-ERROR-CODE NOT = 00 19290000 AUT09A THEN 19300000 AUT09A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 19310000 AUT09A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 19320000 AUT09A PERFORM JLMSG-DISPLAY-MESSAGE 19330000 AUT09A END-IF 19360000 193600 END-IF 19360000 AUT09A* DISPLAY "ZZD-DATE2 :" ZZD-DATE2 AUT09A MOVE ZZD-DATE2 TO WW01-END-EXTRACT-DATE 19350000 193700 19370000 193800 SET PROCESS-LOOP TO TRUE. 19380000 193900 MOVE 1 TO WX10-DATA-SUB1. 19390000 194000 MOVE 1 TO WX10-DATA-SUB2. 19400000 194100 19410000 194200 PERFORM UNTIL END-PROCESS-LOOP 19420000 194300 19430000 194400 IF WX10-DATA-SUB1 = 1 19440000 194500 THEN 19450000 194600 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 19460000 194700 TO WW01-ORD-CALC-DATE 19470000 194800 MOVE JLF40-PER-STR-TIME(WX10-DATA-SUB1) 19480000 194900 TO WW01-ORD-CALC-TIME 19490000 195000 END-IF 19500000 195100 19510000 195200 IF JLF40-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" 19520016 195500 THEN 19550000 195600 PERFORM UNTIL JLF40-PER-STR-DATE(WX10-DATA-SUB1) 19560000 195700 = JLF40-SALES-DATE(WX10-DATA-SUB2) 19570000 195800 OR WX10-DATA-SUB2 > 50 19580000 195900 ADD 1 TO WX10-DATA-SUB2 19590000 196000 END-PERFORM 19600000 196100 19610000 196200 PERFORM B-810-CREATE-ORDERS 19620000 196300 19630000 359300 IF JLF40-DELY-IND(WX10-DATA-SUB1) = 35930001 CRV11A*----- 21/01/2003 - GM ---------------------------------------* CRV11A* "Y" OR "B" OR "P" OR "E" 35950001 CRV11A "Y" OR "B" OR "P" OR "E" OR "S" 35950001 CRV11A*-------------------------------------------------------------* 196700 OR 19670016 360300 (JLF40-DELY-IND(WX10-DATA-SUB1) = "N" 36030001 360400 AND JLF40-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) 36040001 197600 THEN 19760000 197610 19761033 197700 PERFORM B-805-UPDATE-COUNTS 19770033 197701 19770133 197700 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) < 19770020 197800 WW01-END-EXTRACT-DATE 19780020 197900 THEN 19790020 MOVE 0 TO JLFOD-ORD-REC-TYPE 198000 PERFORM B-820-CREATE-ORD-DIAG 19800000 198100 PERFORM B-830-CREATE-PP-DIAG 19810000 360410*----- 27/03/2001 - GM ---------------------------------------* 36041000 360411*-- COMMENT --- THE ALLOC TYPES FOR MM ARE NOT INCLUDED 36041100 360412*-- HERE INTENTIONALLY - THEY SHOULD NOT BE WRITTEN TO THE 36041200 360413*-- JLFOALLO FILE 36041300 360414 IF JLF40-ALLOC-TYPE(WX10-DATA-SUB1) = 36041400 360415 ("F" OR "V" OR "H") 36041500 198600 PERFORM B-840-CREATE-ALLOCS 19860000 198700 END-IF 19870000 198800 END-IF 19880020 198900 END-IF 19890000 199000 END-IF 19900000 199100 19910000 199200 ADD 1 TO WX10-DATA-SUB1 19920000 199300 19930000 199400 IF WX10-DATA-SUB1 > 75 19940000 199500 OR JLF40-PER-STR-DATE(WX10-DATA-SUB1) = SPACES 19950000 199600 THEN 19960000 199700 SET END-PROCESS-LOOP TO TRUE 19970000 199800 END-IF 19980000 199900 19990000 200000 END-PERFORM. 20000000 200100 20010000 200200 B-800-EXIT. 20020000 200300 EXIT. 20030000 200400 20040000 200410 B-805-UPDATE-COUNTS SECTION. 20041033 200420*---------------------------------------------------------------* 20042033 200430* SECTION NAME : B-805-UPDATE-COUNTS * 20043033 200440* CALLED BY : * 20044033 200450* CALLS : * 20045033 200460* FUNCTION : 1. UPDATE COUNTS FOR DISPLAY AT END OF RUN * 20046033 200470*---------------------------------------------------------------* 20047033 200480 B-805. 20048033 516100* DISPLAY "B-805". 51610018 200491 20049133 200492 EVALUATE JLF40-CALC-METHOD(WX10-DATA-SUB1) 20049233 200493 WHEN "1" 20049333 200494*-------- DEMAND LINE FILL-UP ----------------------------------* 20049433 200495 COMPUTE WA01-NO-OF-CALC-METH-1 = 20049533 200496 WA01-NO-OF-CALC-METH-1 20049633 200497 + 1 20049733 200498 WHEN "2" 20049833 200499*-------- DEMAND LINE TOP-UP ----------------------------------* 20049933 200500 COMPUTE WA01-NO-OF-CALC-METH-2 = 20050033 200501 WA01-NO-OF-CALC-METH-2 20050133 200502 + 1 20050233 200503 WHEN "3" 20050333 200504*-------- NON DEMAND LINE LONG LIFE FILL-UP --------------------* 20050433 200505 COMPUTE WA01-NO-OF-CALC-METH-3 = 20050533 200506 WA01-NO-OF-CALC-METH-3 20050633 200507 + 1 20050733 200508 WHEN "4" 20050833 200509*-------- NON DEMAND LINE SHORT LIFE FILL-UP -------------------* 20050933 200510 COMPUTE WA01-NO-OF-CALC-METH-4 = 20051033 200511 WA01-NO-OF-CALC-METH-4 20051133 200512 + 1 20051233 200513 WHEN "5" 20051333 200514*-------- NON DEMAND LINE TOP-UP -------------------------------* 20051433 200515 COMPUTE WA01-NO-OF-CALC-METH-5 = 20051533 200516 WA01-NO-OF-CALC-METH-5 20051633 200517 + 1 20051733 200518 WHEN "6" 20051833 200519*-------- STOCK FILL LINE FILL-CALC ---------------------------* 20051933 200520 COMPUTE WA01-NO-OF-CALC-METH-6 = 20052033 200521 WA01-NO-OF-CALC-METH-6 20052133 200522 + 1 20052233 200523 WHEN "7" 20052333 200524*-------- STOCK FILL LINE NON FILL CALC -----------------------* 20052433 200525 COMPUTE WA01-NO-OF-CALC-METH-7 = 20052533 200526 WA01-NO-OF-CALC-METH-7 20052633 200527 + 1 20052733 200528 WHEN "8" 20052833 200529*-------- FIXED ERRATIC LINE -----------------------------------* 20052933 200530 COMPUTE WA01-NO-OF-CALC-METH-8 = 20053033 200531 WA01-NO-OF-CALC-METH-8 20053133 200532 + 1 20053233 200533 WHEN "9" 20053333 200534*-------- CUSTOMER ORDER ONLY ----------------------------------* 20053433 200535 COMPUTE WA01-NO-OF-CALC-METH-9 = 20053533 200536 WA01-NO-OF-CALC-METH-9 20053633 200537 + 1 20053733 200493*----- 25/10/2000 - GM -----------------------------------------* 20049333 200493 WHEN "A" 20049333 200494*-------- DEMAND LINE FILL-UP FOR MEDIUM LIFE PRODUCTS ---------* 20049433 200495 COMPUTE WA01-NO-OF-CALC-METH-A = 20049533 200496 WA01-NO-OF-CALC-METH-A 20049633 200497 + 1 20049733 200498 WHEN "B" 20049833 200499*-------- DEMAND LINE TOP-UP FOR MEDIUM LIFE PRODUCTS ----------* 20049933 200500 COMPUTE WA01-NO-OF-CALC-METH-B = 20050033 200501 WA01-NO-OF-CALC-METH-B 20050133 200502 + 1 20050233 200503 WHEN "C" 20050333 200504*-------- NON DEMAND LINE FILL-UP FOR MEDIUM LIFE PRODUCTS -----* 20050433 200505 COMPUTE WA01-NO-OF-CALC-METH-C = 20050533 200506 WA01-NO-OF-CALC-METH-C 20050633 200507 + 1 20050733 200493*---------------------------------------------------------------* 20049333 CRV10B WHEN "D" 20050333 CRV10B*-------- DYNAMIC TARGET ORDER UP TO CALCULATION ---------------* 20050433 CRV10B COMPUTE WA01-NO-OF-CALC-METH-D = 20050533 CRV10B WA01-NO-OF-CALC-METH-D 20050633 CRV10B + 1 20050733 CRV10B*---------------------------------------------------------------* 20049333 CRV10B WHEN "E" 20050333 CRV10B*-------- STATIC TARGET ORDER UP TO CALCULATION ----------------* 20050433 CRV10B COMPUTE WA01-NO-OF-CALC-METH-E = 20050533 CRV10B WA01-NO-OF-CALC-METH-E 20050633 CRV10B + 1 20050733 CRV10B*---------------------------------------------------------------* 20049333 CRV10C WHEN "F" 20050333 CRV10C*-------- RECOVERY STATUS --------------------------------------* 20050433 CRV10C COMPUTE WA01-NO-OF-CALC-METH-F = 20050533 CRV10C WA01-NO-OF-CALC-METH-F 20050633 CRV10C + 1 20050733 CRV10C*---------------------------------------------------------------* 20049333 CRAUTA WHEN "I" 20050333 CRAUTA*-------- STANDING ORDER - IGNORE BOOKSTOCK --------------------* 20050433 CRAUTA COMPUTE WA01-NO-OF-CALC-METH-I = 20050533 CRAUTA WA01-NO-OF-CALC-METH-I 20050633 CRAUTA + 1 20050733 CRAUTA*---------------------------------------------------------------* 20049333 200538 WHEN OTHER 20053833 200539*--THIS IS AN ERROR SITUATION WHICH WOULD HAVE BEEN PICKED------* 20053933 200540*--UP IN JL0F40 PROCESSING -------------------------------------* 20054033 200541 GO TO B-805-EXIT 20054133 200542 END-EVALUATE. 20054233 200543 20054333 200544 20054433 200545 B-805-EXIT. 20054533 200546 EXIT. 20054633 200547 20054733 200500 B-810-CREATE-ORDERS SECTION. 20050000 200600*---------------------------------------------------------------* 20060000 200700* SECTION NAME : B-810-CREATE-ORDERS * 20070000 200800* CALLED BY : * 20080000 200900* CALLS : * 20090000 201000* FUNCTION : 1. CREATES THE OUTPUT FILE OF FORECAST ORDERS * 20100000 201100*---------------------------------------------------------------* 20110000 201200 B-810. 20120000 526400* DISPLAY "B-810". 52640018 201400 MOVE WW01-CURR-PART-NO TO JLFOR-CR-PART-NO. 20140000 201500 MOVE WW01-CURR-RO-NO TO JLFOR-RETAIL-OUTLET-NO. 20150000 201600 MOVE WW01-CURR-BPR-TPN TO JLFOR-BASE-PRODUCT-NO. 20160000 201700 20170000 201800 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 20180000 201900 TO JLFOR-DELY-REQ-DATE. 20190000 202000 MOVE JLF40-ORDER-TYPE(WX10-DATA-SUB1) 20200000 202100 TO JLFOR-ORDER-TYPE. 20210000 202200 COMPUTE JLFOR-FCST-ORD-QTY = 20220000 202300 JLF40-FINAL-CASE-QTY(WX10-DATA-SUB1) * 20230000 202400 JLF40-UNIT-SIZE. 20240000 202500 COMPUTE JLFOR-CODE-LIFE = 20250000 AUT08A JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) - 1. 20270000 202700 MOVE JLF40-ORDER-PRIORITY(WX10-DATA-SUB1) 20270000 202800 TO JLFOR-ORDER-PRIORITY. 20280000 202900 MOVE JLF40-OUT-OF-TOLERANCE(WX10-DATA-SUB1) 20290000 203000 TO JLFOR-OUT-OF-TOLERANCE. 20300000 203100 20310000 203200 MOVE JLF40-SALES-CCYYMMD(WX10-DATA-SUB2) 20320000 203300 TO JLFOR-DELY-REQ-CCYYWWD. 20330000 203400 MOVE JLF40-FCST-TRGT-STK(WX10-DATA-SUB2) 20340000 203500 TO JLFOR-TRGT-STK-QTY. 20350000 203600 MOVE JLF40-FCST-OPEN-BKSTK(WX10-DATA-SUB2) 20360000 203700 TO JLFOR-OPENING-STOCK. 20370000 *** ENSURE CR FORECAST SALES IS NOT PHYSICALLY OVERWRITTEN *** BY ANY DOTCOM EXPECTED SALES BY USING THE SAVED CR VALUE. *** THIS IS REQUIRED TO RETAIN THE AUDIT TRAIL FOR *** COMPARISON PURPOSES. WIN06A MOVE WT80-DAY-FCST-SALES(WX10-DATA-SUB2) 203900 TO JLFOR-RO-DAY-EST-SALES. 20390000 204000 20400000 204700*----- CHG - 21/10/99 - GM -------------------------------------* 20470000 204700*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* 20470000 204700*----- JLF40 SUBSCRIPTED ENTRY ---------------------------------* 20470000 204000 MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) 20400000 204000 TO JLFOR-FIRST-ORD-TYPE-OF-DAY. 20400000 204000 MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) 20400000 204000 TO JLFOR-LAST-ORDER. 20400000 SUM12A MOVE WI20-CALC-METH-I-IND SUM12A TO JLFOR-CALC-METH-I-IND. SUM12B MOVE WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO JLFOR-NOTNL-CALC-DATE. SPR13B* DEFAULT VALUE IS MOVED TO JLFOR-SALES-ORDER * SPR13B MOVE WW25-SALES-ORDER SPR13B TO JLFOR-SALES-ORDER. 204700*---------------------------------------------------------------* 20470000 204000 20400000 204100 PERFORM Y-100-WRITE-OUTPUT1. 20410000 204200 20420000 204300 B-810-EXIT. 20430000 204400 EXIT. 20440000 204500 20450000 204600 B-820-CREATE-ORD-DIAG SECTION. 20460000 204700*---------------------------------------------------------------* 20470000 204800* SECTION NAME : B-820-CREATE-ORD-DIAG * 20480000 204900* CALLED BY : * 20490000 205000* CALLS : * 20500000 205100* FUNCTION : 1. CREATES THE OUTPUT FILE OF ORDER DIAGNOSTICS 20510000 205200*---------------------------------------------------------------* 20520000 205300 B-820. 20530000 531400* DISPLAY "B-820". 53140018 205500 MOVE WW01-CURR-PART-NO TO JLFOD-CR-PART-NO. 20550000 205600 MOVE WW01-CURR-RO-NO TO JLFOD-RETAIL-OUTLET-NO. 20560000 205700 MOVE WW01-CURR-BPR-TPN TO JLFOD-BASE-PRODUCT-NO. 20570000 205701 20570122 531900* DISPLAY " ". 53190018 532000* DISPLAY "RO-NO = " JLFOD-RETAIL-OUTLET-NO. 53200018 532100* DISPLAY "BPR-TPN = " JLFOD-BASE-PRODUCT-NO. 53210018 532200* DISPLAY "%CAPACITY-" JLF40-CAPACITY(WX10-DATA-SUB1). 53220018 205730 20573022 205800 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 20580000 205900 TO JLFOD-DELY-REQ-DATE. 20590000 206000 MOVE JLF40-PER-STR-TIME(WX10-DATA-SUB1) 20600000 206100 TO JLFOD-DELY-REQ-TIME. 20610000 206200 MOVE JLF40-ORDER-TYPE(WX10-DATA-SUB1) 20620000 206300 TO JLFOD-ORDER-TYPE. 20630000 CRV11A*----- 21/01/2003 - GM ---------------------------------------* 02260000 CRV11A MOVE JLF40-DELY-IND(WX10-DATA-SUB1) 20580000 CRV11A TO JLFOD-DELY-IND. 20590000 CRV11A*-------------------------------------------------------------* 02260000 206400 20640000 MOVE WT10-DGRP-CODE TO JLFOD-DGRP-CODE MOVE WT10-ORDER-GROUP TO JLFOD-ORDER-GROUP MOVE WT10-SUB-PG-CODE TO JLFOD-SUB-PG-CODE 20670000 MOVE JLF40-STK-FILL-IND (WX10-DATA-SUB1) TO JLFOD-STK-FILL-IND MOVE JLF40-STK-FILL-WK-IND (WX10-DATA-SUB1) 20680000 TO JLFOD-STK-FILL-WK-IND20680000 MOVE JLF40-UNIT-SIZE TO JLFOD-UNIT-SIZE 20690000 309400 MOVE JLF40-ALT-MERCH-UNIT-RND(WX10-DATA-SUB1) TO JLFOD-ALT-MERCH-UNIT-RND 309600 MOVE JLF40-ALT-MERCH-UNITS(WX10-DATA-SUB1) TO JLFOD-ALT-MERCH-UNITS MOVE JLF40-PALLET-RND(WX10-DATA-SUB1) TO JLFOD-PALLET-RND MOVE JLF40-CAPACITY(WX10-DATA-SUB1) TO JLFOD-SHELF-FILL-CAP 207400 20740000 207500 MOVE WW01-ORD-CALC-DATE TO JLFOD-ORD-CALC-DT. 20750000 207600 MOVE WW01-ORD-CALC-TIME TO JLFOD-ORD-CALC-TM. 20760000 SUM11A MOVE WT10-DISPLAY-MDL-QTY TO JLFOD-DISPLAY-MDL-QTY SUM12B MOVE JLF40-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO SUM12B JLFOD-NOTNL-CALC-DATE JFM08B IF JLF40-NEW-GAP-CNTL-EXISTS WIN09A MOVE WW-GAP-STK-CORR TO JLFOD-GAP-STK-CORR SUM11A ADD WT10-DISPLAY-MDL-QTY TO WW-GAP-EXPCTD-BOOKSTK JFM08A MOVE WW-GAP-EXPCTD-BOOKSTK TO JLFOD-BKSTK-EFF-CALC JFM08A ELSE JFM08A MOVE -9999 TO JLFOD-GAP-STK-CORR SUM11A COMPUTE WW18-DIS-EXPCTD-BOOKSTK = SUM11A WT10-ST-PERD-STK-POS + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-EXPCTD-BOOKSTK TO JLFOD-BKSTK-EFF-CALC JFM08A END-IF 207800 MOVE JLF40-STK-PROD-END-DT TO JLFOD-STKD-PROD-ENDT. 20780000 207900 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 20790000 208000 TO JLFOD-DMND-ST-DT. 20800000 208100 MOVE JLF40-PER-STR-TIME(WX10-DATA-SUB1) 20810000 208200 TO JLFOD-DMND-ST-TM. 20820000 208300 MOVE JLF40-DMND-END-DT(WX10-DATA-SUB1) 20830000 208400 TO JLFOD-DMND-END-DT. 20840000 208500 MOVE JLF40-DMND-END-TIME(WX10-DATA-SUB1) 20850000 208600 TO JLFOD-DMND-END-TM. 20860000 208700 MOVE JLF40-STD-SHELF-CAP TO JLFOD-STD-SHELF-CAP. 20870000 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 208800* MOVE JLF40-COR-PC TO JLFOD-COR-PC. 20880000 208800 MOVE WW01-COR-PC TO JLFOD-COR-PC. 20880000 209300*-------------------------------------------------------------* 20930000 143S01 COMPUTE JLFOD-SPECIAL-ORDER-QTY = 20220000 143S01 JLF40-CUST-ORD-QTY(WX10-DATA-SUB1)+ 20230000 143S01 JLF40-SMFO-ORD-QTY(WX10-DATA-SUB1) 20240000 143S01 IF JLF40-SMFO-ORD-RND(WX10-DATA-SUB1)>SPACES 143S01 MOVE JLF40-SMFO-ORD-RND(WX10-DATA-SUB1) 143S01 TO JLFOD-CUST-ORD-RND 143S01 ELSE 143S01 MOVE JLF40-CUST-ORD-RND(WX10-DATA-SUB1) 143S01 TO JLFOD-CUST-ORD-RND 143S01 END-IF. MOVE JLF40-GAP-ORDER-SNGLS-QTY(WX10-DATA-SUB1) 20890000 TO JLFOD-GAP-ORD-QTY 20900000 361019*----- 27/03/2001 - GM ---------------------------------------* 36101900 361020* MOVE JLF40-ALLOC-TYPE TO JLFOD-ALLOC-IND. 36102000 361021 MOVE JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 36102100 361022 TO JLFOD-ALLOC-IND. 36102200 361023*-------------------------------------------------------------* 36102300 535700* MOVE JLF40-REM-ALLOC-QTY TO JLFOD-REM-ALLOC-QTY. 53570008 535710 MOVE JLF40-RSVE-QTY (WX10-DATA-SUB1) 53571008 535720 TO JLFOD-REM-ALLOC-QTY. 53572008 209500 MOVE JLF40-S-L-LIFE-IND TO JLFOD-S-L-LIFE-IND. 20950000 209600 MOVE "N" TO JLFOD-WEEKEND-IND. 20960000 CRV10B*----- 03/10/2002 - SB ---------------------------------------* 20930000 CRV10B IF FIRST-ORD-DIAG SUM11A COMPUTE WW18-DIS-ACTUAL-BOOKSTK = SUM11A WT10-BOOKSTOCK-USED + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-ACTUAL-BOOKSTK 209700 TO JLFOD-BOOKSTOCK-USED 312200 MOVE WT10-BOOK-STOCK-DT 312200 TO JLFOD-BOOK-STOCK-DT 312300 MOVE WT10-BOOK-STOCK-TM 312300 TO JLFOD-BOOK-STOCK-TM CRV10B SET NOT-FIRST-ORD-DIAG TO TRUE CRV10B ELSE SUM11A COMPUTE WW18-DIS-A-BKSTK = SUM11A JLF40-ACTUAL-STK-POS(WX10-DATA-SUB1) SUM11A + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-A-BKSTK CRV10B TO JLFOD-BOOKSTOCK-USED CRV10B MOVE JLF40-NOTNL-CALC-DATE(WX10-DATA-SUB1) CRV10B TO JLFOD-BOOK-STOCK-DT CRV10B MOVE JLF40-NOTNL-CALC-TIME(WX10-DATA-SUB1) CRV10B TO JLFOD-BOOK-STOCK-TM CRV10B END-IF. CRV10B*-------------------------------------------------------------* 20930000 210000 MOVE WT10-EST-SALES-USED TO JLFOD-EST-SALES-USED. 21000000 210100 MOVE JLF40-EXP-SALES-IN-CALC(WX10-DATA-SUB1) 21010000 210200 TO JLFOD-EXP-SALES-PRE-DP. 21020000 210300 MOVE JLF40-ANTIC-WASTE-IN-CALC(WX10-DATA-SUB1) 21030000 210400 TO JLFOD-ANT-WASTE-PRE-DP. 21040000 210500 MOVE JLF40-OS-ORD-IN-CALC(WX10-DATA-SUB1) 21050000 210600 TO JLFOD-EXP-DEL-PRE-DP. 21060000 210700 MOVE JLF40-ST-PERD-STK-POS(WX10-DATA-SUB1) 21070000 210800 TO JLFOD-ST-PERD-STK-POS. 21080000 210900 MOVE JLF40-EXP-SALES-IN-DMND(WX10-DATA-SUB1) 21090000 211000 TO JLFOD-EXP-SALES-DP. 21100000 211100 MOVE JLF40-ANTIC-WASTE-IN-DMND(WX10-DATA-SUB1) 21110000 211200 TO JLFOD-ANT-WASTE-DP. 21120000 211300 MOVE JLF40-COVER-EXP-SALES(WX10-DATA-SUB1) 21130000 211400 TO JLFOD-COVER-EXP-SALES. 21140000 211500 MOVE JLF40-EXP-SALES-IN-CDLF7(WX10-DATA-SUB1) 21150000 211600 TO JLFOD-EXP-SALES-IN-CDLF. 21160000 211700 MOVE JLF40-SAFE-STK-QTY(WX10-DATA-SUB1) 48570008 211800 TO JLFOD-SAFE-STK-QTY. 21180000 211900 MOVE JLF40-CODE-SAFE-STK-QTY(WX10-DATA-SUB1) 48590008 212000 TO JLFOD-CODE-SAFE-STK-QTY. 48600008 CRV11A MOVE JLF40-PURE-CUBE-SAFE-STK-QTY(WX10-DATA-SUB1) 48610015 212200 TO JLFOD-CUBE-SAFE-STK-QTY. 48620008 212300 MOVE JLF40-CALC-METHOD(WX10-DATA-SUB1) 21230000 212400 TO JLFOD-CALC-METHOD. 21240000 212500 MOVE JLF40-RAW-DEMAND(WX10-DATA-SUB1) 21250000 212600 TO JLFOD-RAW-DEMAND. 21260000 CRV10B COMPUTE JLFOD-RND-DEMAND ROUNDED = 21270000 212800 JLF40-FINAL-CASE-QTY(WX10-DATA-SUB1) * 21280000 212900 JLF40-UNIT-SIZE. 21290000 AVRS32 MOVE JLFOD-RND-DEMAND AVRS32 TO JLFOD-PREV-ORD-QTY 21300000 * ROUNDING DATA MOVE JLF40-BASE-RND(WX10-DATA-SUB1) TO JLFOD-BASE-ROUNDING MOVE JLF40-FULL-FILL-CAP-RND(WX10-DATA-SUB1) TO JLFOD-FULL-FILL-CAP-RND MOVE JLF40-EXP-DEMAND-RND(WX10-DATA-SUB1) TO JLFOD-EXP-DEMAND-RND MOVE JLF40-ALT-MERCH-RND(WX10-DATA-SUB1) TO JLFOD-MERCH-UNIT-RND MOVE JLF40-WASTE-RND(WX10-DATA-SUB1) TO JLFOD-WASTE-RND MOVE JLF40-PROM-RUN-DOWN-RND(WX10-DATA-SUB1) TO JLFOD-PROM-RUN-DOWN-RND MOVE JLF40-DISC-RUN-DOWN-RND(WX10-DATA-SUB1) TO JLFOD-DISC-RUN-DOWN-RND MOVE JLF40-ALLOC-RND(WX10-DATA-SUB1) TO JLFOD-ALLOC-RND MOVE JLF40-GAP-ORD-RND(WX10-DATA-SUB1) TO JLFOD-GAP-ORD-RND 213200 MOVE JLF40-SALES-TO-MIDNITE TO JLFOD-SALES-TO-MIDNITE. 21320000 213300 MOVE JLF40-PERD-FCST-SALES(WX10-DATA-SUB1) 21330000 213400 TO JLFOD-FCAST-SALES-CAL. 21340000 213401 213641 MOVE 0 TO JLFOD-EXP-WKLY-SALES 213642 213643 PERFORM VARYING WX10-NEW-SUB FROM 1 BY 1 213644 UNTIL WX10-NEW-SUB > 7 213647 ADD JLF40-DAY-FCST-SALES(WX10-NEW-SUB) TO 213648 JLFOD-EXP-WKLY-SALES 213649 END-PERFORM 213660 213670*END OF : VERSION 3.5 CHANGES 213680 213700 MOVE JLF40-PERD-HOURLY-PTP(WX10-DATA-SUB1) 21370000 213800 TO JLFOD-PERD-HOURLY-PTP. 21380000 213900 MOVE JLF40-PROM-IND(WX10-DATA-SUB1) 21390000 214000 TO JLFOD-PROM-IND. 21400000 214100 MOVE JLF40-PROM-END-DATE(WX10-DATA-SUB1) 21410000 214200 TO JLFOD-OFFER-END-DATE. 21420000 214300 MOVE JLF40-PROM-SHELF-CAP(WX10-DATA-SUB1) 21430000 214400 TO JLFOD-OFFER-SHELF-CAP. 21440000 SPR08C MOVE JLF40-EFF-MIN-PROM-CAP(WX10-DATA-SUB1) 21430000 SPR08C TO JLFOD-EFF-MIN-PROM-CAP. 21440000 SPR08C MOVE JLF40-MIN-PROM-REQ-IND(WX10-DATA-SUB1) 21430000 SPR08C TO JLFOD-EFF-MIN-PROM-IND 21440000 21450000 * CONTROL DATA MOVE JLF40-ACC-WSTGE-PC(WX10-DATA-SUB1) TO JLFOD-ACC-WSTGE-PERC MOVE JLF40-CNTL-CODE-LIFE(WX10-DATA-SUB1) TO JLFOD-CNTL-CODE-LIFE MOVE JLF40-COVER-DAYS(WX10-DATA-SUB1) TO JLFOD-COVER-DAYS MOVE JLF40-PROM-STK-RUN-DOWN-PC(WX10-DATA-SUB1) TO JLFOD-PROM-STK-RUN-DOWN-PC MOVE JLF40-FILL-SAFETY-PC(WX10-DATA-SUB1) TO JLFOD-FILL-SAFETY-PC MOVE JLF40-SHELF-FILL-CAP-PC(WX10-DATA-SUB1) TO JLFOD-SHELF-FILL-CAP-PC MOVE JLF40-SALE-SAFE-PC(WX10-DATA-SUB1) TO JLFOD-SALE-SAFE-PC MOVE JLF40-CODE-SAFE-PC(WX10-DATA-SUB1) TO JLFOD-CODE-SAFE-PC MOVE JLF40-CUBE-SAFE-PC(WX10-DATA-SUB1) TO JLFOD-CUBE-SAFE-PC MOVE JLF40-GAP-ORDER-SHELF-CAP(WX10-DATA-SUB1) TO JLFOD-GAP-ORD-PC 318300 MOVE JLF40-ALLOC-SNGLS(WX10-DATA-SUB1) TO JLFOD-ALLOC-SNGLS. 214700 21470000 214610 MOVE JLF40-DEV-LINE-IND(WX10-DATA-SUB1) 21461007 214620 TO JLFOD-DEVELOPMENT-LINE. 21462007 214630 MOVE JLF40-DEV-LINE-IND(WX10-DATA-SUB1) 21463007 214640 TO WI01-DEV-LINE-TYPE. 21464007 214650 21465007 214660 IF DEVELOPMENT-LINE-PRODUCT 21466007 214670 THEN 21467007 214680 IF STANDARD-DEVELOPMENT-LINE 21468007 214690 THEN 21469007 214691 MOVE JLF40-SML-DEV-SAFE-PC 21469107 214692 TO JLFOD-DEV-LINE-SFTY-PC 21469207 214693 ELSE 21469307 214694 IF MEDIUM-DEVELOPMENT-LINE 21469407 214695 THEN 21469507 214696 MOVE JLF40-MED-DEV-SAFE-PC 21469607 214697 TO JLFOD-DEV-LINE-SFTY-PC 21469707 214698 ELSE 21469807 214699 IF LARGE-DEVELOPMENT-LINE 21469907 214700 THEN 21470007 214701 MOVE JLF40-LRG-DEV-SAFE-PC 21470107 214702 TO JLFOD-DEV-LINE-SFTY-PC 21470207 214703 ELSE 21470307 214704 MOVE ZEROES 21470407 214705 TO JLFOD-DEV-LINE-SFTY-PC 21470507 214706 END-IF 21470607 214707 END-IF 21470707 214708 END-IF 21470807 214709 ELSE 21470909 214710 MOVE ZEROES 21471009 214711 TO JLFOD-DEV-LINE-SFTY-PC 21471109 214709 END-IF. 21470907 214720 21472007 204700*----- CHG - 21/10/99 - GM -------------------------------------* 20470000 204700*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* 20470000 204700*----- JLF40 SUBSCRIPTED ENTRY IS THE SAME AS THE --------------* 20470000 204000 MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) 20400000 204000 TO JLFOD-FIRST-ORD-TYPE-OF-DAY. 20400000 204000 MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) 20400000 204000 TO JLFOD-LAST-ORDER. 20400000 214720 21472007 322600 MOVE JLF40-OLD-DAY-FCST-SALES(WX10-DATA-SUB2) TO 322700 JLFOD-ALT-EDS-QTY. 322800 MOVE JLF40-DAY-FCST-SALES(WX10-DATA-SUB2) TO 322900 JLFOD-SFTY-STK-EDS-QTY. 323000 MOVE JLF40-SALES-DEVI-TOL-IND(WX10-DATA-SUB1) TO 323100 JLFOD-SALES-DVTN-OOT-IND. 295300 MOVE JLF40-POS-SALES-DEVI-TOL-PC(WX10-DATA-SUB1) TO 323300 JLFOD-POS-SALES-DTP. 295500 MOVE JLF40-NEG-SALES-DEVI-TOL-PC (WX10-DATA-SUB1)TO 323500 JLFOD-NEG-SALES-DTP. 323600 MOVE JLF40-SALE-SAFE-STK-QTY(WX10-DATA-SUB1) TO 49510008 323700 JLFOD-SALE-SAFE-STK-QTY. 49520008 395400* 39540001 IF JLF40-PROM-IND(WX10-DATA-SUB1) = "Y" THEN 295900 MOVE JLF40-PROM-SAFE-PC 323900 TO JLFOD-OFFER-SFTY-STK-PC ELSE 295900 MOVE ZEROES 323900 TO JLFOD-OFFER-SFTY-STK-PC END-IF. 21522013 324000 MOVE JLF40-PRM-SAFETY-STK-QTY(WX10-DATA-SUB1) TO 324100 JLFOD-OFFER-SFTY-STK-QTY. 324200 MOVE JLF40-DEV-SAFETY-STK-QTY(WX10-DATA-SUB1) TO 324300 JLFOD-DEV-LINE-SFTY-QTY. 296500 324500 MOVE WT10-STEP-IMPACT-TYPE(WX10-DATA-SUB1) TO 324600 JLFOD-STEP-IMPACT-TYPE. 324700 396120*----- 27/03/2001 - GM ---------------------------------------* 39612000 396130 MOVE JLF40-TOP-DMND-FILL-PC(WX10-DATA-SUB1) TO 39613000 396140 JLFOD-T-DMND-FCTR. 39614000 CRV10A MOVE JLF40-CAPACITY-DAYS(WX10-DATA-SUB1) TO 396160 JLFOD-CAPACITY-CAP. 39616000 396170*-------------------------------------------------------------* 39617000 396171 39617100 CRV90B MOVE JLF40-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) TO 39615000 CRV90B JLFOD-ADJ-SAFE-STK-QTY. 39616000 CRV90B 39616000 CRV11A MOVE JLF40-CASE-SAFETY-PC(WX10-DATA-SUB1) TO 49810008 CRV11A JLFOD-CASE-SAFETY-PC. 49820008 49830008 214800 PERFORM Y-200-WRITE-OUTPUT2. 21480000 553900* PERFORM B-821-DISPLAY-DIAG. 55390018 214900 21490000 215000 B-820-EXIT. 21500000 215100 EXIT. 21510000 215200 21520000 215210 B-821-DISPLAY-DIAG SECTION. 21521013 215220*---------------------------------------------------------------* 21522013 215230* SECTION NAME : B-821-DISPLAY-DIAG * 21523013 215240* CALLED BY : * 21524013 215250* CALLS : * 21525013 215260* FUNCTION : 1. DISPLAY THE ORDER CALCULATION DIAGNOSTICS * 21526013 215270*---------------------------------------------------------------* 21527013 215280 B-821. 21528013 555200* DISPLAY "B-821". 55520018 215294 DISPLAY "DIAGNOSTICS====>" 21529413 215295 DISPLAY "ORD-CALC-DATE = " 21529513 215296 WW01-ORD-CALC-DATE 21529613 215297 DISPLAY "ORD-CALC-TIME = " 21529713 215298 WW01-ORD-CALC-TIME 21529813 215299 DISPLAY "JLFOD-DMND-ST-DT = " 21529913 215300 JLFOD-DMND-ST-DT 21530013 215310 DISPLAY "JLFOD-DMND-ST-TM = " 21531013 215311 JLFOD-DMND-ST-TM 21531113 215312 DISPLAY "JLFOD-DMND-END-DT = " 21531213 215313 JLFOD-DMND-END-DT 21531313 215314 DISPLAY "JLFOD-DMND-END-TM = " 21531413 215315 JLFOD-DMND-END-TM 21531513 215316 DISPLAY "JLFOD-BOOKSTOCK-USED = " 21531613 215317 JLFOD-BOOKSTOCK-USED 21531713 215318 DISPLAY "JLFOD-BOOK-STOCK-DT = " 21531813 215319 JLFOD-BOOK-STOCK-DT 21531913 215320 DISPLAY "JLFOD-BOOK-STOCK-TM = " 21532013 215321 JLFOD-BOOK-STOCK-TM 21532113 215324 21532413 215325 DISPLAY "*** COPY/PASTE FROM HERE ***". 21532513 215326 DISPLAY " ". 21532613 215327 DISPLAY WT10-EST-SALES-USED 21532713 215328 DISPLAY " ". 21532813 215329 DISPLAY " ". 21532913 215330 DISPLAY WT10-ST-PERD-STK-POS 21533013 215340 DISPLAY JLF40-EXP-SALES-IN-CALC(WX10-DATA-SUB1) 21534013 215342 DISPLAY JLF40-ANTIC-WASTE-IN-CALC(WX10-DATA-SUB1) 21534213 215343 DISPLAY " ". 21534313 215344 DISPLAY JLF40-OS-ORD-IN-CALC(WX10-DATA-SUB1) 21534413 215345 DISPLAY " ". 21534513 215346 DISPLAY " ". 21534613 215347 DISPLAY JLF40-ST-PERD-STK-POS(WX10-DATA-SUB1) 21534713 215348 DISPLAY JLF40-EXP-SALES-IN-DMND(WX10-DATA-SUB1) 21534813 215349 DISPLAY JLF40-ANTIC-WASTE-IN-DMND(WX10-DATA-SUB1) 21534913 215350 DISPLAY " ". 21535013 215351 DISPLAY " ". 21535113 215352 DISPLAY JLF40-COVER-EXP-SALES(WX10-DATA-SUB1) 21535213 215353 DISPLAY " ". 21535313 215354 DISPLAY " ". 21535413 215355 DISPLAY " ". 21535513 215356 DISPLAY " ". 21535613 215357 DISPLAY " ". 21535713 215358 DISPLAY JLF40-CUBE-SAFE-STK-QTY(WX10-DATA-SUB1) 50420008 215359 DISPLAY JLF40-CODE-SAFE-STK-QTY(WX10-DATA-SUB1) 50430008 215361 DISPLAY JLF40-EXP-SALES-IN-CDLF7(WX10-DATA-SUB1) 21536113 215362 DISPLAY JLF40-SAFE-STK-QTY(WX10-DATA-SUB1) 50450008 215363 DISPLAY " ". 21536313 215364 DISPLAY JLF40-CALC-METHOD(WX10-DATA-SUB1) 21536413 215365 DISPLAY " ". 21536513 215366 DISPLAY JLF40-RAW-DEMAND(WX10-DATA-SUB1) 21536613 215367 DISPLAY " ". 21536713 215368 DISPLAY JLF40-ROUNDING-DATA(WX10-DATA-SUB1) 21536813 215369 DISPLAY " ". 21536913 215370 DISPLAY JLF40-CR-CASE-QTY(WX10-DATA-SUB1) 21537013 215371 DISPLAY JLF40-FINAL-CASE-QTY(WX10-DATA-SUB1). 21537113 215372 21537213 215424 B-821-EXIT. 21542413 215425 EXIT. 21542513 215426 21542613 215300 B-830-CREATE-PP-DIAG SECTION. 21530000 215400*---------------------------------------------------------------* 21540000 215500* SECTION NAME : B-830-CREATE-PP-DIAG * 21550000 215600* CALLED BY : * 21560000 215700* CALLS : * 21570000 215800* FUNCTION : 1. CREATES THE OUTPUT FILE OF PRODUCT PROFILE * 21580000 215900* : SPECIFIC DIAGNOSTICS * 21590000 216000*---------------------------------------------------------------* 21600000 216100 B-830. 21610000 562200* DISPLAY "B-830". 56220018 216300 MOVE WW01-CURR-PART-NO TO JLPRF-CR-PART-NO. 21630000 216400 MOVE WW01-CURR-RO-NO TO JLPRF-RETAIL-OUTLET-NO. 21640000 216500 MOVE WW01-CURR-BPR-TPN TO JLPRF-BASE-PRODUCT-NO. 21650000 216600 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 21660000 216700 TO JLPRF-DELY-REQ-DATE. 21670000 216800 MOVE JLF40-ORDER-TYPE(WX10-DATA-SUB1) 21680000 216900 TO JLPRF-ORDER-TYPE. 21690000 217000 21700000 217100 MOVE JLF40-DAY-FCST-SALES(WX10-DATA-SUB2) 21710000 217200 TO JLPRF-EXP-DAILY-SALES. 21720000 217300 MOVE JLF40-FCST-OPEN-BKSTK(WX10-DATA-SUB2) 21730000 217310 TO JLPRF-EXP-SOD-SOH. 21731000 217320 21732000 396270*----- 27/03/2001 - GM ---------------------------------------* 39627000 396271* MOVE JLF40-ALLOC-TYPE TO JLPRF-ALLOC-IND. 39627100 396272 MOVE JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 39627200 396273 TO JLPRF-ALLOC-IND. 39627300 396274* IF JLF40-ALLOC-TYPE = "V" AND 39627400 396275 IF JLPRF-ALLOC-IND = "V" AND 39627500 396276*-------------------------------------------------------------* 39627600 396277 JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) > +0 AND 39627700 396278 JLF40-APPORTION-PC(WX10-DATA-SUB1) = ZEROES 39627800 396279 MOVE "N" TO JLPRF-ALLOC-IND 39627900 217372 END-IF. 21737200 217373 21737300 217374 IF JLPRF-ALLOC-IND = SPACES 21737400 217375 THEN 21737500 217376 IF JLF40-CALC-METHOD(WX10-DATA-SUB1) = "8" 21737600 217377 THEN 21737700 217378 MOVE "E" TO JLPRF-ALLOC-IND 21737800 217379 ELSE 21737900 217380 MOVE "C" TO JLPRF-ALLOC-IND 21738000 217390 END-IF 21739000 217400 END-IF. 21740000 217401 21740100 217320*----- 14/06/2002 - GM ---------------------------------------* 21732000 217402* COMPUTE WW01-TARGET-STOCK = 21740200 217403* JLF40-EXP-SALES-IN-DMND(WX10-DATA-SUB1) + 21740300 217404* JLF40-SAFETY-STK-QTY(WX10-DATA-SUB1). 21740400 217402 COMPUTE WW01-TARGET-STOCK = 21740200 217403 JLF40-EXP-SALES-IN-DMND(WX10-DATA-SUB1) + 21740300 217404 JLF40-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1). 21740400 217320*-------------------------------------------------------------* 21732000 217405 21740500 CRAUTA IF JLF40-CALC-METHOD(WX10-DATA-SUB1) = "I" CRAUTA*-------- STANDING ORDERS - IGNORE BOOKSTOCK ------------------* CRV10A MOVE JLF40-CAPACITY(WX10-DATA-SUB1) CRV10A TO JLPRF-CAP-SAFE-QTY CRAUTA MOVE "I" TO JLPRF-CAP-SAFE-IND CRV10A ELSE CRV10A IF JLF40-CALC-METHOD(WX10-DATA-SUB1) = "D" *-------- ORDER UP TO DYNAMIC CALCULATION ---------------------* CRV10A OR JLF40-CALC-METHOD(WX10-DATA-SUB1) = "E" *-------- ORDER UP TO STATIC CALCULATION ----------------------* CRV10A THEN CRV10A MOVE JLF40-CAPACITY(WX10-DATA-SUB1) CRV10A TO JLPRF-CAP-SAFE-QTY CRV10A MOVE "T" TO JLPRF-CAP-SAFE-IND CRV10A ELSE 379700 IF JLF40-CALC-METHOD(WX10-DATA-SUB1) = "1" 21740600 *-------- DEMAND LINE FILL-UP LONG LIFE -----------------------* 379700 OR JLF40-CALC-METHOD(WX10-DATA-SUB1) = "2" 21740600 *-------- DEMAND LINE TOP-UP LONG LIFE ------------------------* 379700 OR JLF40-CALC-METHOD(WX10-DATA-SUB1) = "A" 21740600 *-------- DEMAND LINE FILL-UP MEDIUM LIFE ---------------------* 379700 OR JLF40-CALC-METHOD(WX10-DATA-SUB1) = "B" 21740600 *-------- DEMAND LINE TOP-UP MEDIUM LIFE ----------------------* 380200 THEN 21742000 *-------- THESE ALL USE CAPACITY ------------------------------* 217430 MOVE JLF40-CAPACITY(WX10-DATA-SUB1) 21743000 217440 TO JLPRF-CAP-SAFE-QTY 21744000 217450 MOVE "C" TO JLPRF-CAP-SAFE-IND 21745000 ELSE 379700 IF JLF40-CALC-METHOD(WX10-DATA-SUB1) = "4" 21740600 *-------- NON DEMAND SHORT LIFE FILL-UP -----------------------* 379700 OR JLF40-CALC-METHOD(WX10-DATA-SUB1) = "5" 21740600 *-------- NON DEMAND TOP-UP -----------------------------------* 379700 OR JLF40-CALC-METHOD(WX10-DATA-SUB1) = "7" 21740600 *-------- STOCK FILL LINE NON-FILL ----------------------------* 380200 THEN 21742000 *-------- THESE ALL USE SALES + SAFETY ------------------------* 217320*----- 14/06/2002 - GM ---------------------------------------* 21732000 379900* MOVE JLF40-SAFETY-STK-QTY(WX10-DATA-SUB1) 21740800 379900 MOVE JLF40-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) 21740800 217320*-------------------------------------------------------------* 21732000 380000 TO JLPRF-CAP-SAFE-QTY 21740900 380100 MOVE "S" TO JLPRF-CAP-SAFE-IND 21741000 380200 ELSE 21742000 *-------- ALL OTHERS MAY USE EITHER SALES + SAFETY OR CAPACITY-* 379700 IF WW01-TARGET-STOCK > JLF40-CAPACITY(WX10-DATA-SUB1) 379800 THEN 21740700 217320*----- 14/06/2002 - GM ---------------------------------------* 21732000 379900* MOVE JLF40-SAFETY-STK-QTY(WX10-DATA-SUB1) 21740800 379900 MOVE JLF40-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) 21740800 217320*-------------------------------------------------------------* 21732000 380000 TO JLPRF-CAP-SAFE-QTY 21740900 380100 MOVE "S" TO JLPRF-CAP-SAFE-IND 21741000 380200 ELSE 21742000 380300 MOVE JLF40-CAPACITY(WX10-DATA-SUB1) 21743000 380400 TO JLPRF-CAP-SAFE-QTY 21744000 380500 MOVE "C" TO JLPRF-CAP-SAFE-IND 21745000 380600 END-IF 21746000 380600 END-IF 21746000 380600 END-IF 21746000 380600 END-IF 21746000 217460 END-IF. 21746000 039700*---------------------------------------------------------------* 01842033 217470 21747000 204700*----- CHG - 21/10/99 - GM -------------------------------------* 20470000 204700*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* 20470000 204700*----- JLF40 SUBSCRIPTED ENTRY ---------------------------------* 20470000 204000 MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) 20400000 204000 TO JLPRF-FIRST-ORD-TYPE-OF-DAY. 20400000 204000 MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) 20400000 204000 TO JLPRF-LAST-ORDER. 20400000 204700*---------------------------------------------------------------* 20470000 217470 21747000 217480 PERFORM Y-300-WRITE-OUTPUT3. 21748000 217490 21749000 217500 B-830-EXIT. 21750000 217600 EXIT. 21760000 217700 21770000 217800 B-840-CREATE-ALLOCS SECTION. 21780000 217900*---------------------------------------------------------------* 21790000 218000* SECTION NAME : B-840-CREATE-ALLOCS * 21800000 218100* CALLED BY : * 21810000 218200* CALLS : * 21820000 218300* FUNCTION : 1. CREATES THE OUTPUT FILE OF ALLOCATION QTYS * 21830000 218400*---------------------------------------------------------------* 21840000 218500 B-840. 21850000 574800* DISPLAY "B-840". 57480018 218860 21886000 218860*-------------------------------------------------------- 21886000 218860*-------IF THE PRODUCT IS ON ALLOCATION ACCORDING TO CR 21886000 218860*-------BUT ALP RECORDS NOT FOUND, WE HAVE CONTINUED TO 21886000 218860*-------CALC ORDERS, BUT ARE NO LONGER TREATING AS AN 21886000 218860*-------ALLOCATION LINE, THEREFORE DO NOT WRITE OUT 21886000 218860*-------A RECORD HERE, 21886000 218860 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) >= 21886000 218860 JLF40-ALLOC-STRT-DT AND 21886000 218860 JLF40-PER-STR-DATE(WX10-DATA-SUB1) <= 21886000 218860 JLF40-ALLOC-END-DT 21886000 218860 THEN 21886000 218860 CONTINUE 21886000 218860 ELSE 21886000 218860 GO TO B-840-EXIT 21886000 218860 END-IF. 21886000 218860 21886000 151800 IF JLF40-PER-STR-DATE(WX10-DATA-SUB1) > 15180000 151800 JLF40-LAST-FORCED-DT 15180000 218860 THEN 21886000 218860 CONTINUE 21886000 218860 ELSE 21886000 218860 GO TO B-840-EXIT 21886000 218860 END-IF. 21886000 218860 21886000 218895 IF JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) = SPACES 21889500 218897 AND JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) <= 0 21889700 218860 THEN 21886000 218860 GO TO B-840-EXIT 21886000 218860 ELSE 21886000 218860 CONTINUE 21886000 218860 END-IF. 21886000 218860*-------------------------------------------------------- 21886000 218860 21886000 218860 21886000 218700 MOVE WW01-CURR-PART-NO TO JLFOA-CR-PART-NO. 21870000 218800 MOVE WW01-CURR-RO-NO TO JLFOA-RETAIL-OUTLET-NO. 21880000 218810 MOVE WW01-CURR-BPR-TPN TO JLFOA-BASE-PRODUCT-NO. 21881000 218820 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 21882000 218830 TO JLFOA-LAST-FORCED-DATE. 21883000 218840 MOVE JLF40-ORDER-TYPE(WX10-DATA-SUB1) 21884000 218850 TO JLFOA-ORDER-TYPE. 21885000 218860 21886000 396431*----- 27/03/2001 - GM ---------------------------------------* 39643100 396432* MOVE JLF40-ALLOC-TYPE TO JLFOA-ALLOC-TYPE. 39643200 396433 MOVE JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 39643300 396434 TO JLFOA-ALLOC-TYPE. 39643400 396435*-------------------------------------------------------------* 39643500 218880 COMPUTE JLFOA-FCST-ORD-QTY = 21888000 218890 JLF40-FINAL-CASE-QTY(WX10-DATA-SUB1) * 21889000 218891 JLF40-UNIT-SIZE. 21889100 218892 MOVE JLF40-UNIT-SIZE TO JLFOA-UNIT-SIZE. 21889200 218893 MOVE JLF40-APPORTION-PC(WX10-DATA-SUB1) 21889300 218894 TO JLFOA-APPORTIONMENT. 21889400 218895 MOVE JLF40-ALLOC-PATTERN-ID(WX10-DATA-SUB1) 21889500 218896 TO JLFOA-ALL-PATT-ID-GRP. 21889600 218897 MOVE JLF40-NEW-LINE-QTY(WX10-DATA-SUB1) 21889700 218898 TO JLFOA-NEW-ALLOC-QTY. 21889800 218899 21889900 204700*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* 20470000 204700*----- JLF40 SUBSCRIPTED ENTRY ---------------------------------* 20470000 204000 MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) 20400000 204000 TO JLFOA-FIRST-ORD-TYPE-OF-DAY. 20400000 204000 MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) 20400000 204000 TO JLFOA-LAST-ORDER. 20400000 204700*---------------------------------------------------------------* 20470000 217470 21747000 218900 PERFORM Y-400-WRITE-OUTPUT4. 21890000 219000 21900000 219100 B-840-EXIT. 21910000 219200 EXIT. 21920000 219300 21930000 B-880-AO-CREATE-OUTPUT SECTION. 19080000 *---------------------------------------------------------------* 19090000 * * CREATE AVAILABILITY OPTIMISED ORDER CALC RECORDS * *---------------------------------------------------------------* MOVE "N" TO WW10-JLF46-PROCESSED * FIND DEMAND PERIOD ENTRY IN TABLE PERFORM VARYING WX10-DATA-SUB1 FROM 1 BY 1 UNTIL WX10-DATA-SUB1 > 75 OR JLF46-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" END-PERFORM IF WX10-DATA-SUB1 > 75 SPR11A MOVE WW01-CURR-RO-NO TO WM39-RO-NO SPR11A MOVE WW01-CURR-BPR-TPN TO WM39-BPR-TPN MOVE WM39-JLF46-TABLE TO JLMSG-TEXT PERFORM JLMSG-DISPLAY-MESSAGE SPR11A SET PROCESS-NEXT-RO-TPN TO TRUE SPR11A PERFORM B-999-DUMP-REJECTS SPR11A GO TO B-350-EXIT END-IF 162S40 IF JLF46-DELY-IND(WX10-DATA-SUB1) = "N" 162S40 AND JLF46-CUST-ORD-QTY(WX10-DATA-SUB1) > 0 162S40 GO TO B-880-EXIT 162S40 END-IF 162S40 SPR14A SET WI24-PR-CNTL-NOT-SET TO TRUE SPR14A IF WT20-POT-REDN-CNTL (WX10-DATA-SUB1) = "Y" SPR14A SET WI24-PR-CNTL-SET TO TRUE SPR14A END-IF IF WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "A" SUM11A AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "B" SUM11A AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "R" 142S02 AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "O" 142S02 AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "P" GO TO B-880-EXIT END-IF KFACTR MOVE WW01-CURR-PART-NO TO NWS-CR-PART-NO WW10-F46-CR-PART-NO SUM10A OJX-CR-PART-NO KFACTR MOVE WW01-CURR-RO-NO TO NWS-RO-NO WW10-F46-RO-NO SUM10A OJX-RO-NO KFACTR MOVE WW01-CURR-BPR-TPN TO NWS-BPR-TPN WW10-F46-BPR-TPN SUM10A OJX-BPR-TPN SUM10A SUM10A MOVE JLF46-PER-STR-DATE (WX10-DATA-SUB1) SUM10A TO OJX-REQ-DEL-DT SUM10A MOVE JLF46-ORDER-TYPE (WX10-DATA-SUB1) SUM10A TO OJX-ORD-TYPE SUM10A MOVE 0 TO OJX-ORD-REC-TYPE SUM10A KFACTR PERFORM V-810-SELECT-VXJJ0NWS 20010000 IF SQLCODE = +100 MOVE WW09-K-FACTOR TO JLF46-K-FACTOR ELSE KFACTR MOVE NWS-K-FACTOR TO JLF46-K-FACTOR END-IF SUM10A PERFORM V-111-READ-VXJJ0OJX SUM10A SUM10A 19040000 SUM10D IF WI17-F46-LOOKUP-ACTIVE= "Y" SUM10D MOVE WW09-LOOKUP-TABLE TO JLF46-LOOKUP-TABLE 20010000 SUM10D MOVE "N" TO WI17-F46-LOOKUP-ACTIVE SUM10D END-IF AVRS42 MOVE ZERO TO JLF46-RANDOMNESS-KA JLF46-CUSTREND-KB SUM10D AVRS42 IF WI35-ORDR-FUT-UNCERTN-YES AVRS42 AND WI36-ESP-VALUES-YES AVRS42 AND JLF26-USE-PAR-DEF = "N" AVRS42 SET NEW-PROCESS-LOOP TO TRUE AVRS42 MOVE 1 TO WX99-SUB AVRS42 PERFORM VARYING WX99-SUB FROM 1 BY 1 AVRS42 UNTIL END-NEW-PROCESS-LOOP AVRS42 MOVE WT85-KA(WX99-SUB) TO JLF46-KA(WX99-SUB) AVRS42 MOVE WT85-TREND(WX99-SUB) TO JLF46-TREND(WX99-SUB) AVRS42 AVRS42 IF WX99-SUB = 50 AVRS42 SET END-NEW-PROCESS-LOOP AVRS42 TO TRUE AVRS42 END-IF AVRS42 END-PERFORM AVRS42 MOVE WW-DEFAULT-K-FACTOR-MIN AVRS42 TO JLF46-K-FACTOR-MIN AVRS42 MOVE WW-DEFAULT-K-FACTOR-MAX AVRS42 TO JLF46-K-FACTOR-MAX AVRS42 MOVE WW-PROD-COEFFICIENT-DFLT AVRS42 TO JLF46-PROD-COEFF-KC AVRS42 MOVE "Y" TO JLF46-KA-KB-INDICATOR AVRS42 ELSE AVRS42 IF (WI35-ORDR-FUT-UNCERTN-YES AVRS42 AND WI36-ESP-VALUES-NO ) AVRDEL MOVE WW-KA-CALC TO JLF46-RANDOMNESS-KA AVRDEL MOVE WW-KB-CALC TO JLF46-CUSTREND-KB AVRDEL MOVE WW-K-FACTOR-MIN-CALC AVRDEL TO JLF46-K-FACTOR-MIN AVRDEL MOVE WW-K-FACTOR-MAX-CALC AVRDEL TO JLF46-K-FACTOR-MAX AVRDEL MOVE WW-PROD-COEFFICIENT-CALC AVRDEL TO JLF46-PROD-COEFF-KC AVRS42 ELSE AVRS42 MOVE WW-KA-CALC-DFLT TO JLF46-RANDOMNESS-KA AVRS42 MOVE WW-KB-CALC-DFLT TO JLF46-CUSTREND-KB AVRS42 MOVE WW-DEFAULT-K-FACTOR-MIN AVRS42 TO JLF46-K-FACTOR-MIN AVRS42 MOVE WW-DEFAULT-K-FACTOR-MAX AVRS42 TO JLF46-K-FACTOR-MAX AVRS42 MOVE WW-PROD-COEFFICIENT-DFLT AVRS42 TO JLF46-PROD-COEFF-KC AVRS42 END-IF AVRS42 MOVE "N" TO JLF46-KA-KB-INDICATOR AVRS42 END-IF MOVE WW09-WASTE-MAPPING-HOURS TO JLF46-WASTE-MAP-HOURS PS2S11 MOVE WI35-ORDR-FUT-UNCERTN-IND TO JLF46-ORDR-FUT-UNCERTN-IND 08500000 IF WW10-JLFEX-KEY < WW10-JLF46-KEY PERFORM X-700-READ-JLFOEXCP UNTIL WW10-JLFEX-KEY NOT < WW10-JLF46-KEY END-IF IF WW10-JLFEX-KEY = WW10-JLF46-KEY SUM09A MOVE JLFEX-IN-ROTATE-PERC TO WW09-IN-ROTATE-PERCENT 08506000 MOVE JLFEX-STK-ROTATE-PERC SUM09A TO WW09-STOCK-ROTATE-PERCENT 08508000 SUM09A ELSE 08509000 SUM09A MOVE 1.00 TO WW09-IN-ROTATE-PERCENT 08510000 SUM09A WW09-STOCK-ROTATE-PERCENT 08511000 END-IF 20010000 08513000 SUM09B IF NOT WT10-PROM-IND(WX10-DATA-SUB1) = "Y" 22160000 SPR08B 08515000 SUM12A MOVE 1 TO WX95-SUB SUM09B PERFORM B-890-CREATE-NWS 08513000 SUM09B END-IF 08513000 08513000 SUM09A PERFORM B-895-BUILD-SRP-IRP 08516002 SPR08B SPR08A INITIALIZE JLF48-DATA SPR08A SET NEW-PROCESS-LOOP TO TRUE SPR08A MOVE 1 TO WX10-DATA-SUB1-NEW 20010000 SPR08A PERFORM UNTIL END-NEW-PROCESS-LOOP SPR08A MOVE JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) SPR08A TO SPR08A JLF48-PER-STR-DATE (WX10-DATA-SUB1-NEW) SPR08A SPR08A MOVE JLF46-PERIOD-CALC-TYPE (WX10-DATA-SUB1-NEW) SPR08A TO SPR08A JLF48-PERIOD-CALC-TYPE (WX10-DATA-SUB1-NEW) SPR08A SPR08A MOVE JLF46-WASTE-CONTROL-VALUE (WX10-DATA-SUB1-NEW) SPR08A TO SPR08A JLF48-WASTE-CONTROL-VALUE (WX10-DATA-SUB1-NEW) SPR08A SPR08A MOVE JLF46-EXP-SHELF-LIFE (WX10-DATA-SUB1-NEW) SPR08A TO SPR08A JLF48-EXP-SHELF-LIFE (WX10-DATA-SUB1-NEW) SPR08A NJ2S35 MOVE JLF46-WASTE-CONTROL-VER (WX10-DATA-SUB1-NEW) (1:3) NJ2S35 TO NJ2S35 JLF48-WASTE-CONTROL-VER (WX10-DATA-SUB1-NEW) SPR08B MOVE WW11-NOTNL-WKLY-SALES (WX10-DATA-SUB1-NEW) SPR08B TO SPR08A JLF48-NOTNL-WKLY-SALES (WX10-DATA-SUB1-NEW) SPR08A SPR08AD DISPLAY "BEFORE CALL TO F48 ::JLF48-NOTNL-WKLY-SALES::" SPR08AD JLF48-NOTNL-WKLY-SALES (WX10-DATA-SUB1-NEW) SPR08A SPR08AD DISPLAY "BEFORE CALL TO F48 ::JLF48-WASTE-SENSITIVITY:: " SPR08AD JLF48-WASTE-SENSITIVITY (WX10-DATA-SUB1-NEW) SPR08A ADD 1 TO WX10-DATA-SUB1-NEW SPR08A SPR08A IF WX10-DATA-SUB1-NEW > 75 SPR08A OR JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) = SPACES SPR08A SPR08A SET END-NEW-PROCESS-LOOP TO TRUE SPR08A SPR08A END-IF SPR08A END-PERFORM SPR08A SPR08A SPR08AD DISPLAY ":CALLING JL0F48:" SPR08A SUM11A* DISPLAY ".... CALLING F48" SPR08A PERFORM XC-CALL-JLF48 SPR08A SPR08A EVALUATE JLF48-SQLCODE SPR08A WHEN 0 SPR08A CONTINUE SPR08A WHEN OTHER SUM09A MOVE WW01-CURR-PART-NO TO WM45-PART-NO SUM09A MOVE WW01-CURR-RO-NO TO WM45-RO-NO SUM09A MOVE WW01-CURR-BPR-TPN TO WM45-BPR-TPN SUM09A MOVE WM45-WASTE-SENS TO JLMSG-TEXT SUM09A PERFORM JLMSG-DISPLAY-MESSAGE SUM09A SPR08A MOVE JLF48-ERROR-MESSAGE SPR08A TO WM42-CRITICAL SPR08A MOVE WM42-JLM48-CRITICAL SPR08A TO JLMSG-TEXT SPR08A PERFORM JLMSG-DISPLAY-MESSAGE SPR08A MOVE JLF48-SQLCA TO SQLCA SPR08A MOVE "B-880-AO-CREATE-OUTPUT" SPR08A TO JLDB2E-PROCESS-NAME SPR08A PERFORM JLDB2E-DB2-ERROR SPR08A SET JLMSG-C99-DB2-ERROR TO TRUE SPR08A PERFORM JLMSG-DISPLAY-MESSAGE SPR08A END-EVALUATE. SPR08A SPR08A SET NEW-PROCESS-LOOP TO TRUE SPR08A MOVE 1 TO WX10-DATA-SUB1-NEW SPR08A SPR08A PERFORM UNTIL END-NEW-PROCESS-LOOP SPR08A SPR08A MOVE JLF48-WASTE-SENSITIVITY (WX10-DATA-SUB1-NEW) SPR08A TO SPR08A JLF46-WASTE-SENSITIVITY (WX10-DATA-SUB1-NEW) SPR08AD DISPLAY "::JLF46-WASTE-SENSITIVITY::" SPR08AD JLF46-WASTE-SENSITIVITY (WX10-DATA-SUB1-NEW) SUM09A MOVE JLF48-ACCEPT-AVAILABLITY (WX10-DATA-SUB1-NEW) SUM09A TO 08591000 SUM09A JLF46-ACCEPT-AVAILABILITY (WX10-DATA-SUB1-NEW) 08594000 SUM09AD DISPLAY "::JLF46-ACCEPT-AVAILABILITY::" 08593000 SUM09AD JLF46-ACCEPT-AVAILABILITY (WX10-DATA-SUB1-NEW) 08594000 SPR08A SPR08A ADD 1 TO WX10-DATA-SUB1-NEW SPR08A IF WX10-DATA-SUB1-NEW > 75 SPR08A OR JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) = SPACES SPR08A SET END-NEW-PROCESS-LOOP TO TRUE SPR08A END-IF SPR08A END-PERFORM SPR08A 20010000 AUT06D* WE REQUIRE THE OLD ROWS TO BE PASSED TO JLF046 TO FIX BUG AUT06D* WHERE OUTSTANDING PD DELIVERIES CURRENTLY USE THE EXPECTED AUT06D* CODE LIFE AS OPPOSED TO THE ACTUAL CODE LIFE. AUT08B AUT08B INITIALIZE JLF46-WT40-OLD-CURSOR-DATA KS2S45 KS2S45 EVALUATE WF01-SLOWSEL-TRAIL KS2S45 WHEN "1" KS2S45 MOVE "N" TO JLF46-SLOW-SELL-IND KS2S45 WHEN "2" KS2S45 IF JLF46-RETAIL-OUTLET-NO NOT= WW-PREV-STORE2 KS2S45 SET WI-SLOW-NOT-EXISTS TO TRUE KS2S45 PERFORM B-214-CHECK-STORE-GROUP KS2S45 MOVE WT10-RETAIL-OUTLET-NO TO WW-PREV-STORE2 KS2S45 IF WI-SLOW-EXISTS KS2S45 MOVE "Y" TO JLF46-SLOW-SELL-IND KS2S45 ELSE KS2S45 MOVE "N" TO JLF46-SLOW-SELL-IND KS2S45 END-IF KS2S45 END-IF KS2S45 WHEN "3" KS2S45 MOVE "Y" TO JLF46-SLOW-SELL-IND KS2S45 WHEN OTHER KS2S45 MOVE "N" TO JLF46-SLOW-SELL-IND KS2S45 END-EVALUATE AUT08B AUT08B PERFORM VARYING WX80-WT40-SUB1 FROM 1 BY 1 AUT08B UNTIL WX80-WT40-SUB1 > 126 AUT08B OR WT40-REQ-DEL-DATE (WX80-WT40-SUB1) = SPACES AUT08B AUT08B MOVE WT40-BFFO-REQ-DEL-DATE (WX80-WT40-SUB1) AUT08B TO JLF46-WT40-REQ-DEL-DATE (WX80-WT40-SUB1) AUT08B SPR10A* IF WT40-BFFO-REQ-DEL-DATE (WX80-WT40-SUB1) SPR10A* NOT = WT40-REQ-DEL-DATE (WX80-WT40-SUB1) SPR10A* DISPLAY "EARLY DELIVERY FOR REQ DEL DT/ RO NO/ TPN: " SPR10A* WT40-BFFO-REQ-DEL-DATE (WX80-WT40-SUB1) "/ " SPR10A* JLF46-RETAIL-OUTLET-NO "/ " SPR10A* JLF46-BASE-PRODUCT-NO SPR10A* " ARRIVING: " SPR10A* WT40-REQ-DEL-DATE (WX80-WT40-SUB1) SPR10A* END-IF AUT08B AUT08B MOVE WT40-ORDER-TYPE (WX80-WT40-SUB1) AUT08B TO JLF46-WT40-ORDER-TYPE (WX80-WT40-SUB1) AUT08B MOVE WT40-CODE-DATE (WX80-WT40-SUB1) AUT08B TO JLF46-WT40-CODE-DATE (WX80-WT40-SUB1) AUT08B MOVE WT40-REVSD-ORD-QTY (WX80-WT40-SUB1) AUT08B TO JLF46-WT40-REVSD-ORD-QTY (WX80-WT40-SUB1) AUT08B MOVE WT40-REQ-DEL-TM (WX80-WT40-SUB1) AUT08B TO JLF46-WT40-REQ-DEL-TM (WX80-WT40-SUB1) AUT09A MOVE WT40-ACT-DEL-DATE(WX80-WT40-SUB1) AUT09A TO JLF46-WT40-ACT-DEL-DATE(WX80-WT40-SUB1) AUT09A MOVE WT40-ACT-DEL-TIME(WX80-WT40-SUB1) AUT09A TO JLF46-WT40-ACT-DEL-TIME(WX80-WT40-SUB1) AB2S10 MOVE WT40-ORD-DELIVERY-STS(WX80-WT40-SUB1) AB2S10 TO JLF46-WT40-ORD-DEL-STATUS(WX80-WT40-SUB1) AUT08B END-PERFORM SPR12A MOVE WF01-BFFODS TO SPR12A JLF46-DISP-SENSITIVITY SPR12A MOVE WF01-BFFOFEAF TO SPR12A JLF46-FTRE-FILL-TRGT-PC SPR12A MOVE WW19-ONETOUCH TO JLF46-ONE-TOUCH-Z SUM12A* PERFORM THE BELOW B-740 SECTION ONLY WHEN WE NEED SALES SUM12A* DATA BEYOND THE DATA GOT FROM THE BSP TABLE. SUM12A IF WW15-DATE-TILL-BSP-SALES-RQD = SPACES SUM12A* THIS IS A VERY RARE SCENARIO. IDEALLY SHOULD NEVER HAPPEN. SUM12A* WW15-DATE-TILL-BSP-SALES-RQD SHOULD ALWAYS BE POPULATED. SUM12A MOVE WT30-TESCO-YEAR(50) TO SUM12A WW15-DATE-TILL-BSP-SALES-RQD(1:4) SUM12A MOVE WT30-TESCO-WEEK(50) TO SUM12A WW15-DATE-TILL-BSP-SALES-RQD(5:2) SUM12A MOVE WT30-DAY-NO(50) TO SUM12A WW15-DATE-TILL-BSP-SALES-RQD(7:1) SUM12A END-IF SUM12A SUM12A IF WX95-MAX > 1 SUM12A IF WW15-DATE-TILL-BSP-SALES-RQD(1:6) SUM12A > WW15-LAST-BSP-TESCO-YRWK SUM12A PERFORM B-740-POPUL-JLF46-MISSNG-SALES SUM12A END-IF SUM12A END-IF SPR14A IF WI24-PR-CNTL-SET SPR14A PERFORM B-850-POTENTIAL-REDUCTION SUM12A END-IF SPR08AD DISPLAY ":CALLING JL0F46:" PERFORM XC-CALL-JLF46 20010000 20010000 SUM10B EVALUATE JLF46-ERROR-CODE 13591500 SUM10B WHEN ZEROES 13591600 SUM10B COMPUTE WA01-NO-OF-CASES = 13591700 SUM10B WA01-NO-OF-CASES 13591800 SUM10B + JLF46-NO-OF-CASES 13591900 SUM10B COMPUTE WA01-NO-OF-ZERO-ORDERS = 13592000 SUM10B WA01-NO-OF-ZERO-ORDERS 13593000 SUM10B + JLF46-NO-OF-ZEROCASE 13594000 SUM10B COMPUTE WA01-NO-OF-PRIORITY1 = 13595000 SUM10B WA01-NO-OF-PRIORITY1 13596000 SUM10B + JLF46-NO-OF-PRIORITY-1 13597000 SUM10B COMPUTE WA01-NO-OF-PRIORITY2 = 13598000 SUM10B WA01-NO-OF-PRIORITY2 13599000 SUM10B + JLF46-NO-OF-PRIORITY-2 13600000 SUM10B COMPUTE WA01-NO-OF-PRIORITY3 = 13598000 SUM10B WA01-NO-OF-PRIORITY3 13599000 SUM10B + JLF46-NO-OF-PRIORITY-3 13600000 SUM10B COMPUTE WA01-NO-OF-PRIORITY4 = 13598000 SUM10B WA01-NO-OF-PRIORITY4 13599000 SUM10B + JLF46-NO-OF-PRIORITY-4 13600000 SUM10B COMPUTE WA01-NO-OF-OOT = 13610000 SUM10B WA01-NO-OF-OOT 13620000 SUM10B + JLF46-NO-OF-OOT 13630000 SUM10B IF JLF46-SHORT-LIFE SUM10B PERFORM B-790-CREATE-JLFOEOOC-FOR-BFFO SUM10B END-IF SUM10B*---------------------------------------------------------------* 12200000 SUM10B WHEN 1 13750000 SUM10B MOVE "I" TO WM47-ID 13760000 SUM10B MOVE WW01-CURR-RO-NO TO WM47-RO-NO 13770000 SUM10B MOVE WW01-CURR-BPR-TPN TO WM47-BPR-TPN 13780000 SUM10B MOVE JLF46-ERROR-MSG TO WM47-MSG 13790000 SUM10B MOVE WM47-JL0F46-MSG TO JLMSG-TEXT 13800000 SUM10B* 22560000 SUM10B* * CAW SUPPRESS I14 MESSAGE AS IT IS NORMAL CASE. 22570000 SUM10B* 22580000 SUM10B IF WM47-I14 NOT = "I14" 22590000 SUM10B AND WM47-I14 NOT = "I15" 22590000 SUM10B PERFORM JLMSG-DISPLAY-MESSAGE 22600000 SUM10B END-IF 22610000 SUM10B COMPUTE WA01-NO-OF-CASES = 13820000 SUM10B WA01-NO-OF-CASES 13830000 SUM10B + JLF46-NO-OF-CASES 13840000 SUM10B COMPUTE WA01-NO-OF-ZERO-ORDERS = 13850000 SUM10B WA01-NO-OF-ZERO-ORDERS 13860000 SUM10B + JLF46-NO-OF-ZEROCASE 13870000 SUM10B COMPUTE WA01-NO-OF-PRIORITY1 = 13880000 SUM10B WA01-NO-OF-PRIORITY1 13890000 SUM10B + JLF46-NO-OF-PRIORITY-1 13900000 SUM10B COMPUTE WA01-NO-OF-PRIORITY2 = 13910000 SUM10B WA01-NO-OF-PRIORITY2 13920000 SUM10B + JLF46-NO-OF-PRIORITY-2 13930000 SUM10B COMPUTE WA01-NO-OF-PRIORITY3 = 13598000 SUM10B WA01-NO-OF-PRIORITY3 13599000 SUM10B + JLF46-NO-OF-PRIORITY-3 13600000 SUM10B COMPUTE WA01-NO-OF-PRIORITY4 = 13598000 SUM10B WA01-NO-OF-PRIORITY4 13599000 SUM10B + JLF46-NO-OF-PRIORITY-4 13600000 SUM10B COMPUTE WA01-NO-OF-OOT = 13940000 SUM10B WA01-NO-OF-OOT 13950000 SUM10B + JLF46-NO-OF-OOT 13960000 SUM10B IF JLF46-SHORT-LIFE SUM10B PERFORM B-790-CREATE-JLFOEOOC-FOR-BFFO SUM10B END-IF SUM10B*---------------------------------------------------------------* 22900000 SUM10B WHEN 16 13980000 SUM10B MOVE "C" TO WM47-ID 13990000 SUM10B MOVE WW01-CURR-RO-NO TO WM47-RO-NO 14000000 SUM10B MOVE WW01-CURR-BPR-TPN TO WM47-BPR-TPN 14010000 SUM10B MOVE JLF46-ERROR-MSG TO WM47-MSG 14020000 SUM10B MOVE WM47-JL0F46-MSG TO JLMSG-TEXT 14030000 SUM10B PERFORM JLMSG-DISPLAY-MESSAGE 14040000 SUM10B*---------------------------------------------------------------* 22900000 SUM10B WHEN OTHER 13650000 SUM10B MOVE "W" TO WM47-ID 13660000 SUM10B MOVE WW01-CURR-RO-NO TO WM47-RO-NO 13670000 SUM10B MOVE WW01-CURR-BPR-TPN TO WM47-BPR-TPN 13680000 SUM10B MOVE JLF46-ERROR-MSG TO WM47-MSG 13690000 SUM10B MOVE WM47-JL0F46-MSG TO JLMSG-TEXT 13700000 SUM10B PERFORM JLMSG-DISPLAY-MESSAGE 13710000 SUM10B SET PROCESS-NEXT-RO-TPN TO TRUE 13720000 SUM10B PERFORM B-999-DUMP-REJECTS 13730000 SUM10B GO TO B-350-EXIT 13740000 SUM10B END-EVALUATE. 14050000 20010000 MOVE "Y" TO WW10-JLF46-PROCESSED 20010000 * * FOR AVAILABILTY OPTIMISED ORDER WE WANT TO REPLICATE * THE B-800-CREATE-OUTPUT PROCESSING * BUT USING JLF46 DATA INSTEAD OF JLF40 THEN WE WANT * TO WRITE OUT NEW DIAX RECORDS USING JLF46 * AND FINALLY WE WANT TO WRITE DIAG RECORDS USING JLF40 * * CREATE OUTPUT RECORDS USING VALUES FROM JL0F46 PERFORM B-A00-CREATE-OUTPUT * CREATE JLFODIAX RECORDS USING VALUES FROM JL0F46 PERFORM B-B00-CREATE-OUTPUT . B-880-EXIT. 20020000 EXIT. SUM11A B-980-AO-CREATE-OUTPUT SECTION. 19080000 SUM11A*---------------------------------------------------------------* 19090000 SUM11A* SUM11A* CREATE BETTER GROCERY ORDER CALCULATION RECORDS SUM11A*---------------------------------------------------------------* SUM11A MOVE "N" TO WW10-JLF42-PROCESSED SUM11A SUM11A* FIND DEMAND PERIOD ENTRY IN TABLE SUM11A SUM11A PERFORM SUM11A VARYING WX10-DATA-SUB1 FROM 1 BY 1 SUM11A UNTIL WX10-DATA-SUB1 > 75 SUM11A OR JLF46-PERIOD-CALC-TYPE (WX10-DATA-SUB1) = "D" SUM11A END-PERFORM SUM11A SUM11A IF WX10-DATA-SUB1 > 75 SUM11A MOVE WW01-CURR-RO-NO TO WM39-RO-NO SUM11A MOVE WW01-CURR-BPR-TPN TO WM39-BPR-TPN SUM11A MOVE WM39-JLF46-TABLE TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A SET PROCESS-NEXT-RO-TPN TO TRUE SUM11A PERFORM B-999-DUMP-REJECTS SUM11A GO TO B-350-EXIT SUM11A END-IF SUM11A 162S40 IF JLF46-DELY-IND(WX10-DATA-SUB1) = "N" 162S40 AND JLF46-CUST-ORD-QTY(WX10-DATA-SUB1) > 0 162S40 GO TO B-980-EXIT 162S40 END-IF 162S40 SUM11A IF WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "B" SUM11A AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "R" 142S02 AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "O" 142S02 AND WT20-EXTERNAL-CALC-METHOD(WX10-DATA-SUB1) NOT = "P" SUM11A GO TO B-980-EXIT SUM11A END-IF SUM11A SPR12A IF BPR-MIN-SHELF-LIFE > 21 SPR12A MOVE WX10-DATA-SUB1 TO WX10-B475-SUB1 SPR12A MOVE WX10-DATA-SUB2 TO WX10-B475-SUB2 SPR12A PERFORM B-475-SET-ANTIC-WASTE-SALES SPR12A MOVE WX10-B475-SUB1 TO WX10-DATA-SUB1 SPR12A MOVE WX10-B475-SUB2 TO WX10-DATA-SUB2 SPR12A END-IF SPR12A SUM11A PERFORM B-610-COPY-JLF40 SUM11A KFACTR MOVE WW01-CURR-PART-NO TO NWS-CR-PART-NO SUM11A WW10-F42-CR-PART-NO KFACTR MOVE WW01-CURR-RO-NO TO NWS-RO-NO SUM11A WW10-F42-RO-NO KFACTR MOVE WW01-CURR-BPR-TPN TO NWS-BPR-TPN SUM11A WW10-F42-BPR-TPN SUM11A KFACTR PERFORM V-810-SELECT-VXJJ0NWS 20010000 SUM11A IF SQLCODE = +100 SUM11A MOVE WW09-K-FACTOR TO JLF42-K-FACTOR SUM11A ELSE KFACTR MOVE NWS-K-FACTOR TO JLF42-K-FACTOR SUM11A END-IF SUM11A MOVE WF01-BGOMINGP TO JLF42-BGO-MIN-GAP SUM11A MOVE 0 TO JLF42-LEAD-TIME-HRS SUM11A JLF42-PROCUREMENT-SIGMA(1) SUM11A*----------------------------------------------------------------* SUM11A* FOR A PBL PRODUCT , FIND PROCUREMENT ORDER LEAD TIME * SUM11A* FOR A PBS PRODUCT , FIND FINAL ORDER LEAD TIME * SUM11A*----------------------------------------------------------------* SUM11A SET NO-DEFAULT-LDTM TO TRUE SUM11A IF WW10-PICK-METH = "L" SUM11A MOVE WW01-CURR-BPR-TPN TO PPD-BPR-TPN SUM11A IF WW10-ORDER-TYPE-FIRSTD = "F" SUM11A MOVE WW10-REQ-DEL-DT-FIRSTD TO PPD-REQ-DEL-DT SUM11A MOVE WW10-REQ-DEL-TM-FIRSTD TO WW10-PPD-REQ-DEL-TM SUM11A ELSE SUM11A IF FIRST-FILLUP-FOUND SUM11A MOVE WW10-REQ-DEL-DT-FIRSTD-F TO PPD-REQ-DEL-DT SUM11A MOVE WW10-REQ-DEL-TM-FIRSTD-F TO WW10-PPD-REQ-DEL-TM SUM11A ELSE SUM11A SET DEFAULT-LDTM TO TRUE SUM11A END-IF SUM11A END-IF SUM11A IF NO-DEFAULT-LDTM SUM11A 25220000 SUM11A PERFORM V-900-READ-VXJJ0PPD SUM11A IF PPD-FOUND SUM11A COMPUTE WW10-LEADTIME = WW10-LEADTIME-DAYS * 24 SUM11A + (WW10-PPD-REQ-DEL-HRS - WW10-PPD-CALC-RUN-HRS) SUM11A END-IF SUM11A END-IF SUM11A IF DEFAULT-LDTM OR PPD-NOT-FOUND OR WW10-LEADTIME = 0 SUM11A MOVE WF01-BGOLEADTM TO WW10-LEADTIME SUM11A END-IF SUM11A END-IF SUM11A IF WW10-PICK-METH NOT = "L" SUM11A IF FIRST-FILLUP-FOUND SUM11A MOVE WW10-REQ-DEL-DT-FIRSTD-F TO ZZD-DATE2 SUM11A MOVE WW10-REQ-DEL-TM-FIRSTD-F TO WW10-REQ-DEL-TM-PBS SUM11A MOVE WW10-NOT-CAL-DT-FIRSTD-F TO ZZD-DATE1 SUM11A MOVE WW10-NOT-CAL-TM-FIRSTD-F SUM11A TO WW10-NOT-CAL-TM-PBS SUM11A ELSE SUM11A MOVE WW10-REQ-DEL-DT-FIRSTD TO ZZD-DATE2 SUM11A MOVE WW10-REQ-DEL-TM-FIRSTD TO WW10-REQ-DEL-TM-PBS SUM11A MOVE WW10-NOT-CAL-DT-FIRSTD TO ZZD-DATE1 SUM11A MOVE WW10-NOT-CAL-TM-FIRSTD TO SUM11A WW10-NOT-CAL-TM-PBS SUM11A END-IF SUM11A PERFORM B-998-DIFFERENCE-DAYS SUM11A MOVE ZZD-DIFF-IN-DAYS TO WW10-LEADTIME-DAYS SUM11A SUM11A SUM11A COMPUTE WW10-LEADTIME = WW10-LEADTIME-DAYS * 24 SUM11A + (WW10-REQ-DEL-HRS-PBS - WW10-NOT-CAL-HRS-PBS) SUM11A IF WW10-LEADTIME = 0 SUM11A MOVE WF01-BGOLEADTM TO WW10-LEADTIME SUM11A END-IF SUM11A END-IF SUM11A SUM11A MOVE WW10-LEADTIME TO JLF42-LEAD-TIME-HRS SUM11A SUM11A****************************************************************** SUM11A* FIND THE ACTUAL LEAD TIME ** SUM11A****************************************************************** SUM11A SUM11A MOVE WW10-REQ-DEL-DT-CALC TO ZZD-DATE1 SUM11A MOVE WW10-REQ-DEL-DT-FIRSTD TO ZZD-DATE2 SUM11A PERFORM B-998-DIFFERENCE-DAYS SUM11A MOVE ZZD-DIFF-IN-DAYS TO WW10-CALC-INTERVAL-DAYS SUM11A SUM11A SUM11A COMPUTE WW10-ACT-LEADTIME = WW10-CALC-INTERVAL-DAYS * 24 SUM11A + (WW10-REQ-DEL-HRS-FIRSTD - WW10-REQ-DEL-HRS-CALC) SUM11A SUM11A* DISPLAY "PROCESSING===> STORE " WW01-CURR-RO-NO 10741020 SUM11A* " PROD " WW01-CURR-BPR-TPN 10742020 SUM11A* " ACT LD TM :" WW10-ACT-LEADTIME SUM11A* " LD TM :" WW10-LEADTIME SUM11A****************************************************************** SUM11A* FOR TRUNCATED LEAD TIME SCENARIO, I.E WHEN THE REQUIRED LEAD * SUM11A* TIME IS GREATER THAN THE ACTUAL LEAD TIME BY MORE THAN 12 HRS, * SUM11A* QUERY OJG FOR PROCUREMENT SIGMA * SUM11A****************************************************************** SUM11A IF WW10-ACT-LEADTIME < WW10-LEADTIME SUM11A AND (WW10-LEADTIME - WW10-ACT-LEADTIME) > 12 SUM11A MOVE WW01-CURR-PART-NO TO OJG-CR-PART-NO SUM11A MOVE WW01-CURR-RO-NO TO OJG-RO-NO SUM11A MOVE WW01-CURR-BPR-TPN TO OJG-BPR-TPN SUM11A MOVE JLF42-PER-STR-DATE (WX10-DATA-SUB1) SUM11A TO OJG-REQ-DEL-DT SUM11A MOVE JLF42-ORDER-TYPE (WX10-DATA-SUB1) SUM11A TO OJG-ORD-TYPE SUM11A MOVE 0 TO OJG-ORD-REC-TYPE SUM11A PERFORM V-112-READ-VXJJ0OJG SUM11A END-IF SUM11A SUM11A IF WI17-F42-LOOKUP-ACTIVE= "Y" SUM11A MOVE WW09-LOOKUP-TABLE TO JLF42-LOOKUP-TABLE 20010000 SUM11A MOVE "N" TO WI17-F42-LOOKUP-ACTIVE SUM11A END-IF SUM11A SUM11A IF NOT WT10-PROM-IND(WX10-DATA-SUB1) = "Y" 22160000 SUM12A MOVE 1 TO WX95-SUB SUM11A PERFORM B-891-CREATE-NWS 08513000 SUM11A END-IF 08513000 SUM11A SUM13A IF (WT10-RATIO-PACK-IND = "C" AND SUM13A ((JL01X-RUN-ID NOT = "9" AND SUM13A WW01-RPKCALC-OC-X= "Y") OR SUM13A (JL01X-RUN-ID = "9" AND SUM13A WW01-RPKCALC-OF-X= "Y"))) SUM13A PERFORM B-982-RATIO-PACK-PROCESSING SUM11A END-IF 08513000 SUM11A SUM11A INITIALIZE JLF41-DATA SUM11A SET NEW-PROCESS-LOOP TO TRUE SUM11A MOVE 1 TO WX10-DATA-SUB1-NEW SUM11A 20010000 SUM11A PERFORM UNTIL END-NEW-PROCESS-LOOP SUM11A MOVE JLF42-PERIOD-CALC-TYPE (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF41-PERIOD-CALC-TYPE (WX10-DATA-SUB1-NEW) SUM11A SUM11A MOVE JLF42-WASTE-CONTROL-VALUE (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF41-WASTE-CONTROL-VALUE (WX10-DATA-SUB1-NEW) SUM11A NJ2S35 MOVE JLF42-WASTE-CONTROL-VER (WX10-DATA-SUB1-NEW) (4:3) NJ2S35 TO NJ2S35 JLF41-WASTE-CONTROL-VER (WX10-DATA-SUB1-NEW) SUM11A MOVE JLF42-UNIT-SIZE SUM11A TO SUM11A JLF41-CASE-SIZE (WX10-DATA-SUB1-NEW) SUM11A SUM11A MOVE WW11-NOTNL-WKLY-SALES (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF41-NOTNL-WKLY-SALES (WX10-DATA-SUB1-NEW) SUM11A ADD +1 TO WX10-DATA-SUB1-NEW SUM11A SUM11A IF WX10-DATA-SUB1-NEW > 75 SUM11A OR JLF42-PER-STR-DATE (WX10-DATA-SUB1-NEW) = SPACES SUM11A SET END-NEW-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A END-PERFORM SUM11A SUM11A PERFORM XC-CALL-JLF41 SUM11A SUM11A EVALUATE JLF41-SQLCODE SUM11A WHEN 0 SUM11A CONTINUE SUM11A WHEN OTHER SUM11A MOVE WW01-CURR-PART-NO TO WM45-PART-NO SUM11A MOVE WW01-CURR-RO-NO TO WM45-RO-NO SUM11A MOVE WW01-CURR-BPR-TPN TO WM45-BPR-TPN SUM11A MOVE WM45-WASTE-SENS TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A SUM11A MOVE JLF41-ERROR-MESSAGE SUM11A TO WM49-CRITICAL SUM11A MOVE WM49-JLM41-CRITICAL SUM11A TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A MOVE JLF41-SQLCA TO SQLCA SUM11A MOVE "B-980-AO-CREATE-OUTPUT" SUM11A TO JLDB2E-PROCESS-NAME SUM11A PERFORM JLDB2E-DB2-ERROR SUM11A SET JLMSG-C99-DB2-ERROR TO TRUE SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-EVALUATE. SUM11A SUM11A SET NEW-PROCESS-LOOP TO TRUE SUM11A MOVE 1 TO WX10-DATA-SUB1-NEW SUM11A SUM11A PERFORM UNTIL END-NEW-PROCESS-LOOP SUM11A SUM11A IF JLF42-PROM-SHELF-CAP (WX10-DATA-SUB1-NEW) > 0 SUM11A MOVE JLF41-FTRE-DAYS (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF42-MAX-DAYS-COVER (WX10-DATA-SUB1-NEW) SUM11A 08592000 SUM11A MOVE JLF41-FTRE-ONE-TOUCH-PC (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF42-ONE-TOUCH-PC (WX10-DATA-SUB1-NEW) SUM11A ELSE SUM11A MOVE JLF41-MAX-DAYS-COVER(WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF42-MAX-DAYS-COVER (WX10-DATA-SUB1-NEW) SUM11A 08592000 SUM11A MOVE JLF41-ONE-TCH-PC (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF42-ONE-TOUCH-PC (WX10-DATA-SUB1-NEW) SUM11A END-IF SUM11A 142S03 IF WW01-CURR-RO-NO NOT= WW-PREV-STORE-NO 142S03 SET WI-ROZ-NOT-EXISTS TO TRUE 142S03 PERFORM B-98A-CHECK-GPH-STORE 142S03 MOVE WW01-CURR-RO-NO 142S03 TO WW-PREV-STORE-NO 142S03 END-IF 142S03 IF WI-ROZ-EXISTS 142S03 AND WW01-CURR-SG-CD NOT = WW01-PREV-SG-CD 142S03 SET WI-SGZ-NOT-EXISTS TO TRUE 142S03 PERFORM B-98B-CHECK-GPH-SUBGRP 142S03 MOVE WW01-CURR-SG-CD 142S03 TO WW01-PREV-SG-CD 142S03 END-IF 142S03 10240000 VR2S06 MOVE SPACES TO VR2S06 JLF42-MAX-DAYS-COVER-CAP(WX10-DATA-SUB1-NEW) VR2S06 142S03 IF WI-ROZ-EXISTS 10240000 142S03 AND WI-SGZ-EXISTS 10240000 142S02 SET JLF42-MAX-DAYS-NOT-CAPPED (WX10-DATA-SUB1-NEW) 142S02 TO TRUE 142S02 IF (JLF42-EXP-SHELF-LIFE (WX10-DATA-SUB1-NEW) 12048001 142S02 < JLF42-MAX-DAYS-COVER(WX10-DATA-SUB1-NEW)) 142S02 MOVE JLF42-EXP-SHELF-LIFE(WX10-DATA-SUB1-NEW) 11712000 142S02 TO 142S02 JLF42-MAX-DAYS-COVER (WX10-DATA-SUB1-NEW) 142S02 SET JLF42-MAX-DAYS-CAPPED (WX10-DATA-SUB1-NEW) 142S02 TO TRUE 142S02 END-IF 142S03 END-IF 142S02 SUM11A MOVE JLF41-MIN-AVAIL-PC (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF42-MIN-AVAIL-PC (WX10-DATA-SUB1-NEW) SUM11A 08592000 SUM11A MOVE JLF41-MIN-SNGLS (WX10-DATA-SUB1-NEW) SUM11A TO SUM11A JLF42-MIN-SNGLS(WX10-DATA-SUB1-NEW) SUM11A 08592000 SUM11A MOVE JLF41-MIN-CASE-PC (WX10-DATA-SUB1-NEW) SUM11A TO 08591000 SUM11A JLF42-MIN-CASE-PC (WX10-DATA-SUB1-NEW) 08592000 SUM11A 08592000 SUM11A MOVE JLF41-MIN-DAYS (WX10-DATA-SUB1-NEW) SUM11A TO 08591000 SUM11A JLF42-MIN-DAYS-COVER (WX10-DATA-SUB1-NEW) 08592000 SUM11A 08592000 SPR12A MOVE JLF41-DSR-SHLF-FILL-PC (WX10-DATA-SUB1-NEW) SPR12A TO SPR12A JLF42-DSR-SHLF-FILL-PC (WX10-DATA-SUB1-NEW) SUM11A 08592000 TA1226 MOVE JLF41-BACKROOM-SENS-VAL (WX10-DATA-SUB1-NEW) TA1226 TO TA1226 JLF42-BKRM-SENS-VAL (WX10-DATA-SUB1-NEW) PP2S05 MOVE WF01-BGOMAXCS PP2S05 TO PP2S05 JLF42-MAX-CASE-PER(WX10-DATA-SUB1-NEW) SUM11A 08592000 SUM11A ADD 1 TO WX10-DATA-SUB1-NEW SUM11A IF WX10-DATA-SUB1-NEW > 75 SUM11A OR JLF42-PER-STR-DATE (WX10-DATA-SUB1-NEW) = SPACES SUM11A SET END-NEW-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A END-PERFORM SUM11A SUM12A MOVE JLF42-SALES-DATE(50) TO WW10-MAX-DATE-ISO SUM12A MOVE JLF42-SALES-CCYYMMD(50) TO WW10-MAX-DATE-WF SUM12A SUM12A SUM11A IF WT10-STKD-PROD-ENDT NOT = SPACES SUM11A AND WW10-MAX-DATE-ISO > WT10-STKD-PROD-ENDT SUM11A****************************************************************** SUM11A* FIND THE WF FORMAT OF STOCK END DATE SUM11A****************************************************************** SUM11A SET DATE-NOT-FOUND TO TRUE SUM11A MOVE 1 TO WX90-WT90-SUB5 SUM11A MOVE WT10-STKD-PROD-ENDT TO ZZD-DATE1 SUM11A PERFORM VARYING WX90-WT90-SUB5 FROM WX90-WT90-SUB5 BY 1 SUM11A UNTIL WX90-WT90-SUB5 > WX90-WT90-MAX SUM11A OR DATE-FOUND SUM11A IF WT90-ISO-FORMAT (WX90-WT90-SUB5) = ZZD-DATE1 SUM11A MOVE WT90-WF-FORMAT (WX90-WT90-SUB5) SUM11A TO WW10-MAX-DATE-WF SUM11A SET DATE-FOUND TO TRUE SUM11A END-IF SUM11A END-PERFORM SUM11A IF DATE-NOT-FOUND SUM11A MOVE ZEROES TO ZZD-ERROR-CODE 15620000 SUM11A MOVE -1 TO ZZD-DIFF-IN-DAYS SUM11A MOVE "A" TO ZZD-FUNCTION-CODE 15630000 SUM11A MOVE "ISO" TO ZZD-DATE1-FORMAT 15640000 SUM11A MOVE "WF" TO ZZD-DATE2-FORMAT 15660000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM11A IF ZZD-ERROR-CODE NOT = 00 SUM11A THEN 15820000 SUM11A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 15830000 SUM11A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 15840000 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 15850000 SUM11A END-IF SUM11A MOVE ZZD-DATE2 TO WW10-MAX-DATE-WF 15870000 SUM11A END-IF SUM11A END-IF SUM12A IF WX95-MAX > 1 SUM11A IF WW10-MAX-DATE-WF(1:6) 19040000 SUM11A > WW15-LAST-BSP-TESCO-YRWK 19040000 SUM11A PERFORM B-640-POPUL-JLF42-MISSNG-SALES SUM11A END-IF SUM11A END-IF SUM11A 171S47 MOVE SPACES TO JLF42-SLOW-SELLER 171S47 EVALUATE TRUE 171S47 WHEN WF01-BGO-SLOWSEL-PAR-DATA ='1' 171S47 IF JLF42-RETAIL-OUTLET-NO NOT= WW-PREV-STORE3 171S47 SET WI-BSLOW-NOT-EXISTS TO TRUE 171S47 PERFORM B-218-CHECK-STORE-GROUP 171S47 MOVE JLF42-RETAIL-OUTLET-NO TO WW-PREV-STORE3 171S47 END-IF 171S47 IF WI-BSLOW-EXISTS 171S47 PERFORM B-219-CHECK-PRODUCT-GROUP 171S47 IF WI-SLOW-PROD-EXISTS1 171S47 MOVE 'S' TO JLF42-SLOW-SELLER 171S47 END-IF 171S47 END-IF 171S47 WHEN WF01-BGO-SLOWSEL-PAR-DATA ='2' 171S47 MOVE 'S' TO JLF42-SLOW-SELLER 171S47 WHEN WF01-BGO-SLOWSEL-PAR-DATA ='3' 171S47 CONTINUE 171S47 WHEN OTHER 171S47 CONTINUE 171S47 END-EVALUATE 171S47 171S47 SPR13B MOVE JL01X-RUN-ID TO JLF42-RUN-ID SM2S13 MOVE WF01-BGOMOE TO JLF42-BGO-MOE SUM11A PERFORM XC-CALL-JLF42 20010000 SUM11A 20010000 SUM11A EVALUATE JLF42-ERROR-CODE 13591500 SUM11A WHEN ZEROES 13591600 SUM11A COMPUTE WA01-NO-OF-CASES = 13591700 SUM11A WA01-NO-OF-CASES 13591800 SUM11A + JLF42-NO-OF-CASES 13591900 SUM11A COMPUTE WA01-NO-OF-ZERO-ORDERS = 13592000 SUM11A WA01-NO-OF-ZERO-ORDERS 13593000 SUM11A + JLF42-NO-OF-ZEROCASE 13594000 SUM11A COMPUTE WA01-NO-OF-PRIORITY1 = 13595000 SUM11A WA01-NO-OF-PRIORITY1 13596000 SUM11A + JLF42-NO-OF-PRIORITY-1 13597000 SUM11A COMPUTE WA01-NO-OF-PRIORITY2 = 13598000 SUM11A WA01-NO-OF-PRIORITY2 13599000 SUM11A + JLF42-NO-OF-PRIORITY-2 13600000 SUM11A COMPUTE WA01-NO-OF-PRIORITY3 = 13598000 SUM11A WA01-NO-OF-PRIORITY3 13599000 SUM11A + JLF42-NO-OF-PRIORITY-3 13600000 SUM11A COMPUTE WA01-NO-OF-PRIORITY4 = 13598000 SUM11A WA01-NO-OF-PRIORITY4 13599000 SUM11A + JLF42-NO-OF-PRIORITY-4 13600000 SUM11A COMPUTE WA01-NO-OF-OOT = 13610000 SUM11A WA01-NO-OF-OOT 13620000 SUM11A + JLF42-NO-OF-OOT 13630000 SUM11A IF JLF42-SHORT-LIFE SUM11A PERFORM B-790-CREATE-JLFOEOOC-FOR-BGO SUM11A END-IF SUM11A*---------------------------------------------------------------* 12200000 SUM11A WHEN 1 13750000 SUM11A MOVE "I" TO WM48-ID 13760000 SUM11A MOVE WW01-CURR-RO-NO TO WM48-RO-NO 13770000 SUM11A MOVE WW01-CURR-BPR-TPN TO WM48-BPR-TPN 13780000 SUM11A MOVE JLF42-ERROR-MSG TO WM48-MSG 13790000 SUM11A MOVE WM48-JL0F42-MSG TO JLMSG-TEXT 13800000 SUM11A* 22560000 SUM11A* * CAW SUPPRESS I14 MESSAGE AS IT IS NORMAL CASE. 22570000 SUM11A* 22580000 SUM11A IF WM48-I14 NOT = "I14" 22590000 SUM11A AND WM48-I14 NOT = "I15" 22590000 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 22600000 SUM11A END-IF 22610000 SUM11A COMPUTE WA01-NO-OF-CASES = 13820000 SUM11A WA01-NO-OF-CASES 13830000 SUM11A + JLF42-NO-OF-CASES 13840000 SUM11A COMPUTE WA01-NO-OF-ZERO-ORDERS = 13850000 SUM11A WA01-NO-OF-ZERO-ORDERS 13860000 SUM11A + JLF42-NO-OF-ZEROCASE 13870000 SUM11A COMPUTE WA01-NO-OF-PRIORITY1 = 13880000 SUM11A WA01-NO-OF-PRIORITY1 13890000 SUM11A + JLF42-NO-OF-PRIORITY-1 13900000 SUM11A COMPUTE WA01-NO-OF-PRIORITY2 = 13910000 SUM11A WA01-NO-OF-PRIORITY2 13920000 SUM11A + JLF42-NO-OF-PRIORITY-2 13930000 SUM11A COMPUTE WA01-NO-OF-PRIORITY3 = 13598000 SUM11A WA01-NO-OF-PRIORITY3 13599000 SUM11A + JLF42-NO-OF-PRIORITY-3 13600000 SUM11A COMPUTE WA01-NO-OF-PRIORITY4 = 13598000 SUM11A WA01-NO-OF-PRIORITY4 13599000 SUM11A + JLF42-NO-OF-PRIORITY-4 13600000 SUM11A COMPUTE WA01-NO-OF-OOT = 13940000 SUM11A WA01-NO-OF-OOT 13950000 SUM11A + JLF42-NO-OF-OOT 13960000 SUM11A IF JLF42-SHORT-LIFE SUM11A PERFORM B-790-CREATE-JLFOEOOC-FOR-BGO SUM11A END-IF SUM11A*---------------------------------------------------------------* 22900000 SUM11A WHEN 16 13980000 SUM11A MOVE "C" TO WM48-ID 13990000 SUM11A MOVE WW01-CURR-RO-NO TO WM48-RO-NO 14000000 SUM11A MOVE WW01-CURR-BPR-TPN TO WM48-BPR-TPN 14010000 SUM11A MOVE JLF42-ERROR-MSG TO WM48-MSG 14020000 SUM11A MOVE WM48-JL0F42-MSG TO JLMSG-TEXT 14030000 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 14040000 SUM11A*---------------------------------------------------------------* 22900000 SUM11A WHEN OTHER 13650000 SUM11A MOVE "W" TO WM48-ID 13660000 SUM11A MOVE WW01-CURR-RO-NO TO WM48-RO-NO 13670000 SUM11A MOVE WW01-CURR-BPR-TPN TO WM48-BPR-TPN 13680000 SUM11A MOVE JLF42-ERROR-MSG TO WM48-MSG 13690000 SUM11A MOVE WM48-JL0F42-MSG TO JLMSG-TEXT 13700000 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 13710000 SUM11A SET PROCESS-NEXT-RO-TPN TO TRUE 13720000 SUM11A PERFORM B-999-DUMP-REJECTS 13730000 SUM11A GO TO B-350-EXIT 13740000 SUM11A END-EVALUATE. 14050000 SUM11A 20010000 SUM11A MOVE "Y" TO WW10-JLF42-PROCESSED SUM11A 20010000 SUM11A* CREATE OUTPUT RECORDS USING VALUES FROM JL0F42 SUM11A PERFORM B-C00-CREATE-OUTPUT SUM11A SUM11A* CREATE JLFODIAH RECORDS USING VALUES FROM JL0F42 SUM11A PERFORM B-D00-CREATE-OUTPUT SUM11A RD2S19 PERFORM B-E00-CREATE-UNCCAL SUM11A . SUM11A B-980-EXIT. 20020000 SUM11A EXIT. 142S03 B-98A-CHECK-GPH-STORE SECTION. 10290000 142S03*---------------------------------------------------------------* 10300000 142S03* SECTION NAME : B-216-CHECK-GPH-STORE. * 10310000 142S03* FUNCTION : 1. CHECKS WHETHER A GIVEN STORE IS A PART OF * 10340000 142S03* : STORE GROUPING 'BGOMCOVR'. * 10340000 142S03*---------------------------------------------------------------* 10360000 142S03 B-98A. 10370000 142S03 MOVE "BGOMCOVR" TO GPH-GRP-CD 142S03 MOVE "O" TO GPH-APLCTN-ID 142S03 MOVE "ROZ" TO GPH-GRP-TYPE 142S03 MOVE WW01-CURR-RO-NO TO ROZ-RO-NO 142S03 EXEC SQL 142S03 SELECT "Y" 142S03 INTO :WI-ROZ-EXISTS-IND 142S03 FROM VXJJ0GPH GPH, 142S03 VXJJ0ROZ ROZ 142S03 WHERE GPH.GRP_CD = :GPH-GRP-CD 142S03 AND GPH.APLCTN_ID = :GPH-APLCTN-ID 142S03 AND GPH.GRP_TYPE = :GPH-GRP-TYPE 142S03 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE 142S03 AND ( GPH.GRP_END_DT IS NULL 142S03 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) 142S03 AND ROZ.RO_NO = :ROZ-RO-NO 142S03 AND ROZ.GRP_CD = GPH.GRP_CD 142S03 AND ROZ.APLCTN_ID = GPH.APLCTN_ID 142S03 AND ROZ.GRP_TYPE = GPH.GRP_TYPE 142S03 WITH UR 142S03 END-EXEC 142S03 EVALUATE SQLCODE 25210000 142S03 WHEN +0 25220000 142S03 CONTINUE 25220000 142S03 WHEN +100 25220000 142S03 SET WI-ROZ-NOT-EXISTS TO TRUE 25230000 142S03 WHEN OTHER 25250000 142S03 MOVE "B-98A-CHECK-GPH-STORE" 25260000 142S03 TO JLDB2E-PROCESS-NAME 25270000 142S03 PERFORM JLDB2E-DB2-ERROR 25280000 142S03 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 142S03 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 142S03 END-EVALUATE. 25310000 142S03 B-98A-EXIT. 10463000 142S03 EXIT. 10464000 10465000 142S03 B-98B-CHECK-GPH-SUBGRP SECTION. 10290000 142S03*---------------------------------------------------------------* 10300000 142S03* SECTION NAME : B-98B-CHECK-GPH-SUBGRP. * 10310000 142S03* FUNCTION : 1. CHECKS WHETHER A GIVEN PRODUCT IS A PART OF* 10340000 142S03* : SUBGRP GROUPING 'BGOMCOVR'. * 10340000 142S03*---------------------------------------------------------------* 10360000 142S03 B-98B. 10370000 142S03 MOVE "BGOMCOVR" TO GPH-GRP-CD 142S03 MOVE "O" TO GPH-APLCTN-ID 142S03 MOVE "SGZ" TO GPH-GRP-TYPE 142S03 MOVE WW01-CURR-SG-CD(1:1) TO WH02-CURR-SG-CD-1 142S03 MOVE WW01-CURR-SG-CD(1:2) TO WH02-CURR-SG-CD-2 142S03 MOVE WW01-CURR-SG-CD(1:3) TO WH02-CURR-SG-CD-3 142S03 MOVE WW01-CURR-SG-CD(1:4) TO WH02-CURR-SG-CD-4 142S03 MOVE WW01-CURR-SG-CD TO WH02-CURR-SG-CD-5 142S03 EXEC SQL 142S03 SELECT "Y" 142S03 INTO :WI-SGZ-EXISTS-IND 142S03 FROM VXJJ0GPH GPH, 142S03 VXJJ0SGZ SGZ 142S03 WHERE GPH.GRP_CD = :GPH-GRP-CD 142S03 AND GPH.APLCTN_ID = :GPH-APLCTN-ID 142S03 AND GPH.GRP_TYPE = :GPH-GRP-TYPE 142S03 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE 142S03 AND ( GPH.GRP_END_DT IS NULL 142S03 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) 142S03 AND SGZ.GRP_CD = GPH.GRP_CD 142S03 AND SGZ.APLCTN_ID = GPH.APLCTN_ID 142S03 AND SGZ.GRP_TYPE = GPH.GRP_TYPE 142S03 AND SGZ.SG_CD IN( :WH02-CURR-SG-CD-1, 142S03 :WH02-CURR-SG-CD-2, 142S03 :WH02-CURR-SG-CD-3, 142S03 :WH02-CURR-SG-CD-4, 142S03 :WH02-CURR-SG-CD-5) 142S03 WITH UR 142S03 END-EXEC 142S03 EVALUATE SQLCODE 25210000 142S03 WHEN +0 25220000 EQ53 WHEN -811 25220000 142S03 CONTINUE 25220000 142S03 WHEN +100 25220000 142S03 SET WI-SGZ-NOT-EXISTS TO TRUE 25230000 142S03 WHEN OTHER 25250000 142S03 MOVE " B-98B-CHECK-GPH-SUBGRP" 25260000 142S03 TO JLDB2E-PROCESS-NAME 25270000 142S03 PERFORM JLDB2E-DB2-ERROR 25280000 142S03 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 142S03 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 142S03 END-EVALUATE. 25310000 142S03 B-98B-EXIT. 10463000 142S03 EXIT. 10464000 PS2S11 B-99B-CHECK-GPH-SUBGRP-OFU SECTION. 10290000 PS2S11*---------------------------------------------------------------* 10300000 PS2S11* SECTION NAME : B-99B-CHECK-GPH-SUBGRP-OFU. * 10310000 PS2S11* FUNCTION : 1. CHECKS WHETHER A GIVEN PRODUCT IS A PART OF* 10340000 PS2S11* : SUBGRP GROUPING 'OFUPRD'. * 10340000 PS2S11*---------------------------------------------------------------* 10360000 PS2S11 B-99B. 10370000 PS2S11 MOVE "OFFUPRD" TO GPH-GRP-CD PS2S11 MOVE "O" TO GPH-APLCTN-ID PS2S11 MOVE "SGZ" TO GPH-GRP-TYPE PS2S11 MOVE WW01-OFU-SG-CD(1:1) TO WH03-CURR-SG-CD-1 PS2S11 MOVE WW01-OFU-SG-CD(1:2) TO WH03-CURR-SG-CD-2 PS2S11 MOVE WW01-OFU-SG-CD(1:3) TO WH03-CURR-SG-CD-3 PS2S11 MOVE WW01-OFU-SG-CD(1:4) TO WH03-CURR-SG-CD-4 PS2S11 MOVE WW01-OFU-SG-CD TO WH03-CURR-SG-CD-5 PS2S11 EXEC SQL PS2S11 SELECT "Y" PS2S11 INTO :WI-SGZ-EXISTS-OFU-IND PS2S11 FROM VXJJ0GPH GPH, PS2S11 VXJJ0SGZ SGZ PS2S11 WHERE GPH.GRP_CD = :GPH-GRP-CD PS2S11 AND GPH.APLCTN_ID = :GPH-APLCTN-ID PS2S11 AND GPH.GRP_TYPE = :GPH-GRP-TYPE PS2S11 AND GPH.GRP_EFFV_DT <= :WW01-CURR-DATE PS2S11 AND ( GPH.GRP_END_DT IS NULL PS2S11 OR GPH.GRP_END_DT >= :WW01-CURR-DATE ) PS2S11 AND SGZ.GRP_CD = GPH.GRP_CD PS2S11 AND SGZ.APLCTN_ID = GPH.APLCTN_ID PS2S11 AND SGZ.GRP_TYPE = GPH.GRP_TYPE PS2S11 AND SGZ.SG_CD IN( :WH03-CURR-SG-CD-1, PS2S11 :WH03-CURR-SG-CD-2, PS2S11 :WH03-CURR-SG-CD-3, PS2S11 :WH03-CURR-SG-CD-4, PS2S11 :WH03-CURR-SG-CD-5) PS2S11 WITH UR PS2S11 END-EXEC PS2S11 EVALUATE SQLCODE 25210000 PS2S11 WHEN +0 25220000 EQ53 WHEN -811 25220000 PS2S11 CONTINUE 25220000 PS2S11 WHEN +100 25220000 PS2S11 SET WI-SGZ-OFU-NOT-EXISTS TO TRUE 25230000 PS2S11 WHEN OTHER 25250000 PS2S11 MOVE "B-99B-CHECK-GPH-SUBGRP-OFU" 25260000 PS2S11 TO JLDB2E-PROCESS-NAME 25270000 PS2S11 PERFORM JLDB2E-DB2-ERROR 25280000 PS2S11 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 PS2S11 END-EVALUATE. 25310000 PS2S11 B-99B-EXIT. 10463000 PS2S11 EXIT. 10464000 SUM13A B-982-RATIO-PACK-PROCESSING SECTION. SUM13A*---------------------------------------------------------------* SUM13A* SECTION NAME : B-982-RATIO-PACK-PROCESSING * SUM13A* CALLED BY : B-980-AO-CREATE-OUTPUT * SUM13A* CALLS : * SUM13A* FUNCTION : FOR NON-ZERO RATIO PACK CAPACITY PRODUCTS NEXT* SUM13A* : RATIO PACK DELIVERY DATE IS FETCHED FROM THE * SUM13C* : TABLES VXJJ0OLD/VXJJ0OJD UPON A MATCH FOUND ON* SUM13A* : VXJJ0RPK TABLE.IF NO DATES ARE FOUND * SUM13A* : THEN SPACES ARE MOVED TO THE RP DELIVERY DATE * SUM13A*---------------------------------------------------------------* SUM13A B-982. SUM13AD DISPLAY "B-982-RATIO-PACK-PROCESSING" SUM13A SUM13A PERFORM VARYING WX98-DATA-SUB FROM 1 BY 1 SUM13A UNTIL WX98-DATA-SUB > WX98-DATA-MAX SUM13A MOVE SPACES TO SUM13A WT96-DEL-DATES(WX98-DATA-SUB) SUM13A MOVE SPACES TO SUM13C WT97-DEL-DATES(WX98-DATA-SUB) SUM13A END-PERFORM SUM13A SUM13A SET NOT-END-OLD-RP TO TRUE SUM13C SET NOT-END-OJD-RP TO TRUE SUM13A SUM13A PERFORM VA-OPEN-READNXT-OLD-RP-CURSOR SUM13A PERFORM VB-FETCH-READNXT-OLD-RP-CURSOR SUM13A PERFORM VARYING WX96-DATE-SUB FROM 1 BY 1 SUM13A UNTIL WX96-DATE-SUB > WX96-DATE-MAX OR END-OLD-RP SUM13A MOVE OLD-REQ-DEL-DT TO SUM13A WT96-DEL-DATES(WX96-DATE-SUB) SUM13A PERFORM VB-FETCH-READNXT-OLD-RP-CURSOR SUM13A END-PERFORM SUM13A PERFORM VC-CLOSE-READNXT-OLD-RP-CURSOR SUM13A SUM13C SET OJD-NOT-FETCHED TO TRUE SUM13A MOVE 1 TO WX10-DATA-SUB1-NEW SUM13A SET NEW-PROCESS-LOOP TO TRUE SUM13A SUM13A PERFORM UNTIL END-NEW-PROCESS-LOOP SUM13A IF JLF42-RATIO-PACK-CAP(WX10-DATA-SUB1-NEW) > 0 SUM13A PERFORM VARYING WX96-DATE-SUB FROM 1 BY 1 SUM13A UNTIL WT96-DEL-DATES(WX96-DATE-SUB) >= SUM13A JLF42-PER-STR-DATE(WX10-DATA-SUB1-NEW) SUM13A OR WT96-DEL-DATES(WX96-DATE-SUB)= SPACES OR SUM13A WX96-DATE-SUB > WX96-DATE-MAX SUM13A END-PERFORM SUM13A IF WX96-DATE-SUB <= WX96-DATE-MAX SUM13A AND WT96-DEL-DATES(WX96-DATE-SUB) >= SUM13A JLF42-PER-STR-DATE(WX10-DATA-SUB1-NEW) SUM13A MOVE WT96-DEL-DATES(WX96-DATE-SUB) TO SUM13A JLF42-NXT-RP-DEL-DT(WX10-DATA-SUB1-NEW) SUM13A ELSE SUM13C IF OJD-NOT-FETCHED SUM13C PERFORM VD-OPEN-READNXT-OJD-RP-CURSOR SUM13C PERFORM VE-FETCH-READNXT-OJD-RP-CURSOR SUM13A PERFORM VARYING WX97-DATE-SUB FROM 1 BY 1 SUM13C UNTIL WX97-DATE-SUB > WX97-DATE-MAX OR END-OJD-RP SUM13C MOVE OJD-REQ-DEL-DT TO SUM13C WT97-DEL-DATES(WX97-DATE-SUB) SUM13C PERFORM VE-FETCH-READNXT-OJD-RP-CURSOR SUM13A END-PERFORM SUM13C PERFORM VF-CLOSE-READNXT-OJD-RP-CURSOR SUM13C SET OJD-FETCHED TO TRUE SUM13A END-IF SUM13A PERFORM VARYING WX97-DATE-SUB FROM 1 BY 1 SUM13A UNTIL WX97-DATE-SUB > WX97-DATE-MAX SUM13C OR WT97-DEL-DATES(WX97-DATE-SUB)>= SUM13A JLF42-PER-STR-DATE(WX10-DATA-SUB1-NEW) SUM13C OR WT97-DEL-DATES(WX97-DATE-SUB) = SPACES SUM13A END-PERFORM SUM13A IF WX97-DATE-SUB <= WX97-DATE-MAX SUM13C AND WT97-DEL-DATES(WX97-DATE-SUB)>= SUM13A JLF42-PER-STR-DATE(WX10-DATA-SUB1-NEW) SUM13C MOVE WT97-DEL-DATES(WX97-DATE-SUB) TO SUM13A JLF42-NXT-RP-DEL-DT(WX10-DATA-SUB1-NEW) SUM13A END-IF SUM13A END-IF SUM13A END-IF SUM13A ADD +1 TO WX10-DATA-SUB1-NEW SUM13A IF WX10-DATA-SUB1-NEW > 75 SUM13A OR JLF42-PER-STR-DATE(WX10-DATA-SUB1-NEW) = SPACES SUM13A SET END-NEW-PROCESS-LOOP TO TRUE SUM13A END-IF SUM13A END-PERFORM SUM13A . SUM13A B-982-EXIT. 20020000 SUM11A EXIT. SUM11A B-998-DIFFERENCE-DAYS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-998-DIFFERENCE-DAYS * SUM11A* CALLED BY : B-980-AO-CREATE-OUTPUT * SUM11A* CALLS : * SUM11A* FUNCTION : FIND THE DIFFERENCE IN DAYS * SUM11A*---------------------------------------------------------------* SUM11A B-998. SUM11A* DISPLAY "B-998-DIFFERENCE-DAYS" SUM11A MOVE 0 TO ZZD-DIFF-IN-DAYS SUM11A SET DATE-NOT-FOUND TO TRUE SUM11A MOVE 1 TO WX90-WT90-SUB5 SUM11A PERFORM VARYING WX90-WT90-SUB5 FROM WX90-WT90-SUB5 BY 1 SUM11A UNTIL WX90-WT90-SUB5 > WX90-WT90-MAX SUM11A OR DATE-FOUND SUM11A IF WT90-ISO-FORMAT (WX90-WT90-SUB5) = ZZD-DATE1 SUM11A SET DATE-FOUND TO TRUE SUM11A MOVE WX90-WT90-SUB5 TO WW10-SUB1 SUM11A END-IF SUM11A END-PERFORM SUM11A IF DATE-FOUND SUM11A SET DATE-NOT-FOUND TO TRUE SUM11A PERFORM VARYING WX90-WT90-SUB5 FROM WW10-SUB1 BY 1 SUM11A UNTIL WX90-WT90-SUB5 > WX90-WT90-MAX SUM11A OR DATE-FOUND SUM11A IF WT90-ISO-FORMAT (WX90-WT90-SUB5) = ZZD-DATE2 SUM11A SET DATE-FOUND TO TRUE SUM11A MOVE WX90-WT90-SUB5 TO WW10-SUB2 SUM11A END-IF SUM11A END-PERFORM SUM11A IF DATE-FOUND SUM11A COMPUTE ZZD-DIFF-IN-DAYS = WW10-SUB2 - WW10-SUB1 SUM11A END-IF SUM11A END-IF SUM11A IF DATE-NOT-FOUND SUM11A MOVE 0 TO ZZD-DIFF-IN-DAYS 15620000 SUM11A MOVE ZEROES TO ZZD-ERROR-CODE 15620000 SUM11A MOVE "D" TO ZZD-FUNCTION-CODE 15630000 SUM11A MOVE "ISO" TO ZZD-DATE1-FORMAT 15640000 SUM11A MOVE "ISO" TO ZZD-DATE2-FORMAT 15660000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM11A IF ZZD-ERROR-CODE NOT = 00 SUM11A THEN 15820000 SUM11A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 15830000 SUM11A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 15840000 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 15850000 SUM11A END-IF SUM11A END-IF SUM11A . SUM11A B-998-EXIT. 20020000 SUM11A EXIT. SUM11A SPR14A B-850-POTENTIAL-REDUCTION SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : B-850-POTENTIAL-REDUCTION * SPR14A* CALLED BY : B-880-AO-CREATE-OUTPUT * SPR14A* FUNCTION : CALCULATE PR EXPIRY AND SALES * SPR14A*---------------------------------------------------------------* SPR14A B-850. SPR14A SET NEW-PROCESS-LOOP TO TRUE SPR14D SET WI30-RDT-SALES-INT TO TRUE SPR14D SET WI31-SALES-NOT-ROUNDED TO TRUE SPR14A MOVE 1 TO WX10-DATA-SUB4 SPR14A SPR14A PERFORM UNTIL END-NEW-PROCESS-LOOP SPR14A MOVE WW01-CURR-PART-NO TO RDD-CR-PART-NO SPR14A MOVE WW01-CURR-RO-NO TO RDD-RO-NO SPR14A MOVE WW01-CURR-BPR-TPN TO RDD-BPR-TPN SPR14A MOVE JLF46-PER-STR-DATE (WX10-DATA-SUB4) SPR14A TO WH04-REQ-DEL-DATE SPR14A MOVE 1 TO WX90-WT90-SUB6 SPR14A PERFORM SPR14A UNTIL WT90-ISO-FORMAT (WX90-WT90-SUB6 ) SPR14A = JLF46-PER-STR-DATE (WX10-DATA-SUB4) SPR14A ADD 1 TO WX90-WT90-SUB6 SPR14A END-PERFORM SPR14A SUBTRACT 1 FROM WX90-WT90-SUB6 SPR14A MOVE WT90-ISO-FORMAT (WX90-WT90-SUB6 ) SPR14A TO WH04-PREV-REQ-DEL-DATE SPR14A SET WI25-NOT-END-OF-RDD-CURSOR TO TRUE SPR14A PERFORM VIA-OPEN-READNXT-RDD-CURSOR SPR14A PERFORM VIB-FETCH-READNXT-RDD-CURSOR SPR14A SET WI26-PR-DATA-NOT-FOUND TO TRUE SPR14A PERFORM UNTIL WI25-END-OF-RDD-CURSOR SPR14A OR WI26-PR-DATA-FOUND SPR14D* IN CASE OF SCAN SPR14A IF RDD-APP-ID = 'RT' SPR14A MOVE WW29-RDD-RED-QTY TO SPR14A JLF46-POT-REDN-EXPIRY (WX10-DATA-SUB4) SPR14A END-IF SPR14A SPR14A* IN CASE OF REVIEW OR REDUCTION AT SCAN SPR14A IF ((RDD-APP-ID = 'RR') SPR14A OR (RDD-APP-ID = 'RT' SPR14A AND RDD-RDN-AT-SCN-IND = 'Y')) SPR14A AND WI26-PR-DATA-NOT-FOUND SPR14A SET WI27-NOT-END-OF-RDT-CURSOR SPR14A TO TRUE SPR14A PERFORM VJA-OPEN-RDT-CURSOR SPR14A PERFORM VJB-FETCH-RDT-CURSOR SPR14A MOVE 0 TO WW29-REDN-SALES SPR14A SPR14A PERFORM UNTIL WI27-END-OF-RDT-CURSOR SPR14A MOVE 1 TO WW29-PR-PERC SPR14D SPR14D IF WW30-RDT-RED-DEC IS NOT ZERO SPR14D AND WI30-RDT-SALES-INT SPR14D SET WI30-RDT-SALES-DEC SPR14D TO TRUE SPR14D END-IF SPR14D SPR14A PERFORM B-851-GET-PR-PERCENT-VALUE SPR14A SPR14A COMPUTE WW29-REDN-SALES SPR14A = WW29-REDN-SALES SPR14A + (WW29-PR-PERC * RDT-RED-QTY) SPR14A SPR14A PERFORM VJB-FETCH-RDT-CURSOR SPR14A SPR14A END-PERFORM SPR14A SPR14A PERFORM VJC-CLOSE-RDT-CURSOR SPR14A SPR14D MOVE ZERO TO WW31-ROUND-SALES SPR14D WW32-SALES-DIFFERENCE SPR14D SPR14D* APPLY ROUNDING FOR REDUCTION SALES IF RDT SALES IS AN INTEGER SPR14D* WHICH DETERMINES A NON SELL BY WEIGHT ITEM SPR14D SPR14D IF WI30-RDT-SALES-INT SPR14D IF WI31-SALES-NOT-ROUNDED SPR14D SPR14D COMPUTE WW31-ROUND-SALES ROUNDED SPR14D = WW29-REDN-SALES SPR14D COMPUTE WW32-SALES-DIFFERENCE SPR14D = WW31-ROUND-SALES - WW29-REDN-SALE-INT SPR14D SPR14D* IF DIFFERENCE BETWEEN COMPUTED AND ROUNDED SALES VALUE IS ONE SPR14D* WHICH MEANS SALES IS ROUNDED ONCE,NEXT TIME ROUNDING IS NOT SPR14D* REQUIRED SPR14D SPR14D IF WW32-SALES-DIFFERENCE > ZERO SPR14D SET WI31-SALES-ROUNDED SPR14D TO TRUE SPR14D MOVE WW31-ROUND-SALES SPR14D TO WW29-REDN-SALES SPR14D END-IF SPR14D END-IF SPR14D SPR14D MOVE ZERO TO WW29-REDN-SALE-DEC SPR14D SPR14D END-IF SPR14A MOVE WW29-REDN-SALES TO SPR14A JLF46-REDN-SALES (WX10-DATA-SUB4) SPR14A SPR14A IF JLF46-REDN-SALES (WX10-DATA-SUB4) < ZERO SPR14A MOVE ZERO TO SPR14A JLF46-REDN-SALES (WX10-DATA-SUB4) SPR14A END-IF SPR14A SPR14A COMPUTE JLF46-POT-REDN-EXPIRY (WX10-DATA-SUB4) SPR14A = (WW29-RDD-RED-QTY SPR14A - JLF46-REDN-SALES (WX10-DATA-SUB4)) SPR14A SET WI26-PR-DATA-FOUND TO TRUE SPR14A END-IF SPR14A SPR14A PERFORM VIB-FETCH-READNXT-RDD-CURSOR SPR14A END-PERFORM SPR14A SPR14A PERFORM VIC-CLOSE-READNXT-RDD-CURSOR SPR14A SPR14A ADD 1 TO WX10-DATA-SUB4 SPR14A SPR14A IF WX10-DATA-SUB4 > 75 SPR14A OR JLF46-PER-STR-DATE (WX10-DATA-SUB4) = SPACES SPR14A OR JLF46-PER-STR-DATE (WX10-DATA-SUB4) SPR14A > WD-TOMORROW-DATE SPR14A SET END-NEW-PROCESS-LOOP TO TRUE SPR14A END-IF SPR14A SPR14A END-PERFORM. SPR14A SPR14A B-850-EXIT. SPR14A EXIT. SPR14A SPR14A B-851-GET-PR-PERCENT-VALUE SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : B-851-GET-PR-PERCENT-VALUE * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* FUNCTION : CALCULATE PR PERCENT VALUE * SPR14A*---------------------------------------------------------------* SPR14A B-851. SPR14A SPR14A SET WI28-NOT-END-OF-RDD1-CURSOR TO TRUE SPR14A SET WI29-PR-PER-NOT-SET TO TRUE SPR14A SPR14A PERFORM VKA-OPEN-READNXT2-RDD-CURSOR SPR14A PERFORM VKB-FETCH-READNXT2-RDD-CURSOR SPR14A SPR14A PERFORM SPR14A UNTIL WI28-END-OF-RDD1-CURSOR SPR14A OR WI29-PR-PER-SET SPR14A SPR14A IF JLF46-PER-STR-DATE (WX10-DATA-SUB4 ) SPR14A < RDD-OOC-DUE-DATE SPR14A MOVE WW29-PR-DAY1-PERC TO WW29-PR-PERC SPR14A SET WI29-PR-PER-SET TO TRUE SPR14A END-IF SPR14A SPR14A IF JLF46-PER-STR-DATE (WX10-DATA-SUB4 ) SPR14A > RDD-OOC-DUE-DATE SPR14A MOVE WW29-PR-DAY2-PERC TO WW29-PR-PERC SPR14A SET WI29-PR-PER-SET TO TRUE SPR14A END-IF SPR14A SPR14A PERFORM VKB-FETCH-READNXT2-RDD-CURSOR SPR14A END-PERFORM SPR14A SPR14A PERFORM VKC-CLOSE-READNXT2-RDD-CURSOR. SPR14A SPR14A B-851-EXIT. SUM11A EXIT. SUM11A SPR08B B-890-CREATE-NWS SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME : B-890-CREATE-NWS * SPR08B* CALLED BY : B-880-AO-CREATE-OUTPUT * SPR08B* CALLS : B-890-A-FIND-DAY-EDS * SPR08B* : B-890-B-FIND-NWS * SPR08B* FUNCTION : GETS THE EDS & PTP AND CALCULATES THE NWS FOR * SPR08B* EACH DEMAND PERIOD. * SPR08B*---------------------------------------------------------------* SPR08B B-890. SPR08B* DISPLAY "B-890" SPR08B INITIALIZE WW11-VARIABLES SPR08B SET NWS-PROCESS-LOOP TO TRUE SPR08B MOVE WX10-DATA-SUB1 TO WX70-DATA-SUB1 SPR08B SPR08B PERFORM UNTIL END-NWS-PROCESS-LOOP SPR08B SET SEARCH-EDS TO TRUE SPR08B MOVE 1 TO WX70-DATA-SUB2 SPR08B PERFORM B-890-A-FIND-DAY-EDS UNTIL EDS-FOUND SPR08B SPR08B ADD 1 TO WX70-DATA-SUB1 SPR08B IF JLF46-PER-STR-DATE (WX70-DATA-SUB1) = SPACES SPR08B OR WX70-DATA-SUB1 > 75 SPR08B SET END-NWS-PROCESS-LOOP TO TRUE SPR08B END-IF SPR08B END-PERFORM SPR08B SPR08B INITIALIZE WH02-PTP-ROW SPR08B SET NWS-PROCESS-LOOP TO TRUE SPR08B MOVE WX10-DATA-SUB1 TO WX70-DATA-SUB1 SPR08B MOVE JLF46-CR-PART-NO TO WH02-CR-PART-NO SPR08B WM43-CR-PART-NO SPR08B WM44-CR-PART-NO SPR10A* WM46-CR-PART-NO SPR08B MOVE JLF46-RETAIL-OUTLET-NO TO WH02-RETAIL-OUTLET-NO SPR08B WM43-RETAIL-OUTLET-NO SPR08B WM44-RETAIL-OUTLET-NO SPR10A* WM46-RETAIL-OUTLET-NO SPR08B MOVE JLF46-BASE-PRODUCT-NO TO WH02-BASE-PRODUCT-NO SPR08B WM43-BASE-PRODUCT-NO SPR08B WM44-BASE-PRODUCT-NO SPR10A* WM46-BASE-PRODUCT-NO SPR08B MOVE WW01-CURR-SG-CD(1:1) TO WH02-CURR-SG-CD-1 SPR08B MOVE WW01-CURR-SG-CD(1:2) TO WH02-CURR-SG-CD-2 SPR08B MOVE WW01-CURR-SG-CD(1:3) TO WH02-CURR-SG-CD-3 SPR08B MOVE WW01-CURR-SG-CD(1:4) TO WH02-CURR-SG-CD-4 SPR08B MOVE WW01-CURR-SG-CD TO WH02-CURR-SG-CD-5 SPR08B WM43-CURR-SG-CD SPR08B WM44-CURR-SG-CD SPR08B* WM46-CURR-SG-CD SPR08B SPR08B PERFORM UNTIL END-NWS-PROCESS-LOOP SPR08B SUM10B IF WW11-NEW-PTP-DATE (WX70-DATA-SUB1) = SPACES SUM10B MOVE WM44-NEW-PTP-DATE-CHECK TO JLMSG-TEXT SUM10B PERFORM JLMSG-DISPLAY-MESSAGE SUM10B END-IF SPR08B SPR08B PERFORM B-890-B-FIND-NWS SPR08B SUM12A IF WH02-PTP-YRWK NOT = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A PERFORM SUM12A UNTIL WH02-PTP-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A OR WX95-SUB = WX95-MAX SUM12A ADD 1 TO WX95-SUB SUM12A END-PERFORM SUM12A IF WH02-PTP-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A IF WT95-PTG-PTP-DONE(WX95-SUB) = SPACES SUM12A IF PTG-NOT-FOUND SUM12A IF PTP-PTP-TYPE = "S" SUM12A MOVE "Y" TO SUM12A WT95-PTP-S-ENTRY(WX95-SUB) SUM12A END-IF SUM12A ELSE SUM12A MOVE "Y" TO SUM12A WT95-PTG-ENTRY(WX95-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-PTG-PTP-DONE(WX95-SUB) SUM12A END-IF SUM12A END-IF SUM12A END-IF SPR08B SPR08B ADD 1 TO WX70-DATA-SUB1 SPR08B SPR08B IF JLF46-PER-STR-DATE (WX70-DATA-SUB1) = SPACES SPR08B OR WX70-DATA-SUB1 > 75 SPR08B SET END-NWS-PROCESS-LOOP TO TRUE SPR08B END-IF SPR08B END-PERFORM. SPR08B SPR08B B-890-EXIT. SPR08B EXIT. SUM09B SUM09B SPR08B B-890-A-FIND-DAY-EDS SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME : B-890-A-FIND-DAY-EDS * SPR08B* CALLED BY : B-890-CREATE-NWS * SPR08B* CALLS : * SPR08B* FUNCTION : IF THE DEMAND IS ONLY FOR A DAY THEN THE EDS * SPR08B* (EXPECTED DAILY SALES) OF THAT DAY WILL BE CONSIDERED. * SPR08B* IF THE DEMAND IS FOR MORE THAN A DAY THEN THE EDS WILL BE * SPR08B* CONSIDERED DEPENDING ON THE DELIVERY REQUIRED TIME I.E., * SPR08B* IF THE DEMAND PERIOD STARTS BEFORE NOON THEN THE CURRENT DAYS * SPR08B* EDS & PTP WILL BE CONSIDERED AND IF IT IS AFTER NOON THEN THE * SPR08B* FOLLOWING DAYS EDS & PTP WILL BE CONSIDERED * SPR08B*---------------------------------------------------------------* SPR08B B-890-A. SPR08B* DISPLAY "B-890-A" SPR08B SPR08B IF JLF46-PER-STR-DATE (WX70-DATA-SUB1) = SPR08B JLF46-SALES-DATE (WX70-DATA-SUB2) SPR08B SPR08B IF JLF46-PER-STR-DATE (WX70-DATA-SUB1) = SPR08B JLF46-PER-END-DATE (WX70-DATA-SUB1) SPR08B OR JLF46-EXP-SHELF-LIFE (WX70-DATA-SUB1) = 1 SPR08BD DISPLAY "DEMAND IS FOR A DAY" SPR08B MOVE JLF46-DAY-FCST-SALES (WX70-DATA-SUB2) TO SPR08B WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SPR08B MOVE JLF46-PER-STR-DATE (WX70-DATA-SUB1) TO SPR08B WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SPR08B SET EDS-FOUND TO TRUE SPR08B ELSE SPR08BD DISPLAY "DEMAND IS FOR MULTIPLE DAYS" SPR08B IF JLF46-PER-STR-TIME (WX70-DATA-SUB1) < WF01-MIDDAY SPR08BD DISPLAY " DELIVERY REQ_TIME IS BEFORE NOON" SPR08B MOVE JLF46-DAY-FCST-SALES (WX70-DATA-SUB2) TO SPR08B WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SPR08B MOVE JLF46-PER-STR-DATE (WX70-DATA-SUB1) TO SPR08B WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SPR08B SET EDS-FOUND TO TRUE SPR08B ELSE SPR08B MOVE ZEROES TO ZZD-ERROR-CODE SPR08B MOVE "A" TO ZZD-FUNCTION-CODE SPR08B MOVE "ISO" TO ZZD-DATE1-FORMAT SPR08B MOVE JLF46-PER-STR-DATE (WX70-DATA-SUB1) SPR08B TO ZZD-DATE1 SPR08B MOVE "ISO" TO ZZD-DATE2-FORMAT SPR08B MOVE 1 TO ZZD-DIFF-IN-DAYS SPR08B SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR08B SPR08B IF ZZD-ERROR-CODE NOT = 00 SPR08B MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SPR08B PERFORM JLMSG-DISPLAY-MESSAGE SPR08B END-IF SPR08B SPR08B MOVE ZZD-DATE2 TO WW11-NEXT-DAY-DATE SPR08B SPR08B PERFORM UNTIL EDS-FOUND SPR08B SPR08B IF JLF46-SALES-DATE (WX70-DATA-SUB2) = SPR08B WW11-NEXT-DAY-DATE SPR08B MOVE JLF46-DAY-FCST-SALES (WX70-DATA-SUB2) SPR08B TO SPR08B WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SPR08B MOVE WW11-NEXT-DAY-DATE TO SPR08B WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SPR08B SET EDS-FOUND TO TRUE SPR08B END-IF SPR08B ADD 1 TO WX70-DATA-SUB2 SPR08B IF JLF46-SALES-DATE (WX70-DATA-SUB2) = SPACES SPR08B OR WX70-DATA-SUB2 > 50 SPR08B SET EDS-FOUND TO TRUE SPR08B END-IF SPR08B END-PERFORM SPR08B END-IF SPR08B END-IF SPR08B ELSE SPR08B ADD 1 TO WX70-DATA-SUB2 SPR08B IF JLF46-SALES-DATE (WX70-DATA-SUB2) = SPACES SPR08B OR WX70-DATA-SUB2 > 50 SPR08B SET EDS-FOUND TO TRUE SPR08B END-IF SPR08B END-IF. SPR08B SPR08B B-890-A-EXIT. SPR08B EXIT. SPR08B SPR08B B-890-B-FIND-NWS SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME : B-890-B-FIND-NWS * SPR08B* CALLED BY : B-890-CREATE-NWS * SPR08B* CALLS : B-890-BA-FIND-DAILY-PTP * SPR10A* : B-712-BA-EVALUATE-PTG * SPR08B* FUNCTION : COMPUTES THE NOTIONAL WEEKLY SALES * SPR08B*---------------------------------------------------------------* SPR08B B-890-B. SPR08B* DISPLAY "B-890-B" SPR08B SPR08B MOVE ZEROES TO ZZD-ERROR-CODE SPR08B MOVE "A" TO ZZD-FUNCTION-CODE SPR08B MOVE "ISO" TO ZZD-DATE1-FORMAT SPR08B MOVE WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SPR08B TO ZZD-DATE1 SPR08B MOVE "WF" TO ZZD-DATE2-FORMAT SPR08B MOVE -1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR08B SPR08B IF ZZD-ERROR-CODE NOT = 00 SPR08B MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SPR08B PERFORM JLMSG-DISPLAY-MESSAGE SPR08B END-IF SPR08B SPR08B MOVE ZZD-DATE2(1:4) TO WT30-PTP-TESCO-YEAR SPR08B MOVE ZZD-DATE2(5:2) TO WT30-PTP-TESCO-WEEK SPR08B MOVE ZZD-DATE2(7:1) TO WT30-PTP-DAY-NO SPR08B SPR08B STRING WT30-PTP-TESCO-YEAR SPR08B , WT30-PTP-TESCO-WEEK SPR08B DELIMITED BY SIZE SPR08B INTO SPR08B WH02-PTP-YRWK SPR08B END-STRING SPR08B MOVE WH02-PTP-YRWK TO WM43-PTP-YRWK SPR10A* WM46-PTG-YRWK SPR08B SPR10A PERFORM B-712-BA-EVALUATE-PTG SPR10A SPR10A IF PTG-NOT-FOUND SPR10A IF WH02-PTP-YRWK NOT = WH02-PREV-PTP-YRWK SPR10A MOVE WH02-PTP-YRWK TO WH02-PREV-PTP-YRWK SUM12A IF PTP-TESCO-YRWK < WH02-PREV-PTP-YRWK AND SUM12A WH02-PREV-PTP-YRWK <= PTP-TESCO-YRWK-END SUM12A CONTINUE SUM12A ELSE SPR10A PERFORM B-890-BA-FIND-DAILY-PTP SUM12A END-IF SPR10A END-IF SPR10A EVALUATE WT30-PTP-DAY-NO SPR10A WHEN 1 SPR10A MOVE PTP-PTP-DAY-1 TO WW11-DAY-PTP SPR10A WHEN 2 SPR10A MOVE PTP-PTP-DAY-2 TO WW11-DAY-PTP SPR10A WHEN 3 SPR10A MOVE PTP-PTP-DAY-3 TO WW11-DAY-PTP SPR10A WHEN 4 SPR10A MOVE PTP-PTP-DAY-4 TO WW11-DAY-PTP SPR10A WHEN 5 SPR10A MOVE PTP-PTP-DAY-5 TO WW11-DAY-PTP SPR10A WHEN 6 SPR10A MOVE PTP-PTP-DAY-6 TO WW11-DAY-PTP SPR10A WHEN 7 SPR10A MOVE PTP-PTP-DAY-7 TO WW11-DAY-PTP SPR10A WHEN OTHER SPR10A MOVE PTP-PTP-DAY-1 TO WW11-DAY-PTP SPR10A END-EVALUATE SPR10A END-IF SPR08B SPR08B IF WW11-DAY-PTP = 0 SPR12A MOVE WW20-NOTNL-WKLY-SALES TO SPR08B WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SPR08B ELSE SPR08B COMPUTE WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) = SPR08B ( WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) * 100 ) SPR08B / WW11-DAY-PTP SPR08B END-IF. SPR08BD DISPLAY "FOR SUBSCRIPT OF :" WX70-DATA-SUB1 SPR08BD DISPLAY "WW11-NEW-PTP-DATE :" SPR08BD WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SPR08BD DISPLAY "WW11-DAY-PTP :" WW11-DAY-PTP SPR10A* IF PTG-FOUND SPR10A* DISPLAY "PTG YEAR WEEK SELECTED :" PTG-TESCO-YEAR SPR10A* PTG-TESCO-WEEK SPR10A* ELSE SPR10A* DISPLAY "PTP YEAR WEEK SELECTED :" PTP-TESCO-YRWK SPR10A* END-IF SPR08BD DISPLAY "WW11-EXPECTED-DAILY-SALES :" SPR08BD WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SPR08BD DISPLAY "WW11-NOTNL-WKLY-SALES :" SPR08BD WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SPR08B . SPR08B B-890-B-EXIT. SPR08B EXIT. SUM09B SPR08B B-890-BA-FIND-DAILY-PTP SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME :B-890-BA-FIND-DAILY-PTP * SPR08B* CALLED BY :B-890-B-FIND-NWS * SPR08B* CALLS :VGD-OPEN-PTP-CURSOR * SPR08B* :VGE-FETCH-PTP-CURSOR * SPR08B* :VGF-CLOSE-PTP-CURSOR * SPR08B* FUNCTION : * SPR08B*---------------------------------------------------------------* SPR08B B-890-BA. SPR08B* DISPLAY "B-890-BA" SPR08B INITIALIZE DCLVXJJ0PTP SPR08B SPR08B IF NOT WI10-PTP-CURSOR-OPEN SPR08B PERFORM VGD-OPEN-PTP-CURSOR SPR08B END-IF SPR08B SPR08B PERFORM VGE-FETCH-PTP-CURSOR SPR08B PERFORM VGF-CLOSE-PTP-CURSOR. SPR08B SPR08B B-890-BA-EXIT. EXIT. SUM11A B-891-CREATE-NWS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-891-CREATE-NWS * SUM11A* CALLED BY : B-980-AO-CREATE-OUTPUT * SUM11A* CALLS : B-891-A-FIND-DAY-EDS * SUM11A* : B-891-B-FIND-NWS * SUM11A* FUNCTION : GETS THE EDS & PTP AND CALCULATES THE NWS FOR * SUM11A* EACH DEMAND PERIOD. * SUM11A*---------------------------------------------------------------* SUM11A B-891. SUM11A INITIALIZE WW11-VARIABLES SUM11A SET NWS-PROCESS-LOOP TO TRUE SUM11A MOVE WX10-DATA-SUB1 TO WX70-DATA-SUB1 SUM11A SUM11A PERFORM UNTIL END-NWS-PROCESS-LOOP SUM11A SET SEARCH-EDS TO TRUE SUM11A MOVE 1 TO WX70-DATA-SUB2 SUM11A PERFORM B-891-A-FIND-DAY-EDS UNTIL EDS-FOUND SUM11A SUM11A ADD 1 TO WX70-DATA-SUB1 SUM11A IF JLF42-PER-STR-DATE (WX70-DATA-SUB1) = SPACES SUM11A OR WX70-DATA-SUB1 > 75 SUM11A SET END-NWS-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A END-PERFORM SUM11A SUM11A INITIALIZE WH02-PTP-ROW SUM11A SET NWS-PROCESS-LOOP TO TRUE SUM11A MOVE WX10-DATA-SUB1 TO WX70-DATA-SUB1 SUM11A MOVE JLF42-CR-PART-NO TO WH02-CR-PART-NO SUM11A WM43-CR-PART-NO SUM11A WM44-CR-PART-NO SUM11A MOVE JLF42-RETAIL-OUTLET-NO TO WH02-RETAIL-OUTLET-NO SUM11A WM43-RETAIL-OUTLET-NO SUM11A WM44-RETAIL-OUTLET-NO SUM11A MOVE JLF42-BASE-PRODUCT-NO TO WH02-BASE-PRODUCT-NO SUM11A WM43-BASE-PRODUCT-NO SUM11A WM44-BASE-PRODUCT-NO SUM11A MOVE WW01-CURR-SG-CD(1:1) TO WH02-CURR-SG-CD-1 SUM11A MOVE WW01-CURR-SG-CD(1:2) TO WH02-CURR-SG-CD-2 SUM11A MOVE WW01-CURR-SG-CD(1:3) TO WH02-CURR-SG-CD-3 SUM11A MOVE WW01-CURR-SG-CD(1:4) TO WH02-CURR-SG-CD-4 SUM11A MOVE WW01-CURR-SG-CD TO WH02-CURR-SG-CD-5 SUM11A WM43-CURR-SG-CD SUM11A WM44-CURR-SG-CD SUM11A SUM11A PERFORM UNTIL END-NWS-PROCESS-LOOP SUM11A SUM11A IF WW11-NEW-PTP-DATE (WX70-DATA-SUB1) = SPACES SUM11A MOVE WM44-NEW-PTP-DATE-CHECK TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-IF SUM11A SUM11A PERFORM B-891-B-FIND-NWS SUM12A IF WH02-PTP-YRWK NOT = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A PERFORM SUM12A UNTIL WH02-PTP-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A OR WX95-SUB = WX95-MAX SUM12A ADD 1 TO WX95-SUB SUM12A END-PERFORM SUM12A IF WH02-PTP-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A IF WT95-PTG-PTP-DONE(WX95-SUB) = SPACES SUM12A IF PTG-NOT-FOUND SUM12A IF PTP-PTP-TYPE = "S" SUM12A MOVE "Y" TO SUM12A WT95-PTP-S-ENTRY(WX95-SUB) SUM12A END-IF SUM12A ELSE SUM12A MOVE "Y" TO SUM12A WT95-PTG-ENTRY(WX95-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-PTG-PTP-DONE(WX95-SUB) SUM12A END-IF SUM12A END-IF SUM12A END-IF SUM11A SUM11A ADD 1 TO WX70-DATA-SUB1 SUM11A SUM11A IF JLF42-PER-STR-DATE (WX70-DATA-SUB1) = SPACES SUM11A OR WX70-DATA-SUB1 > 75 SUM11A SET END-NWS-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A END-PERFORM. SUM11A SUM11A B-891-EXIT. SUM11A EXIT. SUM11A SUM11A B-891-A-FIND-DAY-EDS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-891-A-FIND-DAY-EDS * SUM11A* CALLED BY : B-891-CREATE-NWS * SUM11A* CALLS : * SUM11A* FUNCTION : IF THE DEMAND IS ONLY FOR A DAY THEN THE EDS * SUM11A* (EXPECTED DAILY SALES) OF THAT DAY WILL BE CONSIDERED. * SUM11A* IF THE DEMAND IS FOR MORE THAN A DAY THEN THE EDS WILL BE * SUM11A* CONSIDERED DEPENDING ON THE DELIVERY REQUIRED TIME I.E., * SUM11A* IF THE DEMAND PERIOD STARTS BEFORE NOON THEN THE CURRENT DAYS * SUM11A* EDS & PTP WILL BE CONSIDERED AND IF IT IS AFTER NOON THEN THE * SUM11A* FOLLOWING DAYS EDS & PTP WILL BE CONSIDERED * SUM11A*---------------------------------------------------------------* SUM11A B-891-A. SUM11A SUM11A IF JLF42-PER-STR-DATE (WX70-DATA-SUB1) = SUM11A JLF42-SALES-DATE (WX70-DATA-SUB2) SUM11A SUM11A IF JLF42-PER-STR-DATE (WX70-DATA-SUB1) = SUM11A JLF42-PER-END-DATE (WX70-DATA-SUB1) SUM11A OR JLF42-EXP-SHELF-LIFE (WX70-DATA-SUB1) = 1 SUM11AD DISPLAY "DEMAND IS FOR A DAY" SUM11A MOVE JLF42-DAY-FCST-SALES (WX70-DATA-SUB2) TO SUM11A WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM11A MOVE JLF42-PER-STR-DATE (WX70-DATA-SUB1) TO SUM11A WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM11A SET EDS-FOUND TO TRUE SUM11A ELSE SUM11AD DISPLAY "DEMAND IS FOR MULTIPLE DAYS" SUM11A IF JLF42-PER-STR-TIME (WX70-DATA-SUB1) < WF01-MIDDAY SUM11AD DISPLAY " DELIVERY REQ_TIME IS BEFORE NOON" SUM11A MOVE JLF42-DAY-FCST-SALES (WX70-DATA-SUB2) TO SUM11A WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM11A MOVE JLF42-PER-STR-DATE (WX70-DATA-SUB1) TO SUM11A WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM11A SET EDS-FOUND TO TRUE SUM11A ELSE SUM11A MOVE ZEROES TO ZZD-ERROR-CODE SUM11A MOVE "A" TO ZZD-FUNCTION-CODE SUM11A MOVE "ISO" TO ZZD-DATE1-FORMAT SUM11A MOVE JLF42-PER-STR-DATE (WX70-DATA-SUB1) SUM11A TO ZZD-DATE1 SUM11A MOVE "ISO" TO ZZD-DATE2-FORMAT SUM11A MOVE 1 TO ZZD-DIFF-IN-DAYS SUM11A SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM11A SUM11A IF ZZD-ERROR-CODE NOT = 00 SUM11A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-IF SUM11A SUM11A MOVE ZZD-DATE2 TO WW11-NEXT-DAY-DATE SUM11A SUM11A PERFORM UNTIL EDS-FOUND SUM11A SUM11A IF JLF42-SALES-DATE (WX70-DATA-SUB2) = SUM11A WW11-NEXT-DAY-DATE SUM11A MOVE JLF42-DAY-FCST-SALES (WX70-DATA-SUB2) SUM11A TO SUM11A WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM11A MOVE WW11-NEXT-DAY-DATE TO SUM11A WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM11A SET EDS-FOUND TO TRUE SUM11A END-IF SUM11A ADD 1 TO WX70-DATA-SUB2 SUM11A IF JLF42-SALES-DATE (WX70-DATA-SUB2) = SPACES SUM11A OR WX70-DATA-SUB2 > 50 SUM11A SET EDS-FOUND TO TRUE SUM11A END-IF SUM11A END-PERFORM SUM11A END-IF SUM11A END-IF SUM11A ELSE SUM11A ADD 1 TO WX70-DATA-SUB2 SUM11A IF JLF42-SALES-DATE (WX70-DATA-SUB2) = SPACES SUM11A OR WX70-DATA-SUB2 > 50 SUM11A SET EDS-FOUND TO TRUE SUM11A END-IF SUM11A END-IF. SUM11A SUM11A B-891-A-EXIT. SUM11A EXIT. SUM11A SUM11A B-891-B-FIND-NWS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-891-B-FIND-NWS * SUM11A* CALLED BY : B-891-CREATE-NWS * SUM11A* CALLS : B-891-BA-FIND-DAILY-PTP * SUM11A* : B-712-BA-EVALUATE-PTG * SUM11A* FUNCTION : COMPUTES THE NOTIONAL WEEKLY SALES * SUM11A*---------------------------------------------------------------* SUM11A B-891-B. SUM11A SUM11A MOVE ZEROES TO ZZD-ERROR-CODE SUM11A MOVE "A" TO ZZD-FUNCTION-CODE SUM11A MOVE "ISO" TO ZZD-DATE1-FORMAT SUM11A MOVE WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM11A TO ZZD-DATE1 SUM11A MOVE "WF" TO ZZD-DATE2-FORMAT SUM11A MOVE -1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM11A SUM11A IF ZZD-ERROR-CODE NOT = 00 SUM11A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-IF SUM11A SUM11A MOVE ZZD-DATE2(1:4) TO WT30-PTP-TESCO-YEAR SUM11A MOVE ZZD-DATE2(5:2) TO WT30-PTP-TESCO-WEEK SUM11A MOVE ZZD-DATE2(7:1) TO WT30-PTP-DAY-NO SUM11A SUM11A STRING WT30-PTP-TESCO-YEAR SUM11A , WT30-PTP-TESCO-WEEK SUM11A DELIMITED BY SIZE SUM11A INTO SUM11A WH02-PTP-YRWK SUM11A END-STRING SUM11A MOVE WH02-PTP-YRWK TO WM43-PTP-YRWK SUM11A* WM46-PTG-YRWK SUM11A SUM11A PERFORM B-712-BA-EVALUATE-PTG SUM11A SUM11A IF PTG-NOT-FOUND SUM11A IF WH02-PTP-YRWK NOT = WH02-PREV-PTP-YRWK SUM11A MOVE WH02-PTP-YRWK TO WH02-PREV-PTP-YRWK SUM12A IF PTP-TESCO-YRWK < WH02-PREV-PTP-YRWK AND SUM12A WH02-PREV-PTP-YRWK <= PTP-TESCO-YRWK-END SUM12A CONTINUE SUM12A ELSE SUM11A PERFORM B-891-BA-FIND-DAILY-PTP SUM12A END-IF SUM11A END-IF SUM11A EVALUATE WT30-PTP-DAY-NO SUM11A WHEN 1 SUM11A MOVE PTP-PTP-DAY-1 TO WW11-DAY-PTP SUM11A WHEN 2 SUM11A MOVE PTP-PTP-DAY-2 TO WW11-DAY-PTP SUM11A WHEN 3 SUM11A MOVE PTP-PTP-DAY-3 TO WW11-DAY-PTP SUM11A WHEN 4 SUM11A MOVE PTP-PTP-DAY-4 TO WW11-DAY-PTP SUM11A WHEN 5 SUM11A MOVE PTP-PTP-DAY-5 TO WW11-DAY-PTP SUM11A WHEN 6 SUM11A MOVE PTP-PTP-DAY-6 TO WW11-DAY-PTP SUM11A WHEN 7 SUM11A MOVE PTP-PTP-DAY-7 TO WW11-DAY-PTP SUM11A WHEN OTHER SUM11A MOVE PTP-PTP-DAY-1 TO WW11-DAY-PTP SUM11A END-EVALUATE SUM11A END-IF SUM11A SUM11A IF WW11-DAY-PTP = 0 SPR12A MOVE WW20-NOTNL-WKLY-SALES TO SUM11A WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SUM11A ELSE SUM11A COMPUTE WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) = SUM11A ( WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) * 100 ) SUM11A / WW11-DAY-PTP SUM11A END-IF. SUM11AD DISPLAY "FOR SUBSCRIPT OF :" WX70-DATA-SUB1 SUM11AD DISPLAY "WW11-NEW-PTP-DATE :" SUM11AD WW11-NEW-PTP-DATE (WX70-DATA-SUB1) SUM11AD DISPLAY "WW11-DAY-PTP :" WW11-DAY-PTP SUM11A* IF PTG-FOUND SUM11A* DISPLAY "PTG YEAR WEEK SELECTED :" PTG-TESCO-YEAR SUM11A* PTG-TESCO-WEEK SUM11A* ELSE SUM11A* DISPLAY "PTP YEAR WEEK SELECTED :" PTP-TESCO-YRWK SUM11A* END-IF SUM11AD DISPLAY "WW11-EXPECTED-DAILY-SALES :" SUM11AD WW11-EXPECTED-DAILY-SALES (WX70-DATA-SUB1) SUM11AD DISPLAY "WW11-NOTNL-WKLY-SALES :" SUM11AD WW11-NOTNL-WKLY-SALES (WX70-DATA-SUB1) SUM11A . SUM11A B-891-B-EXIT. SUM11A EXIT. SUM11A SUM11A B-891-BA-FIND-DAILY-PTP SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME :B-891-BA-FIND-DAILY-PTP * SUM11A* CALLED BY :B-891-B-FIND-NWS * SUM11A* CALLS :VGD-OPEN-PTP-CURSOR * SUM11A* :VGE-FETCH-PTP-CURSOR * SUM11A* :VGF-CLOSE-PTP-CURSOR * SUM11A* FUNCTION : * SUM11A*---------------------------------------------------------------* SUM11A B-891-BA. SUM11A INITIALIZE DCLVXJJ0PTP SUM11A SUM11A IF NOT WI10-PTP-CURSOR-OPEN SUM11A PERFORM VGD-OPEN-PTP-CURSOR SUM11A END-IF SUM11A SUM11A PERFORM VGE-FETCH-PTP-CURSOR SUM11A PERFORM VGF-CLOSE-PTP-CURSOR. SUM11A SUM11A B-891-BA-EXIT. SPR08B EXIT. SUM09A B-895-BUILD-SRP-IRP SECTION. 08928000 SUM09A*---------------------------------------------------------------* 08929000 SUM09A* SECTION NAME :B-895-BUILD-SRP-IRP * 08930000 SUM09A* CALLED BY :B-880-AO-CREATE-OUTPUT * 08931000 SUM09A* CALLS :B-895-A-GET-SRP-IRP-PERC * 08932000 SUM09A* FUNCTION :GET SRP/IRP VALUES USING THE CONTROL VALUES * 08933000 SUM09A*---------------------------------------------------------------* 08934000 SUM09A B-895. 08935000 SUM09AD DISPLAY "B-895" 08936000 SUM09A 08937000 SUM09A INITIALIZE WW12-VARIABLES 08937103 SUM09A SET NEW-PROCESS-LOOP TO TRUE 08938003 SUM09A MOVE WX10-DATA-SUB1 TO WX10-DATA-SUB1-NEW SUM09A 08940000 SUM09A PERFORM UNTIL END-NEW-PROCESS-LOOP 08941000 SUM09A 08942000 SUM09A COMPUTE WW12-SALES-RATE-THRESHOLD (WX10-DATA-SUB1-NEW) = 08943003 SUM09A (JLF46-EXP-SHELF-LIFE (WX10-DATA-SUB1-NEW) 08944000 SUM09A * WW11-NOTNL-WKLY-SALES (WX10-DATA-SUB1-NEW)) 08945000 SUM09A / (7 * JLF46-UNIT-SIZE) 08946004 SUM09A 08947000 SUM09AD DISPLAY "FOR ARRAY" WX10-DATA-SUB1-NEW SUM09AD DISPLAY "WW12-SALES-RATE-THRESHOLD" SUM09AD WW12-SALES-RATE-THRESHOLD (WX10-DATA-SUB1-NEW) SUM09AD DISPLAY "WF01-MIN-SALES-THRESHOLD" SUM09AD WF01-MIN-SALES-THRESHOLD SUM09A SUM09A IF WW12-SALES-RATE-THRESHOLD (WX10-DATA-SUB1-NEW) >= 08948003 WF01-MIN-SALES-THRESHOLD 08948103 SUM09A PERFORM B-895-A-GET-SRP-IRP-PERC 08949000 SUM09A ELSE 08950000 SUM09A MOVE 1.00 TO 08951000 SUM09A JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08952000 SUM09A JLF46-STOCK-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08953000 SUM09A END-IF 08954000 SUM09A SUM09AD DISPLAY "JLF46-IN-ROTATE-PERCENT" SUM09AD JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) SUM09AD DISPLAY "JLF46-STOCK-ROTATE-PERCENT" SUM09AD JLF46-STOCK-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) SUM09A 08955000 SUM09A ADD +1 TO WX10-DATA-SUB1-NEW 08956000 SUM09A IF WX10-DATA-SUB1-NEW > 75 08957000 SUM09A OR JLF46-PER-STR-DATE (WX10-DATA-SUB1-NEW) = SPACES 08958000 SUM09A SET END-NEW-PROCESS-LOOP TO TRUE 08959000 SUM09A END-IF 08960000 SUM09A END-PERFORM 08961000 SUM09A . 08962000 SUM09A B-895-EXIT. 08963000 SUM09A EXIT. 08964000 SUM09A 08965000 SUM09A B-895-A-GET-SRP-IRP-PERC SECTION. 08966000 SUM09A*---------------------------------------------------------------* 08967000 SUM09A* SECTION NAME :B-895-A-GET-SRP-IRP-PERC * 08968000 SUM09A* CALLED BY :B-895-BUILD-SRP-IRP * 08969000 SUM09A* CALLS :NONE * 08970000 SUM09A* FUNCTION :EVALUATE THE CONTROL VALUE AND GET SRP/IRP * 08971000 SUM09A*---------------------------------------------------------------* 08972000 SUM09A B-895-A. 08973000 SUM09AD DISPLAY "B-895-A" 08974000 SUM09A 08975000 SUM09A EVALUATE JLF46-SRP-IRP-PC (WX10-DATA-SUB1-NEW) 08976000 SUM09A WHEN 888 08977000 SUM09A MOVE 1.00 TO 08978000 SUM09A JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08979000 SUM09A JLF46-STOCK-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08980000 SUM09A WHEN 999 08981000 SUM09A MOVE WW09-IN-ROTATE-PERCENT TO 08982000 SUM09A JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08983000 SUM09A MOVE WW09-STOCK-ROTATE-PERCENT TO 08984000 SUM09A JLF46-STOCK-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08985000 SUM09A WHEN OTHER 08986000 SUM09A IF WF01-ROTTYPE = "SRP" 08987000 SUM09A COMPUTE 08988000 SUM09A JLF46-STOCK-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08989000 SUM09A = JLF46-SRP-IRP-PC (WX10-DATA-SUB1-NEW) / 100 08990000 SUM09A MOVE 1.00 TO 08991000 SUM09A JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08992000 SUM09A END-IF 08993000 SUM09A IF WF01-ROTTYPE = "IRP" 08994000 SUM09A MOVE 1.00 TO 08995000 SUM09A JLF46-STOCK-ROTATE-PERCENT(WX10-DATA-SUB1-NEW)08996000 SUM09A COMPUTE 08997000 SUM09A JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1-NEW) 08998000 SUM09A = JLF46-SRP-IRP-PC(WX10-DATA-SUB1-NEW) / 100 08999000 SUM09A END-IF 09000000 SUM09A END-EVALUATE 09001000 SUM09A . 09002000 SUM09A B-895-A-EXIT. 09003000 SPR08B EXIT. SPR08B SUM12A BA-540-GET-WRAP-WEEK SECTION. SUM12A*---------------------------------------------------------------* SUM12A* SECTION NAME :BA-540-GET-WRAP-WEEK * SUM12A* CALLED BY :B-740-POPUL-JLF46-MISSNG-SALES * SUM12A* :B-640-POPUL-JLF42-MISSNG-SALES * SUM12A* FUNCTION :TO GET THE WRAP WEEK FIRST OF ALL, LAST * SUM12A*AVAILBALE WEEK IN BSP IS REFERRED. IF PTG/PTP WITH TYPE S IS * SUM12A*IS FOUND THEN PROM-IND OF THAT WEEK WILL BE COMPARED AGAINST * SUM12A*SUNDAY OF PREVIOUS WEEK. IF BOTH HAVE DIFFERENT VALUES THEN * SUM12A*CHOOSE CURRENT WEEK AS WRAP WEEK ELSE MOVE ONE MORE WEEK * SUM12A*BACKWARD AND COMPARE PROM-IND. * SUM12A*---------------------------------------------------------------* SUM12A BA-540-GET-WRAP. SUM12A SUM12A MOVE WT10-CR-PART-NO TO JLF30-CR-PART-NO-A SUM12A MOVE WT10-RETAIL-OUTLET-NO TO JLF30-RO-NO SUM12A MOVE WT10-BASE-PRODUCT-NO TO JLF30-BPR-TPN SUM12A MOVE WT10-SUB-PG-CODE TO JLF30-SG-CD SUM12A MOVE WT95-RTL-YEAR-WK (WX95-MAX) TO WW24-CURR-YRWK SUM12A WW24-WRAP-YEAR-WEEK SUM12A SUM12A MOVE WX95-MAX TO WX95-SUB SUM12A PERFORM UNTIL WX95-SUB = 1 OR WI23-WRAP-WEEK-FOUND SUM12A PERFORM BAA-PTG-PTP-WRAP-WEEK SUM12A* COMPARISON OF PROM-IND OF CURRENT WEEK SUNDAY TO THE SUNDAY OF SUM12A* THE PREVIOUS WEEK. SUM12A IF WI23-WRAP-WEEK-NOT-FOUND SUM12A IF WT95-XSA-NIA-DONE (WX95-SUB) = SPACES SUM12A IF WW24-CURR-YRWK = WT95-RTL-YEAR-WK (WX95-SUB) SUM12A AND WI22-CURR-DATE-NOT-FOUND SUM12A MOVE WW24-CURR-YRWK TO SUM12A WW24-CURR-CCYYWWD(1:6) SUM12A MOVE WW24-DAY-NO TO SUM12A WW24-CURR-CCYYWWD(7:1) SUM12A MOVE WW24-CURR-YRWK TO SUM12A WW24-CURR-YEAR-WEEK SUM12A SET DATE-NOT-FOUND TO TRUE SUM12A MOVE 36 TO SUM12A WX22-DATE-SUB SUM12A PERFORM SUM12A UNTIL (WW24-CURR-YEAR = SUM12A WT90-WF-TESCO-YEAR (WX22-DATE-SUB) SUM12A AND WW24-CURR-WEEK = SUM12A WT90-WF-TESCO-WEEK (WX22-DATE-SUB) SUM12A AND WW24-DAY-NO = WT90-WF-DAY-NO (WX22-DATE-SUB)) SUM12A OR WX22-DATE-SUB > 84 SUM12A ADD 1 TO WX22-DATE-SUB SUM12A END-PERFORM SUM12A IF WW24-CURR-YEAR = SUM12A WT90-WF-TESCO-YEAR (WX22-DATE-SUB) SUM12A AND WW24-CURR-WEEK = SUM12A WT90-WF-TESCO-WEEK (WX22-DATE-SUB) SUM12A AND WW24-DAY-NO = SUM12A WT90-WF-DAY-NO (WX22-DATE-SUB) SUM12A MOVE WT90-ISO-FORMAT (WX22-DATE-SUB) SUM12A TO SUM12A WW24-CURR-WEEK-DAY7 SUM12A SET DATE-FOUND TO TRUE SUM12A END-IF SUM12A SUM12A IF DATE-NOT-FOUND SUM12A PERFORM BAB-CURR-WEEK-DAY7 SUM12A MOVE ZZD-DATE2 TO SUM12A WW24-CURR-WEEK-DAY7 SUM12A END-IF SUM12A SET WI22-CURR-DATE-FOUND TO TRUE SUM12A ELSE SUM12A CONTINUE SUM12A END-IF SUM12A IF WW24-CURR-WEEK-DAY7 >= WW01-START-DATE SUM12A AND WW24-CURR-WEEK-DAY7 <= WW01-END-DATE SUM12A MOVE 1 TO WX22-NEW-SUB SUM12A PERFORM UNTIL SUM12A WW24-CURR-WEEK-DAY7 = SUM12A WT10-DELY-REQ-DATE (WX22-NEW-SUB) SUM12A ADD 1 TO WX22-NEW-SUB SUM12A END-PERFORM SUM12A IF WT10-PROM-IND (WX22-NEW-SUB) = "Y" SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-FOUND (WX95-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-DONE (WX95-SUB) SUM12A ELSE SUM12A MOVE WW24-CURR-WEEK-DAY7 SUM12A TO WW24-START-DATE SPR13A PERFORM JLF30-SELECT-XSA-XSB SUM12A IF WI21-XSA-NIA-FOUND SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-FOUND (WX95-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-DONE (WX95-SUB) SUM12A END-IF SUM12A END-IF SUM12A* TO FIND THE PROMOTIONAL STATUS OF CURRENT WEEK -1 SUM12A COMPUTE WX22-CURR-MINUS-ONE-SUB = WX95-SUB - 1 SUM12A IF WT95-XSA-NIA-DONE (WX22-CURR-MINUS-ONE-SUB) SUM12A = SPACES SUM12A MOVE WT95-RTL-YEAR-WK (WX22-CURR-MINUS-ONE-SUB) SUM12A TO SUM12A WW24-CURR-MINUS-ONE-YRWK SUM12A IF DATE-FOUND SUM12A COMPUTE WX22-DATE-SUB1 = WX22-DATE-SUB - 7 SUM12A MOVE WT90-ISO-FORMAT (WX22-DATE-SUB1) SUM12A TO SUM12A WW24-CURR-MINUS-ONE-WEEK-DAY7 SUM12A ELSE SUM12A PERFORM BAC-CURR-MINUS-ONE-WEEK-DAY7 SUM12A MOVE ZZD-DATE2 TO SUM12A WW24-CURR-MINUS-ONE-WEEK-DAY7 SUM12A END-IF SUM12A IF WW24-CURR-MINUS-ONE-WEEK-DAY7 >= WW01-START-DATE SUM12A AND WW24-CURR-MINUS-ONE-WEEK-DAY7 <= WW01-END-DATE SUM12A MOVE 1 TO WX22-NEW-SUB1 SUM12A PERFORM UNTIL SUM12A WW24-CURR-MINUS-ONE-WEEK-DAY7 = SUM12A WT10-DELY-REQ-DATE (WX22-NEW-SUB1) SUM12A ADD 1 TO WX22-NEW-SUB1 SUM12A END-PERFORM SUM12A IF WT10-PROM-IND (WX22-NEW-SUB1) = "Y" SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-FOUND (WX22-CURR-MINUS-ONE-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-DONE (WX22-CURR-MINUS-ONE-SUB) SUM12A ELSE SUM12A MOVE WW24-CURR-MINUS-ONE-WEEK-DAY7 SUM12A TO WW24-START-DATE SPR13A PERFORM JLF30-SELECT-XSA-XSB SUM12A IF WI21-XSA-NIA-FOUND SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-FOUND (WX22-CURR-MINUS-ONE-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-XSA-NIA-DONE (WX22-CURR-MINUS-ONE-SUB) SUM12A END-IF SUM12A END-IF SUM12A IF WT95-XSA-NIA-FOUND (WX95-SUB) NOT = SUM12A WT95-XSA-NIA-FOUND (WX22-CURR-MINUS-ONE-SUB) SUM12A MOVE WW24-CURR-YRWK TO SUM12A WW24-WRAP-YEAR-WEEK SUM12A SET WI23-WRAP-WEEK-FOUND TO TRUE SUM12A ELSE SUM12A MOVE WW24-CURR-MINUS-ONE-YRWK TO SUM12A WW24-CURR-YRWK SUM12A MOVE WX22-DATE-SUB1 TO SUM12A WX22-DATE-SUB SUM12A END-IF SUM12A END-IF SUM12A SUBTRACT 1 FROM WX95-SUB SUM12A END-PERFORM SUM12A IF WI23-WRAP-WEEK-FOUND SUM12A AND WW24-WRAP-YEAR-WEEK = WT95-RTL-YEAR-WK(2) SUM12A AND JLF40-SALES-DAY(1) NOT = 1 SUM12A MOVE WT95-RTL-YEAR-WK (WX95-MAX) TO SUM12A WW24-WRAP-YEAR-WEEK SUM12A END-IF SUM12A IF WI23-WRAP-WEEK-NOT-FOUND SUM12A MOVE WT95-RTL-YEAR-WK (WX95-MAX) TO SUM12A WW24-WRAP-YEAR-WEEK DIS12A END-IF SUM12A . SUM12A BA-540-GET-WRAP-EXIT. SUM12A EXIT. SUM12A BAA-PTG-PTP-WRAP-WEEK SECTION. SUM12A*---------------------------------------------------------------* SUM12A* SECTION NAME :BAA-PTG-PTP-WRAP-WEEK * SUM12A* CALLED BY :BA-540-GET-WRAP-WEEK * SUM12A* FUNCTION :TO QUERY PTG AND PTP TABLE TO GET THE * SUM12A* :REQUIRED DETAILS FOR BA-540-GET-WRAP-WEEK * SUM12A* :SECTION. * SUM12A*---------------------------------------------------------------* SUM12A BAA-100. SUM12A SUM12A* WHEN PTG/PTP IS NOT QUERIED ONCE ALSO SUM12A IF WT95-PTG-PTP-DONE (WX95-SUB) = SPACES SUM12A SET PTG-NOT-FOUND TO TRUE SUM12A MOVE WW24-CURR-YRWK TO WH02-PTP-YRWK SUM12A PERFORM B-713-BA-FIND-DAILY-PTG SUM12A IF PTG-NOT-FOUND SUM12A IF PTP-TESCO-YRWK < WH02-PTP-YRWK SUM12A AND WH02-PTP-YRWK <= PTP-TESCO-YRWK-END SUM12A CONTINUE SUM12A ELSE SUM12A PERFORM B-711-BA-FIND-DAILY-PTP SUM12A END-IF SUM12A IF PTP-PTP-TYPE NOT = "S" SUM12A MOVE WW24-CURR-YRWK TO SUM12A WW24-WRAP-YEAR-WEEK SUM12A SET WI23-WRAP-WEEK-FOUND TO TRUE SUM12A ELSE SUM12A MOVE "Y" TO SUM12A WT95-PTP-S-ENTRY(WX95-SUB) SUM12A END-IF SUM12A ELSE SUM12A MOVE "Y" TO SUM12A WT95-PTG-ENTRY(WX95-SUB) SUM12A END-IF SUM12A MOVE "Y" TO SUM12A WT95-PTG-PTP-DONE(WX95-SUB) SUM12A ELSE SUM12A* WHEN PTG/PTG IS QUERIED IN PREVIOUS SECTIONS BUT NO ENTRY IS SUM12A* FOUND THEN CURRENT WEEK WILL BE WRAP WEEK. SUM12A IF WT95-PTG-ENTRY (WX95-SUB) = SPACES SUM12A AND WT95-PTP-S-ENTRY (WX95-SUB) = SPACES SUM12A MOVE WW24-CURR-YRWK TO SUM12A WW24-WRAP-YEAR-WEEK SUM12A SET WI23-WRAP-WEEK-FOUND TO TRUE SUM12A END-IF SUM12A END-IF SUM12A . SUM12A SUM12A BAA-EXIT. SUM12A EXIT. SUM12A BAB-CURR-WEEK-DAY7 SECTION. SUM12A*---------------------------------------------------------------* SUM12A* SECTION NAME :BAB-CURR-WEEK-DAY7 * SUM12A* CALLED BY :BA-540-GET-WRAP-WEEK * SUM12A* FUNCTION :TO GET THE ISO FORMAT OF CURRENT WEEK DAY7 * SUM12A*---------------------------------------------------------------* SUM12A BAB-100. SUM12A SUM12A MOVE ZEROES TO ZZD-ERROR-CODE SUM12A MOVE "A" TO ZZD-FUNCTION-CODE SUM12A MOVE "WF" TO ZZD-DATE1-FORMAT SUM12A MOVE WW24-CURR-CCYYWWD TO ZZD-DATE1 SUM12A MOVE "ISO" TO ZZD-DATE2-FORMAT SUM12A MOVE +1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM12A IF ZZD-ERROR-CODE NOT = 00 SUM12A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SUM12A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM12A PERFORM JLMSG-DISPLAY-MESSAGE SUM12A END-IF. SUM12A SUM12A BAB-EXIT. SUM12A EXIT. SUM12A BAC-CURR-MINUS-ONE-WEEK-DAY7 SECTION. SUM12A*---------------------------------------------------------------* SUM12A* SECTION NAME :BAC-CURR-MINUS-ONE-WEEK-DAY7 * SUM12A* CALLED BY :BA-540-GET-WRAP-WEEK * SUM12A* FUNCTION :TO GET THE ISO FORMAT OF CURRENT MINUS ONE * SUM12A* :WEEK DAY7. * SUM12A*---------------------------------------------------------------* SUM12A BAC-100. SUM12A SUM12A MOVE ZEROES TO ZZD-ERROR-CODE SUM12A MOVE "A" TO ZZD-FUNCTION-CODE SUM12A MOVE "ISO" TO ZZD-DATE1-FORMAT SUM12A MOVE WW24-CURR-WEEK-DAY7 TO ZZD-DATE1 SUM12A MOVE "ISO" TO ZZD-DATE2-FORMAT SUM12A MOVE -7 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM12A IF ZZD-ERROR-CODE NOT = 00 SUM12A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SUM12A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM12A PERFORM JLMSG-DISPLAY-MESSAGE SUM12A END-IF. SUM12A SUM12A BAC-EXIT. SPR08B EXIT. SPR08B SPR08B VGD-OPEN-PTP-CURSOR SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME :VGD-OPEN-PTP-CURSOR * SPR08B* CALLED BY :B-711-BA-FIND-DAILY-PTP * SPR08B* CALLS : * SPR08B* FUNCTION :OPEN A CURSOR ON THE PTP TABLE * SPR08B*---------------------------------------------------------------* SPR08B VGD-100. SPR08BD DISPLAY "VGD-100". SPR08B SPR08B SET WI10-PTP-CURSOR-OPEN TO TRUE SPR08B SPR08B EXEC SQL SPR08B OPEN PTP_CURSOR SPR08B END-EXEC SPR08B SPR08B IF SQLCODE NOT = ZERO SPR08B MOVE "VGD-OPEN-PTP-CURSOR" TO JLDB2E-PROCESS-NAME SPR08B PERFORM JLDB2E-DB2-ERROR SPR08B SET JLMSG-C99-DB2-ERROR TO TRUE SPR08B PERFORM JLMSG-DISPLAY-MESSAGE SPR08B SPR08B END-IF. SPR08B SPR08B VGD-EXIT. SPR08B EXIT. SPR08B SPR10A VGG-OPEN-PTG-CURSOR SECTION. SPR10A*---------------------------------------------------------------* SPR10A* SECTION NAME :VGG-OPEN-PTG-CURSOR * SPR10A* CALLED BY :B-713-BA-FIND-DAILY-PTG * SPR10A* CALLS : * SPR10A* FUNCTION :OPEN A CURSOR ON THE PTG TABLE * SPR10A*---------------------------------------------------------------* SPR10A VGG-100. SPR10A* DISPLAY "VGG-100". SPR10A SPR10A SET WI16-PTG-CURSOR-OPEN TO TRUE SPR10A SPR10A EXEC SQL SPR10A OPEN PTG_CURSOR SPR10A END-EXEC SPR10A SPR10A IF SQLCODE NOT = ZERO SPR10A MOVE "VGG-OPEN-PTG-CURSOR" TO JLDB2E-PROCESS-NAME SPR10A PERFORM JLDB2E-DB2-ERROR SPR10A SET JLMSG-C99-DB2-ERROR TO TRUE SPR10A PERFORM JLMSG-DISPLAY-MESSAGE SPR10A SPR10A END-IF. SPR10A SPR10A VGG-EXIT. SPR10A EXIT. SPR10A SPR08B VGE-FETCH-PTP-CURSOR SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME :VGE-FETCH-PTP-CURSOR * SPR08B* CALLED BY :B-711-BA-FIND-DAILY-PTP * SPR08B* CALLS : * SPR08B* FUNCTION :FETCH A ROW FROM THE PTP CURSOR * SPR08B*---------------------------------------------------------------* SPR08B VGE-100. SPR08BD DISPLAY "VGE-100" SPR08B EXEC SQL SPR08B FETCH PTP_CURSOR SPR08B INTO :PTP-TESCO-YRWK, SUM12A :PTP-TESCO-YRWK-END, SPR08B :PTP-PTP-DAY-1, SPR08B :PTP-PTP-DAY-2, SPR08B :PTP-PTP-DAY-3, SPR08B :PTP-PTP-DAY-4, SPR08B :PTP-PTP-DAY-5, SPR08B :PTP-PTP-DAY-6, SPR08B :PTP-PTP-DAY-7, SUM12A :PTP-PTP-TYPE SPR08B END-EXEC SPR08B IF SQLCODE = ZERO SPR08B ADD +1 TO WA01-PTP-FETCHED SPR08B ELSE SPR08B IF SQLCODE = 100 SPR08B MOVE WM43-PTP-NOT-FOUND TO JLMSG-TEXT SPR08B PERFORM JLMSG-DISPLAY-MESSAGE SPR08B ELSE SPR08B MOVE " VGE-FETCH-PTP-CURSOR" TO JLDB2E-PROCESS-NAME SPR08B PERFORM JLDB2E-DB2-ERROR SPR08B SET JLMSG-C99-DB2-ERROR TO TRUE SPR08B PERFORM JLMSG-DISPLAY-MESSAGE SPR08B END-IF SPR08B END-IF. SPR08B SPR08B VGD-EXIT. SPR08B EXIT. SPR08B SPR10A VGH-FETCH-PTG-CURSOR SECTION. SPR10A*---------------------------------------------------------------* SPR10A* SECTION NAME :VGH-FETCH-PTG-CURSOR * SPR10A* CALLED BY :B-713-BA-FIND-DAILY-PTG * SPR10A* CALLS : * SPR10A* FUNCTION :FETCH A ROW FROM THE PTG CURSOR * SPR10A*---------------------------------------------------------------* SPR10A VGH-100. SPR10A* DISPLAY "VGH-100" SPR10A EXEC SQL SPR10A FETCH PTG_CURSOR SPR10A INTO :PTG-TESCO-YEAR, SPR10A :PTG-TESCO-WEEK, SPR10A :PTG-PTP-DAY-1, SPR10A :PTG-PTP-DAY-2, SPR10A :PTG-PTP-DAY-3, SPR10A :PTG-PTP-DAY-4, SPR10A :PTG-PTP-DAY-5, SPR10A :PTG-PTP-DAY-6, SPR10A :PTG-PTP-DAY-7 SPR10A END-EXEC SPR10A SPR10A IF SQLCODE = ZERO SPR10A SET PTG-FOUND TO TRUE SPR10A ADD +1 TO WA01-PTG-FETCHED SPR10A ELSE SPR10A IF SQLCODE = 100 SPR10A CONTINUE SPR10A* MOVE WM46-PTG-NOT-FOUND TO JLMSG-TEXT SPR10A* PERFORM JLMSG-DISPLAY-MESSAGE SPR10A ELSE SPR10A MOVE " VGH-FETCH-PTG-CURSOR" TO JLDB2E-PROCESS-NAME SPR10A PERFORM JLDB2E-DB2-ERROR SPR10A SET JLMSG-C99-DB2-ERROR TO TRUE SPR10A PERFORM JLMSG-DISPLAY-MESSAGE SPR10A END-IF SPR10A END-IF. SPR10A SPR10A VGH-EXIT. SPR10A EXIT. SPR10A SPR08B VGF-CLOSE-PTP-CURSOR SECTION. SPR08B*---------------------------------------------------------------* SPR08B* SECTION NAME :VGF-CLOSE-PTP-CURSOR SECTION * SPR08B* CALLED BY :B-711-BA-FIND-DAILY-PTP * SPR08B* CALLS : * SPR08B* FUNCTION :CLOSE THE PTP CURSOR. * SPR08B*---------------------------------------------------------------* SPR08B VGF-100. SPR08BD DISPLAY "VGF-100" SPR08B SET WI10-PTP-CURSOR-CLOSED TO TRUE SPR08B SPR08B EXEC SQL SPR08B CLOSE PTP_CURSOR SPR08B END-EXEC SPR08B SPR08B IF SQLCODE NOT = ZERO SPR08B MOVE " VGF-CLOSE-PTP-CURSOR" TO JLDB2E-PROCESS-NAME SPR08B PERFORM JLDB2E-DB2-ERROR SPR08B SET JLMSG-C99-DB2-ERROR TO TRUE SPR08B PERFORM JLMSG-DISPLAY-MESSAGE SPR08B END-IF. SPR08B VGF-EXIT. SPR08B EXIT. SPR10A VGI-CLOSE-PTG-CURSOR SECTION. SPR10A*---------------------------------------------------------------* SPR10A* SECTION NAME :VGI-CLOSE-PTG-CURSOR * SPR10A* CALLED BY :B-713-BA-FIND-DAILY-PTG * SPR10A* CALLS : * SPR10A* FUNCTION :CLOSE THE PTG CURSOR. * SPR10A*---------------------------------------------------------------* SPR10A VGI-100. SPR10A* DISPLAY "VGI-100" SPR10A SET WI16-PTG-CURSOR-CLOSED TO TRUE SPR10A SPR10A EXEC SQL SPR10A CLOSE PTG_CURSOR SPR10A END-EXEC SPR10A SPR10A IF SQLCODE NOT = ZERO SPR10A MOVE " VGI-CLOSE-PTG-CURSOR" TO JLDB2E-PROCESS-NAME SPR10A PERFORM JLDB2E-DB2-ERROR SPR10A SET JLMSG-C99-DB2-ERROR TO TRUE SPR10A PERFORM JLMSG-DISPLAY-MESSAGE SPR10A END-IF. SPR10A SPR10A VGI-EXIT. SPR08B EXIT. B-A00-CREATE-OUTPUT SECTION. *---------------------------------------------------------------* * SECTION NAME : B-A00-CREATE-OUTPUT CLONE OF * * : B-800-CREATE-OUTPUT FOR JL0F46 * * CALLED BY : * * CALLS : * * FUNCTION : 1. CREATES JLF30O01/02/03/04 FILES * *---------------------------------------------------------------* B-A00. * DISPLAY "B-A00". SET PROCESS-LOOP TO TRUE. MOVE 1 TO WX10-DATA-SUB1. MOVE WF01-CONTDATA TO WW01-DIFF-IN-DAYS. PERFORM UNTIL END-PROCESS-LOOP IF WX10-DATA-SUB1 > 30 SET END-PROCESS-LOOP TO TRUE END-IF IF WF01-ORDER-GROUP(WX10-DATA-SUB1) = WT10-ORDER-GROUP MOVE WF01-LEADTIME(WX10-DATA-SUB1) TO WW01-DIFF-IN-DAYS IF WW01-DIFF-IN-DAYS < +6 MOVE +6 TO WW01-DIFF-IN-DAYS END-IF IF WW01-DIFF-IN-DAYS > +21 MOVE +21 TO WW01-DIFF-IN-DAYS END-IF SET END-PROCESS-LOOP TO TRUE END-IF ADD +1 TO WX10-DATA-SUB1 END-PERFORM MOVE ZEROES TO ZZD-ERROR-CODE MOVE "A" TO ZZD-FUNCTION-CODE MOVE "ISO" TO ZZD-DATE1-FORMAT MOVE WW01-START-DATE TO ZZD-DATE1 MOVE "ISO" TO ZZD-DATE2-FORMAT MOVE +4 TO ZZD-DIFF-IN-DAYS MOVE WW01-DIFF-IN-DAYS TO ZZD-DIFF-IN-DAYS. SPR14B PERFORM ZA-CALL-JL0F32 10860000 IF ZZD-ERROR-CODE NOT = 00 THEN MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT PERFORM JLMSG-DISPLAY-MESSAGE ELSE MOVE ZZD-DATE2 TO WW01-END-EXTRACT-DATE END-IF SET PROCESS-LOOP TO TRUE. MOVE 1 TO WX10-DATA-SUB1. MOVE 1 TO WX10-DATA-SUB2. PERFORM UNTIL END-PROCESS-LOOP IF WX10-DATA-SUB1 = 1 THEN MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO WW01-ORD-CALC-DATE MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO WW01-ORD-CALC-TIME END-IF IF JLF46-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" THEN PERFORM UNTIL JLF46-PER-STR-DATE(WX10-DATA-SUB1) = JLF46-SALES-DATE(WX10-DATA-SUB2) OR WX10-DATA-SUB2 > 50 ADD 1 TO WX10-DATA-SUB2 END-PERFORM PERFORM B-A10-CREATE-ORDERS IF JLF46-DELY-IND(WX10-DATA-SUB1) = *----- 21/01/2003 - GM ---------------------------------------* * "Y" OR "B" OR "P" OR "E" "Y" OR "B" OR "P" OR "E" OR "S" *-------------------------------------------------------------* OR (JLF46-DELY-IND(WX10-DATA-SUB1) = "N" AND JLF46-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) THEN PERFORM B-A05-UPDATE-COUNTS IF JLF46-PER-STR-DATE(WX10-DATA-SUB1) < WW01-END-EXTRACT-DATE THEN MOVE 0 TO JLFOD-ORD-REC-TYPE PERFORM B-A20-CREATE-ORD-DIAG PERFORM B-A30-CREATE-PP-DIAG *----- 27/03/2001 - GM ---------------------------------------* *-- COMMENT --- THE ALLOC TYPES FOR MM ARE NOT INCLUDED *-- HERE INTENTIONALLY - THEY SHOULD NOT BE WRITTEN TO THE *-- JLFOALLO FILE IF JLF46-ALLOC-TYPE(WX10-DATA-SUB1) = ("F" OR "V" OR "H") PERFORM B-A40-CREATE-ALLOCS END-IF END-IF END-IF END-IF ADD 1 TO WX10-DATA-SUB1 IF WX10-DATA-SUB1 > 75 OR JLF46-PER-STR-DATE(WX10-DATA-SUB1) = SPACES THEN SET END-PROCESS-LOOP TO TRUE END-IF END-PERFORM. B-A00-EXIT. EXIT. B-A05-UPDATE-COUNTS SECTION. *---------------------------------------------------------------* * SECTION NAME : B-A05-UPDATE-COUNTS * * CALLED BY : * * CALLS : * * FUNCTION : 1. UPDATE COUNTS FOR DISPLAY AT END OF RUN * *---------------------------------------------------------------* B-A05. * DISPLAY "B-A05". EVALUATE JLF46-CALC-METHOD(WX10-DATA-SUB1) WHEN "1" *-------- DEMAND LINE FILL-UP ----------------------------------* COMPUTE WA01-NO-OF-CALC-METH-1 = WA01-NO-OF-CALC-METH-1 + 1 WHEN "2" *-------- DEMAND LINE TOP-UP ----------------------------------* COMPUTE WA01-NO-OF-CALC-METH-2 = WA01-NO-OF-CALC-METH-2 + 1 WHEN "3" *-------- NON DEMAND LINE LONG LIFE FILL-UP --------------------* COMPUTE WA01-NO-OF-CALC-METH-3 = WA01-NO-OF-CALC-METH-3 + 1 WHEN "4" *-------- NON DEMAND LINE SHORT LIFE FILL-UP -------------------* COMPUTE WA01-NO-OF-CALC-METH-4 = WA01-NO-OF-CALC-METH-4 + 1 WHEN "5" *-------- NON DEMAND LINE TOP-UP -------------------------------* COMPUTE WA01-NO-OF-CALC-METH-5 = WA01-NO-OF-CALC-METH-5 + 1 WHEN "6" *-------- STOCK FILL LINE FILL-CALC ---------------------------* COMPUTE WA01-NO-OF-CALC-METH-6 = WA01-NO-OF-CALC-METH-6 + 1 WHEN "7" *-------- STOCK FILL LINE NON FILL CALC -----------------------* COMPUTE WA01-NO-OF-CALC-METH-7 = WA01-NO-OF-CALC-METH-7 + 1 WHEN "8" *-------- FIXED ERRATIC LINE -----------------------------------* COMPUTE WA01-NO-OF-CALC-METH-8 = WA01-NO-OF-CALC-METH-8 + 1 WHEN "9" *-------- CUSTOMER ORDER ONLY ----------------------------------* COMPUTE WA01-NO-OF-CALC-METH-9 = WA01-NO-OF-CALC-METH-9 + 1 *----- 25/10/2000 - GM -----------------------------------------* WHEN "A" *-------- DEMAND LINE FILL-UP FOR MEDIUM LIFE PRODUCTS ---------* COMPUTE WA01-NO-OF-CALC-METH-A = WA01-NO-OF-CALC-METH-A + 1 WHEN "B" *-------- DEMAND LINE TOP-UP FOR MEDIUM LIFE PRODUCTS ----------* COMPUTE WA01-NO-OF-CALC-METH-B = WA01-NO-OF-CALC-METH-B + 1 WHEN "C" *-------- NON DEMAND LINE FILL-UP FOR MEDIUM LIFE PRODUCTS -----* COMPUTE WA01-NO-OF-CALC-METH-C = WA01-NO-OF-CALC-METH-C + 1 *---------------------------------------------------------------* WHEN "D" *-------- DYNAMIC TARGET ORDER UP TO CALCULATION ---------------* COMPUTE WA01-NO-OF-CALC-METH-D = WA01-NO-OF-CALC-METH-D + 1 *---------------------------------------------------------------* WHEN "E" *-------- STATIC TARGET ORDER UP TO CALCULATION ----------------* COMPUTE WA01-NO-OF-CALC-METH-E = WA01-NO-OF-CALC-METH-E + 1 *---------------------------------------------------------------* WHEN "F" *-------- RECOVERY STATUS --------------------------------------* COMPUTE WA01-NO-OF-CALC-METH-F = WA01-NO-OF-CALC-METH-F + 1 *---------------------------------------------------------------* WHEN "I" *-------- STANDING ORDER - IGNORE BOOKSTOCK --------------------* COMPUTE WA01-NO-OF-CALC-METH-I = WA01-NO-OF-CALC-METH-I + 1 *---------------------------------------------------------------* WHEN OTHER *--THIS IS AN ERROR SITUATION WHICH WOULD HAVE BEEN PICKED------* *--UP IN JL0F40 PROCESSING -------------------------------------* GO TO B-A05-EXIT END-EVALUATE. B-A05-EXIT. EXIT. B-A10-CREATE-ORDERS SECTION. *---------------------------------------------------------------* * SECTION NAME : B-A10-CREATE-ORDERS * * CALLED BY : * * CALLS : * * FUNCTION : 1. CREATES THE OUTPUT FILE OF FORECAST ORDERS * *---------------------------------------------------------------* B-A10. * DISPLAY "B-A10". MOVE WW01-CURR-PART-NO TO JLFOR-CR-PART-NO. MOVE WW01-CURR-RO-NO TO JLFOR-RETAIL-OUTLET-NO. MOVE WW01-CURR-BPR-TPN TO JLFOR-BASE-PRODUCT-NO. MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLFOR-DELY-REQ-DATE. MOVE JLF46-ORDER-TYPE(WX10-DATA-SUB1) TO JLFOR-ORDER-TYPE. COMPUTE JLFOR-FCST-ORD-QTY = JLF46-FINAL-CASE-QTY(WX10-DATA-SUB1) * JLF46-UNIT-SIZE. COMPUTE JLFOR-CODE-LIFE = AUT08A JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) - 1. 20280000 MOVE JLF46-ORDER-PRIORITY(WX10-DATA-SUB1) TO JLFOR-ORDER-PRIORITY. MOVE JLF46-OUT-OF-TOLERANCE(WX10-DATA-SUB1) TO JLFOR-OUT-OF-TOLERANCE. MOVE JLF46-SALES-CCYYMMD(WX10-DATA-SUB2) TO JLFOR-DELY-REQ-CCYYWWD. MOVE JLF46-FCST-TRGT-STK(WX10-DATA-SUB2) TO JLFOR-TRGT-STK-QTY. MOVE JLF46-FCST-OPEN-BKSTK(WX10-DATA-SUB2) TO JLFOR-OPENING-STOCK. *** ENSURE CR FORECAST SALES IS NOT PHYSICALLY OVERWRITTEN *** BY ANY DOTCOM EXPECTED SALES BY USING THE SAVED CR VALUE. *** THIS IS REQUIRED TO RETAIN THE AUDIT TRAIL FOR *** COMPARISON PURPOSES. MOVE WT80-DAY-FCST-SALES(WX10-DATA-SUB2) TO JLFOR-RO-DAY-EST-SALES. *----- CHG - 21/10/99 - GM -------------------------------------* *----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* *----- JLF46 SUBSCRIPTED ENTRY ---------------------------------* MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) TO JLFOR-FIRST-ORD-TYPE-OF-DAY. MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) TO JLFOR-LAST-ORDER. SUM12A MOVE WI20-CALC-METH-I-IND SUM12A TO JLFOR-CALC-METH-I-IND. SUM12B MOVE WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO JLFOR-NOTNL-CALC-DATE. SPR13B* DEFAULT VALUE IS MOVED TO JLFOR-SALES-ORDER * SPR13B MOVE WW25-SALES-ORDER SPR13B TO JLFOR-SALES-ORDER. *---------------------------------------------------------------* PERFORM Y-100-WRITE-OUTPUT1. B-A10-EXIT. EXIT. B-A20-CREATE-ORD-DIAG SECTION. *---------------------------------------------------------------* * SECTION NAME : B-A20-CREATE-ORD-DIAG * * CALLED BY : * * CALLS : * * FUNCTION : 1. CREATES THE OUTPUT FILE OF ORDER DIAGNOSTICS *---------------------------------------------------------------* B-A20. * DISPLAY "B-A20". MOVE WW01-CURR-PART-NO TO JLFOD-CR-PART-NO. MOVE WW01-CURR-RO-NO TO JLFOD-RETAIL-OUTLET-NO. AVRS32 MOVE WW01-CURR-BPR-TPN TO JLFOD-BASE-PRODUCT-NO * DISPLAY " ". * DISPLAY "RO-NO = " JLFOD-RETAIL-OUTLET-NO. * DISPLAY "BPR-TPN = " JLFOD-BASE-PRODUCT-NO. * DISPLAY "%CAPACITY-" JLF46-CAPACITY(WX10-DATA-SUB1). MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) AVRS32 TO JLFOD-DELY-REQ-DATE MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO JLFOD-DELY-REQ-TIME. MOVE JLF46-ORDER-TYPE(WX10-DATA-SUB1) AVRS32 TO JLFOD-ORDER-TYPE *----- 21/01/2003 - GM ---------------------------------------* MOVE JLF46-DELY-IND(WX10-DATA-SUB1) TO JLFOD-DELY-IND. *-------------------------------------------------------------* MOVE WT10-DGRP-CODE TO JLFOD-DGRP-CODE MOVE WT10-ORDER-GROUP TO JLFOD-ORDER-GROUP MOVE WT10-SUB-PG-CODE TO JLFOD-SUB-PG-CODE MOVE JLF46-STK-FILL-IND (WX10-DATA-SUB1) TO JLFOD-STK-FILL-IND MOVE JLF46-STK-FILL-WK-IND (WX10-DATA-SUB1) TO JLFOD-STK-FILL-WK-IND MOVE JLF46-UNIT-SIZE TO JLFOD-UNIT-SIZE MOVE JLF46-ALT-MERCH-UNIT-RND(WX10-DATA-SUB1) TO JLFOD-ALT-MERCH-UNIT-RND MOVE JLF46-ALT-MERCH-UNITS(WX10-DATA-SUB1) TO JLFOD-ALT-MERCH-UNITS MOVE JLF46-PALLET-RND(WX10-DATA-SUB1) TO JLFOD-PALLET-RND MOVE JLF46-CAPACITY(WX10-DATA-SUB1) TO JLFOD-SHELF-FILL-CAP MOVE WW01-ORD-CALC-DATE TO JLFOD-ORD-CALC-DT. MOVE WW01-ORD-CALC-TIME TO JLFOD-ORD-CALC-TM. SUM11A MOVE WT10-DISPLAY-MDL-QTY TO JLFOD-DISPLAY-MDL-QTY SUM12B MOVE JLF46-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO SUM12B JLFOD-NOTNL-CALC-DATE JFM08B IF JLF40-NEW-GAP-CNTL-EXISTS WIN09A MOVE WW-GAP-STK-CORR TO JLFOD-GAP-STK-CORR SUM11A ADD WT10-DISPLAY-MDL-QTY TO WW-GAP-EXPCTD-BOOKSTK JFM08A MOVE WW-GAP-EXPCTD-BOOKSTK TO JLFOD-BKSTK-EFF-CALC JFM08A ELSE JFM08A MOVE -9999 TO JLFOD-GAP-STK-CORR SUM11A COMPUTE WW18-DIS-EXPCTD-BOOKSTK = SUM11A WT10-ST-PERD-STK-POS + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-EXPCTD-BOOKSTK TO JLFOD-BKSTK-EFF-CALC JFM08A END-IF MOVE JLF46-STK-PROD-END-DT TO JLFOD-STKD-PROD-ENDT. MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLFOD-DMND-ST-DT. MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO JLFOD-DMND-ST-TM. MOVE JLF46-DMND-END-DT(WX10-DATA-SUB1) TO JLFOD-DMND-END-DT. MOVE JLF46-DMND-END-TIME(WX10-DATA-SUB1) TO JLFOD-DMND-END-TM. MOVE JLF46-STD-SHELF-CAP TO JLFOD-STD-SHELF-CAP. *----- 12/01/2002 - GM ---------------------------------------* * MOVE JLF46-COR-PC TO JLFOD-COR-PC. MOVE WW01-COR-PC TO JLFOD-COR-PC. *-------------------------------------------------------------* 143S01 COMPUTE JLFOD-SPECIAL-ORDER-QTY = 20220000 143S01 JLF46-CUST-ORD-QTY(WX10-DATA-SUB1)+ 20230000 143S01 JLF46-SMFO-ORD-QTY(WX10-DATA-SUB1) 20240000 143S01 IF JLF46-SMFO-ORD-RND(WX10-DATA-SUB1)>SPACES 143S01 MOVE JLF46-SMFO-ORD-RND(WX10-DATA-SUB1) 143S01 TO JLFOD-CUST-ORD-RND 143S01 ELSE 143S01 MOVE JLF46-CUST-ORD-RND(WX10-DATA-SUB1) 143S01 TO JLFOD-CUST-ORD-RND 143S01 END-IF. MOVE JLF46-GAP-ORDER-SNGLS-QTY(WX10-DATA-SUB1) TO JLFOD-GAP-ORD-QTY *----- 27/03/2001 - GM ---------------------------------------* * MOVE JLF46-ALLOC-TYPE TO JLFOD-ALLOC-IND. MOVE JLF46-ALLOC-TYPE(WX10-DATA-SUB1) TO JLFOD-ALLOC-IND. *-------------------------------------------------------------* * MOVE JLF46-REM-ALLOC-QTY TO JLFOD-REM-ALLOC-QTY. MOVE JLF46-RSVE-QTY (WX10-DATA-SUB1) TO JLFOD-REM-ALLOC-QTY. MOVE JLF46-S-L-LIFE-IND TO JLFOD-S-L-LIFE-IND. MOVE "N" TO JLFOD-WEEKEND-IND. *----- 03/10/2002 - SB ---------------------------------------* IF FIRST-ORD-DIAG SUM11A COMPUTE WW18-DIS-ACTUAL-BOOKSTK = SUM11A WT10-BOOKSTOCK-USED + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-ACTUAL-BOOKSTK TO JLFOD-BOOKSTOCK-USED MOVE WT10-BOOK-STOCK-DT TO JLFOD-BOOK-STOCK-DT MOVE WT10-BOOK-STOCK-TM TO JLFOD-BOOK-STOCK-TM SET NOT-FIRST-ORD-DIAG TO TRUE ELSE SUM11A COMPUTE WW18-DIS-A-BKSTK = SUM11A JLF46-ACTUAL-STK-POS(WX10-DATA-SUB1) SUM11A + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-A-BKSTK TO JLFOD-BOOKSTOCK-USED MOVE JLF46-NOTNL-CALC-DATE(WX10-DATA-SUB1) TO JLFOD-BOOK-STOCK-DT MOVE JLF46-NOTNL-CALC-TIME(WX10-DATA-SUB1) TO JLFOD-BOOK-STOCK-TM END-IF. *-------------------------------------------------------------* MOVE WT10-EST-SALES-USED TO JLFOD-EST-SALES-USED. MOVE JLF46-EXP-SALES-IN-CALC(WX10-DATA-SUB1) TO JLFOD-EXP-SALES-PRE-DP. MOVE JLF46-ANTIC-WASTE-IN-CALC(WX10-DATA-SUB1) TO JLFOD-ANT-WASTE-PRE-DP. MOVE JLF46-OS-ORD-IN-CALC(WX10-DATA-SUB1) TO JLFOD-EXP-DEL-PRE-DP. MOVE JLF46-ST-PERD-STK-POS(WX10-DATA-SUB1) TO JLFOD-ST-PERD-STK-POS. MOVE JLF46-EXP-SALES-IN-DMND(WX10-DATA-SUB1) TO JLFOD-EXP-SALES-DP. MOVE JLF46-ANTIC-WASTE-IN-DMND(WX10-DATA-SUB1) TO JLFOD-ANT-WASTE-DP. MOVE JLF46-COVER-EXP-SALES(WX10-DATA-SUB1) TO JLFOD-COVER-EXP-SALES. MOVE JLF46-EXP-SALES-IN-CDLF7(WX10-DATA-SUB1) TO JLFOD-EXP-SALES-IN-CDLF. MOVE JLF46-SAFE-STK-QTY(WX10-DATA-SUB1) TO JLFOD-SAFE-STK-QTY. MOVE JLF46-CODE-SAFE-STK-QTY(WX10-DATA-SUB1) TO JLFOD-CODE-SAFE-STK-QTY. MOVE JLF46-PURE-CUBE-SAFE-STK-QTY(WX10-DATA-SUB1) TO JLFOD-CUBE-SAFE-STK-QTY. MOVE JLF46-CALC-METHOD(WX10-DATA-SUB1) TO JLFOD-CALC-METHOD. MOVE JLF46-RAW-DEMAND(WX10-DATA-SUB1) TO JLFOD-RAW-DEMAND. COMPUTE JLFOD-RND-DEMAND ROUNDED = JLF46-FINAL-CASE-QTY(WX10-DATA-SUB1) * JLF46-UNIT-SIZE. AVRS32* IF PRODUCT IS RECALCULATING THEN REFINED VALUE SHOULD BE AVRS32* MOVED TO PREV-ORD FILED AVRS32 IF JL01X-RUN-ID =( "9" OR "1") AVRS32 MOVE JLFOD-RND-DEMAND TO JLFOD-PREV-ORD-QTY AVRS32 ELSE AVRS34 IF WT10-ORD-REC-TYPE(WX10-DATA-SUB1) = 2 AVRS32 AND JLF46-PROD-CALC-IND(WX10-DATA-SUB1) = "N" AVRS32 MOVE JLF46-PREV-ORD-QTY(WX10-DATA-SUB1) AVRS32 TO JLFOD-PREV-ORD-QTY AVRS32 ELSE AVRS32 MOVE JLFOD-RND-DEMAND TO JLFOD-PREV-ORD-QTY AVRS32 END-IF AVRS32 END-IF * ROUNDING DATA JFM07A MOVE JLF46-BASE-ROUNDING(WX10-DATA-SUB1) TO JLFOD-BASE-ROUNDING JFM07A MOVE JLF46-FULL-FILL-CAP-ROUNDING(WX10-DATA-SUB1) TO JLFOD-FULL-FILL-CAP-RND MOVE JLF46-EXP-DEMAND-RND(WX10-DATA-SUB1) TO JLFOD-EXP-DEMAND-RND MOVE JLF46-ALT-MERCH-RND(WX10-DATA-SUB1) TO JLFOD-MERCH-UNIT-RND JFM07A MOVE JLF46-WASTE-ROUNDING(WX10-DATA-SUB1) TO JLFOD-WASTE-RND MOVE JLF46-PROM-RUN-DOWN-RND(WX10-DATA-SUB1) TO JLFOD-PROM-RUN-DOWN-RND MOVE JLF46-DISC-RUN-DOWN-RND(WX10-DATA-SUB1) TO JLFOD-DISC-RUN-DOWN-RND MOVE JLF46-ALLOC-RND(WX10-DATA-SUB1) TO JLFOD-ALLOC-RND MOVE JLF46-GAP-ORD-RND(WX10-DATA-SUB1) TO JLFOD-GAP-ORD-RND MOVE JLF46-SALES-TO-MIDNITE TO JLFOD-SALES-TO-MIDNITE. MOVE JLF46-PERD-FCST-SALES(WX10-DATA-SUB1) TO JLFOD-FCAST-SALES-CAL. MOVE 0 TO JLFOD-EXP-WKLY-SALES PERFORM VARYING WX10-NEW-SUB FROM 1 BY 1 UNTIL WX10-NEW-SUB > 7 ADD JLF46-DAY-FCST-SALES(WX10-NEW-SUB) TO JLFOD-EXP-WKLY-SALES END-PERFORM *END OF : VERSION 3.5 CHANGES MOVE JLF46-PERD-HOURLY-PTP(WX10-DATA-SUB1) TO JLFOD-PERD-HOURLY-PTP. MOVE JLF46-PROM-IND(WX10-DATA-SUB1) TO JLFOD-PROM-IND. MOVE JLF46-PROM-END-DATE(WX10-DATA-SUB1) TO JLFOD-OFFER-END-DATE. MOVE JLF46-PROM-SHELF-CAP(WX10-DATA-SUB1) TO JLFOD-OFFER-SHELF-CAP. SPR08C MOVE JLF46-EFF-MIN-PROM-CAP(WX10-DATA-SUB1) SPR08C TO JLFOD-EFF-MIN-PROM-CAP. SPR08C MOVE JLF46-MIN-PROM-REQ-IND(WX10-DATA-SUB1) SPR08C TO JLFOD-EFF-MIN-PROM-IND. * CONTROL DATA MOVE JLF46-ACC-WSTGE-PC(WX10-DATA-SUB1) TO JLFOD-ACC-WSTGE-PERC MOVE JLF46-CNTL-CODE-LIFE(WX10-DATA-SUB1) TO JLFOD-CNTL-CODE-LIFE MOVE JLF46-COVER-DAYS(WX10-DATA-SUB1) TO JLFOD-COVER-DAYS MOVE JLF46-PROM-STK-RUN-DOWN-PC(WX10-DATA-SUB1) TO JLFOD-PROM-STK-RUN-DOWN-PC MOVE JLF46-FILL-SAFETY-PC(WX10-DATA-SUB1) TO JLFOD-FILL-SAFETY-PC MOVE JLF46-SHELF-FILL-CAP-PC(WX10-DATA-SUB1) TO JLFOD-SHELF-FILL-CAP-PC MOVE JLF46-SALE-SAFE-PC(WX10-DATA-SUB1) TO JLFOD-SALE-SAFE-PC MOVE JLF46-CODE-SAFE-PC(WX10-DATA-SUB1) TO JLFOD-CODE-SAFE-PC MOVE JLF46-CUBE-SAFE-PC(WX10-DATA-SUB1) TO JLFOD-CUBE-SAFE-PC MOVE JLF46-GAP-ORDER-SHELF-CAP(WX10-DATA-SUB1) TO JLFOD-GAP-ORD-PC MOVE JLF46-ALLOC-SNGLS(WX10-DATA-SUB1) TO JLFOD-ALLOC-SNGLS. MOVE JLF46-DEV-LINE-IND(WX10-DATA-SUB1) TO JLFOD-DEVELOPMENT-LINE. MOVE JLF46-DEV-LINE-IND(WX10-DATA-SUB1) TO WI01-DEV-LINE-TYPE. IF DEVELOPMENT-LINE-PRODUCT THEN IF STANDARD-DEVELOPMENT-LINE THEN MOVE JLF46-SML-DEV-SAFE-PC TO JLFOD-DEV-LINE-SFTY-PC ELSE IF MEDIUM-DEVELOPMENT-LINE THEN MOVE JLF46-MED-DEV-SAFE-PC TO JLFOD-DEV-LINE-SFTY-PC ELSE IF LARGE-DEVELOPMENT-LINE THEN MOVE JLF46-LRG-DEV-SAFE-PC TO JLFOD-DEV-LINE-SFTY-PC ELSE MOVE ZEROES TO JLFOD-DEV-LINE-SFTY-PC END-IF END-IF END-IF ELSE MOVE ZEROES TO JLFOD-DEV-LINE-SFTY-PC END-IF. *----- CHG - 21/10/99 - GM -------------------------------------* *----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* *----- JLF46 SUBSCRIPTED ENTRY IS THE SAME AS THE --------------* MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) TO JLFOD-FIRST-ORD-TYPE-OF-DAY. MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) TO JLFOD-LAST-ORDER. MOVE JLF46-OLD-DAY-FCST-SALES(WX10-DATA-SUB2) TO JLFOD-ALT-EDS-QTY. MOVE JLF46-DAY-FCST-SALES(WX10-DATA-SUB2) TO JLFOD-SFTY-STK-EDS-QTY. MOVE JLF46-SALES-DEVI-TOL-IND(WX10-DATA-SUB1) TO JLFOD-SALES-DVTN-OOT-IND. MOVE JLF46-POS-SALES-DEVI-TOL-PC(WX10-DATA-SUB1) TO JLFOD-POS-SALES-DTP. MOVE JLF46-NEG-SALES-DEVI-TOL-PC (WX10-DATA-SUB1)TO JLFOD-NEG-SALES-DTP. MOVE JLF46-SALE-SAFE-STK-QTY(WX10-DATA-SUB1) TO JLFOD-SALE-SAFE-STK-QTY. * IF JLF46-PROM-IND(WX10-DATA-SUB1) = "Y" THEN MOVE JLF46-PROM-SAFE-PC TO JLFOD-OFFER-SFTY-STK-PC ELSE MOVE ZEROES TO JLFOD-OFFER-SFTY-STK-PC END-IF. MOVE JLF46-PRM-SAFETY-STK-QTY(WX10-DATA-SUB1) TO JLFOD-OFFER-SFTY-STK-QTY. MOVE JLF46-DEV-SAFETY-STK-QTY(WX10-DATA-SUB1) TO JLFOD-DEV-LINE-SFTY-QTY. MOVE WT10-STEP-IMPACT-TYPE(WX10-DATA-SUB1) TO JLFOD-STEP-IMPACT-TYPE. *----- 27/03/2001 - GM ---------------------------------------* MOVE JLF46-TOP-DMND-FILL-PC(WX10-DATA-SUB1) TO JLFOD-T-DMND-FCTR. MOVE JLF46-CAPACITY-DAYS(WX10-DATA-SUB1) TO JLFOD-CAPACITY-CAP. *-------------------------------------------------------------* MOVE JLF46-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) TO JLFOD-ADJ-SAFE-STK-QTY. MOVE JLF46-CASE-SAFETY-PC(WX10-DATA-SUB1) TO JLFOD-CASE-SAFETY-PC. PERFORM Y-200-WRITE-OUTPUT2. B-A20-EXIT. EXIT. B-A30-CREATE-PP-DIAG SECTION. *---------------------------------------------------------------* * SECTION NAME : B-A30-CREATE-PP-DIAG * * CALLED BY : * * CALLS : * * FUNCTION : 1. CREATES THE OUTPUT FILE OF PRODUCT PROFILE * * : SPECIFIC DIAGNOSTICS * *---------------------------------------------------------------* B-A30. * DISPLAY "B-A30". MOVE WW01-CURR-PART-NO TO JLPRF-CR-PART-NO. MOVE WW01-CURR-RO-NO TO JLPRF-RETAIL-OUTLET-NO. MOVE WW01-CURR-BPR-TPN TO JLPRF-BASE-PRODUCT-NO. MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLPRF-DELY-REQ-DATE. MOVE JLF46-ORDER-TYPE(WX10-DATA-SUB1) TO JLPRF-ORDER-TYPE. MOVE JLF46-DAY-FCST-SALES(WX10-DATA-SUB2) TO JLPRF-EXP-DAILY-SALES. MOVE JLF46-FCST-OPEN-BKSTK(WX10-DATA-SUB2) TO JLPRF-EXP-SOD-SOH. *----- 27/03/2001 - GM ---------------------------------------* * MOVE JLF46-ALLOC-TYPE TO JLPRF-ALLOC-IND. MOVE JLF46-ALLOC-TYPE(WX10-DATA-SUB1) TO JLPRF-ALLOC-IND. * IF JLF46-ALLOC-TYPE = "V" AND IF JLPRF-ALLOC-IND = "V" AND *-------------------------------------------------------------* JLF46-NEW-LINE-QTY(WX10-DATA-SUB1) > +0 AND JLF46-APPORTION-PC(WX10-DATA-SUB1) = ZEROES MOVE "N" TO JLPRF-ALLOC-IND END-IF. IF JLPRF-ALLOC-IND = SPACES THEN IF JLF46-CALC-METHOD(WX10-DATA-SUB1) = "8" THEN MOVE "E" TO JLPRF-ALLOC-IND ELSE MOVE "C" TO JLPRF-ALLOC-IND END-IF END-IF. *----- 14/06/2002 - GM ---------------------------------------* * COMPUTE WW01-TARGET-STOCK = * JLF46-EXP-SALES-IN-DMND(WX10-DATA-SUB1) + * JLF46-SAFETY-STK-QTY(WX10-DATA-SUB1). COMPUTE WW01-TARGET-STOCK = JLF46-EXP-SALES-IN-DMND(WX10-DATA-SUB1) + JLF46-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1). *-------------------------------------------------------------* IF JLF46-CALC-METHOD(WX10-DATA-SUB1) = "I" *-------- STANDING ORDERS - IGNORE BOOKSTOCK ------------------* MOVE JLF46-CAPACITY(WX10-DATA-SUB1) TO JLPRF-CAP-SAFE-QTY MOVE "I" TO JLPRF-CAP-SAFE-IND ELSE IF JLF46-CALC-METHOD(WX10-DATA-SUB1) = "D" *-------- ORDER UP TO DYNAMIC CALCULATION ---------------------* OR JLF46-CALC-METHOD(WX10-DATA-SUB1) = "E" *-------- ORDER UP TO STATIC CALCULATION ----------------------* THEN MOVE JLF46-CAPACITY(WX10-DATA-SUB1) TO JLPRF-CAP-SAFE-QTY MOVE "T" TO JLPRF-CAP-SAFE-IND ELSE IF JLF46-CALC-METHOD(WX10-DATA-SUB1) = "1" *-------- DEMAND LINE FILL-UP LONG LIFE -----------------------* OR JLF46-CALC-METHOD(WX10-DATA-SUB1) = "2" *-------- DEMAND LINE TOP-UP LONG LIFE ------------------------* OR JLF46-CALC-METHOD(WX10-DATA-SUB1) = "A" *-------- DEMAND LINE FILL-UP MEDIUM LIFE ---------------------* OR JLF46-CALC-METHOD(WX10-DATA-SUB1) = "B" *-------- DEMAND LINE TOP-UP MEDIUM LIFE ----------------------* THEN *-------- THESE ALL USE CAPACITY ------------------------------* MOVE JLF46-CAPACITY(WX10-DATA-SUB1) TO JLPRF-CAP-SAFE-QTY MOVE "C" TO JLPRF-CAP-SAFE-IND ELSE IF JLF46-CALC-METHOD(WX10-DATA-SUB1) = "4" *-------- NON DEMAND SHORT LIFE FILL-UP -----------------------* OR JLF46-CALC-METHOD(WX10-DATA-SUB1) = "5" *-------- NON DEMAND TOP-UP -----------------------------------* OR JLF46-CALC-METHOD(WX10-DATA-SUB1) = "7" *-------- STOCK FILL LINE NON-FILL ----------------------------* THEN *-------- THESE ALL USE SALES + SAFETY ------------------------* *----- 14/06/2002 - GM ---------------------------------------* * MOVE JLF46-SAFETY-STK-QTY(WX10-DATA-SUB1) MOVE JLF46-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) *-------------------------------------------------------------* TO JLPRF-CAP-SAFE-QTY MOVE "S" TO JLPRF-CAP-SAFE-IND ELSE *-------- ALL OTHERS MAY USE EITHER SALES + SAFETY OR CAPACITY-* IF WW01-TARGET-STOCK > JLF46-CAPACITY(WX10-DATA-SUB1) 161S26 AND JLF46-CALC-METHOD(WX10-DATA-SUB1) NOT = "X" THEN *----- 14/06/2002 - GM ---------------------------------------* * MOVE JLF46-SAFETY-STK-QTY(WX10-DATA-SUB1) MOVE JLF46-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) *-------------------------------------------------------------* TO JLPRF-CAP-SAFE-QTY MOVE "S" TO JLPRF-CAP-SAFE-IND ELSE 161S26 IF JLF46-CALC-METHOD(WX10-DATA-SUB1) = "X" 161S26 COMPUTE JLPRF-CAP-SAFE-QTY = 161S26 JLF46-STD-SHELF-CAP + 161S26 JLF46-PROM-SHELF-CAP(WX10-DATA-SUB1) 161S26 ELSE 161S26 MOVE JLF46-CAPACITY(WX10-DATA-SUB1) 161S26 TO JLPRF-CAP-SAFE-QTY 161S26 END-IF MOVE "C" TO JLPRF-CAP-SAFE-IND END-IF END-IF END-IF END-IF END-IF. *---------------------------------------------------------------* *----- CHG - 21/10/99 - GM -------------------------------------* *----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* *----- JLF46 SUBSCRIPTED ENTRY ---------------------------------* MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) TO JLPRF-FIRST-ORD-TYPE-OF-DAY. MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) TO JLPRF-LAST-ORDER. *---------------------------------------------------------------* PERFORM Y-300-WRITE-OUTPUT3. B-A30-EXIT. EXIT. B-A40-CREATE-ALLOCS SECTION. *---------------------------------------------------------------* * SECTION NAME : B-A40-CREATE-ALLOCS * * CALLED BY : * * CALLS : * * FUNCTION : 1. CREATES THE OUTPUT FILE OF ALLOCATION QTYS * *---------------------------------------------------------------* B-A40. * DISPLAY "B-A40". *-------------------------------------------------------- *-------IF THE PRODUCT IS ON ALLOCATION ACCORDING TO CR *-------BUT ALP RECORDS NOT FOUND, WE HAVE CONTINUED TO *-------CALC ORDERS, BUT ARE NO LONGER TREATING AS AN *-------ALLOCATION LINE, THEREFORE DO NOT WRITE OUT *-------A RECORD HERE, IF JLF46-PER-STR-DATE(WX10-DATA-SUB1) >= JLF46-ALLOC-STRT-DT AND JLF46-PER-STR-DATE(WX10-DATA-SUB1) <= JLF46-ALLOC-END-DT THEN CONTINUE ELSE GO TO B-A40-EXIT END-IF. IF JLF46-PER-STR-DATE(WX10-DATA-SUB1) > JLF46-LAST-FORCED-DT THEN CONTINUE ELSE GO TO B-A40-EXIT END-IF. IF JLF46-ALLOC-PATTERN-ID(WX10-DATA-SUB1) = SPACES AND JLF46-NEW-LINE-QTY(WX10-DATA-SUB1) <= 0 THEN GO TO B-A40-EXIT ELSE CONTINUE END-IF. *-------------------------------------------------------- MOVE WW01-CURR-PART-NO TO JLFOA-CR-PART-NO. MOVE WW01-CURR-RO-NO TO JLFOA-RETAIL-OUTLET-NO. MOVE WW01-CURR-BPR-TPN TO JLFOA-BASE-PRODUCT-NO. MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLFOA-LAST-FORCED-DATE. MOVE JLF46-ORDER-TYPE(WX10-DATA-SUB1) TO JLFOA-ORDER-TYPE. *----- 27/03/2001 - GM ---------------------------------------* * MOVE JLF46-ALLOC-TYPE TO JLFOA-ALLOC-TYPE. MOVE JLF46-ALLOC-TYPE(WX10-DATA-SUB1) TO JLFOA-ALLOC-TYPE. *-------------------------------------------------------------* COMPUTE JLFOA-FCST-ORD-QTY = JLF46-FINAL-CASE-QTY(WX10-DATA-SUB1) * JLF46-UNIT-SIZE. MOVE JLF46-UNIT-SIZE TO JLFOA-UNIT-SIZE. MOVE JLF46-APPORTION-PC(WX10-DATA-SUB1) TO JLFOA-APPORTIONMENT. MOVE JLF46-ALLOC-PATTERN-ID(WX10-DATA-SUB1) TO JLFOA-ALL-PATT-ID-GRP. MOVE JLF46-NEW-LINE-QTY(WX10-DATA-SUB1) TO JLFOA-NEW-ALLOC-QTY. *----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* *----- JLF46 SUBSCRIPTED ENTRY ---------------------------------* MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) TO JLFOA-FIRST-ORD-TYPE-OF-DAY. MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) TO JLFOA-LAST-ORDER. *---------------------------------------------------------------* PERFORM Y-400-WRITE-OUTPUT4. B-A40-EXIT. EXIT. SUM11A B-C00-CREATE-OUTPUT SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-C00-CREATE-OUTPUT CLONE OF * SUM11A* : B-A00-CREATE-OUTPUT FOR JL0F42 * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. CREATES JLF30O01/02/03/04 FILES * SUM11A*---------------------------------------------------------------* SUM11A B-C00. SUM11A SUM11A SET PROCESS-LOOP TO TRUE. SUM11A MOVE 1 TO WX10-DATA-SUB1. SUM11A MOVE WF01-CONTDATA TO WW01-DIFF-IN-DAYS. SUM11A SUM11A PERFORM UNTIL END-PROCESS-LOOP SUM11A SUM11A IF WX10-DATA-SUB1 > 30 SUM11A SET END-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A SUM11A IF WF01-ORDER-GROUP(WX10-DATA-SUB1) SUM11A = WT10-ORDER-GROUP SUM11A MOVE WF01-LEADTIME(WX10-DATA-SUB1) SUM11A TO WW01-DIFF-IN-DAYS SUM11A SUM11A IF WW01-DIFF-IN-DAYS < +6 SUM11A MOVE +6 TO WW01-DIFF-IN-DAYS SUM11A END-IF SUM11A IF WW01-DIFF-IN-DAYS > +21 SUM11A MOVE +21 TO WW01-DIFF-IN-DAYS SUM11A END-IF SUM11A SUM11A SET END-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A SUM11A ADD +1 TO WX10-DATA-SUB1 SUM11A SUM11A END-PERFORM SUM11A SUM11A MOVE ZEROES TO ZZD-ERROR-CODE SUM11A MOVE "A" TO ZZD-FUNCTION-CODE SUM11A MOVE "ISO" TO ZZD-DATE1-FORMAT SUM11A MOVE WW01-START-DATE TO ZZD-DATE1 SUM11A MOVE "ISO" TO ZZD-DATE2-FORMAT SUM11A MOVE +4 TO ZZD-DIFF-IN-DAYS SUM11A MOVE WW01-DIFF-IN-DAYS TO ZZD-DIFF-IN-DAYS. SUM11A SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM11A SUM11A SUM11A IF ZZD-ERROR-CODE NOT = 00 SUM11A THEN SUM11A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A ELSE SUM11A MOVE ZZD-DATE2 TO WW01-END-EXTRACT-DATE SUM11A END-IF SUM11A SUM11A SET PROCESS-LOOP TO TRUE. SUM11A MOVE 1 TO WX10-DATA-SUB1. SUM11A MOVE 1 TO WX10-DATA-SUB2. SUM11A SUM11A PERFORM UNTIL END-PROCESS-LOOP SUM11A SUM11A IF WX10-DATA-SUB1 = 1 SUM11A THEN SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO WW01-ORD-CALC-DATE SUM11A MOVE JLF42-PER-STR-TIME(WX10-DATA-SUB1) SUM11A TO WW01-ORD-CALC-TIME SUM11A END-IF SUM11A SUM11A IF JLF42-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" SUM11A THEN SUM11A PERFORM UNTIL JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A = JLF42-SALES-DATE(WX10-DATA-SUB2) SUM11A OR WX10-DATA-SUB2 > 50 SUM11A ADD 1 TO WX10-DATA-SUB2 SUM11A END-PERFORM SUM11A SUM11A PERFORM B-C10-CREATE-ORDERS SUM11A SUM11A IF JLF42-DELY-IND(WX10-DATA-SUB1) = SUM11A*----- 21/01/2003 - GM ---------------------------------------* SUM11A* "Y" OR "B" OR "P" OR "E" SUM11A "Y" OR "B" OR "P" OR "E" OR "S" SUM11A*-------------------------------------------------------------* SUM11A OR SUM11A (JLF42-DELY-IND(WX10-DATA-SUB1) = "N" SUM11A AND JLF42-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) SUM11A THEN SUM11A SUM11A PERFORM B-C05-UPDATE-COUNTS SUM11A SUM11A IF JLF42-PER-STR-DATE(WX10-DATA-SUB1) < SUM11A WW01-END-EXTRACT-DATE SUM11A THEN SUM11A MOVE 0 TO JLFOD-ORD-REC-TYPE SUM11A PERFORM B-C20-CREATE-ORD-DIAG SUM11A PERFORM B-C30-CREATE-PP-DIAG SUM11A*----- 27/03/2001 - GM ---------------------------------------* SUM11A*-- COMMENT --- THE ALLOC TYPES FOR MM ARE NOT INCLUDED SUM11A*-- HERE INTENTIONALLY - THEY SHOULD NOT BE WRITTEN TO THE SUM11A*-- JLFOALLO FILE SUM11A IF JLF42-ALLOC-TYPE(WX10-DATA-SUB1) = SUM11A ("F" OR "V" OR "H") SUM11A PERFORM B-C40-CREATE-ALLOCS SUM11A END-IF SUM11A END-IF SUM11A END-IF SUM11A END-IF SUM11A SUM11A ADD 1 TO WX10-DATA-SUB1 SUM11A SUM11A IF WX10-DATA-SUB1 > 75 SUM11A OR JLF42-PER-STR-DATE(WX10-DATA-SUB1) = SPACES SUM11A THEN SUM11A SET END-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A SUM11A END-PERFORM. SUM11A SUM11A B-C00-EXIT. SUM11A EXIT. SUM11A SUM11A B-C05-UPDATE-COUNTS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-C05-UPDATE-COUNTS * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. UPDATE COUNTS FOR DISPLAY AT END OF RUN * SUM11A*---------------------------------------------------------------* SUM11A B-C05. SUM11A EVALUATE JLF42-CALC-METHOD(WX10-DATA-SUB1) SUM11A WHEN "Y" SUM11A*------ BGO-FILL ------------------------------------------* SUM11A COMPUTE WA01-NO-OF-CALC-METH-Y = SUM11A WA01-NO-OF-CALC-METH-Y SUM11A + 1 SUM11A WHEN "Z" SUM11A*------ BGO-REPL ------------------------------------------* SUM11A COMPUTE WA01-NO-OF-CALC-METH-Z = SUM11A WA01-NO-OF-CALC-METH-Z SUM11A + 1 142S02 WHEN "O" 142S02*------ BGO-FILL-O ------------------------------------------* 142S02 COMPUTE WA01-NO-OF-CALC-METH-O = 142S02 WA01-NO-OF-CALC-METH-O 142S02 + 1 142S02 WHEN "P" 142S02*------ BGO-REPL-O ------------------------------------------* 142S02 COMPUTE WA01-NO-OF-CALC-METH-P = 142S02 WA01-NO-OF-CALC-METH-P SUM11A + 1 SUM11A WHEN OTHER SUM11A*--THIS IS AN ERROR SITUATION WHICH WOULD HAVE BEEN PICKED------* SUM11A*--UP IN JL0F42 PROCESSING -------------------------------------* SUM11A GO TO B-C05-EXIT SUM11A END-EVALUATE. SUM11A SUM11A B-C05-EXIT. SUM11A EXIT. SUM11A SUM11A B-C10-CREATE-ORDERS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-C10-CREATE-ORDERS * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. CREATES THE OUTPUT FILE OF FORECAST ORDERS * SUM11A*---------------------------------------------------------------* SUM11A B-C10. SUM11A MOVE WW01-CURR-PART-NO TO JLFOR-CR-PART-NO. SUM11A MOVE WW01-CURR-RO-NO TO JLFOR-RETAIL-OUTLET-NO. SUM11A MOVE WW01-CURR-BPR-TPN TO JLFOR-BASE-PRODUCT-NO. SUM11A SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOR-DELY-REQ-DATE. SUM11A MOVE JLF42-ORDER-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOR-ORDER-TYPE. SUM11A COMPUTE JLFOR-FCST-ORD-QTY = SUM11A JLF42-FINAL-CASE-QTY(WX10-DATA-SUB1) * SUM11A JLF42-UNIT-SIZE. SUM11A COMPUTE JLFOR-CODE-LIFE = SUM11A JLF40-EXP-SHELF-LIFE(WX10-DATA-SUB1) - 1. 20280000 SUM11A MOVE JLF42-ORDER-PRIORITY(WX10-DATA-SUB1) SUM11A TO JLFOR-ORDER-PRIORITY. SUM11A MOVE JLF42-OUT-OF-TOLERANCE(WX10-DATA-SUB1) SUM11A TO JLFOR-OUT-OF-TOLERANCE. SUM11A SUM11A MOVE JLF42-SALES-CCYYMMD(WX10-DATA-SUB2) SUM11A TO JLFOR-DELY-REQ-CCYYWWD. SUM11A MOVE JLF42-FCST-TRGT-STK(WX10-DATA-SUB2) SUM11A TO JLFOR-TRGT-STK-QTY. SUM11A MOVE JLF42-FCST-OPEN-BKSTK(WX10-DATA-SUB2) SUM11A TO JLFOR-OPENING-STOCK. SUM11A SUM11A*** ENSURE CR FORECAST SALES IS NOT PHYSICALLY OVERWRITTEN SUM11A*** BY ANY DOTCOM EXPECTED SALES BY USING THE SAVED CR VALUE. SUM11A*** THIS IS REQUIRED TO RETAIN THE AUDIT TRAIL FOR SUM11A*** COMPARISON PURPOSES. SUM11A SUM11A MOVE WT80-DAY-FCST-SALES(WX10-DATA-SUB2) SUM11A TO JLFOR-RO-DAY-EST-SALES. SUM11A SUM11A*----- CHG - 21/10/99 - GM -------------------------------------* SUM11A*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* SUM11A*----- JLF42 SUBSCRIPTED ENTRY ---------------------------------* SUM11A MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) SUM11A TO JLFOR-FIRST-ORD-TYPE-OF-DAY. SUM11A MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) SUM11A TO JLFOR-LAST-ORDER. SUM12A MOVE WI20-CALC-METH-I-IND SUM12A TO JLFOR-CALC-METH-I-IND. SUM12B MOVE WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO JLFOR-NOTNL-CALC-DATE. SPR13B MOVE WW25-SALES-ORDER SPR13B TO JLFOR-SALES-ORDER. SPR13B IF JL01X-RUN-ID ="9" SPR13B MOVE JLF42-BGO-SALES-ORDER(WX10-DATA-SUB1) SPR13B TO JLFOR-SALES-ORDER SPR13B END-IF SUM11A*---------------------------------------------------------------* SUM11A SUM11A PERFORM Y-100-WRITE-OUTPUT1. SUM11A SUM11A B-C10-EXIT. SUM11A EXIT. SUM11A SUM11A B-C20-CREATE-ORD-DIAG SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-C20-CREATE-ORD-DIAG * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. CREATES THE OUTPUT FILE OF ORDER DIAGNOSTICS SUM11A*---------------------------------------------------------------* SUM11A B-C20. SUM11A MOVE WW01-CURR-PART-NO TO JLFOD-CR-PART-NO. SUM11A MOVE WW01-CURR-RO-NO TO JLFOD-RETAIL-OUTLET-NO. SUM11A MOVE WW01-CURR-BPR-TPN TO JLFOD-BASE-PRODUCT-NO. SUM11A SUM11A* DISPLAY " ". SUM11A* DISPLAY "RO-NO = " JLFOD-RETAIL-OUTLET-NO. SUM11A* DISPLAY "BPR-TPN = " JLFOD-BASE-PRODUCT-NO. SUM11A* DISPLAY "%CAPACITY-" JLF42-CAPACITY(WX10-DATA-SUB1). SUM11A SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOD-DELY-REQ-DATE. SUM11A MOVE JLF42-PER-STR-TIME(WX10-DATA-SUB1) SUM11A TO JLFOD-DELY-REQ-TIME. SUM11A MOVE JLF42-ORDER-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOD-ORDER-TYPE. SUM11A*----- 21/01/2003 - GM ---------------------------------------* SUM11A MOVE JLF42-DELY-IND(WX10-DATA-SUB1) SUM11A TO JLFOD-DELY-IND. SUM11A*-------------------------------------------------------------* SUM11A SUM11A MOVE WT10-DGRP-CODE TO JLFOD-DGRP-CODE SUM11A MOVE WT10-ORDER-GROUP TO JLFOD-ORDER-GROUP SUM11A MOVE WT10-SUB-PG-CODE TO JLFOD-SUB-PG-CODE SUM11A MOVE JLF42-STK-FILL-IND (WX10-DATA-SUB1) SUM11A TO JLFOD-STK-FILL-IND SUM11A MOVE JLF42-STK-FILL-WK-IND (WX10-DATA-SUB1) SUM11A TO JLFOD-STK-FILL-WK-IND SUM11A MOVE JLF42-UNIT-SIZE TO JLFOD-UNIT-SIZE SUM11A MOVE JLF42-ALT-MERCH-UNIT-RND(WX10-DATA-SUB1) SUM11A TO JLFOD-ALT-MERCH-UNIT-RND SUM11A MOVE JLF42-ALT-MERCH-UNITS(WX10-DATA-SUB1) SUM11A TO JLFOD-ALT-MERCH-UNITS SUM11A MOVE JLF42-PALLET-RND(WX10-DATA-SUB1) TO JLFOD-PALLET-RND SUM11A MOVE JLF42-CAPACITY(WX10-DATA-SUB1) TO JLFOD-SHELF-FILL-CAP SUM11A SUM11A MOVE WW01-ORD-CALC-DATE TO JLFOD-ORD-CALC-DT. SUM11A MOVE WW01-ORD-CALC-TIME TO JLFOD-ORD-CALC-TM. SUM11A MOVE WT10-DISPLAY-MDL-QTY TO JLFOD-DISPLAY-MDL-QTY SUM12B MOVE JLF42-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO SUM12B JLFOD-NOTNL-CALC-DATE SUM11A SUM11A IF JLF40-NEW-GAP-CNTL-EXISTS SUM11A MOVE WW-GAP-STK-CORR TO JLFOD-GAP-STK-CORR SUM11A ADD WT10-DISPLAY-MDL-QTY TO WW-GAP-EXPCTD-BOOKSTK SUM11A MOVE WW-GAP-EXPCTD-BOOKSTK TO JLFOD-BKSTK-EFF-CALC SUM11A ELSE SUM11A MOVE -9999 TO JLFOD-GAP-STK-CORR SUM11A COMPUTE WW18-DIS-EXPCTD-BOOKSTK = SUM11A WT10-ST-PERD-STK-POS + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-EXPCTD-BOOKSTK TO JLFOD-BKSTK-EFF-CALC SUM11A END-IF SUM11A SUM11A MOVE JLF42-STK-PROD-END-DT TO JLFOD-STKD-PROD-ENDT. SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOD-DMND-ST-DT. SUM11A MOVE JLF42-PER-STR-TIME(WX10-DATA-SUB1) SUM11A TO JLFOD-DMND-ST-TM. SUM11A MOVE JLF42-DMND-END-DT(WX10-DATA-SUB1) SUM11A TO JLFOD-DMND-END-DT. SUM11A MOVE JLF42-DMND-END-TIME(WX10-DATA-SUB1) SUM11A TO JLFOD-DMND-END-TM. SUM11A MOVE JLF42-STD-SHELF-CAP TO JLFOD-STD-SHELF-CAP. SUM11A*----- 12/01/2002 - GM ---------------------------------------* SUM11A MOVE WW01-COR-PC TO JLFOD-COR-PC. SUM11A*-------------------------------------------------------------* 143S01 COMPUTE JLFOD-SPECIAL-ORDER-QTY = 20220000 143S01 JLF42-CUST-ORD-QTY(WX10-DATA-SUB1)+ 20230000 143S01 JLF42-SMFO-ORD-QTY(WX10-DATA-SUB1) 20240000 SUM11A 143S01 IF JLF42-SMFO-ORD-RND(WX10-DATA-SUB1)>SPACES 143S01 MOVE JLF42-SMFO-ORD-RND(WX10-DATA-SUB1) 143S01 TO JLFOD-CUST-ORD-RND 143S01 ELSE 143S01 MOVE JLF42-CUST-ORD-RND(WX10-DATA-SUB1) 143S01 TO JLFOD-CUST-ORD-RND 143S01 END-IF. SUM11A MOVE JLF42-GAP-ORDER-SNGLS-QTY(WX10-DATA-SUB1) SUM11A TO JLFOD-GAP-ORD-QTY SUM11A*----- 27/03/2001 - GM ---------------------------------------* SUM11A MOVE JLF42-ALLOC-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOD-ALLOC-IND. SUM11A*-------------------------------------------------------------* SUM11A MOVE JLF42-RSVE-QTY (WX10-DATA-SUB1) SUM11A TO JLFOD-REM-ALLOC-QTY. SUM11A MOVE JLF42-S-L-LIFE-IND TO JLFOD-S-L-LIFE-IND. SUM11A MOVE "N" TO JLFOD-WEEKEND-IND. SUM11A*----- 03/10/2002 - SB ---------------------------------------* SUM11A IF FIRST-ORD-DIAG SUM11A COMPUTE WW18-DIS-ACTUAL-BOOKSTK = SUM11A WT10-BOOKSTOCK-USED + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-ACTUAL-BOOKSTK SUM11A TO JLFOD-BOOKSTOCK-USED SUM11A MOVE WT10-BOOK-STOCK-DT SUM11A TO JLFOD-BOOK-STOCK-DT SUM11A MOVE WT10-BOOK-STOCK-TM SUM11A TO JLFOD-BOOK-STOCK-TM SUM11A SET NOT-FIRST-ORD-DIAG TO TRUE SUM11A ELSE SUM11A COMPUTE WW18-DIS-A-BKSTK = SUM11A JLF42-ACTUAL-STK-POS(WX10-DATA-SUB1) SUM11A + WT10-DISPLAY-MDL-QTY SUM11A MOVE WW18-DIS-A-BKSTK SUM11A TO JLFOD-BOOKSTOCK-USED SUM11A MOVE JLF42-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM11A TO JLFOD-BOOK-STOCK-DT SUM11A MOVE JLF42-NOTNL-CALC-TIME(WX10-DATA-SUB1) SUM11A TO JLFOD-BOOK-STOCK-TM SUM11A END-IF. SUM11A*-------------------------------------------------------------* SUM11A MOVE WT10-EST-SALES-USED TO JLFOD-EST-SALES-USED. SUM11A MOVE JLF42-EXP-SALES-IN-CALC(WX10-DATA-SUB1) SUM11A TO JLFOD-EXP-SALES-PRE-DP. SUM11A MOVE JLF42-ANTIC-WASTE-IN-CALC(WX10-DATA-SUB1) SUM11A TO JLFOD-ANT-WASTE-PRE-DP. SUM11A MOVE JLF42-OS-ORD-IN-CALC(WX10-DATA-SUB1) SUM11A TO JLFOD-EXP-DEL-PRE-DP. SUM11A MOVE JLF42-ST-PERD-STK-POS(WX10-DATA-SUB1) SUM11A TO JLFOD-ST-PERD-STK-POS. SUM11A MOVE JLF42-EXP-SALES-IN-DMND(WX10-DATA-SUB1) SUM11A TO JLFOD-EXP-SALES-DP. SUM11A MOVE JLF42-ANTIC-WASTE-IN-DMND(WX10-DATA-SUB1) SUM11A TO JLFOD-ANT-WASTE-DP. SUM11A MOVE JLF42-COVER-EXP-SALES(WX10-DATA-SUB1) SUM11A TO JLFOD-COVER-EXP-SALES. SUM11A MOVE JLF42-EXP-SALES-IN-CDLF7(WX10-DATA-SUB1) SUM11A TO JLFOD-EXP-SALES-IN-CDLF. SUM11A MOVE JLF42-SAFE-STK-QTY(WX10-DATA-SUB1) SUM11A TO JLFOD-SAFE-STK-QTY. SUM11A MOVE JLF42-CODE-SAFE-STK-QTY(WX10-DATA-SUB1) SUM11A TO JLFOD-CODE-SAFE-STK-QTY. SUM11A MOVE JLF42-PURE-CUBE-SAFE-STK-QTY(WX10-DATA-SUB1) SUM11A TO JLFOD-CUBE-SAFE-STK-QTY. SUM11A MOVE JLF42-CALC-METHOD(WX10-DATA-SUB1) SUM11A TO JLFOD-CALC-METHOD. SUM11A MOVE 0 SUM11A TO JLFOD-RAW-DEMAND. SUM11A COMPUTE JLFOD-RND-DEMAND ROUNDED = SUM11A JLF42-FINAL-CASE-QTY(WX10-DATA-SUB1) * SUM11A JLF42-UNIT-SIZE. AVRS32 MOVE JLFOD-RND-DEMAND AVRS32 TO JLFOD-PREV-ORD-QTY SUM11A SUM11A* ROUNDING DATA SUM11A MOVE JLF42-BASE-ROUNDING(WX10-DATA-SUB1) SUM11A TO JLFOD-BASE-ROUNDING SUM11A MOVE JLF42-FULL-FILL-CAP-ROUNDING(WX10-DATA-SUB1) SUM11A TO JLFOD-FULL-FILL-CAP-RND SUM11A MOVE JLF42-EXP-DEMAND-RND(WX10-DATA-SUB1) SUM11A TO JLFOD-EXP-DEMAND-RND SUM11A MOVE JLF42-ALT-MERCH-RND(WX10-DATA-SUB1) SUM11A TO JLFOD-MERCH-UNIT-RND SUM11A MOVE SPACES SUM11A TO JLFOD-WASTE-RND SUM11A MOVE SPACES SUM11A TO JLFOD-PROM-RUN-DOWN-RND SUM11A MOVE SPACES SUM11A TO JLFOD-DISC-RUN-DOWN-RND SUM11A MOVE JLF42-ALLOC-RND(WX10-DATA-SUB1) SUM11A TO JLFOD-ALLOC-RND SUM11A MOVE JLF42-GAP-ORD-RND(WX10-DATA-SUB1) SUM11A TO JLFOD-GAP-ORD-RND SUM11A SUM11A MOVE JLF42-SALES-TO-MIDNITE TO JLFOD-SALES-TO-MIDNITE. SUM11A MOVE JLF42-PERD-FCST-SALES(WX10-DATA-SUB1) SUM11A TO JLFOD-FCAST-SALES-CAL. SUM11A SUM11A MOVE 0 TO JLFOD-EXP-WKLY-SALES SUM11A SUM11A PERFORM VARYING WX10-NEW-SUB FROM 1 BY 1 SUM11A UNTIL WX10-NEW-SUB > 7 SUM11A ADD JLF42-DAY-FCST-SALES(WX10-NEW-SUB) TO SUM11A JLFOD-EXP-WKLY-SALES SUM11A END-PERFORM SUM11A SUM11A*END OF : VERSION 3.5 CHANGES SUM11A SUM11A MOVE JLF42-PERD-HOURLY-PTP(WX10-DATA-SUB1) SUM11A TO JLFOD-PERD-HOURLY-PTP. SUM11A MOVE JLF42-PROM-IND(WX10-DATA-SUB1) SUM11A TO JLFOD-PROM-IND. SUM11A MOVE JLF42-PROM-END-DATE(WX10-DATA-SUB1) SUM11A TO JLFOD-OFFER-END-DATE. SUM13A MOVE JLF42-PROM-SHELF-CAP-OLD(WX10-DATA-SUB1) SUM11A TO JLFOD-OFFER-SHELF-CAP. SUM11A MOVE JLF42-EFF-MIN-PROM-CAP(WX10-DATA-SUB1) SUM11A TO JLFOD-EFF-MIN-PROM-CAP. SUM11A MOVE JLF42-MIN-PROM-REQ-IND(WX10-DATA-SUB1) SUM11A TO JLFOD-EFF-MIN-PROM-IND. SUM11A SUM11A* CONTROL DATA SUM11A MOVE 0 SUM11A TO JLFOD-ACC-WSTGE-PERC SUM11A MOVE JLF42-CNTL-CODE-LIFE(WX10-DATA-SUB1) SUM11A TO JLFOD-CNTL-CODE-LIFE SUM11A MOVE JLF42-COVER-DAYS(WX10-DATA-SUB1) SUM11A TO JLFOD-COVER-DAYS SUM11A MOVE 0 SUM11A TO JLFOD-PROM-STK-RUN-DOWN-PC SUM11A MOVE JLF42-FILL-SAFETY-PC(WX10-DATA-SUB1) SUM11A TO JLFOD-FILL-SAFETY-PC SUM11A MOVE JLF42-SHELF-FILL-CAP-PC(WX10-DATA-SUB1) SUM11A TO JLFOD-SHELF-FILL-CAP-PC SUM11A MOVE JLF42-SALE-SAFE-PC(WX10-DATA-SUB1) SUM11A TO JLFOD-SALE-SAFE-PC SUM11A MOVE JLF42-CODE-SAFE-PC(WX10-DATA-SUB1) SUM11A TO JLFOD-CODE-SAFE-PC SUM11A MOVE JLF42-CUBE-SAFE-PC(WX10-DATA-SUB1) SUM11A TO JLFOD-CUBE-SAFE-PC SUM11A MOVE JLF42-GAP-ORDER-SHELF-CAP(WX10-DATA-SUB1) SUM11A TO JLFOD-GAP-ORD-PC SUM11A SUM11A MOVE JLF42-ALLOC-SNGLS(WX10-DATA-SUB1) TO JLFOD-ALLOC-SNGLS. SUM11A SUM11A MOVE SPACES SUM11A TO JLFOD-DEVELOPMENT-LINE. SUM11A MOVE ZEROES SUM11A TO JLFOD-DEV-LINE-SFTY-PC SUM11A SUM11A*----- CHG - 21/10/99 - GM -------------------------------------* SUM11A*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* SUM11A*----- JLF46 SUBSCRIPTED ENTRY IS THE SAME AS THE --------------* SUM11A MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) SUM11A TO JLFOD-FIRST-ORD-TYPE-OF-DAY. SUM11A MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) SUM11A TO JLFOD-LAST-ORDER. SUM11A SUM11A MOVE JLF42-OLD-DAY-FCST-SALES(WX10-DATA-SUB2) TO SUM11A JLFOD-ALT-EDS-QTY. SUM11A MOVE JLF42-DAY-FCST-SALES(WX10-DATA-SUB2) TO SUM11A JLFOD-SFTY-STK-EDS-QTY. SUM11A MOVE JLF42-SALES-DEVI-TOL-IND(WX10-DATA-SUB1) TO SUM11A JLFOD-SALES-DVTN-OOT-IND. SUM11A MOVE JLF42-POS-SALES-DEVI-TOL-PC(WX10-DATA-SUB1) TO SUM11A JLFOD-POS-SALES-DTP. SUM11A MOVE JLF42-NEG-SALES-DEVI-TOL-PC (WX10-DATA-SUB1)TO SUM11A JLFOD-NEG-SALES-DTP. SUM11A MOVE JLF42-SALE-SAFE-STK-QTY(WX10-DATA-SUB1) TO SUM11A JLFOD-SALE-SAFE-STK-QTY. SUM11A* SUM11A IF JLF42-PROM-IND(WX10-DATA-SUB1) = "Y" SUM11A THEN SUM11A MOVE JLF42-PROM-SAFE-PC SUM11A TO JLFOD-OFFER-SFTY-STK-PC SUM11A ELSE SUM11A MOVE ZEROES SUM11A TO JLFOD-OFFER-SFTY-STK-PC SUM11A END-IF. SUM11A SUM11A MOVE JLF42-PRM-SAFETY-STK-QTY(WX10-DATA-SUB1) TO SUM11A JLFOD-OFFER-SFTY-STK-QTY. SUM11A MOVE 0 TO SUM11A JLFOD-DEV-LINE-SFTY-QTY. SUM11A SUM11A MOVE WT10-STEP-IMPACT-TYPE(WX10-DATA-SUB1) TO SUM11A JLFOD-STEP-IMPACT-TYPE. SUM11A SUM11A*----- 27/03/2001 - GM ---------------------------------------* SUM11A MOVE 0 TO SUM11A JLFOD-T-DMND-FCTR. SUM11A MOVE JLF42-CAPACITY-DAYS(WX10-DATA-SUB1) TO SUM11A JLFOD-CAPACITY-CAP. SUM11A*-------------------------------------------------------------* SUM11A SUM11A MOVE JLF42-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) TO SUM11A JLFOD-ADJ-SAFE-STK-QTY. SUM11A SUM11A MOVE JLF42-CASE-SAFETY-PC(WX10-DATA-SUB1) TO SUM11A JLFOD-CASE-SAFETY-PC. SUM11A SUM11A PERFORM Y-200-WRITE-OUTPUT2. SUM11A SUM11A B-C20-EXIT. SUM11A EXIT. SUM11A SUM11A SUM11A B-C30-CREATE-PP-DIAG SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-C30-CREATE-PP-DIAG * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. CREATES THE OUTPUT FILE OF PRODUCT PROFILE * SUM11A* : SPECIFIC DIAGNOSTICS * SUM11A*---------------------------------------------------------------* SUM11A B-C30. SUM11A MOVE WW01-CURR-PART-NO TO JLPRF-CR-PART-NO. SUM11A MOVE WW01-CURR-RO-NO TO JLPRF-RETAIL-OUTLET-NO. SUM11A MOVE WW01-CURR-BPR-TPN TO JLPRF-BASE-PRODUCT-NO. SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLPRF-DELY-REQ-DATE. SUM11A MOVE JLF42-ORDER-TYPE(WX10-DATA-SUB1) SUM11A TO JLPRF-ORDER-TYPE. SUM11A SUM11A MOVE JLF42-DAY-FCST-SALES(WX10-DATA-SUB2) SUM11A TO JLPRF-EXP-DAILY-SALES. SUM11A MOVE JLF42-FCST-OPEN-BKSTK(WX10-DATA-SUB2) SUM11A TO JLPRF-EXP-SOD-SOH. SUM11A SUM11A*----- 27/03/2001 - GM ---------------------------------------* SUM11A MOVE JLF42-ALLOC-TYPE(WX10-DATA-SUB1) SUM11A TO JLPRF-ALLOC-IND. SUM11A IF JLPRF-ALLOC-IND = "V" AND SUM11A*-------------------------------------------------------------* SUM11A JLF42-NEW-LINE-QTY(WX10-DATA-SUB1) > +0 AND SUM11A JLF42-APPORTION-PC(WX10-DATA-SUB1) = ZEROES SUM11A MOVE "N" TO JLPRF-ALLOC-IND SUM11A END-IF. SUM11A SUM11A IF JLPRF-ALLOC-IND = SPACES SUM11A THEN SUM11A IF JLF42-CALC-METHOD(WX10-DATA-SUB1) = "8" SUM11A THEN SUM11A MOVE "E" TO JLPRF-ALLOC-IND SUM11A ELSE SUM11A MOVE "C" TO JLPRF-ALLOC-IND SUM11A END-IF SUM11A END-IF. SUM11A SUM11A*----- 14/06/2002 - GM ---------------------------------------* SUM11A* COMPUTE WW01-TARGET-STOCK = SUM11A* JLF42-EXP-SALES-IN-DMND(WX10-DATA-SUB1) + SUM11A* JLF42-SAFETY-STK-QTY(WX10-DATA-SUB1). SUM11A COMPUTE WW01-TARGET-STOCK = SUM11A JLF42-EXP-SALES-IN-DMND(WX10-DATA-SUB1) + SUM11A JLF42-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1). SUM11A*-------------------------------------------------------------* SUM11A SUM11A IF JLF42-CALC-METHOD(WX10-DATA-SUB1) = "I" SUM11A*-------- STANDING ORDERS - IGNORE BOOKSTOCK ------------------* SUM11A MOVE JLF42-CAPACITY(WX10-DATA-SUB1) SUM11A TO JLPRF-CAP-SAFE-QTY SUM11A MOVE "I" TO JLPRF-CAP-SAFE-IND SUM11A ELSE SUM11A IF JLF42-CALC-METHOD(WX10-DATA-SUB1) = "D" SUM11A*-------- ORDER UP TO DYNAMIC CALCULATION ---------------------* SUM11A OR JLF42-CALC-METHOD(WX10-DATA-SUB1) = "E" SUM11A*-------- ORDER UP TO STATIC CALCULATION ----------------------* SUM11A THEN SUM11A MOVE JLF42-CAPACITY(WX10-DATA-SUB1) SUM11A TO JLPRF-CAP-SAFE-QTY SUM11A MOVE "T" TO JLPRF-CAP-SAFE-IND SUM11A ELSE SUM11A IF JLF42-CALC-METHOD(WX10-DATA-SUB1) = "1" SUM11A*-------- DEMAND LINE FILL-UP LONG LIFE -----------------------* SUM11A OR JLF42-CALC-METHOD(WX10-DATA-SUB1) = "2" SUM11A*-------- DEMAND LINE TOP-UP LONG LIFE ------------------------* SUM11A OR JLF42-CALC-METHOD(WX10-DATA-SUB1) = "A" SUM11A*-------- DEMAND LINE FILL-UP MEDIUM LIFE ---------------------* SUM11A OR JLF42-CALC-METHOD(WX10-DATA-SUB1) = "B" SUM11A*-------- DEMAND LINE TOP-UP MEDIUM LIFE ----------------------* SUM11A THEN SUM11A*-------- THESE ALL USE CAPACITY ------------------------------* SUM11A MOVE JLF42-CAPACITY(WX10-DATA-SUB1) SUM11A TO JLPRF-CAP-SAFE-QTY SUM11A MOVE "C" TO JLPRF-CAP-SAFE-IND SUM11A ELSE SUM11A IF JLF42-CALC-METHOD(WX10-DATA-SUB1) = "4" SUM11A*-------- NON DEMAND SHORT LIFE FILL-UP -----------------------* SUM11A OR JLF42-CALC-METHOD(WX10-DATA-SUB1) = "5" SUM11A*-------- NON DEMAND TOP-UP -----------------------------------* SUM11A OR JLF42-CALC-METHOD(WX10-DATA-SUB1) = "7" SUM11A*-------- STOCK FILL LINE NON-FILL ----------------------------* SUM11A THEN SUM11A*-------- THESE ALL USE SALES + SAFETY ------------------------* SUM11A SUM11A*----- 14/06/2002 - GM ---------------------------------------* SUM11A* MOVE JLF42-SAFETY-STK-QTY(WX10-DATA-SUB1) SUM11A MOVE JLF42-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) SUM11A*-------------------------------------------------------------* SUM11A TO JLPRF-CAP-SAFE-QTY SUM11A MOVE "S" TO JLPRF-CAP-SAFE-IND SUM11A ELSE SUM11A*-------- ALL OTHERS MAY USE EITHER SALES + SAFETY OR CAPACITY-* SUM11A IF WW01-TARGET-STOCK > SUM11A JLF42-CAPACITY(WX10-DATA-SUB1) 161S26 AND (JLF42-CALC-METHOD(WX10-DATA-SUB1) NOT = 161S26 "Y" AND "Z" AND "O" AND "P") SUM11A THEN SUM11A*----- 14/06/2002 - GM ---------------------------------------* SUM11A MOVE JLF42-ADJ-SAFETY-STK-QTY(WX10-DATA-SUB1) SUM11A*-------------------------------------------------------------* SUM11A TO JLPRF-CAP-SAFE-QTY SUM11A MOVE "S" TO JLPRF-CAP-SAFE-IND SUM11A ELSE 161S26 IF (JLF42-CALC-METHOD(WX10-DATA-SUB1) = 161S26 "Y" OR "Z" OR "O" OR "P") 161S26 COMPUTE JLPRF-CAP-SAFE-QTY = 161S26 JLF42-STD-SHELF-CAP + 161S26 JLF42-PROM-SHELF-CAP-OLD(WX10-DATA-SUB1) 161S26 ELSE SUM11A MOVE JLF42-CAPACITY(WX10-DATA-SUB1) SUM11A TO JLPRF-CAP-SAFE-QTY 161S26 END-IF 161S26 SUM11A MOVE "C" TO JLPRF-CAP-SAFE-IND SUM11A END-IF SUM11A END-IF SUM11A END-IF SUM11A END-IF SUM11A END-IF. SUM11A*---------------------------------------------------------------* SUM11A SUM11A*----- CHG - 21/10/99 - GM -------------------------------------* SUM11A*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* SUM11A*----- JLF46 SUBSCRIPTED ENTRY ---------------------------------* SUM11A MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) SUM11A TO JLPRF-FIRST-ORD-TYPE-OF-DAY. SUM11A MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) SUM11A TO JLPRF-LAST-ORDER. SUM11A*---------------------------------------------------------------* SUM11A SUM11A PERFORM Y-300-WRITE-OUTPUT3. SUM11A SUM11A B-C30-EXIT. SUM11A EXIT. SUM11A SUM11A B-C40-CREATE-ALLOCS SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-C40-CREATE-ALLOCS * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. CREATES THE OUTPUT FILE OF ALLOCATION QTYS * SUM11A*---------------------------------------------------------------* SUM11A B-C40. SUM11A SUM11A*-------------------------------------------------------- SUM11A*-------IF THE PRODUCT IS ON ALLOCATION ACCORDING TO CR SUM11A*-------BUT ALP RECORDS NOT FOUND, WE HAVE CONTINUED TO SUM11A*-------CALC ORDERS, BUT ARE NO LONGER TREATING AS AN SUM11A*-------ALLOCATION LINE, THEREFORE DO NOT WRITE OUT SUM11A*-------A RECORD HERE, SUM11A IF JLF42-PER-STR-DATE(WX10-DATA-SUB1) >= SUM11A JLF42-ALLOC-STRT-DT AND SUM11A JLF42-PER-STR-DATE(WX10-DATA-SUB1) <= SUM11A JLF42-ALLOC-END-DT SUM11A THEN SUM11A CONTINUE SUM11A ELSE SUM11A GO TO B-C40-EXIT SUM11A END-IF. SUM11A SUM11A IF JLF42-PER-STR-DATE(WX10-DATA-SUB1) > SUM11A JLF42-LAST-FORCED-DT SUM11A THEN SUM11A CONTINUE SUM11A ELSE SUM11A GO TO B-C40-EXIT SUM11A END-IF. SUM11A SUM11A IF JLF42-ALLOC-PATTERN-ID(WX10-DATA-SUB1) = SPACES SUM11A AND JLF42-NEW-LINE-QTY(WX10-DATA-SUB1) <= 0 SUM11A THEN SUM11A GO TO B-C40-EXIT SUM11A ELSE SUM11A CONTINUE SUM11A END-IF. SUM11A*-------------------------------------------------------- SUM11A SUM11A SUM11A MOVE WW01-CURR-PART-NO TO JLFOA-CR-PART-NO. SUM11A MOVE WW01-CURR-RO-NO TO JLFOA-RETAIL-OUTLET-NO. SUM11A MOVE WW01-CURR-BPR-TPN TO JLFOA-BASE-PRODUCT-NO. SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOA-LAST-FORCED-DATE. SUM11A MOVE JLF42-ORDER-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOA-ORDER-TYPE. SUM11A SUM11A*----- 27/03/2001 - GM ---------------------------------------* SUM11A MOVE JLF42-ALLOC-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOA-ALLOC-TYPE. SUM11A*-------------------------------------------------------------* SUM11A COMPUTE JLFOA-FCST-ORD-QTY = SUM11A JLF42-FINAL-CASE-QTY(WX10-DATA-SUB1) * SUM11A JLF42-UNIT-SIZE. SUM11A MOVE JLF42-UNIT-SIZE TO JLFOA-UNIT-SIZE. SUM11A MOVE JLF42-APPORTION-PC(WX10-DATA-SUB1) SUM11A TO JLFOA-APPORTIONMENT. SUM11A MOVE JLF42-ALLOC-PATTERN-ID(WX10-DATA-SUB1) SUM11A TO JLFOA-ALL-PATT-ID-GRP. SUM11A MOVE JLF42-NEW-LINE-QTY(WX10-DATA-SUB1) SUM11A TO JLFOA-NEW-ALLOC-QTY. SUM11A SUM11A*----- THE WT10 SUBSCRIPTED ENTRY IS THE SAME AS THE -----------* SUM11A*----- JLF42 SUBSCRIPTED ENTRY ---------------------------------* SUM11A MOVE WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) SUM11A TO JLFOA-FIRST-ORD-TYPE-OF-DAY. SUM11A MOVE WT10-LAST-ORDER(WX10-DATA-SUB1) SUM11A TO JLFOA-LAST-ORDER. SUM11A*---------------------------------------------------------------* SUM11A SUM11A PERFORM Y-400-WRITE-OUTPUT4. SUM11A SUM11A B-C40-EXIT. SUM11A EXIT. SUM11A B-B00-CREATE-OUTPUT SECTION. *---------------------------------------------------------------* * SECTION NAME : B-B00-CREATE-OUTPUT PARTIAL CLONE OF * * FUNCTION : B-800-CREATE-OUTPUT FOR JUST TO CREATE * * : JLFOXIAG RECORDS WITH VALUES FROM JL0F46 * *---------------------------------------------------------------* B-B00. * DISPLAY "B-B00". SET PROCESS-LOOP TO TRUE. MOVE 1 TO WX10-DATA-SUB1. MOVE 1 TO WX10-DATA-SUB2. PERFORM UNTIL END-PROCESS-LOOP IF WX10-DATA-SUB1 = 1 THEN MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO WW01-ORD-CALC-DATE MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO WW01-ORD-CALC-TIME END-IF IF JLF46-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" THEN PERFORM UNTIL JLF46-PER-STR-DATE(WX10-DATA-SUB1) = JLF46-SALES-DATE(WX10-DATA-SUB2) OR WX10-DATA-SUB2 > 50 ADD 1 TO WX10-DATA-SUB2 END-PERFORM IF JLF46-DELY-IND(WX10-DATA-SUB1) = *----- 21/01/2003 - GM ---------------------------------------* * "Y" OR "B" OR "P" OR "E" "Y" OR "B" OR "P" OR "E" OR "S" *-------------------------------------------------------------* OR (JLF46-DELY-IND(WX10-DATA-SUB1) = "N" AND JLF46-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) THEN IF JLF46-PER-STR-DATE(WX10-DATA-SUB1) < WW01-END-EXTRACT-DATE THEN PERFORM B-B20-CREATE-ORD-DIAX END-IF END-IF END-IF ADD 1 TO WX10-DATA-SUB1 IF WX10-DATA-SUB1 > 75 OR JLF46-PER-STR-DATE(WX10-DATA-SUB1) = SPACES THEN SET END-PROCESS-LOOP TO TRUE END-IF END-PERFORM. B-B00-EXIT. EXIT. B-B20-CREATE-ORD-DIAX SECTION. *---------------------------------------------------------------* * SECTION NAME : B-B20-CREATE-ORD-DIAX * * CALLED BY : * * CALLS : * * FUNCTION : 1. CREATES THE OUTPUT FILE OF ORDER DIAGNOSTICS *---------------------------------------------------------------* B-B20. MOVE SPACES TO JLFOX-ALT-DIAG-ORDER-CALC-REC MOVE WW01-CURR-PART-NO TO JLFOX-CR-PART-NO MOVE WW01-CURR-RO-NO TO JLFOX-RETAIL-OUTLET-NO MOVE WW01-CURR-BPR-TPN TO JLFOX-BASE-PRODUCT-NO MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLFOX-DELY-REQ-DATE MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO JLFOX-DELY-REQ-TIME MOVE JLF46-ORDER-TYPE(WX10-DATA-SUB1) TO JLFOX-ORDER-TYPE MOVE 0 TO JLFOX-ORD-REC-TYPE MOVE JLF46-DELY-IND(WX10-DATA-SUB1) TO JLFOX-ORD-CALC-RELTV-DAY SUM09A MOVE JLF46-IN-ROTATE-PERCENT (WX10-DATA-SUB1) 09977000 TO JLFOX-IN-ROTATE-PERC SUM09A MOVE JLF46-STOCK-ROTATE-PERCENT (WX10-DATA-SUB1) 09979000 TO JLFOX-STK-ROTATE-PERC JFM07A MOVE JLF46-ACCEPT-WASTE-PERCENT(WX10-DATA-SUB1) TO JLFOX-ACC-WSTGE-PERC SPR08A MOVE JLF46-WASTE-SENSITIVITY (WX10-DATA-SUB1) TO JLFOX-WASTE-SENSITIVITY AVRS42 MOVE JLF46-CALC-K-FACTOR(WX10-DATA-SUB1) AVRS42 TO JLFOX-K-FACTOR SPR12A MOVE JLF46-DISP-SENSITIVITY SPR12A TO JLFOX-DISP-SENSITIVITY SPR12A MOVE JLF46-FTRE-FILL-TRGT-PC SPR12A TO JLFOX-FTRE-FILL-TRGT-PC SPR12A MOVE WF01-BFFO1TCH TO JLFOX-ONE-TOUCH-PC MOVE WW01-ORD-CALC-DATE TO JLFOX-ORD-CALC-DT MOVE WW01-ORD-CALC-TIME TO JLFOX-ORD-CALC-TM MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLFOX-DMND-ST-DT MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO JLFOX-DMND-ST-TM MOVE JLF46-DMND-END-DT(WX10-DATA-SUB1) TO JLFOX-DMND-END-DT MOVE JLF46-DMND-END-TIME(WX10-DATA-SUB1) TO JLFOX-DMND-END-TM SUM10A MOVE JLF46-RAW-DMND(WX10-DATA-SUB1) SUM10A TO JLFOX-RAW-DMND SUM10A MOVE JLF46-BFFO-ORD-QTY(WX10-DATA-SUB1) SUM10A TO JLFOX-BFFO-ORD-QTY JFM07A MOVE JLF46-SPD-MU(WX10-DATA-SUB1) JFM07A TO JLFOX-SPD-MU JFM07A MOVE JLF46-SPD-SIGMA(WX10-DATA-SUB1) JFM07A TO JLFOX-SPD-SIGMA JFM07A MOVE JLF46-S-MU(WX10-DATA-SUB1) JFM07A TO JLFOX-S-MU JFM07A MOVE JLF46-S-SIGMA(WX10-DATA-SUB1) JFM07A TO JLFOX-S-SIGMA SUM10A MOVE JLF46-LOST-SALES-MU(WX10-DATA-SUB1) SUM10A TO JLFOX-LOST-SALES-MU SUM10A MOVE JLF46-LOST-SALES-SIGMA(WX10-DATA-SUB1) SUM10A TO JLFOX-LOST-SALES-SIGMA SUM10A MOVE JLF46-NO-WASTE-MU(WX10-DATA-SUB1) SUM10A TO JLFOX-NO-WASTE-MU SUM10A MOVE JLF46-NO-WASTE-SIGMA(WX10-DATA-SUB1) SUM10A TO JLFOX-NO-WASTE-SIGMA SUM10A MOVE JLF46-SHELF-DMND(WX10-DATA-SUB1) SUM10A TO JLFOX-SHELF-DMND SUM10A MOVE JLF46-SHELF-MU(WX10-DATA-SUB1) SUM10A TO JLFOX-SHELF-MU SUM10A MOVE JLF46-SHELF-SIGMA(WX10-DATA-SUB1) SUM10A TO JLFOX-SHELF-SIGMA SUM09A MOVE JLF46-ACCEPT-AVAILABILITY (WX10-DATA-SUB1) 10220000 AUT06B TO JLFOX-TRGT-CSL SUM10A MOVE JLF46-WASTE-CONTROL-VALUE(WX10-DATA-SUB1) SUM10A TO JLFOX-AVAILABILITY-LEVEL NJ2S35 MOVE JLF46-WASTE-CONTROL-VER(WX10-DATA-SUB1)(1:3) NJ2S35 TO JLFOX-AVAILABILITY-VER SUM10A MOVE JLF46-ESOH-DP-MU(WX10-DATA-SUB1) SUM10A TO JLFOX-ESOH-DP-MU SUM10A MOVE JLF46-ESOH-DP-SIGMA(WX10-DATA-SUB1) SUM10A TO JLFOX-ESOH-DP-SIGMA SUM10A MOVE JLF46-DAYS-CONSEC-DELY(WX10-DATA-SUB1) SUM10A TO JLFOX-DP-DAYS SUM10A MOVE JLF46-DAYS-PRE-DEMAND(WX10-DATA-SUB1) SUM10A TO JLFOX-PD-DAYS SUM10A MOVE JLF46-EXP-SALES-DP(WX10-DATA-SUB1) SUM10A TO JLFOX-EXP-SALES-DP SUM10A MOVE JLF46-SOLD-STOCK-MU(WX10-DATA-SUB1) SUM10A TO JLFOX-SOLD-STOCK-MU SUM10A MOVE JLF46-SOLD-STOCK-SIGMA(WX10-DATA-SUB1) SUM10A TO JLFOX-SOLD-STOCK-SIGMA SUM10A MOVE JLF46-STARTING-STOCK(WX10-DATA-SUB1) SUM10A TO JLFOX-STARTING-STOCK SUM10A MOVE JLF46-PROCUREMENT-SIGMA(WX10-DATA-SUB1) SUM10A TO JLFOX-PROCUREMENT-SIGMA SET JLFOX-OJX-TABLE-REC TO TRUE PERFORM Y-800-WRITE-JLFODIAX MOVE ZEROS TO WX01-ORY-SUB PERFORM B-B21-CREATE-ORY-DIAX UNTIL WX01-ORY-SUB = JLF46-M-E-A-ARRAY-ROWS JFM07A (WX10-DATA-SUB1) OR WX01-ORY-SUB = +30 JFM07A OR WX01-ORY-SUB = (JLF46-DAYS-PRE-DEMAND JFM07A (WX10-DATA-SUB1) JFM07A + JLF46-CODE-LIFE (WX10-DATA-SUB1)) . B-B20-EXIT. EXIT. B-B21-CREATE-ORY-DIAX SECTION. *---------------------------------------------------------------* MOVE SPACES TO JLFOX-ALT-DIAG-ORDER-CALC-REC ADD +1 TO WX01-ORY-SUB MOVE WW01-CURR-PART-NO TO JLFOX-CR-PART-NO MOVE WW01-CURR-RO-NO TO JLFOX-RETAIL-OUTLET-NO MOVE WW01-CURR-BPR-TPN TO JLFOX-BASE-PRODUCT-NO MOVE JLF46-PER-STR-DATE(WX10-DATA-SUB1) TO JLFOX-DELY-REQ-DATE MOVE JLF46-PER-STR-TIME(WX10-DATA-SUB1) TO JLFOX-DELY-REQ-TIME MOVE JLF46-ORDER-TYPE(WX10-DATA-SUB1) TO JLFOX-ORDER-TYPE MOVE 0 TO JLFOX-ORD-REC-TYPE SET JLFOX-OJY-TABLE-REC TO TRUE MOVE WX01-ORY-SUB TO JLFOX-ORD-CALC-RELTV-DAY JFM07A MOVE JLF46-STOCK-EXPIRE-ON-DAY(WX10-DATA-SUB1, JFM07A WX01-ORY-SUB) TO JLFOX-DAY-STK-EXPIRE JFM07A MOVE JLF46-MAX-STOCK-ON-HAND(WX10-DATA-SUB1, JFM07A WX01-ORY-SUB) TO JLFOX-MAX-SOH JFM07A MOVE JLF46-EXPECTED-DAILY-SALES(WX10-DATA-SUB1, JFM07A WX01-ORY-SUB) TO JLFOX-EXP-DAILY-SALES SPR14A MOVE JLF46-STOCK-EXPIRE-ON-DAY-OLD(WX10-DATA-SUB1, SPR14A WX01-ORY-SUB) SPR14A TO JLFOX-OLD-STK-EXPIRE SPR14A MOVE JLF46-POT-REDN-SALES(WX10-DATA-SUB1, SPR14A WX01-ORY-SUB) SPR14A TO JLFOX-POT-REDN-SALES PS2S11 IF JLF46-ORDR-FUT-UNCERTN-IND = "Y" PS2S11 MOVE JLF46-FCST-NWS(WX10-DATA-SUB1,WX01-ORY-SUB) PS2S11 TO JLFOX-FCST-NWS PS2S11 ELSE PS2S11 MOVE -99999.99 TO JLFOX-FCST-NWS PS2S11 END-IF PERFORM Y-800-WRITE-JLFODIAX . B-B21-EXIT. EXIT. SUM11A B-D00-CREATE-OUTPUT SECTION. SUM11A*---------------------------------------------------------------* SUM11A* SECTION NAME : B-D00-CREATE-OUTPUT PARTIAL CLONE OF * SUM11A* FUNCTION : B-800-CREATE-OUTPUT FOR JUST TO CREATE * SUM11A* : JLFOXIAG RECORDS WITH VALUES FROM JL0F42 * SUM11A*---------------------------------------------------------------* SUM11A B-D00. SUM11A SUM11A SET PROCESS-LOOP TO TRUE. SUM11A MOVE 1 TO WX10-DATA-SUB1. SUM11A MOVE 1 TO WX10-DATA-SUB2. SUM11A SUM11A PERFORM UNTIL END-PROCESS-LOOP SUM11A SUM11A IF WX10-DATA-SUB1 = 1 SUM11A THEN SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO WW01-ORD-CALC-DATE SUM11A MOVE JLF42-PER-STR-TIME(WX10-DATA-SUB1) SUM11A TO WW01-ORD-CALC-TIME SUM11A END-IF SUM11A IF JLF42-PERIOD-CALC-TYPE(WX10-DATA-SUB1) = "D" SUM11A THEN SUM11A PERFORM UNTIL JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A = JLF42-SALES-DATE(WX10-DATA-SUB2) SUM11A OR WX10-DATA-SUB2 > 50 SUM11A ADD 1 TO WX10-DATA-SUB2 SUM11A END-PERFORM SUM11A IF JLF42-DELY-IND(WX10-DATA-SUB1) = SUM11A*----- 21/01/2003 - GM ---------------------------------------* SUM11A* "Y" OR "B" OR "P" OR "E" SUM11A "Y" OR "B" OR "P" OR "E" OR "S" SUM11A*-------------------------------------------------------------* SUM11A OR SUM11A (JLF42-DELY-IND(WX10-DATA-SUB1) = "N" SUM11A AND JLF42-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) SUM11A THEN SUM11A IF JLF42-PER-STR-DATE(WX10-DATA-SUB1) < SUM11A WW01-END-EXTRACT-DATE SUM11A THEN SUM11A PERFORM B-D20-CREATE-ORD-DIAH SUM11A END-IF END-IF END-IF SUM11A ADD 1 TO WX10-DATA-SUB1 SUM11A IF WX10-DATA-SUB1 > 75 SUM11A OR JLF42-PER-STR-DATE(WX10-DATA-SUB1) = SPACES SUM11A THEN SUM11A SET END-PROCESS-LOOP TO TRUE SUM11A END-IF SUM11A END-PERFORM. SUM11A B-D00-EXIT. SUM11A EXIT. SUM11A B-D20-CREATE-ORD-DIAH SECTION. SUM11A*--------------------------------------------------------------* SPR12A* SECTION NAME : B-D20-CREATE-ORD-DIAH * SUM11A* CALLED BY : * SUM11A* CALLS : * SUM11A* FUNCTION : 1. CREATES THE OUTPUT FILE OF ORDER DIAGNOSTICS SUM11A*--------------------------------------------------------------* SUM11A B-D20. SUM11A MOVE SPACES TO JLFOH-ALT-DIAG-ORDER-CALC-REC SUM11A MOVE WW01-CURR-PART-NO TO JLFOH-CR-PART-NO SUM11A MOVE WW01-CURR-RO-NO TO JLFOH-RETAIL-OUTLET-NO SUM11A MOVE WW01-CURR-BPR-TPN TO JLFOH-BASE-PRODUCT-NO SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOH-DELY-REQ-DATE SUM11A MOVE JLF42-ORDER-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOH-ORDER-TYPE SUM11A MOVE 0 TO JLFOH-ORD-REC-TYPE SUM11A MOVE JLF42-K-FACTOR TO JLFOH-K-FACTOR SPR12A MOVE JLF42-DSR-SHLF-FILL-PC(WX10-DATA-SUB1) SPR12A TO JLFOH-DSR-SHLF-FILL-PC SUM11A MOVE WW01-ORD-CALC-DATE TO JLFOH-ORD-CALC-DT SUM11A MOVE WW01-ORD-CALC-TIME TO JLFOH-ORD-CALC-TM SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOH-DELY-REQ-DATE SUM11A MOVE JLF42-WASTE-CONTROL-VALUE(WX10-DATA-SUB1) SUM11A TO JLFOH-AVAILABILITY-LEVEL NJ2S35 MOVE JLF42-WASTE-CONTROL-VER(WX10-DATA-SUB1)(4:3) NJ2S35 TO JLFOH-AVAILABILITY-VER SUM11A MOVE JLF42-MAX-DAYS-COVER (WX10-DATA-SUB1) SUM11A TO JLFOH-MAX-DAYS-COVER 142S02 MOVE JLF42-MAX-DAYS-COVER-CAP (WX10-DATA-SUB1) 142S02 TO JLFOH-MAX-DAYS-COVER-CAP 142S02 MOVE JLF41-BACKROOM-SENS-VAL (WX10-DATA-SUB1) 142S02 TO JLFOH-BKRM-SENS-VAL 142S03 MOVE JLF42-LSAB (WX10-DATA-SUB1) 142S03 TO JLFOH-LSAB 142S03 MOVE JLF42-BKRM-IMPACT (WX10-DATA-SUB1) 142S03 TO JLFOH-BKRM-IMPACT SUM11A MOVE JLF42-ONE-TOUCH-PC (WX10-DATA-SUB1) SUM11A TO JLFOH-ONE-TOUCH SUM11A MOVE JLF42-MIN-AVAIL-PC(WX10-DATA-SUB1) SUM11A TO JLFOH-MIN-AVAILABILITY SUM11A MOVE JLF42-MIN-SNGLS (WX10-DATA-SUB1) SUM11A TO JLFOH-MIN-SNGLS SUM11A MOVE JLF42-MIN-CASE-PC(WX10-DATA-SUB1) SUM11A TO JLFOH-MIN-CASE SUM11A MOVE JLF42-MIN-DAYS-COVER (WX10-DATA-SUB1) SUM11A TO JLFOH-MIN-DAYS-COVER SUM11A MOVE JLF42-BGO-AVAILBLTY-ORDER(WX10-DATA-SUB1) SUM11A TO JLFOH-AVAILABILITY-ORDER SUM11A MOVE JLF42-BGO-ORD-QTY(WX10-DATA-SUB1) SUM11A TO JLFOH-BGO-ORD-QTY SUM11A MOVE JLF42-LOST-SALES-MU(WX10-DATA-SUB1) SUM11A TO JLFOH-LOST-SALES-MU SUM11A MOVE JLF42-LOST-SALES-SIGMA(WX10-DATA-SUB1) SUM11A TO JLFOH-LOST-SALES-SIGMA SUM11A MOVE JLF42-SHELF-MU(WX10-DATA-SUB1) SUM11A TO JLFOH-SHELF-MU SUM11A MOVE JLF42-SHELF-SIGMA(WX10-DATA-SUB1) SUM11A TO JLFOH-SHELF-SIGMA SUM11A MOVE JLF42-SOH-DP-MU(WX10-DATA-SUB1) SUM11A TO JLFOH-ESOH-DP-MU SUM11A MOVE JLF42-SOH-DP-SIGMA(WX10-DATA-SUB1) SUM11A TO JLFOH-ESOH-DP-SIGMA SUM11A MOVE JLF42-INTRVL-CONSEC-DELY(WX10-DATA-SUB1) SUM11A TO JLFOH-DP-DAYS SUM11A MOVE JLF42-INTRVL-PRE-DEMAND(WX10-DATA-SUB1) SUM11A TO JLFOH-PD-DAYS SUM11A MOVE JLF42-EXP-SALES-DP-MU(WX10-DATA-SUB1) SUM11A TO JLFOH-EXP-SALES-DP-MU SUM11A MOVE JLF42-EXP-SALES-DP-SIGMA(WX10-DATA-SUB1) SUM11A TO JLFOH-EXP-SALES-DP-SIGMA SUM11A MOVE JLF42-SOLD-STOCK-MU(WX10-DATA-SUB1) SUM11A TO JLFOH-SOLD-STOCK-MU SUM11A MOVE JLF42-SOLD-STOCK-SIGMA(WX10-DATA-SUB1) SUM11A TO JLFOH-SOLD-STOCK-SIGMA SUM11A MOVE JLF42-STARTING-STOCK(WX10-DATA-SUB1) SUM11A TO JLFOH-STARTING-STOCK SUM11A MOVE JLF42-PROCUREMENT-SIGMA(WX10-DATA-SUB1) SUM11A TO JLFOH-PROCUREMENT-SIGMA SUM11A MOVE JLF42-INTRVL-LEADTIME-DELY(WX10-DATA-SUB1) SUM11A TO JLFOH-CALC-LEAD-TM SUM11A MOVE JLF42-MAX-DAYS-COVER-SLS(WX10-DATA-SUB1) SUM11A TO JLFOH-MAX-COVER-SALES SUM11A MOVE JLF42-MIN-DAYS-COVER-SLS(WX10-DATA-SUB1) SUM11A TO JLFOH-MIN-COVER-SALES SUM11A MOVE JLF42-MIN-DISPLAY(WX10-DATA-SUB1) SUM11A TO JLFOH-MIN-DISPLAY SPR12A IF JLF42-DELY-IND(WX10-DATA-SUB1) = "P" OR "B" SPR12A MOVE JLF42-ALT-MERCH-UNITS(WX10-DATA-SUB1) TO JLFOH-ALT-MERCH-UNITS SPR12A ELSE SPR12A MOVE 0 TO JLFOH-ALT-MERCH-UNITS SPR12A END-IF SPR12A MOVE JLF42-DSR-SHLF-FILL-ORD(WX10-DATA-SUB1) SPR12A TO JLFOH-DSR-SHLF-FILL-ORD SUM12A COMPUTE JLFOH-CALC-LEAD-TM-24 ROUNDED = SUM12A JLF42-LEAD-TIME-HRS / 24 SUM12B MOVE JLF42-NOTNL-CALC-DATE(WX10-DATA-SUB1) SUM12B TO JLFOH-NOTNL-CALC-DATE SPR13B MOVE WW26-FILLER-STOCK TO JLFOH-FILLR-STOCK SPR13B IF JL01X-RUN-ID ="9" SPR13B MOVE JLF42-BGO-FILLER-STOCK(WX10-DATA-SUB1) SPR13B TO JLFOH-FILLR-STOCK SPR13B END-IF SUM13B MOVE JLF42-ADD-SHELF-CAP-FLEX(WX10-DATA-SUB1) SUM13B TO JLFOH-ADD-SHELF-CAP-FLEX SUM13B MOVE JLF42-ADD-SHELF-CAP(WX10-DATA-SUB1) SUM13B TO JLFOH-ADD-SHELF-CAP SUM13B MOVE JLF42-RATIO-PACK-CAP(WX10-DATA-SUB1) SUM13B TO JLFOH-RATIO-PACK-CAP SUM13B MOVE JLF42-RATIO-PACK-CTL-FTR(WX10-DATA-SUB1) SUM13B TO JLFOH-RATIO-PK-CTL-FTR SUM13B MOVE JLF42-EST-SALES-NEXT-RP-DEL(WX10-DATA-SUB1) SUM13B TO JLFOH-EXP-SALES-RP-DEL SUM13B MOVE JLF42-NXT-RP-DEL-DT(WX10-DATA-SUB1) SUM13B TO JLFOH-NXT-RP-DEL-DT SUM11A SET JLFOH-OJG-TABLE-REC TO TRUE SUM11A PERFORM Y-900-WRITE-JLFODIAH SUM11A MOVE ZEROS TO WX01-ORH-SUB SUM11A PERFORM B-D21-CREATE-ORH-DIAH SUM11A UNTIL WX01-ORH-SUB = JLF42-M-A-ARRAY-ROWS SUM11A (WX10-DATA-SUB1) SUM11A OR WX01-ORH-SUB = +30 SUM11A OR WX01-ORH-SUB = (JLF42-INTRVL-PRE-DEMAND SUM11A (WX10-DATA-SUB1) SUM11A + JLF42-INTRVL-CONSEC-DELY (WX10-DATA-SUB1)) SUM11A . SUM11A B-D20-EXIT. SUM11A EXIT. SUM11A B-D21-CREATE-ORH-DIAH SECTION. *---------------------------------------------------------------* SUM11A MOVE SPACES TO JLFOH-ALT-DIAG-ORDER-CALC-REC SUM11A ADD +1 TO WX01-ORH-SUB SUM11A MOVE WW01-CURR-PART-NO TO JLFOH-CR-PART-NO SUM11A MOVE WW01-CURR-RO-NO TO JLFOH-RETAIL-OUTLET-NO SUM11A MOVE WW01-CURR-BPR-TPN TO JLFOH-BASE-PRODUCT-NO SUM11A MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) SUM11A TO JLFOH-DELY-REQ-DATE SUM11A MOVE JLF42-ORDER-TYPE(WX10-DATA-SUB1) SUM11A TO JLFOH-ORDER-TYPE SUM11A MOVE 0 TO JLFOH-ORD-REC-TYPE SUM11A SET JLFOH-OJH-TABLE-REC TO TRUE SUM11A MOVE JLF42-MAX-STOCK-ON-HAND(WX10-DATA-SUB1, SUM11A WX01-ORH-SUB) SUM11A TO JLFOH-MAX-SOH SUM11A MOVE JLF42-EXPECTED-DAILY-SALES(WX10-DATA-SUB1, SUM11A WX01-ORH-SUB) SUM11A TO JLFOH-EXP-DAILY-SALES SUM11A PERFORM Y-900-WRITE-JLFODIAH SUM11A SUM11A . SUM11A B-D21-EXIT. SUM11A EXIT. RD2S19 B-E00-CREATE-UNCCAL SECTION. RD2S19*---------------------------------------------------------------* RD2S19* SECTION NAME : B-C00-CREATE-OUTPUT CLONE OF * RD2S19* : B-A00-CREATE-OUTPUT FOR JL0F42 * RD2S19* CALLED BY : * RD2S19* CALLS : * RD2S19* FUNCTION : 1. CREATES JLF30O11 UNCERTAINTY INPUT FILE * RD2S19*---------------------------------------------------------------* RD2S19 B-E00. RD2S19 RD2S19 SET PROCESS-LOOP TO TRUE. RD2S19 MOVE 1 TO WX10-DATA-SUB1. RD2S19 MOVE 1 TO WX10-DATA-SUB2. RD2S19 RD2S19 PERFORM UNTIL END-PROCESS-LOOP RD2S19 RD2S19 IF WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) = "C" RD2S19 AND JL01X-RUN-ID ="9" RD2S19 PERFORM UNTIL WT10-DELY-REQ-DATE(WX10-DATA-SUB1) RD2S19 = JLF42-SALES-DATE(WX10-DATA-SUB2) RD2S19 OR WX10-DATA-SUB2 > 50 RD2S19 ADD 1 TO WX10-DATA-SUB2 RD2S19 END-PERFORM RD2S19 PERFORM B-E10-WRITE-INTIAL-RECORD RD2S19 END-IF RD2S19 RD2S19 IF WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) = "D" RD2S19 AND JL01X-RUN-ID ="9" RD2S19 THEN RD2S19 PERFORM UNTIL WT10-DELY-REQ-DATE(WX10-DATA-SUB1) RD2S19 = JLF42-SALES-DATE(WX10-DATA-SUB2) RD2S19 OR WX10-DATA-SUB2 > 50 RD2S19 ADD 1 TO WX10-DATA-SUB2 RD2S19 END-PERFORM RD2S19 PERFORM B-E20-CREATE-UNCINP RD2S19 END-IF RD2S19 RD2S19 ADD 1 TO WX10-DATA-SUB1 RD2S19 RD2S19 IF WX10-DATA-SUB1 > 75 RD2S19 OR JLF42-PER-STR-DATE(WX10-DATA-SUB1) = SPACES RD2S19 THEN RD2S19 SET END-PROCESS-LOOP TO TRUE RD2S19 END-IF RD2S19 RD2S19 END-PERFORM. RD2S19 RD2S19 B-E00-EXIT. RD2S19 EXIT. RD2S19 B-E10-WRITE-INTIAL-RECORD SECTION. RD2S19*---------------------------------------------------------------* RD2S19* SECTION NAME : B-E10-WRITE-INTIAL-RECORD * RD2S19* CALLED BY : * RD2S19* CALLS : * RD2S19* FUNCTION : 1. CREATES THE OUTPUT FILE OF UNCER CALC INP * RD2S19*---------------------------------------------------------------* RD2S19 B-E10. RD2S19 MOVE WW01-CURR-PART-NO TO JLUNC-CR-PART-NO RD2S19 MOVE WW01-CURR-RO-NO TO JLUNC-RETAIL-OUTLET-NO RD2S19 MOVE WW01-CURR-BPR-TPN TO JLUNC-BASE-PRODUCT-NO RD2S19 MOVE WT10-ORDER-GROUP TO JLUNC-ORDER-GROUP RD2S19 RD2S19 MOVE WT10-ORDER-TYPE(WX10-DATA-SUB1) RD2S19 TO JLUNC-ORDER-TYPE RD2S19 MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) RD2S19 TO JLUNC-DELY-REQ-DATE RD2S19 MOVE WT10-DELY-REQ-TIME(WX10-DATA-SUB1) RD2S19 TO JLUNC-DELY-REQ-TIME RD2S19 MOVE WT10-STOCK-CENTRE-NO(WX10-DATA-SUB1) 12550000 RD2S19 TO JLUNC-STOCK-CENTRE-NO RD2S19 MOVE SPACES TO JLUNC-NOTNL-CALC-DT RD2S19 MOVE SPACES TO JLUNC-NOTNL-CALC-TM 12500000 RD2S19 MOVE SPACES TO JLUNC-DELY-IND 12510000 RD2S19 MOVE ZEROS TO JLUNC-DP-DAYS RD2S19 MOVE ZEROS TO JLUNC-PD-DAYS RD2S19 MOVE WT80-DAY-FCST-SALES(WX10-DATA-SUB2) RD2S19 TO JLUNC-EXP-SALES RD2S19 MOVE ZEROS TO JLUNC-K-FACTOR RD2S19*---------------------------------------------------------------* RD2S19 RD2S19 PERFORM Y-1000-WRITE-JLUNCCAL. RD2S19 RD2S19 B-E10-EXIT. RD2S19 EXIT. RD2S19 B-E20-CREATE-UNCINP SECTION. RD2S19*---------------------------------------------------------------* RD2S19* SECTION NAME : B-E20-CREATE-UNCINP * RD2S19* CALLED BY : * RD2S19* CALLS : * RD2S19* FUNCTION : 1. CREATES THE OUTPUT FILE OF UNCER CALC INP * RD2S19*---------------------------------------------------------------* RD2S19 B-E20. RD2S19 MOVE WW01-CURR-PART-NO TO JLUNC-CR-PART-NO RD2S19 MOVE WW01-CURR-RO-NO TO JLUNC-RETAIL-OUTLET-NO RD2S19 MOVE WW01-CURR-BPR-TPN TO JLUNC-BASE-PRODUCT-NO RD2S19 MOVE WT10-ORDER-GROUP TO JLUNC-ORDER-GROUP RD2S19 RD2S19 MOVE WT10-ORDER-TYPE(WX10-DATA-SUB1) RD2S19 TO JLUNC-ORDER-TYPE RD2S19 MOVE JLF42-PER-STR-DATE(WX10-DATA-SUB1) RD2S19 TO JLUNC-DELY-REQ-DATE RD2S19 MOVE JLF42-PER-STR-TIME(WX10-DATA-SUB1) RD2S19 TO JLUNC-DELY-REQ-TIME RD2S19 MOVE WT10-STOCK-CENTRE-NO(WX10-DATA-SUB1) 12550000 RD2S19 TO JLUNC-STOCK-CENTRE-NO RD2S19 MOVE WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1) RD2S19 TO JLUNC-NOTNL-CALC-DT RD2S19 MOVE WT10-NOTNL-CALC-TIME(WX10-DATA-SUB1) 12500000 RD2S19 TO JLUNC-NOTNL-CALC-TM 12510000 RD2S19 IF WT10-DELY-IND(WX10-DATA-SUB1) = RD2S19 "Y" OR "B" OR "P" OR "E" OR "S" RD2S19 OR RD2S19 (WT10-DELY-IND(WX10-DATA-SUB1) = "N" RD2S19 AND JLF42-CUST-ORD-QTY(WX10-DATA-SUB1) > 0) RD2S19 THEN RD2S19 MOVE "Y" TO JLUNC-DELY-IND RD2S19 ELSE RD2S19 MOVE WT10-DELY-IND(WX10-DATA-SUB1) RD2S19 TO JLUNC-DELY-IND RD2S19 END-IF RD2S19 MOVE JLF42-INTRVL-CONSEC-DELY(WX10-DATA-SUB1) RD2S19 TO JLUNC-DP-DAYS RD2S19 MOVE JLF42-INTRVL-PRE-DEMAND(WX10-DATA-SUB1) RD2S19 TO JLUNC-PD-DAYS RD2S19 MOVE WT80-DAY-FCST-SALES(WX10-DATA-SUB2) RD2S19 TO JLUNC-EXP-SALES RD2S19 MOVE JLF42-K-FACTOR TO JLUNC-K-FACTOR RD2S19*---------------------------------------------------------------* RD2S19 RD2S19 PERFORM Y-1000-WRITE-JLUNCCAL. RD2S19 RD2S19 B-E20-EXIT. RD2S19 EXIT. 219500 B-999-DUMP-REJECTS SECTION. 21950000 219600*---------------------------------------------------------------* 21960000 219700* SECTION NAME : B-999-DUMP-REJECTS * 21970000 219800* CALLED BY : B-300-PROCESS-RO-TPN * 21980000 319400* CALLS : Y-500-WRITE-FORECAST-REJECT * 319500* : Y-600-WRITE-CONTROL-REJECT * 220100* FUNCTION : 1. WRITE REJECT FILES FROM W-S TABLES * 22010000 220200* : WT10- AND JLF40LNK. * 22020000 220300*---------------------------------------------------------------* 22030000 220400 B-999. 22040000 583200* DISPLAY "B-999". 58320018 220600 IF WW01-HEADER-RECS-IN > 0 22060000 220610 THEN 22061000 220620 MOVE WT10-HEADER-REC 22062000 220630 TO WR05-REJECT-FORECAST-REC 22063000 320500 PERFORM Y-500-WRITE-FORECAST-REJECT 220650 END-IF. 22065000 220660 22066000 220670 IF WW01-FORECAST-RECS-IN > 0 22067000 220680 THEN 22068000 220690 SET PROCESS-LOOP TO TRUE 22069000 220700 MOVE 1 TO WX10-DATA-SUB1 22070000 220800 22080000 220900 PERFORM UNTIL END-PROCESS-LOOP 22090000 221000 22100000 221100 IF WX10-DATA-SUB1 >= 50 OR 22110000 221200 WT10-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES 22120000 221300 THEN 22130000 221400 SET END-PROCESS-LOOP TO TRUE 22140000 221500 ELSE 22150000 221600 MOVE WT10-PERIOD-ROW(WX10-DATA-SUB1) 22160000 221610 TO WR05-REJECT-FORECAST-REC 22161000 221620 22162000 322300 PERFORM Y-500-WRITE-FORECAST-REJECT 221640 22164000 221650 ADD 1 TO WX10-DATA-SUB1 22165000 221660 END-IF 22166000 221670 22167000 221680 END-PERFORM 22168000 221690 22169000 221700 END-IF. 22170000 221800 22180000 221900 IF WW01-CONTROL-RECS-IN > 0 22190000 222000 THEN 22200000 222100 SET PROCESS-LOOP TO TRUE 22210000 222200 MOVE 1 TO WX10-DATA-SUB1 22220000 222300 22230000 222400 PERFORM UNTIL END-PROCESS-LOOP 22240000 222500 22250000 222600 IF WX10-DATA-SUB1 >= 50 22260000 222700 OR WT20-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES 22270000 222800 THEN 22280000 222900 SET END-PROCESS-LOOP TO TRUE 22290000 223000 ELSE 22300000 223100 MOVE WT20-PERIOD-ROW(WX10-DATA-SUB1) 22310000 223200 TO WR06-REJECT-CONTROL-REC 22320000 223300 22330000 324700 PERFORM Y-600-WRITE-CONTROL-REJECT 223500 22350000 223600 ADD 1 TO WX10-DATA-SUB1 22360000 223700 END-IF 22370000 223800 22380000 223900 END-PERFORM 22390000 224000 22400000 224100 END-IF. 22410000 224200 22420000 224300 B-999-EXIT. 22430000 224400 EXIT. 22440000 224500 22450000 224600 C-100-TERMINATE SECTION. 22460000 224700*---------------------------------------------------------------* 22470000 224800* SECTION NAME : C-100-TERMINATE * 22480000 224900* CALLED BY : A-010-MAIN * 22490000 225000* CALLS : B-300-LOAD-CNP * 22500000 225200* : B-600-RESET-DATA * 22520000 225300* : JLMSG-DISPLAY-MESSAGE * 22530000 225400* : V-160-SELECT-VXJJ0BPR * 22540000 225500* FUNCTION : 1. PROCESSES THE LAST WT10 WORK TABLE OF DATA * 22550000 225600* : 2. OUTPUTS RECORD SUMMARY COUNTS * 22560000 225700* : 3. CLOSES THE INPUT,OUTPUT AND REJECT FILES * 22570000 225800*---------------------------------------------------------------* 22580000 C-100. 226100* PROCESS LAST WORK TABLE FULL OF DATA IF THERE IS ANY. 22610000 226300 PERFORM B-300-PROCESS-RO-TPN. 22630000 226500* OUTPUT RUNSTATS FOR THE JOB BEFORE ENDING. 22650000 226700 SET JLMSG-I97-RECORD-SUMMARY 22670000 226800 JLMSG-I97-READ TO TRUE 22680000 226900 MOVE WF01-JLF30I01 TO JLMSG-I97-FILE-NAME 22690000 227000 MOVE WA01-RECS-INPUT TO JLMSG-I97-REC-COUNT 22700000 PERFORM JLMSG-DISPLAY-MESSAGE 12855079 61300000 WIN06B SET JLMSG-I97-RECORD-SUMMARY 42620000 227400 JLMSG-I97-READ TO TRUE 22740000 425800 MOVE WF01-JLF30I04 TO JLMSG-I97-FILE-NAME 42580000 425900 MOVE WA01-RECS-INPUT4 TO JLMSG-I97-REC-COUNT 42590000 WIN06B PERFORM JLMSG-DISPLAY-MESSAGE 61290011 WIN06B 61300000 WIN06A SET JLMSG-I97-RECORD-SUMMARY 12740049 426300 JLMSG-I97-READ TO TRUE 42630000 612700 MOVE WF01-JLF30I05 TO JLMSG-I97-FILE-NAME 61270011 612800 MOVE WA01-RECS-JLALRESV TO JLMSG-I97-REC-COUNT 61280011 PERFORM JLMSG-DISPLAY-MESSAGE 12855079 61300000 613100 SET JLMSG-I97-RECORD-SUMMARY 61310000 WIN06B JLMSG-I97-READ TO TRUE 42630000 WIN06B MOVE WF01-JLF30I07 TO JLMSG-I97-FILE-NAME 61270011 WIN06B MOVE WA01-RECS-JLDOTCOM TO JLMSG-I97-REC-COUNT 61280011 227700 PERFORM JLMSG-DISPLAY-MESSAGE 22770000 227800 22780000 227801 SET JLMSG-I97-RECORD-SUMMARY 22780110 JLMSG-I97-READ TO TRUE 12510049 MOVE WF01-JLF30I08 TO JLMSG-I97-FILE-NAME 12520049 MOVE WA01-DOTCOM-SALES TO JLMSG-I97-REC-COUNT 12530049 PERFORM JLMSG-DISPLAY-MESSAGE 12540049 12850049 WIN06A MOVE WA01-DOTCOM-SUBSTN TO WM38-DOTCOM-SALES-CNT MOVE WM38-DOTCOM-SALES-SUBSTNS TO JLMSG-TEXT 227805 PERFORM JLMSG-DISPLAY-MESSAGE 22780510 227806 22780610 227810 SET JLMSG-I97-RECORD-SUMMARY 22781010 JLMSG-I97-READ TO TRUE 12510049 MOVE WF01-JLF30I09 TO JLMSG-I97-FILE-NAME 12520049 MOVE WA01-RECS-JLFOLKUP TO JLMSG-I97-REC-COUNT 12530049 227700 PERFORM JLMSG-DISPLAY-MESSAGE 22770000 227900 SET JLMSG-I97-RECORD-SUMMARY 22790000 JLMSG-I97-READ TO TRUE 12510049 MOVE WF01-JLF30I10 TO JLMSG-I97-FILE-NAME 12520049 MOVE WA01-RECS-JLFOEXCP TO JLMSG-I97-REC-COUNT 12530049 228450 PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 AVRDEL PERFORM CX-I11--I12-STATS 228460 22846010 AVRS32 SET JLMSG-I97-RECORD-SUMMARY 43710000 AVRS32 JLMSG-I97-READ TO TRUE 12510049 AVRS32 MOVE WF01-JLF30I13 TO JLMSG-I97-FILE-NAME 12520049 AVRS32 MOVE WA01-RECS-JLFOREFD TO JLMSG-I97-REC-COUNT 12530049 AVRS32 PERFORM JLMSG-DISPLAY-MESSAGE 22845010 AVRS32 22846010 228500 SET JLMSG-I91-ROW-SUMMARY 22850000 228600 JLMSG-I91-SELECTED TO TRUE 22860000 228430 MOVE WF01-VXJJ0ALL TO JLMSG-I91-TABLE-NAME 22843010 228440 MOVE WA01-ALL-FETCHED TO JLMSG-I91-ROW-COUNT 22844010 SPR13A PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 228500 SET JLMSG-I91-ROW-SUMMARY 22850000 228600 JLMSG-I91-SELECTED TO TRUE 22860000 228700 MOVE WF01-VXJJ0ALP TO JLMSG-I91-TABLE-NAME 22870000 228800 MOVE WA01-ALP-FETCHED TO JLMSG-I91-ROW-COUNT 22880000 228450 PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 361500 SET JLMSG-I91-ROW-SUMMARY 361600 JLMSG-I91-SELECTED TO TRUE 43728200 361700 MOVE WF01-VXJJ0ASF TO JLMSG-I91-TABLE-NAME 43728300 361800 MOVE WA01-ASF-FETCHED TO JLMSG-I91-ROW-COUNT 43728400 228900 PERFORM JLMSG-DISPLAY-MESSAGE 22890000 437000 43700000 600500 SET JLMSG-I91-ROW-SUMMARY 60050013 600600 JLMSG-I91-SELECTED TO TRUE 60060013 600700 MOVE "BD_RSVE_CURSOR" TO JLMSG-I91-TABLE-NAME 60070013 600800 MOVE WA01-BD-RSVE-CURSOR-ROW-COUNT TO JLMSG-I91-ROW-COUNT 60080013 600900 PERFORM JLMSG-DISPLAY-MESSAGE. 60090013 601000 60100013 229100 SET JLMSG-I91-ROW-SUMMARY 22910000 229200 JLMSG-I91-SELECTED TO TRUE 22920000 229300 MOVE WF01-VXJJ0BDL TO JLMSG-I91-TABLE-NAME 22930000 229400 MOVE WA01-BDL-FETCHED TO JLMSG-I91-ROW-COUNT 22940000 229500 PERFORM JLMSG-DISPLAY-MESSAGE 22950000 613100 SET JLMSG-I91-ROW-SUMMARY 61310000 613200 JLMSG-I91-SELECTED TO TRUE 61320000 227500 MOVE WF01-VXJJ0BPR TO JLMSG-I91-TABLE-NAME 22750010 227600 MOVE WA01-BPR-FETCHED TO JLMSG-I91-ROW-COUNT 22760010 228450 PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 437100 SET JLMSG-I91-ROW-SUMMARY 43710000 437200 JLMSG-I91-SELECTED TO TRUE 43720000 228100 MOVE WF01-VXJJ0BSP TO JLMSG-I91-TABLE-NAME 22810000 228200 MOVE WA01-BSP-FETCHED TO JLMSG-I91-ROW-COUNT 22820000 228450 PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 333300 SET JLMSG-I91-ROW-SUMMARY CRV90B JLMSG-I91-SELECTED TO TRUE SPR13A MOVE WF01-VXJJ0ESP TO JLMSG-I91-TABLE-NAME 22810000 SPR13A MOVE WA01-ESP-FETCHED TO JLMSG-I91-ROW-COUNT 22820000 SPR13A PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 333300 SET JLMSG-I91-ROW-SUMMARY CRV90B JLMSG-I91-SELECTED TO TRUE 228100 MOVE WF01-VXJJ0SFB TO JLMSG-I91-TABLE-NAME 22810000 228200 MOVE WA01-SFB-FETCHED TO JLMSG-I91-ROW-COUNT 22820000 228450 PERFORM JLMSG-DISPLAY-MESSAGE 22845010 228460 22846010 333300 SET JLMSG-I91-ROW-SUMMARY CRV90B JLMSG-I91-SELECTED TO TRUE CRV90B MOVE WF01-VXJJ0DSF TO JLMSG-I91-TABLE-NAME CRV90B MOVE WA01-DSF-FETCHED TO JLMSG-I91-ROW-COUNT 228900 PERFORM JLMSG-DISPLAY-MESSAGE 22890000 229700 SET JLMSG-I91-ROW-SUMMARY 22970000 332800 JLMSG-I91-SELECTED TO TRUE 43728200 332900 MOVE WF01-VXJJ0OGP TO JLMSG-I91-TABLE-NAME 43728300 361200 MOVE WA01-OGP-FETCHED TO JLMSG-I91-ROW-COUNT 43728400 229500 PERFORM JLMSG-DISPLAY-MESSAGE 22950000 436500 SET JLMSG-I91-ROW-SUMMARY 43650000 436600 JLMSG-I91-SELECTED TO TRUE 43660000 436700 MOVE WF01-VXJJ0OLC TO JLMSG-I91-TABLE-NAME 43670000 436800 MOVE WA01-OLC-READ TO JLMSG-I91-ROW-COUNT 43680000 361300 PERFORM JLMSG-DISPLAY-MESSAGE 361400 227810 SET JLMSG-I91-ROW-SUMMARY 22781010 227820 JLMSG-I91-SELECTED TO TRUE 22782010 227500 MOVE WF01-VXJJ0OLD TO JLMSG-I91-TABLE-NAME 22750000 227600 MOVE WA01-OLD-FETCHED TO JLMSG-I91-ROW-COUNT 22760000 227700 PERFORM JLMSG-DISPLAY-MESSAGE 22770000 333300 SET JLMSG-I91-ROW-SUMMARY CRV10B JLMSG-I91-SELECTED TO TRUE CRV10B MOVE WF01-VXJJ1OJD TO JLMSG-I91-TABLE-NAME CRV10B MOVE WA01-PRIMARY-OJD-FETCHED TO JLMSG-I91-ROW-COUNT CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 CRV10B SET JLMSG-I91-ROW-SUMMARY CRV10B JLMSG-I91-SELECTED TO TRUE CRV10B MOVE WF01-VXJJ2OJD TO JLMSG-I91-TABLE-NAME CRV10B MOVE WA01-SECONDARY-OJD-FETCHED TO JLMSG-I91-ROW-COUNT CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 437280*----- 27/03/2001 - GM ---------------------------------------* 43728000 437281 SET JLMSG-I91-ROW-SUMMARY 43728100 437282 JLMSG-I91-SELECTED TO TRUE 43728200 437283 MOVE WF01-VXJJ0MMD TO JLMSG-I91-TABLE-NAME 43728300 437284 MOVE WA01-MMD-FETCHED TO JLMSG-I91-ROW-COUNT 43728400 437285 PERFORM JLMSG-DISPLAY-MESSAGE 43728500 437286*-------------------------------------------------------------* 43728600 437287 43728700 599900 SET JLMSG-I91-ROW-SUMMARY 59990013 600000 JLMSG-I91-SELECTED TO TRUE 60000013 600100 MOVE "MM_RSVE_CURSOR" TO JLMSG-I91-TABLE-NAME 60010013 600200 MOVE WA01-MM-RSVE-CURSOR-ROW-COUNT TO JLMSG-I91-ROW-COUNT 60020013 600300 PERFORM JLMSG-DISPLAY-MESSAGE. 60030013 600400 60040013 CRAUTA SET JLMSG-I91-ROW-SUMMARY CRAUTA JLMSG-I91-SELECTED TO TRUE CRAUTA MOVE WF01-VXJJ0SOO TO JLMSG-I91-TABLE-NAME CRAUTA MOVE WA01-SOO-READ TO JLMSG-I91-ROW-COUNT CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 CRAUTA SET JLMSG-I91-ROW-SUMMARY CRAUTA JLMSG-I91-SELECTED TO TRUE CRAUTA MOVE WF01-VXJJ0SOP TO JLMSG-I91-TABLE-NAME CRAUTA MOVE WA01-SOP-READ TO JLMSG-I91-ROW-COUNT CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 SPR12A SET JLMSG-I91-ROW-SUMMARY SPR12A JLMSG-I91-SELECTED TO TRUE SPR12A MOVE "PTG_FOR_STORE" TO JLMSG-I91-TABLE-NAME SPR12A MOVE WA01-PTG-STORE-COUNT TO JLMSG-I91-ROW-COUNT CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 SPR08B SET JLMSG-I91-ROW-SUMMARY SPR08B JLMSG-I91-SELECTED TO TRUE SPR10A MOVE "PTG_CURSOR" TO JLMSG-I91-TABLE-NAME SPR10A MOVE WA01-PTG-FETCHED TO JLMSG-I91-ROW-COUNT CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 SPR08B SET JLMSG-I91-ROW-SUMMARY SPR08B JLMSG-I91-SELECTED TO TRUE SPR08B MOVE "PTP_CURSOR" TO JLMSG-I91-TABLE-NAME SPR08B MOVE WA01-PTP-FETCHED TO JLMSG-I91-ROW-COUNT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SPR08B SUM10A SET JLMSG-I91-ROW-SUMMARY SUM10A JLMSG-I91-SELECTED TO TRUE SUM10A MOVE WF01-VXJJ0OJX TO JLMSG-I91-TABLE-NAME SUM10A MOVE WA01-OJX-READ TO JLMSG-I91-ROW-COUNT SUM10A PERFORM JLMSG-DISPLAY-MESSAGE SUM10A 43728700 SUM11A SET JLMSG-I91-ROW-SUMMARY SUM11A JLMSG-I91-SELECTED TO TRUE SUM11A MOVE WF01-VXJJ0OJG TO JLMSG-I91-TABLE-NAME SUM11A MOVE WA01-OJG-READ TO JLMSG-I91-ROW-COUNT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A 43728700 SUM11A SET JLMSG-I91-ROW-SUMMARY SUM11A JLMSG-I91-SELECTED TO TRUE SUM11A MOVE WF01-VXJJ0PPD TO JLMSG-I91-TABLE-NAME SUM11A MOVE WA01-PPD-READ TO JLMSG-I91-ROW-COUNT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 SUM12A SET JLMSG-I91-ROW-SUMMARY SUM12A JLMSG-I91-SELECTED TO TRUE SUM12A MOVE "XSA-NIA-QUERY" TO JLMSG-I91-TABLE-NAME SUM12A MOVE WA01-XSA-NIA-FETCHED TO JLMSG-I91-ROW-COUNT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 SPR13A SET JLMSG-I91-ROW-SUMMARY SPR13A JLMSG-I91-SELECTED TO TRUE SPR13A MOVE "XSB-RSC-QUERY" TO JLMSG-I91-TABLE-NAME SPR13A MOVE WA01-XSB-RSC-FETCHED TO JLMSG-I91-ROW-COUNT SUM13A PERFORM JLMSG-DISPLAY-MESSAGE SUM13A 43728700 SUM13A SET JLMSG-I91-ROW-SUMMARY SUM13A JLMSG-I91-SELECTED TO TRUE TA1226 MOVE "READNEXT_XSB_RST" TO JLMSG-I91-TABLE-NAME TA1226 MOVE WA01-XSB-RST-FETCHED TO JLMSG-I91-ROW-COUNT TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 TA1226 SET JLMSG-I91-ROW-SUMMARY TA1226 JLMSG-I91-SELECTED TO TRUE TA1226 MOVE "READNEXT_XSB_STACK" TO JLMSG-I91-TABLE-NAME TA1226 MOVE WA01-XSB-STACK-FETCHED TO JLMSG-I91-ROW-COUNT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 SUM13A SET JLMSG-I91-ROW-SUMMARY SUM13A JLMSG-I91-SELECTED TO TRUE SUM13A MOVE "OLD-RPK-QUERY" TO JLMSG-I91-TABLE-NAME SUM13A MOVE WA01-OLD-RP-FETCHED TO JLMSG-I91-ROW-COUNT SUM13A PERFORM JLMSG-DISPLAY-MESSAGE SUM13A 43728700 SUM13A SET JLMSG-I91-ROW-SUMMARY SUM13A JLMSG-I91-SELECTED TO TRUE SUM13C MOVE "OJD-RPK-QUERY" TO JLMSG-I91-TABLE-NAME SUM13C MOVE WA01-OJD-RP-FETCHED TO JLMSG-I91-ROW-COUNT SUM13A PERFORM JLMSG-DISPLAY-MESSAGE SUM13A 43728700 SPR14A SPR14A SET JLMSG-I91-ROW-SUMMARY SPR14A JLMSG-I91-SELECTED TO TRUE SPR14A MOVE "VXJJ0RDD" TO JLMSG-I91-TABLE-NAME SPR14A MOVE WA01-RDD-FETCHED TO JLMSG-I91-ROW-COUNT SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A SPR14A SET JLMSG-I91-ROW-SUMMARY SPR14A JLMSG-I91-SELECTED TO TRUE SPR14A MOVE "VXJJ0RDT" TO JLMSG-I91-TABLE-NAME SPR14A MOVE WA01-RDT-FETCHED TO JLMSG-I91-ROW-COUNT SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 437287 43728700 333300 SET JLMSG-I97-RECORD-SUMMARY 229800 JLMSG-I97-WRITTEN TO TRUE 22980000 229900 MOVE WF01-JLF30O01 TO JLMSG-I97-FILE-NAME 22990000 230000 MOVE WA01-RECS-OUTPUT1 TO JLMSG-I97-REC-COUNT 23000000 230100 PERFORM JLMSG-DISPLAY-MESSAGE 23010000 230200 23020000 230300 SET JLMSG-I97-RECORD-SUMMARY 23030000 230400 JLMSG-I97-WRITTEN TO TRUE 23040000 230500 MOVE WF01-JLF30O02 TO JLMSG-I97-FILE-NAME 23050000 230600 MOVE WA01-RECS-OUTPUT2 TO JLMSG-I97-REC-COUNT 23060000 230700 PERFORM JLMSG-DISPLAY-MESSAGE 23070000 230800 23080000 230900 SET JLMSG-I97-RECORD-SUMMARY 23090000 231000 JLMSG-I97-WRITTEN TO TRUE 23100000 231100 MOVE WF01-JLF30O03 TO JLMSG-I97-FILE-NAME 23110000 231200 MOVE WA01-RECS-OUTPUT3 TO JLMSG-I97-REC-COUNT 23120000 231300 PERFORM JLMSG-DISPLAY-MESSAGE 23130000 231400 23140000 231500 SET JLMSG-I97-RECORD-SUMMARY 23150000 231600 JLMSG-I97-WRITTEN TO TRUE 23160000 231700 MOVE WF01-JLF30O04 TO JLMSG-I97-FILE-NAME 23170000 231800 MOVE WA01-RECS-OUTPUT4 TO JLMSG-I97-REC-COUNT 23180000 231900 PERFORM JLMSG-DISPLAY-MESSAGE 23190000 232000 23200000 232100 SET JLMSG-I97-RECORD-SUMMARY 23210000 232200 JLMSG-I97-WRITTEN TO TRUE 23220000 232300 MOVE WF01-JLF30O05 TO JLMSG-I97-FILE-NAME 23230000 232400 MOVE WA01-RECS-REJECT1 TO JLMSG-I97-REC-COUNT 23240000 232500 PERFORM JLMSG-DISPLAY-MESSAGE 23250000 232600 23260000 232700 SET JLMSG-I97-RECORD-SUMMARY 23270000 232800 JLMSG-I97-WRITTEN TO TRUE 23280000 232900 MOVE WF01-JLF30O06 TO JLMSG-I97-FILE-NAME 23290000 233000 MOVE WA01-RECS-REJECT2 TO JLMSG-I97-REC-COUNT 23300000 233100 PERFORM JLMSG-DISPLAY-MESSAGE 23310000 233200 23320000 336900 SET JLMSG-I97-RECORD-SUMMARY 337000 JLMSG-I97-WRITTEN TO TRUE 337100 MOVE WF01-JLF30O07 TO JLMSG-I97-FILE-NAME 337200 MOVE WA01-RECS-JLFODKSS TO JLMSG-I97-REC-COUNT 337300 PERFORM JLMSG-DISPLAY-MESSAGE 382900 366300 SET JLMSG-I97-RECORD-SUMMARY 366400 JLMSG-I97-WRITTEN TO TRUE 366500 MOVE WF01-JLF30O08 TO JLMSG-I97-FILE-NAME 366600 MOVE WA01-RECS-JLFOEOOC TO JLMSG-I97-REC-COUNT 366700 PERFORM JLMSG-DISPLAY-MESSAGE 383500 SET JLMSG-I97-RECORD-SUMMARY JLMSG-I97-WRITTEN TO TRUE MOVE WF01-JLF30O09 TO JLMSG-I97-FILE-NAME MOVE WA01-RECS-JLFODIAX TO JLMSG-I97-REC-COUNT 366700 PERFORM JLMSG-DISPLAY-MESSAGE 383500 SUM11A SET JLMSG-I97-RECORD-SUMMARY SUM11A JLMSG-I97-WRITTEN TO TRUE SUM11A MOVE WF01-JLF30O10 TO JLMSG-I97-FILE-NAME SUM11A MOVE WA01-RECS-JLFODIAH TO JLMSG-I97-REC-COUNT 366700 PERFORM JLMSG-DISPLAY-MESSAGE 383500 RD2S19 SET JLMSG-I97-RECORD-SUMMARY RD2S19 JLMSG-I97-WRITTEN TO TRUE RD2S19 MOVE WF01-JLF30O11 TO JLMSG-I97-FILE-NAME RD2S19 MOVE WA01-RECS-JLUNCCAL TO JLMSG-I97-REC-COUNT 366700 PERFORM JLMSG-DISPLAY-MESSAGE 383500 233210 MOVE "CASES CALCULATED...." 23321013 233211 TO WM18-SUBJECT 23321110 233220 MOVE WA01-NO-OF-CASES TO WM18-COUNT 23322010 233221 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23322110 233230 PERFORM JLMSG-DISPLAY-MESSAGE 23323010 233240 23324010 233250 MOVE "ZERO CASE ORDERS...." 23325013 233260 TO WM18-SUBJECT 23326010 233270 MOVE WA01-NO-OF-ZERO-ORDERS TO WM18-COUNT 23327010 233280 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23328010 233290 PERFORM JLMSG-DISPLAY-MESSAGE 23329010 233291 23329110 233292 MOVE "PRIORITY 1 ORDERS..." 23329213 233293 TO WM18-SUBJECT 23329310 233294 MOVE WA01-NO-OF-PRIORITY1 TO WM18-COUNT 23329410 233295 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23329510 233296 PERFORM JLMSG-DISPLAY-MESSAGE 23329610 233297 23329710 233298 MOVE "PRIORITY 2 ORDERS..." 23329813 233299 TO WM18-SUBJECT 23329910 233300 MOVE WA01-NO-OF-PRIORITY2 TO WM18-COUNT 23330010 233301 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23330110 233302 PERFORM JLMSG-DISPLAY-MESSAGE 23330210 387300 23330310 038810*----- 10/07/2000 --------------------------------------------* 02 233298 MOVE "PRIORITY 3 ORDERS..." 23329813 233299 TO WM18-SUBJECT 23329910 233300 MOVE WA01-NO-OF-PRIORITY3 TO WM18-COUNT 23330010 233301 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23330110 233302 PERFORM JLMSG-DISPLAY-MESSAGE 23330210 386600 23330310 233298 MOVE "PRIORITY 4 ORDERS..." 23329813 233299 TO WM18-SUBJECT 23329910 233300 MOVE WA01-NO-OF-PRIORITY4 TO WM18-COUNT 23330010 233301 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23330110 233302 PERFORM JLMSG-DISPLAY-MESSAGE 23330210 038810*----- 10/07/2000 END ----------------------------------------* 02 387300 23330310 233304 MOVE "OUT OF TOLERANCE...." 23330413 233305 TO WM18-SUBJECT 23330510 233306 MOVE WA01-NO-OF-OOT TO WM18-COUNT 23330610 233307 MOVE WM18-REC-COUNT-MSG TO JLMSG-TEXT 23330710 233308 PERFORM JLMSG-DISPLAY-MESSAGE 23330810 233309 23330910 233310 MOVE " 1" 23331033 233311 TO WM19-CALC-METH 23331133 233312 MOVE "DEMAND LINE FILL-UP....................." 23331233 233313 TO WM19-METH-DESC 23331333 233314 MOVE WA01-NO-OF-CALC-METH-1 TO WM19-COUNT 23331433 233315 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23331533 233316 PERFORM JLMSG-DISPLAY-MESSAGE 23331633 233317 23331733 233318 MOVE " 2" 23331833 233319 TO WM19-CALC-METH 23331933 233320 MOVE "DEMAND LINE TOP-UP......................" 23332033 233321 TO WM19-METH-DESC 23332133 233322 MOVE WA01-NO-OF-CALC-METH-2 TO WM19-COUNT 23332233 233323 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23332333 233324 PERFORM JLMSG-DISPLAY-MESSAGE 23332433 233325 23332533 233326 MOVE " 3" 23332633 233327 TO WM19-CALC-METH 23332733 233328 MOVE "NON DEMAND LINE LONG LIFE FILL-UP......." 23332833 233329 TO WM19-METH-DESC 23332933 233330 MOVE WA01-NO-OF-CALC-METH-3 TO WM19-COUNT 23333033 233331 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23333133 233332 PERFORM JLMSG-DISPLAY-MESSAGE 23333233 233333 23333333 233334 MOVE " 4" 23333433 233335 TO WM19-CALC-METH 23333533 233336 MOVE "NON DEMAND LINE SHORT LIFE FILL-UP......" 23333633 233337 TO WM19-METH-DESC 23333733 233338 MOVE WA01-NO-OF-CALC-METH-4 TO WM19-COUNT 23333833 233339 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23333933 233340 PERFORM JLMSG-DISPLAY-MESSAGE 23334033 233341 23334133 233342 MOVE " 5" 23334233 233343 TO WM19-CALC-METH 23334333 233344 MOVE "NON DEMAND LINE TOP-UP.................." 23334433 233345 TO WM19-METH-DESC 23334533 233346 MOVE WA01-NO-OF-CALC-METH-5 TO WM19-COUNT 23334633 233347 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23334733 233348 PERFORM JLMSG-DISPLAY-MESSAGE 23334833 233349 23334933 233350 MOVE " 6" 23335033 233351 TO WM19-CALC-METH 23335133 233352 MOVE "STOCK FILL LINE FILL CALCULATION........" 23335233 233353 TO WM19-METH-DESC 23335333 233354 MOVE WA01-NO-OF-CALC-METH-6 TO WM19-COUNT 23335433 233355 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23335533 233356 PERFORM JLMSG-DISPLAY-MESSAGE 23335633 233357 23335733 233358 MOVE " 7" 23335833 233359 TO WM19-CALC-METH 23335933 233360 MOVE "STOCK FILL LINE NON FILL CALCULATION...." 23336033 233361 TO WM19-METH-DESC 23336133 233362 MOVE WA01-NO-OF-CALC-METH-7 TO WM19-COUNT 23336233 233363 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23336333 233364 PERFORM JLMSG-DISPLAY-MESSAGE 23336433 233365 23336533 233366 MOVE " 8" 23336633 233367 TO WM19-CALC-METH 23336733 233368 MOVE "FIXED ERRATIC LINE......................" 23336833 233369 TO WM19-METH-DESC 23336933 233370 MOVE WA01-NO-OF-CALC-METH-8 TO WM19-COUNT 23337033 233371 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 233372 PERFORM JLMSG-DISPLAY-MESSAGE 23337233 233373 23337333 233374 MOVE " 9" 23337433 233375 TO WM19-CALC-METH 23337533 233376 MOVE "CUSTOMER ORDER ONLY....................." 23337633 233377 TO WM19-METH-DESC 23337733 233378 MOVE WA01-NO-OF-CALC-METH-9 TO WM19-COUNT 23337833 233379 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337933 233380 PERFORM JLMSG-DISPLAY-MESSAGE 23338033 233381 23338133 233381*----- 25/10/2000 - GM -----------------------------------------* 23338133 233381 23338133 233366 MOVE " A" 23336633 233367 TO WM19-CALC-METH 23336733 233312 MOVE "DEMAND LINE FILL-UP (MEDIUM LIFE)......." 23331233 TO WM19-METH-DESC 23336933 233370 MOVE WA01-NO-OF-CALC-METH-A TO WM19-COUNT 23337033 233371 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 233372 PERFORM JLMSG-DISPLAY-MESSAGE 23337233 233373 23337333 233366 MOVE " B" 23336633 233367 TO WM19-CALC-METH 23336733 233312 MOVE "DEMAND LINE TOP-UP (MEDIUM LIFE)........" 23331233 TO WM19-METH-DESC 23336933 233370 MOVE WA01-NO-OF-CALC-METH-B TO WM19-COUNT 23337033 233371 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 233372 PERFORM JLMSG-DISPLAY-MESSAGE 23337233 233381 23338133 233366 MOVE " C" 23336633 233367 TO WM19-CALC-METH 23336733 233328 MOVE "NON DEMAND LINE FILL-UP (MEDIUM LIFE)..." 23332833 TO WM19-METH-DESC 23336933 233370 MOVE WA01-NO-OF-CALC-METH-C TO WM19-COUNT 23337033 233371 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 233372 PERFORM JLMSG-DISPLAY-MESSAGE 23337233 233381 23338133 CRV10B MOVE " D" 23336633 CRV10B TO WM19-CALC-METH 23336733 CRV10B MOVE "DYNAMIC TARGET ORDER UP TO CALCULATION.." 23332833 CRV10B TO WM19-METH-DESC 23336933 CRV10B MOVE WA01-NO-OF-CALC-METH-D TO WM19-COUNT 23337033 CRV10B MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 23337233 CRV10B 23338133 CRV10B MOVE " E" 23336633 CRV10B TO WM19-CALC-METH 23336733 CRV10B MOVE "STATIC TARGET ORDER UP TO CALCULATION..." 23332833 CRV10B TO WM19-METH-DESC 23336933 CRV10B MOVE WA01-NO-OF-CALC-METH-E TO WM19-COUNT 23337033 CRV10B MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 23337233 CRV10B 23338133 CRV10C MOVE " F" 23336633 CRV10C TO WM19-CALC-METH 23336733 CRV10C MOVE "RECOVERY STATUS........................." 23332833 CRV10C TO WM19-METH-DESC 23336933 CRV10C MOVE WA01-NO-OF-CALC-METH-F TO WM19-COUNT 23337033 CRV10C MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 CRV10C PERFORM JLMSG-DISPLAY-MESSAGE 23337233 CRV10C 23338133 CRAUTA MOVE " I" 23336633 CRAUTA TO WM19-CALC-METH 23336733 CRAUTA MOVE "STANDING ORDER - IGNORE BOOKSTOCK......." 23332833 CRAUTA TO WM19-METH-DESC 23336933 CRAUTA MOVE WA01-NO-OF-CALC-METH-I TO WM19-COUNT 23337033 CRAUTA MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 CRAUTA PERFORM JLMSG-DISPLAY-MESSAGE 23337233 CRAUTA 23338133 SUM11A MOVE " Y" 23331033 SUM11A TO WM19-CALC-METH 23331133 SUM11A MOVE "BGO-FILL................................" 23331233 SUM11A TO WM19-METH-DESC 23331333 SUM11A MOVE WA01-NO-OF-CALC-METH-Y TO WM19-COUNT 23331433 SUM11A MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23331533 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 23331633 SUM11A 23331733 SUM11A MOVE " Z" 23331033 SUM11A TO WM19-CALC-METH 23331133 SUM11A MOVE "BGO-REPL................................" 23331233 SUM11A TO WM19-METH-DESC 23331333 SUM11A MOVE WA01-NO-OF-CALC-METH-Z TO WM19-COUNT 23331433 SUM11A MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 23337233 CRAUTA 23338133 142S02 MOVE " O" 23331033 142S02 TO WM19-CALC-METH 23331133 142S02 MOVE "BGO-FILL-OPTIMAL........................" 23331233 142S02 TO WM19-METH-DESC 23331333 142S02 MOVE WA01-NO-OF-CALC-METH-O TO WM19-COUNT 23331433 142S02 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23331533 142S02 PERFORM JLMSG-DISPLAY-MESSAGE 23331633 142S02 23331733 142S02 MOVE " P" 23331033 142S02 TO WM19-CALC-METH 23331133 142S02 MOVE "BGO-REPL-OPTIMAL........................" 23331233 142S02 TO WM19-METH-DESC 23331333 142S02 MOVE WA01-NO-OF-CALC-METH-P TO WM19-COUNT 23331433 142S02 MOVE WM19-CALC-METH-MSG TO JLMSG-TEXT 23337133 142S02 PERFORM JLMSG-DISPLAY-MESSAGE 23337233 233381*---------------------------------------------------------------* 23338133 233381 23338133 450800 CLOSE INPUT-FILE INPUT4-FILE. 45080000 233400 23340000 233500 IF FS01-INPUT NOT = "00" 23350000 233600 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 23360000 233700 SET JLMSG-C98-FILE-IO-ERROR 23370000 233800 JLMSG-C98-CLOSE TO TRUE 23380000 233900 MOVE WF01-JLF30I01 TO JLMSG-C98-FILE-NAME 23390000 234000 MOVE FS01-INPUT TO JLMSG-C98-FILE-STATUS 23400000 234100 PERFORM JLMSG-DISPLAY-MESSAGE 23410000 234200 END-IF. 23420000 234300 23430000 451900 IF FS01-INPUT4 NOT = "00" 45190000 452000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 45200000 452100 SET JLMSG-C98-FILE-IO-ERROR 45210000 452200 JLMSG-C98-CLOSE TO TRUE 45220000 452300 MOVE WF01-JLF30I04 TO JLMSG-C98-FILE-NAME 45230000 452400 MOVE FS01-INPUT4 TO JLMSG-C98-FILE-STATUS 45240000 PERFORM JLMSG-DISPLAY-MESSAGE 23410000 END-IF. 23420000 45270000 CLOSE JLFOLKUP-FILE 45080000 23340000 IF JLFOLKUP-STATUS NOT = "00" 23350000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 23360000 SET JLMSG-C98-FILE-IO-ERROR 23370000 JLMSG-C98-CLOSE TO TRUE 23380000 MOVE WF01-JLF30I09 TO JLMSG-C98-FILE-NAME 23390000 MOVE JLFOLKUP-STATUS TO JLMSG-C98-FILE-STATUS 23400000 PERFORM JLMSG-DISPLAY-MESSAGE 23410000 END-IF. 23420000 45270000 CLOSE JLFOEXCP-FILE 45080000 23340000 IF JLFOEXCP-STATUS NOT = "00" 23350000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 23360000 SET JLMSG-C98-FILE-IO-ERROR 23370000 JLMSG-C98-CLOSE TO TRUE 23380000 MOVE WF01-JLF30I10 TO JLMSG-C98-FILE-NAME 23390000 MOVE JLFOEXCP-STATUS TO JLMSG-C98-FILE-STATUS 23400000 PERFORM JLMSG-DISPLAY-MESSAGE 23410000 END-IF. 23420000 45270000 AVRS32 CLOSE JLFOREFD-FILE 45080000 AVRS32 23340000 AVRS32 IF JLFOREFD-STATUS NOT = "00" 23350000 AVRS32 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 23360000 AVRS32 SET JLMSG-C98-FILE-IO-ERROR 23370000 AVRS32 JLMSG-C98-CLOSE TO TRUE 23380000 AVRS32 MOVE WF01-JLF30I13 TO JLMSG-C98-FILE-NAME 23390000 AVRS32 MOVE JLFOREFD-STATUS TO JLMSG-C98-FILE-STATUS 23400000 AVRS32 PERFORM JLMSG-DISPLAY-MESSAGE 23410000 AVRS32 END-IF. 23420000 45270000 234400 CLOSE OUTPUT-FILE1. 23440000 234500 23450000 234600 IF FS01-OUTPUT NOT = "00" 23460000 234700 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 23470000 234800 SET JLMSG-C98-FILE-IO-ERROR 23480000 234900 JLMSG-C98-CLOSE TO TRUE 23490000 235000 MOVE WF01-JLF30O01 TO JLMSG-C98-FILE-NAME 23500000 235100 MOVE FS01-OUTPUT TO JLMSG-C98-FILE-STATUS 23510000 235200 PERFORM JLMSG-DISPLAY-MESSAGE 23520000 235300 END-IF. 23530000 235400 23540000 235500 CLOSE OUTPUT-FILE2. 23550000 235600 23560000 235700 IF FS02-OUTPUT NOT = "00" 23570000 235800 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 23580000 235900 SET JLMSG-C98-FILE-IO-ERROR 23590000 236000 JLMSG-C98-CLOSE TO TRUE 23600000 236100 MOVE WF01-JLF30O02 TO JLMSG-C98-FILE-NAME 23610000 236200 MOVE FS02-OUTPUT TO JLMSG-C98-FILE-STATUS 23620000 236300 PERFORM JLMSG-DISPLAY-MESSAGE 23630000 236400 END-IF. 23640000 236500 23650000 236600 CLOSE OUTPUT-FILE3. 23660000 236700 23670000 236800 IF FS03-OUTPUT NOT = "00" 23680000 236900 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 23690000 237000 SET JLMSG-C98-FILE-IO-ERROR 23700000 237100 JLMSG-C98-CLOSE TO TRUE 23710000 237200 MOVE WF01-JLF30O03 TO JLMSG-C98-FILE-NAME 23720000 237300 MOVE FS03-OUTPUT TO JLMSG-C98-FILE-STATUS 23730000 237400 PERFORM JLMSG-DISPLAY-MESSAGE 23740000 237500 END-IF. 23750000 237600 23760000 237700 CLOSE OUTPUT-FILE4. 23770000 237800 23780000 237900 IF FS04-OUTPUT NOT = "00" 23790000 238000 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 23800000 238100 SET JLMSG-C98-FILE-IO-ERROR 23810000 238200 JLMSG-C98-CLOSE TO TRUE 23820000 238300 MOVE WF01-JLF30O04 TO JLMSG-C98-FILE-NAME 23830000 238400 MOVE FS04-OUTPUT TO JLMSG-C98-FILE-STATUS 23840000 238500 PERFORM JLMSG-DISPLAY-MESSAGE 23850000 238600 END-IF. 23860000 238700 23870000 238800 CLOSE REJECT-FILE1. 23880000 238900 23890000 239000 IF FS01-REJECT NOT = "00" 23900000 239100 MOVE WM03-REJECT-FILE TO JLMSG-TEXT 23910000 239200 SET JLMSG-C98-FILE-IO-ERROR 23920000 239300 JLMSG-C98-CLOSE TO TRUE 23930000 239400 MOVE WF01-JLF30O05 TO JLMSG-C98-FILE-NAME 23940000 239500 MOVE FS01-REJECT TO JLMSG-C98-FILE-STATUS 23950000 239600 PERFORM JLMSG-DISPLAY-MESSAGE 23960000 239700 END-IF. 23970000 239800 23980000 239900 CLOSE REJECT-FILE2. 23990000 240000 24000000 240100 IF FS02-REJECT NOT = "00" 24010000 240200 MOVE WM03-REJECT-FILE TO JLMSG-TEXT 24020000 240300 SET JLMSG-C98-FILE-IO-ERROR 24030000 240400 JLMSG-C98-CLOSE TO TRUE 24040000 240500 MOVE WF01-JLF30O06 TO JLMSG-C98-FILE-NAME 24050000 240600 MOVE FS02-REJECT TO JLMSG-C98-FILE-STATUS 24060000 240700 PERFORM JLMSG-DISPLAY-MESSAGE 24070000 240800 END-IF. 24080000 240900 24090000 402900 355500 CLOSE JLFODKSS-FILE. 403100 355700 IF JLFODKSS-STATUS NOT = "00" 355800 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 355900 SET JLMSG-C98-FILE-IO-ERROR 356000 JLMSG-C98-CLOSE TO TRUE 356100 MOVE WF01-JLF30O07 TO JLMSG-C98-FILE-NAME 356200 MOVE JLFODKSS-STATUS TO JLMSG-C98-FILE-STATUS 356300 PERFORM JLMSG-DISPLAY-MESSAGE 356400 END-IF. 404000 386000 CLOSE JLFOEOOC-FILE. 404200 386200 IF JLFOEOOC-STATUS NOT = "00" 386300 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 386400 SET JLMSG-C98-FILE-IO-ERROR 386500 JLMSG-C98-CLOSE TO TRUE 386600 MOVE WF01-JLF30O08 TO JLMSG-C98-FILE-NAME 386700 MOVE JLFOEOOC-STATUS TO JLMSG-C98-FILE-STATUS 386800 PERFORM JLMSG-DISPLAY-MESSAGE 386900 END-IF. 405100 632400 CLOSE JLALRESV 63240005 632500 63250005 632600 IF JLALRESV-STATUS NOT = "00" 63260005 632700 SET JLMSG-C98-FILE-IO-ERROR 63270005 632800 JLMSG-C98-CLOSE TO TRUE 63280005 632900 MOVE WF01-JLF30I05 TO JLMSG-C98-FILE-NAME 63290005 633000 MOVE JLALRESV-STATUS TO JLMSG-C98-FILE-STATUS 63300005 633100 PERFORM JLMSG-DISPLAY-MESSAGE 63310005 633200 END-IF. 63320005 633300 63330000 WIN06B CLOSE JLDOTCOM 63240005 WIN06B 63250005 WIN06B IF JLDOTCOM-STATUS NOT = "00" 63260005 WIN06B SET JLMSG-C98-FILE-IO-ERROR 63270005 WIN06B JLMSG-C98-CLOSE TO TRUE 63280005 WIN06B MOVE WF01-JLF30I07 TO JLMSG-C98-FILE-NAME 63290005 WIN06B MOVE JLDOTCOM-STATUS TO JLMSG-C98-FILE-STATUS 63300005 633100 PERFORM JLMSG-DISPLAY-MESSAGE 63310005 633200 END-IF. 63320005 12960049 WIN06A CLOSE DOTCOM-SALES-FILE IF FS01-INPUT8 NOT = "00" 45190000 SET JLMSG-C98-FILE-IO-ERROR 12900049 JLMSG-C98-CLOSE TO TRUE MOVE WF01-JLF30I08 TO JLMSG-C98-FILE-NAME MOVE FS01-INPUT8 TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE 12940049 END-IF 12950049 12950049 CLOSE JLFODIAX-FILE IF JLFODIAX-STATUS NOT = "00" 45190000 SET JLMSG-C98-FILE-IO-ERROR 12900049 JLMSG-C98-CLOSE TO TRUE MOVE WF01-JLF30O09 TO JLMSG-C98-FILE-NAME MOVE JLFODIAX-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE 12940049 END-IF 12950049 633300 63330000 SUM11A CLOSE JLFODIAH-FILE SUM11A IF JLFODIAH-STATUS NOT = "00" 45190000 SUM11A SET JLMSG-C98-FILE-IO-ERROR 12900049 SUM11A JLMSG-C98-CLOSE TO TRUE SUM11A MOVE WF01-JLF30O10 TO JLMSG-C98-FILE-NAME SUM11A MOVE JLFODIAH-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE 12940049 END-IF 12950049 633300 63330000 633400 IF WI10-MM-RSVE-CURSOR-OPEN 63340005 633500 PERFORM VGC-CLOSE-MM-RSVE-CURSOR 63350005 633600 END-IF. 63360000 633700 63370005 633800 IF WI12-BD-RSVE-CURSOR-OPEN 63380005 633900 PERFORM VHC-CLOSE-BD-RSVE-CURSOR 63390005 634000 END-IF. 63400005 634100 63410005 241000 IF BSP-SFB-OPEN 24100000 241100 PERFORM V-220-CLOSE-READNEXT-SFB-BSP 24110000 356400 END-IF. 404000 241400 IF OLD-OPEN 24140000 241500 PERFORM V-320-CLOSE-READNEXT-VXJJ0OLD 24150000 386900 END-IF. 405100 241800 IF BDL-OPEN 24180000 241900 PERFORM V-420-CLOSE-READNEXT-VXJJ0BDL 24190000 241200 END-IF. 24120000 241300 24130000 242200 IF ALP-OPEN 24220000 242300 PERFORM V-530-CLOSE-READNEXT-VXJJ0ALP 24230000 242400 END-IF. 24240000 406700 24250000 388700 IF ASF-OPEN 388800 PERFORM V-720-CLOSE-READNEXT-VXJJ0ASF 242400 END-IF. 24240000 242500 24250000 SUM10B IF OLC-OPEN 24140000 SUM10B PERFORM V-360-CLOSE-OLC 24150000 242400 END-IF. 24240000 TA1226 TA1226 IF XSB-RST-OPEN 13270065 TA1226 PERFORM V-930-CLOSE-READNEXT-XSB-RST 13280067 TA1226 END-IF. 13290049 TA1226 13290049 TA1226 IF XSB-STACK-OPEN 13270065 TA1226 PERFORM V-960-CLOSE-READNEXT-XSB-STACK 13280067 242500 24250000 242510 MOVE JLMSG-RETURN-CODE TO RETURN-CODE. 24251030 466300 IF REJECTED-TPNS 46630000 466310 DISPLAY "PROGRAM COMPLETED OK -" 46631000 466320 " BUT DETECTED DUP DATES FOR DELIVERIES " 46632000 466330 DISPLAY "RESTART AT NEXT STEP " 46633000 466400 MOVE 16 TO RETURN-CODE 46640000 466500 END-IF. 46650000 242520 24252030 242600 C-100-EXIT. 24260000 EXIT. 242900 D-100-LOAD-DATES SECTION. 24290000 243000*---------------------------------------------------------------* 24300000 243100* SECTION NAME : D-100-LOAD-DATES * 24310000 243200* CALLED BY : A-100-INITIALIZE * 24320000 243300* CALLS : JLMSG-DISPLAY-MESSAGE * 24330000 CRAUT3* FUNCTION : 1. RETRIEVES 'ORDCALC' DATE FROM PAR TABLE * 24340000 243500* : 2. LOADS CURR DATE - 7 FOR 50 DAYS TO REF TAB * 24350000 243600* : 3. LOADS YEAR/WEEK/DAYS TO REF TABLE * 24360000 243700*---------------------------------------------------------------* 24370000 243800 D-100. 24380000 243900 24390000 CRAUT3* ORDER CALC HAS BEEN AMENDED TO USE ORDCALC# PARAMETER DATE CRAUT3* INSTEAD OF CC01BASE DATE - THIS WILL STOP ORDER CALC FAILING CRAUT3* IF A CALC IS DELAYED AND ROLLS INTO THE NEXT DAY CRAUT3 MOVE WF01-ORDCALC TO JLDAT-DATE-TYPE 24450000 CRAUT3 MOVE JL01X-DATABASE-ID TO JLDAT-DATABASE-ID 24450000 244100 24410000 CRAUT3 PERFORM JLDAT-GET-REFERENCE-DATE 24450000 244500 24450000 CRAUT3 EVALUATE TRUE 24450000 CRAUT3 WHEN JLDAT-NORMAL-RUN 24450000 CRAUT3 MOVE JLDAT-REFERENCE-DATE TO WW01-CURR-DATE 24450000 CRAUT3 24450000 CRAUT3 WHEN JLDAT-PARAM-NOT-FOUND 24450000 CRAUT3 MOVE JLDAT-PARAM-KEY TO WM33-PARAM-KEY 24450000 CRAUT3 MOVE WM33-BLANK-PARAM TO JLMSG-TEXT 24450000 CRAUT3 PERFORM JLMSG-DISPLAY-MESSAGE 24450000 CRAUT3 24450000 CRAUT3 WHEN JLDAT-REFERENCE-DATE-ERROR 24450000 CRAUT3 MOVE JLDAT-PARAM-KEY TO WM34-PARAM-KEY 24450000 CRAUT3 MOVE WM34-INVALID-PARAM TO JLMSG-TEXT 24450000 CRAUT3 PERFORM JLMSG-DISPLAY-MESSAGE 24450000 CRAUT3 END-EVALUATE 24450000 CRAUT3 24450000 SPR14A* OBTAIN YESTERDAY AND TOMORROW'S DATE SPR14A MOVE WW01-CURR-DATE TO ZZD-DATE1 SPR14A MOVE "A" TO ZZD-FUNCTION-CODE SPR14A MOVE "ISO" TO ZZD-DATE1-FORMAT SPR14A ZZD-DATE2-FORMAT SPR14A MOVE -1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR14A MOVE ZZD-DATE2 TO WD-YESTERDAY-DATE SPR14A MOVE +1 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR14A MOVE ZZD-DATE2 TO WD-TOMORROW-DATE CRAUT3 24450000 SPR12A* OBTAIN CURRENT YEAR WEEK AND NEXT 3 WEEKS FOR PTG SPR12A* EXISTENCE CHECK. SPR12A SPR12A MOVE JLDAT-REFERENCE-YEAR TO WH03-PTP-TESCO-YEAR1 SPR12A MOVE JLDAT-REFERENCE-WEEK TO WH03-PTP-TESCO-WEEK1 SPR12A SPR12A MOVE ZEROES TO ZZD-ERROR-CODE SPR12A MOVE "A" TO ZZD-FUNCTION-CODE SPR12A MOVE "WF" TO ZZD-DATE1-FORMAT SPR12A MOVE SPACES TO ZZD-DATE1 SPR12A MOVE JLDAT-REFERENCE-YEAR TO ZZD-DATE1 (1:4) SPR12A MOVE JLDAT-REFERENCE-WEEK TO ZZD-DATE1 (5:2) SPR12A MOVE JLDAT-REFERENCE-DAY TO ZZD-DATE1 (7:1) SPR12A MOVE "WF" TO ZZD-DATE2-FORMAT SPR12A MOVE +7 TO ZZD-DIFF-IN-DAYS SPR12A SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR12A IF ZZD-ERROR-CODE NOT = 00 SPR12A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR12A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SPR12A PERFORM JLMSG-DISPLAY-MESSAGE SPR12A END-IF SPR12A MOVE ZZD-DATE2(1:4) TO WH03-PTP-TESCO-YEAR2 SPR12A MOVE ZZD-DATE2(5:2) TO WH03-PTP-TESCO-WEEK2 SPR12A SPR12A MOVE +14 TO ZZD-DIFF-IN-DAYS SPR12A SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR12A IF ZZD-ERROR-CODE NOT = 00 SPR12A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR12A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SPR12A PERFORM JLMSG-DISPLAY-MESSAGE SPR12A END-IF SPR12A MOVE ZZD-DATE2(1:4) TO WH03-PTP-TESCO-YEAR3 SPR12A MOVE ZZD-DATE2(5:2) TO WH03-PTP-TESCO-WEEK3 SPR12A SPR12A MOVE +21 TO ZZD-DIFF-IN-DAYS SPR14B PERFORM ZA-CALL-JL0F32 10860000 SPR12A IF ZZD-ERROR-CODE NOT = 00 SPR12A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR12A MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SPR12A PERFORM JLMSG-DISPLAY-MESSAGE SPR12A END-IF SPR12A MOVE ZZD-DATE2(1:4) TO WH03-PTP-TESCO-YEAR4 SPR12A MOVE ZZD-DATE2(5:2) TO WH03-PTP-TESCO-WEEK4 244500 24450000 244600 PERFORM VARYING WX10-DATE-SUB FROM 1 BY 1 24460000 244700 UNTIL WX10-DATE-SUB > WX10-DATE-MAX 24470000 244800 24480000 244900 MOVE ZEROES TO ZZD-ERROR-CODE 24490000 245000 MOVE "A" TO ZZD-FUNCTION-CODE 24500000 245100 MOVE "ISO" TO ZZD-DATE1-FORMAT 24510000 245200 MOVE WW01-CURR-DATE TO ZZD-DATE1 24520000 245300 MOVE "ISO" TO ZZD-DATE2-FORMAT 24530000 245400 MOVE ZEROES TO ZZD-DIFF-IN-DAYS 24540000 245500 MOVE WX10-DATE-SUB TO ZZD-DIFF-IN-DAYS 24550000 245600 COMPUTE ZZD-DIFF-IN-DAYS = 24560000 245700 WX10-DATE-SUB - 1 24570000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 245900 24590000 245900 24590000 246000 IF ZZD-ERROR-CODE NOT = 00 24600000 246100 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 24610000 SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 24620000 246300 PERFORM JLMSG-DISPLAY-MESSAGE 24630000 246400 END-IF 24640000 246500 24650000 246600 MOVE ZZD-DATE2 TO WT30-CCYY-MM-DD(WX10-DATE-SUB) 24660000 246700 END-PERFORM. 24670000 246800 24680000 246900 PERFORM VARYING WX10-DATE-SUB FROM 1 BY 1 24690000 247000 UNTIL WX10-DATE-SUB > WX10-DATE-MAX 24700000 247100 24710000 247200 MOVE ZEROES TO ZZD-ERROR-CODE 24720000 247300 MOVE "A" TO ZZD-FUNCTION-CODE 24730000 247400 MOVE "ISO" TO ZZD-DATE1-FORMAT 24740000 247500 MOVE WT30-CCYY-MM-DD(WX10-DATE-SUB) 24750000 247600 TO ZZD-DATE1 24760000 247700 MOVE "WF" TO ZZD-DATE2-FORMAT 24770000 247800 MOVE -1 TO ZZD-DIFF-IN-DAYS 24780000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 206800 248000 24800000 248100 IF ZZD-ERROR-CODE NOT = 00 24810000 248200 MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 24820000 SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 24830000 248400 PERFORM JLMSG-DISPLAY-MESSAGE 24840000 248500 END-IF 24850000 248600 24860000 248700 MOVE ZZD-DATE2(1:4) TO WT30-TESCO-YEAR(WX10-DATE-SUB) 24870000 248800 MOVE ZZD-DATE2(5:2) TO WT30-TESCO-WEEK(WX10-DATE-SUB) 24880000 248900 MOVE ZZD-DATE2(7:1) TO WT30-DAY-NO(WX10-DATE-SUB) 24890000 249000 END-PERFORM. 24900000 249100 24910000 646900* PERFORM VARYING WX10-DATE-SUB FROM 1 BY 1 64690018 647000* UNTIL WX10-DATE-SUB > WX10-DATE-MAX 64700018 249400 24940000 647200* DISPLAY WT30-CALENDAR-ROW(WX10-DATE-SUB) 64720018 249600 24960000 647400* END-PERFORM. 64740018 249800 24980000 249900 D-EXIT. 24990000 EXIT. 250100 25010000 250200 25020000 366100 E-LOAD-OGP-TABLE SECTION. 366200*---------------------------------------------------------------* 366300* SECTION NAME : E-LOAD-OGP-TABLE * 366400* CALLED BY : A-100-INITIALIZE * 366500* CALLS : V-600-OPEN-READNEXT-VXJJ0OGP. * 366600* : V-610-FETCH-READNEXT-VXJJ0OGP. * 366700* FUNCTION : 1. LOAD OGP TABLE FOR LEGACY CODE LOOKUP * 366800*---------------------------------------------------------------* 366900 E-100. 648900* DISPLAY "E-LOAD-OGP" 64890018 367000 MOVE ZERO TO WX60-OGP-COUNT. 367100 PERFORM V-600-OPEN-READNEXT-VXJJ0OGP. 367200 PERFORM V-610-FETCH-READNEXT-VXJJ0OGP. 367300 PERFORM UNTIL SQLCODE NOT = 0 367400 ADD 1 TO WX60-OGP-COUNT 367500 IF WX60-OGP-COUNT > WX60-OGP-MAX 367600 MOVE WM21-OGP-TABLE-EXCEEDED TO JLMSG-TEXT 367700 PERFORM JLMSG-DISPLAY-MESSAGE 367800 END-IF 367900 MOVE OGP-OG-CD TO WT60-OG-CD(WX60-OGP-COUNT) 368000 MOVE OGP-LEGACY-ID TO WT60-LEGACY-ID(WX60-OGP-COUNT) 368100 PERFORM V-610-FETCH-READNEXT-VXJJ0OGP 368200 END-PERFORM. 368300 E-EXIT. 368400 EXIT. 368500 SUM11A V-900-READ-VXJJ0PPD SECTION. 25030000 SUM11A*---------------------------------------------------------------* 25040000 SUM11A* SECTION NAME : V-900-READ-VXJJ0PPD * 25050000 SUM11A* CALLED BY : B-980-AO-CREATE-OUTPUT * 25060000 SUM11A* CALLS : JLDB2E-DB2-ERROR * 25070000 SUM11A* : JLMSG-DISPLAY-MESSAGE * 25080000 SUM11A* FUNCTION : GET PROCUREMENT LEAD TIME FROM PPD TABLE * 25090000 SUM11A*---------------------------------------------------------------* 25100000 SUM11A V-900. 25110000 SUM11A*--- RETRIEVE THE LEAD TIME FOR PBL PRODUCTS 25130000 SUM11A EXEC SQL 25140000 SUM11A SELECT DAYS(REQ_DEL_DT) - DAYS(CALC_RUN_DT), 25150000 SUM11A CALC_RUN_TM 25150000 SUM11A INTO 25160000 SUM11A :WW10-LEADTIME-DAYS, 25160000 SUM11A :PPD-CALC-RUN-TM 25160000 SUM11A FROM VXJJ0PPD 25170000 SUM11A WHERE STK_CTR_NO = :PPD-STK-CTR-NO SUM11A AND BPR_TPN = :PPD-BPR-TPN SUM11A AND REQ_DEL_DT = :PPD-REQ-DEL-DT SUM11A AND LM_PROD_PROC_IND = "2" SUM11A AND ORD_TYPE = "F" SUM11A WITH UR SUM11A END-EXEC. 25190000 SUM11A EVALUATE SQLCODE 25210000 SUM11A WHEN 0 25220000 SUM11A SET PPD-FOUND TO TRUE 25220000 SUM11A MOVE PPD-CALC-RUN-TM TO WW10-PPD-CALC-RUN-TM 25220000 SUM11A ADD +1 TO WA01-PPD-READ SUM11A WHEN 100 25220000 SUM11A SET PPD-NOT-FOUND TO TRUE 25230000 SUM11A WHEN -811 25220000 SUM11A SET PPD-NOT-FOUND TO TRUE 25230000 SUM11A WHEN OTHER 25250000 SUM11A MOVE "V-900-READ-VXJJ0PPD " 25260000 SUM11A TO JLDB2E-PROCESS-NAME 25270000 SUM11A PERFORM JLDB2E-DB2-ERROR 25280000 SUM11A SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 SUM11A PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SUM11A END-EVALUATE. 25310000 SUM11A 25320000 SUM11A V-900-EXIT. 27760000 SUM11A EXIT. 27770000 368600 250300 V-100-READ-VXJJ0PAR SECTION. 25030000 250400*---------------------------------------------------------------* 25040000 250500* SECTION NAME : V-100-READ-VXJJ0PAR * 25050000 250600* CALLED BY : A-100-INITIALIZE * 25060000 250700* CALLS : JLDB2E-DB2-ERROR * 25070000 250800* : JLMSG-DISPLAY-MESSAGE * 25080000 250900* FUNCTION : 1. READS COMPANY LEVEL CONTROLS FROM PAR TABLE* 25090000 251000*---------------------------------------------------------------* 25100000 251100 V-100. 25110000 251200 25120000 251300*--- RETRIEVE THE STANDARD DEVELOPMENT LINE SAFETY STOCK % CONTROL25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "SDEVSAFE" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-SDEVSAFE 25240000 252500 ELSE 25250000 252600 MOVE "V-100-READ-VXJJ0PAR - SDEVSAFE" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 253300*--- RETRIEVE THE MEDIUM DEVELOPMENT LINE SAFETY STOCK % CONTROL 25330000 253400 EXEC SQL 25340000 253500 SELECT JJ_PARAM_DATA 25350000 253600 INTO :PAR-JJ-PARAM-DATA 25360000 253700 FROM VXJJ0PAR 25370000 253800 WHERE JJ_PARAM_KEY = "MDEVSAFE" 25380000 WITH UR 253900 END-EXEC. 25390000 254000 25400000 254100 IF SQLCODE = 0 25410000 254200 THEN 25420000 254300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25430000 254400 MOVE WF01-CO-LVL-CNTLS TO WF01-MDEVSAFE 25440000 254500 ELSE 25450000 254600 MOVE "V-100-READ-VXJJ0PAR - MDEVSAFE" 25460000 254700 TO JLDB2E-PROCESS-NAME 25470000 254800 PERFORM JLDB2E-DB2-ERROR 25480000 254900 SET JLMSG-C99-DB2-ERROR TO TRUE 25490000 255000 PERFORM JLMSG-DISPLAY-MESSAGE 25500000 255100 END-IF. 25510000 255200 25520000 255300*--- RETRIEVE THE LARGE DEVELOPMENT LINE SAFETY STOCK % CONTROL 25530000 255400 EXEC SQL 25540000 255500 SELECT JJ_PARAM_DATA 25550000 255600 INTO :PAR-JJ-PARAM-DATA 25560000 255700 FROM VXJJ0PAR 25570000 255800 WHERE JJ_PARAM_KEY = "LDEVSAFE" 25580000 WITH UR 255900 END-EXEC. 25590000 256000 25600000 256100 IF SQLCODE = 0 25610000 256200 THEN 25620000 256300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25630000 256400 MOVE WF01-CO-LVL-CNTLS TO WF01-LDEVSAFE 25640000 256500 ELSE 25650000 256600 MOVE "V-100-READ-VXJJ0PAR - LDEVSAFE" 25660000 256700 TO JLDB2E-PROCESS-NAME 25670000 256800 PERFORM JLDB2E-DB2-ERROR 25680000 256900 SET JLMSG-C99-DB2-ERROR TO TRUE 25690000 257000 PERFORM JLMSG-DISPLAY-MESSAGE 25700000 257100 END-IF. 25710000 257200 25720000 257300*--- RETRIEVE THE PROMOTIONAL LINE SAFETY STOCK % CONTROL 25730000 257400 EXEC SQL 25740000 257500 SELECT JJ_PARAM_DATA 25750000 257600 INTO :PAR-JJ-PARAM-DATA 25760000 257700 FROM VXJJ0PAR 25770000 257800 WHERE JJ_PARAM_KEY = "PROMSAFE" 25780000 WITH UR 257900 END-EXEC. 25790000 258000 25800000 258100 IF SQLCODE = 0 25810000 258200 THEN 25820000 258300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25830000 258400 MOVE WF01-CO-LVL-CNTLS TO WF01-PROMSAFE 25840000 258500 ELSE 25850000 258600 MOVE "V-100-READ-VXJJ0PAR - PROMSAFE" 25860000 258700 TO JLDB2E-PROCESS-NAME 25870000 258800 PERFORM JLDB2E-DB2-ERROR 25880000 258900 SET JLMSG-C99-DB2-ERROR TO TRUE 25890000 259000 PERFORM JLMSG-DISPLAY-MESSAGE 25900000 259100 END-IF. 25910000 259200 25920000 270400*--- RETRIEVE THE NON STOCK FILL ROUNDING % OF A CASE CONTROL 27040000 270500 EXEC SQL 27050000 270600 SELECT JJ_PARAM_DATA 27060000 270700 INTO :PAR-JJ-PARAM-DATA 27070000 270800 FROM VXJJ0PAR 27080000 270900 WHERE JJ_PARAM_KEY = "NSFRDCAS" 27090000 WITH UR 271000 END-EXEC. 27100000 271100 27110000 271200 IF SQLCODE = 0 27120000 271300 THEN 27130000 271400 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 27140000 271500 MOVE WF01-CO-LVL-CNTLS TO WF01-NSFRDCAS 27150000 271600 ELSE 27160000 271700 MOVE "V-100-READ-VXJJ0PAR - NSFRDCAS" 27170000 271800 TO JLDB2E-PROCESS-NAME 27180000 271900 PERFORM JLDB2E-DB2-ERROR 27190000 272000 SET JLMSG-C99-DB2-ERROR TO TRUE 27200000 272100 PERFORM JLMSG-DISPLAY-MESSAGE 27210000 272200 END-IF. 27220000 272300 27230000 272400*--- RETRIEVE THE NO OF DAYS SALES FOR OOT CHECK CONTROL 27240000 272500 EXEC SQL 27250000 272600 SELECT JJ_PARAM_DATA 27260000 272700 INTO :PAR-JJ-PARAM-DATA 27270000 272800 FROM VXJJ0PAR 27280000 272900 WHERE JJ_PARAM_KEY = "OOTCHECK" 27290000 WITH UR 273000 END-EXEC. 27300000 273100 27310000 273200 IF SQLCODE = 0 27320000 273300 THEN 27330000 273400 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 27340000 273500 MOVE WF01-CO-LVL-CNTLS TO WF01-OOTCHECK 27350000 273600 ELSE 27360000 273700 MOVE "V-100-READ-VXJJ0PAR - OOTCHECK" 27370000 273800 TO JLDB2E-PROCESS-NAME 27380000 273900 PERFORM JLDB2E-DB2-ERROR 27390000 274000 SET JLMSG-C99-DB2-ERROR TO TRUE 27400000 274100 PERFORM JLMSG-DISPLAY-MESSAGE 27410000 274200 END-IF. 27420000 274300 27430000 274400*--- RETRIEVE THE NO OF WEEKS OF NWS AT WHICH %CAPACITY IS CAPPED 27440000 274500 EXEC SQL 27450000 274600 SELECT JJ_PARAM_DATA 27460000 274700 INTO :PAR-JJ-PARAM-DATA 27470000 274800 FROM VXJJ0PAR 27480000 274900 WHERE JJ_PARAM_KEY = "CAPCHECK" 27490000 WITH UR 275000 END-EXEC. 27500000 275100 27510000 275200 IF SQLCODE = 0 27520000 275300 THEN 27530000 275400 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 27540000 275500 MOVE WF01-CO-LVL-CNTLS TO WF01-CAPCHECK 27550000 275600 ELSE 27560000 275700 MOVE "V-100-READ-VXJJ0PAR - CAPCHECK" 27570000 275800 TO JLDB2E-PROCESS-NAME 27580000 275900 PERFORM JLDB2E-DB2-ERROR 27590000 276000 SET JLMSG-C99-DB2-ERROR TO TRUE 27600000 276100 PERFORM JLMSG-DISPLAY-MESSAGE 27610000 276200 END-IF. 27620000 276300 27630000 276400*--- RETRIEVE THE NO OF DAYS OF FORECAST OUTPUT TO BE CREATED FOR 27640000 276500*--- ORDER DIAGNOSTICS AND ALLOCATIONS (O02/O03/O04) 27650000 276600 EXEC SQL 27660000 276700 SELECT JJ_PARAM_DATA 27670000 276800 INTO :PAR-JJ-PARAM-DATA 27680000 276900 FROM VXJJ0PAR 27690000 277000 WHERE JJ_PARAM_KEY = "CONTDATA" 27700000 WITH UR 277100 END-EXEC. 27710000 277200 27720000 277300 IF SQLCODE = 0 27730000 277400 THEN 27740000 277410 MOVE PAR-JJ-PARAM-DATA TO WF01-LEADTIMES 27741000 277430 ELSE 27743000 277440 MOVE "V-100-READ-VXJJ0PAR - CONTDATA" 27744000 277450 TO JLDB2E-PROCESS-NAME 27745000 277460 PERFORM JLDB2E-DB2-ERROR 27746000 277470 SET JLMSG-C99-DB2-ERROR TO TRUE 27747000 277480 PERFORM JLMSG-DISPLAY-MESSAGE 27748000 277490 END-IF. 27749000 277500 27750000 397800 397900*--- RETRIEVE THE DOUBLE KNOCK ON SAFETY STOCK PROCESSING FLAG 398000 EXEC SQL 398100 SELECT JJ_PARAM_DATA 398200 INTO :PAR-JJ-PARAM-DATA 398300 FROM VXJJ0PAR 398400 WHERE JJ_PARAM_KEY = "DKSSONOF" WITH UR 398500 END-EXEC. 398600 398700 IF SQLCODE = 0 398800 THEN 398900 MOVE PAR-JJ-PARAM-DATA TO WI01-PROCESS-DKSS-FLAG *----- 07/09/2000 - GM -----------------------------------------* 137900 MOVE WI01-PROCESS-DKSS-FLAG TO WM22-PARDKSS 13790000 137900 MOVE WM22-PAR-DKSS-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 *---------------------------------------------------------------* 399000 ELSE 399100 MOVE "V-100-READ-VXJJ0PAR - DKSSONOF" 399200 TO JLDB2E-PROCESS-NAME 399300 PERFORM JLDB2E-DB2-ERROR 399400 SET JLMSG-C99-DB2-ERROR TO TRUE 399500 PERFORM JLMSG-DISPLAY-MESSAGE 399600 END-IF. 399700 430700*--- RETRIEVE THE AM EXPIRY DATE PARAMETER 430800 EXEC SQL 430900 SELECT JJ_PARAM_DATA 431000 INTO :PAR-JJ-PARAM-DATA 431100 FROM VXJJ0PAR 431200 WHERE JJ_PARAM_KEY = "EXPDATAM" WITH UR 431300 END-EXEC. 431400 431500 IF SQLCODE = 0 431600 THEN 431700 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 431800 MOVE WF01-CO-LVL-CNTLS TO WF01-EXPDATAM 431900 ELSE 432000 MOVE "V-100-READ-VXJJ0PAR - EXPDATAM" 432100 TO JLDB2E-PROCESS-NAME 432200 PERFORM JLDB2E-DB2-ERROR 432300 SET JLMSG-C99-DB2-ERROR TO TRUE 432400 PERFORM JLMSG-DISPLAY-MESSAGE 432500 END-IF. 432600 432700*--- RETRIEVE THE PM EXPIRY DATE PARAMETER 432800 EXEC SQL 432900 SELECT JJ_PARAM_DATA 433000 INTO :PAR-JJ-PARAM-DATA 433100 FROM VXJJ0PAR 433200 WHERE JJ_PARAM_KEY = "EXPDATPM" WITH UR 433300 END-EXEC. 433400 433500 IF SQLCODE = 0 433600 THEN 433700 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 433800 MOVE WF01-CO-LVL-CNTLS TO WF01-EXPDATPM 433900 ELSE 434000 MOVE "V-100-READ-VXJJ0PAR - EXPDATPM" 434100 TO JLDB2E-PROCESS-NAME 434200 PERFORM JLDB2E-DB2-ERROR 434300 SET JLMSG-C99-DB2-ERROR TO TRUE 434400 PERFORM JLMSG-DISPLAY-MESSAGE 434500 END-IF. 434600 473602*----- 27/03/2001 - GM ---------------------------------------* 47360200 473603* CONTROL FROM PAR REPLACED WITH 'FULL' CONTROL FROM INPUT * 47360300 473604* PERFORM V-105-READ-VXJJ0PAR-TEMP. 47360400 276400*--------------------------------------------------------------* 27640000 277500 27750000 038810*----- 10/07/2000 RETRIEVE C CAPACITY % ----------------------* 02 432800 EXEC SQL 432900 SELECT JJ_PARAM_DATA 433000 INTO :PAR-JJ-PARAM-DATA 433100 FROM VXJJ0PAR 433200 WHERE JJ_PARAM_KEY = "CCAPPC" WITH UR 433300 END-EXEC. 433400 433500 IF SQLCODE = 0 433600 THEN 433700 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 433800 MOVE WF01-CO-LVL-CNTLS TO WF01-CCAPPC 433900 ELSE 434000 MOVE "V-100-READ-VXJJ0PAR - CCAPPC" 434100 TO JLDB2E-PROCESS-NAME 434200 PERFORM JLDB2E-DB2-ERROR 434300 SET JLMSG-C99-DB2-ERROR TO TRUE 434400 PERFORM JLMSG-DISPLAY-MESSAGE 434500 END-IF. 038810*----- 10/07/2000 END ----------------------------------------* 02 038810*----- 25/10/2000 - GM -----------------------------------------* 02 432800 EXEC SQL 432900 SELECT JJ_PARAM_DATA 433000 INTO :PAR-JJ-PARAM-DATA 433100 FROM VXJJ0PAR 433200 WHERE JJ_PARAM_KEY = "OCMEDDAY" WITH UR 433300 END-EXEC. 433400 433500 IF SQLCODE = 0 433600 THEN 433700 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 433800 MOVE WF01-CO-LVL-CNTLS TO WF01-OCMEDDAY 433900 ELSE 434000 MOVE "V-100-READ-VXJJ0PAR - OCMEDDAY" 434100 TO JLDB2E-PROCESS-NAME 434200 PERFORM JLDB2E-DB2-ERROR 434300 SET JLMSG-C99-DB2-ERROR TO TRUE 434400 PERFORM JLMSG-DISPLAY-MESSAGE 434500 END-IF. 432800 432800 EXEC SQL 432900 SELECT JJ_PARAM_DATA 433000 INTO :PAR-JJ-PARAM-DATA 433100 FROM VXJJ0PAR 433200 WHERE JJ_PARAM_KEY = "OCMEDCAP" WITH UR 433300 END-EXEC. 433400 433500 IF SQLCODE = 0 433600 THEN 433700 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 433800 MOVE WF01-CO-LVL-CNTLS TO WF01-OCMEDCAP 433900 ELSE 434000 MOVE "V-100-READ-VXJJ0PAR - OCMEDCAP" 434100 TO JLDB2E-PROCESS-NAME 434200 PERFORM JLDB2E-DB2-ERROR 434300 SET JLMSG-C99-DB2-ERROR TO TRUE 434400 PERFORM JLMSG-DISPLAY-MESSAGE 434500 END-IF. 277800*---------------------------------------------------------------* 27780000 038810*----- 30/07/2001 EXCLUDE ANTICIPATED WASTE TIME -------------* 02 432800 EXEC SQL 432900 SELECT JJ_PARAM_DATA 433000 INTO :PAR-JJ-PARAM-DATA 433100 FROM VXJJ0PAR 433200 WHERE JJ_PARAM_KEY = "AAWCTIME" WITH UR 433300 END-EXEC. 433400 433500 EVALUATE SQLCODE 433600 WHEN +0 433700 MOVE PAR-JJ-PARAM-DATA TO WF01-EXCL-WASTE-TM 433600 WHEN +100 433700 MOVE 00000300 TO WF01-EXCLWSTM 289446 MOVE WM27-PAR-NOT-FOUND TO JLMSG-TEXT 28944600 289448 PERFORM JLMSG-DISPLAY-MESSAGE 28944800 433900 WHEN OTHER 434000 MOVE "V-100-READ-VXJJ0PAR - AAWCTIME" 434100 TO JLDB2E-PROCESS-NAME 434200 PERFORM JLDB2E-DB2-ERROR 434300 SET JLMSG-C99-DB2-ERROR TO TRUE 434400 PERFORM JLMSG-DISPLAY-MESSAGE 434500 END-EVALUATE. 277800 27780000 CRV10B*---------------------------------------------------------------* 27780000 CRV10B*----- 04/09/2002 MAX DEMAND PERIOD IN DAYS FOR ORDER UP TO --* 02 CRV10B EXEC SQL CRV10B SELECT JJ_PARAM_DATA CRV10B INTO :PAR-JJ-PARAM-DATA CRV10B FROM VXJJ0PAR CRV10B WHERE JJ_PARAM_KEY = "OUP2MXDD" CRV10B WITH UR CRV10B END-EXEC. CRV10B CRV10B IF SQLCODE = 0 CRV10B THEN CRV10B MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL CRV10B MOVE WF01-CO-LVL-CNTLS TO WF01-OUP2MDD CRV10B ELSE CRV10B MOVE "V-100-READ-VXJJ0PAR - OUP2MXDD" CRV10B TO JLDB2E-PROCESS-NAME CRV10B PERFORM JLDB2E-DB2-ERROR CRV10B SET JLMSG-C99-DB2-ERROR TO TRUE CRV10B PERFORM JLMSG-DISPLAY-MESSAGE CRV10B END-IF. CRV10B CRV10B*---------------------------------------------------------------* 27780000 CRV10B*----- 30/09/2002 TI ORDER ROUNDING EFFECT % -----------------* 02 CRV10B EXEC SQL CRV10B SELECT JJ_PARAM_DATA CRV10B INTO :PAR-JJ-PARAM-DATA CRV10B FROM VXJJ0PAR CRV10B WHERE JJ_PARAM_KEY = "TIRNDEFF" CRV10B WITH UR CRV10B END-EXEC. CRV10B CRV10B IF SQLCODE = 0 CRV10B THEN CRV10B MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL CRV10B MOVE WF01-CO-LVL-CNTLS TO WF01-TIRNDEFF CRV10B ELSE CRV10B MOVE "V-100-READ-VXJJ0PAR - TIRNDEFF" CRV10B TO JLDB2E-PROCESS-NAME CRV10B PERFORM JLDB2E-DB2-ERROR CRV10B SET JLMSG-C99-DB2-ERROR TO TRUE CRV10B PERFORM JLMSG-DISPLAY-MESSAGE CRV10B END-IF. CRV10B 27780000 *---------------------------------------------------------------* 27780000 *----- DEFAULT WASTE MAPPING HOURS FOR AVAIABILITY OPTIMISED ---* 02 *------ORDER CALC ---* 02 *---------------- ORDER CALC -----------------------------------* 02 EXEC SQL SELECT JJ_PARAM_DATA INTO :PAR-JJ-PARAM-DATA FROM VXJJ0PAR WHERE JJ_PARAM_KEY = "AOORWHRS" WITH UR END-EXEC IF SQLCODE = 0 THEN MOVE PAR-JJ-PARAM-DATA TO WF01-OPT-ORDER-HRS-X MOVE WF01-OPT-ORDER-HRS TO WW09-WASTE-MAPPING-HOURS ELSE MOVE "V-100-READ-VXJJ0PAR - AOORWHRS" TO JLDB2E-PROCESS-NAME PERFORM JLDB2E-DB2-ERROR SET JLMSG-C99-DB2-ERROR TO TRUE PERFORM JLMSG-DISPLAY-MESSAGE END-IF 27780000 *---------------------------------------------------------------* 27780000 *----- DEFAULT K FACTOR FOR AVAIABILITY OPTIMISED ORDER CALC --* 02 *---------------------------------------------------------------* 02 EXEC SQL SELECT JJ_PARAM_DATA INTO :PAR-JJ-PARAM-DATA FROM VXJJ0PAR WHERE JJ_PARAM_KEY = "AOORKFAC" WITH UR END-EXEC IF SQLCODE = 0 THEN MOVE PAR-JJ-PARAM-DATA TO WF01-K-FACTOR-X MOVE WF01-K-FACTOR TO WW09-K-FACTOR ELSE MOVE "V-100-READ-VXJJ0PAR - AOORKFAC" TO JLDB2E-PROCESS-NAME 24330000 PERFORM JLDB2E-DB2-ERROR 24340000 SET JLMSG-C99-DB2-ERROR TO TRUE 24350000 PERFORM JLMSG-DISPLAY-MESSAGE 24360000 END-IF 24370000 CRV10B 24380000 SUM09A*---------------------------------------------------------------* 24390000 SUM09A*----- MINIMUM SALES RATE THRESHOLD FOR THE OPTIMISED --* 24400000 SUM09A*----- ORDER CALC --* 24410000 SUM09A*---------------------------------------------------------------* 24420000 SUM09A EXEC SQL 24430000 SUM09A SELECT JJ_PARAM_DATA 24440000 SUM09A INTO :PAR-JJ-PARAM-DATA 24450000 SUM09A FROM VXJJ0PAR 24460000 SUM09A WHERE JJ_PARAM_KEY = "MINCICRP" 24470000 SUM09A WITH UR 24480000 SUM09A END-EXEC 24490000 SUM09A 24500000 SUM09A IF SQLCODE = 0 24510000 SUM09A THEN 24520000 SUM09A MOVE PAR-JJ-PARAM-DATA TO WF01-MIN-SALES-THRESHOLD-X 24530000 SUM09A ELSE 24560000 SUM09A MOVE "V-100-READ-VXJJ0PAR - MINCICRP" 24570000 TO JLDB2E-PROCESS-NAME PERFORM JLDB2E-DB2-ERROR SET JLMSG-C99-DB2-ERROR TO TRUE PERFORM JLMSG-DISPLAY-MESSAGE END-IF CRV10B AUT06B*---------------------------------------------------------------* 27780000 SUM09A*----- DEFAULT ROTATION PERCENTAGE TYPE FOR THE OPTIMISED --* 24650000 AUT06B*----- ORDER CALC --* 02 AUT06B*---------------------------------------------------------------* 02 AUT06B EXEC SQL AUT06B SELECT JJ_PARAM_DATA AUT06B INTO :PAR-JJ-PARAM-DATA AUT06B FROM VXJJ0PAR SUM09A WHERE JJ_PARAM_KEY = "ROTTYPE" 24720000 AUT06B WITH UR AUT06B END-EXEC AUT06B AUT06B IF SQLCODE = 0 AUT06B THEN SUM09A MOVE PAR-JJ-PARAM-DATA TO WF01-ROTTYPE-X 24780000 AUT06B ELSE SUM09A MOVE "V-100-READ-VXJJ0PAR - ROTTYPE" 24820000 AUT06B TO JLDB2E-PROCESS-NAME AUT06B PERFORM JLDB2E-DB2-ERROR AUT06B SET JLMSG-C99-DB2-ERROR TO TRUE AUT06B PERFORM JLMSG-DISPLAY-MESSAGE AUT06B END-IF SUM10A*---------------------------------------------------------------* 27780000 SUM10A*----- GET THE PARAMETER TO CONTROL THE USE OF BFFO LOGIC --* 24650000 SUM10A*----- FOR FORECAST ORDERS. --* 02 SUM10A*---------------------------------------------------------------* 02 SUM10C SUM10C MOVE JL01X-DATABASE-ID TO WW16-BFFO-DATABASE-ID. SUM10C MOVE WW16-BFFOFCST-KEY TO PAR-JJ-PARAM-KEY. SUM10C SUM10A EXEC SQL SUM10A SELECT JJ_PARAM_DATA SUM10A INTO :PAR-JJ-PARAM-DATA SUM10A FROM VXJJ0PAR SUM10A WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY 24720000 SUM10A WITH UR SUM10A END-EXEC. SUM10A SUM10A IF SQLCODE = 0 SUM10A THEN SUM10A MOVE PAR-JJ-PARAM-DATA TO WF01-BFFOFCST-X 24780000 SUM10A ELSE SUM10A MOVE "V-100-READ-VXJJ0PAR - BFFOFCST" 24820000 SUM10A TO JLDB2E-PROCESS-NAME SUM10A PERFORM JLDB2E-DB2-ERROR SUM10A SET JLMSG-C99-DB2-ERROR TO TRUE SUM10A PERFORM JLMSG-DISPLAY-MESSAGE SUM10A END-IF CRV10B SUM11A*---------------------------------------------------------------* 27780000 SUM11A*----- GET THE PARAMETER TO CONTROL THE USE OF BFFO LOGIC --* 24650000 SUM11A*----- FOR FORECAST ORDERS. --* 02 SUM11A*---------------------------------------------------------------* 02 SUM11A SUM11A MOVE JL01X-DATABASE-ID TO WW17-BGO-DATABASE-ID. SUM11A MOVE WW17-BGOCALC-KEY TO PAR-JJ-PARAM-KEY. SUM11A SUM11A EXEC SQL SUM11A SELECT JJ_PARAM_DATA SUM11A INTO :PAR-JJ-PARAM-DATA SUM11A FROM VXJJ0PAR SUM11A WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY 24720000 SUM11A WITH UR SUM11A END-EXEC. SUM11A SUM11A IF SQLCODE = 0 SUM11A THEN SUM11A MOVE PAR-JJ-PARAM-DATA TO WF01-BGOCALC-X 24780000 SUM11A ELSE SUM11A MOVE "V-100-READ-VXJJ0PAR - BGOCALC" 24820000 SUM11A TO JLDB2E-PROCESS-NAME SUM11A PERFORM JLDB2E-DB2-ERROR SUM11A SET JLMSG-C99-DB2-ERROR TO TRUE SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-IF SUM11A SUM11A*---------------------------------------------------------------* 27780000 SUM13A*----- GET THE PARAMETER TO CONTROL THE USE OF RATIO PACK --* 24650000 SUM13A*----- LOGIC TO CALCULATE THE RP DETAILS. --* 02 SUM13A*---------------------------------------------------------------* 02 SUM13A SUM13A MOVE JL01X-DATABASE-ID TO WW28-RPKCALC-DATABASE-ID. SUM13A MOVE WW27-RPKCALC-KEY TO PAR-JJ-PARAM-KEY. SUM13A SUM13A EXEC SQL SUM13A SELECT JJ_PARAM_DATA SUM13A INTO :PAR-JJ-PARAM-DATA SUM13A FROM VXJJ0PAR SUM13A WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY 24720000 SUM13A WITH UR SUM13A END-EXEC. SUM13A SUM13A IF SQLCODE = 0 SUM13A THEN SUM13A MOVE PAR-JJ-PARAM-DATA TO WF01-RPKCALC 24780000 SUM13A MOVE 1 TO WX96-RPK-SUB 25230000 SUM13A PERFORM UNTIL WF01-RPKCALC-COLLID-X(WX96-RPK-SUB) SUM13A = WW28-RPKCALC-DATABASE-ID OR SUM13A WX96-RPK-SUB > 12 SUM13A ADD 1 TO WX96-RPK-SUB SUM13A END-PERFORM SUM13A SUM13A IF WF01-RPKCALC-COLLID-X(WX96-RPK-SUB) SUM13A = WW28-RPKCALC-DATABASE-ID SUM13A MOVE WF01-RPKCALC-OC-X(WX96-RPK-SUB) SUM13A TO WW01-RPKCALC-OC-X SUM13A MOVE WF01-RPKCALC-OF-X(WX96-RPK-SUB) SUM13A TO WW01-RPKCALC-OF-X SUM13A ELSE IF WX96-RPK-SUB > 12 SUM13A MOVE "V-100-READ-VXJJ0PAR - RPKCALC-DB ID IMPROPER" 24820000 SUM13A TO JLDB2E-PROCESS-NAME SUM13A PERFORM JLDB2E-DB2-ERROR SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE SUM13A PERFORM JLMSG-DISPLAY-MESSAGE SUM13A END-IF SUM13A ELSE SUM13A MOVE "V-100-READ-VXJJ0PAR - RPKCALC" 24820000 SUM13A TO JLDB2E-PROCESS-NAME SUM13A PERFORM JLDB2E-DB2-ERROR SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE SUM13A PERFORM JLMSG-DISPLAY-MESSAGE SUM13A END-IF SUM13A SPR14A*---------------------------------------------------------------* SPR14A* TO RETRIEVE POTENTIAL REDUCTION SALES % FROM VXJJ0PAR * SPR14A*---------------------------------------------------------------* SPR14A SPR14A EXEC SQL SPR14A SELECT JJ_PARAM_DATA SPR14A INTO :PAR-JJ-PARAM-DATA SPR14A FROM VXJJ0PAR SPR14A WHERE JJ_PARAM_KEY = "PTRDNDAY" SPR14A WITH UR SPR14A END-EXEC. SPR14A SPR14A IF SQLCODE = 0 SPR14A THEN SPR14A MOVE PAR-JJ-PARAM-DATA TO WF01-PTRDNDAY-X SPR14A ELSE SPR14A MOVE "V-100-READ-VXJJ0PAR - PTRDNDAY" spr14a TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-IF SUM11A*---------------------------------------------------------------* 27780000 SUM11A*----- GET THE DEFAULT PROCUREMENT ORDER LEAD TIME FROM PAR --* 24650000 SUM11A*----- FOR BGO ORDER CALC 24650000 SUM11A*---------------------------------------------------------------* 02 SUM11A EXEC SQL SUM11A SELECT JJ_PARAM_DATA SUM11A INTO :PAR-JJ-PARAM-DATA SUM11A FROM VXJJ0PAR SUM11A WHERE JJ_PARAM_KEY = "BGOLDTM" 24720000 SUM11A WITH UR SUM11A END-EXEC. SUM11A SUM11A IF SQLCODE = 0 SUM11A THEN SUM11A MOVE PAR-JJ-PARAM-DATA TO WF01-BGOLEADTM-X 24780000 SUM11A ELSE SUM11A MOVE "V-100-READ-VXJJ0PAR - BGOLDTM" 24820000 SUM11A TO JLDB2E-PROCESS-NAME SUM11A PERFORM JLDB2E-DB2-ERROR SUM11A SET JLMSG-C99-DB2-ERROR TO TRUE SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-IF SUM11A SUM11A*---------------------------------------------------------------* 27780000 SUM11A*----- GET THE MINIMUM STOCK TO PREVENT A GAP --* 24650000 SUM11A*---------------------------------------------------------------* 02 SUM11A EXEC SQL SUM11A SELECT JJ_PARAM_DATA SUM11A INTO :PAR-JJ-PARAM-DATA SUM11A FROM VXJJ0PAR SUM11A WHERE JJ_PARAM_KEY = "BGOMINGP" 24720000 SUM11A WITH UR SUM11A END-EXEC. SUM11A SUM11A IF SQLCODE = 0 SUM11A THEN SUM11A MOVE PAR-JJ-PARAM-DATA TO WF01-BGOMINGP-X 24780000 SUM11A ELSE SUM11A MOVE "V-100-READ-VXJJ0PAR - BGOMINGP" 24820000 SUM10A TO JLDB2E-PROCESS-NAME SUM10A PERFORM JLDB2E-DB2-ERROR SUM10A SET JLMSG-C99-DB2-ERROR TO TRUE SUM10A PERFORM JLMSG-DISPLAY-MESSAGE SUM10A END-IF CRV10B 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 022600* RETRIEVE THE TI VALUES FROM THE PAR TABLE FOR USE IN TRIAL 02260000 022600* IN THE FUTURE, THESE VALUES MAY BECOME REDUNDANT AS THE TI 02260000 022600* VALUE WILL BE CALCULATED DYNAMICALLY IN JL0F40. 02260000 277500 PERFORM V-107-READ-VXJJ0PAR-TI. 27750000 276400*--------------------------------------------------------------* 27640000 277800 27780000 *----- 31/08/2005 - GTM --------------------------------------* 07673001 * RETRIEVE THE SIMPLER REPLEN SAFETY STOCK TRIAL STORES/SG'S 07674001 * FROM THE PAR TABLE. 07675001 07676001 PERFORM V-108-READ-VXJJ0PAR-SRSST. 07677001 WIN06B 27780000 WIN06B*----- 07/12/2005 - AW --------------------------------------* 07673001 WIN06B* RETRIEVE THE CODE LIFE DEFAULT VALUES FOR DOTCOM STORES 07674001 WIN06B* FROM THE PAR TABLE. 07675001 WIN06B 07676001 WIN06A PERFORM V-106-READ-VXJJ0PAR-DOTCOMCL. 07677001 SPR11B* RETRIEVE THE PICKEXP DEPLOYMENT STATUS FROM PAR TABLE. 07674001 SPR11B 07676001 SPR11B PERFORM YYY-100-READ-VXJJ0PAR. 07677001 SPR11B 07676001 SPR12A*--- RETRIEVE THE DISPLAY SENSITIVITY VALUE FROM PAR TABLE ------*25130000 SPR12A EXEC SQL 25140000 SPR12A SELECT JJ_PARAM_DATA 25150000 SPR12A INTO :PAR-JJ-PARAM-DATA 25160000 SPR12A FROM VXJJ0PAR 25170000 SPR12A WHERE JJ_PARAM_KEY = "BFFODS" 25180000 WITH UR SPR12A END-EXEC. 25190000 SPR12A 25200000 SPR12A IF SQLCODE = 0 25210000 SPR12A THEN 25220000 SPR12A MOVE PAR-JJ-PARAM-DATA TO WF01-BFFODS-X 25230000 SPR12A ELSE 25250000 SPR12A MOVE "V-100-READ-VXJJ0PAR - BFFODS" 25260000 SPR12A TO JLDB2E-PROCESS-NAME 25270000 SPR12A PERFORM JLDB2E-DB2-ERROR 25280000 SPR12A SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 SPR12A PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SPR12A END-IF. 25310000 SPR12A*--- RETRIEVE THE FUTURE FILL TARGET % VALUE FROM PAR TABLE -----*25130000 SPR12A EXEC SQL 25140000 SPR12A SELECT JJ_PARAM_DATA 25150000 SPR12A INTO :PAR-JJ-PARAM-DATA 25160000 SPR12A FROM VXJJ0PAR 25170000 SPR12A WHERE JJ_PARAM_KEY = "BFFOFEAF" 25180000 WITH UR SPR12A END-EXEC. 25190000 SPR12A 25200000 SPR12A IF SQLCODE = 0 25210000 SPR12A THEN 25220000 SPR12A MOVE PAR-JJ-PARAM-DATA TO WF01-BFFOFEAF-X 25230000 SPR12A ELSE 25250000 SPR12A MOVE "V-100-READ-VXJJ0PAR - BFFOFEAF" 25260000 SPR12A TO JLDB2E-PROCESS-NAME 25270000 SPR12A PERFORM JLDB2E-DB2-ERROR 25280000 SPR12A SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 SPR12A PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SPR12A END-IF. 25310000 SPR12A*--- RETRIEVE THE BFFO ONE TOUCH VALUE FROM PAR TABLE -----------*25130000 SPR12A EXEC SQL 25140000 SPR12A SELECT JJ_PARAM_DATA 25150000 SPR12A INTO :PAR-JJ-PARAM-DATA 25160000 SPR12A FROM VXJJ0PAR 25170000 SPR12A WHERE JJ_PARAM_KEY = "BFFO1TCH" 25180000 WITH UR SPR12A END-EXEC. 25190000 SPR12A 25200000 SPR12A IF SQLCODE = 0 25210000 SPR12A THEN 25220000 SPR12A MOVE PAR-JJ-PARAM-DATA TO WF01-BFFO1TCH-X 25230000 SPR12A ELSE 25250000 SPR12A MOVE "V-100-READ-VXJJ0PAR - BFFO1TCH" 25260000 SPR12A TO JLDB2E-PROCESS-NAME 25270000 SPR12A PERFORM JLDB2E-DB2-ERROR 25280000 SPR12A SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 SPR12A PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SPR12A END-IF. 25310000 251200 25120000 SUM13A*--- RETRIEVE THE PROCUREMENT TRAP PROCESSING CONTROL------------*25130000 SUM13A SET NOT-PROCTRAP-PROCESSING TO TRUE. 25140000 SUM13A EXEC SQL 25140000 SUM13A SELECT JJ_PARAM_DATA 25150000 SUM13A INTO :PAR-JJ-PARAM-DATA 25160000 SUM13A FROM VXJJ0PAR 25170000 SUM13A WHERE JJ_PARAM_KEY = "CRPROTRP" 25180000 SUM13A WITH UR SUM13A END-EXEC. 25190000 SUM13A 25200000 SUM13A IF SQLCODE = 0 25210000 SUM13A THEN 25220000 SUM13A MOVE PAR-JJ-PARAM-DATA TO WF01-PROCTRAP 25230000 SUM13A EVALUATE WF01-PROCTRAP-CTRL 25230000 SUM13A WHEN "ON " 25230000 SUM13A SET PROCTRAP-PROCESSING TO TRUE 25230000 SUM13A WHEN "OFF " 25230000 SUM13A SET NOT-PROCTRAP-PROCESSING TO TRUE 25230000 SUM13A WHEN OTHER 25230000 SUM13A DISPLAY "F30:I: PROCTRAP PAR INVALID" SUM13A SET NOT-PROCTRAP-PROCESSING TO TRUE 25230000 SUM13A END-EVALUATE 25230000 SUM13A ELSE 25250000 SUM13A DISPLAY "F30:I: NO PROCTRAP PAR - DEFAULTED TO OFF" 15770016 SUM13A SET NOT-PROCTRAP-PROCESSING TO TRUE 25230000 SUM13A END-IF. 25310000 SUM13A 27750000 PP2S05*--- RETRIEVE THE MAX CASE PERCENTAGE FROM PAR TABLE 25130000 PP2S05 EXEC SQL 25140000 PP2S05 SELECT JJ_PARAM_DATA 25150000 PP2S05 INTO :PAR-JJ-PARAM-DATA 25160000 PP2S05 FROM VXJJ0PAR 25170000 PP2S05 WHERE JJ_PARAM_KEY = "BGOMAXCS" 25180000 PP2S05 WITH UR PP2S05 END-EXEC. 25190000 PP2S05 25200000 PP2S05 IF SQLCODE = 0 25210000 PP2S05 THEN 25220000 PP2S05 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 PP2S05 MOVE WF01-CO-LVL-CNTLS TO WF01-BGOMAXCS 25240000 PP2S05 ELSE 25250000 PP2S05 MOVE "V-100-READ-VXJJ0PAR - BGOMAXCS" 25260000 PP2S05 TO JLDB2E-PROCESS-NAME 25270000 PP2S05 PERFORM JLDB2E-DB2-ERROR 25280000 PP2S05 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 PP2S05 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SUM13A END-IF. 25310000 251200 25120000 SM2S13 SM2S13*--- RETRIEVE THE MARGIN OF ERROR FROM PAR TABLE 25130000 SM2S13 25130000 SM2S13 EXEC SQL 25140000 SM2S13 SELECT JJ_PARAM_DATA 25150000 SM2S13 INTO :PAR-JJ-PARAM-DATA 25160000 SM2S13 FROM VXJJ0PAR 25170000 SM2S13 WHERE JJ_PARAM_KEY = "BGOMOE" 25180000 SM2S13 WITH UR SM2S13 END-EXEC. 25190000 SM2S13 25200000 SM2S13 IF SQLCODE = 0 25210000 SM2S13 THEN 25220000 SM2S13 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL SM2S13 MOVE WF01-CO-LVL-CNTLS TO WF01-BGOMOE SM2S13 ELSE 25250000 SM2S13 MOVE "V-100-READ-VXJJ0PAR - BGOMOE" 25260000 SM2S13 TO JLDB2E-PROCESS-NAME 25270000 SM2S13 PERFORM JLDB2E-DB2-ERROR 25280000 SM2S13 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 SM2S13 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 SM2S13 END-IF. 25310000 SM2S13 PS2S11 MOVE "OFUGRID" TO WF01-OFUGRID 24450000 PS2S11 MOVE JL01X-DATABASE-ID TO WF01-STREAM 24450000 PS2S11 MOVE WF01-OFUGRID-KEY TO PAR-JJ-PARAM-KEY 24450000 PS2S11 27750000 PS2S11*--- RETRIEVE THE OFUGRID#FOR OFU FUNCTIONALITY 25130000 PS2S11 EXEC SQL 25140000 PS2S11 SELECT JJ_PARAM_DATA 25150000 PS2S11 INTO :PAR-JJ-PARAM-DATA 25160000 PS2S11 FROM VXJJ0PAR 25170000 PS2S11 WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY 25180000 PS2S11 WITH UR PS2S11 END-EXEC. 25190000 PS2S11 25200000 PS2S11 IF SQLCODE = 0 25210000 PS2S11 THEN 25220000 PS2S11 MOVE PAR-JJ-PARAM-DATA TO WF01-OFUGRID-SWITCH 25230000 PS2S11 ELSE 25250000 PS2S11 MOVE "V-100-READ-VXJJ0PAR - OFUGRID#" 25260000 PS2S11 TO JLDB2E-PROCESS-NAME 25270000 PS2S11 PERFORM JLDB2E-DB2-ERROR 25280000 PS2S11 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 PS2S11 END-IF. 25310000 PS2S11 27750000 AVRS42 MOVE "NEWKFAC" TO WF01-NEWKFAC AVRS42 MOVE JL01X-DATABASE-ID TO WF01-STRM AVRS42 MOVE WF01-NEWKFAC-KEY TO PAR-JJ-PARAM-KEY AVRS42 AVRS42*--- RETRIEVE THE NEWKFAC# FOR K-FACTOR TRAILS AVRS42 EXEC SQL AVRS42 SELECT JJ_PARAM_DATA AVRS42 INTO :PAR-JJ-PARAM-DATA AVRS42 FROM VXJJ0PAR AVRS42 WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY AVRS42 WITH UR AVRS42 END-EXEC. AVRS42 AVRS42 IF SQLCODE = 0 AVRS42 THEN AVRS42 MOVE PAR-JJ-PARAM-DATA TO WF01-K-FACT-TRAIL AVRS42 ELSE AVRS42 MOVE "V-100-READ-VXJJ0PAR - NEWKFAC#" AVRS42 TO JLDB2E-PROCESS-NAME AVRS42 PERFORM JLDB2E-DB2-ERROR AVRS42 SET JLMSG-C99-DB2-ERROR TO TRUE AVRS42 PERFORM JLMSG-DISPLAY-MESSAGE AVRS42 END-IF. AVRS42 AVRS42*--- RETRIEVE THE K-MAX FROM PAR TO MULTIPLY WITH K-MAX VALUE OF AVRS42*--- CUSTOMER TREND FILE WHEN ORDERING FOR FUTURE UNCERTINITY IS AVRS42*--- ON. AVRS42 AVRS42 EXEC SQL AVRS42 SELECT JJ_PARAM_DATA AVRS42 INTO :PAR-JJ-PARAM-DATA AVRS42 FROM VXJJ0PAR AVRS42 WHERE JJ_PARAM_KEY = "OFFUKMAX" AVRS42 WITH UR AVRS42 END-EXEC. AVRS42 AVRS42 IF SQLCODE = 0 AVRS42 THEN AVRS42 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL AVRS42 MOVE WF01-CO-LVL-CNTLS TO WF01-OFFUKMAX AVRS42 ELSE AVRS42 MOVE "V-100-READ-VXJJ0PAR - OFFUKMAX" AVRS42 TO JLDB2E-PROCESS-NAME AVRS42 PERFORM JLDB2E-DB2-ERROR AVRS42 SET JLMSG-C99-DB2-ERROR TO TRUE AVRS42 PERFORM JLMSG-DISPLAY-MESSAGE AVRS42 END-IF. KS2S45 KS2S45 MOVE "SLOWSEL" TO WF01-SLOWSEL KS2S45 MOVE JL01X-DATABASE-ID TO WF01-STREM KS2S45 MOVE WF01-SLOWSEL-KEY TO PAR-JJ-PARAM-KEY KS2S45 KS2S45*--- RETRIEVE THE SLOWSEL# FOR BFFO SLOW SELLER KS2S45 EXEC SQL KS2S45 SELECT JJ_PARAM_DATA KS2S45 INTO :PAR-JJ-PARAM-DATA KS2S45 FROM VXJJ0PAR KS2S45 WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY KS2S45 WITH UR KS2S45 END-EXEC. KS2S45 KS2S45 IF SQLCODE = 0 KS2S45 THEN KS2S45 MOVE PAR-JJ-PARAM-DATA TO WF01-SLOWSEL-TRAIL KS2S45 ELSE KS2S45 MOVE "V-100-READ-VXJJ0PAR - SLOWSEL#" KS2S45 TO JLDB2E-PROCESS-NAME KS2S45 PERFORM JLDB2E-DB2-ERROR KS2S45 SET JLMSG-C99-DB2-ERROR TO TRUE KS2S45 PERFORM JLMSG-DISPLAY-MESSAGE KS2S45 END-IF. KS2S45 PS2S11*--- RETRIEVE THE K-FACTOR AND STORE DEFAULT KA,KB,KC,KMAX AND 25130000 PS2S11*--- KMIN DATA 25130000 PS2S11 EXEC SQL 25140000 PS2S11 SELECT JJ_PARAM_DATA 25150000 PS2S11 INTO :PAR-JJ-PARAM-DATA 25160000 PS2S11 FROM VXJJ0PAR 25170000 PS2S11 WHERE JJ_PARAM_KEY = "K-FACTOR" 25180000 PS2S11 WITH UR PS2S11 END-EXEC. 25190000 PS2S11 25200000 PS2S11 IF SQLCODE = 0 25210000 PS2S11 THEN 25220000 PS2S11 PERFORM V-115-VALIDATE-K-FACTOR PS2S11* CALCULATE THE SQUARE ROOT OF THE PRODUCT COEFFICENT SO THAT PS2S11* THE SAME CAN BE USED LATER. PS2S11 PS2S11 COMPUTE WW-PROD-COEFFICIENT-DFLT ROUNDED PS2S11 = (WW-CP-CALC) ** 0.5 PS2S11 ELSE 25250000 PS2S11 MOVE "V-100-READ-VXJJ0PAR - K-FACTOR" 25260000 PS2S11 TO JLDB2E-PROCESS-NAME 25270000 PS2S11 PERFORM JLDB2E-DB2-ERROR 25280000 PS2S11 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 PS2S11 END-IF. 25310000 161S21*---------------------------------------------------------------* 161S21*----- GET THE PAR KEY FOR SMFO WHILE RESERVE ALLOCATION --* 161S21*---------------------------------------------------------------* 161S21 EXEC SQL 161S21 SELECT JJ_PARAM_DATA 161S21 INTO :PAR-JJ-PARAM-DATA 161S21 FROM VXJJ0PAR 161S21 WHERE JJ_PARAM_KEY = "SMFORESV" 161S21 WITH UR 161S21 END-EXEC. 161S21 161S21 IF SQLCODE = 0 161S21 THEN 161S21 MOVE PAR-JJ-PARAM-DATA TO 161S21 WF01-SMFO-RESV-ALLOC-X 161S21 ELSE 161S21 MOVE "V-100-READ-VXJJ0PAR - SMFORESV" 161S21 TO JLDB2E-PROCESS-NAME 161S21 PERFORM JLDB2E-DB2-ERROR 161S21 SET JLMSG-C99-DB2-ERROR TO TRUE 161S21 PERFORM JLMSG-DISPLAY-MESSAGE 161S21 END-IF. 161S21 161S21 171S47*--- RETRIEVE THE BGOSSIND FOR BGO SLOW SELLER 171S47 INITIALIZE WF01-BGO-SLOWSEL-PAR-DATA 171S47 MOVE "BGOSSIND" TO WF01-BGO-SLOWSEL 171S47 MOVE WF01-BGO-SLOWSEL-KEY TO PAR-JJ-PARAM-KEY 171S47 171S47 EXEC SQL 171S47 SELECT JJ_PARAM_DATA 171S47 INTO :PAR-JJ-PARAM-DATA 171S47 FROM VXJJ0PAR 171S47 WHERE JJ_PARAM_KEY = :PAR-JJ-PARAM-KEY 171S47 WITH UR 171S47 END-EXEC. 171S47 171S47 IF SQLCODE = 0 171S47 THEN 171S47 MOVE PAR-JJ-PARAM-DATA(1:1) TO 171S47 WF01-BGO-SLOWSEL-PAR-DATA 171S47 ELSE 171S47 IF SQLCODE = 100 171S47 THEN 171S47 CONTINUE 171S47 ELSE 171S47 MOVE "V-100-READ-VXJJ0PAR - BGOSSIND" 171S47 TO JLDB2E-PROCESS-NAME 171S47 PERFORM JLDB2E-DB2-ERROR 171S47 SET JLMSG-C99-DB2-ERROR TO TRUE 171S47 PERFORM JLMSG-DISPLAY-MESSAGE 171S47 END-IF 171S47 END-IF. 171S47 WIN06B*--------------------------------------------------------------* 07678001 277600 V-100-EXIT. 27760000 277700 EXIT. 27770000 277800 27780000 135912*--- 19/06/2000 -----------------------------------------------* 13591200 250300 V-105-READ-VXJJ0PAR-TEMP SECTION. 25030000 250400*---------------------------------------------------------------* 25040000 250500* SECTION NAME : V-105-READ-VXJJ0PAR-TEMP * 25050000 250600* CALLED BY : V-100-READ-VXJJ0PAR * 25060000 250700* CALLS : JLDB2E-DB2-ERROR * 25070000 250800* : JLMSG-DISPLAY-MESSAGE * 25080000 250900* FUNCTION : 1. READS COMPANY LEVEL CONTROLS FROM PAR TABLE* 25090000 250900* : THE CONTROLS IN THIS SECTION ARE TO BE * 25090000 250900* : SUPERCEDED BY 'FULL-BLOODIED' CONTROLS * 25090000 250900* : IN A LATER VERSION OF CR. * 25090000 251000*---------------------------------------------------------------* 25100000 251100 V-105. 25110000 251200 25120000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON MONDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS1" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS1 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS1" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON TUESDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS2" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS2 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS2" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON WEDNESDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS3" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS3 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS3" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON THURSDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS4" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS4 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS4" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 277500 27750000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON FRIDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS5" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS5 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS5" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON SATURDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS6" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS6 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS6" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE DEMAND LINE TOP-UP SHELF CAPACITY % CONTROL 25130000 251300*--- APPLICABLE TO DELIVERIES ON SUNDAY 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "DEMTOPS7" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-DEMTOPS7 25240000 252500 ELSE 25250000 252600 MOVE "V-105-READ-VXJJ0PAR-TEMP - DEMTOPS7" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 277500 27750000 277500 27750000 277600 V-105-EXIT. 27760000 277700 EXIT. 27770000 277800 27780000 WIN06A V-106-READ-VXJJ0PAR-DOTCOMCL SECTION. 08129001 WIN06A*---------------------------------------------------------------* 08130001 WIN06A* SECTION NAME : V-106-READ-VXJJ0PAR-DOTCOMCL 08131001 WIN06A* CALLED BY : V-100-READ-VXJJ0PAR * 08132001 WIN06A* CALLS : JLDB2E-DB2-ERROR * 08133001 WIN06A* : JLMSG-DISPLAY-MESSAGE * 08134001 WIN06A* FUNCTION : 1. READ THE CODE LIFE DEFAULT VALUES FOR * 08135001 WIN06A* : DOTCOM STORES. * 08136001 WIN06A*---------------------------------------------------------------* 08137001 WIN06A 08138001 WIN06A* INITIALISE THE DOTCOM CODE LIFE TABLE 08138101 WIN06A 05160000 WIN06A MOVE ZERO TO WT70-DOTCOMCL-TABLE 08138501 WIN06A 08139201 WIN06A* RETRIEVE THE DEFAULT CODE LIFE VALUES 08139301 WIN06A 08139201 WIN06A EXEC SQL 08140001 WIN06A SELECT JJ_PARAM_DATA 08141001 WIN06A INTO :PAR-JJ-PARAM-DATA 08142001 WIN06A FROM VXJJ0PAR 08143001 WIN06A WHERE JJ_PARAM_KEY = "DOTCOMCL" 08144001 WIN06A WITH UR 08145001 WIN06A END-EXEC. 08146001 WIN06A 08147001 WIN06A EVALUATE SQLCODE 08148001 WIN06A WHEN 0 08149001 WIN06A MOVE PAR-JJ-PARAM-DATA TO WT70-DOTCOMCL-TABLE 08150001 WIN06A WHEN OTHER 08153001 WIN06A MOVE "V-106-READ-VXJJ0PAR-DOTCOMCL" 08154001 WIN06A TO JLDB2E-PROCESS-NAME 08155001 WIN06A PERFORM JLDB2E-DB2-ERROR 08156001 WIN06A SET JLMSG-C99-DB2-ERROR TO TRUE 08157001 WIN06A PERFORM JLMSG-DISPLAY-MESSAGE 08158001 WIN06A END-EVALUATE 08159001 WIN06A . 08207001 WIN06A V-106-EXIT. 08208001 277700 EXIT. 27770000 277800 27780000 022600*----- 12/01/2002 - GM ---------------------------------------* 02260000 250300 V-107-READ-VXJJ0PAR-TI SECTION. 25030000 250400*---------------------------------------------------------------* 25040000 250500* SECTION NAME : V-107-READ-VXJJ0PAR-TI * 25050000 250600* CALLED BY : V-100-READ-VXJJ0PAR * 25060000 250700* CALLS : JLDB2E-DB2-ERROR * 25070000 250800* : JLMSG-DISPLAY-MESSAGE * 25080000 250900* FUNCTION : 1. READ COMPANY LEVEL TI VALUES FROM PAR TABLE* 25090000 251000*---------------------------------------------------------------* 25100000 251100 V-107. 25110000 251200 25120000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 0 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR000" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR0 25240000 252400 MOVE 0 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR0 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 0" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 1 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR001" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR1 25240000 252400 MOVE 1 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR1 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 1" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 2 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR002" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR2 25240000 252400 MOVE 2 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR2 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 2" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 3 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR003" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR3 25240000 252400 MOVE 3 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR3 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 3" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 4 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR004" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR4 25240000 252400 MOVE 4 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR4 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 4" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 5 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR005" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR5 25240000 252400 MOVE 5 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR5 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 5" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 6 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR006" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR6 25240000 252400 MOVE 6 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR6 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 6" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 7 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR007" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR7 25240000 252400 MOVE 7 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR7 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 7" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 8 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR008" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR8 25240000 252400 MOVE 8 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR8 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 8" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 253200 25320000 251300*--- RETRIEVE THE TI VALUE FOR COR OF 9 25130000 251400 EXEC SQL 25140000 251500 SELECT JJ_PARAM_DATA 25150000 251600 INTO :PAR-JJ-PARAM-DATA 25160000 251700 FROM VXJJ0PAR 25170000 251800 WHERE JJ_PARAM_KEY = "TICOR009" 25180000 WITH UR 251900 END-EXEC. 25190000 252000 25200000 252100 IF SQLCODE = 0 25210000 252200 THEN 25220000 252300 MOVE PAR-JJ-PARAM-DATA TO WF01-CO-LVL-CNTL 25230000 252400 MOVE WF01-CO-LVL-CNTLS TO WF01-TI-COR9 25240000 252400 MOVE 9 TO WM29-COR 25240000 252400 MOVE WF01-TI-COR9 TO WM29-TI 25240000 137900 MOVE WM29-TI-COR-SETTING TO JLMSG-TEXT 13790000 138100 PERFORM JLMSG-DISPLAY-MESSAGE 13810000 252500 ELSE 25250000 252600 MOVE "V-107-READ-VXJJ0PAR-TI;TICOR 9" 25260000 252700 TO JLDB2E-PROCESS-NAME 25270000 252800 PERFORM JLDB2E-DB2-ERROR 25280000 252900 SET JLMSG-C99-DB2-ERROR TO TRUE 25290000 253000 PERFORM JLMSG-DISPLAY-MESSAGE 25300000 253100 END-IF. 25310000 277500 27750000 277600 V-107-EXIT. 27760000 277700 EXIT. 27770000 278000*---------------------------------------------------------------* 27800000 277500 08127001 082280*----- 31/08/2004 - GTM---------------------------------------* 08128001 082290 V-108-READ-VXJJ0PAR-SRSST SECTION. 08129001 082300*---------------------------------------------------------------* 08130001 082310* SECTION NAME : V-108-READ-VXJJ0PAR-SRSST 08131001 082320* CALLED BY : V-100-READ-VXJJ0PAR * 08132001 082330* CALLS : JLDB2E-DB2-ERROR * 08133001 082340* : JLMSG-DISPLAY-MESSAGE * 08134001 082350* FUNCTION : 1. READ THE SIMPLER REPLEN SAFETY STOCK TRIAL * 08135001 082360* : PARAMS. * 08136001 082370*---------------------------------------------------------------* 08137001 082380 08138001 082380* INITIALISE THE STORES TABLE 08138101 082640 PERFORM VARYING W-SRSSTRO-IX FROM 1 BY 1 08138201 082650 UNTIL W-SRSSTRO-IX > 50 08138301 MOVE 0000 TO W-SRSST-RO-NO(W-SRSSTRO-IX) 08138501 082740 END-PERFORM 08139001 082750 . 08139101 082380 08139201 082380* RETRIEVE THE TRIAL STORES 08139301 082390 EXEC SQL 08140001 082400 SELECT JJ_PARAM_DATA 08141001 082410 INTO :PAR-JJ-PARAM-DATA 08142001 082420 FROM VXJJ0PAR 08143001 082430 WHERE JJ_PARAM_KEY = "SRSSTROS" 08144001 082440 WITH UR 08145001 082450 END-EXEC. 08146001 082460 08147001 082470 EVALUATE SQLCODE 08148001 082480 WHEN 0 08149001 082490 MOVE PAR-JJ-PARAM-DATA TO W-SRSSTROS-CRITERIA 08150001 082500 WHEN 100 08151001 082490 CONTINUE 08151102 082540 WHEN OTHER 08153001 082550 MOVE "V-108-READ-VXJJ0PAR-SRSST" 08154001 082560 TO JLDB2E-PROCESS-NAME 08155001 082570 PERFORM JLDB2E-DB2-ERROR 08156001 082580 SET JLMSG-C99-DB2-ERROR TO TRUE 08157001 082590 PERFORM JLMSG-DISPLAY-MESSAGE 08158001 082600 END-EVALUATE 08159001 082610 08160001 * CHANGE BLANK STORE NUMBERS TO 0000 08161002 082630 08162001 082640 PERFORM VARYING W-SRSSTRO-IX FROM 1 BY 1 08163001 082650 UNTIL W-SRSSTRO-IX > 50 08164001 082660 IF W-SRSST-RO-NO(W-SRSSTRO-IX)(1:4) = SPACES 08165001 MOVE 0000 TO W-SRSST-RO-NO(W-SRSSTRO-IX) 08166002 082680 ELSE 08167001 082970 DISPLAY "SIMPLER REPLEN SAFETY STOCK TRIAL STORE= " 08168001 082700 W-SRSST-RO-NO(W-SRSSTRO-IX) 08169001 082730 END-IF 08170001 082740 END-PERFORM 08171001 082750 . 08172001 082380 08173001 * INITIALISE SUBGROUPS TABLE 08173101 082640 PERFORM VARYING W-SRSSTSG-IX FROM 1 BY 1 08173301 082650 UNTIL W-SRSSTSG-IX > 40 08173401 MOVE 00000 TO W-SRSST-SG-CD(W-SRSSTSG-IX) 08173601 082740 END-PERFORM 08174101 082750 . 08174201 082380* RETRIEVE THE TRIAL SUBGROUPS 08174301 082390 EXEC SQL 08175001 082400 SELECT JJ_PARAM_DATA 08176001 082410 INTO :PAR-JJ-PARAM-DATA 08177001 082420 FROM VXJJ0PAR 08178001 082430 WHERE JJ_PARAM_KEY = "SRSSTSGS" 08179001 082440 WITH UR 08180001 082450 END-EXEC. 08181001 082460 08182001 082470 EVALUATE SQLCODE 08183001 082480 WHEN 0 08184001 082490 MOVE PAR-JJ-PARAM-DATA TO W-SRSSTSGS-CRITERIA 08185001 082500 WHEN 100 08186001 082510 CONTINUE 08187002 082540 WHEN OTHER 08188001 082550 MOVE "V-108-READ-VXJJ0PAR-SRSST" 08189001 082560 TO JLDB2E-PROCESS-NAME 08190001 082570 PERFORM JLDB2E-DB2-ERROR 08191001 082580 SET JLMSG-C99-DB2-ERROR TO TRUE 08192001 082590 PERFORM JLMSG-DISPLAY-MESSAGE 08193001 082600 END-EVALUATE 08194001 082610 08195001 * CHANGE BLANK SUBGROUPS TO 0000 08196002 082630 08197001 082640 PERFORM VARYING W-SRSSTSG-IX FROM 1 BY 1 08198001 082650 UNTIL W-SRSSTSG-IX > 40 08199001 082660 IF W-SRSST-SG-CD(W-SRSSTSG-IX)(1:5) = SPACES 08200001 MOVE 00000 TO W-SRSST-SG-CD(W-SRSSTSG-IX) 08201002 082680 ELSE 08202001 082970 DISPLAY "SIMPLER REPLEN SAFETY STOCK TRIAL SG= " 08203001 082700 W-SRSST-SG-CD(W-SRSSTSG-IX) 08204001 082730 END-IF 08205001 082740 END-PERFORM 08206001 082750 . 08207001 277600 V-108-EXIT. 08208001 277700 EXIT. 08209001 277500 08127001 WIN06B*---------------------------------------------------------------* 08211001 277500 08211001 277500 08212001 277900 V-110-READ-VXJJ0BPR SECTION. 27790000 278000*---------------------------------------------------------------* 27800000 278100* SECTION NAME : V-110-READ-VXJJ0BPR * 27810000 278200* CALLED BY : * 27820000 278300* CALLS : JLDB2E-DB2-ERROR * 27830000 278400* : JLMSG-DISPLAY-MESSAGE * 27840000 278500* FUNCTION : 1. READS BASE PRODUCT TABLE BPR * 27850000 278600*---------------------------------------------------------------* 27860000 278700 V-110. 27870000 278800 27880000 278900 MOVE WW01-CURR-BPR-TPN TO BPR-BPR-TPN. 27890000 279000 27900000 480699*----- 27/03/2001 - GM ---------------------------------------* 48069900 480700*-- REMOVE BPR-UNIT-SIZE FROM SELECT 48070000 480701*-------------------------------------------------------------* 48070100 279100 EXEC SQL 27910000 584200 SELECT BPR_TRANS_EXCN 58420001 584300 ,MIN_SHELF_LIFE 58430001 401600 ,EXP_SHELF_LIFE_1 401700 ,EXP_SHELF_LIFE_2 401800 ,EXP_SHELF_LIFE_3 401900 ,EXP_SHELF_LIFE_4 402000 ,EXP_SHELF_LIFE_5 402100 ,EXP_SHELF_LIFE_6 402200 ,EXP_SHELF_LIFE_7 437110 ,OG_CD 585200 INTO :BPR-BPR-TRANS-EXCN, 58520001 585300 :BPR-MIN-SHELF-LIFE, 58530001 402500 :BPR-EXP-SHELF-LIFE-1, 402600 :BPR-EXP-SHELF-LIFE-2, 402700 :BPR-EXP-SHELF-LIFE-3, 402800 :BPR-EXP-SHELF-LIFE-4, 402900 :BPR-EXP-SHELF-LIFE-5, 403000 :BPR-EXP-SHELF-LIFE-6, 438000 :BPR-EXP-SHELF-LIFE-7, 438010 :BPR-OG-CD 279600 FROM VXJJ0BPR 27960000 279700 WHERE BPR_TPN = :BPR-BPR-TPN 27970000 WITH UR 279800 END-EXEC. 27980000 279900 27990000 280000 EVALUATE SQLCODE 28000000 280100 WHEN +0 28010000 280200 ADD 1 TO WA01-BPR-FETCHED 28020000 280300 SET BPR-FOUND TO TRUE 28030000 280400 WHEN +100 28040000 280500 INITIALIZE WM10-DB2-ERR-CONTINUE 28050000 280600 MOVE WW01-CURR-BPR-TPN-DB2 TO WM10-BPR-TPN 28060000 280700 MOVE WF01-VXJJ0BPR TO WM10-TABLE 28070000 280800 MOVE WM10-DB2-ERR-CONTINUE TO JLMSG-TEXT 28080000 280900 PERFORM JLMSG-DISPLAY-MESSAGE 28090000 281000 SET BPR-NOT-FOUND TO TRUE 28100000 281100 WHEN OTHER 28110000 281200 MOVE "V-110-READ-VXJJ0BPR" 28120000 281300 TO JLDB2E-PROCESS-NAME 28130000 281400 PERFORM JLDB2E-DB2-ERROR 28140000 281500 SET JLMSG-C99-DB2-ERROR TO TRUE 28150000 281600 PERFORM JLMSG-DISPLAY-MESSAGE 28160000 281700 END-EVALUATE. 28170000 281800 28180000 281900 V-110-EXIT. 28190000 282000 EXIT. 28200000 282100 28210000 SUM10A V-111-READ-VXJJ0OJX SECTION. 28210000 SUM10A 28210000 SUM10A EXEC SQL 28210000 SUM10A 28210000 SUM10A SELECT PROCUREMENT_SIGMA 28210000 SUM10A INTO :OJX-PROCUREMENT-SIGMA 28210000 SUM10A :WI01-OJX-PROCUREMENT-SIGMA-NN 28210000 SUM10A FROM VXJJ0OJX 28210000 SUM10A WHERE CR_PART_NO = :OJX-CR-PART-NO 28210000 SUM10A AND RO_NO = :OJX-RO-NO 28210000 SUM10A AND BPR_TPN = :OJX-BPR-TPN 28210000 SUM10A AND REQ_DEL_DT = :OJX-REQ-DEL-DT 28210000 SUM10A AND ORD_TYPE = :OJX-ORD-TYPE 28210000 SUM10A AND ORD_REC_TYPE = :OJX-ORD-REC-TYPE 28210000 SUM10A WITH UR 28210000 SUM10A 28210000 SUM10A END-EXEC. 28210000 SUM10A 28210000 SUM10A EVALUATE SQLCODE 28210000 SUM10A WHEN +0 28210000 SUM10A IF OJX-PROCUREMENT-SIGMA-NN SUM10A MOVE OJX-PROCUREMENT-SIGMA 28210000 SUM10A TO JLF46-PROCUREMENT-SIGMA(1) 28210000 SUM10A ELSE 28210000 SUM10A MOVE ZEROS 28210000 SUM10A TO JLF46-PROCUREMENT-SIGMA(1) 28210000 SUM10A END-IF 28210000 SUM10A ADD +1 TO WA01-OJX-READ SUM10A WHEN +100 28210000 SUM10A MOVE 0 TO JLF46-PROCUREMENT-SIGMA(1) 28210000 SUM10A WHEN OTHER 28940000 SUM10A MOVE "V-111-READ-VXJJ0OJX" 28950000 SUM10A TO JLDB2E-PROCESS-NAME 28960000 SUM10A PERFORM JLDB2E-DB2-ERROR 28970000 SUM10A SET JLMSG-C99-DB2-ERROR TO TRUE 28980000 SUM10A PERFORM JLMSG-DISPLAY-MESSAGE 28990000 SUM10A END-EVALUATE. 29000000 SUM10A 28210000 SUM10A V-111-EXIT. 29020000 290300 EXIT. 29030000 290400 29040000 SUM11A V-112-READ-VXJJ0OJG SECTION. 28210000 SUM11A EXEC SQL 28210000 291400 29140000 SUM11A SELECT PROCUREMENT_SIGMA 28210000 SUM11A INTO :OJG-PROCUREMENT-SIGMA 28210000 SUM11A :WI01-OJG-PROCUREMENT-SIGMA-NN 28210000 SUM11A FROM VXJJ0OJG 28210000 SUM11A WHERE CR_PART_NO = :OJG-CR-PART-NO 28210000 SUM11A AND RO_NO = :OJG-RO-NO 28210000 SUM11A AND BPR_TPN = :OJG-BPR-TPN 28210000 SUM11A AND REQ_DEL_DT = :OJG-REQ-DEL-DT 28210000 SUM11A AND ORD_TYPE = :OJG-ORD-TYPE 28210000 SUM11A AND ORD_REC_TYPE = :OJG-ORD-REC-TYPE 28210000 SUM11A WITH UR 28210000 AUT07B 29140000 292000 END-EXEC. 29200000 AUT07B 29140000 292200 EVALUATE SQLCODE 29220000 292300 WHEN +0 29230000 SUM11A IF OJG-PROCUREMENT-SIGMA-NN SUM11A MOVE OJG-PROCUREMENT-SIGMA 28210000 SUM11A TO JLF42-PROCUREMENT-SIGMA(1) 28210000 SUM11A ELSE 28210000 SUM11A MOVE ZEROS 28210000 SUM11A TO JLF42-PROCUREMENT-SIGMA(1) 28210000 SUM11A END-IF 28210000 SUM11A ADD +1 TO WA01-OJG-READ 292600 WHEN +100 29260000 SUM11A MOVE 0 TO JLF42-PROCUREMENT-SIGMA(1) 28210000 293600 WHEN OTHER 29360000 SUM11A MOVE "V-112-READ-VXJJ0OJG" 28950000 SUM11A TO JLDB2E-PROCESS-NAME 28960000 293900 PERFORM JLDB2E-DB2-ERROR 29390000 294000 SET JLMSG-C99-DB2-ERROR TO TRUE 29400000 294100 PERFORM JLMSG-DISPLAY-MESSAGE 29410000 294200 END-EVALUATE. 29420000 294300 29430000 SUM11A V-112-EXIT. 29020000 SUM11A EXIT. 28200000 282100 28210000 PS2S11*---------------------------------------------------------------* 00460000 PS2S11* SECTION NAME : V-115-VALIDATE-K-FACTOR * 00460000 PS2S11* FUNCTION : VALIDATE THE DEFAULT PARAMETER VALUES USED * 00460000 PS2S11* IN K FACTOR CALCULATION. * PS2S11*---------------------------------------------------------------* 00460000 PS2S11 V-115-VALIDATE-K-FACTOR SECTION. 01340000 PS2S11D DISPLAY "V-115-VALIDATE-K-FACTOR" PS2S11* VALIDATE THE PRODUCT COEFFICIENT CP PS2S11 MOVE PAR-JJ-PARAM-DATA(1:3) TO WW-CP PS2S11 SET WI32-VALID-PARAM TO TRUE PS2S11 IF WW-CP NOT NUMERIC PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 ELSE PS2S11 IF WW-CP-NUM > 999 PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 ELSE PS2S11 IF WW-CP-NUM < 1 PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 END-IF PS2S11 IF WI32-INVALID-PARAM PS2S11 MOVE WW-CP TO WM52-CP PS2S11 MOVE WM52-INVALID-CP TO JLMSG-TEXT PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE PS2S11 ELSE PS2S11 DIVIDE 100 INTO WW-CP-NUM GIVING WW-CP-CALC PS2S11 END-IF PS2S11* VALIDATE THE RANDOMNESS FACTOR KA PS2S11 MOVE PAR-JJ-PARAM-DATA(5:4) TO WW-KA PS2S11 PS2S11 SET WI32-VALID-PARAM TO TRUE PS2S11 IF WW-KA-NUM NOT NUMERIC PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 ELSE PS2S11 IF WW-KA-NUM > 9999 PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 ELSE PS2S11 IF WW-KA-NUM < 1 PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 END-IF PS2S11 PS2S11 IF WI32-INVALID-PARAM PS2S11 MOVE WW-KA TO WM53-KA PS2S11 MOVE WM53-INVALID-KA TO JLMSG-TEXT PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE PS2S11 ELSE PS2S11 DIVIDE 1000 INTO WW-KA-NUM GIVING WW-KA-CALC-DFLT PS2S11 END-IF PS2S11 PS2S11* VALIDATE THE CUSTOMER TREND LAG KB PS2S11 MOVE PAR-JJ-PARAM-DATA(10:5) TO WW-KB PS2S11 PS2S11 SET WI32-VALID-PARAM TO TRUE PS2S11 IF WW-KB-NUM NOT NUMERIC PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 ELSE PS2S11 IF WW-KB-NUM > 99999 PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 ELSE PS2S11 IF WW-KB-NUM < 1 PS2S11 SET WI32-INVALID-PARAM TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 END-IF PS2S11 PS2S11 IF WI32-INVALID-PARAM PS2S11 MOVE WW-KB TO WM54-KB PS2S11 MOVE WM54-INVALID-KB TO JLMSG-TEXT PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE PS2S11 ELSE PS2S11 DIVIDE 100000 INTO WW-KB-NUM GIVING WW-KB-CALC-DFLT PS2S11 END-IF PS2S11 MOVE PAR-JJ-PARAM-DATA(16:3) TO WW-VALIDATE-K-FACTOR-MAX-X PS2S11 SET WI33-VALID-FACTOR-MAX TO TRUE PS2S11 IF WW-VALIDATE-K-FACTOR-MAX NOT NUMERIC PS2S11 SET WI33-INVALID-FACTOR-MAX TO TRUE PS2S11 ELSE PS2S11 IF WW-VALIDATE-K-FACTOR-MAX > 999 PS2S11 SET WI33-INVALID-FACTOR-MAX TO TRUE PS2S11 ELSE PS2S11 IF WW-VALIDATE-K-FACTOR-MAX < 1 PS2S11 SET WI33-INVALID-FACTOR-MAX TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 END-IF PS2S11 IF WI33-INVALID-FACTOR-MAX PS2S11 MOVE WW-VALIDATE-K-FACTOR-MAX PS2S11 TO WM50-K-FACTOR-MAX PS2S11 MOVE WM50-INVALID-K-FACTOR-MAX PS2S11 TO JLMSG-TEXT PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE PS2S11 ELSE PS2S11 COMPUTE WW-DEFAULT-K-FACTOR-MAX = AVRS42 (WW-VALIDATE-K-FACTOR-MAX / 100) * (WF01-OFFUKMAX/100) PS2S11 END-COMPUTE PS2S11 END-IF PS2S11 PS2S11 MOVE PAR-JJ-PARAM-DATA(20:3) TO WW-VALIDATE-K-FACTOR-MIN-X PS2S11 PS2S11 SET WI34-VALID-FACTOR-MIN TO TRUE PS2S11 IF WW-VALIDATE-K-FACTOR-MIN NOT NUMERIC PS2S11 SET WI34-INVALID-FACTOR-MIN TO TRUE PS2S11 ELSE PS2S11 IF WW-VALIDATE-K-FACTOR-MIN > 999 PS2S11 SET WI34-INVALID-FACTOR-MIN TO TRUE PS2S11 ELSE PS2S11 IF WW-VALIDATE-K-FACTOR-MIN < 1 PS2S11 SET WI34-INVALID-FACTOR-MIN TO TRUE PS2S11 END-IF PS2S11 END-IF PS2S11 END-IF PS2S11 IF WI34-INVALID-FACTOR-MIN PS2S11 MOVE WW-VALIDATE-K-FACTOR-MIN PS2S11 TO WM51-K-FACTOR-MIN PS2S11 MOVE WM51-INVALID-K-FACTOR-MIN PS2S11 TO JLMSG-TEXT PS2S11 PERFORM JLMSG-DISPLAY-MESSAGE PS2S11 ELSE PS2S11 COMPUTE WW-DEFAULT-K-FACTOR-MIN = PS2S11 WW-VALIDATE-K-FACTOR-MIN / 100 PS2S11 END-COMPUTE PS2S11 END-IF. * PS2S11 V-115-EXIT. 29020000 PS2S11 EXIT. 28200000 SUM12A . SPR12A V-120-MOVE-BBP SECTION. 28220000 282300*---------------------------------------------------------------* 28230000 SPR12A* SECTION NAME : V-120-MOVE-BBP * 28240000 SPR12A* FUNCTION : 1. MOVE THE BBP VALUES * 28280000 SPR12A* : THE BELOW FIELDS ARE THE BBP VALUES FROM THE * SPR12A* : HEADER RECORD MOVED TO THE WORKING STORAGE * SPR12A* : VARAIBLES. * 282900*---------------------------------------------------------------* 28290000 283000 V-120. 28300000 283100 28310000 SUM10A 28210000 SPR12A MOVE WT10-NOTNL-WKLY-SALES TO SPR12A WW20-NOTNL-WKLY-SALES SPR12A MOVE WT10-BBP-SAVED-NWS TO SPR12A WW20-BBP-SAVED-NWS SPR12A MOVE WT10-COR-PC TO WW20-COR-PC SPR12A MOVE WT10-RO-BPR-SCAP TO SPR12A WW20-RO-BPR-SCAP SPR12A MOVE WT10-FIXED-ORD-QTY-1 TO SPR12A WW20-FIXED-ORD-QTY-1 SPR12A MOVE WT10-FIXED-ORD-QTY-2 TO SPR12A WW20-FIXED-ORD-QTY-2 SPR12A MOVE WT10-FIXED-ORD-QTY-3 TO SPR12A WW20-FIXED-ORD-QTY-3 SPR12A MOVE WT10-FIXED-ORD-QTY-4 TO SPR12A WW20-FIXED-ORD-QTY-4 SPR12A MOVE WT10-FIXED-ORD-QTY-5 TO SPR12A WW20-FIXED-ORD-QTY-5 SPR12A MOVE WT10-FIXED-ORD-QTY-6 TO SPR12A WW20-FIXED-ORD-QTY-6 SPR12A MOVE WT10-FIXED-ORD-QTY-7 TO SPR12A WW20-FIXED-ORD-QTY-7 SPR12A MOVE WT10-SFTY-STK-TREND-IND TO SPR12A WW20-SFTY-STK-TREND-IND SPR12A MOVE WT10-SPEC-DEL-IND-1 TO SPR12A WW20-SPEC-DEL-IND-1 SPR12A MOVE WT10-SPEC-DEL-IND-2 TO SPR12A WW20-SPEC-DEL-IND-2 SPR12A MOVE WT10-SPEC-DEL-IND-3 TO SPR12A WW20-SPEC-DEL-IND-3 SPR12A MOVE WT10-SPEC-DEL-IND-4 TO SPR12A WW20-SPEC-DEL-IND-4 SPR12A MOVE WT10-SPEC-DEL-IND-5 TO SPR12A WW20-SPEC-DEL-IND-5 SPR12A MOVE WT10-SPEC-DEL-IND-6 TO SPR12A WW20-SPEC-DEL-IND-6 SPR12A MOVE WT10-SPEC-DEL-IND-7 TO SPR12A WW20-SPEC-DEL-IND-7 SPR12A . 29010000 290200 V-120-EXIT. 29020000 290300 EXIT. 29030000 290400 29040000 290500 V-200-OPEN-READNEXT-SFB-BSP SECTION. 29050000 290600*---------------------------------------------------------------* 29060000 290700* SECTION NAME : V-200-OPEN-READNEXT-SFB-BSP * 29070000 290800* CALLED BY : * 29080000 290900* CALLS : JLDB2E-DB2-ERROR * 29090000 291000* : JLMSG-DISPLAY-MESSAGE * 29100000 291100* FUNCTION : 1. OPENS CURSOR FOR PRODUCT SPECIFIC FCASTS * 29110000 291200*---------------------------------------------------------------* 29120000 291300 V-200. 29130000 AUT07B* INITIALISE JLF26 LINKAGE AREA 29140000 291400 29140000 AUT07B 29140000 AUT07B MOVE "JL F26 " TO JLF26-PROGRAM-NAME 29140000 AUT07B MOVE "O" TO JLF26-FUNCTION 29140000 AUT07B MOVE +0 TO JLF26-EXP-DAILY-SALES-1 AUT07B JLF26-EXP-DAILY-SALES-2 AUT07B JLF26-EXP-DAILY-SALES-3 AUT07B JLF26-EXP-DAILY-SALES-4 AUT07B JLF26-EXP-DAILY-SALES-5 AUT07B JLF26-EXP-DAILY-SALES-6 AUT07B JLF26-EXP-DAILY-SALES-7 AVRS42 JLF26-KA-1 AVRS42 JLF26-KA-2 AVRS42 JLF26-KA-3 AVRS42 JLF26-KA-4 AVRS42 JLF26-KA-5 AVRS42 JLF26-KA-6 AVRS42 JLF26-KA-7 AVRS42 JLF26-FORECAST-TREND-1 AVRS42 JLF26-FORECAST-TREND-2 AVRS42 JLF26-FORECAST-TREND-3 AVRS42 JLF26-FORECAST-TREND-4 AVRS42 JLF26-FORECAST-TREND-5 AVRS42 JLF26-FORECAST-TREND-6 AVRS42 JLF26-FORECAST-TREND-7 AUT07B JLF26-RETURN-CODE AUT07B JLF26-SQLCODE AUT07B MOVE SPACES TO JLF26-ERROR-MESSAGE AUT07B JLF26-SQLCA SUM11B MOVE SPACES TO WI01-PROD-STK-STDT-FOUND AUT07B MOVE WW01-CURR-PART-NO TO JLF26-CR-PART-NO 29150000 WIN06A WW01-JLF40-CR-PART-NO SPR13A JLF30-CR-PART-NO-A SPR13A NWS-CR-PART-NO AUT07B MOVE WW01-CURR-RO-NO TO JLF26-RETAIL-OUTLET-NO 29160000 WIN06A WW01-JLF40-RO-NO SPR13A JLF30-RO-NO SPR13A NWS-RO-NO AUT07B MOVE WW01-CURR-BPR-TPN TO JLF26-BASE-PRODUCT-NO 29170000 WIN06A WW01-JLF40-BPR-TPN SPR13A JLF30-BPR-TPN SPR13A NWS-BPR-TPN AUT07B 29140000 AUT07B MOVE WW01-CURR-SG-CD TO JLF26-SG-CD 29180000 291800 29180000 AUT07B MOVE WW01-STRT-BSP-YRWK TO JLF26-TESCO-YRWK-FR AUT07B MOVE WW01-END-BSP-YRWK TO JLF26-TESCO-YRWK-TO AUT07B MOVE WW01-CURR-DATE TO JLF26-CURR-DATE KS2S09* PERFORM JKNSFCHK-CHK-FORCST-TYPE KS2S09 MOVE "NF" TO JLF26-FORECAST-TYPE KS2S09 WW-JKNSFCHK-EXIST SUM11B IF WT10-STKD-PROD-STDT NOT = SPACES SUM11B MOVE 1 TO WX10-DATE-SUB SUM11B SET PROD-STK-STDT-NOT-FOUND SUM11B TO TRUE SUM11B PERFORM UNTIL WT10-STKD-PROD-STDT SUM11B = WT30-CCYY-MM-DD(WX10-DATE-SUB) SUM11B OR WX10-DATE-SUB > WX10-DATE-MAX SUM11B ADD 1 TO WX10-DATE-SUB SUM11B END-PERFORM SUM11B IF WT10-STKD-PROD-STDT = WT30-CCYY-MM-DD(WX10-DATE-SUB) SUM11B SET PROD-STK-STDT-FOUND SUM11B TO TRUE SUM11B MOVE WT30-TESCO-YEAR(WX10-DATE-SUB) SUM11B TO WW01-STK-PROD-ST-YR SUM11B MOVE WT30-TESCO-WEEK(WX10-DATE-SUB) SUM11B TO WW01-STK-PROD-ST-WK SUM11B MOVE WT30-DAY-NO(WX10-DATE-SUB) SUM11B TO WW01-STK-PROD-ST-DNO SUM11B END-IF SUM11B SUM11B IF PROD-STK-STDT-NOT-FOUND SUM11B MOVE ZEROES TO ZZD-ERROR-CODE 13770049 SUM11B MOVE "A" TO ZZD-FUNCTION-CODE 13780074 SUM11B MOVE "ISO" TO ZZD-DATE1-FORMAT 13790049 SUM11B MOVE WT10-STKD-PROD-STDT 13800049 SUM11B TO ZZD-DATE1 13810049 SUM11B MOVE "WF" TO ZZD-DATE2-FORMAT 13820049 SUM11B MOVE -1 TO ZZD-DIFF-IN-DAYS 13830074 SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM11B 13850049 SUM11B IF ZZD-ERROR-CODE NOT = 00 13860049 SUM11B MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 13870049 SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 13880049 SUM11B PERFORM JLMSG-DISPLAY-MESSAGE 13890049 SUM11B END-IF 13900049 SUM11B 13910049 SUM11B MOVE ZZD-DATE2(1:4) TO 13920049 SUM11B WW01-STK-PROD-ST-YR SUM11B MOVE ZZD-DATE2(5:2) TO 13930049 SUM11B WW01-STK-PROD-ST-WK SUM11B MOVE ZZD-DATE2(7:1) TO 13940049 SUM11B WW01-STK-PROD-ST-DNO SUM11B END-IF SUM11B SUM11B MOVE WW01-STK-PROD-ST-YRWK SUM11B TO JLF26-TESCO-YRWK-FR SUM11B END-IF AUT07B PERFORM ZA-CALL-JL0F26 35650000 294400 AUT07B EVALUATE JLF26-SQLCODE AUT07B WHEN 0 AUT07B SET NOT-END-BSP-SFB TO TRUE AUT07B SET BSP-SFB-OPEN TO TRUE AUT07B IF JLF26-SFB AUT07B ADD 1 TO WA01-SFB-FETCHED 29770000 AUT07B ELSE 29780000 SPR13A IF JLF26-OLD AUT07B ADD 1 TO WA01-BSP-FETCHED 29770000 SPR13A ELSE SPR13A ADD 1 TO WA01-ESP-FETCHED SPR13A END-IF SUM12A IF JLF26-EXP-DAILY-SALES-1 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-2 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-3 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-4 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-5 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-6 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-7 = 0 SUM12A CONTINUE SUM12A ELSE SUM12A MOVE JLF26-TESCO-YRWK TO 16300000 SUM12A WW15-LAST-BSP-TESCO-YRWK 16300000 SUM12A ADD 1 TO WX95-SUB SUM12A MOVE JLF26-TESCO-YRWK TO SUM12A WT95-RTL-YEAR-WK(WX95-SUB) SUM12A END-IF 298000 END-IF 29800000 AUT07B WHEN 100 AUT07B SET END-BSP-SFB TO TRUE AUT07B WHEN OTHER AUT07B MOVE JLF26-SQLCA TO SQLCA AUT07B MOVE "V-200-OPEN-READNEXT-SFB-BSP" AUT07B TO JLDB2E-PROCESS-NAME AUT07B PERFORM JLDB2E-DB2-ERROR AUT07B SET JLMSG-C99-DB2-ERROR TO TRUE AUT07B PERFORM JLMSG-DISPLAY-MESSAGE 294200 END-EVALUATE. 29420000 294300 29430000 AUT07B IF JLF26-RETURN-CODE > 499 AUT07B AND JLF26-RETURN-CODE < 900 AUT07B MOVE JLF26-ERROR-MESSAGE AUT07B TO WM40-WARNING AUT07B MOVE WM40-JLM26-WARNING AUT07B TO JLMSG-TEXT AUT07B PERFORM JLMSG-DISPLAY-MESSAGE AUT07B END-IF. 295800 AUT07B IF JLF26-RETURN-CODE > 899 AUT07B MOVE JLF26-ERROR-MESSAGE AUT07B TO WM41-CRITICAL AUT07B MOVE WM41-JLM26-CRITICAL AUT07B TO JLMSG-TEXT AUT07B MOVE +16 TO RETURN-CODE AUT07B PERFORM JLMSG-DISPLAY-MESSAGE AUT07B END-IF. 294300 29430000 294400 V-200-EXIT. 29440000 294500 EXIT. 29450000 294600 29460000 294700 V-210-FETCH-READNEXT-SFB-BSP SECTION. 29470000 294800*---------------------------------------------------------------* 29480000 294900* SECTION NAME : V-210-FETCH-READNEXT-SFB-BSP * 29490000 295000* CALLED BY : * 29500000 295100* CALLS : JLDB2E-DB2-ERROR * 29510000 295200* : JLMSG-DISPLAY-MESSAGE * 29520000 295300* FUNCTION : 1. FETCHES THE NEXT BSP ENTRY FOR A PRODUCT * 29530000 295400*---------------------------------------------------------------* 29540000 295500 V-210. 29550000 295600 29560000 AUT07B MOVE "F" TO JLF26-FUNCTION AUT07B MOVE +0 TO JLF26-EXP-DAILY-SALES-1 AUT07B JLF26-EXP-DAILY-SALES-2 AUT07B JLF26-EXP-DAILY-SALES-3 AUT07B JLF26-EXP-DAILY-SALES-4 AUT07B JLF26-EXP-DAILY-SALES-5 AUT07B JLF26-EXP-DAILY-SALES-6 AUT07B JLF26-EXP-DAILY-SALES-7 AVRS42 JLF26-KA-1 AVRS42 JLF26-KA-2 AVRS42 JLF26-KA-3 AVRS42 JLF26-KA-4 AVRS42 JLF26-KA-5 AVRS42 JLF26-KA-6 AVRS42 JLF26-KA-7 AVRS42 JLF26-FORECAST-TREND-1 AVRS42 JLF26-FORECAST-TREND-2 AVRS42 JLF26-FORECAST-TREND-3 AVRS42 JLF26-FORECAST-TREND-4 AVRS42 JLF26-FORECAST-TREND-5 AVRS42 JLF26-FORECAST-TREND-6 AVRS42 JLF26-FORECAST-TREND-7 AUT07B JLF26-RETURN-CODE AUT07B JLF26-SQLCODE AUT07B MOVE SPACES TO JLF26-ERROR-MESSAGE AUT07B JLF26-SQLCA 296800 29680000 AUT07B PERFORM ZA-CALL-JL0F26 35650000 296800 29680000 AUT07B EVALUATE JLF26-SQLCODE AUT07B WHEN 0 AUT07B IF JLF26-SFB AUT07B ADD 1 TO WA01-SFB-FETCHED 29770000 AUT07B ELSE 29780000 SPR13A IF JLF26-OLD AUT07B ADD 1 TO WA01-BSP-FETCHED 29770000 SPR13A ELSE SPR13A ADD 1 TO WA01-ESP-FETCHED SPR13A END-IF SUM12A IF JLF26-EXP-DAILY-SALES-1 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-2 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-3 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-4 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-5 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-6 = 0 SUM12A AND JLF26-EXP-DAILY-SALES-7 = 0 SUM12A CONTINUE SUM12A ELSE SUM12A IF WX95-SUB < 5 SUM12A MOVE JLF26-TESCO-YRWK TO 16300000 SUM12A WW15-LAST-BSP-TESCO-YRWK 16300000 SUM12A ADD 1 TO WX95-SUB SUM12A MOVE JLF26-TESCO-YRWK TO SUM12A WT95-RTL-YEAR-WK(WX95-SUB) SUM12A END-IF SUM12A END-IF 298000 END-IF 29800000 AUT07B WHEN 100 AUT07B SET END-BSP-SFB TO TRUE AUT07B WHEN OTHER AUT07B MOVE JLF26-SQLCA TO SQLCA AUT07B MOVE "V-210-FETCH-READNEXT-SFB-BSP" 297100 TO JLDB2E-PROCESS-NAME 29710000 297200 PERFORM JLDB2E-DB2-ERROR 29720000 297300 SET JLMSG-C99-DB2-ERROR TO TRUE 29730000 297400 PERFORM JLMSG-DISPLAY-MESSAGE 29740000 AUT07B END-EVALUATE. 298200 29820000 AUT07B IF JLF26-RETURN-CODE > 499 AUT07B AND JLF26-RETURN-CODE < 900 AUT07B MOVE JLF26-ERROR-MESSAGE AUT07B TO WM40-WARNING AUT07B MOVE WM40-JLM26-WARNING AUT07B TO JLMSG-TEXT AUT07B PERFORM JLMSG-DISPLAY-MESSAGE AUT07B END-IF. 295800 AUT07B IF JLF26-RETURN-CODE > 899 AUT07B MOVE JLF26-ERROR-MESSAGE AUT07B TO WM41-CRITICAL AUT07B MOVE WM41-JLM26-CRITICAL AUT07B TO JLMSG-TEXT AUT07B MOVE +16 TO RETURN-CODE AUT07B PERFORM JLMSG-DISPLAY-MESSAGE 298100 END-IF. 29810000 298200 29820000 298300 V-210-EXIT. 29830000 298400 EXIT. 29840000 298500 29850000 298600 V-220-CLOSE-READNEXT-SFB-BSP SECTION. 29860000 298700*---------------------------------------------------------------* 29870000 298800* SECTION NAME : V-220-CLOSE-READNEXT-SFB-BSP * 29880000 298900* CALLED BY : 29890000 299000* : C-100-TERMINATE * 29900000 299100* CALLS : JLDB2E-DB2-ERROR * 29910000 299200* : JLMSG-DISPLAY-MESSAGE * 29920000 299300* FUNCTION : 1. CLOSES BSP CURSOR * 29930000 299400*---------------------------------------------------------------* 29940000 299500 V-220. 29950000 299600 29960000 AUT07B MOVE "C" TO JLF26-FUNCTION 29960000 299900 29990000 AUT07B PERFORM ZA-CALL-JL0F26 35650000 294400 AUT07B* JLF26-SQLCODE SET TO +100 WHEN CURSOR SUCCESFULLY CLOSED AUT07B 301600 IF JLF26-SQLCODE = +100 301700 SET BSP-SFB-CLOSED TO TRUE 300200 ELSE 30020000 AUT07B MOVE JLF26-SQLCA TO SQLCA 301900 MOVE "V-220-CLOSE-READNEXT-SFB-BSP" 300400 TO JLDB2E-PROCESS-NAME 30040000 300500 PERFORM JLDB2E-DB2-ERROR 30050000 300600 SET JLMSG-C99-DB2-ERROR TO TRUE 30060000 302300 PERFORM JLMSG-DISPLAY-MESSAGE 302400 END-IF. 295800 AUT07B IF JLF26-RETURN-CODE > 499 AUT07B AND JLF26-RETURN-CODE < 900 AUT07B MOVE JLF26-ERROR-MESSAGE AUT07B TO WM40-WARNING AUT07B MOVE WM40-JLM26-WARNING AUT07B TO JLMSG-TEXT AUT07B PERFORM JLMSG-DISPLAY-MESSAGE AUT07B END-IF. 295800 AUT07B IF JLF26-RETURN-CODE > 899 AUT07B MOVE JLF26-ERROR-MESSAGE AUT07B TO WM41-CRITICAL AUT07B MOVE WM41-JLM26-CRITICAL AUT07B TO JLMSG-TEXT AUT07B MOVE +16 TO RETURN-CODE 300700 PERFORM JLMSG-DISPLAY-MESSAGE 30070000 300800 END-IF. 30080000 300900 30090000 301000 V-220-EXIT. 30100000 301100 EXIT. 30110000 301200 30120000 301300 V-300-OPEN-READNEXT-VXJJ0OLD SECTION. 30130000 301400*---------------------------------------------------------------* 30140000 301500* SECTION NAME : V-300-OPEN-READNEXT-VXJJ0OLD * 30150000 301600* CALLED BY : * 30160000 301700* CALLS : JLDB2E-DB2-ERROR * 30170000 301800* : JLMSG-DISPLAY-MESSAGE * 30180000 301900* FUNCTION : 1. OPENS CURSOR FOR PRODUCT SPECIFIC ORDERS * 30190000 302000*---------------------------------------------------------------* 30200000 302100 V-300. 30210000 302200 30220000 302700 EXEC SQL OPEN READNEXT_VXJJ0OLD 30270000 302800 END-EXEC. 30280000 302900 30290000 303000 EVALUATE SQLCODE 30300000 303100 WHEN +0 30310000 303200 SET NOT-END-OLD TO TRUE 30320000 303300 SET OLD-OPEN TO TRUE 30330000 303400 WHEN +100 30340000 303500 SET END-OLD TO TRUE 30350000 303600 SET OLD-CLOSED TO TRUE 30360000 303700 WHEN OTHER 30370000 574900 DISPLAY "OLD=" DCLVXJJ0OLD "=" 57490000 303800 MOVE "V-300-OPEN-READNEXT-VXJJ0OLD" 30380000 303900 TO JLDB2E-PROCESS-NAME 30390000 304000 PERFORM JLDB2E-DB2-ERROR 30400000 304100 SET JLMSG-C99-DB2-ERROR TO TRUE 30410000 304200 PERFORM JLMSG-DISPLAY-MESSAGE 30420000 304300 END-EVALUATE. 30430000 304400 30440000 304500 V-300-EXIT. 30450000 304600 EXIT. 30460000 304700 30470000 304800 V-310-FETCH-READNEXT-VXJJ0OLD SECTION. 30480000 304900*---------------------------------------------------------------* 30490000 305000* SECTION NAME : V-310-FETCH-READNEXT-VXJJ0OLD * 30500000 305100* CALLED BY : * 30510000 305200* CALLS : JLDB2E-DB2-ERROR * 30520000 305300* : JLMSG-DISPLAY-MESSAGE * 30530000 305400* FUNCTION : 1. FETCHES THE NEXT OLD ENTRY FOR A PRODUCT * 30540000 305500*---------------------------------------------------------------* 30550000 305600 V-310. 30560000 305700 30570000 577000* INITIALIZE DCLVXJJ0OLD 57700000 577100 INITIALIZE DCLVXJJ0ORD 57710000 SUM10B*** DCLVXJJ0OLC. 501500 305800 EXEC SQL FETCH READNEXT_VXJJ0OLD 30580000 305900 INTO :OLD-REQ-DEL-DT 30590000 306000 ,:OLD-ORD-TYPE 30600000 577700 ,:OLD-ORD-NO 57770000 464400 ,:OLD-CD-LIFE :WW-OLD-CD-LIFE-NN 306200 ,:OLD-REVSD-ORD-QTY 30620000 464600 ,:OLD-APPRT-ORD-QTY :WW-OLD-APPRT-ORD-QTY-NN CRV90B ,:OLD-LOAD-REF ,:ORD-REQ-DEL-TM AUT09A ,:ORD-ACT-DEL-DATE AUT09A ,:ORD-ACT-DEL-TIME AUT09A ,:ORD-END-OF-WAVE-IND :WW-ORD-END-OF-WAVE-NN SPR11B ,:ORD-LOAD-CLOSE-DT SPR11B ,:ORD-OG-CD SPR11B ,:ORD-INV-NO :WI-ORD-INV-NO-NN AB2S10 ,:ORD-DELIVERY-STATUS 306300 END-EXEC. 30630000 306400 30640000 306500 IF SQLCODE < 0 30650000 306600 MOVE "V-310-FETCH-READNEXT-VXJJ0OLD" 30660000 306700 TO JLDB2E-PROCESS-NAME 30670000 306800 PERFORM JLDB2E-DB2-ERROR 30680000 306900 SET JLMSG-C99-DB2-ERROR TO TRUE 30690000 307000 PERFORM JLMSG-DISPLAY-MESSAGE 30700000 307100 ELSE 30710000 307200 IF SQLCODE = 0 30720000 307300 ADD 1 TO WA01-OLD-FETCHED 30730000 307400 ELSE 30740000 307500 SET END-OLD TO TRUE 30750000 307600 END-IF 30760000 307700 END-IF. 30770000 307800 30780000 307900 V-310-EXIT. 30790000 308000 EXIT. 30800000 308100 30810000 308200 V-320-CLOSE-READNEXT-VXJJ0OLD SECTION. 30820000 308300*---------------------------------------------------------------* 30830000 308400* SECTION NAME : V-320-CLOSE-READNEXT-VXJJ0OLD * 30840000 308500* CALLED BY : 30850000 308600* : C-100-TERMINATE * 30860000 308700* CALLS : JLDB2E-DB2-ERROR * 30870000 308800* : JLMSG-DISPLAY-MESSAGE * 30880000 308900* FUNCTION : 1. CLOSES OLD CURSOR * 30890000 309000*---------------------------------------------------------------* 30900000 309100 V-320. 30910000 309200 30920000 309300 EXEC SQL CLOSE READNEXT_VXJJ0OLD 30930000 309400 END-EXEC. 30940000 309500 30950000 309600 IF SQLCODE = 0 30960000 309700 SET OLD-CLOSED TO TRUE 30970000 309800 ELSE 30980000 309900 MOVE "V-320-CLOSE-READNEXT-VXJJ0OLD" 30990000 310000 TO JLDB2E-PROCESS-NAME 31000000 310100 PERFORM JLDB2E-DB2-ERROR 31010000 310200 SET JLMSG-C99-DB2-ERROR TO TRUE 31020000 310300 PERFORM JLMSG-DISPLAY-MESSAGE 31030000 310400 END-IF. 31040000 310500 31050000 310600 V-320-EXIT. 31060000 310700 EXIT. 31070000 310800 31080000 587700 V-340-OPEN-OLC SECTION. 58770000 587800*---------------------------------------------------------------* 58780000 587900* SECTION NAME : V-340-OPEN-OLC * 58790000 588000* CALLED BY : 58800000 588100* CALLS : JLDB2E-DB2-ERROR * 58810000 588200* : JLMSG-DISPLAY-MESSAGE * 58820000 588300*---------------------------------------------------------------* 58830000 588400 EXEC SQL OPEN READNEXT_VXJJ0OLC 58840000 588500 END-EXEC. 58850000 588600 58860000 SUM10B IF SQLCODE = ZERO 58870000 SUM10B SET OLC-OPEN TO TRUE 58870000 SUM10B ELSE 58870000 588800 DISPLAY "OLC=" DCLVXJJ0OLC "=" 58880000 588900 MOVE "V-340-OPEN-READNEXT-VXJJ0OLC" 58890000 589000 TO JLDB2E-PROCESS-NAME 58900000 589100 PERFORM JLDB2E-DB2-ERROR 58910000 589200 SET JLMSG-C99-DB2-ERROR TO TRUE 58920000 589300 PERFORM JLMSG-DISPLAY-MESSAGE 58930000 589400 END-IF. 58940000 589500* 58950000 589600 V-340-EXIT. 58960000 589700 EXIT. 58970000 589800 58980000 589900 V-350-READNEXT-OLC SECTION. 58990000 590000*---------------------------------------------------------------* 59000000 590100* SECTION NAME : V-350-READNEXT-OLC * 59010000 590200* CALLED BY : 59020000 590300* CALLS : JLDB2E-DB2-ERROR * 59030000 590400* : JLMSG-DISPLAY-MESSAGE * 59040000 590500*---------------------------------------------------------------* 59050000 * DISPLAY "V-350-READNEXT-OLC" 590600 EXEC SQL FETCH READNEXT_VXJJ0OLC 59060000 590700 INTO :OLC-CD-LIFE :WW-OLC-CD-LIFE-NN 59070000 590800 ,:OLC-PICK-QTY :WW-OLC-PICK-QTY-NN 59080000 590900 END-EXEC. 59090000 591000 59100000 591100 EVALUATE SQLCODE 59110000 591200 WHEN +0 59120000 591300 ADD +1 TO WA01-OLC-READ 59130000 591400 WHEN +100 59140000 591500 SET WW-OLC-CD-LIFE-NULL TO TRUE 59150000 591600 SET WW-OLC-PICK-QTY-NULL TO TRUE 59160000 591700 MOVE 9999 TO OLC-CD-LIFE 59170000 591800 WHEN OTHER 59180000 591900 DISPLAY "OLD=" DCLVXJJ0OLD "=" 59190000 592000 DISPLAY " STORE=" OLD-RO-NO " TPN=" OLD-BPR-TPN 59200000 592100 " SQL ERROR ON OLC TABLE" 59210000 592200 MOVE "V-350-READNEXT-OLC " 59220000 592300 TO JLDB2E-PROCESS-NAME 59230000 592400 PERFORM JLDB2E-DB2-ERROR 59240000 592500 SET JLMSG-C99-DB2-ERROR TO TRUE 59250000 592600 PERFORM JLMSG-DISPLAY-MESSAGE 59260000 592700 END-EVALUATE. 59270000 592800 59280000 592900 V-350-EXIT. 59290000 593000 EXIT. 59300000 593100 59310000 593200 V-360-CLOSE-OLC SECTION. 59320000 593300*---------------------------------------------------------------* 59330000 593400* SECTION NAME : V-360-CLOSE-OLC * 59340000 593500* CALLED BY : 59350000 593600* CALLS : JLDB2E-DB2-ERROR * 59360000 593700* : JLMSG-DISPLAY-MESSAGE * 59370000 593800*---------------------------------------------------------------* 59380000 593900 59390000 594000 EXEC SQL CLOSE READNEXT_VXJJ0OLC 59400000 594100 END-EXEC. 59410000 594200 59420000 SUM10B IF SQLCODE = 0 30960000 SUM10B SET OLC-CLOSED TO TRUE 30970000 SUM10B ELSE 30980000 594400 MOVE "V-360-CLOSE-READNEXT-VXJJ0OLC" 59440000 594500 TO JLDB2E-PROCESS-NAME 59450000 594600 PERFORM JLDB2E-DB2-ERROR 59460000 594700 SET JLMSG-C99-DB2-ERROR TO TRUE 59470000 594800 PERFORM JLMSG-DISPLAY-MESSAGE 59480000 594900 END-IF. 59490000 595000 59500000 595100 V-360-EXIT. 59510000 595200 EXIT. 59520000 595300 59530000 310900 V-400-OPEN-READNEXT-VXJJ0BDL SECTION. 31090000 311000*---------------------------------------------------------------* 31100000 311100* SECTION NAME : V-400-OPEN-READNEXT-VXJJ0BDL * 31110000 311200* CALLED BY : * 31120000 311300* CALLS : JLDB2E-DB2-ERROR * 31130000 311400* : JLMSG-DISPLAY-MESSAGE * 31140000 311500* FUNCTION : 1. OPENS CURSOR FOR DEVELOPMENT LINES * 31150000 311600*---------------------------------------------------------------* 31160000 311700 V-400. 31170000 311800 31180000 311900 MOVE WW01-CURR-PART-NO TO BDL-CR-PART-NO. 31190000 312000 MOVE WW01-CURR-RO-NO TO BDL-RO-NO. 31200000 312100 MOVE WW01-CURR-BPR-TPN TO BDL-BPR-TPN. 31210000 312200 31220000 312300 EXEC SQL OPEN READNEXT_VXJJ0BDL 31230000 312400 END-EXEC. 31240000 312500 31250000 312600 EVALUATE SQLCODE 31260000 312700 WHEN +0 31270000 312800 SET NOT-END-BDL TO TRUE 31280000 312900 SET BDL-OPEN TO TRUE 31290000 313000 WHEN +100 31300000 313100 SET END-BDL TO TRUE 31310000 313200 SET BDL-CLOSED TO TRUE 31320000 313300 WHEN OTHER 31330000 313400 MOVE "V-400-OPEN-READNEXT-VXJJ0BDL" 31340000 313500 TO JLDB2E-PROCESS-NAME 31350000 313600 PERFORM JLDB2E-DB2-ERROR 31360000 313700 SET JLMSG-C99-DB2-ERROR TO TRUE 31370000 313800 PERFORM JLMSG-DISPLAY-MESSAGE 31380000 313900 END-EVALUATE. 31390000 314000 31400000 314100 V-400-EXIT. 31410000 314200 EXIT. 31420000 314300 31430000 314400 V-410-FETCH-READNEXT-VXJJ0BDL SECTION. 31440000 314500*---------------------------------------------------------------* 31450000 314600* SECTION NAME : V-410-FETCH-READNEXT-VXJJ0BDL * 31460000 314700* CALLED BY : * 31470000 314800* CALLS : JLDB2E-DB2-ERROR * 31480000 314900* : JLMSG-DISPLAY-MESSAGE * 31490000 315000* FUNCTION : 1. FETCHES THE NEXT BDL ENTRY FOR A PRODUCT * 31500000 315100*---------------------------------------------------------------* 31510000 315200 V-410. 31520000 315300 31530000 315400 EXEC SQL FETCH READNEXT_VXJJ0BDL 31540000 315500 INTO :BDL-DEV-LINE-STDT, 31550000 315600 :BDL-DEV-LINE-ENDT 31560000 315700 :WI01-BDL-DEV-LINE-ENDT-NN, 31570000 315800 :BDL-DEV-LINE-SIZE 31580000 315900 END-EXEC. 31590000 316000 31600000 316100 IF SQLCODE < 0 31610000 316200 MOVE "V-310-FETCH-READNEXT-VXJJ0BDL" 31620000 316300 TO JLDB2E-PROCESS-NAME 31630000 316400 PERFORM JLDB2E-DB2-ERROR 31640000 316500 SET JLMSG-C99-DB2-ERROR TO TRUE 31650000 316600 PERFORM JLMSG-DISPLAY-MESSAGE 31660000 316700 ELSE 31670000 316800 IF SQLCODE = 0 31680000 316900 ADD 1 TO WA01-BDL-FETCHED 31690000 317000 ELSE 31700000 317100 SET END-BDL TO TRUE 31710000 317200 END-IF 31720000 317300 END-IF. 31730000 317400 31740000 317500 V-410-EXIT. 31750000 317600 EXIT. 31760000 317700 31770000 317800 V-420-CLOSE-READNEXT-VXJJ0BDL SECTION. 31780000 317900*---------------------------------------------------------------* 31790000 318000* SECTION NAME : V-420-CLOSE-READNEXT-VXJJ0BDL * 31800000 318100* CALLED BY : 31810000 318200* : C-100-TERMINATE * 31820000 318300* CALLS : JLDB2E-DB2-ERROR * 31830000 318400* : JLMSG-DISPLAY-MESSAGE * 31840000 318500* FUNCTION : 1. CLOSES BDL CURSOR * 31850000 318600*---------------------------------------------------------------* 31860000 318700 V-320. 31870000 318800 31880000 318900 EXEC SQL CLOSE READNEXT_VXJJ0BDL 31890000 319000 END-EXEC. 31900000 319100 31910000 319200 IF SQLCODE = 0 31920000 319300 SET BDL-CLOSED TO TRUE 31930000 319400 ELSE 31940000 319500 MOVE "V-420-CLOSE-READNEXT-VXJJ0BDL" 31950000 319600 TO JLDB2E-PROCESS-NAME 31960000 319700 PERFORM JLDB2E-DB2-ERROR 31970000 319800 SET JLMSG-C99-DB2-ERROR TO TRUE 31980000 319900 PERFORM JLMSG-DISPLAY-MESSAGE 31990000 320000 END-IF. 32000000 320100 32010000 320200 V-420-EXIT. 32020000 320300 EXIT. 32030000 320400 32040000 SUM13A VA-OPEN-READNXT-OLD-RP-CURSOR SECTION. 31090000 SUM13A*---------------------------------------------------------------* 31100000 SUM13A* SECTION NAME : VA-OPEN-READNXT-OLD-RP-CURSOR * 31110000 SUM13A* CALLED BY : * 31120000 SUM13A* CALLS : JLDB2E-DB2-ERROR * 31130000 SUM13A* : JLMSG-DISPLAY-MESSAGE * 31140000 SUM13A* FUNCTION : OPENS CURSOR FOR READING OLD/ORD TABLE FOR * 31150000 SUM13A* : GETTING NEXT 25 DELIVERY DATES * 31150000 SUM13A*---------------------------------------------------------------* 31160000 SUM13A VA-100. 31170000 SUM13AD DISPLAY "VA-OPEN-READNXT-OLD-RP-CURSOR" SUM13A 31180000 SUM13A MOVE WW01-CURR-PART-NO TO OLD-CR-PART-NO. 31190000 SUM13A MOVE WW01-CURR-RO-NO TO OLD-RO-NO. 31200000 SUM13C MOVE WW01-CURR-BPR-TPN TO RPK-COMP-BPR-TPN. 31200000 SUM13A 31220000 SUM13A EXEC SQL OPEN READNEXT_VXJJ0OLD_RPK 31230000 SUM13A END-EXEC. 31240000 SUM13A 31250000 SUM13A EVALUATE SQLCODE 31260000 SUM13A WHEN +0 31270000 SUM13A SET OLD-RP-OPEN TO TRUE 31290000 SUM13A WHEN OTHER 31330000 SUM13A MOVE "VA-OPEN-READNXT-OLD-RP-CURSOR" 31340000 SUM13A TO JLDB2E-PROCESS-NAME 31350000 SUM13A PERFORM JLDB2E-DB2-ERROR 31360000 SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE 31370000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 31380000 SUM13A END-EVALUATE. 31390000 SUM13A 31400000 SUM13A VA-100-EXIT. 31410000 SUM13A EXIT. 31420000 SUM13A 31430000 SUM13A VB-FETCH-READNXT-OLD-RP-CURSOR SECTION. 31440000 SUM13A*---------------------------------------------------------------* 31450000 SUM13A* SECTION NAME : VB-FETCH-READNXT-OLD-RP-CURSOR * 31460000 SUM13A* CALLED BY : * 31470000 SUM13A* CALLS : JLDB2E-DB2-ERROR * 31480000 SUM13A* : JLMSG-DISPLAY-MESSAGE * 31490000 SUM13A* FUNCTION : FETCHES THE NEXT 25 DATES FROM OLD/ORD * 31500000 SUM13A*---------------------------------------------------------------* 31510000 SUM13A VB-100. 31520000 SUM13AD DISPLAY "VB-FETCH-READNXT-OLD-RP-CURSOR" SUM13A 31530000 SUM13A EXEC SQL FETCH READNEXT_VXJJ0OLD_RPK 31540000 SUM13A INTO :OLD-REQ-DEL-DT 31550000 SUM13A END-EXEC. 31590000 SUM13A 31600000 SUM13A IF SQLCODE < 0 31610000 SUM13A MOVE "VB-FETCH-READNXT-OLD-RP-CURSOR" 31620000 SUM13A TO JLDB2E-PROCESS-NAME 31630000 SUM13A PERFORM JLDB2E-DB2-ERROR 31640000 SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE 31650000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 31660000 SUM13A ELSE 31670000 SUM13A IF SQLCODE = 0 31680000 SUM13A ADD 1 TO WA01-OLD-RP-FETCHED 31690000 SUM13A ELSE 31700000 SUM13A SET END-OLD-RP TO TRUE 31710000 SUM13A END-IF 31720000 SUM13A END-IF. 31730000 SUM13A 31740000 SUM13A VB-100-EXIT. 31750000 SUM13A EXIT. 31760000 SUM13A 31770000 SUM13A VC-CLOSE-READNXT-OLD-RP-CURSOR SECTION. 31780000 SUM13A*---------------------------------------------------------------* 31790000 SUM13A* SECTION NAME : VC-CLOSE-READNXT-OLD-RP-CURSOR * 31800000 SUM13A* CALLED BY : * 31810000 SUM13A* : C-100-TERMINATE * 31820000 SUM13A* CALLS : JLDB2E-DB2-ERROR * 31830000 SUM13A* : JLMSG-DISPLAY-MESSAGE * 31840000 SUM13A* FUNCTION : 1. CLOSES OLD-RP CURSOR * 31850000 SUM13A*---------------------------------------------------------------* 31860000 SUM13A VC-100. 31870000 SUM13AD DISPLAY "VC-CLOSE-READNXT-OLD-RP-CURSOR" SUM13A 31880000 SUM13A EXEC SQL CLOSE READNEXT_VXJJ0OLD_RPK 31890000 SUM13A END-EXEC. 31900000 SUM13A 31910000 SUM13A IF SQLCODE = 0 31920000 SUM13A SET OLD-RP-CLOSED TO TRUE 31930000 SUM13A ELSE 31940000 SUM13A MOVE "VC-CLOSE-READNXT-OLD-RP-CURSOR" 31950000 SUM13A TO JLDB2E-PROCESS-NAME 31960000 SUM13A PERFORM JLDB2E-DB2-ERROR 31970000 SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE 31980000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 31990000 SUM13A END-IF. 32000000 SUM13A 32010000 SUM13A VC-100-EXIT. 32020000 SUM13A EXIT. 32030000 SUM13A 32040000 SUM13C VD-OPEN-READNXT-OJD-RP-CURSOR SECTION. 31090000 SUM13A*---------------------------------------------------------------* 31100000 SUM13C* SECTION NAME : VD-OPEN-READNXT-OJD-RP-CURSOR * 31110000 SUM13A* CALLED BY : * 31120000 SUM13A* CALLS : JLDB2E-DB2-ERROR * 31130000 SUM13A* : JLMSG-DISPLAY-MESSAGE * 31140000 SUM13C* FUNCTION : OPENS CURSOR FOR READING OJD/RPK TABLE FOR * 31150000 SUM13A* : GETTING NEXT 25 DELIVERY DATES * 31150000 SUM13A*---------------------------------------------------------------* 31160000 SUM13A VD-100. 31170000 SUM13CD DISPLAY "VD-OPEN-READNXT-OJD-RP-CURSOR" SUM13A 31180000 SUM13C MOVE WW01-CURR-PART-NO TO OJD-CR-PART-NO. 31190000 SUM13C MOVE WW01-CURR-RO-NO TO OJD-RO-NO. 31200000 SUM13C MOVE WW01-CURR-BPR-TPN TO RPK-COMP-BPR-TPN. 31200000 SUM13A 31220000 SUM13C EXEC SQL OPEN READNEXT_VXJJ0OJD_RPK 31230000 SUM13A END-EXEC. 31240000 SUM13A 31250000 SUM13A EVALUATE SQLCODE 31260000 SUM13A WHEN +0 31270000 SUM13A SET OJD-RP-OPEN TO TRUE 31290000 SUM13A WHEN OTHER 31330000 SUM13C MOVE "VD-OPEN-READNXT-OJD-RP-CURSOR" 31340000 SUM13A TO JLDB2E-PROCESS-NAME 31350000 SUM13A PERFORM JLDB2E-DB2-ERROR 31360000 SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE 31370000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 31380000 SUM13A END-EVALUATE. 31390000 SUM13A 31400000 SUM13A VD-100-EXIT. 31410000 SUM13A EXIT. 31420000 SUM13A 31430000 SUM13C VE-FETCH-READNXT-OJD-RP-CURSOR SECTION. 31440000 SUM13A*---------------------------------------------------------------* 31450000 SUM13C* SECTION NAME : VE-FETCH-READNXT-OJD-RP-CURSOR * 31460000 SUM13A* CALLED BY : * 31470000 SUM13A* CALLS : JLDB2E-DB2-ERROR * 31480000 SUM13A* : JLMSG-DISPLAY-MESSAGE * 31490000 SUM13C* FUNCTION : FETCHES THE NEXT 25 DATES FROM OJD/RPK * 31500000 SUM13A*---------------------------------------------------------------* 31510000 SUM13A VE-100. 31520000 SUM13CD DISPLAY "VE-FETCH-READNXT-OJD-RP-CURSOR" SUM13A 31530000 SUM13A EXEC SQL FETCH READNEXT_VXJJ0OJD_RPK 31540000 SUM13C INTO :OJD-REQ-DEL-DT 31550000 SUM13A END-EXEC. 31590000 SUM13A 31600000 SUM13A IF SQLCODE < 0 31610000 SUM13C MOVE "VE-FETCH-READNXT-OJD-RP-CURSOR" 31620000 SUM13A TO JLDB2E-PROCESS-NAME 31630000 SUM13A PERFORM JLDB2E-DB2-ERROR 31640000 SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE 31650000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 31660000 SUM13A ELSE 31670000 SUM13A IF SQLCODE = 0 31680000 SUM13C ADD 1 TO WA01-OJD-RP-FETCHED 31690000 SUM13A ELSE 31700000 SUM13A SET END-OJD-RP TO TRUE 31710000 SUM13A END-IF 31720000 SUM13A END-IF. 31730000 SUM13A 31740000 SUM13A VE-100-EXIT. 31750000 SUM13A EXIT. 31760000 SUM13A 31770000 SUM13C VF-CLOSE-READNXT-OJD-RP-CURSOR SECTION. 31780000 SUM13A*---------------------------------------------------------------* 31790000 SUM13C* SECTION NAME : VF-CLOSE-READNXT-OJD-RP-CURSOR * 31800000 SUM13A* CALLED BY : * 31810000 SUM13A* : C-100-TERMINATE * 31820000 SUM13A* CALLS : JLDB2E-DB2-ERROR * 31830000 SUM13A* : JLMSG-DISPLAY-MESSAGE * 31840000 SUM13A* FUNCTION : 1. CLOSES OLD-RP CURSOR * 31850000 SUM13A*---------------------------------------------------------------* 31860000 SUM13A VF-100. 31870000 SUM13CD DISPLAY "VF-CLOSE-READNXT-OJD-RP-CURSOR" SUM13A 31880000 SUM13C EXEC SQL CLOSE READNEXT_VXJJ0OJD_RPK 31890000 SUM13A END-EXEC. 31900000 SUM13A 31910000 SUM13A IF SQLCODE = 0 31920000 SUM13C SET OJD-RP-CLOSED TO TRUE 31930000 SUM13A ELSE 31940000 SUM13C MOVE "VF-CLOSE-READNXT-OJD-RP-CURSOR" 31950000 SUM13A TO JLDB2E-PROCESS-NAME 31960000 SUM13A PERFORM JLDB2E-DB2-ERROR 31970000 SUM13A SET JLMSG-C99-DB2-ERROR TO TRUE 31980000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 31990000 SUM13A END-IF. 32000000 SUM13A 32010000 SUM13A VF-100-EXIT. 32020000 SUM13A EXIT. 32030000 SUM13A 32040000 320500 V-500-READ-VXJJ0ALL SECTION. 32050000 320600*---------------------------------------------------------------* 32060000 320700* SECTION NAME : V-500-READ-VXJJ0ALL * 32070000 320800* CALLED BY : * 32080000 320900* CALLS : JLDB2E-DB2-ERROR * 32090000 321000* : JLMSG-DISPLAY-MESSAGE * 32100000 321100* FUNCTION : 1. READS GENERAL ALLOCATION DATAT FROM ALL * 32110000 321200*---------------------------------------------------------------* 32120000 321300 V-500. 32130000 811500* DISPLAY "V-500-1". 81150018 321500 32150000 321600 32160000 321700 MOVE WW01-CURR-PART-NO TO ALL-CR-PART-NO. 32170000 321710 MOVE WW01-CURR-RO-NO TO ALL-RO-NO. 32171000 321720 MOVE WW01-CURR-BPR-TPN TO ALL-BPR-TPN. 32172000 321730 32173000 321740 EXEC SQL 32174000 321750 SELECT ALLOC_TYPE 32175000 321760 ,ORIG_ALLOC_QTY 32176021 321760 ,REM_RSVE_QTY 32176000 321770 ,LAST_FORCED_DATE 32177000 321780 ,ALLCN_STDT 32178000 321790 ,ALLCN_ENDT 32179000 AUT07A ,PROC_REM_RSVE_QTY AUT07A ,PROC_LST_FORCED_DT 321800 INTO :ALL-ALLOC-TYPE, 32180000 321900 :ALL-ORIG-ALLOC-QTY, 32190021 321900 :ALL-REM-RSVE-QTY, 32190000 322000 :ALL-LAST-FORCED-DATE, 32200000 322100 :ALL-ALLCN-STDT, 32210000 322200 :ALL-ALLCN-ENDT, 32220000 AUT07A :ALL-PROC-REM-RSVE-QTY, 32220000 AUT07A :ALL-PROC-LST-FORCED-DT 32220000 322300 FROM VXJJ0ALL 32230000 322400 WHERE CR_PART_NO = :ALL-CR-PART-NO 32240000 322500 AND RO_NO = :ALL-RO-NO 32250000 322600 AND BPR_TPN = :ALL-BPR-TPN 32260000 WITH UR 322700 END-EXEC. 32270000 322800 32280000 322900 EVALUATE SQLCODE 32290000 323000 WHEN +0 32300000 323100 ADD 1 TO WA01-ALL-FETCHED 32310000 323200 SET ALL-FOUND TO TRUE 32320000 323300 WHEN +100 32330000 323400 INITIALIZE WM10-DB2-ERR-CONTINUE 32340000 323500 MOVE WW01-CURR-PART-NO TO WM10-PART-NO 32350000 323600 MOVE WW01-CURR-RO-NO TO WM10-RO-NO 32360027 323700 MOVE WW01-CURR-BPR-TPN TO WM10-BPR-TPN 32370027 323800 MOVE WF01-VXJJ0ALL TO WM10-TABLE 32380000 323900 MOVE WM10-DB2-ERR-CONTINUE TO JLMSG-TEXT 32390000 324000 PERFORM JLMSG-DISPLAY-MESSAGE 32400000 324100 SET ALL-NOT-FOUND TO TRUE 32410000 324200 WHEN OTHER 32420000 324300 MOVE "V-500-READ-VXJJ0ALL" 32430000 324400 TO JLDB2E-PROCESS-NAME 32440000 324500 PERFORM JLDB2E-DB2-ERROR 32450000 324600 SET JLMSG-C99-DB2-ERROR TO TRUE 32460000 324700 PERFORM JLMSG-DISPLAY-MESSAGE 32470000 324800 END-EVALUATE. 32480000 324900 32490000 325000 V-500-EXIT. 32500000 325100 EXIT. 32510000 325200 32520000 325300 V-510-OPEN-READNEXT-VXJJ0ALP SECTION. 32530000 325400*---------------------------------------------------------------* 32540000 325500* SECTION NAME : V-510-OPEN-READNEXT-VXJJ0ALP * 32550000 325600* CALLED BY : * 32560000 325700* CALLS : JLDB2E-DB2-ERROR * 32570000 325800* : JLMSG-DISPLAY-MESSAGE * 32580000 325900* FUNCTION : 1. OPENS CURSOR FOR ALLOCATION PATTERNS * 32590000 326000*---------------------------------------------------------------* 32600000 326100 V-510. 32610000 817500* DISPLAY "V-510-1". 81750018 326300 32630000 326400 32640000 326500 MOVE WW01-CURR-PART-NO TO ALP-CR-PART-NO. 32650000 326600 MOVE WW01-CURR-RO-NO TO ALP-RO-NO. 32660000 326700 MOVE WW01-CURR-BPR-TPN TO ALP-BPR-TPN. 32670000 326800 32680000 326900 EXEC SQL OPEN READNEXT_VXJJ0ALP 32690000 327000 END-EXEC. 32700000 327100 32710000 327200 EVALUATE SQLCODE 32720000 327300 WHEN +0 32730000 327400 SET NOT-END-ALP TO TRUE 32740000 327500 SET ALP-OPEN TO TRUE 32750000 327600 WHEN +100 32760000 327700 SET END-ALP TO TRUE 32770000 327800 SET ALP-CLOSED TO TRUE 32780000 327900 WHEN OTHER 32790000 328000 MOVE "V-510-OPEN-READNEXT-VXJJ0ALP" 32800000 328100 TO JLDB2E-PROCESS-NAME 32810000 328200 PERFORM JLDB2E-DB2-ERROR 32820000 328300 SET JLMSG-C99-DB2-ERROR TO TRUE 32830000 328400 PERFORM JLMSG-DISPLAY-MESSAGE 32840000 328500 END-EVALUATE. 32850000 328600 32860000 328700 V-510-EXIT. 32870000 328800 EXIT. 32880000 328900 32890000 329000 V-520-FETCH-READNEXT-VXJJ0ALP SECTION. 32900000 329100*---------------------------------------------------------------* 32910000 329200* SECTION NAME : V-520-FETCH-READNEXT-VXJJ0ALP * 32920000 329300* CALLED BY : * 32930000 329400* CALLS : JLDB2E-DB2-ERROR * 32940000 329500* : JLMSG-DISPLAY-MESSAGE * 32950000 329600* FUNCTION : 1. FETCHES THE NEXT ALP ENTRY FOR A PRODUCT * 32960000 329700*---------------------------------------------------------------* 32970000 329800 V-520. 32980000 821200* DISPLAY "V-520-1". 82120018 330000 33000000 330100 EXEC SQL FETCH READNEXT_VXJJ0ALP 33010000 330200 INTO :ALP-REQ-DEL-DT 33020000 330300 ,:ALP-APPORTIONMENT-PC 33030000 330400 ,:ALP-ALLOC-PATTERN 33040000 330500 ,:ALP-NEW-LINE-QTY 33050000 330600 ,:ALP-DEMO-IND 33060000 330700 ,:ALP-ROUND-UP-IND 33070000 330800 END-EXEC. 33080000 330900 33090000 331000 IF SQLCODE < 0 33100000 331100 MOVE "V-520-FETCH-READNEXT-VXJJ0ALP" 33110000 331200 TO JLDB2E-PROCESS-NAME 33120000 331300 PERFORM JLDB2E-DB2-ERROR 33130000 331400 SET JLMSG-C99-DB2-ERROR TO TRUE 33140000 331500 PERFORM JLMSG-DISPLAY-MESSAGE 33150000 331600 ELSE 33160000 331700 IF SQLCODE = 0 33170000 331800 ADD 1 TO WA01-ALP-FETCHED 33180000 331900 ELSE 33190000 332000 SET END-ALP TO TRUE 33200000 332100 END-IF 33210000 332200 END-IF. 33220000 332300 33230000 332400 V-520-EXIT. 33240000 332500 EXIT. 33250000 332600 33260000 332700 V-530-CLOSE-READNEXT-VXJJ0ALP SECTION. 33270000 332800*---------------------------------------------------------------* 33280000 332900* SECTION NAME : V-530-CLOSE-READNEXT-VXJJ0ALP * 33290000 333000* CALLED BY : 33300000 333100* : C-100-TERMINATE * 33310000 333200* CALLS : JLDB2E-DB2-ERROR * 33320000 333300* : JLMSG-DISPLAY-MESSAGE * 33330000 333400* FUNCTION : 1. CLOSES ALP CURSOR * 33340000 333500*---------------------------------------------------------------* 33350000 333600 V-530. 33360000 333700 33370000 333800 EXEC SQL CLOSE READNEXT_VXJJ0ALP 33380000 333900 END-EXEC. 33390000 334000 33400000 334100 IF SQLCODE = 0 33410000 334200 SET ALP-CLOSED TO TRUE 33420000 334300 ELSE 33430000 334400 MOVE "V-530-CLOSE-READNEXT-VXJJ0ALP" 33440000 334500 TO JLDB2E-PROCESS-NAME 33450000 334600 PERFORM JLDB2E-DB2-ERROR 33460000 334700 SET JLMSG-C99-DB2-ERROR TO TRUE 33470000 334800 PERFORM JLMSG-DISPLAY-MESSAGE 33480000 334900 END-IF. 33490000 335000 33500000 335100 V-530-EXIT. 33510000 335200 EXIT. 33520000 335300 33530000 459900 495300 V-600-OPEN-READNEXT-VXJJ0OGP SECTION. 460100*---------------------------------------------------------------* 460200* SECTION NAME : V-610-OPEN-READNEXT-VXJJ0OGP * 460300* CALLED BY : E-LOAD-OGP-TABLE * 460400* CALLS : JLDB2E-DB2-ERROR * 460500* : JLMSG-DISPLAY-MESSAGE * 460600* FUNCTION : 1. OPENS CURSOR FOR ALLOCATION PATTERNS * 460700*---------------------------------------------------------------* 460800 V-600. 827700* DISPLAY "V-600-1". 82770018 461000 461100 EXEC SQL OPEN READNEXT_VXJJ0OGP 461200 END-EXEC. 461300 461400 IF SQLCODE NOT = 0 AND 100 461500 MOVE "V-600-OPEN-READNEXT-VXJJ0OGP" 461600 TO JLDB2E-PROCESS-NAME 461700 PERFORM JLDB2E-DB2-ERROR 461800 SET JLMSG-C99-DB2-ERROR TO TRUE 461900 PERFORM JLMSG-DISPLAY-MESSAGE 462000 END-IF. 462100 462200 V-600-EXIT. 462300 EXIT. 462400 462500 V-610-FETCH-READNEXT-VXJJ0OGP SECTION. 462600*---------------------------------------------------------------* 462700* SECTION NAME : V-620-FETCH-READNEXT-VXJJ0OGP * 462800* CALLED BY : E-LOAD-OGP-TABLE * 462900* CALLS : JLDB2E-DB2-ERROR * 463000* : JLMSG-DISPLAY-MESSAGE * 463100* FUNCTION : 1. FETCHES THE NEXT OGP ENTRY * 463200*---------------------------------------------------------------* 463300 V-610. 830200* DISPLAY "V-610-1". 83020018 463500 463600 EXEC SQL FETCH READNEXT_VXJJ0OGP 463700 INTO :OGP-OG-CD 463800 ,:OGP-LEGACY-ID 463900 END-EXEC. 464000 464100 IF SQLCODE < 0 464200 MOVE "V-610-FETCH-READNEXT-VXJJ0OGP" 464300 TO JLDB2E-PROCESS-NAME 464400 PERFORM JLDB2E-DB2-ERROR 464500 SET JLMSG-C99-DB2-ERROR TO TRUE 464600 PERFORM JLMSG-DISPLAY-MESSAGE 464700 ELSE 464800 IF SQLCODE = 0 464900 ADD 1 TO WA01-OGP-FETCHED 465000 END-IF 465100 END-IF. 465200 465300 V-610-EXIT. 465400 EXIT. 465500 465600 V-630-CLOSE-READNEXT-VXJJ0OGP SECTION. 465700*---------------------------------------------------------------* 465800* SECTION NAME : V-630-CLOSE-READNEXT-VXJJ0OGP * 465900* CALLED BY : 466000* : C-100-TERMINATE * 466100* CALLS : JLDB2E-DB2-ERROR * 466200* : JLMSG-DISPLAY-MESSAGE * 466300* FUNCTION : 1. CLOSES OGP CURSOR * 466400*---------------------------------------------------------------* 466500 V-630. 466600 466700 EXEC SQL CLOSE READNEXT_VXJJ0OGP 466800 END-EXEC. 466900 467000 IF SQLCODE NOT = 0 AND -501 467100 MOVE "V-630-CLOSE-READNEXT-VXJJ0OGP" 467200 TO JLDB2E-PROCESS-NAME 467300 PERFORM JLDB2E-DB2-ERROR 467400 SET JLMSG-C99-DB2-ERROR TO TRUE 467500 PERFORM JLMSG-DISPLAY-MESSAGE 467600 END-IF. 467700 467800 V-630-EXIT. 467900 EXIT. 468000 503400 V-700-OPEN-READNEXT-VXJJ0ASF SECTION. 503500*---------------------------------------------------------------* 503600* SECTION NAME : V-700-OPEN-READNEXT-VXJJ0ASF * 503700* CALLED BY : * 503800* CALLS : JLDB2E-DB2-ERROR * 503900* : JLMSG-DISPLAY-MESSAGE * 504000* FUNCTION : 1. OPENS CURSOR FOR OLD FORECASTS * 504100*---------------------------------------------------------------* 504200 V-700. 504300 504400 MOVE WW01-CURR-PART-NO TO ASF-CR-PART-NO. 504500 MOVE WW01-CURR-RO-NO TO ASF-RO-NO. 504600 MOVE WW01-CURR-BPR-TPN TO ASF-BPR-TPN. 504700 MOVE WW01-ASF-SALES-DATE TO ASF-SALES-DATE. 504800 504900 EXEC SQL OPEN READNEXT_VXJJ0ASF 505000 END-EXEC. 505100 505200 EVALUATE SQLCODE 505300 WHEN +0 505400 SET NOT-END-ASF TO TRUE 505500 SET ASF-OPEN TO TRUE 505600 WHEN +100 505700 INITIALIZE WM10-DB2-ERR-CONTINUE 505800 MOVE WW01-CURR-PART-NO TO WM10-PART-NO 505900 MOVE WW01-CURR-RO-NO-DB2 TO WM10-RO-NO 506000 MOVE WW01-CURR-BPR-TPN-DB2 TO WM10-BPR-TPN 506100 MOVE WW01-ASF-SALES-DATE TO WM10-ST-DATE 506200 MOVE WF01-VXJJ0ASF TO WM10-TABLE 506300 MOVE WM10-DB2-ERR-CONTINUE TO JLMSG-TEXT 506400 PERFORM JLMSG-DISPLAY-MESSAGE 506500 WHEN OTHER 506600 MOVE "V-700-OPEN-READNEXT-VXJJ0ASF" 506700 TO JLDB2E-PROCESS-NAME 506800 PERFORM JLDB2E-DB2-ERROR 506900 SET JLMSG-C99-DB2-ERROR TO TRUE 507000 PERFORM JLMSG-DISPLAY-MESSAGE 507100 END-EVALUATE. 507200 507300 V-700-EXIT. 507400 EXIT. 507500 507600 V-710-FETCH-READNEXT-VXJJ0ASF SECTION. 507700*---------------------------------------------------------------* 507800* SECTION NAME : V-710-FETCH-READNEXT-VXJJ0ASF * 507900* CALLED BY : * 508000* CALLS : JLDB2E-DB2-ERROR * 508100* : JLMSG-DISPLAY-MESSAGE * 508200* FUNCTION : 1. FETCHES THE NEXT ASF ENTRY FOR A PRODUCT * 508300*---------------------------------------------------------------* 508400 V-710. 508500 508600 EXEC SQL FETCH READNEXT_VXJJ0ASF 508700 INTO :ASF-SALES-DATE 508800 ,:ASF-PREV-FCST-EDS 508900 END-EXEC. 509000 509100 IF SQLCODE < 0 509200 MOVE "V-710-FETCH-READNEXT-VXJJ0ASF" 509300 TO JLDB2E-PROCESS-NAME 509400 PERFORM JLDB2E-DB2-ERROR 509500 SET JLMSG-C99-DB2-ERROR TO TRUE 509600 PERFORM JLMSG-DISPLAY-MESSAGE 509700 ELSE 509800 IF SQLCODE = 0 509900 ADD 1 TO WA01-ASF-FETCHED 510000 ELSE 510100 SET END-ASF TO TRUE 510200 END-IF 510300 END-IF. 510400 510500 V-710-EXIT. 510600 EXIT. 510700 510800 V-720-CLOSE-READNEXT-VXJJ0ASF SECTION. 510900*---------------------------------------------------------------* 511000* SECTION NAME : V-720-CLOSE-READNEXT-VXJJ0ASF * 511100* CALLED BY : 511200* : C-100-TERMINATE * 511300* CALLS : JLDB2E-DB2-ERROR * 511400* : JLMSG-DISPLAY-MESSAGE * 511500* FUNCTION : 1. CLOSES ASF CURSOR * 511600*---------------------------------------------------------------* 511700 V-720. 511800 511900 EXEC SQL CLOSE READNEXT_VXJJ0ASF 512000 END-EXEC. 512100 512200 IF SQLCODE = 0 OR -501 512300 SET ASF-CLOSED TO TRUE 512400 ELSE 512500 MOVE "V-720-CLOSE-READNEXT-VXJJ0ASF" 512600 TO JLDB2E-PROCESS-NAME 512700 PERFORM JLDB2E-DB2-ERROR 512800 SET JLMSG-C99-DB2-ERROR TO TRUE 512900 PERFORM JLMSG-DISPLAY-MESSAGE 513000 END-IF. 513100 513200 V-720-EXIT. 513300 EXIT. 513400 613201*----- 27/03/2001 - GM ---------------------------------------* 61320100 613202 V-750-READ-VXJJ0MMD SECTION. 61320200 613203*---------------------------------------------------------------* 61320300 613204* SECTION NAME : V-750-READ-VXJJ0MMD * 61320400 613205* CALLED BY : * 61320500 613206* CALLS : JLDB2E-DB2-ERROR * 61320600 613207* : JLMSG-DISPLAY-MESSAGE * 61320700 613208* FUNCTION : 1. READS MM ALLOCATION DATA FROM MMD TABLE * 61320800 613209*---------------------------------------------------------------* 61320900 613210 V-750. 61321000 846000* DISPLAY "V-750-1". 84600018 613212 61321200 613213 MOVE WW01-CURR-PART-NO TO MMD-CR-PART-NO. 61321300 613214 MOVE WW01-CURR-RO-NO TO MMD-RO-NO. 61321400 613215 MOVE WW01-CURR-BPR-TPN TO MMD-BPR-TPN. 61321500 613216 61321600 613217 MOVE JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 61321700 613218 TO MMD-LAUNCH-SLS-FLAG. 61321800 613219 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 61321900 613220 TO MMD-REQ-DEL-DT. 61322000 613221 61322100 613222 EXEC SQL 61322200 613223 SELECT TOT_ALLOC_QTY 61322300 613224 INTO :MMD-TOT-ALLOC-QTY 61322400 613225 FROM VXJJ0MMD 61322500 613226 WHERE CR_PART_NO = :MMD-CR-PART-NO 61322600 613227 AND RO_NO = :MMD-RO-NO 61322700 613228 AND BPR_TPN = :MMD-BPR-TPN 61322800 613229 AND REQ_DEL_DT = :MMD-REQ-DEL-DT 61322900 613230 AND LAUNCH_SLS_FLAG = :MMD-LAUNCH-SLS-FLAG 61323000 613231 WITH UR 61323100 613232 END-EXEC. 61323200 613233 61323300 613234 EVALUATE SQLCODE 61323400 613235 WHEN +0 61323500 613236 ADD 1 TO WA01-MMD-FETCHED 61323600 613237 SET NOT-MISSING-MMD TO TRUE 61323700 613238 WHEN +100 61323800 613239 INITIALIZE WM10-DB2-ERR-CONTINUE 61323900 613240 MOVE WW01-CURR-PART-NO TO WM10-PART-NO 61324000 613241 MOVE WW01-CURR-RO-NO TO WM10-RO-NO 61324100 613242 MOVE WW01-CURR-BPR-TPN TO WM10-BPR-TPN 61324200 613243 MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 61324300 613244 TO WM10-ST-DATE 61324400 613245 MOVE JLF40-ALLOC-TYPE(WX10-DATA-SUB1) 61324500 613246 TO WM10-EN-DATE 61324600 613247 MOVE WF01-VXJJ0MMD TO WM10-TABLE 61324700 613248 MOVE WM10-DB2-ERR-CONTINUE TO JLMSG-TEXT 61324800 613249 PERFORM JLMSG-DISPLAY-MESSAGE 61324900 613250 SET MISSING-MMD TO TRUE 61325000 613251 WHEN OTHER 61325100 613252 MOVE "V-750-READ-VXJJ0MMD" 61325200 613253 TO JLDB2E-PROCESS-NAME 61325300 613254 PERFORM JLDB2E-DB2-ERROR 61325400 613255 SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 613256 PERFORM JLMSG-DISPLAY-MESSAGE 61325600 613257 END-EVALUATE. 61325700 613258 61325800 613259 V-750-EXIT. 61325900 613260 EXIT. 61326000 613261*---------------------------------------------------------------* 61326100 613262 61326200 513400 CRV90B V-760-READ-VXJJ0DSF SECTION. 61320200 CRV90B*---------------------------------------------------------------* 61320300 CRV90B* SECTION NAME : V-760-READ-VXJJ0DSF * 61320400 CRV90B* CALLED BY : B-358-CHECK-DEGRAD-SHELF-LIFE * 61320500 CRV90B* CALLS : JLDB2E-DB2-ERROR * 61320600 CRV90B* : JLMSG-DISPLAY-MESSAGE * 61320700 CRV90B* FUNCTION : 1. READS DEGRADING SHELF LIFE TABLE * 61320800 CRV90B*---------------------------------------------------------------* 61320900 CRV90B V-760. 61321000 852200* DISPLAY "V-760-1" 85220018 CRV90B 61321200 CRV90B MOVE WW01-CURR-BPR-TPN TO DSF-BPR-TPN 61321500 CRV90B 61321600 CRV90B MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) 61321900 CRV90B TO DSF-DEG-SLIFE-STDT 61322000 CRV90B 61322100 CRV90B EXEC SQL 61322200 CRV90B SELECT DEG_SLIFE_ENDT 61322300 CRV90B , DEG_SLIFE_PRD 61322300 CRV90B , DEG_SLIFE_MTH 61322300 CRV90B , DEG_SLIFE_WK 61322300 CRV90B , DEG_SLIFE_DAY 61322300 CRV90B INTO :DSF-DEG-SLIFE-ENDT 61322400 CRV90B ,:DSF-DEG-SLIFE-PRD 61322400 CRV90B ,:DSF-DEG-SLIFE-MTH 61322400 CRV90B ,:DSF-DEG-SLIFE-WK 61322400 CRV90B ,:DSF-DEG-SLIFE-DAY 61322400 CRV90B FROM VXJJ0DSF 61322500 CRV90B WHERE BPR_TPN = :DSF-BPR-TPN 61322800 CRV90B AND :DSF-DEG-SLIFE-STDT 61322900 CRV90B BETWEEN DEG_SLIFE_STDT AND DEG_SLIFE_ENDT 61322900 CRV90B WITH UR 61323100 CRV90B END-EXEC. 61323200 CRV90B 61323300 CRV90B EVALUATE SQLCODE 61323400 CRV90B WHEN +0 61323500 CRV90B ADD 1 TO WA01-DSF-FETCHED 61323600 CRV90B SET DSF-FOUND TO TRUE 61323700 CRV90B WHEN +100 61323800 CRV90B SET DSF-NOT-FOUND TO TRUE 61325000 CRV90B WHEN OTHER 61325100 CRV90B MOVE "V-760-READ-VXJJ0DSF" 61325200 CRV90B TO JLDB2E-PROCESS-NAME 61325300 CRV90B PERFORM JLDB2E-DB2-ERROR 61325400 CRV90B SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 CRV90B PERFORM JLMSG-DISPLAY-MESSAGE 61325600 CRV90B END-EVALUATE. 61325700 CRV90B 61325800 CRV90B V-760-EXIT. 61325900 CRV90B EXIT. 61326000 CRV90B*---------------------------------------------------------------* 61326100 CRV10B V-765-PRIMARY-READ-VXJJ0OJD SECTION. 61320200 CRV10B*---------------------------------------------------------------* 61320300 CRV10B* SECTION NAME : V-765-PRIMARY-READ-VXJJ0OJD * 61320400 CRV10B* CALLED BY : B-695-OBTAIN-PREV-ORDER-DET * 61320500 CRV10B* CALLS : JLDB2E-DB2-ERROR * 61320600 CRV10B* : JLMSG-DISPLAY-MESSAGE * 61320700 CRV10B* FUNCTION : 1. PRIMARY READ OF THE ORDER DIAGNOSTICS TABLE* 61320800 CRV10B*---------------------------------------------------------------* 61320900 CRV10B V-765. 61321000 857300* DISPLAY "V-765-1" 85730018 CRV10B 61322100 CRV10B MOVE WW01-CURR-PART-NO TO OJD-CR-PART-NO CRV10B MOVE WW01-CURR-RO-NO TO OJD-RO-NO CRV10B MOVE WW01-CURR-BPR-TPN TO OJD-BPR-TPN CRV10B MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) TO OJD-REQ-DEL-DT CRV10B MOVE JLF40-PER-STR-DATE(WX10-DATA-SUB1) TO OJD-DMND-ST-DT CRV10B MOVE JLF40-PER-STR-TIME(WX10-DATA-SUB1) TO OJD-DMND-ST-TM CRV10B 61322100 CRV10B 61322100 CRV10B EXEC SQL 61322200 CRV10B SELECT ADJ_SAFE_STK_QTY 61323300 CRV10B ,RAW_DEMAND 61323300 CRV10B ,ORD_QTY 61323300 CRV10B ,EXP_SALES_DP 61323300 CRV10B ,CALC_METHOD 61323300 CRV10B ,SAFE_STK_QTY 61323300 CRV10B ,SHELF_FILL_CAP 61323300 CRV10B INTO :OJD-ADJ-SAFE-STK-QTY 61323300 CRV10B ,:OJD-RAW-DEMAND 61323300 CRV10B ,:OJD-ORD-QTY 61323300 CRV10B :WI01-OJD-ORD-QTY-NN 61323300 CRV10B ,:OJD-EXP-SALES-DP 61323300 CRV10B ,:OJD-CALC-METHOD 61323300 CRV10B ,:OJD-SAFE-STK-QTY 61323300 CRV10B ,:OJD-SHELF-FILL-CAP 61323300 CRV10B FROM 61323300 CRV10B VXJJ0OJD OJD 61323300 CRV10B WHERE 61323300 CRV10B OJD.CR_PART_NO = :OJD-CR-PART-NO 61323300 CRV10B AND OJD.RO_NO = :OJD-RO-NO 61323300 CRV10B AND OJD.BPR_TPN = :OJD-BPR-TPN 61323300 CRV10B AND OJD.REQ_DEL_DT <= :OJD-REQ-DEL-DT 61323300 CRV10B AND OJD.ORD_TYPE IN ("F","T") 61323300 CRV10B AND OJD.ORD_REC_TYPE = 0 61323300 CRV10B AND OJD.DMND_END_DT = :OJD-DMND-ST-DT 61323300 CRV10B AND OJD.DMND_END_TM = :OJD-DMND-ST-TM 61323300 CRV10B WITH UR 61323300 CRV10B END-EXEC. 61323200 CRV10B 61323300 CRV10B EVALUATE SQLCODE 61323400 CRV10B WHEN +0 61323500 CRV10B ADD 1 TO WA01-PRIMARY-OJD-FETCHED 61323600 CRV10B SET OJD-FOUND TO TRUE 61323700 CRV10B WHEN +100 61323800 CRV10B SET OJD-NOT-FOUND TO TRUE 61325000 CRV10B WHEN -811 61323800 CRV10B SET OJD-NOT-FOUND TO TRUE 61325000 CRV10B WHEN OTHER 61325100 CRV10B MOVE "V-765-PRIMARY-READ-VXJJ0OJD" 61325200 CRV10B TO JLDB2E-PROCESS-NAME 61325300 CRV10B PERFORM JLDB2E-DB2-ERROR 61325400 CRV10B SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 61325600 CRV10B END-EVALUATE. 61325700 CRV10B 61325800 CRV10B V-765-EXIT. 61325900 CRV10B EXIT. 61326000 CRV10B 61325800 CRV10B*---------------------------------------------------------------* 61326100 CRV10B V-770-SECONDARY-READ-VXJJ0OJD SECTION. 61320200 CRV10B*---------------------------------------------------------------* 61320300 CRV10B* SECTION NAME : V-770-SECONDARY-READ-VXJJ0OJD * 61320400 CRV10B* CALLED BY : B-695-OBTAIN-PREV-ORDER-DET * 61320500 CRV10B* CALLS : JLDB2E-DB2-ERROR * 61320600 CRV10B* : JLMSG-DISPLAY-MESSAGE * 61320700 CRV10B* FUNCTION : 1. SECONDARY READ OF THE ORDER DIAGNOSTICS TAB* 61320800 CRV10B*---------------------------------------------------------------* 61320900 CRV10B V-770. 61321000 864200* DISPLAY "V-770-1" 86420018 CRV10B 61322100 CRV10B* SUB-SELECT WITHIN SQL REQUIRES BOTH DMND-ST AND ORD-CALC CRV10B* TIMESTAMPS IN ORDER TO ENSURE ONLY THE LAST ORDER IS RETRIEVED CRV10B 61322100 CRV10B EXEC SQL 61322200 CRV10B SELECT ADJ_SAFE_STK_QTY 61323300 CRV10B ,RAW_DEMAND 61323300 CRV10B ,ORD_QTY 61323300 CRV10B ,EXP_SALES_DP 61323300 CRV10B ,CALC_METHOD 61323300 CRV10B ,SAFE_STK_QTY 61323300 CRV10B ,SHELF_FILL_CAP 61323300 CRV10B INTO :OJD-ADJ-SAFE-STK-QTY 61323300 CRV10B ,:OJD-RAW-DEMAND 61323300 CRV10B ,:OJD-ORD-QTY 61323300 CRV10B :WI01-OJD-ORD-QTY-NN 61323300 CRV10B ,:OJD-EXP-SALES-DP 61323300 CRV10B ,:OJD-CALC-METHOD 61323300 CRV10B ,:OJD-SAFE-STK-QTY 61323300 CRV10B ,:OJD-SHELF-FILL-CAP 61323300 CRV10B FROM 61323300 CRV10B VXJJ0OJD OJD 61323300 CRV10B WHERE 61323300 CRV10B OJD.CR_PART_NO = :OJD-CR-PART-NO 61323300 CRV10B AND OJD.RO_NO = :OJD-RO-NO 61323300 CRV10B AND OJD.BPR_TPN = :OJD-BPR-TPN 61323300 CRV10B AND OJD.REQ_DEL_DT <= :OJD-REQ-DEL-DT 61323300 CRV10B AND OJD.ORD_TYPE IN ("F","T") 61323300 CRV10B AND OJD.ORD_REC_TYPE = 0 61323300 CRV10B AND 61323300 CRV10B CHAR (OJD.DMND_ST_DT) 61323300 CRV10B || CHAR (OJD.DMND_ST_TM) 61323300 CRV10B || CHAR (OJD.ORD_CALC_DT) 61323300 CRV10B || CHAR (OJD.ORD_CALC_TM) = 61323300 CRV10B 61323300 CRV10B (SELECT MAX( 61323300 CRV10B CHAR (OJD2.DMND_ST_DT) 61323300 CRV10B || CHAR (OJD2.DMND_ST_TM) 61323300 CRV10B || CHAR (OJD2.ORD_CALC_DT) 61323300 CRV10B || CHAR (OJD2.ORD_CALC_TM) 61323300 CRV10B ) 61323300 CRV10B FROM 61323300 CRV10B VXJJ0OJD OJD2 61323300 CRV10B WHERE 61323300 CRV10B OJD2.CR_PART_NO = :OJD-CR-PART-NO 61323300 CRV10B AND OJD2.RO_NO = :OJD-RO-NO 61323300 CRV10B AND OJD2.BPR_TPN = :OJD-BPR-TPN 61323300 CRV10B AND OJD2.REQ_DEL_DT <= :OJD-REQ-DEL-DT 61323300 CRV10B AND OJD2.ORD_TYPE IN ("F","T") 61323300 CRV10B AND OJD2.ORD_REC_TYPE = 0 61323300 CRV10B AND ( OJD2.DMND_ST_DT < :OJD-DMND-ST-DT 61323300 CRV10B OR (OJD2.DMND_ST_DT = :OJD-DMND-ST-DT 61323300 CRV10B AND 61323300 CRV10B OJD2.DMND_ST_TM < :OJD-DMND-ST-TM) 61323300 CRV10B ) 61323300 CRV10B ) 61323300 CRV10B WITH UR 61323300 CRV10B END-EXEC. 61323200 CRV10B 61323300 CRV10B EVALUATE SQLCODE 61323400 CRV10B WHEN +0 61323500 CRV10B ADD 1 TO WA01-SECONDARY-OJD-FETCHED 61323600 CRV10B SET OJD-FOUND TO TRUE 61323700 CRV10B WHEN +100 61323800 CRV10B SET OJD-NOT-FOUND TO TRUE 61325000 CRV10B WHEN OTHER 61325100 CRV10B MOVE "V-770-SECONDARY-READ-VXJJ0OJD" 61325200 CRV10B TO JLDB2E-PROCESS-NAME 61325300 CRV10B PERFORM JLDB2E-DB2-ERROR 61325400 CRV10B SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 CRV10B PERFORM JLMSG-DISPLAY-MESSAGE 61325600 CRV10B END-EVALUATE. 61325700 CRV10B 61325800 CRV10B V-770-EXIT. 61325900 CRV10B EXIT. 61326000 CRV10B*---------------------------------------------------------------* 61326100 613262 61326200 613262 61326200 CRAUT3 V-780-SELECT-VXJJ0SOO SECTION. 61320200 CRAUT3*---------------------------------------------------------------* 61320300 CRAUT3* SECTION NAME : V-780-SELECT-VXJJ0SOO * 61320400 CRAUT3* CALLED BY : B-665-READ-SO-VALUES * 61320500 CRAUT3* CALLS : JLDB2E-DB2-ERROR * 61320600 CRAUT3* : JLMSG-DISPLAY-MESSAGE * 61320700 CRAUT3* FUNCTION : 1. READS STANDING ORDER OVERRIDE TABLE. * 61320800 CRAUT3*---------------------------------------------------------------* 61320900 CRAUT3 V-780. 61321000 CRAUT3* DISPLAY "V-780-1" 85220018 CRAUT3 61322100 CRAUT3 EXEC SQL 61322200 CRAUT3 SELECT SOO.ORD_CASES 61322300 CRAUT3 INTO :SOO-ORD-CASES:WI01-SOO-ORD-CASES-NN 61322400 CRAUT3 FROM VXJJ0SOO SOO 61322500 CRAUT3 WHERE SOO.CR_PART_NO = :SOO-CR-PART-NO 61322800 CRAUT3 AND SOO.RO_NO = :SOO-RO-NO 61322800 CRAUT3 AND SOO.BPR_TPN = :SOO-BPR-TPN 61322800 CRAUT3 AND SOO.TRADING_DATE = :SOO-TRADING-DATE 61322800 CRAUT3 WITH UR 61323100 CRAUT3 END-EXEC. 61323200 CRAUT3 61323300 CRAUT3 EVALUATE SQLCODE 61323400 CRAUT3 WHEN +0 61323500 CRAUT3 ADD 1 TO WA01-SOO-READ 61323600 CRAUT3 SET SOO-FOUND TO TRUE 61323700 CRAUT3 WHEN +100 61323800 CRAUT3 SET SOO-NOT-FOUND TO TRUE 61325000 CRAUT3 WHEN OTHER 61325100 CRAUT3 MOVE "V-780-READ-VXJJ0SOO" 61325200 CRAUT3 TO JLDB2E-PROCESS-NAME 61325300 CRAUT3 PERFORM JLDB2E-DB2-ERROR 61325400 CRAUT3 SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 CRAUT3 PERFORM JLMSG-DISPLAY-MESSAGE 61325600 CRAUT3 END-EVALUATE. 61325700 CRAUT3 61325800 CRAUT3 V-780-EXIT. 61325900 CRAUT3 EXIT. 61326000 CRAUT3/ 86870000 CRAUT3 V-790-SELECT-VXJJ0SOP SECTION. 61320200 CRAUT3*---------------------------------------------------------------* 61320300 CRAUT3* SECTION NAME : V-790-SELECT-VXJJ0SOP * 61320400 CRAUT3* CALLED BY : B-665-READ-SO-VALUES * 61320500 CRAUT3* CALLS : JLDB2E-DB2-ERROR * 61320600 CRAUT3* : JLMSG-DISPLAY-MESSAGE * 61320700 CRAUT3* FUNCTION : 1. READS STANDING ORDER PATTERN TABLE. * 61320800 CRAUT3*---------------------------------------------------------------* 61320900 CRAUT3 V-790. 61321000 CRAUT3* DISPLAY "V-790-1" 85220018 CRAUT3 61322100 CRAUT3 EXEC SQL 61322200 CRAUT3 SELECT SOP.ORD_CASES_1 61322300 CRAUT3 ,SOP.ORD_CASES_2 61322300 CRAUT3 ,SOP.ORD_CASES_3 61322300 CRAUT3 ,SOP.ORD_CASES_4 61322300 CRAUT3 ,SOP.ORD_CASES_5 61322300 CRAUT3 ,SOP.ORD_CASES_6 61322300 CRAUT3 ,SOP.ORD_CASES_7 61322300 CRAUT3 INTO :SOP-ORD-CASES-1 61322400 CRAUT3 ,:SOP-ORD-CASES-2 61322400 CRAUT3 ,:SOP-ORD-CASES-3 61322400 CRAUT3 ,:SOP-ORD-CASES-4 61322400 CRAUT3 ,:SOP-ORD-CASES-5 61322400 CRAUT3 ,:SOP-ORD-CASES-6 61322400 CRAUT3 ,:SOP-ORD-CASES-7 61322400 CRAUT3 FROM VXJJ0SOP SOP 61322500 CRAUT3 WHERE SOP.CR_PART_NO = :SOP-CR-PART-NO 61322800 CRAUT3 AND SOP.RO_NO = :SOP-RO-NO 61322800 CRAUT3 AND SOP.BPR_TPN = :SOP-BPR-TPN 61322800 CRAUT3 AND SOP.EFF_TESCO_YW = 61322800 CRAUT3 (SELECT MAX(SOP2.EFF_TESCO_YW) 24140000 CRAUT3 FROM VXJJ0SOP SOP2 24150000 CRAUT3 WHERE SOP2.CR_PART_NO = :SOP-CR-PART-NO 24160000 CRAUT3 AND SOP2.RO_NO = :SOP-RO-NO 24170000 CRAUT3 AND SOP2.BPR_TPN = :SOP-BPR-TPN 24180000 CRAUT3 AND (SOP2.EFF_TESCO_YW <= :SOP-EFF-TESCO-YW))24200000 CRAUT3 WITH UR 61323100 CRAUT3 END-EXEC. 61323200 CRAUT3 61323300 CRAUT3 EVALUATE SQLCODE 61323400 CRAUT3 WHEN +0 61323500 CRAUT3 ADD 1 TO WA01-SOP-READ 61323600 CRAUT3 SET SOP-FOUND TO TRUE 61323700 CRAUT3 WHEN +100 61323800 CRAUT3 SET SOP-NOT-FOUND TO TRUE 61325000 CRAUT3 WHEN OTHER 61325100 CRAUT3 MOVE "V-790-READ-VXJJ0SOP" 61325200 CRAUT3 TO JLDB2E-PROCESS-NAME 61325300 CRAUT3 PERFORM JLDB2E-DB2-ERROR 61325400 CRAUT3 SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 CRAUT3 PERFORM JLMSG-DISPLAY-MESSAGE 61325600 CRAUT3 END-EVALUATE. 61325700 CRAUT3 61325800 CRAUT3 V-790-EXIT. 61325900 CRAUT3 EXIT. 61326000 V-800-SELECT-VXJJ0ROT SECTION. 61320200 *---------------------------------------------------------------* 61320300 * SECTION NAME : V-800-SELECT-VXJJ0ROT * 61320400 * CALLED BY : B-100-PROCESS * 61320500 * CALLS : JLDB2E-DB2-ERROR * 61320600 * : JLMSG-DISPLAY-MESSAGE * 61320700 WIN06B* FUNCTION : 1. READS STORE OPEN DATE AND STORE TYPE CLASS * 61320800 *---------------------------------------------------------------* 61320900 V-800. 61321000 61322100 EXEC SQL 61322200 SELECT RO_DTE_OPEN 61322300 WIN06B ,RO_TYPE_CLASS 61322300 INTO :ROT-RO-DTE-OPEN 61322400 WIN06B ,:ROT-RO-TYPE-CLASS 61322400 FROM VXJJ0ROT 61322500 WHERE RO_NO = :ROT-RO-NO 61322800 WITH UR 61323100 END-EXEC 61323200 61323300 IF SQLCODE NOT = +0 AND NOT = +100 61323400 MOVE "V-800-READ-VXJJ0ROT" 61325200 TO JLDB2E-PROCESS-NAME 61325300 PERFORM JLDB2E-DB2-ERROR 61325400 SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 PERFORM JLMSG-DISPLAY-MESSAGE 61325600 END-IF 61325700 . 61325800 V-800-EXIT. 61325900 EXIT. 61326000 KFACTR V-810-SELECT-VXJJ0NWS SECTION. 61320200 *---------------------------------------------------------------* 61320300 EXEC SQL 61322200 SELECT K_FACTOR 61322300 KFACTR INTO :NWS-K-FACTOR 61322400 KFACTR FROM VXJJ0NWS 61322500 KFACTR WHERE CR_PART_NO = :NWS-CR-PART-NO 61322800 KFACTR AND RO_NO = :NWS-RO-NO 61322800 KFACTR AND BPR_TPN = :NWS-BPR-TPN 61322800 KFACTR AND K_FACTOR <>:WF01-ZERO-KFACT 61322800 WITH UR 61323100 END-EXEC 61323200 61323300 IF SQLCODE NOT = +0 AND NOT = +100 61323400 KFACTR MOVE "V-810-READ-VXJJ0NWS" 61325200 TO JLDB2E-PROCESS-NAME 61325300 PERFORM JLDB2E-DB2-ERROR 61325400 SET JLMSG-C99-DB2-ERROR TO TRUE 61325500 PERFORM JLMSG-DISPLAY-MESSAGE 61325600 END-IF 61325700 61325800 . 61325800 V-810-EXIT. 61325900 EXIT. 61326000 868700/ 86870000 868800 VGA-OPEN-MM-RSVE-CURSOR SECTION. 86880000 868900*---------------------------------------------------------------* 86890000 869000* SECTION NAME : VGA-OPEN-MM-RSVE-CURSOR * 86900000 869100* CALLED BY : VARIOUS. * 86910000 869200* EXT. CALLS : NONE. * 86920000 869300* FUNCTION : OPEN A CURSOR ON THE DIARY TABLE. * 86930000 869400*---------------------------------------------------------------* 86940000 869500 VGA-100. 86950000 873000* DISPLAY "VGA-100". 87300018 869700 86970000 869800 SET WI09-NOT-END-OF-MM-RSVE-CURSOR TO TRUE 86980000 869900 SET WI10-MM-RSVE-CURSOR-OPEN TO TRUE 86990000 870000 87000000 870100 EXEC SQL 87010000 870200 OPEN MM_RSVE_CURSOR 87020000 870300 END-EXEC 87030000 870400 87040000 870500 IF SQLCODE NOT = ZERO 87050000 870600 MOVE "VGA-OPEN-MM-RSVE-CURSOR" TO JLDB2E-PROCESS-NAME 87060000 870700 PERFORM JLDB2E-DB2-ERROR 87070000 870800 SET JLMSG-C99-DB2-ERROR TO TRUE 87080000 870900 PERFORM JLMSG-DISPLAY-MESSAGE 87090000 871000 END-IF. 87100000 871100 87110000 871200 VGA-EXIT. 87120000 871300 EXIT. 87130000 871400 87140000 871500/ 87150000 871600 VGB-FETCH-MM-RSVE-CURSOR SECTION. 87160000 871700*---------------------------------------------------------------* 87170000 871800* SECTION NAME : VGB-FETCH-MM-RSVE-CURSOR * 87180000 871900* CALLED BY : VARIOUS. * 87190000 872000* EXT. CALLS : NONE. * 87200000 872100* FUNCTION : FETCH A ROW FROM THE DIARY CURSOR. * 87210000 872200*---------------------------------------------------------------* 87220000 872300 VGB-100. 87230000 875800* DISPLAY "VGB-100". 87580018 872500 87250000 872600 EXEC SQL 87260000 872700 FETCH MM_RSVE_CURSOR 87270000 872800 INTO :MMR-CR-PART-NO 87280000 872900 , :MMR-RO-NO 87290000 873000 , :MMR-BPR-TPN 87300000 873100 , :MMR-RSVE-EFFV-DT 87310007 873200 , :MMR-RSVE-END-DT 87320006 873300 , :MMR-CURR-RSVE-QTY 87330000 873400 END-EXEC. 87340000 873500 87350000 873600 IF SQLCODE = ZERO 87360000 873700 ADD +1 TO WA01-MM-RSVE-CURSOR-ROW-COUNT 87370006 873800 ELSE 87380000 873900 IF SQLCODE = 100 87390000 874000 SET WI09-END-OF-MM-RSVE-CURSOR TO TRUE 87400000 874100 ELSE 87410000 874200 MOVE "VGB-FETCH-MM-RSVE-CURSOR" TO JLDB2E-PROCESS-NAME 87420000 874300 PERFORM JLDB2E-DB2-ERROR 87430000 874400 SET JLMSG-C99-DB2-ERROR TO TRUE 87440000 874500 PERFORM JLMSG-DISPLAY-MESSAGE 87450000 874600 END-IF 87460000 874700 END-IF. 87470000 874800 87480000 874900 VGB-EXIT. 87490000 875000 EXIT. 87500000 875100 87510000 875200/ 87520000 875300 VGC-CLOSE-MM-RSVE-CURSOR SECTION. 87530000 875400*---------------------------------------------------------------* 87540000 875500* SECTION NAME : VGC-CLOSE-MM-RSVE-CURSOR * 87550000 875600* CALLED BY : VARIOUS. * 87560000 875700* EXT. CALLS : NONE. * 87570000 875800* FUNCTION : CLOSE THE DIARY CURSOR. * 87580000 875900*---------------------------------------------------------------* 87590000 876000 VGC-100. 87600000 879500* DISPLAY "VGC-100". 87950018 876200 87620000 876300 SET WI10-MM-RSVE-CURSOR-CLOSED TO TRUE 87630000 876400 87640000 876500 EXEC SQL 87650000 876600 CLOSE MM_RSVE_CURSOR 87660000 876700 END-EXEC 87670000 876800 87680000 876900 IF SQLCODE NOT = ZERO 87690000 877000 MOVE "VGC-CLOSE-MM-RSVE-CURSOR" TO JLDB2E-PROCESS-NAME 87700000 877100 PERFORM JLDB2E-DB2-ERROR 87710000 877200 SET JLMSG-C99-DB2-ERROR TO TRUE 87720000 877300 PERFORM JLMSG-DISPLAY-MESSAGE 87730000 877400 END-IF. 87740000 877500 87750000 877600 VGC-EXIT. 87760000 877700 EXIT. 87770000 877800 87780000 878000/ 87800000 878100 VHA-OPEN-BD-RSVE-CURSOR SECTION. 87810000 878200*---------------------------------------------------------------* 87820000 878300* SECTION NAME : VHA-OPEN-BD-RSVE-CURSOR * 87830000 878400* CALLED BY : VARIOUS. * 87840000 878500* EXT. CALLS : NONE. * 87850000 878600* FUNCTION : OPEN A CURSOR ON THE DIARY TABLE. * 87860000 878700*---------------------------------------------------------------* 87870000 878800 VHA-100. 87880000 882200* DISPLAY "VHA-100". 88220018 879000 87900000 879100 SET WI11-NOT-END-OF-BD-RSVE-CURSOR TO TRUE 87910000 879200 SET WI12-BD-RSVE-CURSOR-OPEN TO TRUE 87920000 879300 87930000 879400 EXEC SQL 87940000 879500 OPEN BD_RSVE_CURSOR 87950000 879600 END-EXEC 87960000 879700 87970000 879800 IF SQLCODE NOT = ZERO 87980000 879900 MOVE "VHA-OPEN-BD-RSVE-CURSOR" TO JLDB2E-PROCESS-NAME 87990000 880000 PERFORM JLDB2E-DB2-ERROR 88000000 880100 SET JLMSG-C99-DB2-ERROR TO TRUE 88010000 880200 PERFORM JLMSG-DISPLAY-MESSAGE 88020000 880300 END-IF. 88030000 880400 88040000 880500 VHA-EXIT. 88050000 880600 EXIT. 88060000 880700 88070000 880800/ 88080000 880900 VHB-FETCH-BD-RSVE-CURSOR SECTION. 88090000 881000*---------------------------------------------------------------* 88100000 881100* SECTION NAME : VHB-FETCH-BD-RSVE-CURSOR * 88110000 881200* CALLED BY : VARIOUS. * 88120000 881300* EXT. CALLS : NONE. * 88130000 881400* FUNCTION : FETCH A ROW FROM THE DIARY CURSOR. * 88140000 881500*---------------------------------------------------------------* 88150000 881600 VHB-100. 88160000 885000* DISPLAY "VHB-100". 88500018 881800 88180000 881900 EXEC SQL 88190000 882000 FETCH BD_RSVE_CURSOR 88200000 882100 INTO :WH01-CR-PART-NO 88210004 882200 , :WH01-RO-NO 88220004 882300 , :WH01-BPR-TPN 88230004 882400 , :WH01-RSVE-EFFV-DT 88240004 882500 , :WH01-RSVE-END-DT 88250006 882600 , :WH01-ALLOC-PATTERN 88260004 918400 , :WH01-APPORTION-IND 91840029 882700 END-EXEC. 88270000 882800 88280000 882900 IF SQLCODE = ZERO 88290000 883000 ADD +1 TO WA01-BD-RSVE-CURSOR-ROW-COUNT 88300006 883100 ELSE 88310000 883200 IF SQLCODE = 100 88320000 883300 SET WI11-END-OF-BD-RSVE-CURSOR TO TRUE 88330000 883400 ELSE 88340000 883500 MOVE "VHB-FETCH-BD-RSVE-CURSOR" TO JLDB2E-PROCESS-NAME 88350000 883600 PERFORM JLDB2E-DB2-ERROR 88360000 883700 SET JLMSG-C99-DB2-ERROR TO TRUE 88370000 883800 PERFORM JLMSG-DISPLAY-MESSAGE 88380000 883900 END-IF 88390000 884000 END-IF. 88400000 884100 88410000 884200 VHB-EXIT. 88420000 884300 EXIT. 88430000 884400 88440000 884500/ 88450000 884600 VHC-CLOSE-BD-RSVE-CURSOR SECTION. 88460000 884700*---------------------------------------------------------------* 88470000 884800* SECTION NAME : VHC-CLOSE-BD-RSVE-CURSOR * 88480000 884900* CALLED BY : VARIOUS. * 88490000 885000* EXT. CALLS : NONE. * 88500000 885100* FUNCTION : CLOSE THE DIARY CURSOR. * 88510000 885200*---------------------------------------------------------------* 88520000 885300 VHC-100. 88530000 888700* DISPLAY "VHC-100". 88870018 885500 88550000 885600 SET WI12-BD-RSVE-CURSOR-CLOSED TO TRUE 88560000 885700 88570000 885800 EXEC SQL 88580000 885900 CLOSE BD_RSVE_CURSOR 88590000 886000 END-EXEC 88600000 886100 88610000 886200 IF SQLCODE NOT = ZERO 88620000 886300 MOVE "VHC-CLOSE-BD-RSVE-CURSOR" TO JLDB2E-PROCESS-NAME 88630000 886400 PERFORM JLDB2E-DB2-ERROR 88640000 886500 SET JLMSG-C99-DB2-ERROR TO TRUE 88650000 886600 PERFORM JLMSG-DISPLAY-MESSAGE 88660000 886700 END-IF. 88670000 886800 88680000 886900 VHC-EXIT. 88690000 887000 EXIT. 88700000 887100 88710000 887200 88720000 SPR14A VIA-OPEN-READNXT-RDD-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VIA-OPEN-READNXT-RDD-CURSOR * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : OPENS CURSOR FOR READING RDD TABLE * SPR14A*---------------------------------------------------------------* SPR14A VIA-100. SPR14AD DISPLAY "VIA-OPEN-READNXT-RDD-CURSOR" SPR14A SPR14A EXEC SQL SPR14A OPEN READNEXT_VXJJ0RDD SPR14A END-EXEC. SPR14A SPR14A IF SQLCODE NOT = 0 SPR14A MOVE "VIA-OPEN-READNXT-RDD-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-IF. SPR14A SPR14A VIA-100-EXIT. SPR14A EXIT. SPR14A SPR14A VIB-FETCH-READNXT-RDD-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VIB-FETCH-READNXT-RDD-CURSOR * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : FETCHES THE SCAN/REVIEW DATA FROM RDD * SPR14A*---------------------------------------------------------------* SPR14A VIB-100. SPR14AD DISPLAY "VIB-FETCH-READNXT-RDD-CURSOR" SPR14A SPR14A EXEC SQL SPR14A FETCH READNEXT_VXJJ0RDD SPR14A INTO :RDD-RED-DATE SPR14A , :RDD-RED-QTY SPR14A , :RDD-APP-ID SPR14A , :RDD-RDN-AT-SCN-IND SPR14A END-EXEC. SPR14A EVALUATE SQLCODE SPR14A WHEN 0 SPR14A COMPUTE WW29-RDD-RED-QTY = RDD-RED-QTY * -1 SPR14A ADD +1 TO WA01-RDD-FETCHED SPR14A WHEN 100 SPR14A SET WI25-END-OF-RDD-CURSOR TO TRUE SPR14A WHEN OTHER SPR14A MOVE "VIB-FETCH-READNXT-RDD-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-EVALUATE. SPR14A SPR14A VIB-100-EXIT. SPR14A EXIT. SPR14A SPR14A VIC-CLOSE-READNXT-RDD-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VIC-CLOSE-READNXT-RDD-CURSOR * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* FUNCTION : CLOSES RDD CURSOR * SPR14A*---------------------------------------------------------------* SPR14A VIC-100. SPR14AD DISPLAY "VIC-CLOSE-READNXT-RDD-CURSOR" SPR14A SPR14A EXEC SQL SPR14A CLOSE READNEXT_VXJJ0RDD SPR14A END-EXEC. SPR14A SPR14A IF SQLCODE NOT = 0 SPR14A MOVE "VIC-CLOSE-READNXT-RDD-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-IF. SPR14A SPR14A VIC-100-EXIT. SPR14A EXIT. SPR14A VJA-OPEN-RDT-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VJA-OPEN-RDT-CURSOR * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : OPENS CURSOR FOR READING RDT TABLE FOR GETTING* SPR14A* : SALES AFTER REDUCTION * SPR14A*---------------------------------------------------------------* SPR14A VJA-100. SPR14AD DISPLAY "VJA-OPEN-RDT-CURSOR" SPR14A SPR14A EXEC SQL SPR14A OPEN RDT_CURSOR SPR14A END-EXEC. SPR14A SPR14A EVALUATE SQLCODE SPR14A WHEN +0 SPR14A CONTINUE SPR14A WHEN OTHER SPR14A MOVE "VJA-OPEN-RDT-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-EVALUATE. SPR14A SPR14A VJA-100-EXIT. SPR14A EXIT. SPR14A SPR14A VJB-FETCH-RDT-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VJB-FETCH-RDT-CURSOR * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : FETCHES THE SALES DATA FROM RDT * SPR14A*---------------------------------------------------------------* SPR14A VJB-100. SPR14AD DISPLAY "VJB-FETCH-RDT-CURSOR" SPR14A SPR14A EXEC SQL SPR14A FETCH RDT_CURSOR SPR14A INTO :RDT-RED-DATE SPR14A , :RDT-RED-QTY SPR14A END-EXEC. SPR14A EVALUATE SQLCODE SPR14A WHEN 0 SPR14D MOVE RDT-RED-QTY TO WW30-RDT-RED-QTY SPR14A ADD +1 TO WA01-RDT-FETCHED SPR14A WHEN 100 SPR14A SET WI27-END-OF-RDT-CURSOR TO TRUE SPR14A WHEN OTHER SPR14A MOVE "VJB-FETCH-RDT-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-EVALUATE. SPR14A SPR14A VJB-100-EXIT. SPR14A EXIT. SPR14A SPR14A VJC-CLOSE-RDT-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VJC-CLOSE-RDT-CURSOR * SPR14A* CALLED BY : B-850-POTENTIAL-REDUCTION * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : CLOSES RDT CURSOR * SPR14A*---------------------------------------------------------------* SPR14A VJC-100. SPR14AD DISPLAY "VJC-CLOSE-RDT-CURSOR" SPR14A SPR14A EXEC SQL SPR14A CLOSE RDT_CURSOR SPR14A END-EXEC. SPR14A SPR14A IF SQLCODE NOT = 0 SPR14A MOVE "VJC-CLOSE-RDT-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-IF. SPR14A SPR14A VJC-100-EXIT. SPR14A EXIT. SPR14A VKA-OPEN-READNXT2-RDD-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VKA-OPEN-READNXT2-RDD-CURSOR * SPR14A* CALLED BY : B-851-GET-PR-PERCENT-VALUE * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : OPENS CURSOR FOR READING OOC DATE FROM RDD * SPR14A*---------------------------------------------------------------* SPR14A VKA-100. SPR14AD DISPLAY "VKA-OPEN-READNXT2-RDD-CURSOR" SPR14A EXEC SQL SPR14A OPEN READNEXT2_VXJJ0RDD SPR14A END-EXEC. SPR14A SPR14A EVALUATE SQLCODE SPR14A WHEN +0 SPR14A CONTINUE SPR14A WHEN OTHER SPR14A MOVE "VKA-OPEN-READNXT2-RDD-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-EVALUATE. SPR14A SPR14A VKA-100-EXIT. SPR14A EXIT. SPR14A SPR14A VKB-FETCH-READNXT2-RDD-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VKB-FETCH-READNXT2-RDD-CURSOR * SPR14A* CALLED BY : B-851-GET-PR-PERCENT-VALUE * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : FETCHES THE OOC DATE FROM RDD * SPR14A*---------------------------------------------------------------* SPR14A VKB-100. SPR14AD DISPLAY "VKB-FETCH-READNXT2-RDD-CURSOR" SPR14A SPR14A EXEC SQL SPR14A FETCH READNEXT2_VXJJ0RDD SPR14A INTO :RDD-OOC-DUE-DATE SPR14A END-EXEC. SPR14A EVALUATE SQLCODE SPR14A WHEN 0 SPR14A CONTINUE SPR14A WHEN 100 SPR14A SET WI28-END-OF-RDD1-CURSOR TO TRUE SPR14A WHEN OTHER SPR14A MOVE "VKB-FETCH-READNXT2-RDD-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-EVALUATE. SPR14A SPR14A VKB-100-EXIT. SPR14A EXIT. SPR14A SPR14A VKC-CLOSE-READNXT2-RDD-CURSOR SECTION. SPR14A*---------------------------------------------------------------* SPR14A* SECTION NAME : VKC-CLOSE-READNXT2-RDD-CURSOR * SPR14A* CALLED BY : B-851-GET-PR-PERCENT-VALUE * SPR14A* : C-100-TERMINATE * SPR14A* CALLS : JLDB2E-DB2-ERROR * SPR14A* : JLMSG-DISPLAY-MESSAGE * SPR14A* FUNCTION : CLOSES RDD CURSOR * SPR14A*---------------------------------------------------------------* SPR14A VKC-100. SPR14AD DISPLAY "VKC-CLOSE-READNXT2-RDD-CURSOR" SPR14A SPR14A EXEC SQL SPR14A CLOSE READNEXT2_VXJJ0RDD SPR14A END-EXEC. SPR14A SPR14A IF SQLCODE NOT = 0 SPR14A MOVE "VKC-CLOSE-READNXT2-RDD-CURSOR" SPR14A TO JLDB2E-PROCESS-NAME SPR14A PERFORM JLDB2E-DB2-ERROR SPR14A SET JLMSG-C99-DB2-ERROR TO TRUE SPR14A PERFORM JLMSG-DISPLAY-MESSAGE SPR14A END-IF. SPR14A SPR14A VKC-100-EXIT. SPR14A EXIT. 335400 X-100-READ-INPUT SECTION. 33540000 335500*---------------------------------------------------------------* 33550000 335600* SECTION NAME : X-100-READ-INPUT * 33560000 335700* CALLED BY : A-100-INITIATE * 33570000 335800* : B-100-PROCESS * 33580000 335900* CALLS : JLMSG-DISPLAY-MESSAGE * 33590000 336000* FUNCTION : 1. RETRIEVES THE CURRENT BASE PRODUCT DETAILS * 33600000 336100* : 2. IF STATUS NOT '00' REPORT AND FAIL * 33610000 336200*---------------------------------------------------------------* 33620000 336300 X-100. 33630000 336500 READ INPUT-FILE 33650000 AT END 336700 SET END-OF-INPUT TO TRUE 33670000 NOT AT END 336900 ADD 1 TO WA01-RECS-INPUT 33690000 337000 END-READ. 33700000 337100 33710000 337200 IF FS01-INPUT NOT = "00" 33720000 337300 AND FS01-INPUT NOT = "10" 33730000 337400 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 33740000 337500 SET JLMSG-C98-FILE-IO-ERROR 33750000 337600 JLMSG-C98-READ TO TRUE 33760000 337700 MOVE WF01-JLF30I01 TO JLMSG-C98-FILE-NAME 33770000 337800 MOVE FS01-INPUT TO JLMSG-C98-FILE-STATUS 33780000 337900 PERFORM JLMSG-DISPLAY-MESSAGE 33790000 338000 END-IF. 33800000 338100 33810000 338200 MOVE JL25A-RECORD-TYPE TO WI01-RECORD-TYPE. 33820000 338300 33830000 IF FS01-INPUT = "00" 09800000 AND FORECAST-DETAIL MOVE JL25B-CR-PART-NO TO WW07-CR-PART-NO MOVE JL25B-RETAIL-OUTLET-NO TO WW07-RETAIL-OUTLET-NO MOVE JL25B-BASE-PRODUCT-NO TO WW07-BASE-PRODUCT-NO MOVE JL25B-DELY-REQ-DATE TO WW07-DELY-REQ-DATE MOVE JL25B-DELY-REQ-TIME TO WW07-DELY-REQ-TIME END-IF . 33830000 338400 X-100-EXIT. 33840000 EXIT. 626500 X-400-READ-INPUT4 SECTION. 62650000 626600*---------------------------------------------------------------* 62660000 626700* SECTION NAME : X-400-READ-INPUT4 * 62670000 626800* CALLS : JLMSG-DISPLAY-MESSAGE * 62680000 626900* FUNCTION : 1. RETRIEVES THE CURRENT BASE PRODUCT TYPE 3 * 62690000 627000* : 2. IF STATUS NOT '00' REPORT AND FAIL * 62700000 627100*---------------------------------------------------------------* 62710000 627200 62720000 READ INPUT4-FILE 62730000 627400 AT END GO TO X-400-EXIT 62740000 627500 END-READ. 62750000 627600 62760000 627700 IF FS01-INPUT4 NOT = "00" 62770000 627800 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 62780000 627900 SET JLMSG-C98-FILE-IO-ERROR 62790000 628000 JLMSG-C98-READ TO TRUE 62800000 628100 MOVE WF01-JLF30I04 TO JLMSG-C98-FILE-NAME 62810000 628200 MOVE FS01-INPUT4 TO JLMSG-C98-FILE-STATUS 62820000 628300 PERFORM JLMSG-DISPLAY-MESSAGE 62830000 ELSE MOVE JLF20-CR-PART-NO TO WW06-CR-PART-NO MOVE JLF20-RETAIL-OUTLET-NO TO WW06-RETAIL-OUTLET-NO MOVE JLF20-BASE-PRODUCT-NO TO WW06-BASE-PRODUCT-NO MOVE JLF20-DELY-REQ-DATE TO WW06-DELY-REQ-DATE MOVE JLF20-DELY-REQ-TIME TO WW06-DELY-REQ-TIME 628400 END-IF. 62840000 628500 62850000 628600 ADD 1 TO WA01-RECS-INPUT4. 62860000 628700 62870000 628800 X-400-EXIT. 62880000 628900 EXIT. 62890000 629000 62900000 X-500-READ-INPUT6 SECTION. 09876000 *---------------------------------------------------------------* 09877000 * SECTION NAME : X-500-READ-INPUT6 * 09878000 * CALLS : JLMSG-DISPLAY-MESSAGE * 09879000 * FUNCTION : 1. RETRIEVES THE CURRENT GAP ORDER * 09880000 * : 2. IF STATUS NOT '00' REPORT AND FAIL * 09881000 *---------------------------------------------------------------* 09882000 09883000 READ INPUT6-FILE 09884000 AT END GO TO X-500-EXIT 09885000 END-READ 09886000 09887000 IF FS01-INPUT6 NOT = "00" 09888000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 09889000 SET JLMSG-C98-FILE-IO-ERROR 09890000 JLMSG-C98-READ TO TRUE 09891000 MOVE WF01-JLF30I06 TO JLMSG-C98-FILE-NAME 09892000 MOVE FS01-INPUT6 TO JLMSG-C98-FILE-STATUS 09893000 PERFORM JLMSG-DISPLAY-MESSAGE 09894000 END-IF 09895000 09896000 ADD 1 TO WA01-RECS-INPUT6 09897000 . 09898000 X-500-EXIT. 09899000 628900 EXIT. 62890000 629000 62900000 / 89930004 X-600-READ-JLFOLKUP SECTION. 09876000 *---------------------------------------------------------------* 09877000 09883000 READ JLFOLKUP-FILE 09884000 AT END GO TO X-600-EXIT 09885000 END-READ 09886000 09887000 IF JLFOLKUP-STATUS NOT = "00" 09888000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 09889000 SET JLMSG-C98-FILE-IO-ERROR 09890000 JLMSG-C98-READ TO TRUE 09891000 MOVE WF01-JLF30I09 TO JLMSG-C98-FILE-NAME 09892000 MOVE JLFOLKUP-STATUS TO JLMSG-C98-FILE-STATUS 09893000 PERFORM JLMSG-DISPLAY-MESSAGE 09894000 END-IF 09895000 09896000 . 09898000 X-600-EXIT. 09899000 EXIT. 62890000 62900000 / 89930004 X-700-READ-JLFOEXCP SECTION. 09876000 *---------------------------------------------------------------* 09877000 09883000 READ JLFOEXCP-FILE 09884000 AT END MOVE HIGH-VALUES TO WW10-JLFEX-KEY 08970000 GO TO X-700-EXIT 09885000 END-READ 09886000 09887000 IF JLFOEXCP-STATUS NOT = "00" 09888000 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 09889000 SET JLMSG-C98-FILE-IO-ERROR 09890000 JLMSG-C98-READ TO TRUE 09891000 MOVE WF01-JLF30I10 TO JLMSG-C98-FILE-NAME 09892000 MOVE JLFOEXCP-STATUS TO JLMSG-C98-FILE-STATUS 09893000 PERFORM JLMSG-DISPLAY-MESSAGE 09894000 END-IF 09895000 09896000 MOVE JLFEX-CR-PART-NO TO WW10-FEX-CR-PART-NO 09896000 MOVE JLFEX-RETAIL-OUTLET-NO TO WW10-FEX-RO-NO 09896000 MOVE JLFEX-BASE-PRODUCT-NO TO WW10-FEX-BPR-TPN 09896000 09896000 ADD 1 TO WA01-RECS-JLFOEXCP 09897000 09896000 . 09898000 X-700-EXIT. 09899000 EXIT. 62890000 62900000 / 89930004 899400 XA-READ-JLALRESV SECTION. 89940004 899500*---------------------------------------------------------------* 89950004 899600* SECTION NAME : XA-READ-JLALRESV * 89960004 899700* CALLED BY : VARIOUS. * 89970004 899800* EXT. CALLS : NONE. * 89980004 899900* FUNCTION : READ A RECORD FROM THE PRODUCTS WITH * 89990004 900000* 'BACK-TO-BACK' RESERVE ALLOCATIONS. * 90000004 900100*---------------------------------------------------------------* 90010004 900200 XA-100. 90020004 903600* DISPLAY "XA-100". 90360018 900400 90040004 900500 READ JLALRESV 90050004 900600 AT END SET WI13-END-OF-JLALRESV TO TRUE 90060004 900700 END-READ 90070004 900800 90080004 900900 IF JLALRESV-STATUS = "00" 90090004 901000 ADD +1 TO WA01-RECS-JLALRESV 90100004 901100 ELSE 90110004 901200 IF WI13-NOT-END-OF-JLALRESV 90120004 901300 SET JLMSG-C98-FILE-IO-ERROR TO TRUE 90130004 901400 SET JLMSG-C98-READ TO TRUE 90140004 901500 MOVE WF01-JLF30I05 TO JLMSG-C98-FILE-NAME 90150004 901600 MOVE JLALRESV-STATUS TO JLMSG-C98-FILE-STATUS 90160004 901700 PERFORM JLMSG-DISPLAY-MESSAGE 90170004 901800 END-IF 90180004 901900 END-IF. 90190004 902000 90200004 902100 XA-EXIT. 90210004 902200 EXIT. 90220004 902300 90230000 WIN06B XB-READ-JLDOTCOM SECTION. 89940004 WIN06B*---------------------------------------------------------------* 89950004 WIN06B* SECTION NAME : XB-READ-JLDOTCOM * 89960004 WIN06B* CALLED BY : VARIOUS. * 89970004 WIN06B* EXT. CALLS : NONE. * 89980004 WIN06B* FUNCTION : READ A RECORD FROM THE DOTCOM CODE LIFE FILE. * 89990004 WIN06B*---------------------------------------------------------------* 90010004 WIN06B XB-100. 90020004 WIN06B* DISPLAY "XB-100". 90360018 WIN06B 90040004 WIN06B READ JLDOTCOM 90050004 WIN06B AT END SET WI15-END-OF-JLDOTCOM TO TRUE 90060004 WIN06A MOVE 99999 TO JLDOT-RETAIL-OUTLET-NO 90060004 WIN06A MOVE 999999999 TO JLDOT-BASE-PRODUCT-NO 90060004 WIN06B END-READ 90070004 WIN06B 90080004 WIN06B IF JLDOTCOM-STATUS = "00" 90090004 WIN06B ADD +1 TO WA01-RECS-JLDOTCOM 90100004 WIN06B ELSE 90110004 WIN06B IF WI15-NOT-END-OF-JLDOTCOM 90120004 WIN06B SET JLMSG-C98-FILE-IO-ERROR TO TRUE 90130004 WIN06B SET JLMSG-C98-READ TO TRUE 90140004 WIN06B MOVE WF01-JLF30I07 TO JLMSG-C98-FILE-NAME 90150004 WIN06B MOVE JLDOTCOM-STATUS TO JLMSG-C98-FILE-STATUS 90160004 WIN06B PERFORM JLMSG-DISPLAY-MESSAGE 90170004 WIN06B END-IF 90180004 WIN06B END-IF. 90190004 WIN06B 90200004 WIN06B XB-EXIT. 90210004 WIN06B EXIT. 90220004 WIN06B 90230000 ***************************************************************** 17090020 * * 17090020 * READ THE NEXT DOTCOM EXPECTED SALES RECORD * 17090020 * * 17090020 ***************************************************************** 17090020 17380020 WIN06A XC-DOTCOM-SALES SECTION. READ DOTCOM-SALES-FILE 17180020 EVALUATE TRUE WHEN FS01-INPUT8 = "00" ADD 1 TO WA01-DOTCOM-SALES MOVE JLDCE-CR-PART-NO TO WW01-DTCMES-PART-NO MOVE JLDCE-RETAIL-OUTLET-NO TO WW01-DTCMES-RO-NO MOVE JLDCE-BASE-PRODUCT-NO TO WW01-DTCMES-PROD-NO MOVE JLDCE-SALES-DATE-ISO TO WW01-DTCMES-SALES-DT WHEN EOF-INPUT8 MOVE "99" TO WW01-DTCMES-PART-NO MOVE 99999 TO WW01-DTCMES-RO-NO MOVE 999999999 TO WW01-DTCMES-PROD-NO MOVE "9999-12-31" TO WW01-DTCMES-SALES-DT WHEN OTHER 17180020 SET JLMSG-C98-FILE-IO-ERROR 17290020 JLMSG-C98-READ TO TRUE 17300020 MOVE WF01-JLF30I08 TO JLMSG-C98-FILE-NAME MOVE FS01-INPUT8 TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE END-EVALUATE 17340020 . 17180020 902300 90230000 AVRS32 X-900-READ-JLFOREFD SECTION. 89940004 AVRS32*---------------------------------------------------------------* 89950004 AVRS32* SECTION NAME : X-900-READ-JLFOREFD * 89960004 AVRS32* FUNCTION : READ A RECORD FROM THE REFINED FILE * 89990004 AVRS32*---------------------------------------------------------------* 90010004 AVRS32 90040004 AVRS32 READ JLFOREFD-FILE 90050004 AVRS32 AT END SET EOF-JLFOREFD TO TRUE AVRS32 END-READ 90070004 AVRS32 AVRS32 IF NOT-EOF-JLFOREFD 90120004 AVRS32 MOVE JLRFD-CR-PART-NO TO WW07-RFD-CR-PART-NO AVRS32 MOVE JLRFD-RETAIL-OUTLET-NO TO WW07-RFD-RETAIL-OUTLET-NO AVRS32 MOVE JLRFD-BASE-PRODUCT-NO TO WW07-RFD-BASE-PRODUCT-NO AVRS32 MOVE JLRFD-DELY-REQ-DATE TO WW07-RFD-DELY-REQ-DATE AVRS32 MOVE JLRFD-DELY-REQ-TIME TO WW07-RFD-DELY-REQ-TIME AVRS32 ADD 1 TO WA01-RECS-JLFOREFD AVRS32 ELSE AVRS32 IF NOT EOF-JLFOREFD AVRS32 SET JLMSG-C98-FILE-IO-ERROR AVRS32 TO TRUE AVRS32 SET JLMSG-C98-READ TO TRUE AVRS32 MOVE WF01-JLF30I13 TO JLMSG-C98-FILE-NAME AVRS32 MOVE JLFOREFD-STATUS TO JLMSG-C98-FILE-STATUS AVRS32 PERFORM JLMSG-DISPLAY-MESSAGE AVRS32 END-IF AVRS32 END-IF AVRS32 . 90200004 338700 Y-100-WRITE-OUTPUT1 SECTION. 33870000 338800*---------------------------------------------------------------* 33880000 338900* SECTION NAME : Y-100-WRITE-OUTPUT1 * 33890000 339000* CALLED BY : * 33900000 339100* CALLS : JLMSG-DISPLAY-MESSAGE * 33910000 339200* FUNCTION : 1. WRITES OUT FORECAST ORDER FILE * 33920000 339300* : 2. IF STATUS NOT '00' REPORT AND FAIL * 33930000 339400*---------------------------------------------------------------* 33940000 339500 Y-100. 33950000 339600 33960000 339700 WRITE JLF30-ORDER-FORECAST-FILE. 33970000 339800 33980000 339900 IF FS01-OUTPUT NOT = "00" 33990000 340000 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 34000000 340100 SET JLMSG-C98-FILE-IO-ERROR 34010000 340200 JLMSG-C98-WRITE TO TRUE 34020000 340300 MOVE WF01-JLF30O01 TO JLMSG-C98-FILE-NAME 34030000 340400 MOVE FS01-OUTPUT TO JLMSG-C98-FILE-STATUS 34040000 340500 PERFORM JLMSG-DISPLAY-MESSAGE 34050000 340600 END-IF. 34060000 340700 ADD 1 TO WA01-RECS-OUTPUT1. 34070000 340800 34080000 340900 Y-100-EXIT. 34090000 EXIT. 341200 Y-200-WRITE-OUTPUT2 SECTION. 34120000 341300*---------------------------------------------------------------* 34130000 341400* SECTION NAME : Y-200-WRITE-OUTPUT2 * 34140000 341500* CALLED BY : * 34150000 341600* CALLS : JLMSG-DISPLAY-MESSAGE * 34160000 341700* FUNCTION : 1. WRITES OUT ORDER DIAGNOSTICS FILE * 34170000 341800* : 2. IF STATUS NOT '00' REPORT AND FAIL * 34180000 341900*---------------------------------------------------------------* 34190000 342000 Y-200. 34200000 342100 34210000 342200 WRITE JLF30-ORDER-DIAGNOSTIC-FILE. 34220000 342300 34230000 342400 IF FS02-OUTPUT NOT = "00" 34240000 342500 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 34250000 342600 SET JLMSG-C98-FILE-IO-ERROR 34260000 342700 JLMSG-C98-WRITE TO TRUE 34270000 342800 MOVE WF01-JLF30O02 TO JLMSG-C98-FILE-NAME 34280000 342900 MOVE FS02-OUTPUT TO JLMSG-C98-FILE-STATUS 34290000 343000 PERFORM JLMSG-DISPLAY-MESSAGE 34300000 343100 END-IF. 34310000 343200 ADD 1 TO WA01-RECS-OUTPUT2. 34320000 343300 34330000 343400 Y-200-EXIT. 34340000 343500 EXIT. 34350000 343600 34360000 343700 Y-300-WRITE-OUTPUT3 SECTION. 34370000 343800*---------------------------------------------------------------* 34380000 343900* SECTION NAME : Y-300-WRITE-OUTPUT3 * 34390000 344000* CALLED BY : * 34400000 344100* CALLS : JLMSG-DISPLAY-MESSAGE * 34410000 344200* FUNCTION : 1. WRITES OUT ORDER DIAGNOSTICS FILE FOR * 34420000 344300* : PRODUCT PROFILE * 34430000 344400* : 2. IF STATUS NOT '00' REPORT AND FAIL * 34440000 344500*---------------------------------------------------------------* 34450000 344600 Y-300. 34460000 344700 34470000 344800 WRITE JLF30-ORDER-PRODPROF-FILE. 34480000 344900 34490000 345000 IF FS03-OUTPUT NOT = "00" 34500000 345100 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 34510000 345200 SET JLMSG-C98-FILE-IO-ERROR 34520000 345300 JLMSG-C98-WRITE TO TRUE 34530000 345400 MOVE WF01-JLF30O03 TO JLMSG-C98-FILE-NAME 34540000 345500 MOVE FS03-OUTPUT TO JLMSG-C98-FILE-STATUS 34550000 345600 PERFORM JLMSG-DISPLAY-MESSAGE 34560000 345700 END-IF. 34570000 345800 ADD 1 TO WA01-RECS-OUTPUT3. 34580000 345900 34590000 346000 Y-300-EXIT. 34600000 346100 EXIT. 34610000 346200 34620000 346300 Y-400-WRITE-OUTPUT4 SECTION. 34630000 346400*---------------------------------------------------------------* 34640000 346500* SECTION NAME : Y-400-WRITE-OUTPUT4 * 34650000 346600* CALLED BY : * 34660000 346700* CALLS : JLMSG-DISPLAY-MESSAGE * 34670000 346800* FUNCTION : 1. WRITES OUT DETAILS OF FORECAST ORDERS * 34680000 346900* : THAT HAVE UNDERGONE ALLOCATIONS PROCESSING * 34690000 347000* : 2. IF STATUS NOT '00' REPORT AND FAIL * 34700000 347100*---------------------------------------------------------------* 34710000 347200 Y-400. 34720000 347300 34730000 347400 WRITE JLF30-ALLOC-FORECAST-FILE. 34740000 347500 34750000 347600 IF FS04-OUTPUT NOT = "00" 34760000 347700 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 34770000 347800 SET JLMSG-C98-FILE-IO-ERROR 34780000 347900 JLMSG-C98-WRITE TO TRUE 34790000 348000 MOVE WF01-JLF30O04 TO JLMSG-C98-FILE-NAME 34800000 348100 MOVE FS04-OUTPUT TO JLMSG-C98-FILE-STATUS 34810000 348200 PERFORM JLMSG-DISPLAY-MESSAGE 34820000 348300 END-IF. 34830000 348400 ADD 1 TO WA01-RECS-OUTPUT4. 34840000 348500 34850000 348600 Y-400-EXIT. 34860000 348700 EXIT. 34870000 348800 34880000 481600 Y-500-WRITE-FORECAST-REJECT SECTION. 349000*---------------------------------------------------------------* 34900000 481800* SECTION NAME : Y-500-WRITE-FORECAST-REJECT * 349200* CALLED BY : B-999-DUMP-REJECTS * 34920000 349300* CALLS : JLMSG-DISPLAY-MESSAGE * 34930000 349400* FUNCTION : 1. WRITES OUT REJECTED INPUT RECORDS * 34940000 349500* : 2. IF STATUS NOT '00' REPORT AND FAIL * 34950000 349600*---------------------------------------------------------------* 34960000 482400 Y-500. 349800 34980000 349900 WRITE JLF30-REJECT-FORECAST-FILE 34990000 350000 FROM WR05-REJECT-FORECAST-REC. 35000000 350100 35010000 350200 IF FS01-REJECT NOT = "00" 35020000 350300 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 35030000 350400 SET JLMSG-C98-FILE-IO-ERROR 35040000 350500 JLMSG-C98-WRITE TO TRUE 35050000 350600 MOVE WF01-JLF30O05 TO JLMSG-C98-FILE-NAME 35060000 350700 MOVE FS01-REJECT TO JLMSG-C98-FILE-STATUS 35070000 350800 PERFORM JLMSG-DISPLAY-MESSAGE 35080000 350900 END-IF. 35090000 351000 ADD 1 TO WA01-RECS-REJECT1. 35100000 351100 35110000 483900 Y-500-EXIT. 351300 EXIT. 35130000 351400 35140000 484200 Y-600-WRITE-CONTROL-REJECT SECTION. 351600*---------------------------------------------------------------* 35160000 484400* SECTION NAME : Y-500-WRITE-CONTROL-REJECT * 351800* CALLED BY : B-999-DUMP-REJECTS * 35180000 351900* CALLS : JLMSG-DISPLAY-MESSAGE * 35190000 352000* FUNCTION : 1. WRITES OUT REJECTED INPUT RECORDS * 35200000 352100* : 2. IF STATUS NOT '00' REPORT AND FAIL * 35210000 352200*---------------------------------------------------------------* 35220000 485000 Y-600. 352400 35240000 352500 WRITE JLF30-REJECT-CONTROL-FILE 35250000 352600 FROM WR06-REJECT-CONTROL-REC. 35260000 352700 35270000 352800 IF FS02-REJECT NOT = "00" 35280000 352900 MOVE WM01-INPUT-FILE TO JLMSG-TEXT 35290000 353000 SET JLMSG-C98-FILE-IO-ERROR 35300000 353100 JLMSG-C98-WRITE TO TRUE 35310000 353200 MOVE WF01-JLF30O06 TO JLMSG-C98-FILE-NAME 35320000 353300 MOVE FS02-REJECT TO JLMSG-C98-FILE-STATUS 35330000 353400 PERFORM JLMSG-DISPLAY-MESSAGE 35340000 353500 END-IF. 35350000 353600 ADD 1 TO WA01-RECS-REJECT2. 35360000 353700 35370000 486500 Y-600-EXIT. 353900 EXIT. 35390000 354000 35400000 486800 486900 Y-700-WRITE-JLFODKSS SECTION. 487000*---------------------------------------------------------------* 487100* SECTION NAME : Y-700-WRITE-JLFODKSS-RECORD * 487200* CALLED BY : * 487300* CALLS : JLMSG-DISPLAY-MESSAGE * 487400* FUNCTION : 1. WRITES OUT JLFODKSS RECORDS * 487500* : 2. IF STATUS NOT '00' REPORT AND FAIL * 487600*---------------------------------------------------------------* 487700 Y-700. 487800 WRITE JLF30-JLFODKSS-FILE. 487900 488000 IF JLFODKSS-STATUS NOT = "00" 488100 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 488200 SET JLMSG-C98-FILE-IO-ERROR 488300 JLMSG-C98-WRITE TO TRUE 488400 MOVE WF01-JLF30O07 TO JLMSG-C98-FILE-NAME 488500 MOVE FS02-REJECT TO JLMSG-C98-FILE-STATUS 488600 PERFORM JLMSG-DISPLAY-MESSAGE 488700 END-IF. 488800 ADD 1 TO WA01-RECS-JLFODKSS. 488900 489000 Y-700-EXIT. 489100 EXIT. 489200 534700 534800 Y-710-WRITE-JLFOEOOC SECTION. 534900*---------------------------------------------------------------* 535000* SECTION NAME : Y-710-WRITE-JLFOEOOC-RECORD * 535100* CALLED BY : * 535200* CALLS : JLMSG-DISPLAY-MESSAGE * 535300* FUNCTION : 1. WRITES OUT JLFOEOOC RECORDS * 535400* : 2. IF STATUS NOT '00' REPORT AND FAIL * 535500*---------------------------------------------------------------* 535600 Y-710. 535700 WRITE JLFOE-JLFOEOOC-FILE. 535800 535900 IF JLFOEOOC-STATUS NOT = "00" 536000 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT 536100 SET JLMSG-C98-FILE-IO-ERROR 536200 JLMSG-C98-WRITE TO TRUE 536300 MOVE WF01-JLF30O08 TO JLMSG-C98-FILE-NAME 536400 MOVE FS02-REJECT TO JLMSG-C98-FILE-STATUS 536500 PERFORM JLMSG-DISPLAY-MESSAGE 536600 END-IF. 536700 ADD 1 TO WA01-RECS-JLFOEOOC. 536800 536900 Y-710-EXIT. 537000 EXIT. 537100 Y-800-WRITE-JLFODIAX SECTION. *---------------------------------------------------------------* WRITE JLFOX-JLFODIAX-REC IF FS02-OUTPUT NOT = "00" MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT SET JLMSG-C98-FILE-IO-ERROR JLMSG-C98-WRITE TO TRUE MOVE WF01-JLF30O09 TO JLMSG-C98-FILE-NAME MOVE JLFODIAX-STATUS TO JLMSG-C98-FILE-STATUS PERFORM JLMSG-DISPLAY-MESSAGE END-IF ADD 1 TO WA01-RECS-JLFODIAX . Y-800-EXIT. EXIT. SUM11A Y-900-WRITE-JLFODIAH SECTION. SUM11A*---------------------------------------------------------------* SUM11A WRITE JLFOH-JLFODIAH-REC SUM11A SUM11A IF FS02-OUTPUT NOT = "00" SUM11A MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT SUM11A SET JLMSG-C98-FILE-IO-ERROR SUM11A JLMSG-C98-WRITE TO TRUE SUM11A MOVE WF01-JLF30O09 TO JLMSG-C98-FILE-NAME SUM11A MOVE JLFODIAH-STATUS TO JLMSG-C98-FILE-STATUS SUM11A PERFORM JLMSG-DISPLAY-MESSAGE SUM11A END-IF SUM11A ADD 1 TO WA01-RECS-JLFODIAH SUM11A . SUM11A Y-900-EXIT. SUM11A EXIT. RD2S19 Y-1000-WRITE-JLUNCCAL SECTION. RD2S19*---------------------------------------------------------------* RD2S19 WRITE JLUNC-BGO-UNCRTY-INREC RD2S19 RD2S19 IF FS02-OUTPUT NOT = "00" RD2S19 MOVE WM02-OUTPUT-FILE TO JLMSG-TEXT RD2S19 SET JLMSG-C98-FILE-IO-ERROR RD2S19 JLMSG-C98-WRITE TO TRUE RD2S19 MOVE WF01-JLF30O11 TO JLMSG-C98-FILE-NAME RD2S19 MOVE JLUNCCAL-STATUS TO JLMSG-C98-FILE-STATUS RD2S19 PERFORM JLMSG-DISPLAY-MESSAGE RD2S19 END-IF RD2S19 ADD 1 TO WA01-RECS-JLUNCCAL RD2S19 . RD2S19 Y-1000-EXIT. RD2S19 EXIT. SPR11B***************************************************************** SPR11B* SECTION NAME : VZA-OBTAIN-DIST-QTY * SPR11B* FUNCTION : TO OBTAIN NON-ZERO PICK QTY FOR DISTRIBUTED * SPR11B* : PURCHASE ORDERS. * SPR11B***************************************************************** SPR11B VZA-OBTAIN-DIST-QTY SECTION. SPR11B SPR11B EXEC SQL SPR11B SELECT POS.DIST_QTY SPR11B INTO :POS-DIST-QTY SPR11B FROM VXJJ0POH POH SPR11B , VXJJ0POD POD SPR11B , VXJJ0POS POS SPR11B WHERE POH.COMP_INV_NO =:ORD-INV-NO SPR11B AND POD.RMS_ORD_NO =POH.RMS_ORD_NO SPR11B AND POD.APP_DIST_STAT_CD ="D" SPR11B AND POS.CR_PART_NO =:OLD-CR-PART-NO SPR11B AND POS.RO_NO =:OLD-RO-NO SPR11B AND POS.RMS_ORD_NO =POD.RMS_ORD_NO SPR11B AND POS.BPR_TPN =:OLD-BPR-TPN SPR11B AND POS.DIST_QTY IS NOT NULL SPR11B FETCH FIRST ROW ONLY 38321004 SPR11B WITH UR 38321004 SPR11B END-EXEC SPR11B SPR11B EVALUATE SQLCODE SPR11B WHEN 0 SPR11B WHEN -811 38361004 SPR11B SET WI-POS-FOUND TO TRUE SPR11B WHEN 100 SPR11B SET WI-POS-NOT-FOUND TO TRUE SPR11B WHEN OTHER SPR11B MOVE "VZA-OBTAIN-DIST-QTY" TO JLDB2E-PROCESS-NAME 38410000 SPR11B PERFORM JLDB2E-DB2-ERROR 38420000 SPR11B SET JLMSG-C99-DB2-ERROR TO TRUE 38430000 SPR11B PERFORM JLMSG-DISPLAY-MESSAGE 38440000 SPR11B END-EVALUATE SPR11B . SPR11B VZA-OBTAIN-DIST-QTY-EXIT. SPR11B EXIT. SPR11B SPR11B***************************************************************** SPR11B* SECTION NAME : VZB-OBTAIN-REVSD-ORD-QTY SPR11B* FUNCTION : TO OBTAIN REVISED ORDER QTY TO THAT STORE * SPR11B***************************************************************** SPR11B VZB-OBTAIN-REVSD-ORD-QTY SECTION. SPR11B SPR11B EXEC SQL SPR11B SELECT SUM(OLD.REVSD_ORD_QTY) SPR11B INTO :WW-OLD-REVSD-ORD-QTY 38580005 SPR11B :WI01-REVSD-OLD-QTY-NN 38580005 SPR11B FROM VXJJ0ORD ORD SPR11B , VXJJ0OLD OLD SPR11B WHERE ORD.CR_PART_NO =:OLD-CR-PART-NO SPR11B AND ORD.RO_NO =:OLD-RO-NO SPR11B AND ORD.ORD_NO =:OLD-ORD-NO SPR11B AND ORD.INV_NO =:ORD-INV-NO SPR11B AND OLD.CR_PART_NO = ORD.CR_PART_NO SPR11B AND OLD.RO_NO = ORD.RO_NO SPR11B AND OLD.ORD_NO = ORD.ORD_NO SPR11B AND OLD.LOAD_REF = ORD.LOAD_REF SPR11B AND OLD.BPR_TPN =:OLD-BPR-TPN SPR11B AND ORD.LOAD_CLOSE_DT <> "0001-01-01" SPR11B WITH UR SPR11B END-EXEC SPR11B SPR11B EVALUATE SQLCODE SPR11B WHEN 0 SPR11B IF NOT OLD-REVSD-QTY-NN SPR11B SUBTRACT WW-OLD-REVSD-ORD-QTY FROM POS-DIST-QTY SPR11B GIVING OLD-REVSD-ORD-QTY SPR11B IF OLD-REVSD-ORD-QTY < ZERO SPR11B MOVE ZERO TO OLD-REVSD-ORD-QTY SPR11B END-IF SPR11B ELSE SPR11B MOVE POS-DIST-QTY TO OLD-REVSD-ORD-QTY SPR11B END-IF SPR11B WHEN 100 SPR11B MOVE POS-DIST-QTY TO OLD-REVSD-ORD-QTY SPR11B WHEN OTHER SPR11B MOVE "VZB-OBTAIN-REVSD-ORD-QTY" TO JLDB2E-PROCESS-NAME 38790000 SPR11B PERFORM JLDB2E-DB2-ERROR 38800000 SPR11B SET JLMSG-C99-DB2-ERROR TO TRUE 38810000 SPR11B PERFORM JLMSG-DISPLAY-MESSAGE 38820000 SPR11B END-EVALUATE SPR11B . SPR11B VZB-OBTAIN-REVSD-ORD-QTY-EXIT. SPR11B EXIT. SPR11B SPR12A YYA-CHECK-PTG-EXIST-FOR-STORE SECTION. SPR12A*----------------------------------------------------------------- SPR12A* SECTION NAME : YYA-CHECK-PTG-EXIST-FOR-STORE * 25050000 SPR12A* CALLED BY : B-712-BA-EVALUATE-PTG * 25060000 SPR12A* FUNCTION : CHECKS WHETHER PTG EXISTS AT STORE LEVEL * SPR12A*----------------------------------------------------------------- SPR12A YYA-100. SPR12A SPR12A EXEC SQL SPR12A SELECT 1 SPR12A INTO :WW-DUMMY SPR12A FROM VXJJ0PTG SPR12A WHERE CR_PART_NO = :WH02-CR-PART-NO SPR12A AND RO_NO = :WH02-RETAIL-OUTLET-NO SPR12A AND ( SPR12A (TESCO_YEAR = :WH03-PTP-TESCO-YEAR1 SPR12A AND TESCO_WEEK = :WH03-PTP-TESCO-WEEK1) SPR12A SPR12A OR (TESCO_YEAR = :WH03-PTP-TESCO-YEAR2 SPR12A AND TESCO_WEEK = :WH03-PTP-TESCO-WEEK2) SPR12A SPR12A OR (TESCO_YEAR = :WH03-PTP-TESCO-YEAR3 SPR12A AND TESCO_WEEK = :WH03-PTP-TESCO-WEEK3) SPR12A SPR12A OR (TESCO_YEAR = :WH03-PTP-TESCO-YEAR4 SPR12A AND TESCO_WEEK = :WH03-PTP-TESCO-WEEK4) SPR12A ) SPR12A FETCH FIRST ROW ONLY SPR12A WITH UR SPR12A END-EXEC. SPR12A SPR12A IF SQLCODE = 0 SPR12A SET WI19-PTG-FOR-STORE TO TRUE SPR12A ADD +1 TO SPR12A WA01-PTG-STORE-COUNT SPR12A ELSE SPR12A IF SQLCODE = 100 SPR12A CONTINUE SPR12A ELSE SPR12A MOVE "YYA-CHECK-PTG-EXIST-FOR-STORE" SPR12A TO SPR12A JLDB2E-PROCESS-NAME SPR12A PERFORM JLDB2E-DB2-ERROR SPR12A SET JLMSG-C99-DB2-ERROR TO TRUE SPR12A PERFORM JLMSG-DISPLAY-MESSAGE SPR12A END-IF SPR12A END-IF. SPR12A SPR12A YYA-100-EXIT. SPR12A EXIT. SPR12A 354100* COPYCODE FOR CALLED SUBROUTINES AND COMMON SECTIONS HERE 35410000 354200 35420000 354300* JLCC01PD - COMMON CODE TO RETRIEVE PAR DATE AND TIME 35430000 354400 35440000 354500 COPY JLCC01PD. 35450000 354600 35460000 354700* JL0001C - CALL SECTION FOR BOOKSTOCK PACKAGE SWITCH CODE 35470000 354800 35480000 354900 COPY JL0001C. 35490000 355000 35500000 355100* COPY JJCDAPD. 35510000 355200* 35520000 355300* JLMSGPD - COMMON MESSAGE OUTPUT SECTION (ABENDS FOR "C" MSGS) 35530000 355400 35540000 355500 COPY JLMSGPD. 35550000 355600 35560000 355700* JLDB2EPD - COMMON DB2 ERROR REPORT SECTION (USES MSG DISPLAY) 35570000 355800 35580000 355900 COPY JLDB2EPD. 35590000 356000 35600000 356100* JLDB2RPD - COMMON DB2 ROLLBACK SECTION FOLLOWING FAILURES 35610000 356200* (THIS IS REQUIRED BY THE JLCC01PD SECTION ONLY) 35620000 356300 35630000 356400 COPY JLDB2RPD. 35640000 356500 35650000 AUT07B ZA-CALL-JL0F26 SECTION. 35650000 AUT07B*---------------------------------------------------------------* AUT07B* SECTION NAME : ZA-CALL-JL0F26 * AUT07B* CALLED BY : * AUT07B* CALLS : NONE * AUT07B* FUNCTION : CALLS JL0F26 * AUT07B*---------------------------------------------------------------* AUT07B AUT07B MOVE ENDEVOR-FOOTPRINT-SUBSYSTEM-C3 TO AUT07B WF01-JL0F26(3:1) AUT07B AUT07B CALL WF01-JL0F26 USING JLF26LNK-LINKAGE AUT07B . AUT07B 356600 ZZ-CLOSE-FILES-PRIOR-TO-ABEND SECTION. 35660000 356700*---------------------------------------------------------------* 35670000 356800* SECTION NAME : ZZ-CLOSE-FILES-PRIOR-TO-ABEND * 35680000 356900* CALLED BY : JLMSG-DISPLAY-MESSAGE * 35690000 357000* CALLS : NONE * 35700000 357100* FUNCTION : 1. CLOSES ALL FILES FOLLOWING TERMINAL ERROR * 35710000 357200*---------------------------------------------------------------* 35720000 357300 ZZ-999. 35730000 357400 35740000 652900 CLOSE INPUT-FILE INPUT4-FILE 65290000 JLFOLKUP-FILE 65290000 JLFOEXCP-FILE 65290000 AVRDEL JLPRDCEF-FILE AVRDEL JLCSTRND-FILE 357600 OUTPUT-FILE1 35760000 357700 OUTPUT-FILE2 35770000 357800 OUTPUT-FILE3 35780000 357900 OUTPUT-FILE4 35790000 358000 REJECT-FILE1 35800000 926800 JLALRESV 92680005 WIN06B JLDOTCOM 92680005 REJECT-FILE2 35810000 WIN06A DOTCOM-SALES-FILE JLFODIAX-FILE 65290000 SUM11A JLFODIAH-FILE 65290000 AVRS32 JLFOREFD-FILE . 35820000 358300 ZZ-999-EXIT. 35830000 358400 EXIT. 35840000 CRAUT3 CRAUT3* JLDATPD - COMMON PARAMETER TABLE DATE RETRIEVAL ROUTINE CRAUT3 CRAUT3 COPY JLDATPD. CRAUT3 358500* COPYCODE FOR CALLED SUBROUTINES AND COMMON SECTIONS HERE 35850000 579300 35850000 358500*-- GM -- 05/07/2000 -------------------------------------------* 35850000 357500 COPY JLF40C. 35750000 717200 71720001 COPY JLF46C. 35750000 SUM11A COPY JLF42C. 35750000 717300*-- CAW-- 21/12/2001 -------------------------------------------* 71730001 717400 COPY JJ009C. 71740001 717500 71750000 357200*---------------------------------------------------------------* 35720000 CRV90B COPY JL007C. 71740001 CRV90B 71750000 CRV90B*---------------------------------------------------------------* 35720000 SPR11B YYY-100-READ-VXJJ0PAR SECTION. 25030000 SPR11B*---------------------------------------------------------------* 25040000 SPR11B* SECTION NAME : YYY-100-READ-VXJJ0PAR 25050000 SPR11B* CALLED BY : V-100-READ-VXJJ0PAR * 25060000 SPR11B* FUNCTION : 1. READS 'PICKEXP' KEY FROM PAR TABLE. * 25090000 SPR11B* : IF THE KEY IS PRESENT,THE REQUIREMENT GO207* 25090000 SPR11B* : IS DEPLOYED TO THE ENV, HENCE THE CHECK * 25090000 SPR11B* : ON POD/POS/POH HAS TO BE INCLUDED * 25090000 SPR11B* : IF THE KEY IS NOT PRESENT, OR ANY ISSUE * 25090000 SPR11B* : WHILE PAR TABLE READ, THE SYSTEM ASSUMES * 25090000 SPR11B* : THE NEW REQ GO207 IS NOT DEPLOYED TO THE * 25090000 SPR11B* : NEW ENV AND HENCE THE CHECK ON POD/POS/POH * 25090000 SPR11B* : CAN BE IGNORED. * 25090000 SPR11B*---------------------------------------------------------------* 25100000 SPR11B YYY-100. 25110000 SPR11B SET NOT-PICKEXP-PROCESSING TO TRUE. 25140000 SPR11B 25120000 SPR11B*--- RETRIEVE THE PICK EXPIRY PROCESSING CONTROL 25130000 SPR11B EXEC SQL 25140000 SPR11B SELECT 1 25150000 SPR11B INTO :WW-DUMMY 25160000 SPR11B FROM VXJJ0PAR 25170000 SPR11B WHERE JJ_PARAM_KEY = "PICKEXP" 25180000 SPR11B WITH UR SPR11B END-EXEC. 25190000 SPR11B 25200000 SPR11B IF SQLCODE = 0 25210000 SPR11B THEN 25220000 SPR11B SET PICKEXP-PROCESSING TO TRUE 25230000 SPR11B ELSE 25250000 SPR11B SET NOT-PICKEXP-PROCESSING TO TRUE 25230000 SPR11B END-IF. 25310000 SPR11B 27750000 SPR11B YYY-100-EXIT. 27760000 SPR11B EXIT. 27770000 SUM13A SUM13A XXX-200-PROCTRAP-PROCESSING SECTION. 25030000 SUM13A*---------------------------------------------------------------* 25040000 SUM13A* SECTION NAME : XXX-200-PROCTRAP-PROCESSING * 25050000 SUM13A* CALLED BY : B-350-CALC-RO-TPN * 25060000 SUM13A* CALLS : * 25070000 SUM13A* FUNCTION : 1. SUPPLEMENT THE VIEW OF DELIVERED STOCK * 25090000 SUM13A* : (WT40-) BUILT IN B-550-RETRIEVE-OLD * 25090000 SUM13A*---------------------------------------------------------------* 25100000 SUM13A XXX-200. 25110000 SUM13A 25120000 SUM13A MOVE 1 TO WX10-DATA-SUB2. 18560000 SUM13A MOVE "2099-12-31" TO WW01-XXX-START-DATE. 18750000 SUM13A 18750000 SUM13A SET PROCESS-LOOP TO TRUE. 18610000 SUM13A PERFORM UNTIL END-PROCESS-LOOP 18630000 SUM13A 18740000 SUM13A IF WX10-DATA-SUB2 > 126 18770000 SUM13A OR WT40-REQ-DEL-DATE(WX10-DATA-SUB2) = SPACES 18780000 SUM13A THEN 18790000 SUM13A SET END-PROCESS-LOOP TO TRUE 18800000 SUM13A ELSE 18790000 SUM13A MOVE WT40-REQ-DEL-DATE(WX10-DATA-SUB2) 18750000 SUM13A TO WW01-XXX-START-DATE 18750000 SUM13A ADD 1 TO WX10-DATA-SUB2 18840000 SUM13A END-IF 18810000 SUM13A 18850000 SUM13A END-PERFORM. 18860000 SUM13A SUM13A MOVE 1 TO WX10-DATA-SUB1. 18560000 SUM13A MOVE "0001-01-01" TO WW01-XXX-END-DATE. 18750000 SUM13A 18750000 SUM13A SET PROCESS-LOOP TO TRUE. 18610000 SUM13A PERFORM UNTIL END-PROCESS-LOOP 18630000 SUM13A 18740000 SUM13A IF WX10-DATA-SUB1 > 75 18770000 SUM13A OR WT10-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES 18780000 SUM13A THEN 18790000 SUM13A SET END-PROCESS-LOOP TO TRUE 18800000 SUM13A ELSE 18790000 SUM13A IF WT10-PERD-CALC-TYPE(WX10-DATA-SUB1) = "C" 18750000 SUM13A AND WT10-NOTNL-CALC-DATE(WX10-DATA-SUB1) > " " SUM13A AND WT10-FIRST-ORD-TYPE-OF-DAY(WX10-DATA-SUB1) > " " SUM13A THEN 18750000 SUM13A MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 18750000 SUM13A TO WW01-XXX-END-DATE 18750000 SUM13A END-IF 18750000 SUM13A ADD 1 TO WX10-DATA-SUB1 18840000 SUM13A END-IF 18810000 SUM13A 18850000 SUM13A END-PERFORM. 18860000 SUM13A SUM13A IF WW01-XXX-START-DATE >= WW01-XXX-END-DATE 18560000 SUM13A THEN 18560000 SUM13A GO TO XXX-200-EXIT 25230000 SUM13A END-IF 18560000 SUM13A 18850000 SUM13A*------ POSITION WT10- AT THE START POINT --------------------- 27750000 SUM13A MOVE 1 TO WX10-DATA-SUB1. 18560000 SUM13A 18570000 SUM13A SET PROCESS-LOOP TO TRUE. 18610000 SUM13A PERFORM UNTIL END-PROCESS-LOOP 18630000 SUM13A 18740000 SUM13A IF WX10-DATA-SUB1 > 75 18770000 SUM13A OR WT10-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES 18780000 SUM13A OR WT10-DELY-REQ-DATE(WX10-DATA-SUB1) > 18780000 SUM13A WW01-XXX-START-DATE 18780000 SUM13A THEN 18790000 SUM13A SET END-PROCESS-LOOP TO TRUE 18800000 SUM13A ELSE 18790000 SUM13A ADD 1 TO WX10-DATA-SUB1 18840000 SUM13A END-IF 18810000 SUM13A 18850000 SUM13A END-PERFORM. 18860000 SUM13A 18850000 SUM13A*------ POPULATE THE WT40-TAB WITH NEW ENTRIES DERIVED FROM WT10 27750000 SUM13A 18570000 SUM13A SET PROCESS-LOOP TO TRUE. 18610000 SUM13A PERFORM UNTIL END-PROCESS-LOOP 18630000 SUM13A 18740000 SUM13A IF WX10-DATA-SUB1 > 75 18770000 SUM13A OR WX10-DATA-SUB2 > 126 18770000 SUM13A OR WT10-DELY-REQ-DATE(WX10-DATA-SUB1) = SPACES 18780000 SUM13A OR WT10-DELY-REQ-DATE(WX10-DATA-SUB1) > 18780000 SUM13A WW01-XXX-END-DATE 18780000 SUM13A THEN 18790000 SUM13A SET END-PROCESS-LOOP TO TRUE 18800000 SUM13A ELSE 18790000 SUM13A MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 18840000 SUM13A TO WT40-REQ-DEL-DATE(WX10-DATA-SUB2) 18840000 SUM13A WT40-BFFO-REQ-DEL-DATE(WX10-DATA-SUB2) 18840000 SUM13A WT40-ACT-DEL-DATE(WX10-DATA-SUB2) SUM13A MOVE WT10-ORDER-TYPE(WX10-DATA-SUB1) 18840000 SUM13A TO WT40-ORDER-TYPE(WX10-DATA-SUB2) 18840000 SUM13A MOVE WT10-DELY-REQ-TIME(WX10-DATA-SUB1) 18840000 SUM13A TO WT40-REQ-DEL-TM(WX10-DATA-SUB2) 18840000 SUM13A WT40-ACT-DEL-TIME(WX10-DATA-SUB2) SUM13A PERFORM XXX-300-SET-WT40-EXPIRY-DATE 18840000 SUM13A IF WT10-ORDER-TYPE(WX10-DATA-SUB1) = "T" 18840000 SUM13A THEN 18840000 SUM13A MOVE +0 TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB2) 18840000 SUM13A ELSE 18840000 SUM13A MOVE WT10-PERD-OS-ORD-QTY(WX10-DATA-SUB1) 18750000 SUM13A TO WT40-REVSD-ORD-QTY(WX10-DATA-SUB2) 18750000 SUM13A END-IF 18840000 SUM13A ADD 1 TO WX10-DATA-SUB1 18840000 SUM13A ADD 1 TO WX10-DATA-SUB2 18840000 SUM13A END-IF 18810000 SUM13A END-PERFORM. 18860000 SUM13A 18850000 SUM13A XXX-200-EXIT. 27760000 SUM13A EXIT. 27770000 SUM13A 27780000 SUM13A XXX-300-SET-WT40-EXPIRY-DATE SECTION. 32420000 SUM13A*---------------------------------------------------------------* 25040000 SUM13A* SECTION NAME : XXX-300-SET-WT40-EXPIRY-DATE 25050000 SUM13A* FUNCTION : 1. SUPPLEMENT THE VIEW OF DELIVERED STOCK * 25090000 SUM13A* : (WT40-) BY ADDING THE EXPIRY DATE 25090000 SUM13A*---------------------------------------------------------------* 25100000 SUM13A XXX-300. 25110000 SUM13A MOVE ZEROES TO ZZD-ERROR-CODE SUM13A MOVE "A" TO ZZD-FUNCTION-CODE SUM13A MOVE +0 TO ZZD-DIFF-IN-DAYS 24780000 SUM13A MOVE "ISO" TO ZZD-DATE1-FORMAT SUM13A SUM13A MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 31900000 SUM13A TO ZZD-DATE1 SUM13A SUM13A MOVE "WF" TO ZZD-DATE2-FORMAT SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM13A SUM13A IF ZZD-ERROR-CODE NOT = 00 SUM13A THEN SUM13A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT SUM13A PERFORM JLMSG-DISPLAY-MESSAGE SUM13A END-IF SUM13A EVALUATE ZZD-DATE2(7:1) SUM13A WHEN "1" SUM13A IF BPR-EXP-SHELF-LIFE-1 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-1 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A WHEN "2" SUM13A IF BPR-EXP-SHELF-LIFE-2 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-2 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A WHEN "3" SUM13A IF BPR-EXP-SHELF-LIFE-3 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-3 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A WHEN "4" SUM13A IF BPR-EXP-SHELF-LIFE-4 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-4 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A WHEN "5" SUM13A IF BPR-EXP-SHELF-LIFE-5 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-5 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A WHEN "6" SUM13A IF BPR-EXP-SHELF-LIFE-6 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-6 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A WHEN "7" SUM13A IF BPR-EXP-SHELF-LIFE-7 > 0 SUM13A MOVE BPR-EXP-SHELF-LIFE-7 TO SUM13A ZZD-DIFF-IN-DAYS SUM13A ELSE SUM13A MOVE BPR-MIN-SHELF-LIFE TO SUM13A ZZD-DIFF-IN-DAYS SUM13A END-IF SUM13A END-EVALUATE SUM13A SUM13A SUBTRACT 1 FROM ZZD-DIFF-IN-DAYS 24780000 SUM13A SUM13A MOVE WT10-DELY-REQ-DATE(WX10-DATA-SUB1) 31900000 SUM13A TO ZZD-DATE1 SUM13A SUM13A MOVE ZEROES TO ZZD-ERROR-CODE 32440000 SUM13A MOVE "A" TO ZZD-FUNCTION-CODE 32450000 SUM13A MOVE "ISO" TO ZZD-DATE1-FORMAT 32460000 SUM13A MOVE "ISO" TO ZZD-DATE2-FORMAT 32470000 SPR14B PERFORM ZA-CALL-JL0F32 10860000 SUM13A SUM13A IF ZZD-ERROR-CODE NOT = 00 32540000 SUM13A MOVE ZZD-ERROR-CODE TO WM05-RETURN-CODE 32550000 SPR14B MOVE WM05-JL0F32-ERROR TO JLMSG-TEXT 32560000 SUM13A DISPLAY "XXX300 ZZD-DAT=" ZZDAT-PARM "=" 32570000 SUM13A PERFORM JLMSG-DISPLAY-MESSAGE 32580000 SUM13A ELSE 32590000 SUM13A MOVE ZZD-DATE2 TO WT40-CODE-DATE(WX10-DATA-SUB2)32600000 SUM13A END-IF. 32610000 SUM13A 32620000 SUM13A XXX-300-EXIT. 27760000 SUM13A EXIT. 27770000 SUM13A 27780000 SPR14B ZA-CALL-JL0F32 SECTION. SPR11B*---------------------------------------------------------------* 35720000 SPR14B* SECTION NAME : ZA-CALL-JL0F32 * SPR14B* CALLED BY : VARIOUS * SPR14B* CALLS : JL0F32 * SPR14B* FUNCTION : CALLS JL0F32 * SPR14B*---------------------------------------------------------------* SPR14B SPR14B MOVE ENDEVOR-FOOTPRINT-SUBSYSTEM-C3 TO SPR14B WF01-JL0F32(3:1) SPR14B SPR14B CALL WF01-JL0F32 USING ZZDAT-PARM SPR14B . SPR14B SUM13A 27780000 TA1226 V-910-OPEN-READNEXT-XSB-RST SECTION. 16150067 SPR11B*---------------------------------------------------------------* 35720000 TA1226* SECTION NAME : V-910-OPEN-READNEXT-XSB-RST * 16170067 TA1226* FUNCTION : 1. OPENS CURSOR FOR PRODUCT SPECIFIC PROMS * 16210020 TA1226*---------------------------------------------------------------* 16220020 TA1226 V-910. 16230020 TA1226 TA1226 MOVE WW01-CURR-PART-NO TO WH-CR-PART-NO. 16250096 TA1226 MOVE WW01-CURR-RO-NO TO WH-RO-NO. 16251096 TA1226 MOVE WW01-CURR-BPR-TPN TO WH-BPR-TPN. 16260096 TA1226 MOVE WW01-CURR-SG-CD TO WH-SG-CD. 16260396 TA1226 TA1226 EXEC SQL OPEN READNEXT_XSB_RST 16280066 TA1226 END-EXEC. 16290020 TA1226 16300020 TA1226 IF SQLCODE = 0 16310020 TA1226 SET NOT-END-XSB-RST TO TRUE 16320065 TA1226 SET XSB-RST-OPEN TO TRUE 16330065 TA1226 ELSE 16340020 TA1226 MOVE "V-910-OPEN-READNEXT-XSB-RST" 16350067 TA1226 TO JLDB2E-PROCESS-NAME 16360020 TA1226 PERFORM JLDB2E-DB2-ERROR 16370020 TA1226 SET JLMSG-C99-DB2-ERROR TO TRUE 16380020 TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 16390020 TA1226 END-IF. 16400020 TA1226 16410020 TA1226 V-910-EXIT. 16420020 TA1226 EXIT. 16430020 TA1226 TA1226 V-920-FETCH-READNEXT-XSB-RST SECTION. 16450067 TA1226*---------------------------------------------------------------* 16460020 TA1226* SECTION NAME : V-920-FETCH-READNEXT-XSB-RST * 16470067 TA1226* FUNCTION : 1. FETCHES THE NEXT XSB ENTRY FOR A PRODUCT * 16510049 TA1226*---------------------------------------------------------------* 16520020 TA1226 V-920. 16530020 TA1226 TA1226 EXEC SQL FETCH READNEXT_XSB_RST 16550066 TA1226 INTO :WH-BGO-EXP-STEP-EFF-DT 16561061 TA1226 ,:WH-BGO-EXP-STEP-END-DT 16570050 TA1226 ,:WH-BGO-OFFER-SHELF-CAP 16590002 TA1226 :WH-BGO-OFFER-CAP-NULL TA1226 ,:WH-BGO-PRE-OFFER-DEL-DATE TA1226 :WH-BGO-OFFER-DATE-NULL TA1226 END-EXEC. 16610020 TA1226 16620020 TA1226 IF SQLCODE < 0 16630020 TA1226 MOVE "V-920-FETCH-READNEXT-XSB-RST" 16640067 TA1226 TO JLDB2E-PROCESS-NAME 16650020 TA1226 PERFORM JLDB2E-DB2-ERROR 16660020 TA1226 SET JLMSG-C99-DB2-ERROR TO TRUE 16670020 TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 16680020 TA1226 ELSE 16690020 TA1226 IF SQLCODE = 0 16700028 TA1226 ADD 1 TO WA01-XSB-RST-FETCHED 16710065 TA1226 ELSE 16720028 TA1226 SET END-XSB-RST TO TRUE 16730065 TA1226 END-IF 16740020 TA1226 END-IF. 16750020 TA1226 16770020 TA1226 V-920-EXIT. 16780020 TA1226 EXIT. 16790020 TA1226 TA1226 V-930-CLOSE-READNEXT-XSB-RST SECTION. 16810067 TA1226*---------------------------------------------------------------* 16820020 TA1226* SECTION NAME : V-930-CLOSE-READNEXT-XSB-RST * 16830067 TA1226* FUNCTION : 1. CLOSES XSB-RST CURSOR * 22620200 TA1226*---------------------------------------------------------------* 16890020 TA1226 V-930. 16900020 TA1226 16910020 TA1226 EXEC SQL CLOSE READNEXT_XSB_RST 16920066 TA1226 END-EXEC. 16930020 TA1226 16940020 TA1226 IF SQLCODE = 0 16950020 TA1226 SET XSB-RST-CLOSED TO TRUE 16960065 TA1226 ELSE 16970020 TA1226 MOVE "V-930-CLOSE-READNEXT-XSB-RST" 16980067 TA1226 TO JLDB2E-PROCESS-NAME 16990020 TA1226 PERFORM JLDB2E-DB2-ERROR 17000020 TA1226 SET JLMSG-C99-DB2-ERROR TO TRUE 17010020 TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 17020020 TA1226 END-IF. 17030020 TA1226 17040020 TA1226 V-930-EXIT. 17050020 TA1226 EXIT. 17060020 TA1226 V-940-OPEN-READNEXT-XSB-STACK SECTION. 16150067 TA1226*---------------------------------------------------------------* 16160020 TA1226* SECTION NAME : V-940-OPEN-READNEXT-XSB-STACK * 16170067 TA1226* FUNCTION : 1. OPENS CURSOR FOR PRODUCT SPECIFIC PROMS * 16210020 TA1226*---------------------------------------------------------------* 16220020 TA1226 V-940. 16230020 TA1226 16240020 TA1226 MOVE WW01-CURR-PART-NO TO WH-CR-PART-NO 16250096 TA1226 MOVE WW01-CURR-RO-NO TO WH-RO-NO 16251096 TA1226 MOVE WW01-CURR-BPR-TPN TO WH-BPR-TPN 16251096 TA1226 MOVE WW01-CURR-SG-CD TO WH-SG-CD 16260396 TA1226 TA1226 EXEC SQL OPEN READNEXT_XSB_STACK 16280066 TA1226 END-EXEC. 16290020 TA1226 16300020 TA1226 IF SQLCODE = 0 16310020 TA1226 SET NOT-END-XSB-STACK TO TRUE 16320065 TA1226 SET XSB-STACK-OPEN TO TRUE 16330065 TA1226 ELSE 16340020 TA1226 MOVE "V-940-OPEN-READNEXT-XSB-STACK" 16350067 TA1226 TO JLDB2E-PROCESS-NAME 16360020 TA1226 PERFORM JLDB2E-DB2-ERROR 16370020 TA1226 SET JLMSG-C99-DB2-ERROR TO TRUE 16380020 TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 16390020 TA1226 END-IF. 16400020 TA1226 16410020 TA1226 V-940-EXIT. 16420020 TA1226 EXIT. 16430020 TA1226 TA1226 V-950-FETCH-READNEXT-XSB-STACK SECTION. 16450067 TA1226*---------------------------------------------------------------* 16460020 TA1226* SECTION NAME : V-950-FETCH-READNEXT-XSB-STACK * 16470067 TA1226* FUNCTION : 1. FETCHES THE NEXT XSB ENTRY FOR A PRODUCT * 16510049 TA1226*---------------------------------------------------------------* 16520020 TA1226 V-950. 16530020 TA1226 16540020 TA1226 EXEC SQL FETCH READNEXT_XSB_STACK 16550066 TA1226 INTO :WH-BGO-EXP-STEP-EFF-DT 16561061 TA1226 ,:WH-BGO-EXP-STEP-END-DT 16570050 TA1226 ,:WH-BGO-OFFER-SHELF-CAP 16590002 TA1226 :WH-BGO-OFFER-CAP-NULL TA1226 ,:WH-BGO-PRE-OFFER-DEL-DATE TA1226 :WH-BGO-OFFER-DATE-NULL TA1226 END-EXEC. 16610020 TA1226 16620020 TA1226 IF SQLCODE < 0 16630020 TA1226 MOVE "V-950-FETCH-READNEXT-XSB-STACK" 16640067 TA1226 TO JLDB2E-PROCESS-NAME 16650020 TA1226 PERFORM JLDB2E-DB2-ERROR 16660020 TA1226 SET JLMSG-C99-DB2-ERROR TO TRUE 16670020 TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 16680020 TA1226 ELSE 16690020 TA1226 IF SQLCODE = 0 16700028 TA1226 ADD 1 TO WA01-XSB-STACK-FETCHED 16710065 TA1226 ELSE 16720028 TA1226 SET END-XSB-STACK TO TRUE 16730065 TA1226 END-IF 16740020 TA1226 END-IF. 16750020 TA1226 16760020 TA1226 16770020 TA1226 V-950-EXIT. 16780020 TA1226 EXIT. 16790020 TA1226 TA1226 V-960-CLOSE-READNEXT-XSB-STACK SECTION. 16810067 TA1226*---------------------------------------------------------------* 16820020 TA1226* SECTION NAME : V-960-CLOSE-READNEXT-XSB-STACK * 16830067 TA1226* CALLED BY : B-624-RETRIEVE-XSB-NIA * 16841092 TA1226* : C-100-TERMINATE * 16850020 TA1226* CALLS : JLDB2E-DB2-ERROR * 16860020 TA1226* : JLMSG-DISPLAY-MESSAGE * 16870020 TA1226* FUNCTION : 1. CLOSES XSB-STACK CURSOR * 22620200 TA1226*---------------------------------------------------------------* 16890020 TA1226 V-960. 16900020 TA1226 16910020 TA1226 EXEC SQL CLOSE READNEXT_XSB_STACK 16920066 TA1226 END-EXEC. 16930020 TA1226 16940020 TA1226 IF SQLCODE = 0 16950020 TA1226 SET XSB-STACK-CLOSED TO TRUE 16960065 TA1226 ELSE 16970020 TA1226 MOVE "V-960-CLOSE-READNEXT-XSB-STACK" 16980067 TA1226 TO JLDB2E-PROCESS-NAME 16990020 TA1226 PERFORM JLDB2E-DB2-ERROR 17000020 TA1226 SET JLMSG-C99-DB2-ERROR TO TRUE 17010020 TA1226 PERFORM JLMSG-DISPLAY-MESSAGE 17020020 TA1226 END-IF. 17030020 TA1226 17040020 TA1226 V-960-EXIT. 17050020 TA1226 EXIT. 17060020 TA1226*---------------------------------------------------------------* 16160020 SPR11B*---------------------------------------------------------------* 35720000 SPR08A COPY JLF48C. SPR08A*---------------------------------------------------------------* SUM11A COPY JLF41C. KS2S09* COPY JKNSFCHK. SPR13A COPY JLF30PD1. KS2S09* COPY JLF30PD2. SPR13C COPY JLF30PD3. AVRDEL COPY JLKFACPD.