ENY2UTL ;;(WIRMFO)/DH-Equipment Y2K Utilities ;11.24.98
;;7.0;ENGINEERING;**51,59**;August 17, 1993
LOG ; log each change in Y2K CATEGORY
; expects DA as IEN for equipment file
N ENI,ENFDA,CAT
S CAT=$P($G(^ENG(6914,DA,11)),U)
D NOW^%DTC
S ENI(1)=DA,ENFDA(6918,"?+1,",.01)=DA
S ENFDA(6918.01,"?+2,?+1,",.01)=%
S ENFDA(6918.01,"?+2,?+1,",1)=CAT
S ENFDA(6918.01,"?+2,?+1,",2)=DUZ
D UPDATE^DIE("","ENFDA","ENI") D MSG^DIALOG()
Q
;
COST ; remove Y2K expectancies when appropriate, including open work order
; expects DA as IEN for equipment file
Q:'$D(DA) Q:'$D(^ENG(6914,DA,11))
N EQDA,WODA
S EQDA=DA I "^NC^NA^"[(U_$P(^ENG(6914,DA,11),U)_U) D
. S X=^ENG(6914,DA,11) F J=2,3,4,5,7,10 S $P(X,U,J)=""
. S ^ENG(6914,DA,11)=X
. S WODA=$P(X,U,8) I WODA,$D(^ENG(6920,WODA,0)),$P($G(^(5)),U,2)="" D
.. S DA=WODA,DIK="^ENG(6920," D ^DIK K DIK S DA=EQDA
.. S $P(^ENG(6914,DA,11),U,8)=""
Q
;ENY2UTL
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENY2UTL 937 printed Dec 13, 2024@01:57:38 Page 2
ENY2UTL ;;(WIRMFO)/DH-Equipment Y2K Utilities ;11.24.98
+1 ;;7.0;ENGINEERING;**51,59**;August 17, 1993
LOG ; log each change in Y2K CATEGORY
+1 ; expects DA as IEN for equipment file
+2 NEW ENI,ENFDA,CAT
+3 SET CAT=$PIECE($GET(^ENG(6914,DA,11)),U)
+4 DO NOW^%DTC
+5 SET ENI(1)=DA
SET ENFDA(6918,"?+1,",.01)=DA
+6 SET ENFDA(6918.01,"?+2,?+1,",.01)=%
+7 SET ENFDA(6918.01,"?+2,?+1,",1)=CAT
+8 SET ENFDA(6918.01,"?+2,?+1,",2)=DUZ
+9 DO UPDATE^DIE("","ENFDA","ENI")
DO MSG^DIALOG()
+10 QUIT
+11 ;
COST ; remove Y2K expectancies when appropriate, including open work order
+1 ; expects DA as IEN for equipment file
+2 if '$DATA(DA)
QUIT
if '$DATA(^ENG(6914,DA,11))
QUIT
+3 NEW EQDA,WODA
+4 SET EQDA=DA
IF "^NC^NA^"[(U_$PIECE(^ENG(6914,DA,11),U)_U)
Begin DoDot:1
+5 SET X=^ENG(6914,DA,11)
FOR J=2,3,4,5,7,10
SET $PIECE(X,U,J)=""
+6 SET ^ENG(6914,DA,11)=X
+7 SET WODA=$PIECE(X,U,8)
IF WODA
IF $DATA(^ENG(6920,WODA,0))
IF $PIECE($GET(^(5)),U,2)=""
Begin DoDot:2
+8 SET DA=WODA
SET DIK="^ENG(6920,"
DO ^DIK
KILL DIK
SET DA=EQDA
+9 SET $PIECE(^ENG(6914,DA,11),U,8)=""
End DoDot:2
End DoDot:1
+10 QUIT
+11 ;ENY2UTL