FSCQCS ;SLC/STAFF-NOIS Query Criteria Store ;4/22/94 11:55
;;1.1;NOIS;;Sep 06, 1998
;
STORE ; from FSCQB
S PREVS=STEP,PREVF=FIELDCNT,FIELDCNT=FIELDCNT+1
I ANDOR'="and" S STEP=STEP+1,FIELDCNT=1
S $P(CRITERIA(0),U,2)=STEP,CRITERIA(STEP)=FIELDCNT
S CRITERIA(STEP,FIELDCNT)=+FIELD_U_$P(COND,U,3)_U_$P(VALUE,U)
S CRITERIA(STEP,FIELDCNT,0)=$P(FIELD,U,2)_" "_$P(COND,U,5)_$S($L($P(VALUE,U,2)):" ",1:"")_$P(VALUE,U,2)
S CRITERIA(STEP,FIELDCNT,1)=ANDOR
I ANDOR="or",PAREN="open" S CRITERIA(PREVS,PREVF,0)=CRITERIA(PREVS,PREVF,0)_")",PAREN="closed"
I ANDOR="and",PAREN="ready" S CRITERIA(STEP,1,0)="("_CRITERIA(STEP,1,0),PAREN="open"
I ANDOR="or",PAREN="closed" S PAREN="ready"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCQCS 697 printed Dec 13, 2024@02:18:54 Page 2
FSCQCS ;SLC/STAFF-NOIS Query Criteria Store ;4/22/94 11:55
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
STORE ; from FSCQB
+1 SET PREVS=STEP
SET PREVF=FIELDCNT
SET FIELDCNT=FIELDCNT+1
+2 IF ANDOR'="and"
SET STEP=STEP+1
SET FIELDCNT=1
+3 SET $PIECE(CRITERIA(0),U,2)=STEP
SET CRITERIA(STEP)=FIELDCNT
+4 SET CRITERIA(STEP,FIELDCNT)=+FIELD_U_$PIECE(COND,U,3)_U_$PIECE(VALUE,U)
+5 SET CRITERIA(STEP,FIELDCNT,0)=$PIECE(FIELD,U,2)_" "_$PIECE(COND,U,5)_$SELECT($LENGTH($PIECE(VALUE,U,2)):" ",1:"")_$PIECE(VALUE,U,2)
+6 SET CRITERIA(STEP,FIELDCNT,1)=ANDOR
+7 IF ANDOR="or"
IF PAREN="open"
SET CRITERIA(PREVS,PREVF,0)=CRITERIA(PREVS,PREVF,0)_")"
SET PAREN="closed"
+8 IF ANDOR="and"
IF PAREN="ready"
SET CRITERIA(STEP,1,0)="("_CRITERIA(STEP,1,0)
SET PAREN="open"
+9 IF ANDOR="or"
IF PAREN="closed"
SET PAREN="ready"
+10 QUIT