gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Runtime library question


From: Bernard Giroud
Subject: Re: [open-cobol-list] Runtime library question
Date: Mon Feb 2 12:16:01 2004

Gerry Weaver a écrit :

> Hi,
>
> Thanks for the reply. The files are binary files. I don't know a lot about
> them at this point, but I can tell you what I know so far.
>
> One of the files in question has a character string followed by two four
> byte values and an end of record of 0x0a. The numbers are stored in a
> strange way. You have to mask off the low nibble by shifting right four
> bits. It appears at first glance that all of the numeric values are stored
> in this fashion.

Sounds very like COMP-3 fields. In which case you could deduce
the total length of the field, but not the scaling factor.

> For example, I have a file that looks like a report. In
> order to format the report correctly each string is followed by one of these
> four byte values. The values seem to indicate how many spaces to pad each
> string with. None of these files have any extension except one that has an
> extension of .idx. There appears to be an associated data file, but it too
> has no extension. I assume these may be ISAM files.
>
> I'm really trying to determine if there is a known pattern or scheme to
> these files, or if they are simply a proprietary format.
>
> Thanks again for the response,
> Gerry
>
> -----Original Message-----
> From: Keisuke Nishida [mailto:address@hidden
> Sent: Sunday, February 01, 2004 9:00 PM
> To: Gerry Weaver
> Cc: address@hidden
> Subject: Re: [open-cobol-list] Runtime library question
>
> At Thu, 29 Jan 2004 23:27:11 -0600,
> Gerry Weaver wrote:
> >
> > I am working on a project, which requires me to read files that were
> written
> > with Cobol. No one could tell me which Cobol, but I would imagine it was
> > either Microfocus or IBM. The project language is C. I've been looking for
> a
> > way to read these files from the C language and came across "open-cobol"
> on
> > the web. I would like to know if I can simply link the runtime library and
> > use the file functions to read these files. If so, I would appreciate any
> > advice someone could give me. I don't know anything about the Cobol
> language
> > at all. I was trying to reverse engineer the files when someone who knew
> > Cobol told me that they looked like Cobol files. I then searched the web
> and
> > found open-cobol.
>
> I suppose you have files that is not human readable (i.e., containing
> binary data).  If so, I guess the format of your files is not compatible
> with that of open-cobol.  File formats are compiler dependent.
>
> Would you tell us more about your files?  Are they binary or text files?
> What file extension do they have?
>
> Keisuke
>

--
Bernard Giroud
Open Source COBOL Tools Developer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]