>When I issue the IEAMSCHED macro, and Abend SAC7 occurs without any dump.
Since this is a user error, taking a dump is your responsibility (whether 
by recovery with SDUMP(X) or via DD statements if your task and/or job 
will terminate due to this error). While it does not always do it this 
way, the system intends to take dumps for its own problems, not for yours.

>So did I incorrectly obtain the Space Token Of The Traget Address Space ?
>I used the ALESERV EXTRACTH,STOKEN=SRBSTOKEN, I thought that was correct.
The approach is fine. The reason code indicates that the STOKEN passed to 
the service was structurally not valid (and by that I don't mean "no 
longer valid", I mean "could never have been valid"). Therefore I conclude 
that the data referenced by SRBSTOKEN in the IEAVSCHD issuer is not the 
data extracted by ALESERV EXTRACTH, in whatever way that happened.

>provided you
>know the ASCB address, you can acquire the STOKEN as follows:
>>      R1 has ascb address of target address space for SRB
>        L         R1,ASCBASSB-ASCB(,R1)
>        MVC       SRBSTOKEN,ASSBSTKN-ASSB(R1) 

Unless you have proper serialization against the termination of this 
space, or knowledge that it will never terminate, you should not do this.
Even having recovery is possibly insufficient (as it is conceivable that 
the storage pointed to by R1 could be reused for some other purpose with 
unintended consequences to your code). You could possibly have the SRB 
itself make sure when it gets control that it is in the "right space" if 
there are control structures available to do so.

If R1 is the address of the home or current primary address space's ASCB, 
this sequence is safe to do. For P <> H <> S, it may also be safe for the 
current secondary address - the space could go away but if it does, your 
code will be abended.

In the OP's case, the "target address space" could have used this approach 
to save its STOKEN. The scheduling address space would fall into the 
"unless" that I mentioned earlier.
 
Peter Relson
z/OS Core Technology Design

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to