For Programmers: Free Programming Magazines  


Home > Archive > Cobol > November 2007 > How is data stored in old DOS Cobol data base? Typical file ext is ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How is data stored in old DOS Cobol data base? Typical file ext is ?
Will

2007-11-20, 7:55 am

I'm trying to help someone port data from an old Cobol custom program.

The program is on an old 486 DOS computer.

1 - What are the typical file extensions used for a Cobol data base?

2 - Is there an 'easy' way to get the data to a coma delimited format so it
can be ported to MS Access or some other program?

3 - Any Windows utilities out there that may help me recover the data ?

Thanks for any help.


Michael Mattias

2007-11-20, 6:55 pm

"Will" <Will@somewhere.com> wrote in message
news:4742e40f$0$24279$4c368faf@roadrunne
r.com...
> I'm trying to help someone port data from an old Cobol custom program.
>
> The program is on an old 486 DOS computer.
>
> 1 - What are the typical file extensions used for a Cobol data base?


There are no "typical" extensions; it's pretty much "pot luck", except for
Microfocus index pairs, which are usually ".dat" and ".idx"
>
> 2 - Is there an 'easy' way to get the data to a coma delimited format so
> it can be ported to MS Access or some other program?


That depends who gets to define "easy." If you can read COBOL FIle
Descriptions (part of the source code, and almost absolutely required) and
can write a COBOL program, it's not hard at all. If you can't write COBOL,
you can do it with any language but you WILL end up working at the bit
level, and that's a bit harder. If you don't have FDs it will be quite
difficult.

> 3 - Any Windows utilities out there that may help me recover the data ?


There's one called "ParseRat" out there. You'll have to search the internet
for it, but it should be worth a look.

I have a BASIC-language programming library (*.dll) I used to market, but
now I just use it myself to convert files.

And I have published some things you can download for reference:
http://www.talsystems.com/tsihome_h...oads/C2IEEE.htm is a document
talking about conversions in general.

At http://www.flexus.com/download.html you can get file cobfd.zip, which is
a text and (MS-DOS) program which parses FDs and gives you a report of size
and offsets within records; and at the same page file cobdata.zip, another
oldie (but goodie?) which demonstrates bit patterms.

(Sheesh, I can't believe I never put those on my own web site. Put that on
my 'to do' list, will you?)

If you are open to professional assistance, you can contact me and I will
take a look at your project.

--
Michael C. Mattias
Tal Systems Inc.
Racine WI
mmattias@talsystems.com
http://www.talsystems.com/




Vince Coen

2007-11-20, 6:55 pm

Hello Will!

20 Nov 07 13:42, Will wrote to All:

W> I'm trying to help someone port data from an old Cobol custom program.

W> 2 - Is there an 'easy' way to get the data to a coma delimited format
W> so it can be ported to MS Access or some other program?

W> 3 - Any Windows utilities out there that may help me recover the data

If the program was written using MicroFocus Cobol and you have the utitilies
discs there is programs included that will allow you to convert db files to
flat simple files. I caanot remember if that also includes csv types.


Vince


tlmfru

2007-11-20, 6:55 pm

Do you know what compiler was used? (The machine it runs on is irrelevant).
If you can post a directory listing of the files it would be helpful. I
have a couple of very old DOS Cobol compilers: maybe if the stars are
aligned properly they could be useful here.

PL


Will <Will@somewhere.com> wrote in message
news:4742e40f$0$24279$4c368faf@roadrunne
r.com...
> I'm trying to help someone port data from an old Cobol custom program.
>
> The program is on an old 486 DOS computer.
>
> 1 - What are the typical file extensions used for a Cobol data base?
>
> 2 - Is there an 'easy' way to get the data to a coma delimited format so

it
> can be ported to MS Access or some other program?
>
> 3 - Any Windows utilities out there that may help me recover the data ?
>
> Thanks for any help.
>
>



Will

2007-11-20, 6:55 pm

Vince,

I think the source files are on the old computer... do they end in .cbl ??

I'm guessing all the Cobol SDK files will be .com or .exe on the old DOS 6.2
PC.

1 - How do I tell if it is MicroFocus Cobol?
2 - Any idea what the filename is to 'extract' the data to a flat file or
CSV file?
3 - Does Cobol save data files as fixed field length 8-bit ASCII?

thanks for the help.


