On Tue, Oct 7, 2014 at 11:29 AM, Paul Gilmartin <
[email protected]> wrote:
> <snip of all the code>
>
>
> -- gil
>
>
Hum. Interesting. The failure seems to be related to the REXX code in some
way SEC6 RSN=801D8018
. Most interesting is the PSW being in key 0! The phrase "NO ACTIVE MODULE
FOUND - PRIMARY NOT EQUAL TO HOME" indicates to me that the REXX code is
running in a fork()'d address space instead of the batch region. This is
further shown because if I remove the two lines which set up the SYSCALL
environment, the REXX code runs, albeit with the 'sleep 5' failing. This is
beginning to make sense. Since the REXX is running in a separate address
space, and apparently the ADDRESS SYSCALL does not set up any kind of
environment to route the stdin, and stdout/stderr from and to the TSO
address space
(bpxbatch apparently does do this), then the SAY does not have an active
stdout (file descriptor 1) to which to send output. Which results in the
SEC6 abend?
I can see that this is indeed a "BAD".
If you want to observe something "mind bending", try modifying your REXX
code to look like the following. But be prepared to answer questions from
your systems people as you will put "junk" into the z/OS syslog. If you
don't want to do that, change the /dev/console to some other UNIX file
"open /tmp/???/somefile.txt" o_append+o_rdwr+o_trunc+o_creat 644
and look at it after the job runs. "It's a mind bogglin' thang!" Pay
special attention to what is at the _top_ of the file. How did that get
there????
/* Rexx */
signal on novalue
trace R
say SYSCALLS( 'ON' )
address 'SYSCALL'
/*
"open /dev/console" o_append+o_rdwr
fd=retval
fd2=0
"f_dupfd2 "fd fd2 /* force stdin */
stdin=retval
fd2=1
"f_dupfd2 "fd fd2 /* force stdin */
stdout=retval
fd2=2
"f_dupfd2 "fd fd2 /* force stdin */
stderr=retval
*/
do I = 1 to 5
say I date() time()
'sleep 5'; end
exit( RC )
--
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN