15.10 - SQL Strings - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

Apply these rules when using SQL strings in COBOL:

  • Define the variable used as a SQL string as a varying character type.
  • See “Host Variable Declaration” on page 163 for information on declaring VARCHAR fields.

  • Meet these requirements for the host variable:
  • These statements require level 49 fields to have valid COBOL field names other than FILLER:
  • CHECKPOINT
  • DATABASE
  • SET CHARSET
  • For LPI COBOL, if a varying character host variable is not declared at level 01, name the first level 49 field other than FILLER for use with any SQL statement.
  • These statements allow level 49 fields to have either a valid COBOL field name or the keyword FILLER, except in the LPI COBOL case as stated above:
  • EXECUTE IMMEDIATE
  • LOGON
  • PREPARE