ASUCOPSP ; IHS/ITSC/LMH -CLOSEOUT PRINTER SPOOLING ;
;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
PRTSPLI ;EP ; print invoice to spool
I $P($G(^ASUSITE(1,0)),U,7)'["HFS" W !,"Invoice reports not being spooled to UNIX - this option not useable" Q ;DFM P1 8/28/98
S ASUU("PDST")=$P($G(^ASUSITE(1,3)),U,7),ASUU("LST")="I"
S ASUU("FILE")=$G(ASUU("FILE"))
I $G(ASUK("DT","DA")) D
.S DIR(0)="Y",DIR("A")="Do you want today's report" D ^DIR
.I 'Y D ASKDATE^ASUUDATE
E D
.D ASKDATE^ASUUDATE
I '$D(ASUK("DT","DA")) W !,"Report date not selected" Q
I ASUU("FILE")']"" S ASUU("FILE")="ASU"_ASUK("DT","MO")_ASUK("DT","DA")_".I"_$S($G(ASUL(2,"STA","CD")):ASUL(2,"STA","CD"),1:"RP")
G PRNTIT
PRTSPLS ;EP ; print standard to spool
I $P($G(^ASUSITE(1,0)),U,6)'["HFS" W !,"Standard reports not being spooled to UNIX - this option not useable" Q
S ASUU("PDST")=$P($G(^ASUSITE(1,3)),U,6),ASUU("LST")="S"
S ASUU("FILE")=$G(ASUU("FILE"))
I $G(ASUK("DT","DA")) D
.S DIR(0)="Y",DIR("A")="Do you want today's report" D ^DIR
.I 'Y D ASKDATE^ASUUDATE
E D
.D ASKDATE^ASUUDATE
I '$D(ASUK("DT","DA")) W !,"Report date not selected" Q
I ASUU("FILE")']"" S ASUU("FILE")="ASU"_ASUK("DT","MO")_ASUK("DT","DA")_".S"_$S($G(ASUL(2,"STA","CD")):ASUL(2,"STA","CD"),1:"RP")
PRNTIT ;
S ASUU("HOSTCMD")="lp"_$S($G(ASUU("PDST"))]"":" -d"_ASUU("PDST"),1:"")_" /usr/spool/uucppublic/"_ASUU("FILE") K ASUU("FILE")
W !,"Requesting report file be printed:"
HOSTCMD ;
U IO(0)
I ^%ZOSF("OS")'["MSM-UNIX" W !,"This option only available with MSM mumps running under UNIX" G KILL
W !,"Unix response to request is: ",!
S X=$$TERMINAL^%HOSTCMD(ASUU("HOSTCMD")) ;SAC exception granted 1/30/97
D PAZ^ASUURHDR
KILL ;
K ASUU,X,Y
Q
GDIR ;EP ;Get archive directory DFM P1 8/28/98
S ASUP("INV","DIR")=$P($P($G(^ASUSITE(1,0)),U,7),":",4) ;DFM P1 8/28/98
S ASUP("STD","DIR")=$P($P($G(^ASUSITE(1,0)),U,6),":",4) ;DFM P1 8/28/98
S XBDIR=$S(ASUP("STD","DIR")]"":ASUP("STD","DIR"),ASUP("INV","DIR")]"":ASUP("INV","DIR"),1:"") ;DFM P1 8/28/98
I XBDIR="" D ;WAR 7/27/99
.W !,"No reports archived to disk"
.D PAZ^ASUURHDR
Q ;DFM P1 8/28/98
BZLIST ;EP ; list archive files
D GDIR Q:XBDIR']"" S ASUU("HOSTCMD")="l -l "_XBDIR_"ASU*" D HOSTCMD ;DFM P1 8/28/98
Q
GFILE ;EP ;Get file to browse ;COMPLETE SUB ROUTINE DFM P1 8/28/98
S XBFIL="ASU" S DIR("A")="Select report type",DIR(0)="SOB^S:Standard;I:Invoice;M:Monthly",DIR("B")="S" D ^DIR S:$G(X)]"" XBFIL=XBFIL_X_"R"_$G(ASUL(2,"STA","CD"))
S DIR("A")="Enter date of report",DIR(0)="DO",DIR("B")=$G(ASUK("DT","FM")) D ^DIR S:Y XBFIL=XBFIL_"."_$E(Y,4,7)
Q
BROWSE ;EP ; brouse listings
D GDIR Q:XBDIR']"" D GFILE Q:XBFIL']"" ;DFM P1 8/28/98
D FILE^XBLM(XBDIR,XBFIL)
Q
ASUCOPSP ; IHS/ITSC/LMH -CLOSEOUT PRINTER SPOOLING ;
+1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
PRTSPLI ;EP ; print invoice to spool
+1 ;DFM P1 8/28/98
IF $PIECE($GET(^ASUSITE(1,0)),U,7)'["HFS"
WRITE !,"Invoice reports not being spooled to UNIX - this option not useable"
QUIT
+2 SET ASUU("PDST")=$PIECE($GET(^ASUSITE(1,3)),U,7)
SET ASUU("LST")="I"
+3 SET ASUU("FILE")=$GET(ASUU("FILE"))
+4 IF $GET(ASUK("DT","DA"))
Begin DoDot:1
+5 SET DIR(0)="Y"
SET DIR("A")="Do you want today's report"
DO ^DIR
+6 IF 'Y
DO ASKDATE^ASUUDATE
End DoDot:1
+7 IF '$TEST
Begin DoDot:1
+8 DO ASKDATE^ASUUDATE
End DoDot:1
+9 IF '$DATA(ASUK("DT","DA"))
WRITE !,"Report date not selected"
QUIT
+10 IF ASUU("FILE")']""
SET ASUU("FILE")="ASU"_ASUK("DT","MO")_ASUK("DT","DA")_".I"_$SELECT($GET(ASUL(2,"STA","CD")):ASUL(2,"STA","CD"),1:"RP")
+11 GOTO PRNTIT
PRTSPLS ;EP ; print standard to spool
+1 IF $PIECE($GET(^ASUSITE(1,0)),U,6)'["HFS"
WRITE !,"Standard reports not being spooled to UNIX - this option not useable"
QUIT
+2 SET ASUU("PDST")=$PIECE($GET(^ASUSITE(1,3)),U,6)
SET ASUU("LST")="S"
+3 SET ASUU("FILE")=$GET(ASUU("FILE"))
+4 IF $GET(ASUK("DT","DA"))
Begin DoDot:1
+5 SET DIR(0)="Y"
SET DIR("A")="Do you want today's report"
DO ^DIR
+6 IF 'Y
DO ASKDATE^ASUUDATE
End DoDot:1
+7 IF '$TEST
Begin DoDot:1
+8 DO ASKDATE^ASUUDATE
End DoDot:1
+9 IF '$DATA(ASUK("DT","DA"))
WRITE !,"Report date not selected"
QUIT
+10 IF ASUU("FILE")']""
SET ASUU("FILE")="ASU"_ASUK("DT","MO")_ASUK("DT","DA")_".S"_$SELECT($GET(ASUL(2,"STA","CD")):ASUL(2,"STA","CD"),1:"RP")
PRNTIT ;
+1 SET ASUU("HOSTCMD")="lp"_$SELECT($GET(ASUU("PDST"))]"":" -d"_ASUU("PDST"),1:"")_" /usr/spool/uucppublic/"_ASUU("FILE")
KILL ASUU("FILE")
+2 WRITE !,"Requesting report file be printed:"
HOSTCMD ;
+1 USE IO(0)
+2 IF ^%ZOSF("OS")'["MSM-UNIX"
WRITE !,"This option only available with MSM mumps running under UNIX"
GOTO KILL
+3 WRITE !,"Unix response to request is: ",!
+4 ;SAC exception granted 1/30/97
SET X=$$TERMINAL^%HOSTCMD(ASUU("HOSTCMD"))
+5 DO PAZ^ASUURHDR
KILL ;
+1 KILL ASUU,X,Y
+2 QUIT
GDIR ;EP ;Get archive directory DFM P1 8/28/98
+1 ;DFM P1 8/28/98
SET ASUP("INV","DIR")=$PIECE($PIECE($GET(^ASUSITE(1,0)),U,7),":",4)
+2 ;DFM P1 8/28/98
SET ASUP("STD","DIR")=$PIECE($PIECE($GET(^ASUSITE(1,0)),U,6),":",4)
+3 ;DFM P1 8/28/98
SET XBDIR=$SELECT(ASUP("STD","DIR")]"":ASUP("STD","DIR"),ASUP("INV","DIR")]"":ASUP("INV","DIR"),1:"")
+4 ;WAR 7/27/99
IF XBDIR=""
Begin DoDot:1
+5 WRITE !,"No reports archived to disk"
+6 DO PAZ^ASUURHDR
End DoDot:1
+7 ;DFM P1 8/28/98
QUIT
BZLIST ;EP ; list archive files
+1 ;DFM P1 8/28/98
DO GDIR
IF XBDIR']""
QUIT
SET ASUU("HOSTCMD")="l -l "_XBDIR_"ASU*"
DO HOSTCMD
+2 QUIT
GFILE ;EP ;Get file to browse ;COMPLETE SUB ROUTINE DFM P1 8/28/98
+1 SET XBFIL="ASU"
SET DIR("A")="Select report type"
SET DIR(0)="SOB^S:Standard;I:Invoice;M:Monthly"
SET DIR("B")="S"
DO ^DIR
IF $GET(X)]""
SET XBFIL=XBFIL_X_"R"_$GET(ASUL(2,"STA","CD"))
+2 SET DIR("A")="Enter date of report"
SET DIR(0)="DO"
SET DIR("B")=$GET(ASUK("DT","FM"))
DO ^DIR
IF Y
SET XBFIL=XBFIL_"."_$EXTRACT(Y,4,7)
+3 QUIT
BROWSE ;EP ; brouse listings
+1 ;DFM P1 8/28/98
DO GDIR
IF XBDIR']""
QUIT
DO GFILE
IF XBFIL']""
QUIT
+2 DO FILE^XBLM(XBDIR,XBFIL)
+3 QUIT