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

AZHLSCU3.m

Go to the documentation of this file.
AZHLSCU3 ; IHS/ADC/GTH:KEU - UNDEF CHECKER. PROCESS SET/READ/KILL/NEW COMMANDS ;
 ;;5.0;AZHLSC;;JUL 10, 1996
PEEK S Y=$G(LV(LV,LI+1)) Q
PEEK2 S Y=$G(LV(LV,LI+2)) Q
INC2 S LI=LI+1 ;Drop into INC
INC S LI=LI+1,S=$G(LV(LV,LI)),S1=$G(LV(LV,LI+1)),CH=$E(S) G ERR:$A(S)=10 Q
DN S LI(LV)=LI,LI(LV,1)=AC,LV=LV+1,LI=LI(LV),AC=NOA
 Q
UP ;Inc LI as we save to skip the $C(10).
 D PEEK S:$A(Y)=10 LI=LI+1 S LI(LV)=LI,LV=LV-1,LI=LI(LV),AC=LI(LV,1) Q
PEEKDN S Y=$G(LV(LV+1,LI(LV+1)+1)) Q
FIND F Y=LI:1:AC Q:L[$G(LV(LV,Y))
ERR S (S,S1,CH)="" Q
 Q
S S STR=ARG,ARG="",RHS=0 D ^AZHLSCU9
S2 S GK="" D INC
 Q:S=""
 I CH="," S RHS=0 G S2
 I CH="=" S RHS=1 G S2
 I CH="^" D FL G S2
 I CH="@" S L="," D ASM S:Y'["=" RHS=1 D INC,ARG^AZHLSCU2 G S2
 I CH="(" D MULT G S2
 D FL
 G S2
MULT D INC S NOA=S
 D DN S AC=AC+LI F  Q:AC'>LI  S GK="*" D INC,ARG^AZHLSCU2
 D UP Q
FL S:'RHS GK="*" D ARG^AZHLSCU2
 Q
KL ;Process KILL
 S STR=ARG,ARG(1)=ARG,ARG="" D ^AZHLSCU9
A D INC Q:S=""  G A:CH="," S LOC="L" D @$S(CH="@":"KL1",CH="^":"KL2",CH="(":"KL4",1:"KL3") G A
KL1 D INC,ARG^AZHLSCU2 Q
KL2 S GK="!"
 G ARG^AZHLSCU2
KL3 I "^DT^DTIME^DUZ^IOST^IOM^IOS^"[("^"_S_"^") S ERR(1)=S
 I "IO"=S D:S1="(" PEEKDN S ERR(1)=S_$S(S1["(":S1_Y_")",1:"")
KL5 S GK="!" D ARG^AZHLSCU2 Q  ;KILL SUBS
 Q
KL4 S NOA=S1 D DN,ARGS^AZHLSCU2,UP,INC2 Q
NE ;NEW
 S STR=ARG D ^AZHLSCU9
N2 D INC Q:S=""  G N2:CH="," S GK="~" D ARG^AZHLSCU2 G N2
 ;
RD S STR=ARG D ^AZHLSCU9 S ARG=""
RD1 D INC Q:S=""
 ;I (CH="!")!(CH=",")!(CH=Q)!(CH="#") G RD1
 I '((CH="%")!(CH?1A)!(CH="*")) D RD3 G RD1
 S L="," D ASM
 D RD2 G RD1
RD2 Q:","[CH
 I "#:"[CH D INC,ARG^AZHLSCU2,INC G RD2
 I (CH="%")!(CH?1A) S LOC="L",GK="*" D ARG^AZHLSCU2,INC G RD2
 D INC G RD2
RD3 Q:","[CH  I "!#?"[CH D INC G RD3
 I (CH="%")!(CH?1A)!(CH="@") D ARG^AZHLSCU2,INC G RD3
 Q
ST ;
 S:'$D(V(LOC,S)) V(LOC,S)="" S:V(LOC,S)'[GK V(LOC,S)=V(LOC,S)_GK,GK="" Q
 Q
ASM N CH S Y="" F %=LI:1 S CH=$G(LV(LV,%)) Q:L[CH  S Y=Y_" "_CH
 Q