Re: How to get the return code from a Unix command in Cobol
- From: Robert <no@xxxxxx>
- Date: Mon, 14 Jan 2008 23:55:43 -0600
On Mon, 14 Jan 2008 19:49:54 -0800 (PST), Richard <riplin@xxxxxxxxxxxx> wrote:
On Jan 15, 2:26 pm, Robert <n...@xxxxxx> wrote:
On Mon, 14 Jan 2008 11:58:09 -0800 (PST), Richard <rip...@xxxxxxxxxxxx> wrote:
Several adequate mechanisms were provided at the time (plus your
unworkable one).
The only suggestion was ugly: overwriting a file.
Daniel (LX-I) wrote:
There was one process that we couldn't do from within
the program, so the program writes a sequence of commands
to a file, "add"s it to the run (which means it starts
executing when this program stops), and finishes.
The last statement in the file re-executes the checker to
check that final process.
Terminating is hardly a solution to 'call the compiler and get its return code.'
Simon Tobias wrote:
Cob -- which isn't COBOL, by the way -- will return a zero
return-code is the compilation is successful, so I would
*assume* that the return-code will trickle back down from
a CALL "SYSTEM" to the calling COBOL app.
That's precisely what did not work.
So that was three, which counts as 'several'.
The point about overwriting the file before the CALL "SYSTEM" is that
if the CALL fails, or the SYSTEM fails, or the command file fails,
then the program will not pick up the previous 'result file' which may
still contain 'success'.
These failure safeguards should be readily understood by someone who
is no longer a newbie.
I'd rather have 'looks ugly' than your 'does ugly' anyday.
My solution detects all those exceptions.
.
- Follow-Ups:
- References:
- Re: How to get the return code from a Unix command in Cobol
- From: Robert
- Re: How to get the return code from a Unix command in Cobol
- From: Richard
- Re: How to get the return code from a Unix command in Cobol
- From: Robert
- Re: How to get the return code from a Unix command in Cobol
- From: Richard
- Re: How to get the return code from a Unix command in Cobol
- From: Robert
- Re: How to get the return code from a Unix command in Cobol
- From: Richard
- Re: How to get the return code from a Unix command in Cobol
- From: Robert
- Re: How to get the return code from a Unix command in Cobol
- From: Richard
- Re: How to get the return code from a Unix command in Cobol
- Prev by Date: Re: How to get the return code from a Unix command in Cobol
- Next by Date: Re: How to get the return code from a Unix command in Cobol
- Previous by thread: Re: How to get the return code from a Unix command in Cobol
- Next by thread: Re: How to get the return code from a Unix command in Cobol
- Index(es):
Relevant Pages
|