On Fri, Mar 23, 2018 at 10:42 AM, Seymour J Metz <[email protected]> wrote:

> Not even close. XCTL affects only a single RB; other RBs, loaded programs
> and allocated storage are not affected,, except as they are control blocks
> for the deleted module.
>

​Correct. But one could, and I will, argue that they are "conceptually"
similar in that XCTL "replaces" the program which invoked it while exec()​
"replaces" the entire address space. Yeah, quite a stretch, I guess.



>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> ________________________________________
> From: IBM Mainframe Discussion List <[email protected]> on behalf
> of Pew, Curtis G <[email protected]>
> Sent: Thursday, March 22, 2018 9:44 AM
> To: [email protected]
> Subject: Re: Cobol-Unix
>
> On Mar 22, 2018, at 1:57 AM, Peter Hunkeler <[email protected]> wrote:
> >
> > Not answering to the question regarding command output, but I find the
> example a bit misleading. Any of the exec type UNIX functions will replace
> the current program with the new program. In MVS speak, it will end the
> current job step and initiate a new one.
> >
> >
> > I've never done this in COBOL, but I see no reason it would behave
> differently. Now assuming it does start a new job step, all DDs from the
> previous (initial) job step are lost. The new step running the "tsocmd"
> command will have no DDs at all. Also, the command will never return to the
> COBOL code. That is gone as well.
>
> I would have said that the exec type Unix functions were more like the MVS
> XCTL macro. Doesn’t the new program inherit things like open file
> descriptors from the current one? I think you’re right that the command
> will never return to the COBOL code, though.
>
>
> --
> Pew, Curtis G
> [email protected]
> ITS Systems/Core/Administrative Services
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>



-- 
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to