[613] | 1 | ENEXPT1 ;WIRMFO/SAB-EQUIPMENT FILE EXPORT SUMMARY RPT ;1/18/96
|
---|
| 2 | ;;7.0;ENGINEERING;**27**;Aug 17, 1993
|
---|
| 3 | EN ;
|
---|
| 4 | W !,"This report searches the entire equipment file and may take some"
|
---|
| 5 | W !,"time to complete. Consider queuing this report to run after-hours."
|
---|
| 6 | ; ask device
|
---|
| 7 | S %ZIS="QM" D ^%ZIS G:POP EXIT
|
---|
| 8 | I $D(IO("Q")) D G EXIT
|
---|
| 9 | . S ZTRTN="QEN^ENEXPT1",ZTDESC="Equipment File Export Summary Rpt"
|
---|
| 10 | . D ^%ZTLOAD,HOME^%ZIS K ZTSK
|
---|
| 11 | QEN ; queued entry
|
---|
| 12 | N ENC,END,ENDA,ENDL,ENDT,ENPG,ENSN,ENSND,ENTA,ENTL,ENY0,ENY2,ENY3
|
---|
| 13 | U IO
|
---|
| 14 | S ENSND=$$GET1^DIQ(6910,"1,",1) ; default station #
|
---|
| 15 | W:$E(IOST,1,2)="C-" !,"Searching Equipment File"
|
---|
| 16 | S ENDA=0 F S ENDA=$O(^ENG(6914,ENDA)) Q:'ENDA D
|
---|
| 17 | . I $E(IOST,1,2)="C-" W:'(ENDA#100) "."
|
---|
| 18 | . S ENY0=$G(^ENG(6914,ENDA,0))
|
---|
| 19 | . Q:$P(ENY0,U,4)'="NX" ; type of entry screen
|
---|
| 20 | . S ENY3=$G(^ENG(6914,ENDA,3))
|
---|
| 21 | . Q:"^4^5^"[(U_$P(ENY3,U,1)_U) ; use status screen
|
---|
| 22 | . S ENSN=$P($G(^ENG(6914,ENDA,9)),U,5) S:ENSN="" ENSN=ENSND ; station
|
---|
| 23 | . S ENY2=$G(^ENG(6914,ENDA,2))
|
---|
| 24 | . S ENC(ENSN)=$G(ENC(ENSN))+1
|
---|
| 25 | . S ENTA(ENSN)=$G(ENTA(ENSN))+$P(ENY2,U,3)
|
---|
| 26 | . S ENTL(ENSN)=$G(ENTL(ENSN))+$P(ENY2,U,12)
|
---|
| 27 | ; print summary
|
---|
| 28 | S (END,ENPG)=0 D NOW^%DTC S Y=% D DD^%DT S ENDT=Y
|
---|
| 29 | S ENDL="",$P(ENDL,"-",IOM)=""
|
---|
| 30 | D HD
|
---|
| 31 | S (ENC,ENTA,ENTL)=0
|
---|
| 32 | S ENSN="" F S ENSN=$O(ENC(ENSN)) Q:ENSN="" D Q:END
|
---|
| 33 | . I $Y+4>IOSL D HD Q:END
|
---|
| 34 | . W !,?5,ENSN,?15,$J(ENC(ENSN),6),?28,$J($FN($G(ENTA(ENSN)),",",2),16),?48,$J($FN($G(ENTL(ENSN)),",",2),16)
|
---|
| 35 | . S ENC=ENC+ENC(ENSN)
|
---|
| 36 | . S ENTA=ENTA+$G(ENTA(ENSN))
|
---|
| 37 | . S ENTL=ENTL+$G(ENTL(ENSN))
|
---|
| 38 | I 'END D
|
---|
| 39 | . W !,?5,"-------",?15,"----------",?28,"-----------------",?48,"----------------"
|
---|
| 40 | . W !,?5,"TOTAL:",?15,$J(ENC,6),?28,$J($FN(ENTA,",",2),16),?48,$J($FN(ENTL,",",2),16)
|
---|
| 41 | . I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
|
---|
| 42 | D ^%ZISC
|
---|
| 43 | EXIT I $D(ZTQUEUED) S ZTREQ="@"
|
---|
| 44 | K DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
|
---|
| 45 | Q
|
---|
| 46 | HD ; header
|
---|
| 47 | I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1,END=1 Q
|
---|
| 48 | I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
|
---|
| 49 | I $E(IOST,1,2)="C-"!ENPG W @IOF
|
---|
| 50 | S ENPG=ENPG+1
|
---|
| 51 | W !,"EQUIPMENT FILE EXPORT SUMMARY RPT",?48,ENDT,?72,"page ",ENPG
|
---|
| 52 | W !!,?5,"STATION",?15,"ITEM COUNT",?28,"TOTAL ASSET VALUE"
|
---|
| 53 | W ?48,"TOTAL LEASE COST"
|
---|
| 54 | W !,ENDL
|
---|
| 55 | Q
|
---|
| 56 | ASK ; description of selection criteria and set up of summary report prompt
|
---|
| 57 | ; called by ENEXPT
|
---|
| 58 | W !!,"The Equipment File Export transmits equipment data to the National"
|
---|
| 59 | W !,"Engineering Service Center (NESC) in St. Louis."
|
---|
| 60 | W !,"Equipment which meets the following criteria will be selected:"
|
---|
| 61 | W !," TYPE OF ENTRY equals ""NX"""
|
---|
| 62 | W !," USE STATUS not equal ""TURNED IN"" or ""LOST OR STOLEN""",!
|
---|
| 63 | S DIR(0)="Y",DIR("A")="Would you like a summary report",DIR("B")="YES"
|
---|
| 64 | S DIR("?",1)="Enter YES to generate a summary report of equipment that"
|
---|
| 65 | S DIR("?")="will be included in the transmission."
|
---|
| 66 | Q
|
---|
| 67 | ;ENEXPT1
|
---|