FSCQSG ;SLC/STAFF-NOIS Query Search Greater Than ;1/11/98 15:50
;;1.1;NOIS;;Sep 06, 1998
;
GT ; 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=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 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
NGT ; 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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCQSG 1361 printed Dec 13, 2024@02:19:02 Page 2
FSCQSG ;SLC/STAFF-NOIS Query Search Greater Than ;1/11/98 15:50
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
GT ; 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=VALUE
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=VALUE
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
NGT ; 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