source: FOIAVistA/trunk/r/ENGINEERING-EN/ENLIB.m@ 1765

Last change on this file since 1765 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1ENLIB ;(WASH ISC)/JED/SAW/DH-Package Utilities ;2.17.98
2 ;;7.0;ENGINEERING;**35,45,47,48**;Aug 17, 1993
3 ;
4ENOUT ;ENGINEERING OUTPUT PORT SELECTOR DLM/WASH; 27 JUL 84 8:01 AM
5DEV ;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
10DEVSHOW ;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
16FYS ;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)
19FYS1 W !,"SELECT FISCAL YEAR: ",ENFYT,"//" R ENFY:DTIME G EXIT:'$T S:ENFY="" ENFY=ENFYT G:ENFY="^" EXIT I ENFY'?2N G FYS1
20QTRS 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 ;
23FYSONLY ;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)
26FYS1ON 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 ;
29FYQTS ;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)
32FYQTS1 W !,"SELECT FISCAL YEAR: ",ENFYT,"//" R ENFY:DTIME G EXIT:'$T S:ENFY="" ENFY=ENFYT G:ENFY="^" EXIT I ENFY'?2N G FYQTS1
33QTS 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
35EXIT K ENFYT,ENFY,ENQTT,ENQT Q
36 ;
37ROUND ;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)
44DNRND K ENA,ENB,X
45 Q
46 ;
47ROOM ; 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 ;
53BLDG ; 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 ;
62VENPRE ; 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 ;
70X ;EXIT FOR THE INCONSISTENT RESPONSE
71 W *7,!,"TRY LATER"
72Q ;EXIT POINT
73 K %,%DT,%X,%Y,DQTIME,J,X,Y,ZTSK Q
74 ;ENLIB
Note: See TracBrowser for help on using the repository browser.