AGAIN ;$ORDER THRU "B" X-REF ROUTINE [ 08/10/01 9:46 AM ]
;This Routine $ORDERS THRU "B" X-REF
;THE "B" X-REF IS THE .01 FIELD OF THE GLOBAL
;
START ;
S NAME=""
F S NAME=$ORDER(^CLASSGBL("B",NAME)) Q:NAME="" D SECOND
Q
;
SECOND ;
F RECNR=0:0 S RECNR=$ORDER(^CLASSGBL("B",NAME,RECNR)) Q:RECNR="" D DISPLAY
Q
;
DISPLAY ;
W !,NAME,?30,RECNR
;You can use this RECNR to access other pieces of the Data Node
W ?35,$PIECE(^CLASSGBL(RECNR,0),"^",2)
W ?60,$PIECE(^CLASSGBL(RECNR,0),"^",3)
Q
AGAIN ;$ORDER THRU "B" X-REF ROUTINE [ 08/10/01 9:46 AM ]
+1 ;This Routine $ORDERS THRU "B" X-REF
+2 ;THE "B" X-REF IS THE .01 FIELD OF THE GLOBAL
+3 ;
START ;
+1 SET NAME=""
+2 FOR
SET NAME=$ORDER(^CLASSGBL("B",NAME))
IF NAME=""
QUIT
DO SECOND
+3 QUIT
+4 ;
SECOND ;
+1 FOR RECNR=0:0
SET RECNR=$ORDER(^CLASSGBL("B",NAME,RECNR))
IF RECNR=""
QUIT
DO DISPLAY
+2 QUIT
+3 ;
DISPLAY ;
+1 WRITE !,NAME,?30,RECNR
+2 ;You can use this RECNR to access other pieces of the Data Node
+3 WRITE ?35,$PIECE(^CLASSGBL(RECNR,0),"^",2)
+4 WRITE ?60,$PIECE(^CLASSGBL(RECNR,0),"^",3)
+5 QUIT