XBFLD2 ; IHS/ADC/GTH - INITIALIZATION FOR ^XBFLD ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; Part of XBFLD
;
; ^UTILITY("XBDSET",$J, is used to store the list of files
; to be listed so that other software can pass files to be
; listed to the external entry point EN^XBFLD, and the other
; software could select files by using ^XBDSET.
;
INIT ; INITIALIZATION
NEW XBFILE
D ^XBKVAR
KILL ^UTILITY($J),^UTILITY("XBDSET",$J)
S XBQFLG=0
D ^XBDSET
S:'$D(^UTILITY("XBDSET",$J)) XBQFLG=1
Q:XBQFLG
D FORMAT^XBFLD
D DEVICE ; Get device
Q
;
DEVICE ; GET DEVICE (QUEUEING ALLOWED)
XBLM ;
S Y=$$DIR^XBDIR("S^P:PRINT Output;B:BROWSE Output on Screen","Do you wish to ","P","","","",1)
KILL DA
Q:$D(DIRUT)
I Y="B" S XBFLD("BROWSE")=1 D VIEWR^XBLM("EN^XBFLD"),FULL^VALM1 W:$D(IOF) @IOF D Q
. D CLEAR^VALM1 ;clears out all list man stuff
. KILL XQORNEST,VALMKEY,VALM,VALMAR,VALMBCK,VALMBG,VALMCAP,VALMCNT,VALMOFF,VALMCON,VALMDN,VALMEVL,VALMIOXY,VALMKEY,VALMLFT,VALMLST,VALMMENU,VALMSGR,VALMUP,VALMWD,VALMY,XQORS,XQORSPEW,VALMCOFF
XBLME .Q
S %ZIS="Q"
D ^%ZIS
I POP S XBQFLG=1 KILL POP Q
I $D(IO("Q")) D S XBQFLG=1 Q
. S ZTRTN="EN^XBFLD",ZTIO=ION,ZTDESC="List dictionary",ZTSAVE("^UTILITY(""XBDSET"",$J,")="",ZTSAVE("XBFMT")=""
. D ^%ZTLOAD
. W !!,$S($D(ZTSK):"Request queued!",1:"Request cancelled!")
. D ^%ZISC
. KILL ZTSK,IO("Q")
. KILL ZTIO ; ^%ZTLOAD kills other ZT* variables, but not this one
.Q
U IO
Q
;
XBFLD2 ; IHS/ADC/GTH - INITIALIZATION FOR ^XBFLD ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; Part of XBFLD
+4 ;
+5 ; ^UTILITY("XBDSET",$J, is used to store the list of files
+6 ; to be listed so that other software can pass files to be
+7 ; listed to the external entry point EN^XBFLD, and the other
+8 ; software could select files by using ^XBDSET.
+9 ;
INIT ; INITIALIZATION
+1 NEW XBFILE
+2 DO ^XBKVAR
+3 KILL ^UTILITY($JOB),^UTILITY("XBDSET",$JOB)
+4 SET XBQFLG=0
+5 DO ^XBDSET
+6 IF '$DATA(^UTILITY("XBDSET",$JOB))
SET XBQFLG=1
+7 IF XBQFLG
QUIT
+8 DO FORMAT^XBFLD
+9 ; Get device
DO DEVICE
+10 QUIT
+11 ;
DEVICE ; GET DEVICE (QUEUEING ALLOWED)
XBLM ;
+1 SET Y=$$DIR^XBDIR("S^P:PRINT Output;B:BROWSE Output on Screen","Do you wish to ","P","","","",1)
+2 KILL DA
+3 IF $DATA(DIRUT)
QUIT
+4 IF Y="B"
SET XBFLD("BROWSE")=1
DO VIEWR^XBLM("EN^XBFLD")
DO FULL^VALM1
IF $DATA(IOF)
WRITE @IOF
Begin DoDot:1
+5 ;clears out all list man stuff
DO CLEAR^VALM1
+6 KILL XQORNEST,VALMKEY,VALM,VALMAR,VALMBCK,VALMBG,VALMCAP,VALMCNT,VALMOFF,VALMCON,VALMDN,VALMEVL,VALMIOXY,VALMKEY,VALMLFT,VALMLST,VALMMENU,VALMSGR,VALMUP,VALMWD,VALMY,XQORS,XQORSPEW,VALMCOFF
XBLME QUIT
End DoDot:1
QUIT
+1 SET %ZIS="Q"
+2 DO ^%ZIS
+3 IF POP
SET XBQFLG=1
KILL POP
QUIT
+4 IF $DATA(IO("Q"))
Begin DoDot:1
+5 SET ZTRTN="EN^XBFLD"
SET ZTIO=ION
SET ZTDESC="List dictionary"
SET ZTSAVE("^UTILITY(""XBDSET"",$J,")=""
SET ZTSAVE("XBFMT")=""
+6 DO ^%ZTLOAD
+7 WRITE !!,$SELECT($DATA(ZTSK):"Request queued!",1:"Request cancelled!")
+8 DO ^%ZISC
+9 KILL ZTSK,IO("Q")
+10 ; ^%ZTLOAD kills other ZT* variables, but not this one
KILL ZTIO
+11 QUIT
End DoDot:1
SET XBQFLG=1
QUIT
+12 USE IO
+13 QUIT
+14 ;