Paul's code snippet is correct. Example 4 from the IBM manual shows that his coding is correct. The ALESERV will work fine if that's the ASCB where he wants to run the SRB.
I would suggest looking at the SRBWORK and make sure it's in shared memory or being correctly passed. My gut feeling is that it's not referencing the correct area and that it is actually invalid. Or maybe the area is not aligned with the passed area. I don't think it's using the STOKEN you think it's using. Jon Perryman. >________________________________ > From: Kenneth Wilkerson <[email protected]> > > > >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@ > >-----Original Message----- >Behalf Of [email protected] > >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. > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
