MYSQL File and File Variable Definition

  

Virtual Machine  

When defining an MySQL table in a PROIV File and File Variable Definition, the external file type MYSQL must be specified. PROIV fields should be defined with external data types as shown in the table below, for the appropriate MySQL data type to which they relate. When defining fields for MYSQL data type NUMBER the external storage format must define the required numeric precision and scale in the format:

{S}b.a

where S indicates a signed value, b is the number of digits before the decimal point, and a is the number of digits after the decimal point.

For example, a storage format of S8.2 defines a precision of 10 (ten digits total) and a scale of 2 (two digits after the decimal point including sign). Note that the MySQL column definition for such a numeric format is in fact NUMBER(10,2).

MySQL Data Type

PROIV Data Type

PROIV Maximum Length

PROIV External Datatype

PROIV External Storage Format

CHAR

A

1-250

ALPHA

{S}b.a

VARCHAR

A

1-250

ALPHA

{S}b.a

NUMERIC/DECIMAL

N

1-20

NUMBER

{S}b.a (2)

REAL/FLOAT

N

1-20

NUMBER/FLOAT

{S}b.a (2)

DOUBLE

N

1-20

NUMBER/DOUBLE

{S}b.a (2)

INTEGER (SMALLINT)

A, N or L(1)

1-20

NUMBER

{S}b.a

DATETIME (3)

A

8

DATE

n/a

DATETIME (3)

A, N or L(1)

5

DATE

n/a

MySQL Data Types and PROIV

(1) Type L is not allowed for Key variables.

(2) Only required when using PROIV Data Types N or L.

(3)   Note that the format used within PROIV is always a PROIV internal date (number of days since 31st Dec. 1799) for numerics and YYYYMMDD for alphas.

Comment on this topic

Topic ID: 720297

Table of Contents

Index

Glossary

-Search-

Back