3. Embedded QUEL for COBOL : COBOL Variables and Data Types : Variable Usage : Elementary Data Items
 
Share this page                  
Elementary Data Items
The following syntax refers to a simple scalar-valued data item (numeric, alphanumeric, or alphabetic):
simplename
The following program fragment demonstrates a typical error handling paragraph. The data items "BUFFER" and "SECONDS" are scalar-valued variables.
DATA DIVISION.
WORKING-STORAGE SECTION.

##   01 SECONDS       PIC S9(4) USAGE COMP.
##   01 BUFFER        PIC X(100).

##  DECLARE.

* Program code

ERROR-HANDLE.
##    MESSAGE BUFFER. 
##    SLEEP SECONDS.

* More error code.