| Sent to Mary 4/1/97
Copyright (c) 1997 by Oracle Corporation. All Rights Reserved.
KEYWORDS: Rdb OpenVMS CDO COBOL Datatypes
TITLE: Mapping COBOL Datatypes to RMS CDO files
PRODUCT: RDB Transparent Gateway for RMS
OP/SYS: OpenVMS VAX V5.5 and higher
SOURCE: Oracle Worldwide Customer Support
QUESTION:
How do you convert some COBOL datatypes to datatypes you can use in
a CDO file for use with the Rdb Transparent Gateway for RMS?
ANSWER:
Cobol uses COMP parameters for field definitions. The most common types you
might find in your COBOL programs are COMP-1, COMP-2, and COMP-3. Below is a
list of what these COMP values are in relation to RMS datatypes:
COMP-1 = REAL or F_Floating 4 bytes in length.
COMP-2 = DOUBLE or D_Floating 8 bytes in length.
COMP-3 = Packed Decimal Can be up to 8 bytes in length.
VMS DATE = QUADWORD 8 bytes in length.
You can also define longword and quadword's using COMP definitions.
A COBOL program with these datatypes would look something like this:
SOME_FIELD PIC S9(4) COMP.
The above would be a signed longword. Longwords are 4 byes and quadwords are
8 bytes.
The RMS Gateway supports F_floating and D_floating but not F_floating complex
or D_floating complex.
\
\ CONTRIBUTORS:
\
\ Technical: Renee Bastine
\ Editorial:
\
|