Declaration of fixed length and variable length graphic host variables in COBOL embedded SQL applications

Fixed-length and variable-length graphic host variables that you declare in your embedded COBOL application are treated as if they were declared in a COBOL program. You can use host variables to exchange data between the embedded application and the database manager.

Following is the syntax for graphic host variables.

Fixed Length

Read syntax diagramSkip visual syntax diagram0177variable-namePICTUREPICISpicture-string USAGEISDISPLAY-1 VALUEISvalue.

Variable Length

Read syntax diagramSkip visual syntax diagram01variable-name .
Read syntax diagramSkip visual syntax diagram49identifier-1 PICTUREPICISS9(4)USAGEISCOMP-5COMPUTATIONAL-5VALUEISvalue.
Read syntax diagramSkip visual syntax diagram49identifier-2 PICTUREPICISpicture-string USAGEISDISPLAY-1 VALUEISvalue.
Graphic Host Variable Considerations:
  1. Picture-string must have the form G(m). Alternatively, G's can be expanded (for example, "GGG" instead of "G(3)").
  2. m is from 1 to 127 for fixed-length strings.
  3. m is from 1 to 16 350 for variable-length strings.
  4. If m is greater than 16 336, the host variable will be treated as a LONG VARGRAPHIC string, and its use might be restricted.