[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::dbstars

Title:DBSTARS Conference
Moderator:BROKE::BASTINE
Created:Wed Feb 02 1994
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:791
Total number of notes:1521

482.0. "Mapping COBOL datatypes to CDD" by BROKE::BITHER () Tue Jul 11 1995 11:51

T.RTitleUserPersonal
Name
DateLines
482.1MaryBROKE::BASTINETue Apr 01 1997 12:2949
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: 
\