- ZIBCLU ; IHS/ADC/GTH - GENERAL PURPOSE CLEAN UP UTILITY GLOBALS - DRIVER TO GET UCI ; [ 02/07/97 3:02 PM ]
- ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
- ;
- ;THIS ROUTINE WILL INITIATE A JOB RUNNING ^%ZIBCLU0 IN EACH UCI
- ;AND THEN WAIT 5 SECONDS TO ELAPSE BEFORE GETTING THE NEXT UCI
- ;SKIP THE UCI THIS TASK IS IN AND THEN RUN ^%ZIBCLU0 HERE
- ; - %ZIBCLU0 WILL REMOVE ALL DANGLING ^UTILITY,^XUTL,^ZUT ENTRIES
- ;THIS ROUTINE IS USUALLY STARTED VIA TASKMAN BY SCHEDULING
- ;THE -ZIBCLU- OPTION WHICH RUNS THIS ROUTINE
- ;
- ;DSM ONLY - $ZU(ZIBI) RETURNS <NOUCI> ERROR AT END OF UCI LIST
- ;MSM ONLY - $ZU(ZIBI) RETURNS -NULL- VALUE AT END OF UCI LIST
- ;
- W !,*7,"Entry not permitted here!"
- Q
- ;
- EN ;
- S X="%ZIBCLU0"
- D RCHK^XB
- I $G(XBFAIL) W:'$D(ZTQUEUED) !,"Cannot proceed because ^%ZIBCLU0 is not in MGR" Q
- S $ZT="ZT^ZIBCLU"
- F ZIBI=1:1 S ZIBUCI=$ZU(ZIBI) Q:ZIBUCI="" I ZIBUCI'=$ZU(0) J ^%ZIBCLU0[ZIBUCI] H 5
- D ^%ZIBCLU0 ; CLEAN UP THIS UCI
- ZT ;END OF UCI LIST
- I $ZV?1"DSM".E&($ZE'?1"<NOUCI>".E) D ^%ET
- S $ZT=""
- KILL XBFAIL,ZIBI,ZIBUCI
- Q
- ;
- ZIBCLU ; IHS/ADC/GTH - GENERAL PURPOSE CLEAN UP UTILITY GLOBALS - DRIVER TO GET UCI ; [ 02/07/97 3:02 PM ]
- +1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
- +2 ;
- +3 ;THIS ROUTINE WILL INITIATE A JOB RUNNING ^%ZIBCLU0 IN EACH UCI
- +4 ;AND THEN WAIT 5 SECONDS TO ELAPSE BEFORE GETTING THE NEXT UCI
- +5 ;SKIP THE UCI THIS TASK IS IN AND THEN RUN ^%ZIBCLU0 HERE
- +6 ; - %ZIBCLU0 WILL REMOVE ALL DANGLING ^UTILITY,^XUTL,^ZUT ENTRIES
- +7 ;THIS ROUTINE IS USUALLY STARTED VIA TASKMAN BY SCHEDULING
- +8 ;THE -ZIBCLU- OPTION WHICH RUNS THIS ROUTINE
- +9 ;
- +10 ;DSM ONLY - $ZU(ZIBI) RETURNS <NOUCI> ERROR AT END OF UCI LIST
- +11 ;MSM ONLY - $ZU(ZIBI) RETURNS -NULL- VALUE AT END OF UCI LIST
- +12 ;
- +13 WRITE !,*7,"Entry not permitted here!"
- +14 QUIT
- +15 ;
- EN ;
- +1 SET X="%ZIBCLU0"
- +2 DO RCHK^XB
- +3 IF $GET(XBFAIL)
- IF '$DATA(ZTQUEUED)
- WRITE !,"Cannot proceed because ^%ZIBCLU0 is not in MGR"
- QUIT
- +4 SET $ZT="ZT^ZIBCLU"
- +5 FOR ZIBI=1:1
- SET ZIBUCI=$ZU(ZIBI)
- IF ZIBUCI=""
- QUIT
- IF ZIBUCI'=$ZU(0)
- JOB ^%ZIBCLU0[ZIBUCI]
- HANG 5
- +6 ; CLEAN UP THIS UCI
- DO ^%ZIBCLU0
- ZT ;END OF UCI LIST
- +1 IF $ZV?1"DSM".E&($ZE'?1"<NOUCI>".E)
- DO ^%ET
- +2 SET $ZT=""
- +3 KILL XBFAIL,ZIBI,ZIBUCI
- +4 QUIT
- +5 ;