Kbase 19694: Error 3268 using 4GL Server Sockets in Batch Mode with Version 9.1
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
SYMPTOM(s):
Error 3268 with batch-mode Progress (bpro or mbpro)
Cannot WAIT-FOR input from a stream. (3268)
WAIT-FOR uses a 4GL server socket handle.
CAUSE:
Although the READ-RESPONSE event can be used in batch mode, it can generate a 3268 error if used in a WAIT-FOR statement where the socket handle you are waiting on has not yet received a connect event.
At run time, Progress checks whether or not the connect has been received. If the connect has not been received, the 3286 error appears because it is not logical to wait for a READ-RESPONSE event from a socket that is not connected.
FIX:
When using sockets to create a server for other clients to talk to, you must correctly handle the WAIT-FOR command in batch mode in order to avoid error 3268.
The WAIT-FOR statement uses two events that sockets generate; CONNECT and READ-RESPONSE.
Code a loop similar to the following so that the batch program can handle multiple users without error:
DO WHILE TRUE:
WAIT-FOR CONNECT OF hdlToSocket.
END.
The result loops after each client connection request is received from clients. You must code in this manner to enable multiple connections as well as to prevent the batch process from using considerable CPU time.