"Vince Coen" <VBCoenDespawn@btconnect.com> wrote in message
news:1195575436@f609.n257.z2.fidonet.ftn...
> Hello Will!
>
> 20 Nov 07 13:42, Will wrote to All:
>
> W> I'm trying to help someone port data from an old Cobol custom program.
>
> W> 2 - Is there an 'easy' way to get the data to a coma delimited format
> W> so it can be ported to MS Access or some other program?
>
> W> 3 - Any Windows utilities out there that may help me recover the data
>
> If the program was written using MicroFocus Cobol and you have the
> utitilies
> discs there is programs included that will allow you to convert db files
> to
> flat simple files. I caanot remember if that also includes csv types.
>
>
> Vince
>
>



HeyBub

2007-11-20, 6:55 pm

Will wrote:
> Vince,
>
> I think the source files are on the old computer... do they end in
> .cbl ??


Most likely, yes.

>
> I'm guessing all the Cobol SDK files will be .com or .exe on the old
> DOS 6.2 PC.


We don't call 'em SDKs; they're called compilers.

>
> 1 - How do I tell if it is MicroFocus Cobol?


At a DOS promt, start typing "xxxxx.exe" (where "xxxx" is the corresponding
name from the folder) and see what comes up with a company's name. Or you
could use a hex editor to prowl around inside each of the exes looking for a
company name.

> 2 - Any idea what the filename is to 'extract' the data to a flat
> file or CSV file?


The files may already BE flat or CSV files. COBOL can write ANY type of file
and has more "standard" types than C# or VB (including ODBC, Btrieve, and
others). There is one type of file that is proprietary to each vendor of
COBOL; it's called ISAM.

ISAM files are weird in that positioning and linkage information is imbedded
within the file, intermingled with the data.

There should be stand-alone programs to read an ISAM file and extract it to
a flat file. The contents of the flat file may not be understandable
inasmuch as the individual data items within the file may be ASCII, 1,2, or
4-byte binary (either little-endian or big-endian), 4 or 8 byte
floating-point, or 1 thru 9 byte "packed decimal." In all, some 18 or so
data renditions.

When converting an ISAM file to a flat file, some of these data types may be
subsequently interpreted as control characters (i.e., EOF, TAB, etc.)
rendering the reading of the converted flat file useless. For example, the
number 14 could be represented in the file as "000D" hex (2-byte binary)
which a flat-file reading program would decode as CR.

No utility can extract an ISAM file to a CSV file without intimate knowledge
of each data field.


> 3 - Does Cobol save data files as fixed field length 8-bit ASCII?


No. Remember, COBOL can write a JPG or PDF or ANY kind of file, of (almost)
any record length and containing almost any data representation.


Will

2007-11-20, 6:55 pm

PL,

I won't be able to get to the old machine until late next w. I'll post
back what I find.

I just ordered a USB 2.0 to IDE/SATA cable/adapter and will try hooking the
old DOS Hard Disk to that to copy all the files to my XP Pro machine. (Right
now some of the files are to big to fit on a 1.44 MB floppy and the old 486
PC only has the hard disk and a floppy drive :)

I'll post back when I have more info.

Thanks for the help gang!

"tlmfru" <lacey@mts.net> wrote in message
news:d1F0j.2735$ip1.1607@newsfe21.lga...
> Do you know what compiler was used? (The machine it runs on is
> irrelevant).
> If you can post a directory listing of the files it would be helpful. I
> have a couple of very old DOS Cobol compilers: maybe if the stars are
> aligned properly they could be useful here.
>
> PL
>
>
> Will <Will@somewhere.com> wrote in message
> news:4742e40f$0$24279$4c368faf@roadrunne
r.com...
> it
>
>



Will

2007-11-20, 6:55 pm

Thanks for all the help Gang. I'll post back late next w after I can get
to the old 486 PC and get the data off to my XP Pro machine and really get a
good look at it.

"Will" <Will@somewhere.com> wrote in message
news:4742e40f$0$24279$4c368faf@roadrunne
r.com...
> I'm trying to help someone port data from an old Cobol custom program.
>
> The program is on an old 486 DOS computer.
>
> 1 - What are the typical file extensions used for a Cobol data base?
>
> 2 - Is there an 'easy' way to get the data to a coma delimited format so
> it can be ported to MS Access or some other program?
>
> 3 - Any Windows utilities out there that may help me recover the data ?
>
> Thanks for any help.
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com