Highlighted
Absent Member.
Absent Member.
4661 views

How to Create Dat and Idx Files?

Jump to solution

[Migrated content. Thread originally posted on 07 May 2011]

Hi,
i create a new project in Visual Cobol R3,

== File,
== New,
== Project,
== Cobol,
== Native,
== Console Application

And create an simple application, to insert, to update, to delete and view
many registries.

My Select is:
select vendedores assign to disk
organization is indexed
access mode is dynamic
file status estado-vendedores
lock mode is manual
record key is chave-vendedores.

My FD is:
fd vendedores
label record is standard
value of file-id "C:\Programa02\Vend.Arq".
01 registro-vendedores.
02 chave-vendedores.
03 codigo-vendedores pic 9(3).
02 nome-vendedores pic x(40).
02 filler pic x(30).

In folder "C:\Programa02" there are only "Vend.Arq", i dont see the "Vend.idx",
how can i create an "Vend.Arq" and "Vend.Idx" files in Visual Cobol ?

Cláudio.
claudiomiguelmuller@hotmail.com
Brazil.

Thanks.

Cláudio Miguel Müller

claudiomiguelmuller@hotmail.com

www.meugibi.com

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: How to Create Dat and Idx Files?

Jump to solution
In Visual COBOL, the default indexed file format type is IDXFORMAT"8" which allows for > 4 GB files and only uses a single file to store both keys and data.

If you wish to change this to the same default that is in Net Express which is IDXFORMAT"3" which uses a separate .dat and .idx file then you can use the compiler directive IDXFORMAT as follows:

$set idxformat"3"

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: How to Create Dat and Idx Files?

Jump to solution

You may have created an IDX8 format file which contains both data and index within the same file.

Use rebuild /f on the file to see information about format.

If you want to change format you can use either a file handler configuration file or one of the compiler directives that control file formats.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: How to Create Dat and Idx Files?

Jump to solution
What compiler directives or cobol directives i need use to create dat and idx file?

Thanks.

Cláudio Miguel Müller

claudiomiguelmuller@hotmail.com

www.meugibi.com

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: How to Create Dat and Idx Files?

Jump to solution
In Visual COBOL, the default indexed file format type is IDXFORMAT"8" which allows for > 4 GB files and only uses a single file to store both keys and data.

If you wish to change this to the same default that is in Net Express which is IDXFORMAT"3" which uses a separate .dat and .idx file then you can use the compiler directive IDXFORMAT as follows:

$set idxformat"3"

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.