Skip Headers

Oracle® Application Server Integration Adapter for VSAM Installation and User's Guide
10g (9.0.4)

Part Number B10457-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

B
Datatype Support

The Oracle Application Server Integration Adapter for VSAM supports a number of datatypes that are used when defining metadata for both the VSAM data source and VSAM backend adapter in Oracle Studio. The datatypes are mapped from the COBOL datatypes during the import procedure.


Note:

The mapping of datatypes between Oracle Application Server Integration Adapter for VSAM and Oracle Application Server ProcessConnect is performed internally by Oracle Connect for VSAM.


This appendix contains the following sections:

Datatype Mapping for the VSAM Data Source

The following table shows the mapping performed to generate metadata for a VSAM data source from COBOL copybooks.

The COBOL datatype COMP, in the table is an abbreviation for, and synonymous with, COMPUTATIONAL. Square brackets ([ ]) denote optional qualifiers for some COBOL compilers, which may not be allowed for other COBOL compilers.

Table B-1  Datatype Mapping: COBOL and VSAM Data Source
COBOL Datatype Oracle Connect Datatype Details

BINARY (3 <= size < 5 with fractional data)

scaled_int2

Signed word integer

Size = 2 bytes
Range: -32768 to +32767

BINARY (3 <= size < 5 without fractional data)

int2

Signed word integer

Size = 2 bytes

BINARY (5 <= size < 10 with fractional data)

scaled_int4

Signed longword

Size = 4 bytes
Range: -2147483648 to +2147483647

BINARY (5 <= size < 10 without fractional data)

int4

Signed longword

Size = 4 bytes

BINARY (size < 3 with fractional data)

scaled_int1

Signed byte integer

Size = 1 byte
Range: -128 to +127

BINARY (size < 3 without fractional data)

int1

Signed byte integer

Size = 1 byte

BINARY (size >= 10 with fractional data)

scaled_int8

Signed quadword

Size = 8 bytes
Range: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

BINARY (size >= 10 without fractional data)

int8

Signed quadword

Size = 8 bytes

COMP (3 <= size < 5 with fractional data)

scaled_int2

Signed word integer

Size = 2 bytes
Range: -32768 to +32767

COMP (3 <= size < 5 without fractional data)

int2

Signed word integer

Size = 2 bytes

COMP (5 <= size < 10 with fractional data)

scaled_int4

Signed longword

Size = 4 bytes
Range: -2147483648 to +2147483647

COMP (5 <= size < 10 without fractional data)

int4

Signed longword

Size = 4 bytes

COMP (size < 3 with fractional data)

scaled_int1

Signed byte integer

Size = 1 byte
Range: -128 to +127

COMP (size < 3 without fractional data)

int1

Signed byte integer

Size = 1 byte

COMP-2

dfloat

Double floating point number

Size = 8 bytes
Range: 0.29E-38 to 1.7E38
Precision: 16 digits

COMP-3

decimal

Packed decimal

Maximum number of digits = 31
Maximum fractions = 11
Length = int (number of digits/2) + 1 bytes

COMP-4 (5 <= size < 10 with fractional data)

scaled_int4

Signed longword

Size = 4 bytes
Range: -2147483648 to +2147483647

COMP-4 (5 <= size < 10 without fractional data)

int4

Signed longword

Size = 4 bytes

COMP-4 (size < 5 with fractional data)

scaled_int2

Signed word integer

Size = 2 bytes
Range: -32768 to +32767

COMP-4 (size < 5 without fractional data)

int2

Signed word integer

Size = 2 bytes

COMP-4 (size >= 10 with fractional data)

scaled_int8

Signed quadword

Size = 8 bytes
Range: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

COMP-4 (size >= 10 without fractional data)

int8

Signed quadword

Size = 8 bytes

COMP-5 (5 <= size < 10 with fractional data)

scaled_int4

Signed long integer

Size = 4 bytes
Range: -2147483648 to +2147483647

COMP-5 (5 <= size < 10 without fractional data)

int4

Signed long integer

Size = 4 bytes

COMP-5 (size < 5 with fractional data)

scaled_int2

Signed word integer

Size = 2 bytes
Range: -32768 to +32767

COMP-5 (size < 5 without fractional data)

int2

Signed word integer

Size = 2 bytes

COMP-5 (size >= 10 with fractional data)

scaled_int8

Signed quadword

