| Sent to Mary 4/1/97:
Copyright (c) 1996 by Oracle Corporation. All Rights Reserved.
KEYWORDS: Rdb OpenVMS Contiguous key segment structures
TITLE: How to Break a Big Key into Segments Using the Gateway for RMS
PRODUCT: Rdb Transparent Gateway for RMS V3.0C and Higher
OP/SYS: OpenVMS VAX V5.5 and higher
SOURCE: Oracle Worldwide Customer Support
SYMPTOM:
You have a CDD definition that defines a primary key as a number of
contiguous bytes, no key segments. You would like to separate the fields
or columns into separate segments of the key but still have your applications
see the proper fields that comprise the primary key.
Using CDD structure statements, applications, like Microsoft Access, do not
see the key fields of the tables. If you remove the CDD structure statements
from the CDD definition, then you receive errors because CDD says the primary
key is segmented and RMS says that it is not.
WORKAROUND:
To see segments of a key, use your own CDO file for metadata instead of using
the CDD. This requires using V3.0C or higher of the RMS gateway. By using
your own CDO file, Microsoft Access will see the segments of the key.
To accomplish this, do not define structure statements in the CDO file. Define
the key as if it were a truly segmented key in the CDO file. Using this method,
the CDO reader does not enforce the RMS checks on file attributes that the
CDD is required to do.
EXAMPLES:
Here is an example CDO file that displays the definitions for segmented keys.
Following is an FDL file that shows you that there really are no segments
in the key.
define field no_k1st1 datatype is text size is 9.
define field no_k1st2 datatype is text size is 2.
define field no_k2 datatype is text size is 30.
define field no_k3 datatype is text size is 15.
define field no_j1 datatype is text size is 10.
define field no_j2 datatype is text size is 20.
define field no_j3 datatype is text size is 30.
define field no_j4 datatype is text size is 40.
define field no_j5 datatype is text size is 50.
define field no_j6 datatype is text size is 60.
define field no_j7 datatype is text size is 70.
define field no_j8 datatype is text size is 80.
define field no_j9 datatype is text size is 90.
define field no_j10 datatype is text size is 100.
define field no_bj1 datatype is text size is 100.
define field no_bj2 datatype is text size is 100.
define field no_bj3 datatype is text size is 100.
define field no_bj4 datatype is text size is 100.
define record no_rec_struct.
no_k1st1.
no_k1st2.
no_k2.
no_k3.
no_j1.
no_j2.
no_j3.
no_j4.
no_j5.
no_j6.
no_j7.
no_j8.
no_j9.
no_j10.
no_bj1.
no_bj2.
no_bj3.
no_bj4.
end record.
define rms_database no_rms_struct.
record no_rec_struct.
file_definition organization indexed format fixed.
keys.
key 0
segment no_k1st1 in no_rec_struct
segment no_k1st2 in no_rec_struct.
key 1
segment no_k2 in no_rec_struct.
key 2
segment no_k3 in no_rec_struct.
end keys.
end rms_database.
define database no_db_struct using no_rms_struct
on sys$common:[sqluser.rms_structures]rms_struct_2.dat.
FDL:
IDENT "10-APR-1995 10:37:47 VAX/VMS ANALYZE/RMS_FILE Utility"
SYSTEM
SOURCE VAX/VMS
FILE
ALLOCATION 3
BEST_TRY_CONTIGUOUS no
BUCKET_SIZE 3
CLUSTER_SIZE 3
CONTIGUOUS no
EXTENSION 0
FILE_MONITORING no
GLOBAL_BUFFER_COUNT 0
NAME "SYS$COMMON:[SQLUSER42.RMS_STRUCTURES]RMS_STRUCT_2.DAT;1"
ORGANIZATION indexed
OWNER [SQLUSER42]
PROTECTION (system:RWED, owner:RWED, group:RE, world:)
RECORD
BLOCK_SPAN yes
CARRIAGE_CONTROL none
FORMAT fixed
SIZE 1006
AREA 0
ALLOCATION 3
BUCKET_SIZE 3
EXTENSION 0
KEY 0
CHANGES no
DATA_KEY_COMPRESSION yes
DATA_RECORD_COMPRESSION yes
DATA_AREA 0
DATA_FILL 100
DUPLICATES no
INDEX_AREA 0
INDEX_COMPRESSION yes
INDEX_FILL 100
LEVEL1_INDEX_AREA 0
NAME ""
NULL_KEY no
PROLOG 3
SEG0_LENGTH 11
SEG0_POSITION 0
TYPE string
KEY 1
CHANGES yes
DATA_KEY_COMPRESSION yes
DATA_AREA 0
DATA_FILL 100
DUPLICATES yes
INDEX_AREA 0
INDEX_COMPRESSION yes
INDEX_FILL 100
LEVEL1_INDEX_AREA 0
NAME ""
NULL_KEY no
SEG0_LENGTH 30
SEG0_POSITION 11
TYPE string
KEY 2
CHANGES yes
DATA_KEY_COMPRESSION yes
DATA_AREA 0
DATA_FILL 100
DUPLICATES yes
INDEX_AREA 0
INDEX_COMPRESSION yes
INDEX_FILL 100
LEVEL1_INDEX_AREA 0
NAME ""
NULL_KEY no
SEG0_LENGTH 15
SEG0_POSITION 41
TYPE string
ANALYSIS_OF_AREA 0
RECLAIMED_SPACE 0
ANALYSIS_OF_KEY 0
! This index is uninitialized - there are no records.
ANALYSIS_OF_KEY 1
! This index is uninitialized - there are no records.
ANALYSIS_OF_KEY 2
! This index is uninitialized - there are no records.
\
\ CONTRIBUTORS:
\
\ Technical: Renee Bastine
\ Editorial:
\
|