ABSPOSAZ ; IHS/FCS/DRS - JWS, ; [ 09/12/2002 10:07 AM ]
;;1.0;PHARMACY POINT OF SALE;**3**;JUN 21, 2001;Build 38
Q
; $$GETSTAT returns $ZA^$ZB values
GETSTAT(DIALOUT) ;
N IO S IO=$$IO^ABSPOSA(DIALOUT)
U IO Q $ZA_"^"_$ZB Q
; $$STATRPT displays info about a TCP terminal server connection (MSM)
STATRPT(DIALOUT) ; report $ZA, $ZB for the socket
;
N ZA,ZB S ZA=$$GETSTAT(DIALOUT),ZB=$P(ZA,"^",2),ZA=$P(ZA,"^") U $P
W "$ZA = characters left in input buffer = ",ZA,!
W "$ZB = ",ZB," " I ZB=0 W "(okay)",! Q
I ZB>0 W "operating system error code",!
E I ZB=-1 W "end of input"
E I ZB=-2 W "socket not allocated"
E I ZB=-3 W "operation timed out"
E I ZB=-4 W "BREAK key"
E I ZB=-5 W "no server allocated (MSM-Unix)"
E I ZB=-6 W "socket already exists"
E I ZB=-7 W "no resource"
E I ZB=-8 W "license limit exceeded"
E I ZB=-9 W "socket operation failed (see docu)"
E I ZB=-10 W "variable length read timed out"
E W "(unknown reason?)"
W !
Q
ABSPOSAZ ; IHS/FCS/DRS - JWS, ; [ 09/12/2002 10:07 AM ]
+1 ;;1.0;PHARMACY POINT OF SALE;**3**;JUN 21, 2001;Build 38
+2 QUIT
+3 ; $$GETSTAT returns $ZA^$ZB values
GETSTAT(DIALOUT) ;
+1 NEW IO
SET IO=$$IO^ABSPOSA(DIALOUT)
+2 USE IO
QUIT $ZA_"^"_$ZB
QUIT
+3 ; $$STATRPT displays info about a TCP terminal server connection (MSM)
STATRPT(DIALOUT) ; report $ZA, $ZB for the socket
+1 ;
+2 NEW ZA,ZB
SET ZA=$$GETSTAT(DIALOUT)
SET ZB=$PIECE(ZA,"^",2)
SET ZA=$PIECE(ZA,"^")
USE $PRINCIPAL
+3 WRITE "$ZA = characters left in input buffer = ",ZA,!
+4 WRITE "$ZB = ",ZB," "
IF ZB=0
WRITE "(okay)",!
QUIT
+5 IF ZB>0
WRITE "operating system error code",!
+6 IF '$TEST
IF ZB=-1
WRITE "end of input"
+7 IF '$TEST
IF ZB=-2
WRITE "socket not allocated"
+8 IF '$TEST
IF ZB=-3
WRITE "operation timed out"
+9 IF '$TEST
IF ZB=-4
WRITE "BREAK key"
+10 IF '$TEST
IF ZB=-5
WRITE "no server allocated (MSM-Unix)"
+11 IF '$TEST
IF ZB=-6
WRITE "socket already exists"
+12 IF '$TEST
IF ZB=-7
WRITE "no resource"
+13 IF '$TEST
IF ZB=-8
WRITE "license limit exceeded"
+14 IF '$TEST
IF ZB=-9
WRITE "socket operation failed (see docu)"
+15 IF '$TEST
IF ZB=-10
WRITE "variable length read timed out"
+16 IF '$TEST
WRITE "(unknown reason?)"
+17 WRITE !
+18 QUIT