SQL Strings - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide

Product
Teradata Preprocessor2
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-19
dita:mapPath
whb1544831946911.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Apply these rules when using SQL strings in COBOL:

  1. Define the variable used as a SQL string as a varying character type.

    For information on declaring VARCHAR fields, see Host Variable Declaration.

  2. 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