7 86 4 SELECT SQL Free Format Coercions

LANSA Technical

8.19.4 SELECT-SQL Free Format Coercions

Following are some examples of the results that may be expected when using SELECT_SQL when the column field type and the LANSA field type are not the same - thus coercion needs to occur.

Test Values were all numeric. If an Alpha/String contains non-numeric data, the coercion to numerics is undefined. It may result in 0, it may ignore non-numeric characters and convert the rest, and it may ABEND.

Note that overflow of a value is undefined. For example, if a number is too large to fit in to a field, it may truncate left or right or indeed be an indeterminate value. On IBM i, it is usually a fatal error.

Where NO is stated, a coercion is performed, but valid coercions are not common due to formatting requirements.

 Target Field Type

Windows Packed (63,0)

RDMLX IBM i Packed (63,0)

Windows Alpha

RDMLX IBM i Alpha

Windows Signed (63,0)

RDMLX IBM i Signed (63,0)

Windows Char (300)

RDMLX IBM i Char(300)

Windows Date

RDMLX IBM i Date

Windows Int 4

RDMLX IBM i Int 4

Char (65535)

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

ABEND

ABEND

Signed (63,0)

Yes

No

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Time

No

ABEND

No

ABEND

No

ABEND

No

ABEND

No

No

ABEND

ABEND

Date

No

ABEND

No

ABEND

No

ABEND

No

ABEND

Yes

Yes

ABEND

ABEND

Binary

Yes

Yes

Yes

ABEND

Yes

Yes

Yes

ABEND

No

No

ABEND

ABEND

Alpha

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

ABEND

ABEND

Signed (63,63)

Yes

No

Yes

Yes

Yes

Yes

Yes

Yes

No

No

Yes

Yes

Date Time

No

ABEND

No

ABEND

No

ABEND

No

ABEND

No

No

ABEND

ABEND

Packed (63,0)

Yes

Yes

Yes

Yes

Yes

No

Yes

Yes

Yes

Yes

Yes

Yes

Char (300)

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

ABEND

ABEND

Packed (63,63)

Yes

Yes

Yes

Yes

Yes

No

Yes

Yes

No

No

Yes

Yes

Integer (4)

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Float(8)

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes