ENEXPT1 ;WIRMFO/SAB-EQUIPMENT FILE EXPORT SUMMARY RPT ;1/18/96
;;7.0;ENGINEERING;**27**;Aug 17, 1993
EN ;
W !,"This report searches the entire equipment file and may take some"
W !,"time to complete. Consider queuing this report to run after-hours."
; ask device
S %ZIS="QM" D ^%ZIS G:POP EXIT
I $D(IO("Q")) D G EXIT
. S ZTRTN="QEN^ENEXPT1",ZTDESC="Equipment File Export Summary Rpt"
. D ^%ZTLOAD,HOME^%ZIS K ZTSK
QEN ; queued entry
N ENC,END,ENDA,ENDL,ENDT,ENPG,ENSN,ENSND,ENTA,ENTL,ENY0,ENY2,ENY3
U IO
S ENSND=$$GET1^DIQ(6910,"1,",1) ; default station #
W:$E(IOST,1,2)="C-" !,"Searching Equipment File"
S ENDA=0 F S ENDA=$O(^ENG(6914,ENDA)) Q:'ENDA D
. I $E(IOST,1,2)="C-" W:'(ENDA#100) "."
. S ENY0=$G(^ENG(6914,ENDA,0))
. Q:$P(ENY0,U,4)'="NX" ; type of entry screen
. S ENY3=$G(^ENG(6914,ENDA,3))
. Q:"^4^5^"[(U_$P(ENY3,U,1)_U) ; use status screen
. S ENSN=$P($G(^ENG(6914,ENDA,9)),U,5) S:ENSN="" ENSN=ENSND ; station
. S ENY2=$G(^ENG(6914,ENDA,2))
. S ENC(ENSN)=$G(ENC(ENSN))+1
. S ENTA(ENSN)=$G(ENTA(ENSN))+$P(ENY2,U,3)
. S ENTL(ENSN)=$G(ENTL(ENSN))+$P(ENY2,U,12)
; print summary
S (END,ENPG)=0 D NOW^%DTC S Y=% D DD^%DT S ENDT=Y
S ENDL="",$P(ENDL,"-",IOM)=""
D HD
S (ENC,ENTA,ENTL)=0
S ENSN="" F S ENSN=$O(ENC(ENSN)) Q:ENSN="" D Q:END
. I $Y+4>IOSL D HD Q:END
. W !,?5,ENSN,?15,$J(ENC(ENSN),6),?28,$J($FN($G(ENTA(ENSN)),",",2),16),?48,$J($FN($G(ENTL(ENSN)),",",2),16)
. S ENC=ENC+ENC(ENSN)
. S ENTA=ENTA+$G(ENTA(ENSN))
. S ENTL=ENTL+$G(ENTL(ENSN))
I 'END D
. W !,?5,"-------",?15,"----------",?28,"-----------------",?48,"----------------"
. W !,?5,"TOTAL:",?15,$J(ENC,6),?28,$J($FN(ENTA,",",2),16),?48,$J($FN(ENTL,",",2),16)
. I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
D ^%ZISC
EXIT I $D(ZTQUEUED) S ZTREQ="@"
K DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
Q
HD ; header
I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1,END=1 Q
I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
I $E(IOST,1,2)="C-"!ENPG W @IOF
S ENPG=ENPG+1
W !,"EQUIPMENT FILE EXPORT SUMMARY RPT",?48,ENDT,?72,"page ",ENPG
W !!,?5,"STATION",?15,"ITEM COUNT",?28,"TOTAL ASSET VALUE"
W ?48,"TOTAL LEASE COST"
W !,ENDL
Q
ASK ; description of selection criteria and set up of summary report prompt
; called by ENEXPT
W !!,"The Equipment File Export transmits equipment data to the National"
W !,"Engineering Service Center (NESC) in St. Louis."
W !,"Equipment which meets the following criteria will be selected:"
W !," TYPE OF ENTRY equals ""NX"""
W !," USE STATUS not equal ""TURNED IN"" or ""LOST OR STOLEN""",!
S DIR(0)="Y",DIR("A")="Would you like a summary report",DIR("B")="YES"
S DIR("?",1)="Enter YES to generate a summary report of equipment that"
S DIR("?")="will be included in the transmission."
Q
;ENEXPT1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENEXPT1 2830 printed Oct 16, 2024@17:54:04 Page 2
ENEXPT1 ;WIRMFO/SAB-EQUIPMENT FILE EXPORT SUMMARY RPT ;1/18/96
+1 ;;7.0;ENGINEERING;**27**;Aug 17, 1993
EN ;
+1 WRITE !,"This report searches the entire equipment file and may take some"
+2 WRITE !,"time to complete. Consider queuing this report to run after-hours."
+3 ; ask device
+4 SET %ZIS="QM"
DO ^%ZIS
if POP
GOTO EXIT
+5 IF $DATA(IO("Q"))
Begin DoDot:1
+6 SET ZTRTN="QEN^ENEXPT1"
SET ZTDESC="Equipment File Export Summary Rpt"
+7 DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
End DoDot:1
GOTO EXIT
QEN ; queued entry
+1 NEW ENC,END,ENDA,ENDL,ENDT,ENPG,ENSN,ENSND,ENTA,ENTL,ENY0,ENY2,ENY3
+2 USE IO
+3 ; default station #
SET ENSND=$$GET1^DIQ(6910,"1,",1)
+4 if $EXTRACT(IOST,1,2)="C-"
WRITE !,"Searching Equipment File"
+5 SET ENDA=0
FOR
SET ENDA=$ORDER(^ENG(6914,ENDA))
if 'ENDA
QUIT
Begin DoDot:1
+6 IF $EXTRACT(IOST,1,2)="C-"
if '(ENDA#100)
WRITE "."
+7 SET ENY0=$GET(^ENG(6914,ENDA,0))
+8 ; type of entry screen
if $PIECE(ENY0,U,4)'="NX"
QUIT
+9 SET ENY3=$GET(^ENG(6914,ENDA,3))
+10 ; use status screen
if "^4^5^"[(U_$PIECE(ENY3,U,1)_U)
QUIT
+11 ; station
SET ENSN=$PIECE($GET(^ENG(6914,ENDA,9)),U,5)
if ENSN=""
SET ENSN=ENSND
+12 SET ENY2=$GET(^ENG(6914,ENDA,2))
+13 SET ENC(ENSN)=$GET(ENC(ENSN))+1
+14 SET ENTA(ENSN)=$GET(ENTA(ENSN))+$PIECE(ENY2,U,3)
+15 SET ENTL(ENSN)=$GET(ENTL(ENSN))+$PIECE(ENY2,U,12)
End DoDot:1
+16 ; print summary
+17 SET (END,ENPG)=0
DO NOW^%DTC
SET Y=%
DO DD^%DT
SET ENDT=Y
+18 SET ENDL=""
SET $PIECE(ENDL,"-",IOM)=""
+19 DO HD
+20 SET (ENC,ENTA,ENTL)=0
+21 SET ENSN=""
FOR
SET ENSN=$ORDER(ENC(ENSN))
if ENSN=""
QUIT
Begin DoDot:1
+22 IF $Y+4>IOSL
DO HD
if END
QUIT
+23 WRITE !,?5,ENSN,?15,$JUSTIFY(ENC(ENSN),6),?28,$JUSTIFY($FNUMBER($GET(ENTA(ENSN)),",",2),16),?48,$JUSTIFY($FNUMBER($GET(ENTL(ENSN)),",",2),16)
+24 SET ENC=ENC+ENC(ENSN)
+25 SET ENTA=ENTA+$GET(ENTA(ENSN))
+26 SET ENTL=ENTL+$GET(ENTL(ENSN))
End DoDot:1
if END
QUIT
+27 IF 'END
Begin DoDot:1
+28 WRITE !,?5,"-------",?15,"----------",?28,"-----------------",?48,"----------------"
+29 WRITE !,?5,"TOTAL:",?15,$JUSTIFY(ENC,6),?28,$JUSTIFY($FNUMBER(ENTA,",",2),16),?48,$JUSTIFY($FNUMBER(ENTL,",",2),16)
+30 IF $EXTRACT(IOST,1,2)="C-"
SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
+31 DO ^%ZISC
EXIT IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+1 KILL DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+2 QUIT
HD ; header
+1 IF $DATA(ZTQUEUED)
IF $$S^%ZTLOAD
SET ZTSTOP=1
SET END=1
QUIT
+2 IF $EXTRACT(IOST,1,2)="C-"
IF ENPG
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF 'Y
SET END=1
QUIT
+3 IF $EXTRACT(IOST,1,2)="C-"!ENPG
WRITE @IOF
+4 SET ENPG=ENPG+1
+5 WRITE !,"EQUIPMENT FILE EXPORT SUMMARY RPT",?48,ENDT,?72,"page ",ENPG
+6 WRITE !!,?5,"STATION",?15,"ITEM COUNT",?28,"TOTAL ASSET VALUE"
+7 WRITE ?48,"TOTAL LEASE COST"
+8 WRITE !,ENDL
+9 QUIT
ASK ; description of selection criteria and set up of summary report prompt
+1 ; called by ENEXPT
+2 WRITE !!,"The Equipment File Export transmits equipment data to the National"
+3 WRITE !,"Engineering Service Center (NESC) in St. Louis."
+4 WRITE !,"Equipment which meets the following criteria will be selected:"
+5 WRITE !," TYPE OF ENTRY equals ""NX"""
+6 WRITE !," USE STATUS not equal ""TURNED IN"" or ""LOST OR STOLEN""",!
+7 SET DIR(0)="Y"
SET DIR("A")="Would you like a summary report"
SET DIR("B")="YES"
+8 SET DIR("?",1)="Enter YES to generate a summary report of equipment that"
+9 SET DIR("?")="will be included in the transmission."
+10 QUIT
+11 ;ENEXPT1