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

AZTGBLS.m

Go to the documentation of this file.
  1. %AZTGBLS ; CHECK FOR TRANSLATED GLOBALS [ 10/15/86 9:56 AM ]
  1. ;
  1. ; I plagerized ^%GSEL for this logic. I do not undetstand it, but
  1. ; it seems to work. No warranty of course!
  1. ;
  1. ; This routine will leave U="^", AUDKTON=0 or 1. If UCI
  1. ; TRANSLATION is on it will be 1, if it is off it will
  1. ; be 0. *** warning *** UCI TRANSLATION can be turned
  1. ; on at any time from MGR (i.e. while you are running).
  1. ; Entry at TON^%AZTGBLS will set AUKDTON to 0 or 1 only.
  1. ;
  1. ; Upon exiting, AUKDTRNL will not exist if there were no UCI
  1. ; TRANSLATED globals. If there were UCI TRANSLATED globals
  1. ; AUKDTRNL will contains the entries from the UCI TRANSLATION
  1. ; table separated by "^".
  1. ;
  1. ; This routine also KILLs ^UTILITY($J) upon entry, and
  1. ; stores all UCI TRANSLATED globals for the current
  1. ; UCI in ^UTILITY($J,. Therefore, ^UTILITY($J) should
  1. ; be KILLed by the calling routine, at EOJ. Also, if there
  1. ; where no UCI TRANSLATED globals for this UCI ^UTILITY($J)
  1. ; will not exist.
  1. ;
  1. S U="^" K ^UTILITY($J)
  1. D TON
  1. W !!,"Now checking for UCI TRANSLATED globals.",!
  1. Q:'$D(^["MGR"]SYS(1,"TRANSLATION TABLE"))
  1. D ^%GUCI
  1. S AUKDUCI=%UCI,AUKDSYS=%SYS K %SYS,%UCI,%UCN
  1. S AUKDTRNL=""
  1. S AUKDX=0 F AUKDL=0:0 S AUKDX=$O(^["MGR"]SYS(1,"TRANSLATION TABLE",AUKDX)) Q:AUKDX'=+AUKDX I $P(^(AUKDX),";",1,2)=(AUKDUCI_";"_AUKDSYS) S AUKDTRNL=AUKDTRNL_"^"_$P(^(AUKDX),";",3)
  1. K AUKDUCI,AUKDSYS,AUKDL,AUKDX
  1. I AUKDTRNL="" K AUKDTRNL Q
  1. GSEL I '$D(%PGC) S %UCIN=$P($ZU(""),","),%SN=$P($ZU(""),",",2)
  1. S %ST=$V(44),%GO=1
  1. S %MM=$V(%SN*($V(%ST+34)#256)+$V(%ST+12)+2)
  1. S %DIR=$V(%UCIN-1*20+4,%MM)#256*65536+$V(%UCIN-1*20+2,%MM)
  1. S %VS="S"_%SN
  1. S:'$D(^UTILITY) ^UTILITY="" K ^UTILITY($J)
  1. F AUKDI=2:1 S %X=$P(AUKDTRNL,U,AUKDI) Q:%X="" D
  1. . S (%MI,%ALL)=0 I $E(%X,1)="-" S %MI=1,%X=$E(%X,2,999)
  1. . I %X?.E1"*" S %ST=$E(%X,1,$L(%X)-1),%FI=%ST,%L=$L(%ST) D %GET^%GSEL C 63
  1. K AUKDI,%ALL,%DIR,%FI,%GO,%L,%MI,%MM,%SN,%ST,%T,%UCIN,%VS,%X
  1. Q
  1. ;
  1. TON ; TRANSLATION ON/OFF
  1. S AUKDTON=($V($V(149,$J),$V($V(44)+276))#256)
  1. Q