Re: COBOL KEY SEGMENTS
- From: "Rick Smith" <ricksmith@xxxxxxx>
- Date: Thu, 9 Nov 2006 08:57:28 -0500
<alexandretalbert@xxxxxxxxx> wrote in message
news:1163074324.989902.144990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi folks!!
Can anyone tell me why COBOL creates every key segment (for indexed
files) as STRING?? Even if the KEY FILEDS are numeric (PIC 9) ..
For example:
FD DC0030.
01 DC0030-REC.
02 DC0030-CODE PIC 9(3).
02 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
When the programa creates the file (btrieve), I can see (with BUTIL
utility) that its index has ONE STRING SEGMENT instead NUMERIC
SEGMENT..Why ?? DC0030-CODE is NUMERIC!!
Any idea will be appreciated!!!
Thnks!!
You haven't identified the compiler you are using so this
may not apply; but I looked in my Micro Focus COBOL
System Reference under File Handling and found the
following:
-----quote
Key Types
The following points apply to keys when using Btr2xfh:
ExtFH has only one type of key. This is the equivalent of
the Btrieve format string and on a Btrieve Stat operation,
all of the keys are returned as having string format.
-----end quote
Perhaps the answer, simply stated, is: It just does!
.
- Prev by Date: Re: OT: windoze woes and full rant mode is on
- Next by Date: Re: COBOL KEY SEGMENTS
- Previous by thread: File Status 46 abend
- Next by thread: Re: COBOL KEY SEGMENTS
- Index(es):
Relevant Pages
|