ASUCORPX ; IHS/ITSC/LMH -PROCESS REPORT EXTRACTS ;
;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
;This routine controls 'Compute' or 'Sort' step in preparing extracts
;for all reports created for any daily (including monthly and yearly)
;update.
D DATE^ASUUDATE,TIME^ASUUDATE
S ASURX="W !,""S.A.M.S Report Extracts build Begun "_ASUK("DT","TIME")_"""" D ^ASUUPLOG
D:$G(ASUN("TYP"))']"" ^ASUURANG
S ASUP("CKX")=+($G(ASUP("CKX")))
I ASUP("CKX")=0 S ASUP("CKX")=1 D SETSX^ASUCOSTS
I ASUP("CKX")=1 D
.S ASUP("CKX")=6 D SETSX^ASUCOSTS
I ASUP("CKX")=6 D
.S ASURX="W !?5,""Report 10V extracts building""" D ^ASUUPLOG
.D CMPT^ASURD10V S ASUP("CKX")=7 D SETSX^ASUCOSTS
I ASUP("CKX")=7 D
.S ASURX="W !?5,""Report 7A extracts building""" D ^ASUUPLOG
.D CMPT^ASURD07A S ASUP("CKX")=8 D SETSX^ASUCOSTS
I ASUP("CKX")=8 D
.S ASURX="W !?5,""Report 08 extracts building""" D ^ASUUPLOG
.D CMPT^ASURD08P S ASUP("CKX")=9 D SETSX^ASUCOSTS
I ASUP("CKX")=9 D
.S ASURX="W !?5,""Report 09 extracts building""" D ^ASUUPLOG
.D CMPT^ASURD09P S ASUP("CKX")=10 D SETSX^ASUCOSTS
I ASUP("CKX")=10 D
.S ASURX="W !?5,""Report 10 extracts building""" D ^ASUUPLOG
.D CMPT^ASURD10P S ASUP("CKX")=11 D SETSX^ASUCOSTS
I ASUP("CKX")=11 D
.S ASURX="W !?5,""Report 11 extracts building""" D ^ASUUPLOG
.D CMPT^ASURD11P S ASUP("CKX")=13
I $G(ASUD("R13","SEL")) D
.S ASURX="W !?5,""Report 13 extracts building""" D ^ASUUPLOG
.I ASUP("CKX")=13 D CMPT^ASURD13P S ASUP("CKX")=14 D SETSX^ASUCOSTS
E D
.I ASUP("CKX")=13 S ASUP("CKX")=70 D SETSX^ASUCOSTS
I ASUP("CKX")=70 D
.S ASURX="W !?5,""Report 70 extracts building""" D ^ASUUPLOG
.D ^ASURD700 S ASUP("CKX")=71 D SETSX^ASUCOSTS
I ASUP("CKX")=71 D
.S ASURX="W !?5,""Report 71 extracts building""" D ^ASUUPLOG
.D CMPT^ASURD71P S ASUP("CKX")=72 D SETSX^ASUCOSTS
I ASUP("CKX")=72 D
.D CMPT^ASURD72P S ASUP("CKX")=73 D SETSX^ASUCOSTS
.S ASURX="W !?5,""Report 72 extracts building""" D ^ASUUPLOG
I ASUP("CKX")=73 D
.S ASURX="W !?5,""Report 73 extracts building""" D ^ASUUPLOG
.D CMPT^ASURD73P S ASUP("CKX")=74 D SETSX^ASUCOSTS
I $G(ASUP("TYP"))=1 D ;Monthly reports
.I ASUP("CKX")=74 D
..S ASURX="W !?5,""Report 74 extracts building""" D ^ASUUPLOG
..D CMPT^ASURM74P S ASUP("CKX")=76,ASUF("RPT75")=1 D SETSX^ASUCOSTS
.I ASUP("CKX")=76 D
..S ASURX="W !?5,""Report 76 extracts building""" D ^ASUUPLOG
..D ^ASURO76D S ASUP("CKX")=79 D SETSX^ASUCOSTS
.I ASUP("CKX")=79 D
..S ASURX="W !?5,""Report 79 extracts building""" D ^ASUUPLOG
..D CMPT^ASURM79P S ASUP("CKX")=83 D SETSX^ASUCOSTS
.I ASUP("CKX")=83 D
..S ASURX="W !?5,""Report 83 extracts building""" D ^ASUUPLOG
..D CMPT^ASURM83P S ASUP("CKX")=90 D SETSX^ASUCOSTS
.I ASUP("CKX")=90 D
..S ASUP("CKX")=0 D SETSX^ASUCOSTS
E D
.I ASUP("CKX")=74 D
..S ASUP("CKX")=0 D SETSX^ASUCOSTS
I ASUP("CKX")'=0 S ASUP("HLT")=1
D DATE^ASUUDATE,TIME^ASUUDATE
S ASURX="W !,""S.A.M.S Report Extracts Build Ended "_ASUK("DT","TIME")_"""" D ^ASUUPLOG
Q
ASUCORPX ; IHS/ITSC/LMH -PROCESS REPORT EXTRACTS ;
+1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
+2 ;This routine controls 'Compute' or 'Sort' step in preparing extracts
+3 ;for all reports created for any daily (including monthly and yearly)
+4 ;update.
+5 DO DATE^ASUUDATE
DO TIME^ASUUDATE
+6 SET ASURX="W !,""S.A.M.S Report Extracts build Begun "_ASUK("DT","TIME")_""""
DO ^ASUUPLOG
+7 IF $GET(ASUN("TYP"))']""
DO ^ASUURANG
+8 SET ASUP("CKX")=+($GET(ASUP("CKX")))
+9 IF ASUP("CKX")=0
SET ASUP("CKX")=1
DO SETSX^ASUCOSTS
+10 IF ASUP("CKX")=1
Begin DoDot:1
+11 SET ASUP("CKX")=6
DO SETSX^ASUCOSTS
End DoDot:1
+12 IF ASUP("CKX")=6
Begin DoDot:1
+13 SET ASURX="W !?5,""Report 10V extracts building"""
DO ^ASUUPLOG
+14 DO CMPT^ASURD10V
SET ASUP("CKX")=7
DO SETSX^ASUCOSTS
End DoDot:1
+15 IF ASUP("CKX")=7
Begin DoDot:1
+16 SET ASURX="W !?5,""Report 7A extracts building"""
DO ^ASUUPLOG
+17 DO CMPT^ASURD07A
SET ASUP("CKX")=8
DO SETSX^ASUCOSTS
End DoDot:1
+18 IF ASUP("CKX")=8
Begin DoDot:1
+19 SET ASURX="W !?5,""Report 08 extracts building"""
DO ^ASUUPLOG
+20 DO CMPT^ASURD08P
SET ASUP("CKX")=9
DO SETSX^ASUCOSTS
End DoDot:1
+21 IF ASUP("CKX")=9
Begin DoDot:1
+22 SET ASURX="W !?5,""Report 09 extracts building"""
DO ^ASUUPLOG
+23 DO CMPT^ASURD09P
SET ASUP("CKX")=10
DO SETSX^ASUCOSTS
End DoDot:1
+24 IF ASUP("CKX")=10
Begin DoDot:1
+25 SET ASURX="W !?5,""Report 10 extracts building"""
DO ^ASUUPLOG
+26 DO CMPT^ASURD10P
SET ASUP("CKX")=11
DO SETSX^ASUCOSTS
End DoDot:1
+27 IF ASUP("CKX")=11
Begin DoDot:1
+28 SET ASURX="W !?5,""Report 11 extracts building"""
DO ^ASUUPLOG
+29 DO CMPT^ASURD11P
SET ASUP("CKX")=13
End DoDot:1
+30 IF $GET(ASUD("R13","SEL"))
Begin DoDot:1
+31 SET ASURX="W !?5,""Report 13 extracts building"""
DO ^ASUUPLOG
+32 IF ASUP("CKX")=13
DO CMPT^ASURD13P
SET ASUP("CKX")=14
DO SETSX^ASUCOSTS
End DoDot:1
+33 IF '$TEST
Begin DoDot:1
+34 IF ASUP("CKX")=13
SET ASUP("CKX")=70
DO SETSX^ASUCOSTS
End DoDot:1
+35 IF ASUP("CKX")=70
Begin DoDot:1
+36 SET ASURX="W !?5,""Report 70 extracts building"""
DO ^ASUUPLOG
+37 DO ^ASURD700
SET ASUP("CKX")=71
DO SETSX^ASUCOSTS
End DoDot:1
+38 IF ASUP("CKX")=71
Begin DoDot:1
+39 SET ASURX="W !?5,""Report 71 extracts building"""
DO ^ASUUPLOG
+40 DO CMPT^ASURD71P
SET ASUP("CKX")=72
DO SETSX^ASUCOSTS
End DoDot:1
+41 IF ASUP("CKX")=72
Begin DoDot:1
+42 DO CMPT^ASURD72P
SET ASUP("CKX")=73
DO SETSX^ASUCOSTS
+43 SET ASURX="W !?5,""Report 72 extracts building"""
DO ^ASUUPLOG
End DoDot:1
+44 IF ASUP("CKX")=73
Begin DoDot:1
+45 SET ASURX="W !?5,""Report 73 extracts building"""
DO ^ASUUPLOG
+46 DO CMPT^ASURD73P
SET ASUP("CKX")=74
DO SETSX^ASUCOSTS
End DoDot:1
+47 ;Monthly reports
IF $GET(ASUP("TYP"))=1
Begin DoDot:1
+48 IF ASUP("CKX")=74
Begin DoDot:2
+49 SET ASURX="W !?5,""Report 74 extracts building"""
DO ^ASUUPLOG
+50 DO CMPT^ASURM74P
SET ASUP("CKX")=76
SET ASUF("RPT75")=1
DO SETSX^ASUCOSTS
End DoDot:2
+51 IF ASUP("CKX")=76
Begin DoDot:2
+52 SET ASURX="W !?5,""Report 76 extracts building"""
DO ^ASUUPLOG
+53 DO ^ASURO76D
SET ASUP("CKX")=79
DO SETSX^ASUCOSTS
End DoDot:2
+54 IF ASUP("CKX")=79
Begin DoDot:2
+55 SET ASURX="W !?5,""Report 79 extracts building"""
DO ^ASUUPLOG
+56 DO CMPT^ASURM79P
SET ASUP("CKX")=83
DO SETSX^ASUCOSTS
End DoDot:2
+57 IF ASUP("CKX")=83
Begin DoDot:2
+58 SET ASURX="W !?5,""Report 83 extracts building"""
DO ^ASUUPLOG
+59 DO CMPT^ASURM83P
SET ASUP("CKX")=90
DO SETSX^ASUCOSTS
End DoDot:2
+60 IF ASUP("CKX")=90
Begin DoDot:2
+61 SET ASUP("CKX")=0
DO SETSX^ASUCOSTS
End DoDot:2
End DoDot:1
+62 IF '$TEST
Begin DoDot:1
+63 IF ASUP("CKX")=74
Begin DoDot:2
+64 SET ASUP("CKX")=0
DO SETSX^ASUCOSTS
End DoDot:2
End DoDot:1
+65 IF ASUP("CKX")'=0
SET ASUP("HLT")=1
+66 DO DATE^ASUUDATE
DO TIME^ASUUDATE
+67 SET ASURX="W !,""S.A.M.S Report Extracts Build Ended "_ASUK("DT","TIME")_""""
DO ^ASUUPLOG
+68 QUIT