[613] | 1 | HLCSMON1 ;SF-Utilities for Driver Program ;07/17/2007 17:05
|
---|
| 2 | ;;1.6;HEALTH LEVEL SEVEN;**15,40,49,65,109,122**;Oct 13, 1995;Build 14
|
---|
| 3 | ;Per VHA Directive 2004-038, this routine should not be modified.
|
---|
| 4 | ;
|
---|
| 5 | ;This routine contains several entry points called from HLCSMON
|
---|
| 6 | ;no input parameters are required. All variables used which are
|
---|
| 7 | ;not newed here are newed in HLCSMON
|
---|
| 8 | ;
|
---|
| 9 | DISPLAY ;display link info
|
---|
| 10 | ;turn of line wrap
|
---|
| 11 | S HLXX=0,X=0 X ^%ZOSF("RM")
|
---|
| 12 | F S HLXX=$O(HLARYD(HLXX)) Q:(HLXX'>0) D WLINE(HLXX)
|
---|
| 13 | ;DISPLAY INCOMING FILER STATUS
|
---|
| 14 | ; patch HL*1.6*122
|
---|
| 15 | S HLXX=$P(HLRUNCNT,"^",1)
|
---|
| 16 | ; S HLXX=$$CNTFLR^HLCSUTL2("IN")
|
---|
| 17 | I (+HLXX)=-1 S HLXX=$$CNTFLR^HLCSUTL2("IN")
|
---|
| 18 | ;
|
---|
| 19 | ;ONLY UPDATE SCREEN IF COUNT HAS CHANGED
|
---|
| 20 | I (HLXX'=+HLRUNCNT) D
|
---|
| 21 | .D WDATA(5,17,"","",$J(" ",31)),WDATA^HLCSMON1(5,17,"","","Incoming filers running => ",35)
|
---|
| 22 | .I (HLXX) D WDATA(32,17,"","",HLXX)
|
---|
| 23 | .I ('HLXX) D WDATA(32,17,IOINHI,IOINORM,"Zero")
|
---|
| 24 | .S $P(HLRUNCNT,"^",1)=HLXX
|
---|
| 25 | ;DISPLAY OUTGOING FILER STATUS
|
---|
| 26 | ; patch HL*1.6*122
|
---|
| 27 | S HLXX=$P(HLRUNCNT,"^",2)
|
---|
| 28 | ; S HLXX=$$CNTFLR^HLCSUTL2("OUT")
|
---|
| 29 | I (+HLXX)=-1 S HLXX=$$CNTFLR^HLCSUTL2("OUT")
|
---|
| 30 | ;
|
---|
| 31 | ;ONLY UPDATE SCREEN IF COUNT HAS CHANGED
|
---|
| 32 | I (HLXX'=+$P(HLRUNCNT,"^",2)) D
|
---|
| 33 | .D WDATA(5,18,"","",$J(" ",31)),WDATA^HLCSMON1(5,18,"","","Outgoing filers running => ",35)
|
---|
| 34 | .I (HLXX) D WDATA(32,18,"","",HLXX)
|
---|
| 35 | .I ('HLXX) D WDATA(32,18,IOINHI,IOINORM,"Zero")
|
---|
| 36 | .S $P(HLRUNCNT,"^",2)=HLXX
|
---|
| 37 | S X=$$TM^%ZTLOAD
|
---|
| 38 | I X'=$G(HLTMSTAT) D
|
---|
| 39 | .S HLTMSTAT=X
|
---|
| 40 | .S HLXX=$S('HLTMSTAT:"***TASKMAN NOT RUNNING!!!***",1:"")
|
---|
| 41 | .I 'HLTMSTAT D WDATA^HLCSMON1(45,17,IOELEOL_IOBON_IORVON,IOBOFF_IORVOFF,HLXX) I 1
|
---|
| 42 | .E D WDATA(45,17,IOELEOL,"",$J("TaskMan running ",16)) ;D WDATA(5,19,IOELALL,"","")
|
---|
| 43 | S X=$$STAT^HLCSLM
|
---|
| 44 | I X'=$G(HLLMSTAT) D
|
---|
| 45 | .S HLLMSTAT=X Q:HLLMSTAT=3
|
---|
| 46 | .S HLXX=$S('HLLMSTAT:"***LINK MANAGER NOT RUNNING!!!***",1:"")
|
---|
| 47 | .I 'HLLMSTAT D WDATA^HLCSMON1(45,18,IOELEOL_IOBON_IORVON,IOBOFF_IORVOFF,HLXX) I 1
|
---|
| 48 | .E D WDATA^HLCSMON1(45,18,IOELEOL,"",$J("Link Manager running",18))
|
---|
| 49 | ;Turn terminal line wrap back on
|
---|
| 50 | D WDATA(45,19,IOELEOL,"",$$SLM^HLEVUTIL) ; HL*1.6*109
|
---|
| 51 | S X=IOM X ^%ZOSF("RM")
|
---|
| 52 | Q
|
---|
| 53 | ;
|
---|
| 54 | WLINE(HLXX) ;write line from HLARYD=current values, HLARYO=old values
|
---|
| 55 | ;if values haven't changed, don't do anything
|
---|
| 56 | I HLARYD(HLXX)]"",HLARYD(HLXX)=$G(HLARYO(HLXX)) Q
|
---|
| 57 | S HLARYO(HLXX)=HLARYD(HLXX),HLERR=$P(HLARYD(HLXX),U,8),DX=1
|
---|
| 58 | ; patch HL*1.6*122
|
---|
| 59 | ; F X=1:1:7 S @$P("HLNODE^HLREC^HLPROC^HLSEND^HLSENT^HLDEV^HLSTAT",U,X)=$E($P(HLARYD(HLXX),U,X)_" ",1,8)
|
---|
| 60 | F X=1,7 S @$P("HLNODE^HLREC^HLPROC^HLSEND^HLSENT^HLDEV^HLSTAT",U,X)=$E($P(HLARYD(HLXX),U,X)_" ",1,10)
|
---|
| 61 | F X=2:1:5 S @$P("HLNODE^HLREC^HLPROC^HLSEND^HLSENT^HLDEV^HLSTAT",U,X)=$E($P(HLARYD(HLXX),U,X)_" ",1,8)
|
---|
| 62 | S X=6,@$P("HLNODE^HLREC^HLPROC^HLSEND^HLSENT^HLDEV^HLSTAT",U,X)=$E($P(HLARYD(HLXX),U,X)_" ",1,7)
|
---|
| 63 | ;
|
---|
| 64 | ;if link is in error, write node in rev. video
|
---|
| 65 | I HLERR]"" D WDATA(5,HLXX,IOBON_IORVON,IOBOFF_IORVOFF,HLNODE,8) S DX=14
|
---|
| 66 | ;Turn off terminal line wrap & inform O/S where cursor is located
|
---|
| 67 | S DY=HLXX X IOXY,^%ZOSF("XY")
|
---|
| 68 | ; patch HL*1.6*122
|
---|
| 69 | W:HLERR="" ?4,HLNODE
|
---|
| 70 | W ?16,HLREC,?26,HLPROC,?37,HLSEND,?47,HLSENT,?58,HLDEV,?63,HLSTAT
|
---|
| 71 | ;
|
---|
| 72 | Q
|
---|
| 73 | ;
|
---|
| 74 | WDATA(DX,DY,IO1,IO2,HLDATA,HLENGTH) ;
|
---|
| 75 | ;
|
---|
| 76 | ;First erase the data block then write to it. Attributes are
|
---|
| 77 | ;contained in IO1 & IO2
|
---|
| 78 | ;
|
---|
| 79 | N X S X=0 X ^%ZOSF("RM") X ^%ZOSF("XY")
|
---|
| 80 | ;Turn off terminal line wrap & inform O/S where cursor is located
|
---|
| 81 | I '$D(HLENGTH) S HLENGTH=$L(HLDATA)
|
---|
| 82 | X IOXY W IOSC,$E($J(" ",79),1,HLENGTH),IORC W IO1,$E(HLDATA,1,HLENGTH),IO2
|
---|
| 83 | S X=IOM X ^%ZOSF("RM")
|
---|
| 84 | ;Turn terminal line wrap back on
|
---|
| 85 | Q
|
---|