Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABSPOSAS

ABSPOSAS.m

Go to the documentation of this file.
  1. ABSPOSAS ; IHS/FCS/DRS - Low-level SEND claim ; [ 08/21/2002 9:13 AM ]
  1. ;;1.0;PHARMACY POINT OF SALE;**2**;JUN 21, 2001;Build 38
  1. Q
  1. ;
  1. ; Modem - low-level message send
  1. ; SENDREQ is main
  1. ;
  1. ;IHS/SD/lwj 6/7/02 need to add a line feed when the system is
  1. ; Cache.
  1. ;
  1. ;IHS/SD/lwj 8/19/02 we were getting "invalid version" and
  1. ;"corrupted" response messages after the switch to Cache and
  1. ; only at the Cache sites. From the research, it appeared that
  1. ; the buffer was not being cleared all the way. David Slauenwhite,
  1. ; Hoarce Whitt, and Intersystems, determined that rather than a
  1. ; "!" (cr/lf) we needed to W *-3 after each send. The code
  1. ; has been changed, and it appears has solved the problems.
  1. ;
  1. ;
  1. SENDREQ(DIALOUT,MSG) ;EP -
  1. ; (Don't modify MSG; caller may have called with .MSG)
  1. N IO S IO=$$IO^ABSPOSA(DIALOUT) U IO
  1. I $$T1DIRECT^ABSPOSA(DIALOUT) D
  1. . W $TR($J($L(MSG),4)," ","0"),MSG ; write message length, then msg
  1. . ;I ^%ZOSF("OS")["OpenM" W ! ;IHS/SD/lwj 6/7/02 LF for Cache
  1. . I ^%ZOSF("OS")["OpenM" W *-3 ;IHS/SD/lwj 8/19/02 for Cache
  1. . D LOG^ABSPOSL($T(+0)_" - T1 LINE - SEND - "_$L(MSG)_"+4 characters")
  1. E D
  1. . N STX,ETX S STX=$C(2),ETX=$C(3)
  1. . N X S X="SENDZE^"_$T(+0),@^%ZOSF("TRAP")
  1. . W STX,MSG,ETX,$$LRC^ABSPOSAD(MSG_ETX)
  1. . D LOG^ABSPOSL($T(+0)_" - MODEM - SEND - "_$L(MSG)_"+3 characters")
  1. ; SAVECOPY - uncomment for development debugging
  1. ;D SAVECOPY^ABSPOSAY(MSG,"C")
  1. Q:$Q 0 Q
  1. SENDZE D LOGZE("SENDREQ") Q
  1. SENDCHAR(DIALOUT,CHAR) N IO S IO=$$IO^ABSPOSA(DIALOUT) U IO W CHAR Q
  1. SENDACK(DIALOUT) ;EP -
  1. D SENDCHAR(DIALOUT,$C(6)) Q
  1. SENDNAK(DIALOUT) ;EP -
  1. D SENDCHAR(DIALOUT,$C(21)) Q
  1. SENDEOT(DIALOUT) D SENDCHAR(DIALOUT,$C(4)) Q
  1. SENDETB(DIALOUT) ;EP -
  1. D SENDCHAR(DIALOUT,$C(23)) Q
  1. LOGZE(WHERE) D LOG^ABSPOSL($T(+0)_" - MODEM - "_WHERE_" - $ZE="_$$ZE^ABSPOS) Q