FSCQU ;SLC/STAFF-NOIS Query Utility ;3/12/99 14:27
;;1.1;NOIS;**1**;Sep 06, 1998
;
LOOK(DIC,HELP,HFRAME) ; from FSCQCA, FSCQCAV
N CNT,DONE,ROU,X
S (Y,Y(0))="",DONE=0 F W !,DIC("A") W:$D(DIC("B")) DIC("B"),"// " R X:DTIME S:'$T DTOUT=1 D Q:DONE
.I $D(DTOUT) S DONE=1 Q
.I '$L(X) S X=$G(DIC("B")) I '$L(X) S Y=-1,DONE=1 Q
.I X[U S DONE=1,DUOUT=1 S Y=$S(X["^^":"^^",1:-1) Q
.I X["??" S XQH=$S($D(HFRAME):HFRAME,1:"FSC U1 NOIS") D EN^XQH Q
.I X="?" S X="??" I $D(DIR("?")) D
..I $L($P($G(DIR("?")),U,2)) S ROU=$P(DIR("?"),U,2,99) X ROU Q
..S CNT=0 F S CNT=$O(DIR("?",CNT)) Q:CNT<1 W !,DIR("?",CNT)
..I $D(DIR("?"))#2 W !,DIR("?")
.D ^DIC I Y>0 S DONE=1
I Y<0 S (Y,Y(0))=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCQU 708 printed Oct 16, 2024@18:19:47 Page 2
FSCQU ;SLC/STAFF-NOIS Query Utility ;3/12/99 14:27
+1 ;;1.1;NOIS;**1**;Sep 06, 1998
+2 ;
LOOK(DIC,HELP,HFRAME) ; from FSCQCA, FSCQCAV
+1 NEW CNT,DONE,ROU,X
+2 SET (Y,Y(0))=""
SET DONE=0
FOR
WRITE !,DIC("A")
if $DATA(DIC("B"))
WRITE DIC("B"),"// "
READ X:DTIME
if '$TEST
SET DTOUT=1
Begin DoDot:1
+3 IF $DATA(DTOUT)
SET DONE=1
QUIT
+4 IF '$LENGTH(X)
SET X=$GET(DIC("B"))
IF '$LENGTH(X)
SET Y=-1
SET DONE=1
QUIT
+5 IF X[U
SET DONE=1
SET DUOUT=1
SET Y=$SELECT(X["^^":"^^",1:-1)
QUIT
+6 IF X["??"
SET XQH=$SELECT($DATA(HFRAME):HFRAME,1:"FSC U1 NOIS")
DO EN^XQH
QUIT
+7 IF X="?"
SET X="??"
IF $DATA(DIR("?"))
Begin DoDot:2
+8 IF $LENGTH($PIECE($GET(DIR("?")),U,2))
SET ROU=$PIECE(DIR("?"),U,2,99)
XECUTE ROU
QUIT
+9 SET CNT=0
FOR
SET CNT=$ORDER(DIR("?",CNT))
if CNT<1
QUIT
WRITE !,DIR("?",CNT)
+10 IF $DATA(DIR("?"))#2
WRITE !,DIR("?")
End DoDot:2
+11 DO ^DIC
IF Y>0
SET DONE=1
End DoDot:1
if DONE
QUIT
+12 IF Y<0
SET (Y,Y(0))=""
+13 QUIT