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

Re: [Fwd: gnubol: Record delimiter clause and parse order]



Matthew Vanecek wrote:
> 
> The (free) draft standards (available at Merant's site), do not specify
> a physical file layout that I can see.  

It surprises me if AIX Cobol has only delimited records, because
this would mean you can't have EOL characters in the records
which IMO would be against the standard. I think that the
standard implies that you have some sort of record header for
variable length, but for variable length you could just stack
them together one after anoher, or have headers

> All padding is
> done with x"00" (guess we won't be using buffered reading/writing--a la
> fprintf--for this!).

That would be right, normally you couldn't use fprintf and the
like, but fread/fwrite should be ok as long as you open in binary
mode eg fopen("file", "rb").

> 
> Sorry for my verbosity, but every time someone brings up a new point, I
> generally tend to find out 3 or 4 times more information than what I was
> originally looking for. ;)

That's fine, it's important to avoid major errors early on.

> 
> I'd like to get some feeling for what people think about using
> read/write and/or fread/fwrite.

My understanding is that fread/fwrite are OK but the formatted IO
functions will not do the job. You may be able to use them
internally for example for converting from binary to display
format in the DISPLAY verb though.

Tim Josling

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.