Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ASURD132

ASURD132.m

Go to the documentation of this file.
ASURD132 ; IHS/ITSC/LMH -RPT 13 REQ-ANAL DETAIL LINES ; 
 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
 ;This routine formats and prints report 13, Requirements Analysis
 ;Report (Continued from and involked by ^ASURD13P)
 S ASUV("STKST")=$P(ASUX(0),U,3),ASUV("RPM")=ASUMS("LTM")+ASUMS("SFSKM"),ASUV("SEL MO")=+ASUD("R13","MOBG")
 I ASUV("SEL MO")<1!(ASUV("SEL MO")>12) W *7,*7,"ERROR IN REPORT 13 MONTH COMPUTATION" Q
 D AMIQ,P3 Q
AMIQ ;FIND OAMIQ AND LAMIQ
 S ASUV("MO")=ASUD("R13","MOBG")+1,(ASUQ,ASUV("PMIQ-O"),ASUV("PMIQ-L"))=0
 F ASUU(19)=ASUV("MO"):1 S:ASUU(19)=13 ASUU(19)=1 S ASUQ=ASUQ+1,ASUV("MO")=1 Q:ASUQ>6  S ASUV("PMIQ-O")=ASUV("PMIQ-O")+ASUMS("DMD","QTY",ASUU(19))
 S ASUV("MO")=ASUD("R13","MOBG"),ASUQ=0
 F ASUU(19)=ASUV("MO"):-1 S:ASUU(19)=0 ASUU(19)=12 S ASUQ=ASUQ+1 Q:ASUQ>6  S ASUV("PMIQ-L")=ASUV("PMIQ-L")+ASUMS("DMD","QTY",ASUU(19))
 S ASUV("PMIQ-O")=ASUV("PMIQ-O")/6,ASUV("PMIQ-L")=ASUV("PMIQ-L")/6,ASUV("PMIQ-O")=$E(ASUV("PMIQ-O"),1,6),ASUV("PMIQ-L")=$E(ASUV("PMIQ-L"),1,6)
 I $E($P(ASUV("PMIQ-O"),".",2))>5 D
 .S ASUV("PMIQ-O")=$P(ASUV("PMIQ-O"),".")+1
 E  D
 .S ASUV("PMIQ-O")=$P(ASUV("PMIQ-O"),".")
 I $E($P(ASUV("PMIQ-L"),".",2))>5 D
 .S ASUV("PMIQ-L")=$P(ASUV("PMIQ-L"),".")+1
 E  D
 .S ASUV("PMIQ-L")=$P(ASUV("PMIQ-L"),".")
 Q
