I have a client/server app running. The Server portion runs a Cobol program
that is in a batch job.
The code for "IPCCREATE" works fine, no errors.
The code for "IPCRECVCN" hangs and timesout after about a minute.
MOVE ZEROES TO RESULT.
display "calling ipccreate..."
CALL INTRINSIC "IPCCREATE" using 3,
4,
\\,
PORT-OPT,
CALL-DESC,
RESULT
END-CALL.
A200-RECEIVE-CONNECTION.
display "calling ipcrecvcn on " WS-SD-MM '/' WS-SD-DD '/'
WS-SD-CC WS-SD-YY " at "
WS-ST-HH ':' WS-ST-MM ':'
WS-ST-SS "." WS-ST-TS.
call intrinsic "IPCRECVCN" USING CALL-DESC,
VC-DESC,
\\,
\\,
RESULT
END-CALL.
IF RESULT NOT = ZEROES THEN
MOVE RESULT TO WS-ERROR-CODE-2
MOVE 80 TO WS-ERROR-SIZE-2
CALL INTRINSIC "IPCERRMSG" USING WS-ERROR-CODE-2,
WS-ERROR-LINE,
WS-ERROR-SIZE-2,
RESULT
END-CALL
IF WS-ERROR-CODE-2 = 59 THEN
*Socket timeout
GO TO A200-IPCRECVCN
END-IF
The client portion is in a Vplus app and the code is :
INITIALIZE WS-ITEM-TABLE
LS-RESULT.
MOVE ZEROES TO WS-ERROR-CODE.
MOVE 18 TO WS-ITEM-NUM (1).
MOVE 19 TO WS-ITEM-NUM (2).
CALL INTRINSIC "NSINFO" USING \\, \\, \\
WS-ERROR-CODE,
WS-ITEM-NUM (1),
WS-ITEM (1)
WS-ITEM-NUM (2),
WS-ITEM (2)
END-CALL.
MOVE WS-ERROR-CODE TO RESULT.
IF RESULT NOT = ZEROES THEN
DISPLAY 'NSINFO FAILED'
GO TO Z999-FINISH-UP
END-IF.
MOVE WS-ITEM (2) TO TARGET-HOST.
MOVE SPACES TO WS-STOP-FLAG.
MOVE 50 TO WS-LENGTH.
PERFORM VARYING WS-SUB FROM 50 BY -1
UNTIL WS-SUB < 1 OR WS-STOP-FLAG = "Y"
IF TARGET-HOST(WS-SUB:1) NOT = SPACES THEN
MOVE WS-SUB TO WS-LENGTH
MOVE "Y" TO WS-STOP-FLAG
END-IF
END-PERFORM.
DISPLAY 'ITEMS=>' WS-ITEM (2) "<".
DISPLAY 'THE STATUS=>' WS-ERROR-CODE "<".
display "calling ipcdest..."
call intrinsic "ipcdest" using 3,
target-host,
WS-LENGTH,
4,
target-port,
2,
\\, \\,
dest-desc,
result
END-CALL.
The code for "IPCDEST" hangs and timesout after a minute.
Can anyone tell me how I get these two processes to communicate with each
other?
TIA,
Brian Donaldson.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|