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

XDRU1.m

Go to the documentation of this file.
XDRU1 ;IHS/OHPRD/JCM - XDR GENERAL UTILITIES; ;07/08/93  15:28
 ;;7.3;TOOLKIT;;Apr 25, 1995
CHECK ; EP - Called by XDRDQUE
 I $P(XDRD(0),U,9)']"" S XDRERR=1 D ^XDREMSG
 I $P(XDRD(0),U,9)]"" S X=$S($P(XDRD(0),U,9)["-":$P($P(XDRD(0),U,9),"-",2),1:$P(XDRD(0),U,9)) X ^%ZOSF("TEST") I '$T S XDRERR=2 D ^XDREMSG
 I $P(XDRD(0),U,15)']"" S XDRERR=3 D ^XDREMSG
 I '$O(^VA(15.1,$P(XDRD(0),U,1),11,0)) S XDRERR=4 D ^XDREMSG
 I '$D(^DIC(XDRFL,0,"GL")) S XDRERR=5 D ^XDREMSG
 Q
 ;
LOCK ; EP - Called by XDRMAIN,XDRMRG
 S %=XDRMRG("LCK")_XDRGL_XDRMCD_"):0" L @% E  S XDRMLOCK=1 G LOCKX
 S %=XDRMRG("LCK")_XDRGL_XDRMCD2_"):0" L @% E  S XDRMLOCK=1 G LOCKX
 I $D(XDRM("DINUMS")) K XDRI F XDRI=0:0 S XDRI=$O(XDRM("DINUMS",XDRI)) Q:'XDRI  D LOCK2
LOCKX K XDRI,%
 Q
 ;
LOCK2 ;
 S XDRMRG("GL")=^DIC(XDRI,0,"GL")
 S %=XDRMRG("LCK")_XDRMRG("GL")_XDRMCD_"):0" L @% E  S XDRMLOCK=1 G LOCK2X
 S %=XDRMRG("LCK")_XDRMRG("GL")_XDRMCD2_"):0" L @% E  S XDRMLOCK=1
LOCK2X K XDRMRG("GL"),%
 Q