FSCQSL ;SLC/STAFF-NOIS Query Search Less Than ;1/11/98 15:50
;;1.1;NOIS;;Sep 06, 1998
;
LT ; 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
..S CVALUE=$P($G(^FSCD("CALL",CALL,NODE)),U,PIECE) I $L(CVALUE),CVALUE<VALUE X ACTION
I LIST=0 D Q
.S CVALUE="" F S CVALUE=$O(^FSCD("CALL",INDEX,CVALUE)) Q:CVALUE="" Q:CVALUE'<VALUE 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="" Q:CVALUE'<VALUE D
..S CALL=0 F S CALL=$O(^FSCD("CALL",INDEX,CVALUE,CALL)) Q:CALL<1 X ACTION
Q
NLT ; 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
..S CVALUE=$P($G(^FSCD("CALL",CALL,NODE)),U,PIECE) I $L(CVALUE),CVALUE'<VALUE X ACTION
I LIST=0 D Q
.S CALL=0 F S CALL=$O(^FSCD("CALL",INDEX,VALUE,CALL)) Q:CALL<1 I $D(^TMP("FSC USELIST",$J,CALL)) X ACTION
.S CVALUE=VALUE 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 CALL=0 F S CALL=$O(^FSCD("CALL",INDEX,VALUE,CALL)) Q:CALL<1 X ACTION
.S CVALUE=VALUE 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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCQSL 1546 printed Dec 13, 2024@02:19:03 Page 2
FSCQSL ;SLC/STAFF-NOIS Query Search Less Than ;1/11/98 15:50
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
LT ; 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 SET CVALUE=$PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE)
IF $LENGTH(CVALUE)
IF CVALUE<VALUE
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
if CVALUE'<VALUE
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
if CVALUE'<VALUE
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
NLT ; 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 SET CVALUE=$PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE)
IF $LENGTH(CVALUE)
IF CVALUE'<VALUE
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+5 IF LIST=0
Begin DoDot:1
+6 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",INDEX,VALUE,CALL))
if CALL<1
QUIT
IF $DATA(^TMP("FSC USELIST",$JOB,CALL))
XECUTE ACTION
+7 SET CVALUE=VALUE
FOR
SET CVALUE=$ORDER(^FSCD("CALL",INDEX,CVALUE))
if CVALUE=""
QUIT
Begin DoDot:2
+8 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",INDEX,CVALUE,CALL))
if CALL<1
QUIT
Begin DoDot:3
+9 IF $DATA(^TMP("FSC USELIST",$JOB,CALL))
XECUTE ACTION
End DoDot:3
End DoDot:2
End DoDot:1
QUIT
+10 IF LIST=""
Begin DoDot:1
+11 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",INDEX,VALUE,CALL))
if CALL<1
QUIT
XECUTE ACTION
+12 SET CVALUE=VALUE
FOR
SET CVALUE=$ORDER(^FSCD("CALL",INDEX,CVALUE))
if CVALUE=""
QUIT
Begin DoDot:2
+13 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
+14 QUIT