skip to main content

Procedure Division Statements : RECEIVE

RECEIVE
General Format
RECEIVE Dest-Item FROM { THREAD Thread-1    } 
  [ ON EXCEPTION Imperative-Statement-1 ] 
  [ NOT ON EXCEPTION Imperative-Statement-2 ] 
  [END-RECEIVE]
Remaining-Phrases are optional and can appear in any order.
   BEFORE TIME Timeout  
   WITH NO WAIT         
  THREAD IN Thread-2 
  SIZE IN Size-Item 
  STATUS IN Status-Item
Syntax rules
1.
Dest-Item is any data item.
2.
Thread-1 and Thread-2 are usage HANDLE or HANDLE OF THREAD data items.
3.
Timeout is a numeric literal or data item.
4.
Size-Item and, Status-Item are numeric data items.
5.
Size-Item, Status-Item and Thread-2 cannot be indexed or reference modified.
6.
Status-Item is a two-character group item defined as, PIC X(02), or PIC 9(02).
7.
Imperative-Statement-1 and Imperative-Statement-2 are any imperative statements.
General rules
1.
A.
B.
C.
2.
3.
4.
5.
6.
7.
8.
Examples
Receive a message from a parent thread
receive msg-string from last thread
   before time 200
   not on exception
      if msg-string = "cancel thread"

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left