On 14 October 2013 05:28, Matan Cohen <[email protected]> wrote:
> I wondering what is the flow of the STOP command for STC running a BPXBATCH
> .
> lets say i'm having a STC running a shell script under USS using BPXBATCH,
> if the operator will enter the 'P <STCNAME>' in the console - what will
> happen?
> is the 'STOP' command will be intreppeted as a  SIGTSTP signal to the
> program that running under the Shell script?

No - nothing will happen. To receive a STOP command you have to use
either the __console() or __console2() service to listen for it, or
use the traditional assembler language interface of WAITing on the
STOP/MODIFY ECB provided by the system. I don't know how you would do
either of these in a shell script, but perhaps the REXX interface
allows calling console2().

There's another complication: if you are running a shell script, it is
likely that you'll have multiple address spaces involved. This has
been discussed at length on this list and MVS-OE, but the bottom line
is that you have to direct your STOP command to the right address
space. With typical default settings, if you run BPXBATCH with a shell
script that then invokes a program, the program will run in a BPXOINIT
address space with a new jobname of the original jobname plus one
character. If this program then waits for a STOP command, you have to
aim the STOP at this address space, not the original. This leads to
the odd situation of issuing, say
START MYPROG
and then having to stop it using
STOP MYPROG1

There's more, but I don't think there's a simple way of doing what you want.

Tony H.

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

Reply via email to