On Thu, Mar 22, 2018 at 8:44 AM, Pew, Curtis G <[email protected] > wrote:
> 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. > File descriptors are mainly what are kept. But the DD statements are all FREEd. As is user memory. The only DD which can be kept is the STEPLIB and only if the environment variable STEPLIB exists and is equal to "CURRENT". > > -- > Pew, Curtis G > [email protected] > ITS Systems/Core/Administrative Services > -- 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
