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

ASURM77P.m

Go to the documentation of this file.
ASURM77P ; IHS/ITSC/LMH -ANALYSIS OF ISSUES BY SUB STATION ; 
 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
 ;This routine formats and prints report 77, Analysis of Issues by
 ;Sub Station Report.
EN ;EP;PRIMARY ENTRY POINT FOR REPORT 77
 Q  ;WAR 5/21/99
 I '$D(IO) D HOME^%ZIS
 I '$D(DUZ(2)) W !,"Report must be run from Kernel option" Q
 I '$D(ASUL(1,"AR","AP")) D SETAREA^ASULARST
 S ASUK("PTRSEL")=$G(ASUK("PTRSEL")) I ASUK("PTRSEL")]"" G PSER
 S ZTRTN="PSER^ASURM77P",ZTDESC="SAMS RPT 77" D O^ASUUZIS
 I POP S IOP=$I D ^%ZIS Q
 I ASUK(ASUK("PTR"),"Q") Q
PSER ;EP;FOR TASKMAN QUEUE OF PRINT
 D U^ASUUZIS
 S ASUV("RPT")="R77",ASUC("PG")=""
 D EN1
 I ($D(ASUK("DT"))#10)'=1 D DATE^ASUUDATE
 D P1^ASURO76P S (ASUX("SST"),ASUX("USR"),ASUX("ACC"))=""
 F  S ASUX("SST")=$O(^XTMP("ASUR","R76",ASUX("SST"))) Q:ASUX("SST")=""  D  Q:$D(DUOUT)
 .F  S ASUX("USR")=$O(^XTMP("ASUR","R76",ASUX("SST"),ASUX("USR"))) Q:'ASUX("USR")  D
 ..S ASUX("REQ")=ASUX("SST")_$E(ASUX("USR"),3,6)
 ..F ASUX("ACC")=0:0 S ASUX("ACC")=$O(^XTMP("ASUR","R76",ASUX("SST"),ASUX("USR"),ASUX("ACC"))) Q:'ASUX("ACC")  S ASUC("TR")=^(ASUX("ACC")) D
 ...F ASUV("FIELD")=2:1:22 D
 ....S ASUC(ASUV("FIELD"),1,ASUX("ACC"))=ASUC(ASUV("FIELD"),1,ASUX("ACC"))+$P(ASUC("TR"),U,ASUV("FIELD"))
 .D SBK,P3^ASURO76P
 .D HEADER^ASURO76P Q:$D(DUOUT)
 .D P1^ASURO76P,EN1
 D ZAP0^ASURO76P
K ;
 D PAZ^ASUURHDR
 I ASUK("PTRSEL")]"" W @IOF Q
 D C^ASUUZIS
 Q
SBK ;
 F ASUV("ACC")=1,2,3,4,5,9 D
 .F ASUV("FIELD")=2:1:22 D
 ..S ASUC(ASUV("FIELD"),0,ASUV("ACC"))=ASUC(ASUV("FIELD"),1,ASUV("ACC"))
 Q
EN1 ;Initialize Array for accumulating data from extracts
 F ASUV("ACC")=1,2,3,4,5,9 D
 .F ASUV("FIELD")=2:1:26 D
 ..S ASUC(ASUV("FIELD"),1,ASUV("ACC"))=0
 Q