Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling assembler pgm

Status
Not open for further replies.

karao76

Programmer
May 20, 2003
4
US
I have an assembler pgm (load module) that takes an input record which is in binary and translates it into a character based record. The binary record is 64 bytes and the translated record is about 900 bytes. I am trying to call this assembler program from my REXX program but I dont know how to pass the record structures that it needs because the parameters on a call cant exceed 100 characters . Let me know how to do it?


 
I think this has been asked and answered previously, but there are 2 ways of doing it (assuming you are running on an OS/390).

1) use call e.g. CALL 'MYPGM' 'MYPARM'
2) use SELECT in ISPF e.g. Address 'ISPEXEC' "Select Pgm(MYPGM) Parm(MYPARM)"
 
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 !!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top