Product
Natural 9.1.4
EntireX Version 10.8.0.7
EntireX Attach Manager Version 10.8.7
Red Hat LInux
trying to use Attach Manager to manage the instances of a RPC server that is manually started now and works fine. but if we start it in attach manager we get this message
2024-02-06 10:03:38 Checking ETB031:1971:TCP, CST2AST/CARESVS/CALLNAT
2024-02-06 10:03:38 0 active server, 1 active attach manager, 0 pending conversa
tions
2024-02-06 10:03:38 Seems to be a One-Way server, take PendingConv into account
2024-02-06 10:03:38 Adjusted PendingStarts: 0 LastActive, 0 IsActive, 1 → 1 Pen
dingStarts
2024-02-06 10:03:38 0 LastPendCnv, 0 CurrPendCnv, 0 ConvDone
2024-02-06 10:03:38 0 active server, 1 active attach manager, 0 pending conversa
tions
2024-02-06 10:03:38 Waiting …
is there something we need to do to get this to work or will the server need to be rewritten
i am not a developer and have no idea, opened a ticket and got told what a one way server was but no help in resolving this so any assistance will be appreciated.
the program
0010***********************************************************************
0020*
0030* This CARES Entire-X server program can send multiple replies to a
0040* single request. It accepts as input a message from a client program
0050* in the form: FUNC(a20) DATA(a30000)
0060* It sends back the requested data in blocks of 30K and then ends the
0070* conversation
0080*
0090***********************************************************************
0100define data
0110local using CR0003A1 /* BROKER parameters
0120local using EQUATES /* BROKER variables
0130local using CR0002A1 /* Send and Receive Buffers
0140local using IV0004A1 /* IVR-CARES Subprogram Table
0150local using IV0003L1 /* IVR-CARES-LOG
0160local
0170**
018001 USR1053L
0190 02 inputs
0200 03 env-variable (a80)
0210 02 outputs
0220 03 char-string (a253)
0230 03 redefine char-string
0240 04 environment (a4)
0250 03 redefine char-string
0260 04 hostname (A7)
0270 03 response (i04)
0280**
029001 environment (a4)
030001 redefine environment
0310 02 #env(a2)
032001 #save-conv-id (a16)
033001 #tmp-id-pgm (a8)
034001 #diary-isn (n11)
035001 #this-pgm (a8)
0360end-define
0370**
0380if device eq ‘BATCH’ and
0390 data gt 0
0400 input #diary-isn
0410end-if
0420
0430 Get the Environment
0440*
0450env-variable := ‘APPUSER’
0460callnat ‘USR1053N’ USR1053L
0470#environment := usr1053l.environment
0480*
0490* Set up the EntireX broker service to be used
0500*
0510assign #diagnostic = true
0520assign server-class = ‘CST2AST’
0530assign server-name = ‘CARESVS’
0540assign service = ‘VS0666P1’
0550examine #env and translate into upper
0560* decide on first value of #env
0570* value ‘QA’ broker-id := ‘localhost:1972’
0580* value ‘UA’ broker-id := ‘localhost:1973’
0590* none broker-id := ‘localhost:1971’
0600* end-decide
0610*
0620broker-id := ‘localhost:1971’
0630*
0640* ------------------------------------------
0650* Setup the static control block assignments
0660* ------------------------------------------
0670*
0680assign aci-type = 1 /* must always be 1
0690assign aci-version = 3 /* version of control block used
0700assign user-id = USER
0710assign token = ’ ’
0720assign wait = ‘30M’ / wait 30 Minutes
0730assign send-len = 30020
0740assign receive-len = 30020
0750assign return-len = 20
0760assign errtext-len = 40
0770assign conversation-status = 0
0780assign store-message = 0
0790assign message-status = 0
0800assign att-del-count = 0
0810assign unit-of-work-status = 0
0820assign unit-of-work-time = ’ ’
0830assign unit-of-work-id = ’ ’
0840assign unit-of-work-user-status = ’ ’
0850assign unit-of-work-status-persistance = 0
0860
0870
0880****************************************************************
0890* Logon to broker. If an error is returned, logoff and stop
0900****************************************************************
0910assign option = null
0920assign function = logon
0930perform CALL-BROKER
0940if error-code ne ‘00000000’
0950 perform BROKER-LOGOFF
0960 terminate 70
0970end-if
0980
0990****************************************************************
1000* Register the service. if an error is returned, logoff and stop
1010****************************************************************
1020assign function = register
1030perform CALL-BROKER
1040if error-code ne ‘00000000’
1050 perform BROKER-LOGOFF
1060 terminate 71
1070end-if
1080
1090****************************************************************
1100* Receive the request and act accordingly
1110****************************************************************
1120r1. repeat
1130
1140 fetch return ‘ADA3009’ /* a do nothing call - this reads one cif
1150/* record to avoid an adabas timeout error
1160
1170 assign wait = ‘30M’
1180 assign option = NULL
1190 assign conv-id = ‘NEW’
1200 assign function = RECEIVE
1210 perform CALL-BROKER
1220 if error-code = ‘00740074’ /* service time out due to no requests
1230 then
1240 escape top
1250 end-if
1260 if error-code ne ‘00000000’
1270 then
1280 perform BROKER-LOGOFF
1290 terminate 72
1300 end-if
1310
1320 assign #save-conv-id = conv-id
1330*
1340* If a STOP request is sent, reply to the message and stop the
1350* server
1360*
1370 if substr(#receive-control-info,1,4) = ‘STOP’
1380 move ‘OK’ to #send-control-info
1390 move ‘STOPPING SERVICE’ to #send-data
1400 assign function = send
1410 assign option = eoc
1420 assign wait = ‘NO’
1430 assign conv-id = #save-conv-id
1440 perform CALL-BROKER
1450 perform BROKER-LOGOFF
1460 stop
1470 end-if
1480*
1490* Call the appropriate subprograms to send the requested data
1500*
1510 reset IV0004A1
1520 IV0004A1.srm-func := ‘GET’
1530 IV0004A1.srm-id := #receive-control-info
1540 CALLNAT ‘IV0004N1’ IV0004A1
1550 move IV0004A1.srm-natpgm to #tmp-id-pgm
1560**
1570 IF IV0004A1.srm-fdbk eq ‘OK’
1580 callnat #tmp-id-pgm
1590 CR0002A1
1600 CONTROL-BLOCK-ARRAY()
1610 SEND-BUFFER()
1620 RECEIVE-BUFFER()
1630 ERROR-TEXT
1640 DIAGNOSTIC-SWITCH
1650 escape top
1660 end-if
1670
1680* If the request was not STOP or a valid function
1690* on the generic table, return an error to the client
1700*
1710 move ‘NOTOK’ to #send-control-info
1720 move ‘INVALID MESSAGE’ to #send-data
1730 assign function = send
1740 assign option = eoc
1750 assign wait = ‘NO’
1760 assign conv-id = #save-conv-id
1770 perform CALL-BROKER
1780end-repeat
1790
1800*
1810* Subroutine to deregister and logoff from EntireX broker.
1820*
1830define subroutine BROKER-LOGOFF
1840assign option = null
1850assign function = deregister
1860perform CALL-BROKER
1870assign function = logoff
1880perform CALL-BROKER
1890end-subroutine
1900
1910*
1920* Subroutine to call EntireX broker and write to Log File
1930*
1940INCLUDE IV0003C1 /* Call Broker and Write to Log File
1950
1960ON ERROR
1970 perform BROKER-LOGOFF
1980 #this-pgm := *program
1990 fetch #this-pgm
2000END-ERROR
2010end
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq List: IV0003C1 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x 0010 ******************************************************************** x
x 0020 * x
x 0030 * Copycode: IV0003C1 x
x 0040 * x
x 0050 * Function: Call ‘BROKER’ - Receive / Send Messages. x
x 0060 * Create a log entry for Receive/Send messages x
x 0070 * (IVR/Cares) / (LINK\4) as well as other calls to BROKER x
x 0080 * x
x 0090 * Author: JHamid x
x 0100 * x
x 0110 * Date: 04July2011 x
x 0120 * x
x 0130 * Modifications: x
x 0140 *********************************************************************** x
x 0150 * log# CSR# Date Programmer Description x
x 0160 * ---- ---- ----- ---------- ------------------------------------ x
x 0170 * #00 26663 Jul,2011 J.Hamid New Module x
x 0180 * #01 26663 Sep,2011 D.Appelman Do not log timeout error x
x 0190 *********************************************************************** x
x 0200 * x
x 0210 DEFINE SUBROUTINE CALL-BROKER x
x 0220 *********************************** x
x 0230 CALL ‘BROKER’ CONTROL-BLOCK-ARRAY() x
x 0240 #SEND-BUFFER x
x 0250 #RECEIVE-BUFFER x
x 0260 ERROR-TEXT x
x 0270 #DIAGNOSTIC x
x 0280 PERFORM CREATE-LOG x
x 0290 END-SUBROUTINE x
x 0300 * x
x 0310 DEFINE SUBROUTINE CREATE-LOG x
x 0320 *********************************** x
x 0330 IF ERROR-CODE EQ ‘00740074’ / #01 x
x 0340 ESCAPE ROUTINE /* #01 x
x 0350 END-IF /* #01 x
x 0360 RESET ICL x
x 0370 PERFORM TRANSLATE-FUNCTION x
x 0380 PERFORM TRANSLATE-OPTION x
x 0390 ICL.IC-LOG-DT := *DATN x
x 0400 MOVE EDITED *TIMX (EM=HHIISST) TO x
x 0410 ICL.IC-LOG-TIME x
x 0420 ICL.IC-CONVERSATION-ID := CONV-ID x
x 0430 IF #SEND-CONTROL-INFO = ‘NOTOK’ x
x 0440 ICL.IC-MSG-ERROR := #SEND-DATA x
x 0450 END-IF x
x 0460 ICL.IC-SERVER-CLASS := SERVER-CLASS x
x 0470 ICL.IC-SERVER-NAME := SERVER-NAME x
x 0480 ICL.IC-SERVICE := SERVICE x
x 0490 ICL.IC-CLIENT-USER-ID := CLIENT-USER-ID x
x 0500 ICL.IC-ENTIREX-RET-CODE := ERROR-CODE x
x 0510 ICL.IC-NATURAL-PGM := *PROGRAM x
x 0520 ICL.IC-NATURAL-ERROR := *ERROR x
x 0530 IF *ERROR GT 0 x
x 0540 ICL.IC-PGM-LINE-NUMBER := *ERROR-LINE x
x 0550 ELSE x
x 0560 ICL.IC-PGM-LINE-NUMBER := 0 x
x 0570 END-IF x
x 0580 STORE ICL x
x 0590 END TRANSACTION x
x 0600 END-SUBROUTINE x
x 0610 * x
x 0620 DEFINE SUBROUTINE TRANSLATE-FUNCTION x
x 0630 ************************************ x
x 0640 DECIDE ON FIRST VALUE OF FUNCTION x
x 0650 VALUE 1 x
x 0660 ASSIGN ICL.IC-MSG-STATUS := ‘SEND’ x
x 0670 ICL.IC-MSG-COMMAND := #SEND-CONTROL-INFO x
x 0680 VALUE 2 x
x 0690 ASSIGN ICL.IC-MSG-STATUS := ‘RECEIVE’ x
x 0700 ICL.IC-MSG-COMMAND := #RECEIVE-CONTROL-INFO x
x 0710 VALUE 6 x
x 0720 ASSIGN ICL.IC-MSG-STATUS := ‘REGISTER’ x
x 0730 VALUE 7 x
x 0740 ASSIGN ICL.IC-MSG-STATUS := ‘DEREGISTER’ x
x 0750 VALUE 9 x
x 0760 ASSIGN ICL.IC-MSG-STATUS := ‘LOGON’ x
x 0770 VALUE 10 x
x 0780 ASSIGN ICL.IC-MSG-STATUS := ‘LOGOFF’ x
x 0790 NONE x
x 0800 IGNORE x
x 0810 END-DECIDE x
x 0820 END-SUBROUTINE x
x 0830 * x
x 0840 DEFINE SUBROUTINE TRANSLATE-OPTION x
x 0850 ********************************** x
x 0860 DECIDE ON FIRST VALUE OF OPTION x
x 0870 VALUE 5 x
x 0880 ASSIGN ICL.IC-MSG-STATUS := ‘EOC’ x
x 0890 NONE x
x 0900 IGNORE x
x 0910 END-DECIDE x
x 0920 END-SUBROUTINE x
x 0930 * x
this is the program