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

Re: [GNU-COBOL] New to COBOL



Davyd Ondrejko wrote:

>  > Note that Cobol programs assume they're started after a check for the
> > necessary resources. It's not common practice to test if problems arise
> > after opening a file.
>
> I've not been working *near* as long as you have, so I can't argue what
> *common* practice is.  On the other hand, I will certainly argue that it
> is a *good* practice to test for error conditions after every I/O
> operation and provide for a graceful exit.  Probably just a structured
> programming bias, but one I hold near and dear.

Sorry I didn't explain this better. You are completely right here and these
tests should be done by the run-time system. I was just talking about the
presence or absence of a file, that should be tested by the run-time system
before the statements in the PROCEDURE DIVISION are executed.

Regards,

Fred Mobach



--
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.