ASURDPRT ; IHS/ITSC/LMH -DAILY UPDATE REPORTS DRIVER ;
;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
;This routine controls the sequence of printing of all reports created
;during a daily (including monthly and yearly) update run.
K IO("Q")
S XBRP="ST^ASURDPRT"
K XBRC
S XBRX="STAT^ASUPUKIL"
S XBIOP=ASUK("SRPT","IOP")
S ASUK("PTR")="SRPT"
D Q^ASUUZIS
IV ;EP; TASKMAN
;I $G(ASUP("RE*"))=2 S:ASUP("CKP")=6 ASUP("CKP")=7 Q
S ASUP("CKP")=$G(ASUP("CKP")) I ASUP("CKP")]"",ASUP("CKP")'=6 Q
S ASUK("PTR")="IRPT",ASUK("PTRSEL")=1
S ASUK("PTR-Q")=ASUK("IRPT","Q")
S IOP=ASUK("IRPT","IOP")
I ASUK("PTR-Q") D
.I $D(IOF),IOF']"" S IOP=ASUK(ASUK("PTR"),"IOF")
E D
.I ASUK(ASUK("PTR"),"ION")["HOST"!(ASUK(ASUK("PTR"),"ION")["HFS") D
..S IOPAR=ASUK(ASUK("PTR"),"IOPAR")
.E D
..I ASUP("AIV")=0 Q
..W !!,"Mount 8 1/2 X 11 Paper on Printer ",ASUK("IRPT","ION")
..K DIR S DIR(0)="E",DTIME=2 D ^DIR S DTIME=$$DTIME^XUP(DUZ) Q:$D(DUOUT)
..I $D(DTOUT) K DTOUT W !,"Timed out -assumed forms were correctly mounted"
.D O^ASUUZIS
Q:$D(DTOUT) Q:$D(DUOUT) I $D(POP) Q:POP
D PSER^ASURDINV
Q
ST ;EP; TASKAMN DOUBLE OR SINGLE QUEING
S ASUP("CKP")=$G(ASUP("CKP"))
I ASUP("CKP")]"",ASUP("CKP")'=7 Q
S ASUK("PTR")="SRPT",ASUK("PTRSEL")=1
S ASUK("PTR-Q")=ASUK("SRPT","Q")
S IOP=ASUK("SRPT","IOP")
I ASUK("PTR-Q") D
.I $D(IOF),IOF']"" S IOP=ASUK(ASUK("PTR"),"IOF")
E D
.I ASUK(ASUK("PTR"),"ION")["HOST"!(ASUK(ASUK("PTR"),"ION")["HFS") D
..S IOPAR=ASUK(ASUK("PTR"),"IOPAR")
.E D
..I ASUP("AST")=0 Q
..W !!,"Mount Standard Computer Paper on Printer ",ASUK("SRPT","ION")
..K DIR S DIR(0)="E",DTIME=2 D ^DIR S DTIME=$$DTIME^XUP(DUZ) Q:$D(DUOUT)
..I $D(DTOUT) K DTOUT W !,"Timed out -assumed forms were correctly mounted"
.D O^ASUUZIS
Q:$D(DTOUT) Q:$D(DUOUT) Q:POP
D PSER^ASURDSTD,SETSTAT^ASUCOSTS
I ASUP("CKS")=0 S ASUP("CKP")=0 D SETSTAT^ASUCOSTS
Q
ASURDPRT ; IHS/ITSC/LMH -DAILY UPDATE REPORTS DRIVER ;
+1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
+2 ;This routine controls the sequence of printing of all reports created
+3 ;during a daily (including monthly and yearly) update run.
+4 KILL IO("Q")
+5 SET XBRP="ST^ASURDPRT"
+6 KILL XBRC
+7 SET XBRX="STAT^ASUPUKIL"
+8 SET XBIOP=ASUK("SRPT","IOP")
+9 SET ASUK("PTR")="SRPT"
+10 DO Q^ASUUZIS
IV ;EP; TASKMAN
+1 ;I $G(ASUP("RE*"))=2 S:ASUP("CKP")=6 ASUP("CKP")=7 Q
+2 SET ASUP("CKP")=$GET(ASUP("CKP"))
IF ASUP("CKP")]""
IF ASUP("CKP")'=6
QUIT
+3 SET ASUK("PTR")="IRPT"
SET ASUK("PTRSEL")=1
+4 SET ASUK("PTR-Q")=ASUK("IRPT","Q")
+5 SET IOP=ASUK("IRPT","IOP")
+6 IF ASUK("PTR-Q")
Begin DoDot:1
+7 IF $DATA(IOF)
IF IOF']""
SET IOP=ASUK(ASUK("PTR"),"IOF")
End DoDot:1
+8 IF '$TEST
Begin DoDot:1
+9 IF ASUK(ASUK("PTR"),"ION")["HOST"!(ASUK(ASUK("PTR"),"ION")["HFS")
Begin DoDot:2
+10 SET IOPAR=ASUK(ASUK("PTR"),"IOPAR")
End DoDot:2
+11 IF '$TEST
Begin DoDot:2
+12 IF ASUP("AIV")=0
QUIT
+13 WRITE !!,"Mount 8 1/2 X 11 Paper on Printer ",ASUK("IRPT","ION")
+14 KILL DIR
SET DIR(0)="E"
SET DTIME=2
DO ^DIR
SET DTIME=$$DTIME^XUP(DUZ)
IF $DATA(DUOUT)
QUIT
+15 IF $DATA(DTOUT)
KILL DTOUT
WRITE !,"Timed out -assumed forms were correctly mounted"
End DoDot:2
+16 DO O^ASUUZIS
End DoDot:1
+17 IF $DATA(DTOUT)
QUIT
IF $DATA(DUOUT)
QUIT
IF $DATA(POP)
IF POP
QUIT
+18 DO PSER^ASURDINV
+19 QUIT
ST ;EP; TASKAMN DOUBLE OR SINGLE QUEING
+1 SET ASUP("CKP")=$GET(ASUP("CKP"))
+2 IF ASUP("CKP")]""
IF ASUP("CKP")'=7
QUIT
+3 SET ASUK("PTR")="SRPT"
SET ASUK("PTRSEL")=1
+4 SET ASUK("PTR-Q")=ASUK("SRPT","Q")
+5 SET IOP=ASUK("SRPT","IOP")
+6 IF ASUK("PTR-Q")
Begin DoDot:1
+7 IF $DATA(IOF)
IF IOF']""
SET IOP=ASUK(ASUK("PTR"),"IOF")
End DoDot:1
+8 IF '$TEST
Begin DoDot:1
+9 IF ASUK(ASUK("PTR"),"ION")["HOST"!(ASUK(ASUK("PTR"),"ION")["HFS")
Begin DoDot:2
+10 SET IOPAR=ASUK(ASUK("PTR"),"IOPAR")
End DoDot:2
+11 IF '$TEST
Begin DoDot:2
+12 IF ASUP("AST")=0
QUIT
+13 WRITE !!,"Mount Standard Computer Paper on Printer ",ASUK("SRPT","ION")
+14 KILL DIR
SET DIR(0)="E"
SET DTIME=2
DO ^DIR
SET DTIME=$$DTIME^XUP(DUZ)
IF $DATA(DUOUT)
QUIT
+15 IF $DATA(DTOUT)
KILL DTOUT
WRITE !,"Timed out -assumed forms were correctly mounted"
End DoDot:2
+16 DO O^ASUUZIS
End DoDot:1
+17 IF $DATA(DTOUT)
QUIT
IF $DATA(DUOUT)
QUIT
IF POP
QUIT
+18 DO PSER^ASURDSTD
DO SETSTAT^ASUCOSTS
+19 IF ASUP("CKS")=0
SET ASUP("CKP")=0
DO SETSTAT^ASUCOSTS
+20 QUIT