Since you're using ALESERV EXTRACTH, I'm assuming you want to schedule and
SRB into the home address space. IEAMSCHD is expecting the address of the
STOKEN. So if you were to do this,

     LA   R2, SRBSTOKEN 
     IEAMSCHD EPADDR=SRBRTN@,       
      PRIORITY=LOCAL,          
      PARM=SRBPARM@,           
      ENV=STOKEN,              
      TARGETSTOKEN=(R2),       change this line 
      KEYVALUE=INVOKERKEY,     
      FEATURE=NONE,            
      SYNCH=YES,               
      LLOCK=NO,                
      RMTRADDR=RTMRTN@,        
      FRRADDR=FRRRTN@

I'm also assuming the parms marked with an @ are the address of the actual
parm. If you want to schedule an SRB into any address space, 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)                            

Kenneth

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of [email protected]
Sent: Sunday, October 20, 2013 1:40 PM
To: [email protected]
Subject: Clarification of SAC7 Abend

Hi,

I need a better understanding of a SAC7 Abend when using IEAMSCHD to
schedual an SRB to another program that resides in another Address Space. 

I issue this macro from my schedualing address space:

IEAMSCHD EPADDR=SRBRTN@,       
      PRIORITY=LOCAL,          
      PARM=SRBPARM@,           
      ENV=STOKEN,              
      TARGETSTOKEN=SRBSTOKEN,  
      KEYVALUE=INVOKERKEY,     
      FEATURE=NONE,            
      SYNCH=YES,               
      LLOCK=NO,                
      RMTRADDR=RTMRTN@,        
      FRRADDR=FRRRTN@ 



         DS  0D            Alignment                          
SRBWORK  EQU *    .SRB Routine Work Areas                   
SRBRTN@  DS  A    .Address Of Target SRB Routine    
RTMRTN@  DS  A    .SRB Recovery Termination Routine 
FRRRTN@  DS  A    .SRB Functional Recovery Routine  
SRBPARM@ DS  A    .Parameters For SRB Routine       
SRBSTOKEN DS XL8  .Target/Home Address Space Token         
SRBRETCODE DS A   .Return Code From IEAMSCHED 
           DS A   .Reserved                         
*  


I would like to have the above IEAMSCHD schedual an SRB to another Program
in another Address Space (the Target Address Space).

The Target Address Space previously made available the SRBWORK structure
(above) to the Scheduling Address Space: 

The Address Of SRB Routine SRBRTN@  was Previously loaded by the Target
Address Space.

TARGETSTOKEN SRBSTOKEN obtained by ALESERV EXTRACTH,STOKEN=SRBSTOKEN in the
Target Address Space.

The Recovery Routines (FMTADDR and FRRADDR) were previously loaded by the
Target Address Space and contain the Address Of the Recovery Routines.

When I issue the IEAMSCHED macro, and Abend SAC7 occurs without any dump.

I looked up  ABEND=SAC7 with REASON=00080001 in messages and codes. It
refers to an inappropriate Space Token.

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.

Can anyone point me in the right direction to resolve this.


Paul D'Angelo
*************

----------------------------------------------------------------------
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

Reply via email to