1° set Rexx variable with record value
2° built the Assembler Program with Tso Rexx
"IKJCT441" interface routine
3° get the Rexx Variable into Assembler program and map it with opportune Dsect equal the record structure
example for put Rexx Variable by Assembler Program:
the program put the Rexx variabile named "V1234" initialized with value "September"
....
CVTPTR EQU 16
CVTTVT EQU X'9C'
IKJTSVT Tso Vector Table Dsect
.....
MYPGM CSECT ,
.....
L R15,CVTPTR Access the CVT
L R15,CVTTVT(,R15) Access theTSVT
L R15,TSVTVACC-TSVT(,R15) service
ST R15,IKJCT441 service address
.....
LA R1,IKJCTLST service parm list
L R15,IKJCT441 service address
BALR R14,R15 execute service
ST R15,RETCODE
.....
RETCODE DS F
IKJCT441 DS F service address word
IKJCTLST DS 0F service parmlist block
DC A(ECODE01) ptr to function adr
DC A(NAMEP01) ptr to var name adr
DC A(NAMEL01) ptr to var length adr
DC A(VALUEP01)ptr to var value text adr
DC A(VALUEL01)ptr to var value ll adr
DC X'80',AL3(TOKEN01) ptr to last chain ptr
*
ECODE01 DC A(TSVEUPDT) function var "Update"
NAMEP01 DC AL1(0),AL3(VARNAME)
NAMEL01 DC F'5' Rexx var name length=5 bytes
VALUEP01 DC AL1(0),AL3(VARTEXT)
VALUEL01 DC F'9' Rexx var value length
TOKEN01 DC F'0' bottom block chain
*
VARNAME DC CL8'V1234' Rexx var name
VARTEXT DC CL80' ' Rexx var output
ORG VARTEXT
DC C'September' Rexx var value
ORG ,
note:
the Linkage Amode must be 24 in Read and 31 in Write for Rexx environment
if you want get the variable already existing must change the assembler code from
ECODE01 DC A(TSVEUPDT) function var "Update"
to
ECODE01 DC A(TSVERETR) function var "Get"
and do not to ddeclare the variable value & it's length
bye bye !!!!!!!!!