Examples of ACCEPT Statements

The following example displays the string of EBCDIC characters in the array Z, from the beginning of the array to the EBCDIC null character (48"00).

ACCEPT(POINTER(Z,8))

The following example displays the contents of string STR on the ODT. If a response is available, the string "THANK YOU." is displayed. If no response is available, the string "PLEASE REENTER." is displayed.

IF ACCEPT(STR) THEN
   DISPLAY("THANK YOU.")
ELSE
   DISPLAY("PLEASE REENTER.")