×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

convert MicroFocus Cobol/2 .dat files

convert MicroFocus Cobol/2 .dat files

convert MicroFocus Cobol/2 .dat files

(OP)
I need access to data in a software package who's publisher has been out of business for better than a decade.  As far as I can tell the files are MicroFocus Cobol/2 data files.  .dat and .idx files I have no cobol source files.  The application has no tools for exporting data.  Is there any way to do this? I've found a few different tools to try to get ODBC connections or simply dump to a txt file but nothing I have found seems to work.

If its helpful, I can get this info from the executable that runs the application.

Micro Focus COBOL/2 Toolset Version 2.4.18
RUN TIME ENVIRONMENT V2.3 rev 013 Copyright (C) 1985,1990 Micro Focus Ltd.
URN AREPA/ZZ0/00000                                               Ref 001.

RE: convert MicroFocus Cobol/2 .dat files

Have you tried the MF REBUILD?

RE: convert MicroFocus Cobol/2 .dat files

First, you have to figure out the layout of the data in the records.  If you have a report that displays or prints the data, that is a help.  You also need to know how the data is formatted in the record.

COBOL supports several numeric data formats.  In most formats, the numbers are scaled to units (this is called "fixed point" in some documentation) and then converted to the specified base.  For example, take the value $1.25.  If this in DISPLAY NUMERIC the value might be expressed as "00000125" or "0000012E".  The same value in PACKED DECIMAL would be X"00 00 12 5F" or X"00 00 12 5C".  In BINARY it would be X"00 00 00 7D"

Non-numeric data is usually in straight ascii format.

Next you need to know how the records are formatted.  The .IDX file has no appllication data in it and can be ignored.  The .DAT file contains records in VARIABLE RECORD LENGTH format (even if the records are all the same size, which is usually the case)).

The records start with a header field.  This fields i either 2 or 4 bytes long.  The first 4 bits of this field is the record type code.  The next 12 or 28 bits is the length of the record in binary, which excludes the header & trailer fields.  The length is the length of the data.  The actual length of the record is the data plus the header plus trailer bytes.  There will be 0-3 traileer bytes to make the length of the record a multiple of 4 bytes.

As you can see, extracting the data is quite conplex ane requires knowledge of the file structure as well as the application data.

I have a canned routine which will extract the application data.  Code must be added to it to extract the various applications fields.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close