AZXZBFIX ;07/27/92 JOHN H. LYNCH [ 05/01/95 1:25 PM ]
;FIXES A RANGE OF CROSS-REFERENCES
;THE GLOBAL, THE CROSS-REFERENCE AND
;THE RANGE OF INTERNAL ENTRY NUMBERS
;ARE SPECIFIED BY THE PROGRAMMER.›
MAIN ;MAIN PROGRAM CONTROL
;SET LOCAL VARIABLES
D ^XBKSET ; SET KERNEL PARAMETERS
S YN="N" ; DEFAULT TO "N" -NO
W @IOF ; CLEAR SCREEN
W !!,"This program will ask for a ^GLOBAL(, a CROSS-REFERENCE,"
W !,"and a RANGE of internal entry numbers to re-cross-reference."
W !!,"? = HELP"
W !,"^ = BACK UP TO PREVIOUS PROMPT"
GBLENTRY R !!,"ENTER GLOBAL TO RE-CROSS-REFERENCE //",GLOBAL
I GLOBAL?1.3"?" W !!,"ENTER GLOBAL IN THIS FORMAT: ^GLOBAL(",! G GBLENTRY
I GLOBAL="^" D KILLVARS Q
REFENTRY R !!,"ENTER THE CROSS-REFERENCE LETTER(S) //",REFER
I REFER?1.3"?" W !!,"ENTER CROSS-REFERENCE IN THIS FORMAT: AC",! G REFENTRY
I REFER="^" G GBLENTRY
INTENTRY R !!,"ENTER INTERNAL ENTRY NUMBER RANGE TO RE-CROSS-REFERENCE //",INUM
I INUM?1.3"?" W !!,"ENTER RANGE FOR INTERNAL ENTRY NUMBER IN THE FOLLOWING FORMAT: 10:100",! G INTENTRY
I INUM="^" G REFENTRY
FLDENTRY R !!,"ENTER FIELD NUMBER OF CROSS-REFERENCE TO RE-CROSS-REFERENCE //",FIELD
I FIELD?1.3"?" W !!,"ENTER FIELD NUMBER FOR THE CROSS-REFERENCE IN THIS FORMAT: EX. .01",! G FLDENTRY
I FIELD="^" G INTENTRY
;LAST CHANCE TO EDIT
W @IOF ; CLEAR SCREEN
W !!,"GLOBAL =",GLOBAL
W !,"CROSS-REFERENCE =",REFER
W !,"RANGE TO RE-CROSS-REFERENCE =",INUM
W !,"FIELD OF CROSS-REFERENCE =",FIELD
R !!,"ARE THESE PARAMETERS ALL CORRECT? N//",YN
I '"Yy"[YN W @IOF G GBLENTRY
;SET VARIABLES FOR ROUTINE "EN^DIK" TO USE
S DIK=GLOBAL
S DIK(1)=FIELD_"^"_REFER
S LNUM=$P(INUM,":",1)
S UNUM=$P(INUM,":",2)
;CALL "EN^DIK" USING INTERNAL ENTRY NUMBER RANGE
F DA=LNUM:1:UNUM D EN^DIK
D KILLVARS
Q
KILLVARS ;KILL ALL LOCAL VARIABLES
;K DIK,DIK(1),LNUM,UNUM,DA,GLOBAL,REFER,INUM,YN
Q
AZXZBFIX ;07/27/92 JOHN H. LYNCH [ 05/01/95 1:25 PM ]
+1 ;FIXES A RANGE OF CROSS-REFERENCES
+2 ;THE GLOBAL, THE CROSS-REFERENCE AND
+3 ;THE RANGE OF INTERNAL ENTRY NUMBERS
+4 ;ARE SPECIFIED BY THE PROGRAMMER.›
+5 MAIN ;MAIN PROGRAM CONTROL
+1 ;SET LOCAL VARIABLES
+2 ; SET KERNEL PARAMETERS
DO ^XBKSET
+3 ; DEFAULT TO "N" -NO
SET YN="N"
+4 +5 ; CLEAR SCREEN
WRITE @IOF
+6 WRITE !!,"This program will ask for a ^GLOBAL(, a CROSS-REFERENCE,"
+7 WRITE !,"and a RANGE of internal entry numbers to re-cross-reference."
+8 WRITE !!,"? = HELP"
+9 WRITE !,"^ = BACK UP TO PREVIOUS PROMPT"
GBLENTRY READ !!,"ENTER GLOBAL TO RE-CROSS-REFERENCE //",GLOBAL
+1 IF GLOBAL?1.3"?"
WRITE !!,"ENTER GLOBAL IN THIS FORMAT: ^GLOBAL(",!
GOTO GBLENTRY
+2 IF GLOBAL="^"
DO KILLVARS
QUIT
REFENTRY READ !!,"ENTER THE CROSS-REFERENCE LETTER(S) //",REFER
+1 IF REFER?1.3"?"
WRITE !!,"ENTER CROSS-REFERENCE IN THIS FORMAT: AC",!
GOTO REFENTRY
+2 IF REFER="^"
GOTO GBLENTRY
INTENTRY READ !!,"ENTER INTERNAL ENTRY NUMBER RANGE TO RE-CROSS-REFERENCE //",INUM
+1 IF INUM?1.3"?"
WRITE !!,"ENTER RANGE FOR INTERNAL ENTRY NUMBER IN THE FOLLOWING FORMAT: 10:100",!
GOTO INTENTRY
+2 IF INUM="^"
GOTO REFENTRY
+3 FLDENTRY READ !!,"ENTER FIELD NUMBER OF CROSS-REFERENCE TO RE-CROSS-REFERENCE //",FIELD
+1 IF FIELD?1.3"?"
WRITE !!,"ENTER FIELD NUMBER FOR THE CROSS-REFERENCE IN THIS FORMAT: EX. .01",!
GOTO FLDENTRY
+2 IF FIELD="^"
GOTO INTENTRY
+3 +4 ;LAST CHANCE TO EDIT
+5 ; CLEAR SCREEN
WRITE @IOF
+6 WRITE !!,"GLOBAL =",GLOBAL
+7 WRITE !,"CROSS-REFERENCE =",REFER
+8 WRITE !,"RANGE TO RE-CROSS-REFERENCE =",INUM
+9 WRITE !,"FIELD OF CROSS-REFERENCE =",FIELD
+10 READ !!,"ARE THESE PARAMETERS ALL CORRECT? N//",YN
+11 IF '"Yy"[YN
WRITE @IOF
GOTO GBLENTRY
+12 +13 ;SET VARIABLES FOR ROUTINE "EN^DIK" TO USE
+14 SET DIK=GLOBAL
+15 SET DIK(1)=FIELD_"^"_REFER
+16 SET LNUM=$PIECE(INUM,":",1)
+17 SET UNUM=$PIECE(INUM,":",2)
+18 +19 ;CALL "EN^DIK" USING INTERNAL ENTRY NUMBER RANGE
+20 FOR DA=LNUM:1:UNUM
DO EN^DIK
+21 DO KILLVARS
+22 QUIT
+23 KILLVARS ;KILL ALL LOCAL VARIABLES
+1 ;K DIK,DIK(1),LNUM,UNUM,DA,GLOBAL,REFER,INUM,YN
+2 QUIT