FSCQSN ;SLC/STAFF-NOIS Query Search Nonindexed ;8/8/98 21:28
;;1.1;NOIS;;Sep 06, 1998
;
EX ; from FSCQS
I CODE["7100.6" D PEX Q
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
NEX ; from FSCQS
I CODE["7100.6" D PNEX Q
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
OTHER ; from FSCQS
I CODE["7100.6" D POTHER Q
S NODE=+$P(CODE,";"),PIECE=$P(CODE,";",2),CHECK="CVALUE"_COND_$S(VALUE=+VALUE:VALUE,1:""""_$$UP^XLFSTR(VALUE)_"""")
I LIST=1!(LIST=0) D Q
.S CALL=0 F S CALL=$O(^TMP("FSC USELIST",$J,CALL)) Q:CALL<1 D
..S CVALUE=$$UP^XLFSTR($P($G(^FSCD("CALL",CALL,NODE)),U,PIECE)) I $L(CVALUE),@CHECK X ACTION
I LIST="" D Q
.S CALL=0 F S CALL=$O(^FSCD("CALL",CALL)) Q:CALL<1 D
..S CVALUE=$$UP^XLFSTR($P($G(^FSCD("CALL",CALL,NODE)),U,PIECE)) I $L(CVALUE),@CHECK X ACTION
Q
;
PEX ;
N IEN
S CODE=$P(CODE,",",2)
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
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL)) I 'IEN Q
..I $L($P($G(^FSCD("CALL USER",IEN,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 USER","AUC",DUZ,CALL)) Q:CALL<1 D
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL)) I 'IEN Q
..I $L($P($G(^FSCD("CALL USER",IEN,NODE)),U,PIECE)) X ACTION
Q
PNEX ;
N IEN
S CODE=$P(CODE,",",2)
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
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL))
..I '$L($P($G(^FSCD("CALL USER",IEN,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 USER","AUC",DUZ,CALL)) Q:CALL<1 D ; *** only checking calls in call user file, not all calls
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL))
..I '$L($P($G(^FSCD("CALL USER",IEN,NODE)),U,PIECE)) X ACTION
Q
POTHER ;
N IEN
S CODE=$P(CODE,",",2)
S NODE=+$P(CODE,";"),PIECE=$P(CODE,";",2),CHECK="CVALUE"_COND_$S(VALUE=+VALUE:VALUE,1:""""_$$UP^XLFSTR(VALUE)_"""")
I LIST=1!(LIST=0) D Q
.S CALL=0 F S CALL=$O(^TMP("FSC USELIST",$J,CALL)) Q:CALL<1 D
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL)) I 'IEN Q
..S CVALUE=$$UP^XLFSTR($P($G(^FSCD("CALL USER",IEN,NODE)),U,PIECE)) I $L(CVALUE),@CHECK X ACTION
I LIST="" D Q
.S CALL=0 F S CALL=$O(^FSCD("CALL USER","AUC",DUZ,CALL)) Q:CALL<1 D
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL)) I 'IEN Q
..S CVALUE=$$UP^XLFSTR($P($G(^FSCD("CALL USER",IEN,NODE)),U,PIECE)) I $L(CVALUE),@CHECK X ACTION
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCQSN 3281 printed Nov 22, 2024@17:29:05 Page 2
FSCQSN ;SLC/STAFF-NOIS Query Search Nonindexed ;8/8/98 21:28
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
EX ; from FSCQS
+1 IF CODE["7100.6"
DO PEX
QUIT
+2 IF LIST=1!(LIST=0)
Begin DoDot:1
+3 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+4 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+5 IF $LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+6 IF LIST=""
Begin DoDot:1
+7 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+8 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",CALL))
if CALL<1
QUIT
Begin DoDot:2
+9 IF $LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+10 QUIT
NEX ; from FSCQS
+1 IF CODE["7100.6"
DO PNEX
QUIT
+2 IF LIST=1!(LIST=0)
Begin DoDot:1
+3 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+4 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+5 IF '$LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+6 IF LIST=""
Begin DoDot:1
+7 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+8 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",CALL))
if CALL<1
QUIT
Begin DoDot:2
+9 IF '$LENGTH($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+10 QUIT
OTHER ; from FSCQS
+1 IF CODE["7100.6"
DO POTHER
QUIT
+2 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
SET CHECK="CVALUE"_COND_$SELECT(VALUE=+VALUE:VALUE,1:""""_$$UP^XLFSTR(VALUE)_"""")
+3 IF LIST=1!(LIST=0)
Begin DoDot:1
+4 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+5 SET CVALUE=$$UP^XLFSTR($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
IF $LENGTH(CVALUE)
IF @CHECK
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+6 IF LIST=""
Begin DoDot:1
+7 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL",CALL))
if CALL<1
QUIT
Begin DoDot:2
+8 SET CVALUE=$$UP^XLFSTR($PIECE($GET(^FSCD("CALL",CALL,NODE)),U,PIECE))
IF $LENGTH(CVALUE)
IF @CHECK
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+9 QUIT
+10 ;
PEX ;
+1 NEW IEN
+2 SET CODE=$PIECE(CODE,",",2)
+3 IF LIST=1!(LIST=0)
Begin DoDot:1
+4 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+5 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+6 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALL))
IF 'IEN
QUIT
+7 IF $LENGTH($PIECE($GET(^FSCD("CALL USER",IEN,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+8 IF LIST=""
Begin DoDot:1
+9 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+10 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL USER","AUC",DUZ,CALL))
if CALL<1
QUIT
Begin DoDot:2
+11 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALL))
IF 'IEN
QUIT
+12 IF $LENGTH($PIECE($GET(^FSCD("CALL USER",IEN,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+13 QUIT
PNEX ;
+1 NEW IEN
+2 SET CODE=$PIECE(CODE,",",2)
+3 IF LIST=1!(LIST=0)
Begin DoDot:1
+4 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+5 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+6 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALL))
+7 IF '$LENGTH($PIECE($GET(^FSCD("CALL USER",IEN,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+8 IF LIST=""
Begin DoDot:1
+9 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
+10 ; *** only checking calls in call user file, not all calls
SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL USER","AUC",DUZ,CALL))
if CALL<1
QUIT
Begin DoDot:2
+11 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALL))
+12 IF '$LENGTH($PIECE($GET(^FSCD("CALL USER",IEN,NODE)),U,PIECE))
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+13 QUIT
POTHER ;
+1 NEW IEN
+2 SET CODE=$PIECE(CODE,",",2)
+3 SET NODE=+$PIECE(CODE,";")
SET PIECE=$PIECE(CODE,";",2)
SET CHECK="CVALUE"_COND_$SELECT(VALUE=+VALUE:VALUE,1:""""_$$UP^XLFSTR(VALUE)_"""")
+4 IF LIST=1!(LIST=0)
Begin DoDot:1
+5 SET CALL=0
FOR
SET CALL=$ORDER(^TMP("FSC USELIST",$JOB,CALL))
if CALL<1
QUIT
Begin DoDot:2
+6 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALL))
IF 'IEN
QUIT
+7 SET CVALUE=$$UP^XLFSTR($PIECE($GET(^FSCD("CALL USER",IEN,NODE)),U,PIECE))
IF $LENGTH(CVALUE)
IF @CHECK
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+8 IF LIST=""
Begin DoDot:1
+9 SET CALL=0
FOR
SET CALL=$ORDER(^FSCD("CALL USER","AUC",DUZ,CALL))
if CALL<1
QUIT
Begin DoDot:2
+10 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALL))
IF 'IEN
QUIT
+11 SET CVALUE=$$UP^XLFSTR($PIECE($GET(^FSCD("CALL USER",IEN,NODE)),U,PIECE))
IF $LENGTH(CVALUE)
IF @CHECK
XECUTE ACTION
End DoDot:2
End DoDot:1
QUIT
+12 QUIT