Previous Topic: Placing an SQL StatementNext Topic: Including Tables


Defining Host Variables

What You Declare

You implicitly declare host variables for a CA ADS dialog when:

Any record element that is valid for a CA ADS MOVE command is valid as a host variable.

Note: For more information about ADSC and the MOVE command, see the CA ADS Reference Guide.

Equivalent Column Data Types

All CA IDMS data types are supported by CA ADS.

This table shows definitions of CA ADS host variable data types and the equivalent CA IDMS table column data types:

CA ADS PICTURE and USAGE clause

CA IDMS data type

PIC X(n) USAGE DISPLAY

CHAR(n)

01 name

49 name-LEN PIC S9(4) COMP

49 name-TEXT PIC X(n)

VARCHAR(n)

PIC S9(p-s)V9(s) USAGE COMP-3

DECIMAL(p,s)

PIC 9(p-s)V9(s) USAGE COMP-3

UNSIGNED DECIMAL(p,s)1

USAGE COMP-2

DOUBLE PRECISION

USAGE COMP-1

REAL

USAGE COMP-1

FLOAT

PIC S9(n) USAGE COMP

(where n<5)

SMALLINT

PIC S9(n) USAGE COMP

(where n>4 and n<10)

INTEGER

PIC S9(n) USAGE COMP

(where n>9)

LONGINT or BIGINT

PIC S9(p-s)V9(s) USAGE DISPLAY

NUMERIC(p,s)

PIC 9(p-s)V9(s) USAGE DISPLAY

UNSIGNED NUMERIC(p,s)1

PIC X(n) USAGE DISPLAY

BINARY(n)

PIC G(n) USAGE DISPLAY-1

GRAPHIC(n)1

01 name

49 name-LEN PIC S9(4) COMP

49 name-TEXT PIC G(n) DISPLAY-1

VARGRAPHIC(n)1

PIC X(10) USAGE DISPLAY

DATE

PIC X(8) USAGE DISPLAY

TIME

PIC X(26) USAGE DISPLAY

TIMESTAMP

PIC X(8) USAGE DISPLAY

TID1

Note: 1 This data type is a CA IDMS extension of the SQL standard. For more information about documentation of CA IDMS data types, see the CA IDMS SQL Reference Guide.