You're example uses the TSO CALL function to invoke your assembler. In this case, the calling convention is exactly like in a batch program. R1 points to a fullword address. That points to the parameter on the call where the first two bytes are the lenght of the parm, followed by that number of bytes, which is the parm value. I.e. if no parm is given, the halfword is H'0'
R1 -> A(PARM) -> LLparm Or, ... L R4,0(,R1) LH R5,0(,R4) LENGTH OF PARM STRING LA R6,2(,R4) POINT TO FIRST BYTE OF PARM ... R1 definitely does NOT point to an area you can use as a save area. Which is what your code does. <shudder> You need to do something like: SAVE (14,12) LR R12,R15 STORAGE OBTAIN, LV=72 ST R13,4(,R1) ST R1,8(,R13) LR R13,R1 L R1,4(,R13) PREVIOUS SAVE AREA L R1,24(,R1) RESTORE ORIGINAL R1 L R4,0(,R1) CALL PARAMETER LH R5,0(,R4) LA R5,2(,R4) ... If this were a TSO command, the registers at entry are different and you'll need to look in the TSO manual to determine what is where. And don't get me started on if this were a z/OS UNIX command. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets® 9151 Boulevard 26 . N. Richland Hills . TX 76010 (817) 255-3225 phone . john.mck...@healthmarkets.com . www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets® is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Scott Ford > Sent: Friday, May 18, 2012 10:36 AM > To: IBM-MAIN@bama.ua.edu > Subject: Rexx - calling assembler question > > All: > > I am in the process of writing a Rexx program that will call > an Assembler program and pass parameters. > The program is simple.. > > -------------------------------------------------------------- > --------------------------- > Rexx: > /* TSTGFILE */ > trace i > say 'Address is: 'address() > address TSO "CALL 'SFORD.LINKLIB(TESTCALL)' 'CLASS(USER' " > > -------------------------------------------------------------- > -------------------------- > > Assembler: > > TESTCALL CSECT > TESTCALL AMODE 31 > TESTCALL RMODE ANY > YREGS > SPACE 3 > SAVE (14,12),,'TESTCALL..&SYSDATE..&SYSTIME' > LR R12,R15 > USING TESTCALL,R12 > L R4,0(R1) > ST R4,8(R13) > ST R13,4(R4) > LR R13,R4 > L R1,4(R1) > MVC CLASSN(8),0(R4) > MVC SUBMSGA+20(8),CLASSN > SUBMSGA WTO 'PARM1: ',ROUTCDE=11 > BAILOUT DS 0H > L R13,SAVEAREA+4 > RETURN (14,12),RC=0 > CLASSN DS CL8 > PROFN DS CL8 > SAVEAREA DS 18F > -------------------------------------------------------------- > -------------------------------------------------------------- > ------------ > Execution JCL: > > //REXXGRP JOB ,SYSTEMS,CLASS=A,MSGCLASS=X, > // MSGLEVEL=(1,1),REGION=0M,NOTIFY=&SYSUID > //STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=99 > //STEPLIB DD DSN=SFORD.LINKLIB,DISP=SHR > //SYSEXEC DD DSN=SFORD.CLIST.LIBRARY,DISP=SHR > //SYSOUT DD SYSOUT=* > //SYSPRINT DD SYSOUT=* > //SYSTSPRT DD SYSOUT=* > //SYSTSIN DD * > %TSTGFILE > /* > -------------------------------------------------------------- > -------------------------------------------------------------- > ------------- > Output: > > J E S 2 J O B L O G -- S Y S T E M > A D C D -- N O > > 09.17.26 JOB00225 ---- FRIDAY, 18 MAY 2012 ---- > 09.17.26 JOB00225 IRR010I USERID SFORD IS ASSIGNED TO THIS JOB. > 09.17.26 JOB00225 ICH70001I SFORD LAST ACCESS AT 09:17:12 > ON FRIDAY, MAY 18, > 09.17.26 JOB00225 $HASP373 REXXGRP STARTED - INIT 1 - > CLASS A - SYS ADCD > 09.17.26 JOB00225 IEF403I REXXGRP - STARTED - TIME=09.17.26 > 09.17.27 JOB00225 +PARM1: CL > 09.17.27 JOB00225 IEF404I REXXGRP - ENDED - TIME=09.17.27 > 09.17.27 JOB00225 $HASP395 REXXGRP ENDED > > I assumed I misunderstand how parameters are passed in Rexx > to Assembler...I thought that > > R1 pointed to the Adcon list...can someone be so kind as to > point this old fellow .the right way > Regards, > > Scott J Ford > Software Engineer > http://www.identityforge.com > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN