BTIUARC ; IHS/ITSC/LJF - ARCHIVE UPLOADED FILE ;
;;1.0;TEXT INTEGRATION UTILITIES;;NOV 04, 2004
;
MAIN ;-- main program driver
D DT,ARC,CLOSE
Q
;
DT ;-- create the file date/time for archiving
S (FDT,FTM,FNM)=0
D NOW^%DTC
S FDT=$P(%,".",1),FTM=$E($P(%,".",2),1,4)
S FNM="tiu"_FDT_"."_FTM
Q
;
ARC ;-- move the file from upload directory to archive directory
NEW SITE,DIR,FILE
S SITE=$O(^TIU(8925.99,"B",DUZ(2),0))
S FROM=$$GET1^DIQ(8925.99,SITE,9999999.01)
S TODIR=$$GET1^DIQ(8925.99,SITE,9999999.02)
S FILE=$$GET1^DIQ(8925.99,SITE,9999999.03)
S Y=$$MV^%ZISH(FROM,FILE,TODIR,FNM)
Q
;
CLOSE ;-- kill the variables and quit
K FDT,FTM,FNM
Q
BTIUARC ; IHS/ITSC/LJF - ARCHIVE UPLOADED FILE ;
+1 ;;1.0;TEXT INTEGRATION UTILITIES;;NOV 04, 2004
+2 ;
MAIN ;-- main program driver
+1 DO DT
DO ARC
DO CLOSE
+2 QUIT
+3 ;
DT ;-- create the file date/time for archiving
+1 SET (FDT,FTM,FNM)=0
+2 DO NOW^%DTC
+3 SET FDT=$PIECE(%,".",1)
SET FTM=$EXTRACT($PIECE(%,".",2),1,4)
+4 SET FNM="tiu"_FDT_"."_FTM
+5 QUIT
+6 ;
ARC ;-- move the file from upload directory to archive directory
+1 NEW SITE,DIR,FILE
+2 SET SITE=$ORDER(^TIU(8925.99,"B",DUZ(2),0))
+3 SET FROM=$$GET1^DIQ(8925.99,SITE,9999999.01)
+4 SET TODIR=$$GET1^DIQ(8925.99,SITE,9999999.02)
+5 SET FILE=$$GET1^DIQ(8925.99,SITE,9999999.03)
+6 SET Y=$$MV^%ZISH(FROM,FILE,TODIR,FNM)
+7 QUIT
+8 ;
CLOSE ;-- kill the variables and quit
+1 KILL FDT,FTM,FNM
+2 QUIT