P3 ;1-12 PRINT
 S ASUV("OFS",0)=0_U_8_U_4 D P6
 W ?76,"C-RPQ",?83,$J(ASUMS("RPQ"),5),?91,"STKST",?97,$J(ASUV("STKST"),5),?105,"TYPE CODE",?116,ASUMS("EOQ","TP") W ?118,"SUI",?128,ASUMS("VENUI")
 W !?2,ASUMX("DESC",2)
 S ASUC("LN")=ASUC("LN")+1
 S ASUV("OFS",0)=11_U_7_U_3 D P6
 W ?76,"O-AMIQ",?83,$J(ASUV("PMIQ-O"),5),?91,"OH QTY",?97,$J(ASUMS("QTY","O/H"),5)
 D
 W:"C"[ASUMS("EOQ","TP") ?105,"MOD",?109,ASUMS("EOQ","MM")
 W:"B"[ASUMS("EOQ","TP") ?105,"MOD",?109,ASUMS("EOQ","QM")
 W:"SPDQY"[ASUMS("EOQ","TP") ?105,"MOD",?109,ASUMS("EOQ","AM")
 W ?118,"SUI",?128,ASUMS("VENUI"),!?2,ASUMX("DESC",2)
 S ASUC("LN")=ASUC("LN")+1
 S ASUV("OFS",0)=10_U_6_U_2 D P6
 W ?76,"L-AMIQ",?83,$J(ASUV("PMIQ-L"),5),?91,"DI QTY",?97,$J(ASUMS("D/I","QTY-TOT"),5),?105,"EOQ MOS",?113,ASUMS("EOQ","MO"),?119,$S($G(ASUS("QTYAJ"))]"":"EOQ*",1:"EOQ "),?124,$J(ASUMS("EOQ","QTY"),7)
 N X S X=ASUMX("ESTB") W !?3,"DATE EST",?12,$E(X,2,3),"-",$E(X,4,5)
 S ASUC("LN")=ASUC("LN")+1
 N X S X=ASUMX("SOBJ") W ?18,"SUBOBJECT",?28,$E(X,1,2),".",$E(X,3,4)
 S ASUV("OFS",0)=9_U_5_U_1 D P6
 W ?76,"PAMIQ",?83,$J(ASUMS("PMIQ"),5),?91,"DO QTY",?97,$J(ASUMS("D/O","QTY"),5),?105,"LUPP" W ?110,$J($FN(ASUMS("LPP"),",",2),12),?123,"T13",$J(ASUMS("R13","TIMES"),5)
 D P7
 Q
P6 ;MONS 1-12 SET
 S ASUV("OFS")=$P(ASUV("OFS",0),U) D DMCMPT W ?34,$E(ASUD("R13","MO",ASUV("OFS")),1,2),?37,$J(ASUMS("DMD","QTY",ASUV("OFS")),4),?43,$J(ASUMS("DMD","CALL",ASUV("OFS")),4)
 S ASUV("OFS")=$P(ASUV("OFS",0),U,2) D DMCMPT W ?48,$E(ASUD("R13","MO",ASUV("OFS")),1,2),?51,$J(ASUMS("DMD","QTY",ASUV("OFS")),4),?57,$J(ASUMS("DMD","CALL",ASUV("OFS")),4)
 S ASUV("OFS")=$P(ASUV("OFS",0),U,3) D DMCMPT W ?62,$E(ASUD("R13","MO",ASUV("OFS")),1,2),?65,$J(ASUMS("DMD","QTY",ASUV("OFS")),4),?71,$J(ASUMS("DMD","CALL",ASUV("OFS")),4)
DMCMPT ;EP; -COMPUTE SUB DISPLACEMENT TO CORRECT MONTH
 S ASUV("OFS")=ASUV("SEL MO")+ASUV("OFS") S:ASUV("OFS")>12 ASUV("OFS")=ASUV("OFS")-12 Q
P7 ;MONS 1-12 PRINT
 S ASUV("OFS")=11 D DMCMPT S ASUV("OFS",1)=ASUV("OFS")
 S ASUV("OFS")=10 D DMCMPT S ASUV("OFS",2)=ASUV("OFS")
 S ASUV("OFS")=9 D DMCMPT S ASUV("OFS",3)=ASUV("OFS")
 W !?29,"TOTALS",?36,$J((ASUMS("DMD","QTY",ASUV("OFS",1))+ASUMS("DMD","QTY",ASUV("OFS",2))+ASUMS("DMD","QTY",ASUV("OFS",3))+ASUMS("DMD","QTY",ASUV("SEL MO"))),5)
 S ASUC("LN")=ASUC("LN")+1
 W ?42,$J((ASUMS("DMD","CALL",ASUV("OFS",1))+ASUMS("DMD","CALL",ASUV("OFS",2))+ASUMS("DMD","CALL",ASUV("OFS",3))+ASUMS("DMD","CALL",ASUV("SEL MO"))),5)
 S ASUV("OFS")=7 D DMCMPT S ASUV("OFS",1)=ASUV("OFS")
 S ASUV("OFS")=6 D DMCMPT S ASUV("OFS",2)=ASUV("OFS")
 S ASUV("OFS")=5 D DMCMPT S ASUV("OFS",3)=ASUV("OFS")
 S ASUV("OFS")=8 D DMCMPT
 W ?50,$J((ASUMS("DMD","QTY",ASUV("OFS"))+ASUMS("DMD","QTY",ASUV("OFS",1))+ASUMS("DMD","QTY",ASUV("OFS",2))+ASUMS("DMD","QTY",ASUV("OFS",3))),5)
 W ?56,$J((ASUMS("DMD","CALL",ASUV("OFS"))+ASUMS("DMD","CALL",ASUV("OFS",1))+ASUMS("DMD","CALL",ASUV("OFS",2))+ASUMS("DMD","CALL",ASUV("OFS",3))),5)
 S ASUV("OFS")=3 D DMCMPT S ASUV("OFS",1)=ASUV("OFS")
 S ASUV("OFS")=2 D DMCMPT S ASUV("OFS",2)=ASUV("OFS")
 S ASUV("OFS")=1 D DMCMPT S ASUV("OFS",3)=ASUV("OFS")
 S ASUV("OFS")=4 D DMCMPT
 W ?64,$J((ASUMS("DMD","QTY",ASUV("OFS"))+ASUMS("DMD","QTY",ASUV("OFS",1))+ASUMS("DMD","QTY",ASUV("OFS",2))+ASUMS("DMD","QTY",ASUV("OFS",3))),5)
 W ?70,$J((ASUMS("DMD","CALL",ASUV("OFS"))+ASUMS("DMD","CALL",ASUV("OFS",1))+ASUMS("DMD","CALL",ASUV("OFS",2))+ASUMS("DMD","CALL",ASUV("OFS",3))),5)
 W ?77,"RPM",?82,$FN(ASUV("RPM"),",",1),?91,"LTM",?96,$FN(ASUMS("LTM"),",",1),?104,"SOURCE CD",?114,ASUMS("SRC")
 S ASUL("EOQVAL")=ASUMS("EOQ","QTY")*ASUMS("LPP"),ASUC("EOQVAL",5)=ASUC("EOQVAL",5)+ASUL("EOQVAL")
 W ?117,"EOV",?121,$J($FN(ASUL("EOQVAL"),",",2),12)
 Q