Re: INDEXES: BTRIEVE vs EXTFH (cobol)
- From: "Bill Bach" <goldstar@xxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 17:22:24 -0500
If your Btrieve indices are strings, yet the data is Numeric, then the
Btrieve file structure is incorrect. You may need to contact
Microfocus to determine how to get the file definition to be created
properly at the Btrieve layer.
You *MAY* be able to make the repair yourself, but I do not know if
this will impact the MF operating environment or not. Luckily, a
simple PIC 9(3) field has a range of "000" through "999", so treating
it as a string works. However, if SQL looks at it as a signed value,
everything gets messed up. So, you MUST fix the problem to get good
queries from SQL.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach@xxxxxxxxxxxxxxxxxxxx
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 07/2006 ***
alexandretalbert@xxxxxxxxx wrote:
Hi folks!
I have some betrieve files created by Microfocus Cobol (trough
FILETYPE"6" directive), and accessed trough DDF files created with
"CREATE TABLE" statements. My (BIG) problem concern to the INDEXES.
With BUTIL -STAT, I can see that every index on the data file is
created eith type=String.
So, the DDF index definition will never match. For example, for the
table:
FD DC0030.
01 DC0030-REG.
2 DC0030-CODE PIC 9(3).
2 DC0030-NAME PIC X(50).
SELECT DC0030 ASSIGN TO WS0030-CAM-GERAL
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
LOCK MODE IS AUTOMATIC
FILE STATUS IS WS-8005-STATUS
RECORD KEY IS DC0030-CODE
.
I have the following CREATE TABLE:
CREATE TABLE DC0030 USING 'DC0030.MKD' (CODE NUMERIC(3,0), NAME
CHAR(50),PRIMARY KEY(CODE))
Then the PRIMARY INDEX CODE is NUMERIC on DDF but STRING on the data
file....For this reason, some queries doesn´t work.....
Any suggestion??
Thanks!!!!
.
- Follow-Ups:
- Re: INDEXES: BTRIEVE vs EXTFH (cobol)
- From: alexandretalbert@xxxxxxxxx
- Re: INDEXES: BTRIEVE vs EXTFH (cobol)
- Prev by Date: Re: Inser Trigger problem
- Next by Date: Re: INDEXES: BTRIEVE vs EXTFH (cobol)
- Previous by thread: Re: Inser Trigger problem
- Next by thread: Re: INDEXES: BTRIEVE vs EXTFH (cobol)
- Index(es):
Relevant Pages
|