Size = 8 bytes
Range: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

COMP-5 (size >= 10 without fractional data)

int8

Signed quadword

Size = 8 bytes

COMP-X (3 <= size < 5 with fractional data)

scaled_int2

Signed word integer

Size = 2 bytes
Range: -32768 to +32767

COMP-X (3 <= size < 5 without fractional data)

int2

Signed word integer

Size = 2 bytes

COMP-X (5 <= size < 10 with fractional data)

scaled_int4

Signed long integer

Size = 4 bytes
Range: -2147483648 to +2147483647

COMP-X (5 <= size < 10 without fractional data)

int4

Signed long integer

Size = 4 bytes

COMP-X (size < 3 with fractional data)

scaled_int1

Signed byte integer

Size = 1 byte
Range: -128 to +127

COMP-X (size < 3 without fractional data)

int1

Signed byte integer

Size = 1 byte

COMP-X (size >= 10 with fractional data)

scaled_int8

Signed quadword

Size = 8 bytes
Range: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

COMP-X (size >= 10 without fractional data)

int8

Signed quadword

Size = 8 bytes

INDEX

int4

Signed long integer

Size = 4 bytes

[SIGN [IS]] LEADING

numstr_nl

Signed numeric string. Sign is the first character of the string

Maximum number of digits = 31
Maximum fractions = 11

[SIGN [IS]] LEADING SEPARATE [CHARACTER]

numstr_nl

Signed numeric string. Sign is the first character of the string

Maximum number of digits = 31
Maximum fractions = 11

NATIVE-2

int2

Signed word integer

Size = 2 bytes

NATIVE-4

int4

Signed long integer

Size = 4 bytes

NATIVE-8

scaled_int8

Signed quadword

Size = 8 bytes
Range: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

PACKED-DECIMAL

decimal

Packed decimal

Maximum number of digits = 31
Maximum fractions = 11
Length = int (number of digits/2) + 1 bytes

POINTER

int4

Signed long integer

Size = 4 bytes

[SIGN [IS]] TRAILING

numstr_nr

Signed numeric string. Sign is the last character of the string.

Maximum number of digits = 31
Maximum fractions = 11

[SIGN [IS]] TRAILING SEPARATE [CHARACTER]

numstr_nr

Signed numeric string. Sign is the last character of the string

Maximum number of digits = 31
Maximum fractions = 11

VSAM Data Source Metadata Datatypes

The following table shows all the valid datatypes that can be used to describe the metadata for a VSAM data source.


Note:

This section is for reference only. The only datatypes that should be used are those generated for the COBOL copybook, as described in "Datatype Mapping for the VSAM Data Source".


Table B-2  VSAM Metadata Datatypes
Oracle Connect Datatype Details

bit

Single bit within a byte

Size = 1 byte
Format: <field name="name" datatype="bits" onBit="n" ... />, where n specifies the bit (within a byte) the field uses

bits

A signed number of bits within a byte

Size = 1 bit to 1 byte
Format: <field name="name" datatype="bits" onBit="n" size="m"... />, where n specifies the bit (within a byte) to start from and m is the number of bits. If n is not specified then n defaults to 1 for the first occurrence of the field and is contiguous thereafter.

The maximum number of bits you can map is 32

cstring

Null-terminated string of alphanumeric characters; maximum length must be specified. An extra byte is required for the null flag

date6

Date in a string having the form YYMMDD

date8

Date in a string having the form YYYYMMDD

decimal

Packed decimal

Maximum number of digits = 31
Maximum fractions = 11
Length = int (number of digits/2) + 1 bytes

dfloat

Double floating point number

Size = 8 bytes
Range: 0.29E-38 to 1.7E38
Precision: 16 digits

double

Double floating number

Size = 8 bytes
Range: 0.56E-308 to 0.90E308
Precision: 15 digits

filler

Allocation for future use, string type; length must be specified

image

Image data (Binary large object)

int_date

Date in a four byte integer having the form YYMMDD or YYYYMMDD

Example, 23-Jul-1998 has the form: 980723 or 19980723

int1

Signed byte integer

Size = 1 byte

int2

Signed word integer

Size = 2 bytes

int3

Signed integer

Size = 3 bytes

int4

Signed longword

Size = 4 bytes

int6

Signed integer

Size = 6 bytes

int8

Signed quadword

Size = 8 bytes

jdate

Julian date

