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

APCDFCTC.m

Go to the documentation of this file.
APCDFCTC ; IHS/CMI/LAB - UPDATE TRAN CODE TRACKING FILE ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
 L +^XTMP("APCDZTCT",DT):20 E  W !!,"CANNOT LOCK TRAN CODE TRACKING GLOBAL!",! D EXIT Q
 S DIC="^APCDTCT(",DIC(0)="L",X=DT,DLAYGO=9001001.8 D ^DIC K DIC
 I Y=-1 W !!,"TRAN CODE TRACKING FAILED -- NOTIFY PROGRAMMER!",! D EXIT Q
 K DIU,DIV,DA,DIE,DLAYGO,DIC
 NEW CNT,% S CNT=0,%=0 F  S %=$O(^AUPNVTC("AD",APCDFV,%)) Q:%'=+%  S CNT=CNT+1
 I $D(^APCDTCT(+Y,11,"B",APCDFV)) S DA=$O(^APCDTCT(+Y,11,"B",APCDFV,0)),$P(^APCDTCT(+Y,11,DA,0),U,3)=CNT G EXIT
 S DA=+Y,DR="1101///""`"_APCDFV_"""",DIE="^APCDTCT(",DR(2,9001001.81101)=".02////^S X=DUZ;.03///"_CNT
 D ^DIE
 I $D(Y) W !!,"TRAN CODE TRACKING ERROR--notify programmer!",$C(7)
EXIT ;
 L -^XTMP("APCDZTCT",DT)
 K DIE,DR,DIC,DIU,DIV,X,Y,DA,DLAYGO
 Q