ATSCNT ;TUCSON/DG;COUNT THE NUMBER OF ENTRIES IN A SEARCH TEMPLATE [ 10/25/91 1:41 PM ]
;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
;
S U="^"
ASK S DIC("A")="Select a TEMPLATE: ",DIC="^DIBT(",DIC(0)="QAEZ",DIC("S")="I $D(^(1))" D ^DIC K DIC G:"^"[X X I Y<0 W !,"Try again" G ASK
I Y<0 G X
I $D(^DIBT(+Y,1,0)) S I=^(0)+1 W ! G DIS
EN ; - EP -
S ATS=0 W !,"Counting",! F I=1:1 S ATS=$O(^DIBT(+Y,1,ATS)) Q:'ATS W:'(I#100) $C(13),I
DIS W *7,$C(13),(I-1)_$S(I-1=1:" ENTRY",1:" ENTRIES")_" STORED IN THIS TEMPLATE"
X K ATS,I Q
;
ATSCNT ;TUCSON/DG;COUNT THE NUMBER OF ENTRIES IN A SEARCH TEMPLATE [ 10/25/91 1:41 PM ]
+1 ;;2.5;SEARCH TEMPLATE COMPARISON;;OCT 25, 1991
+2 ;
+3 SET U="^"
ASK SET DIC("A")="Select a TEMPLATE: "
SET DIC="^DIBT("
SET DIC(0)="QAEZ"
SET DIC("S")="I $D(^(1))"
DO ^DIC
KILL DIC
IF "^"[X
GOTO X
IF Y<0
WRITE !,"Try again"
GOTO ASK
+1 IF Y<0
GOTO X
+2 IF $DATA(^DIBT(+Y,1,0))
SET I=^(0)+1
WRITE !
GOTO DIS
EN ; - EP -
+1 SET ATS=0
WRITE !,"Counting",!
FOR I=1:1
SET ATS=$ORDER(^DIBT(+Y,1,ATS))
IF 'ATS
QUIT
IF '(I#100)
WRITE $CHAR(13),I
DIS WRITE *7,$CHAR(13),(I-1)_$SELECT(I-1=1:" ENTRY",1:" ENTRIES")_" STORED IN THIS TEMPLATE"
X KILL ATS,I
QUIT
+1 ;