Size = 2 bytes
Bits 0-6: (non-century) year
Bits 7-15: day of the year

logical

Signed long integer

Values: 1 for true, 0 for false.

numstr_bdn

Signed numeric string. Sign is the first character of the string.

Maximum number of digits = 31
Maximum fractions = 11

Note: the number of fractions includes the decimal point

numstr_nl

Signed numeric string. Sign is the first character of the string

Maximum number of digits = 31
Maximum fractions = 11

numstr_nlo

Signed numeric string. A left overpunched sign is implemented.

Maximum number of digits = 31
Maximum fractions = 11

numstr_nr

Signed numeric string. Sign is the last character of the string.

Maximum number of digits = 31
Maximum fractions = 11

numstr_s

Signed numeric string. A right overpunched sign is implemented

Maximum number of digits = 31
Maximum fractions = 11

numstr_u

Unsigned numeric string

Maximum number of digits = 31
Maximum fractions = 11

numstr_zoned

Signed numeric string

Maximum number of digits = 31
Maximum fractions = 11

phdate

Size = 2 bytes
Bits 0-6: (non-century) year
Bits 7-10: number of month
Bits 11-15: day of month

scaled_int1

Signed byte integer

Size = 1 byte
Range: -128 to +127

scaled_int2

Signed word integer

Size = 2 bytes
Range: -32768 to +32767

scaled_int3

Signed integer

Size = 3 bytes

scaled_int4

Signed long integer

Size = 4 bytes
Range: -2147483648 to +2147483647

scaled_int6

Signed integer

Size = 6 bytes

scaled_int8

Signed quadword

Size = 8 bytes
Range: -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

scaled_uint1

Unsigned byte integer

Size = 1 byte
Range: 0 to 254

scaled_uint2

Unsigned word integer

Size = 2 bytes
Range: 0 to 65534

scaled_uint4

Unsigned long integer

Size = 4 bytes
Range: 0 to +4,294,967,294.

scaled_uint4

Unsigned long integer

Size = 4 bytes
Range: 0 to 4294967294

str_date

Atomic date string

Size = 10 characters
Format = YYYY-MM-DD

str_time

Atomic date string

Size = 8 characters
Format = HH:MM:SS

string

String of alphanumeric characters; length must be specified

text

Text data (Binary large object)

ubits

An unsigned number of bits within a byte

Size = 1 bit to 1 byte
Format: <field name="name" datatype="bits" onBit="n" size="m" ... />, where n specifies the bit (within a byte) to start from and m is the number of bits. If n is not specified then n defaults to 1 for the first occurrence of the field and is contiguous thereafter

The maximum number of bits you can map is 31

uint2

Unsigned word integer

Size = 2 bytes
Range: 0 to +65534.

uint6

Unsigned integer

Size = 6 bytes

unicode

Null-terminated alphanumeric unicode string; maximum length must be specified

unspecified

Unknown datatype, string type, length must be specified

varstring

16 bit count, followed by a string

varstring4

32 bit count, followed by a string

Datatype Mapping for Oracle Connect for VSAM

The following table shows the mapping performed to generate metadata for the VSAM backend adapter from COBOL copybooks.

The COBOL datatype COMP, in the table is an abbreviation for, and synonymous with, COMPUTATIONAL. Square brackets ([ ]) denote optional qualifiers for some COBOL compilers, which may not be allowed for other COBOL compilers.

Table B-3  Datatype Mapping: COBOL and Oracle Connect for VSAM
COBOL Datatype Xsd Datatype

BINARY (with fractional data)

string

BINARY (without fractional data)

int

COMP (with fractional data)

string

COMP (without fractional data)

int

COMP-2

double

COMP-3

string

COMP-4 (with fractional data)

string

COMP-4 (without fractional data)

int

COMP-5 (with fractional data)

string

COMP-5 (without fractional data)

int

COMP-X (with fractional data)

string

COMP-X (without fractional data)

int

INDEX

int

[SIGN [IS]] LEADING

string

[SIGN [IS]] LEADING SEPARATE [CHARACTER]

string

NATIVE-2

int

NATIVE-4

int

NATIVE-8

string

PACKED-DECIMAL

string

POINTER

int

[SIGN [IS]] TRAILING

string

[SIGN [IS]] TRAILING SEPARATE [CHARACTER]

string


Go to previous page Go to next page
Oracle
Copyright © 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index