HLOT ;IRMFO-ALB/CJM - Services provided by the transport layer;03/24/2004 14:43
;;1.6;HEALTH LEVEL SEVEN;**126,131**;Oct 13, 1995;Build 10
;
;
READHDR(HLCSTATE,HDR) ;
N SUCCESS,SEG
N MCODE
S HLCSTATE("MESSAGE ENDED")=0
S MCODE="S SUCCESS=$$"_HLCSTATE("READ HEADER")_"(.HLCSTATE,.HDR)"
X MCODE
Q SUCCESS
;
READSEG(HLCSTATE,SEG) ;
N RETURN
N MCODE
S MCODE="S RETURN=$$"_HLCSTATE("READ SEGMENT")_"(.HLCSTATE,.SEG)"
X MCODE
Q RETURN
;
OPEN(HLCSTATE) ;
N MCODE
I '$L(HLCSTATE("OPEN")) S HLCSTATE("CONNECTED")=0 Q
S MCODE="D "_HLCSTATE("OPEN")_"(.HLCSTATE)"
X MCODE
Q
;
CLOSE(HLCSTATE) ;
N MCODE
S MCODE="D "_HLCSTATE("CLOSE")_"(.HLCSTATE)"
X MCODE
S HLCSTATE("CONNECTED")=0
Q
;
WRITESEG(HLCSTATE,SEG) ;
N RETURN
N MCODE
S MCODE="S RETURN=$$"_HLCSTATE("WRITE SEGMENT")_"(.HLCSTATE,.SEG)"
X MCODE
Q RETURN
;
WRITEHDR(HLCSTATE,HDR) ;
N SUCCESS
N MCODE
S MCODE="S SUCCESS=$$"_HLCSTATE("WRITE HEADER")_"(.HLCSTATE,.HDR)"
X MCODE
Q SUCCESS
;
ENDMSG(HLCSTATE) ;
N RETURN
N MCODE
S MCODE="S RETURN=$$"_HLCSTATE("END MESSAGE")_"(.HLCSTATE)"
X MCODE
Q RETURN
HLOT ;IRMFO-ALB/CJM - Services provided by the transport layer;03/24/2004 14:43
+1 ;;1.6;HEALTH LEVEL SEVEN;**126,131**;Oct 13, 1995;Build 10
+2 ;
+3 ;
READHDR(HLCSTATE,HDR) ;
+1 NEW SUCCESS,SEG
+2 NEW MCODE
+3 SET HLCSTATE("MESSAGE ENDED")=0
+4 SET MCODE="S SUCCESS=$$"_HLCSTATE("READ HEADER")_"(.HLCSTATE,.HDR)"
+5 XECUTE MCODE
+6 QUIT SUCCESS
+7 ;
READSEG(HLCSTATE,SEG) ;
+1 NEW RETURN
+2 NEW MCODE
+3 SET MCODE="S RETURN=$$"_HLCSTATE("READ SEGMENT")_"(.HLCSTATE,.SEG)"
+4 XECUTE MCODE
+5 QUIT RETURN
+6 ;
OPEN(HLCSTATE) ;
+1 NEW MCODE
+2 IF '$LENGTH(HLCSTATE("OPEN"))
SET HLCSTATE("CONNECTED")=0
QUIT
+3 SET MCODE="D "_HLCSTATE("OPEN")_"(.HLCSTATE)"
+4 XECUTE MCODE
+5 QUIT
+6 ;
CLOSE(HLCSTATE) ;
+1 NEW MCODE
+2 SET MCODE="D "_HLCSTATE("CLOSE")_"(.HLCSTATE)"
+3 XECUTE MCODE
+4 SET HLCSTATE("CONNECTED")=0
+5 QUIT
+6 ;
WRITESEG(HLCSTATE,SEG) ;
+1 NEW RETURN
+2 NEW MCODE
+3 SET MCODE="S RETURN=$$"_HLCSTATE("WRITE SEGMENT")_"(.HLCSTATE,.SEG)"
+4 XECUTE MCODE
+5 QUIT RETURN
+6 ;
WRITEHDR(HLCSTATE,HDR) ;
+1 NEW SUCCESS
+2 NEW MCODE
+3 SET MCODE="S SUCCESS=$$"_HLCSTATE("WRITE HEADER")_"(.HLCSTATE,.HDR)"
+4 XECUTE MCODE
+5 QUIT SUCCESS
+6 ;
ENDMSG(HLCSTATE) ;
+1 NEW RETURN
+2 NEW MCODE
+3 SET MCODE="S RETURN=$$"_HLCSTATE("END MESSAGE")_"(.HLCSTATE)"
+4 XECUTE MCODE
+5 QUIT RETURN