[628] | 1 | ENLIB ;(WASH ISC)/JED/SAW/DH-Package Utilities ;2.17.98
|
---|
| 2 | ;;7.0;ENGINEERING;**35,45,47,48**;Aug 17, 1993
|
---|
| 3 | ;
|
---|
| 4 | ENOUT ;ENGINEERING OUTPUT PORT SELECTOR DLM/WASH; 27 JUL 84 8:01 AM
|
---|
| 5 | DEV ;DEVICE SELECTION ;devices may be suppressed from listing
|
---|
| 6 | W !!,"Select output device: ",!,?3,"RETURN",?13,"DISPLAY"
|
---|
| 7 | I '$D(ENXP("NOLIST")) S ENOT="" F S ENOT=$O(^DIC(6910.1,"B",ENOT)) Q:ENOT="" S ENOT(0)=$O(^(ENOT,0)) D:ENOT(0)
|
---|
| 8 | . I '$P(^DIC(6910.1,ENOT(0),0),U,4) W !,?3,$P(^(0),U,2),?13,$P(^(0),U,3)
|
---|
| 9 | K ENOT,IO("Q") W ! S %ZIS("B")="HOME",%ZIS="MQ" D ^%ZIS Q
|
---|
| 10 | DEVSHOW ;DEVICE SELECTION
|
---|
| 11 | W !!,"Select output device: ",!,?3,"RETURN",?13,"DISPLAY"
|
---|
| 12 | S ENOT="" F I=1:1 S ENOT=$O(^DIC(6910.1,"B",ENOT)) Q:ENOT="" W !,?3,$P(^DIC(6910.1,$O(^DIC(6910.1,"B",ENOT,"")),0),"^",2),?13,$P(^(0),"^",3)
|
---|
| 13 | K ENOT,I W ! S %ZIS("B")="HOME" Q
|
---|
| 14 | ;
|
---|
| 15 | ;SAW/WASH ; 28 AUG 84 6:14 pm
|
---|
| 16 | FYS ;SELECT FISCAL YEAR AND QUARTER THEN SELECT DEVICE
|
---|
| 17 | S ENFYT("I")=$E(DT,1,3) I $E(DT,4,7)>1000 S ENFYT("I")=ENFYT("I")+1
|
---|
| 18 | S I=+$E(DT,4,5),ENFYT=$E(ENFYT("I"),2,3),ENQTT=$P("2^2^2^3^3^3^4^4^4^1^1^1","^",I)
|
---|
| 19 | FYS1 W !,"SELECT FISCAL YEAR: ",ENFYT,"//" R ENFY:DTIME G EXIT:'$T S:ENFY="" ENFY=ENFYT G:ENFY="^" EXIT I ENFY'?2N G FYS1
|
---|
| 20 | QTRS W !,"SELECT QUARTER: ",ENQTT,"//" R ENQT:DTIME G EXIT:'$T S:ENQT="" ENQT=ENQTT G:ENQT="^" EXIT I ENQT<1!(ENQT>4) G QTRS
|
---|
| 21 | K ENFYT,ENQTT G DEV
|
---|
| 22 | ;
|
---|
| 23 | FYSONLY ;SELECT FISCAL YEAR AND QUARTER
|
---|
| 24 | S ENFYT("I")=$E(DT,1,3) I $E(DT,4,7)>1000 S ENFYT("I")=ENFYT("I")+1
|
---|
| 25 | S ENFYT=$E(ENFYT("I"),2,3)
|
---|
| 26 | FYS1ON W !,"SELECT FISCAL YEAR: ",ENFYT," //" R ENFY:DTIME G EXIT:'$T S:ENFY="" ENFY=ENFYT G:ENFY="^" EXIT I ENFY'?2N G FYS1ON
|
---|
| 27 | K ENFYT Q
|
---|
| 28 | ;
|
---|
| 29 | FYQTS ;SELECT FISCAL YEAR AND QUARTER ONLY
|
---|
| 30 | S ENFYT("I")=$E(DT,1,3) I $E(DT,4,7)>1000 S ENFYT("I")=ENFYT("I")+1
|
---|
| 31 | S I=+$E(DT,4,5),ENFYT=$E(ENFYT("I"),2,3),ENQTT=$P("2^2^2^3^3^3^4^4^4^1^1^1","^",I)
|
---|
| 32 | FYQTS1 W !,"SELECT FISCAL YEAR: ",ENFYT,"//" R ENFY:DTIME G EXIT:'$T S:ENFY="" ENFY=ENFYT G:ENFY="^" EXIT I ENFY'?2N G FYQTS1
|
---|
| 33 | QTS W !,"SELECT QUARTER: ",ENQTT,"//" R ENQT:DTIME G EXIT:'$T S:ENQT="" ENQT=ENQTT G:ENQT="^" EXIT I ENQT<1!(ENQT>4) G QTS
|
---|
| 34 | K ENFYT,ENQTT Q
|
---|
| 35 | EXIT K ENFYT,ENFY,ENQTT,ENQT Q
|
---|
| 36 | ;
|
---|
| 37 | ROUND ;Round off number
|
---|
| 38 | ;Number in X
|
---|
| 39 | ;Dec places in X(0)
|
---|
| 40 | S ENA=$P(X,".",1),ENB=$P(X,".",2) I X(0)=0 S Y=ENA G DNRND
|
---|
| 41 | I $L(ENB)'>X(0) S Y=ENA_"."_ENB G DNRND
|
---|
| 42 | S X(1)=$E(ENB,X(0)) I $E(ENB,X(0)+1)>4 S X(1)=X(1)+1
|
---|
| 43 | S Y=ENA_"."_$E(ENB,1,(X(0)-1))_X(1)
|
---|
| 44 | DNRND K ENA,ENB,X
|
---|
| 45 | Q
|
---|
| 46 | ;
|
---|
| 47 | ROOM ; Check for allowable format
|
---|
| 48 | N X1
|
---|
| 49 | S X1=$TR($P(X,"-"),"e","E") Q:X1?.NUP
|
---|
| 50 | D EN^DDIOL(" ROOM is not in proper format.") K X
|
---|
| 51 | Q
|
---|
| 52 | ;
|
---|
| 53 | BLDG ; Called when BUILDING is not in the file
|
---|
| 54 | N X1
|
---|
| 55 | S X1(1)=" The BUILDING (including DIVISION, if applicable) portion of the ROOM"
|
---|
| 56 | S X1(2)=" NUMBER must be defined in your Building File (6928.3) before this ROOM"
|
---|
| 57 | S X1(3)=" NUMBER may be added to your Space File."
|
---|
| 58 | S X1(4)=" In this case, "_$P(X,"-",2,3)_" does not appear to be in your Building File."
|
---|
| 59 | D EN^DDIOL(.X1)
|
---|
| 60 | Q
|
---|
| 61 | ;
|
---|
| 62 | VENPRE ; Vendor pre-action from ENG DJ screen handler
|
---|
| 63 | ; DA => IEN for file 6914
|
---|
| 64 | ; Needed because post-action on acquisition won't execute on deletes
|
---|
| 65 | ;
|
---|
| 66 | I $P($G(^ENG(6914,DA,3)),U,4)="L",$P($G(^(2)),U,3)]"" S DJNX=12,V(14)="",$P(^(2),U,3)="",DJSV=V D N^ENJDPL S V=DJSV ;clear asset value if LEASE
|
---|
| 67 | I "^L^M^"'[(U_$P($G(^ENG(6914,DA,3)),U,4)_U),$P($G(^(2)),U,12)]"" S DJNX=12,V(13)="",$P(^(2),U,12)="",DJSV=V D N^ENJDPL S V=DJSV ;clear lease cost if not LEASE or CAPITAL LEASE
|
---|
| 68 | Q
|
---|
| 69 | ;
|
---|
| 70 | X ;EXIT FOR THE INCONSISTENT RESPONSE
|
---|
| 71 | W *7,!,"TRY LATER"
|
---|
| 72 | Q ;EXIT POINT
|
---|
| 73 | K %,%DT,%X,%Y,DQTIME,J,X,Y,ZTSK Q
|
---|
| 74 | ;ENLIB
|
---|