Here's some code, CAS is a control address space and DAS a dependent address space which shares storage with CAS. I had to delete and change a lot of stuff but I think the basics are (still) there. Also not sure how one can format it better...
CAS code
* Working storage 22770001
EXECRTDV_ALESERV ALESERV MF=L 22790000
22800001
* Length of storage in R2 23150001
ST R2,RTDM_RTDVL Save for DAS 23160000
* Allocate the storage 23190000
STORAGE OBTAIN, +23210001
LENGTH=(R2), +23220000
BNDRY=PAGE 23270000
ST R1,.... Save shared storage address 23300001
* 23570000
* Extract our STOKEN for DAS access to shared storage 23580000
ALESERV EXTRACTH, +23610000
STOKEN=RTDM_STOKEN, +23620000
MF=(E,EXECRTDV_ALESERV) 23630000
DAS code
* 22760000
* Working storage somewhere 22770001
EXECRTDV_ALESERV ALESERV MF=L 22790000
EXECRTDV_STOKEN DS XL8 AS Token of caller's AS 22800000
EXECRTDV_CASALET DS XL4 ALET of caller's AS 22810000
EXECRTDV_DASALET DS XL4 ALET of caller's AS 22820000
EXECRTDV_IARVRL DS XL(VRLLEN) For IARVRL list 22830000
EXECRTDV_IARVRLA DS A Address of EXECRTDV_IARVRL 22840000
IARVSERV MF=(L,EXECRTDV_IARVSERV) 22850000
* 22890000
22950001
ICM R2,15,RTDM_RTDVL Get length 22960000
JZ EXECRTDV_ERR ... 22970001
* Allocate the storage 23190000
STORAGE OBTAIN, +23210001
LENGTH=(R2), +23220000
BNDRY=PAGE 23270000
23660001
* For DAS share our storage with CAS storage 23670000
ST R1,ASCAX_SSDV Shared storage address (DAS) 23710000
ALESERV EXTRACTH, +23730000
STOKEN=ASCAX_STOKEN, +23740000
MF=(E,EXECRTDV_ALESERV) 23750000
ALESERV ADD,STOKEN=RTDM_STOKEN,ALET=EXECRTDV_CASALET, +23770000
CHKEAX=NO, +23780000
MF=(E,EXECRTDV_ALESERV) 23790000
ALESERV ADD,STOKEN=ASCAX_STOKEN,ALET=EXECRTDV_DASALET, +23820000
CHKEAX=NO, +23830000
MF=(E,EXECRTDV_ALESERV) 23840000
LA R2,EXECRTDV_IARVRL 23860000
USING VRL,R2 23870000
L R0,RTDM_SSDV Source storage address 23880000
ST R0,VRLSVSA 23890000
L R0,EXECRTDV_CASALET CAS ALET 23920000
ST R0,VRLSALET Set CAS ALET in list 23930000
ST R0,ASCAX_CASALET Save CAS ALET 23940000
L R0,RTDM_RTDVL RTDV area length 23950000
SRL R0,12 Page count of shared storage 23960000
ST R0,VRLNUMPG 23970000
L R0,ASCAX_SSDV Target storage address 23990000
ST R0,VRLTVSA 24000000
L R0,EXECRTDV_DASALET DAS ALET 24020000
ST R0,VRLTALET Set DAS ALET in list 24030000
LA R0,EXECRTDV_IARVRL IARVRL list address 24050000
ST R0,EXECRTDV_IARVRLA IARVRL list address pointer 24060000
IARVSERV SHARE, +24070000
TARGET_VIEW=SHAREDWRITE, +24080000
RANGLIST=EXECRTDV_IARVRLA, +24090000
MF=(E,EXECRTDV_IARVSERV) 24100000
DROP R2 24110001
24120001
IARVRL , 24130001
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
