Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AUZTMC

AUZTMC.m

Go to the documentation of this file.
AUZTMC ;REMOVE THIS LINE AND LEAVE IN UCI "PRD" [ 07/02/86  9:01 AM ]
ZTMC ;TASK FILE & SIGNON CLEANER [ 02/13/86  11:47 AM ]
 ;IHS-OKLA CITY AREA OFFICE-DEG
SET S:'$D(DUZ) DUZ=1,DUZ(0)="" I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y
 S:'$D(DTIME) DTIME=300
 I '$D(IO) S %IS="N",IOP=$I D ^%ZIS K IOP S FF=IOF
 G END:'$D(^%ZTSCH("RUN"))
 S ZTSK=999,ZDD=+$H-3,X=ZDD D VD S ED=Y D SB2
A S ZTSK=$O(^%ZTSK(ZTSK)) G B:ZTSK'?1N.N
 I '$D(^%ZTSK(ZTSK,0)) K ^%ZTSK(ZTSK) G A
 S X=^%ZTSK(ZTSK,0),ZSD=+$P(X,"^",8),ZRD=+$P(X,"^",6),ZRC=+$P(X,"^",7)
 I ZSD<ZDD,ZRD<ZDD,ZRC<ZDD K ^%ZTSK(ZTSK)
 G A
B D SB1
END K ZSD,BD,ED,ZTSK,ZRC,ZDD Q
SB1 S ZTSK=998 X ^%ZOSF("UCI") S ^%ZTSK(ZTSK,0)="^AUZTMC"_"^"_DUZ_"^"_Y_"^^"
 S ZD=+$H+1_",0060",^%ZTSCH(ZD,ZTSK)=""
 Q
SB2 S ED=ED_.999999
 S BD=0
SB3 S BD=$O(^XUSEC(0,BD)) G S19:BD=""!(BD>ED)
 K ^XUSEC(0,BD)
 G SB3
S19 Q
VD S %=X>21608+X-.1,Y=%\365.25+141,%=%#365.25\1
 S D=%+306#(Y#4=0+365)#153#61#31+1,M=%-D\29+1
 S Y=Y_"00"+M_"00"+D K M,D,% Q