FSCQSX ;SLC/STAFF-NOIS Query Search Exists ;4/22/94 12:01
;;1.1;NOIS;;Sep 06, 1998
;
EX ; from FSCQS
I LIST=1 D Q
.S NODE=+$P(CODE,";"),PIECE=$P(CODE,";",2)
.S CALL=0 F S CALL=$O(^TMP("FSC USELIST",$J,CALL)) Q:CALL<1 D
..I $L($P($G(^FSCD("CALL",CALL,NODE)),U,PIECE)) X ACTION
I LIST=0 D Q
.S CVALUE="" F S CVALUE=$O(^FSCD("CALL",INDEX,CVALUE)) Q:CVALUE="" D
..S CALL=0 F S CALL=$O(^FSCD("CALL",INDEX,CVALUE,CALL)) Q:CALL<1 D
...I $D(^TMP("FSC USELIST",$J,CALL)) X ACTION
I LIST="" D Q
.S CVALUE="" F S CVALUE=$O(^FSCD("CALL",INDEX,CVALUE)) Q:CVALUE="" D
..S CALL=0 F S CALL=$O(^FSCD("CALL",INDEX,CVALUE,CALL)) Q:CALL<1 X ACTION
Q
NEX ; from FSCQS
I LIST=1!(LIST=0) D Q
.S NODE=+$P(CODE,";"),PIECE=$P(CODE,";",2)
.S CALL=0 F S CALL=$O(^TMP("FSC USELIST",$J,CALL)) Q:CALL<1 D
..I '$L($P($G(^FSCD("CALL",CALL,NODE)),U,PIECE)) X ACTION
I LIST="" D Q
.S NODE=+$P(CODE,";"),PIECE=$P(CODE,";",2)
.S CALL=0 F S CALL=$O(^FSCD("CALL",CALL)) Q:CALL<1 D
..I '$L($P($G(^FSCD("CALL",CALL,NODE)),U,PIECE)) X ACTION
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCQSX 1071 printed Dec 13, 2024@02:19:09 Page 2
FSCQSX ;SLC/STAFF-NOIS Query Search Exists ;4/22/94 12:01
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
EX ; from FSCQS
+1 IF LIST=1
Begin DoDot:1
+2 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+3 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+4 IF $LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+5 IF LIST=0
Begin DoDot:1
+6 SET CVALUE=""
FOR
SET CVALUE=$ORDER(^FSCD("CALL",INDEX,CVALUE))
if CVALUE=""
QUIT
Begin DoDot:2
+7 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",INDEX,CVALUE,CALL))
if CALL<1
QUIT
Begin DoDot:3
+8 IF $DATA(^TMP("FSC USELIST",$JOB,CALL))
XECUTE ACTION
End DoDot:3
End DoDot:2
End DoDot:1
QUIT
+9 IF LIST=""
Begin DoDot:1
+10 SET CVALUE=""
FOR
SET CVALUE=$ORDER(^FSCD("CALL",INDEX,CVALUE))
if CVALUE=""
QUIT
Begin DoDot:2
+11 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",INDEX,CVALUE,CALL))
if CALL<1
QUIT
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+12 QUIT
NEX ; from FSCQS
+1 IF LIST=1!(LIST=0)
Begin DoDot:1
+2 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+3 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+4 IF '$LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+5 IF LIST=""
Begin DoDot:1
+6 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+7 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",CALL))
if CALL<1
QUIT
Begin DoDot:2
+8 IF '$LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+9 QUIT