XBHEDD2 ;402,DJB,10/23/91,EDD - Screen prompt ; keeps track of pages
;;2.6;IHS UTILITIES;;JUN 28, 1993
;;David Bolduc - Togus, ME
TOP S PAGETEMP=PAGE D ASK
I Z1="B" S PAGETEMP=PAGE-1 D MOVE
I Z1?1.N S PAGETEMP=Z1 D MOVE
I Z1="I" S PAGETEMP=PAGE D ^XBHEDD3 Q:FLAGE D MOVE
I Z1="N" S PAGETEMP=PAGE D ^XBHEDD9 Q:FLAGE D MOVE
I Z1="?" S PAGETEMP=PAGE D ^XBHEDD14,MOVE
Q:FLAGQ!FLAGE I FLAGL,Z1="" Q
S PAGE=PAGE+1,YCNT=1 W @IOF W:IO'=IO(0) !!! D HD
Q
ASK ;
S FLAGQ=0 I $Y'>SIZE F I=$Y:1:SIZE W !
W !,$E(ZLINE,1,IOM),!," B=Backup N=Node I=Indiv Fld Sum 'num'=Jump(1 to TOP)",?57,"|",?69,"| TOP: ",PAGE
W !," <RETURN>=Continue ^=Quit ^^=Exit ?=Help",?57,"|",?69,"| CUR: ",PAGETEMP
F I=1:1:18 W *8
R "Select: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1
S:$E(Z1)="0" Z1=+Z1 S:Z1["." Z1=Z1\1
Q
MOVE ;
W @IOF W:IO'=IO(0) !!! D HD S PAGETEMP=$S(PAGETEMP<1:1,PAGETEMP>PAGE:PAGE,1:PAGETEMP)
S H="" F I=0:0 S H=$O(^UTILITY($J,"LIST",PAGETEMP,H)) Q:H="" S ZZH=^UTILITY($J,"LIST",PAGETEMP,H) S ZONE=$P(ZZH,U),ZTWO=$P(ZZH,U,2),ZTHREE=$P(ZZH,U,3) W !?2,$J(ZONE,12),?17,$J(ZTWO,8),?28,ZTHREE
D ASK Q:FLAGQ
I Z1="B" S PAGETEMP=PAGETEMP-1 G MOVE
I Z1?1.N S PAGETEMP=Z1 G MOVE
I Z1="I" D ^XBHEDD3 Q:FLAGE G MOVE
I Z1="N" D ^XBHEDD9 Q:FLAGE G MOVE
I Z1="?" D ^XBHEDD14 G MOVE
S PAGETEMP=PAGETEMP+1 Q:PAGETEMP>PAGE
G MOVE
HD ;Heading
W !?2,"NODE ; PIECE",?17,"FLD NUM",?48,"FIELD NAME",!?2,"------------",?17,"--------",?28,"-------------------------------------------------"
Q
XBHEDD2 ;402,DJB,10/23/91,EDD - Screen prompt ; keeps track of pages
+1 ;;2.6;IHS UTILITIES;;JUN 28, 1993
+2 ;;David Bolduc - Togus, ME
TOP SET PAGETEMP=PAGE
DO ASK
+1 IF Z1="B"
SET PAGETEMP=PAGE-1
DO MOVE
+2 IF Z1?1.N
SET PAGETEMP=Z1
DO MOVE
+3 IF Z1="I"
SET PAGETEMP=PAGE
DO ^XBHEDD3
IF FLAGE
QUIT
DO MOVE
+4 IF Z1="N"
SET PAGETEMP=PAGE
DO ^XBHEDD9
IF FLAGE
QUIT
DO MOVE
+5 IF Z1="?"
SET PAGETEMP=PAGE
DO ^XBHEDD14
DO MOVE
+6 IF FLAGQ!FLAGE
QUIT
IF FLAGL
IF Z1=""
QUIT
+7 SET PAGE=PAGE+1
SET YCNT=1
WRITE @IOF
IF IO'=IO(0)
WRITE !!!
DO HD
+8 QUIT
ASK ;
+1 SET FLAGQ=0
IF $Y'>SIZE
FOR I=$Y:1:SIZE
WRITE !
+2 WRITE !,$EXTRACT(ZLINE,1,IOM),!," B=Backup N=Node I=Indiv Fld Sum 'num'=Jump(1 to TOP)",?57,"|",?69,"| TOP: ",PAGE
+3 WRITE !," <RETURN>=Continue ^=Quit ^^=Exit ?=Help",?57,"|",?69,"| CUR: ",PAGETEMP
+4 FOR I=1:1:18
WRITE *8
+5 READ "Select: ",Z1:DTIME
IF '$TEST
SET Z1="^"
IF Z1["^"
SET FLAGQ=1
IF Z1="^^"
SET FLAGE=1
+6 IF $EXTRACT(Z1)="0"
SET Z1=+Z1
IF Z1["."
SET Z1=Z1\1
+7 QUIT
MOVE ;
+1 WRITE @IOF
IF IO'=IO(0)
WRITE !!!
DO HD
SET PAGETEMP=$SELECT(PAGETEMP<1:1,PAGETEMP>PAGE:PAGE,1:PAGETEMP)
+2 SET H=""
FOR I=0:0
SET H=$ORDER(^UTILITY($JOB,"LIST",PAGETEMP,H))
IF H=""
QUIT
SET ZZH=^UTILITY($JOB,"LIST",PAGETEMP,H)
SET ZONE=$PIECE(ZZH,U)
SET ZTWO=$PIECE(ZZH,U,2)
SET ZTHREE=$PIECE(ZZH,U,3)
WRITE !?2,$JUSTIFY(ZONE,12),?17,$JUSTIFY(ZTWO,8),?28,ZTHREE
+3 DO ASK
IF FLAGQ
QUIT
+4 IF Z1="B"
SET PAGETEMP=PAGETEMP-1
GOTO MOVE
+5 IF Z1?1.N
SET PAGETEMP=Z1
GOTO MOVE
+6 IF Z1="I"
DO ^XBHEDD3
IF FLAGE
QUIT
GOTO MOVE
+7 IF Z1="N"
DO ^XBHEDD9
IF FLAGE
QUIT
GOTO MOVE
+8 IF Z1="?"
DO ^XBHEDD14
GOTO MOVE
+9 SET PAGETEMP=PAGETEMP+1
IF PAGETEMP>PAGE
QUIT
+10 GOTO MOVE
HD ;Heading
+1 WRITE !?2,"NODE ; PIECE",?17,"FLD NUM",?48,"FIELD NAME",!?2,"------------",?17,"--------",?28,"-------------------------------------------------"
+2 QUIT