[613] | 1 | IVM2077P ;ALB/EJG - Patch Post-Install functions IVM*2*77;03/11/2003; 9/20/01 4:16pm
|
---|
| 2 | ;;2.0;INCOME VERIFICATION;**77**;21-OCT-94
|
---|
| 3 | ;
|
---|
| 4 | EN ;ENTRY POINT
|
---|
| 5 | ;
|
---|
| 6 | N ADDR,PORT,STATION,TCPDATA,AN,RLLN,SLLN,STOP,VER,DA,FILE,RET,ERROR
|
---|
| 7 | ;
|
---|
| 8 | ; Get site's Station #
|
---|
| 9 | S STATION=$P($$SITE^VASITE,"^",3)
|
---|
| 10 | ;
|
---|
| 11 | S STOP=0
|
---|
| 12 | Q:$$SETLL16(STATION,.RLLN,.SLLN)
|
---|
| 13 | D PROTOCOL(STATION,RLLN,SLLN,.AN)
|
---|
| 14 | Q
|
---|
| 15 | ;
|
---|
| 16 | SETLL16(STATION,RLLN,SLLN) ;
|
---|
| 17 | ;INPUT STATION = Station #
|
---|
| 18 | ; RLLN = Receiving Logical Link Name
|
---|
| 19 | ; SLLN = Sending Logical Link Name
|
---|
| 20 | ;
|
---|
| 21 | ;OUTPUT 0 : Success, 1 : Error
|
---|
| 22 | ;
|
---|
| 23 | ;PURPOSE Create the Receiving and Sending Logical Link.
|
---|
| 24 | ;
|
---|
| 25 | N ADDR,PORT,RECVLL,SENDLL,RET,VISN,M,IENS
|
---|
| 26 | ;
|
---|
| 27 | S PORT=33001 ;e*Gate Port#
|
---|
| 28 | ;
|
---|
| 29 | ; Sending Logical Link
|
---|
| 30 | S SLLN="LLEDBOUT"
|
---|
| 31 | ;S ADDR="10.224.132.101" ;e*Gate development
|
---|
| 32 | S ADDR="10.224.132.103" ;e*Gate production
|
---|
| 33 | S RET=$$LL16(SLLN,ADDR,PORT)
|
---|
| 34 | I +RET<0 D ERROR(RET,"Edb Send Link:"_SLLN) Q 1
|
---|
| 35 | ;
|
---|
| 36 | RLL ; Receiving Logical Link
|
---|
| 37 | S RLLN="LLEDBIN"
|
---|
| 38 | S ADDR=""
|
---|
| 39 | S PORT=5000 ;all stations production
|
---|
| 40 | S RET=$$LL16(RLLN,ADDR,PORT)
|
---|
| 41 | I +RET<0 D ERROR(RET,"Edb Receive Link:"_RLLN) Q 1
|
---|
| 42 | LL16EXIT Q STOP
|
---|
| 43 | ;
|
---|
| 44 | ;
|
---|
| 45 | PROTOCOL(STATION,RLLN,SLLN,AN) ;
|
---|
| 46 | ;INPUT STATION = Station #
|
---|
| 47 | ; RLLN = Receiving Logical Link Name
|
---|
| 48 | ; SLLN = Sending Logical Link Name
|
---|
| 49 | ; AN = Array containing the Application Names
|
---|
| 50 | ;
|
---|
| 51 | ;OUTPUT None
|
---|
| 52 | ;
|
---|
| 53 | ;PURPOSE Update the protocols (Subscriber and Event Driver) for the
|
---|
| 54 | ; Edb/e*Gate TCP/IP interfaces
|
---|
| 55 | ;
|
---|
| 56 | N RESULT,SIEN,DUZ,V,N,N1,LNCNT,LINE,PROTRET,NAM
|
---|
| 57 | S DISABTXT=""
|
---|
| 58 | F NAM="EAS EDB ORU-Z06 SERVER","EAS EDB ORU-Z09 SERVER" D
|
---|
| 59 | . S RESULT=$$EDP(NAM,DISABTXT)
|
---|
| 60 | . I +RESULT<0 D ERROR(RESULT,"Event Driver:"_NAM)
|
---|
| 61 | Q
|
---|
| 62 | ;
|
---|
| 63 | ERROR(ERRMSG,SUBJ) ;
|
---|
| 64 | ;INPUT ERRMSG = Error Message text
|
---|
| 65 | ; SUBJ = Subject of the Message
|
---|
| 66 | ;
|
---|
| 67 | ;OUTPUT none
|
---|
| 68 | ;
|
---|
| 69 | ;PURPOSE Display an error message to the user. Set the
|
---|
| 70 | ; variable STOP=1 which will stop the routine
|
---|
| 71 | ; from continuing to run after an error is found.
|
---|
| 72 | ;
|
---|
| 73 | N TXT
|
---|
| 74 | S STOP=1
|
---|
| 75 | S TXT=$P(ERRMSG,"^",2)
|
---|
| 76 | W !,"===================================================="
|
---|
| 77 | W !,"= ERROR ="
|
---|
| 78 | W !,"===================================================="
|
---|
| 79 | W !,"When creating "_SUBJ
|
---|
| 80 | W !,"===================================================="
|
---|
| 81 | W !,"**ERROR MSG: ",TXT
|
---|
| 82 | Q
|
---|
| 83 | ;
|
---|
| 84 | ;Update Functions
|
---|
| 85 | ;
|
---|
| 86 | LL16(LLNAME,TCPADDR,TCPPORT) ;
|
---|
| 87 | ;INPUT LLNAME = Logical Link Name (ex. "LLEDBOUT")
|
---|
| 88 | ; TCPADDR = TCP/IP Address
|
---|
| 89 | ; TCPPORT = TCP/IP Port #
|
---|
| 90 | ;
|
---|
| 91 | ;OUTPUT IEN of entry (#870) Success
|
---|
| 92 | ; -1^Error Message Error
|
---|
| 93 | ;
|
---|
| 94 | ;PURPOSE Update a Logical Link for TCP/IP transmissions.
|
---|
| 95 | ;
|
---|
| 96 | N FILE,DATA,RETURN,DEFINED,ERROR,DA,DGENDA
|
---|
| 97 | S FILE=870
|
---|
| 98 | ; If already exists then skip
|
---|
| 99 | ;
|
---|
| 100 | S IEN870=$O(^HLCS(870,"B",LLNAME,0)) ;IEN TO UPDATE
|
---|
| 101 | I 'IEN870 D Q RETURN ;IEN NOT FOUND - RETURN ERROR
|
---|
| 102 | . S ERROR="IEN OF RECORD TO BE UPDATED NOT SPECIFIED"
|
---|
| 103 | . S RETURN=-1_"^"_ERROR
|
---|
| 104 | ;
|
---|
| 105 | ; set v1.6 field values
|
---|
| 106 | S DATA(400.01)=TCPADDR ;TCP/IP ADDRESS
|
---|
| 107 | S DATA(400.02)=TCPPORT ;TCP/IP PORT
|
---|
| 108 | ;
|
---|
| 109 | S RETURN=$$UPD^DGENDBS(FILE,IEN870,.DATA,.ERROR)
|
---|
| 110 | S:ERROR'=""!(+RETURN=0) RETURN=-1_"^"_ERROR
|
---|
| 111 | ;
|
---|
| 112 | Q RETURN
|
---|
| 113 | ;
|
---|
| 114 | EDP(PNAME,DTXT) ;
|
---|
| 115 | ;INPUT PNAME = Protocol Name
|
---|
| 116 | ; DTXT = Disable Text
|
---|
| 117 | ;
|
---|
| 118 | ;OUTPUT IEN entry (#101) of Event Driver Protocol Success
|
---|
| 119 | ; -1^Error Message Error
|
---|
| 120 | ;
|
---|
| 121 | ;PURPOSE Activate the Event Driver Protocol
|
---|
| 122 | ;
|
---|
| 123 | N DATA,FILE,DGENDA,RETURN,ERROR,DA
|
---|
| 124 | S FILE=101
|
---|
| 125 | ; If already exists then skip
|
---|
| 126 | ;
|
---|
| 127 | S IEN101=$O(^ORD(101,"B",PNAME,0))
|
---|
| 128 | I 'IEN101 D Q RETURN ;IEN NOT FOUND - RETURN ERROR
|
---|
| 129 | . S ERROR="IEN OF RECORD TO BE UPDATED NOT SPECIFIED"
|
---|
| 130 | . S RETURN=-1_"^"_ERROR
|
---|
| 131 | ;
|
---|
| 132 | S DATA(2)=DTXT ;DISABLE TEXT
|
---|
| 133 | S RETURN=$$UPD^DGENDBS(FILE,IEN101,.DATA,.ERROR)
|
---|
| 134 | I ERROR'=""!(+RETURN=0) S RETURN=-1_"^"_ERROR G EDPEXIT
|
---|
| 135 | ;
|
---|
| 136 | EDPEXIT Q RETURN
|
---|
| 137 | ;
|
---|