INHVCRL1 ;KAC ; 8 Jul 95 15:58; Logon Server (LoS) Background Controller (continued)
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
;
Q
;
RESET(INBPN,INCHNL,INERR,INA,INIP,INUIF,INPARMS) ;
; Logon attempt by remote system has failed. Log the error, transmit
; negative acknowledgement to remote system (if requested), close LoS
; port.
;
; Input:
; INA - (opt) array containing either:
; 1) INA = UNIVERSAL INTERFACE IEN for outbound Ack
; (already processed by outbound script)
; 2) INA array subscripts, some or all of which have
; been defined, comprising a msg ready to be
; processed by outbound script
; 3) INA = Ack code - AA = application accept
; AE = application error
; AR = application reject
; 4) If INA is passed, but does NOT meet conditions
; in 1-3, default Ack code = AR
; If INA is NOT passed, do NOT send Ack.
; INBPN - (req) BACKGROUND PROCESS CONTROL IEN for LoS
; INCHNL - (req) TCP channel assigned to this server when connection
; is opened
; INDA - array containing information to be sent to an outbound
; destination. Not currently used.
; INDA = IEN in base file used by outbound script
; Subscripts may hold subfile IENs in the format:
; INDA(subfile #,DA)=""
; If NOT needed, set to -1 prior to running outbound script.
; INERR - (opt) array containing error msg used to log an error
; INIP - (opt) array containing initialization parameters from
; BACKGROUND PROCESS CONTROL file. Required to send Ack.
; INPARMS - (opt) inbound msg parameter array
; Format: INPARMS(INDSTP,"param")=value
; INUIF - (opt) UNIVERSAL INTERFACE IEN for inbound msg
; Required to "build" Ack.
;
; Variables:
; INERRACK - error information returned by function
; X - scratch
;
; Output:
; None.
;
N INERRACK,X
D:$D(INERR) LOG^INHVCRA1(.INERR,"E")
;
; Send Ack if requested
I $D(INA) D
. N INERR
.; Skip Ack creation if Ack was already built in UIF or in INA array
. I $S('$G(INA):1,'$D(^INTHU(INA)):1,1:0),$D(INA)<10 D
..; Create Ack in INA array
.. S X=$G(INA) K INA
..; Ck if user passed valid error Ack code
.. S INA("INSTAT")=$S(X="AE":X,1:"AR")
.. S INA("INACKTXT")="Invalid CHCS Logon Attempt"
.; Transmit negative Ack
. D LOG^INHVCRA1("Transmitting negative acknowledgement")
. S INERRACK=$$SNDAACK^INHVCRL2(INBPN,INCHNL,.INIP,.INA,.INDA,$G(INUIF),.INPARMS,1,.INERR)
. I INERRACK D LOG^INHVCRA1(.INERR,"E") Q ; error sending Ack
. D LOG^INHVCRA1("Successful transmission")
;
D LOG^INHVCRA1("Closing connection")
D CLOSE^INHVCRL(INBPN,INCHNL)
Q
;
INHVCRL1 ;KAC ; 8 Jul 95 15:58; Logon Server (LoS) Background Controller (continued)
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 ;
+4 QUIT
+5 ;
RESET(INBPN,INCHNL,INERR,INA,INIP,INUIF,INPARMS) ;
+1 ; Logon attempt by remote system has failed. Log the error, transmit
+2 ; negative acknowledgement to remote system (if requested), close LoS
+3 ; port.
+4 ;
+5 ; Input:
+6 ; INA - (opt) array containing either:
+7 ; 1) INA = UNIVERSAL INTERFACE IEN for outbound Ack
+8 ; (already processed by outbound script)
+9 ; 2) INA array subscripts, some or all of which have
+10 ; been defined, comprising a msg ready to be
+11 ; processed by outbound script
+12 ; 3) INA = Ack code - AA = application accept
+13 ; AE = application error
+14 ; AR = application reject
+15 ; 4) If INA is passed, but does NOT meet conditions
+16 ; in 1-3, default Ack code = AR
+17 ; If INA is NOT passed, do NOT send Ack.
+18 ; INBPN - (req) BACKGROUND PROCESS CONTROL IEN for LoS
+19 ; INCHNL - (req) TCP channel assigned to this server when connection
+20 ; is opened
+21 ; INDA - array containing information to be sent to an outbound
+22 ; destination. Not currently used.
+23 ; INDA = IEN in base file used by outbound script
+24 ; Subscripts may hold subfile IENs in the format:
+25 ; INDA(subfile #,DA)=""
+26 ; If NOT needed, set to -1 prior to running outbound script.
+27 ; INERR - (opt) array containing error msg used to log an error
+28 ; INIP - (opt) array containing initialization parameters from
+29 ; BACKGROUND PROCESS CONTROL file. Required to send Ack.
+30 ; INPARMS - (opt) inbound msg parameter array
+31 ; Format: INPARMS(INDSTP,"param")=value
+32 ; INUIF - (opt) UNIVERSAL INTERFACE IEN for inbound msg
+33 ; Required to "build" Ack.
+34 ;
+35 ; Variables:
+36 ; INERRACK - error information returned by function
+37 ; X - scratch
+38 ;
+39 ; Output:
+40 ; None.
+41 ;
+42 NEW INERRACK,X
+43 IF $DATA(INERR)
DO LOG^INHVCRA1(.INERR,"E")
+44 ;
+45 ; Send Ack if requested
+46 IF $DATA(INA)
Begin DoDot:1
+47 NEW INERR
+48 ; Skip Ack creation if Ack was already built in UIF or in INA array
+49 IF $SELECT('$GET(INA):1,'$DATA(^INTHU(INA)):1,1:0)
IF $DATA(INA)<10
Begin DoDot:2
+50 ; Create Ack in INA array
+51 SET X=$GET(INA)
KILL INA
+52 ; Ck if user passed valid error Ack code
+53 SET INA("INSTAT")=$SELECT(X="AE":X,1:"AR")
+54 SET INA("INACKTXT")="Invalid CHCS Logon Attempt"
End DoDot:2
+55 ; Transmit negative Ack
+56 DO LOG^INHVCRA1("Transmitting negative acknowledgement")
+57 SET INERRACK=$$SNDAACK^INHVCRL2(INBPN,INCHNL,.INIP,.INA,.INDA,$GET(INUIF),.INPARMS,1,.INERR)
+58 ; error sending Ack
IF INERRACK
DO LOG^INHVCRA1(.INERR,"E")
QUIT
+59 DO LOG^INHVCRA1("Successful transmission")
End DoDot:1
+60 ;
+61 DO LOG^INHVCRA1("Closing connection")
+62 DO CLOSE^INHVCRL(INBPN,INCHNL)
+63 QUIT
+64 ;