Name
VAR— define a variable
Synopsis
VAR varname IS ctype
Description
The VAR command defines a host variable. It is equivalent to an ordinary COBOL variable definition insidea declare section.
When translating , a level number 01 is added. Thus, the level number must not to be specified externally.
To define a group item, a level number needs to be specified to the each subordinate items.
For reasons of internal implementation, "VAR" must be placed just after "EXEC SQL", without containing newline. For other place, you can use newline.
Parameters
A COBOL variable name.
A COBOL type specification.
Examples
EXEC SQL VAR VC IS PIC X(10) VARYING. END-EXEC. EXEC SQL VAR BOOL-VAR IS BOOL. END-EXEC.
Compatibility
The VAR command is a PostgreSQL extension.