Re: How to get the return code from a Unix command in Cobol
- From: Richard <riplin@xxxxxxxxxxxx>
- Date: Mon, 14 Jan 2008 19:49:54 -0800 (PST)
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.
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.
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.
.
- Follow-Ups:
- References:
- 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
- From: Robert
- How to get the return code from a Unix command in Cobol
- Prev by Date: Re: OT: Racial superiority / Intelligent design was Re: OT:Thanksgiving
- 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
|