source: IHS-VA_UTILITIES-XB/trunk/XBCNODE.m@ 808

Last change on this file since 808 was 642, checked in by Sam Habiel, 15 years ago

Modified directory structure; moved routines.

File size: 673 bytes
Line 
1XBCNODE ; IHS/ADC/GTH - COUNT ENTRIES IN GLOBAL NODE ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 ; This program counts unique values in a selected global
5 ; node.
6 ;
7START ;
8 NEW GBL,CC,NXT,L
9 W !!,"This program counts unique values in a global node.",!
10LOOP ;
11 R !,"Enter global reference like '^DPT(""B"",' ",GBL:$G(DTIME,300)
12 Q:GBL=""
13 S:$E(GBL,$L(GBL))=")" GBL=$E(GBL,1,$L(GBL)-1)
14 S:$E(GBL)'="^" GBL="^"_GBL
15 S:$F(GBL,"(")<1 GBL=GBL_"("
16 I $E(GBL,$L(GBL))'=",",$E(GBL,$L(GBL)-1)'="(",$E(GBL,$L(GBL))'="(" S GBL=GBL_","
17 S CC=0,NXT=""
18 F L=0:0 X "S NXT=$O("_GBL_"NXT))" Q:NXT="" S CC=CC+1 W:'(CC#50) "."
19 W !!,"Count for ",GBL," is ",CC,!
20 G LOOP
21 ;
Note: See TracBrowser for help on using the repository browser.