source: FOIAVistA/tag/r/ENGINEERING-EN/ENPAT15.m@ 1383

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1ENPAT15 ;WISC/SAB-FIX PM MANHOURS ;1/13/95
2 ;;7.0;ENGINEERING;**15**;Aug 17, 1993
3 I DUZ(0)'["@" W "Please set DUZ(0)=""@"" and re-run this routine",! Q
4PMHRS W !,"Moving inappropriately posted PM manhours"
5 S ENI=0
6 F S ENI=$O(^DIC(6922,ENI)) Q:'ENI D
7 . ; engineering section loop
8 . S ENPMM=29000000
9 . F S ENPMM=$O(^DIC(6922,ENI,1,"B",ENPMM)) Q:'ENPMM D
10 . . ; invalid PM month loop
11 . . S ENII=$O(^DIC(6922,ENI,1,"B",ENPMM,0))
12 . . Q:'ENII
13 . . W "."
14 . . K PMTOT
15 . . S ENIII=0
16 . . F S ENIII=$O(^DIC(6922,ENI,1,ENII,1,ENIII)) Q:'ENIII D
17 . . . ; technician loop
18 . . . S ENY0=$G(^DIC(6922,ENI,1,ENII,1,ENIII,0))
19 . . . S ENTECH=$P(ENY0,U),ENHRS=$P(ENY0,U,2)
20 . . . I ENTECH]"",ENHRS]"" S PMTOT(ENTECH)=ENHRS
21 . . ; post accumulated hours
22 . . S ENSHKEY=ENI
23 . . S ENPMDT=$E(ENPMM,2,5)
24 . . I $D(PMTOT) D COUNT^ENBCPM8
25 . . ; kill invalid PM month
26 . . S DA(1)=ENI,DA=ENII,DIK="^DIC(6922,"_DA(1)_",1,"
27 . . D ^DIK
28 . ;clean up internal count of technicians
29 . ;source of problem was COUNT+8^ENBCPM8 (repaired with this patch)
30 . S ENPMM=0
31 . L +^DIC(6922,ENI)
32 . F S ENPMM=$O(^DIC(6922,ENI,1,"B",ENPMM)) Q:'ENPMM D
33 . . S ENII=$O(^DIC(6922,ENI,1,"B",ENPMM,0)) Q:'ENII D
34 . . . S (ENIII,ENLAST,ENCOUNT)=0
35 . . . F S ENIII=$O(^DIC(6922,ENI,1,ENII,1,ENIII)) Q:'ENIII S ENLAST=ENIII,ENCOUNT=ENCOUNT+1
36 . . . S:ENLAST $P(^DIC(6922,ENI,1,ENII,1,0),"^",3)=ENLAST,$P(^(0),"^",4)=ENCOUNT
37 . L -^DIC(6922,ENI)
38 K DA,DIK,ENHRS,ENI,ENII,ENIII,ENPMDT,ENPMM,ENSHKEY,ENTECH,ENY0,PMTOT
39 K ENLAST,ENCOUNT
40 ;
41UBC W !!,"Modifying Data in File #7336.9 (OFM BUDGET CATEGORY)"
42 S DIC=1,DIC(0)="X",X="7336.9" D ^DIC
43 I Y<0 W "ERROR - File 7336.9 Not Found",! G UBCEND
44 ; additional MM Budget Categories
45 S (DIC,DIE)="^OFM(7336.9,",DR="1///^S X=ENX1"
46 S DIC(0)="X",X="EDUCATION" D ^DIC,ERR:Y'>0
47 I Y>0 S ENX1="MA,MI,MM",DA=+Y D ^DIE
48 S DIC(0)="X",X="NHCU" D ^DIC,ERR:Y'>0
49 I Y>0 S ENX1="MA,MI,MM,NR",DA=+Y D ^DIE
50 S DIC(0)="X",X="RESEARCH" D ^DIC,ERR:Y'>0
51 I Y>0 S ENX1="MA,MI,MM",DA=+Y D ^DIE
52UBCEND K DA,DIC,DIE,DR,ENDA,ENX1,X,Y
53UPC W !!,"Modifying Data in File #7336.8 (OFM PROJ CATEGORY)"
54 S DIC=1,DIC(0)="X",X="7336.8" D ^DIC
55 I Y<0 W "ERROR - File 7336.8 Not Found",! G UPCEND
56 ; Update mapping to MM budget categories
57 S (DIC,DIE)="^OFM(7336.8,",DR="10///^S X=ENX10"
58 S DIC(0)="X",X="EDUCATION" D ^DIC,ERR:Y'>0
59 I Y>0 S ENX10="EDUCATION",DA=+Y D ^DIE
60 S DIC(0)="X",X="NHCU" D ^DIC,ERR:Y'>0
61 I Y>0 S ENX10="NHCU",DA=+Y D ^DIE
62 S DIC(0)="X",X="RESEARCH" D ^DIC,ERR:Y'>0
63 I Y>0 S ENX10="RESEARCH",DA=+Y D ^DIE
64UPCEND K DA,DIC,DIE,DR,ENDA,ENX10,X,Y
65INDX W !!,"Re-Indexing ENG SPACE (#6928) file"
66 K DIK S DIK="^ENG(""SP""," D IXALL^DIK
67 K DIK
68 Q
69ERR W !,"ERROR - ",X," not found in file",! Q
Note: See TracBrowser for help on using the repository browser.