Highlighted
Absent Member.
Absent Member.
979 views

read index file from acucobol-gt

I am converting acucobol-gt to visual cobol and have problems to access the data files created by acucobol. 

I have used the sample LoginFormApplication and have added access to an existing archive with passwords 

The indexed file is fixed-length and has two archives called  ARCHMENU  and ARCHMENU.vix

Using idxformat 17 or 21 the code error is 39C6

SELECT ARCHMENU  ASSIGN TO RANDOM NAMEMENU
                             ORGANIZATION IS INDEXED
                             ACCESS MODE  IS DYNAMIC
                             RECORD KEY   IS CLVEMENU
                             FILE STATUS  IS ST-STAT.

 

 

 

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

IDXFORMAT"17" should be used to access ACU Vision files.

How are you setting the idxformat"17" option, in an extfh.cfg file or within the program? What version of Vision was the file created with?

I can use the following program to create a Vision File with the same name as yours and it creates ARCHMENU and ARCHMENU.vix.

       identification division.
       program-id. Program1.
      $set idxformat"17"     
           SELECT ARCHMENU  ASSIGN TO RANDOM NAMEMENU
                             ORGANIZATION IS INDEXED
                             ACCESS MODE  IS DYNAMIC
                             RECORD KEY   IS CLVEMENU
                             FILE STATUS  IS ST-STAT.
       data division.
       file section.
       fd archmenu.
       01 archrecord.
          05 clvemenu  pic 9(3).
          05 rest      pic x(10).
       working-storage section.
       01 st-stat      pic x(2) value spaces.
       01 namemenu     pic x(20) value "ARCHMENU".
       procedure division.

           open output ARCHMENU
           display st-stat
           move all "1" to archrecord
           write archrecord
              invalid key
                 display st-stat
           end-write
           close archmenu
           goback.

       end program Program1.
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.