SQL Strings |Teradata Preprocessor2 for Embedded SQL (PP2) - SQL Strings - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Preprocessor2
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
nyr1691484085721.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
xfi1470440464166
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 earlier:

    • EXECUTE IMMEDIATE
    • LOGON
    • PREPARE