Kbase P65172: Developer events (U1 ... U10) not available in batch mode
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/12/2008 |
|
Status: Verified
SYMPTOM(s):
Developer events (U1 ... U10) not available in batch mode
** Attempt to read with no current source of input. (513)
Using WAIT-FOR "U1" OF THIS-PROCEDURE.
FACT(s) (Environment):
Batch client functioning as socket server
Progress 9.x
OpenEdge 10.0x
All Supported Operating Systems
CAUSE:
Enhancement request# 20040130-014
CAUSE:
This is expected behavior. Prior to OpenEdge 10.1A, the batch client only supports the following events:
PROCEDURE-COMPLETE : for the callback of RUN ASYNCHRONOUS statements
READ-RESPONSE and CONNECT : both for socket events
FIX:
Support for developer events in batch-mode was implemented in OpenEdge 10.1A.
Workaround:
Change the code so it doesn't require the developer event.
A common way to do this is to define a logical variable scoped to the entire procedure and check it's value periodically using loop containing a WAIT-FOR ... PAUSE .. statement. Based on this value, the loop is broken.
This logical variable is then set as required in any trigger procedures that are used.
Example:
DEFINE VARIABLE lEndProcedure AS LOGICAL NO-UNDO.
/* code to set up a socket-server */
REPEAT:
WAIT-FOR 'connect':U OF hServer PAUSE 1.
IF lEndProcedure THEN LEAVE.
END.
/* Event procedure to read data from socket */
PROCEDURE socketRead:
DEFINE VARIABLE cData AS CHARACTER.
/* unmarshall data from socket */
IF cData = "KillServer" THEN lEndProcedure = TRUE.
END.