EVENTING

File 40
Statement FIND or PROCESS, depending on value in FUNCTION field.
Task Allows communication between Natural programs or Natural applications. This DDM enables Natural programs to send data to and receive data from other Natural programs, even if the partner program is located on another system running a different operating system.

Fields

Dictionary Field Name F/L Mu DE Remarks
ERROR-CODE N3      
ERROR-TEXT A58      
NODE N5   D  
NODE-NAME A16   D  
SYSTEM-MESSAGE-CODE A10      
FUNCTION A8   D Required, Unique.
EVENT-NAME A8   * *
MAX-TIME B4   * *
NUMBER-OF-WAITERS N5   * *
NUMBER-OF-MESSAGES N5   * *
MESSAGE-ARRAY A250 M7 * *

* See Field Descriptions, FUNCTION field: Matrix of statements, fields and functions.

Relevant Error Codes

Code Text
600 Unknown function.
886 Event is in use.
887 Event is already defined.
888 Event name must be specified.
890 Event does not exist.
891 Timeout waiting for event.
894 Enable eventing failed.
893 Getmain failed.

Field Descriptions

Which fields are relevant with which statement depends on the FUNCTION specified (see the description of the FUNCTION field, below).

Field Name Format/Length
EVENT-NAME (A8)

Name of the event.

Field Name Format/Length
FUNCTION (A8)

Specifies the action to be performed. Possible values:

Value Explanation
DEFINE  Define an event
DELETE  Delete an event
LIST  List events
POST  Post event
RECEIVE  Receive messages from event
SEND  Send message to event
WAIT  Wait for post of event (or timeout)
SENDPOST  Both SEND and POST.

Matrix of statements, fields and functions:

Key: R=Required, U=Unique, D=Descriptor

PROCESS Statement Functions
Fields DEFINE DELETE SEND WAIT POST
EVENT-NAME RUD RUD RUD RUD RUD
MAX-TIME       UD  
MESSAGE-ARRAY     RUD    
FIND Statement Functions
Fields RECEIVE LIST
EVENT-NAME RUD D
NUMBER-OF-WAITERS   D
MESSAGE-ARRAY D  
NUMBER-OF-MESSAGES   D
Field Name Format/Length
MAX-TIME (B4)

Maximum time (in seconds) you want to wait for a message to arrive. If no message arrives within this time you will get ERROR-CODE 891 (timeout).

Field Name Format/Length
MESSAGE-ARRAY (A250)   M7

Array of maximum 7 messages for SEND/RECEIVE functions.

Field Name Format/Length
NUMBER-OF-MESSAGES (N5)

Number of messages waiting to be received.

Field Name Format/Length
NUMBER-OF-WAITERS (N5)

Number of tasks waiting to be posted.

On this page