ACDGX5 ;IHS/ADC/EDE/KML - SAVE ACDVTMP TO UNIX/DOS FILE;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
EN ;EP
K ACDTIME
D ^XBKVAR,NOW^%DTC
;S XBDT=%I(1)_"/"_%I(2)_"/"_$E(%I(3),2,3)
S XBDT=DT
S XBTLE=$$FMTE^XLFDT(ACDDTF)_" thru "_$$FMTE^XLFDT(ACDDTT)_" @"
V ;
I '$D(ACDTIME) S ACDTIME=DTIME,DTIME=9000000000
K XBMED
;
;Check for extract data found
;S 1=1
I '$D(^ACDVTMP),'$D(^ACDPTMP) W !!,"No new data found to extract....." Q
;
;
W !!,"Saving Data now....."
S XBMED="F"
D ^XBGSAVE
;I XBFLG W !!,*7,"Up Arrow not allowed." G V
;S DTIME=ACDTIME
S DTIME=$$DTIME^XUP(DUZ)
K XBMED,ACDTIME
Q
ACDGX5 ;IHS/ADC/EDE/KML - SAVE ACDVTMP TO UNIX/DOS FILE;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
EN ;EP
+1 KILL ACDTIME
+2 DO ^XBKVAR
DO NOW^%DTC
+3 ;S XBDT=%I(1)_"/"_%I(2)_"/"_$E(%I(3),2,3)
+4 SET XBDT=DT
+5 SET XBTLE=$$FMTE^XLFDT(ACDDTF)_" thru "_$$FMTE^XLFDT(ACDDTT)_" @"
V ;
+1 IF '$DATA(ACDTIME)
SET ACDTIME=DTIME
SET DTIME=9000000000
+2 KILL XBMED
+3 ;
+4 ;Check for extract data found
+5 ;S 1=1
+6 IF '$DATA(^ACDVTMP)
IF '$DATA(^ACDPTMP)
WRITE !!,"No new data found to extract....."
QUIT
+7 ;
+8 ;
+9 WRITE !!,"Saving Data now....."
+10 SET XBMED="F"
+11 DO ^XBGSAVE
+12 ;I XBFLG W !!,*7,"Up Arrow not allowed." G V
+13 ;S DTIME=ACDTIME
+14 SET DTIME=$$DTIME^XUP(DUZ)
+15 KILL XBMED,ACDTIME
+16 QUIT