3

A simple but, heh, still weird question. Hope in good section, couldn't find decent answer in whole internet.

First of all, it looks strongly like COBOL (ACUCOBOL?), but I am not sure.

I have binary files with extensions: .AC, .vix, .SC; several MBytes each. Most of files are in pairs eg. ADDRESSES.AC + ADDRESSES.vix or COMPANIES.SC + COMPANIES.vix. In the middle of these files I can see parts of records, however it seems to be a set of binary files.

No human readable indexes, maps, dialects, configuration files, headers that I know exists in Cobol databases - nothing to be parsed using some normal text tools. No CPY, RDD, XFD files as well. Just files with a lot of binary data and parts of records/ids (?) from time to time. So I can determine e.g., that one file contains set of addresses, next apparently sales, next client data etc.

Questions are:

How to determine which version of COBOL database am I using? (Mostly to obtain a proper tool to extract the data.)

How to convert this database to something that can be parsed and moved to whatever else - even Excel?

I have no access to computer that was working with this database as it is deep in the litter bin from many years, nothing else remained, just one folder with database files.

Had anybody the same problem?

Here is sample: enter image description here

Vilq
  • 567
  • 6
  • 11
  • 1
    I don't have experience with ACUCOBOL, but I suspect you are not going to have much luck finding a utility that can read your indexed files (without having an installed version of ACUCOBOL). You will probably have to reverse engineer the data in order to come close to retrieving it. Good luck. – UncleCarl Aug 06 '18 at 17:25

3 Answers3

7

How to determine which version of COBOL database am I using?

You aren't using a database but ISAM files, very likely ACUCOBOL GT file format 5. For details about the format see official documentation.

Mostly to obtain a proper tool to extract the data.

The proper tool would be vutil and the command vutil -u -t ADDRESSES.AC ADDRESSES.TXT which will present you with a text file that is very likely in fixed-length form (variable form is relative uncommon) -> step 1.

As the data likely contains binary fields you have to investigate the data to check the actual format/record layout --> step2, and calculate the decimal values from the binary fields --> step 3. But there are tools out there that help you with step 2 and 3, I can recommend RecordEditor where you'll see the data, can set field widths/types (defining a record layout, similar to Excel Import, but also allows you to use binary COBOL types) and convert the resulting file to CSV.

If you don't have access to vutil (or vutil32.exe on Windows) you may find someone that has access to this tool and convert the data for you; or get an evaluation version (would be an old download, the new product owner of ACUCOBOL-GT is MicroFocus and only provides evaluation versions of their not-compatible "Visual COBOL" product).

Alternatively you can reverse-engineer the format (the record layout is in the vix-file, open it with an hex-editor and dive in), but this likely is a bigger task...

Summary:

  • decide how to do step 1, vutil/vutil32.exe is the easiest way
  • 1: convert the data to text format
  • 2: investigate the files and inspect for the record layout (field width, type)
  • 3: load the file, convert binary fields, export as csv
Simon Sobisch
  • 6,263
  • 1
  • 18
  • 38
  • Sorry, I was told that it is COBOL. Thank you for answer! BTW in case if vutil is not available (found that as well), is it possible just to connect these files to existing MySQL, MSSQL, whatever running server as it is ISAM, not InnoDB or other, so it should not interfere with privileges an so on? I can use almost any DB server, have computers ready to go. – Vilq Aug 07 '18 at 12:47
  • 3
    That *is* COBOL, but there is nothing like "COBOL database", these are ISAM files for use with COBOL and you can either access them via COBOL, via tools for this specific ISAM format (ACUCOBOL VISION version 5 in your case, meaning you'd use ACUCOBOL `vutil32.exe`) or with tools using the appropriate COBOL runtime library (wrun32.dll [needs a ACU license file to run]) or reverse-engineer the format. – Simon Sobisch Aug 08 '18 at 08:44
  • 2
    I'd recommend to look out for someone with access to ACUCOBOL vutil. – Simon Sobisch Aug 08 '18 at 08:46
1

You definitely have the vision indexed data files as you will see the .vix files which match, if you do not have a .vix file then it is a relative file with a set no of records.

If you have Acubench under the Tools Menu there is an option for Vision File Utility, from there you can Unload your Vision Data to a text file which is tab delimited.

From there you can import to Excel as a tab delimited file and then re-save as a csv file.

Ian Harper
  • 11
  • 3
0

So after all I suppose this was ISAM version.

To untangle this the following tools were needed:

  1. First of all some migration tool. In my case it was ISMIGRATE GUI WIzard:

enter image description here

This package comes from isCOBOL 2017 R1, you can find some free demos to download. Note, that you don't need install all package, just this migration tool. Then you can use ctree2 -> jisam conversion or just try all available options (not every one is available cause of missing libraries that are paid)

  1. After conversion you'll end with something like this:

enter image description here

In worse cases there will be some ASCII special chars, but you can get rid of them using some tools like Notepad++, or even Excel. I mean to search for them by HEX code and replace by space (note, that space will replace one missing character to preserve column ordering)

Note, that you can as well use special function of importing ASCII text files from MS Access/MS Excel. It is really helpful.

  1. to position everything correctly, cut this file and do all adjustements (and export to e.g. csv) you can use http://record-editor.sourceforge.net that is free. Note, that after several trials I've noticed, that other even paid tools rather won't help you. The problem is in 1st point: conversion.

  2. To be sure that everything works fine you can run even MS Access or similar to see how to create foreign keys and reverse-engineer all database. Having working preview it will be easy to do that on larger scale e.g. in PostgreSQL/Oracle.

That's it. I hope it'll be useful for somebody.

What was UNSUCCESSFUL:

  1. Estabilishing Actian Vector server; it is really great and free tool, but it won't help you significantly

  2. Trying some online tools (despite of who knows where data will be sent)

  3. Any other ASCII editors, cause in my case many of them crashed, i suppose because of size of files and because of some control chars (?)

Vilq
  • 567
  • 6
  • 11