(too old to reply)
Rexx - calling assembler question
Scott Ford
2012-05-18 15:38:02 UTC
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 ***@bama.ua.edu with the message: INFO IBM-MAIN
McKown, John
2012-05-18 15:53:00 UTC
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 .
***@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
Sent: Friday, May 18, 2012 10:36 AM
Subject: Rexx - calling assembler question
 
I am in the process of writing a Rexx program that will call
an Assembler program and pass parameters.
The program is simple..
 
--------------------------------------------------------------
---------------------------
/* TSTGFILE  */
trace i
say 'Address is: 'address()
address TSO "CALL 'SFORD.LINKLIB(TESTCALL)' 'CLASS(USER' "
 
--------------------------------------------------------------
--------------------------
 
 
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
--------------------------------------------------------------
--------------------------------------------------------------
------------
 
//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
/*
--------------------------------------------------------------
--------------------------------------------------------------
-------------
 
                       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,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Wayne Driscoll
2012-05-18 15:57:45 UTC
R1 contains the address of the PLIST. It will contain one entry (ie the
first word of the PLIST will have the VL bit set). this entry will point
to a 2 byte length field, followed by a character string whose length is
in the first 2 bytes. IOW, a standard batch parameter list.
===============================================
Wayne Driscoll
OMEGAMON DB2 L3 Support/Development
wdrisco(AT)us.ibm.com
===============================================



From: Scott Ford <***@YAHOO.COM>
To: IBM-***@bama.ua.edu,
Date: 05/18/2012 10:37 AM
Subject: Rexx - calling assembler question
Sent by: IBM Mainframe Discussion List <IBM-***@bama.ua.edu>



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 ***@bama.ua.edu with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Tony Harminc
2012-05-18 16:06:52 UTC
Post by Scott Ford
I am in the process of writing a Rexx program that will call an Assembler program and pass parameters.
The program is simple..
-----------------------------------------------------------------------------------------
/* TSTGFILE  */
trace i
say 'Address is: 'address()
address TSO "CALL 'SFORD.LINKLIB(TESTCALL)' 'CLASS(USER' "
----------------------------------------------------------------------------------------
What you've got is a TSO call command. It has really nothing to do with REXX.
Post by Scott Ford
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
----------------------------------------------------------------------------------------------------------------------------------------
//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
/*
-----------------------------------------------------------------------------------------------------------------------------------------
                       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
It does. R1 points to a list of fullword addresses, and in this case
there will be only one. You load that first and only pointer into R4
with
Post by Scott Ford
L R4,0(R1)
Now R4 points to a halfword length field(10), followed by the argument
text - in your case "CLASS(USER". So far, so good. (At this point, I
would just do a WTO with the TEXT= option. TEXT= takes a pointer to a
halfword length followed by text, so you are all set.)

Then there is some code that appears to confuse chaining save areas
with the argument you've been passed...
Post by Scott Ford
ST R4,8(R13)
ST R13,4(R4)
LR R13,R4
L R1,4(R1)
If you want to include some hardcoded text such as "PARM1: ", then you
might do better to reserve an area, e.g.
MSG DS Y(*-*),CL256
move in your local constant text and the argument you received, make
sure the length field covers both, and then issue the WTO TEXT=.

You could even easily achieve reenterability this way, should that
matter to you.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Scott Ford
2012-05-18 16:28:59 UTC
Tom:
 
Let me explain, sorry, I should have been more clear..
 
The Rexx program or clist will call and Asembler module , the Assembler module in this case will do calls to
the R_Radmin to perform extracts..output will go to a ddname once i get their with this code..
 
My problem is passing for example a Class and Profile to the Assembler routine doing the call to RACF

Scott J Ford
Software Engineer
http://www.identityforge.com
 


________________________________
From: Tony Harminc <***@HARMINC.NET>
To: IBM-***@bama.ua.edu
Sent: Friday, May 18, 2012 12:05 PM
Subject: Re: Rexx - calling assembler question
Post by Scott Ford
I am in the process of writing a Rexx program that will call an Assembler program and pass parameters.
The program is simple..
-----------------------------------------------------------------------------------------
/* TSTGFILE  */
trace i
say 'Address is: 'address()
address TSO "CALL 'SFORD.LINKLIB(TESTCALL)' 'CLASS(USER' "
----------------------------------------------------------------------------------------
What you've got is a TSO call command. It has really nothing to do with REXX.
Post by Scott Ford
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
----------------------------------------------------------------------------------------------------------------------------------------
//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
/*
-----------------------------------------------------------------------------------------------------------------------------------------
                       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
It does. R1 points to a list of fullword addresses, and in this case
there will be only one. You load that first and only pointer into R4
with
Post by Scott Ford
          L    R4,0(R1)
Now R4 points to a halfword length field(10), followed by the argument
text - in your case "CLASS(USER". So far, so good. (At this point, I
would just do a WTO with the TEXT= option. TEXT= takes a pointer to a
halfword length followed by text, so you are all set.)

Then there is some code that appears to confuse chaining save areas
with the argument you've been passed...
Post by Scott Ford
          ST    R4,8(R13)
          ST    R13,4(R4)
          LR    R13,R4
          L    R1,4(R1)
If you want to include some hardcoded text such as "PARM1: ", then you
might do better to reserve an area, e.g.
MSG  DS    Y(*-*),CL256
move in your local constant text and the argument you received, make
sure the length field covers both, and then issue the WTO TEXT=.

You could even easily achieve reenterability this way, should that
matter to you.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Tony Harminc
2012-05-18 16:41:29 UTC
Tom?
Post by Scott Ford
Let me explain, sorry, I should have been more clear..
The Rexx program or clist will call and Asembler module , the Assembler module in this case will do calls to
the R_Radmin to perform extracts..output will go to a ddname once i get their with this code..
My problem is passing for example a Class and Profile to the Assembler routine doing the call to RACF
If you stick to the TSO CALL command, you have only one text argument
you can pass. So if you have two variable length items to pass, you
will need delimiters of some sort, or you can reserve a fixed space
for each. Keep in mind that yuo have only 100 bytes available in such
an argument.

There are other ways of calling an assembler program from REXX that
allow you to pass multiple arguments, and even update them. Have a
look at LINKMVS and LINKPGM in the REXX Reference book.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Scott Ford
2012-05-18 16:45:19 UTC
Tony,
 
Sort for the misname ...I am looking at the storage save area chain, John send me, ty, John..
And I will take a look at LINKPGM..
 
You guys are great as usual

Scott J Ford
Software Engineer
http://www.identityforge.com
 


________________________________
From: Tony Harminc <***@HARMINC.NET>
To: IBM-***@bama.ua.edu
Sent: Friday, May 18, 2012 12:40 PM
Subject: Re: Rexx - calling assembler question
Tom?
Post by Scott Ford
Let me explain, sorry, I should have been more clear..
The Rexx program or clist will call and Asembler module , the Assembler module in this case will do calls to
the R_Radmin to perform extracts..output will go to a ddname once i get their with this code..
My problem is passing for example a Class and Profile to the Assembler routine doing the call to RACF
If you stick to the TSO CALL command, you have only one text argument
you can pass. So if you have two variable length items to pass, you
will need delimiters of some sort, or you can reserve a fixed space
for each. Keep in mind that yuo have only 100 bytes available in such
an argument.

There are other ways of calling an assembler program from REXX that
allow you to pass multiple arguments, and even update them. Have a
look at LINKMVS and LINKPGM in the REXX Reference book.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
shmuel+ (Shmuel Metz , Seymour J.)
2012-05-20 22:17:21 UTC
In <***@web164504.mail.gq1.yahoo.com>, on
05/18/2012
Post by Scott Ford
I assumed I misunderstand how parameters are passed in Rexx to
Assembler
That depends on what environment you specify. However, in all cases
the save area chaining is the same, and that's where your dirst error
was.

ADDRESS TSO FOO BAR passes the address of a CPPL in R1. In your case
the command you specified was CALL, and it was CALL that invoked your
assembler routine rather than your REXX code. CALL passes the address
of a one word list in R1, and that list points to a halfword length
followed by the parameter text; in your case, CLASS(USER.

You probably should be using ADDRESS ATTACH or ADDRESS LINK for what
you are doing. See 2.5.9 in SA22-7790, z/OS TSO/E REXX Reference for
more details.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
ISO position; see <http://patriot.net/~shmuel/resume/brief.html>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2012-05-21 05:17:02 UTC
Post by shmuel+ (Shmuel Metz , Seymour J.)
You probably should be using ADDRESS ATTACH or ADDRESS LINK for what
you are doing. See 2.5.9 in SA22-7790, z/OS TSO/E REXX Reference for
more details.
Those generate parameter lists with a distinct CMS flavor. I'll
recommend instead address ATTACHPGM, address ATTACHMVS,
address LINKPGM, and address LINKMVS. The -PGM forms
generate parameter lists similar to assembler CALL; the -MVS
forms generate parameter lists similar to JCL EXEC PGM=...

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
shmuel+ (Shmuel Metz , Seymour J.)
2012-05-21 21:02:21 UTC
In <***@bama.ua.edu>, on
05/21/2012
Post by Paul Gilmartin
Those generate parameter lists with a distinct CMS flavor.
Not even close; 8 character tokenization is mickey mouse. The PLIST
has a distinct REXX flavor. If you want to pass back variables to the
caller, this is the way to go. Of course, which form you should use is
determined by how you code the routine.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
ISO position; see <http://patriot.net/~shmuel/resume/brief.html>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2012-05-22 00:46:26 UTC
Post by shmuel+ (Shmuel Metz , Seymour J.)
Post by Paul Gilmartin
Those generate parameter lists with a distinct CMS flavor.
Not even close; 8 character tokenization is mickey mouse. The PLIST
has a distinct REXX flavor. ...
Well, then, a CMS-Rexx flavor, with a pointer and a length. I remember
being surprised and dismayed when Rexx first appeared in TSO/E 2
that address LINK/ATTACH (the -PGM and -MVS forms appeared only
later) that there was no way to generate an OS-conventional R1
PLIST.
Post by shmuel+ (Shmuel Metz , Seymour J.)
If you want to pass back variables to the
caller, this is the way to go. Of course, which form you should use is
determined by how you code the routine.
Perhaps the best way. But address LINKPGM can also be used for
the purpose, particularly when interfacing with programs expecting
Assembler CALL linkage. IBM does it in 'SYS1.SAMPLIB(CSFTEST)'.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
shmuel+ (Shmuel Metz , Seymour J.)
2012-05-24 09:53:55 UTC
In <***@bama.ua.edu>, on
05/21/2012
Post by Paul Gilmartin
Well, then, a CMS-Rexx flavor, with a pointer and a length.
No, that's not what CMS uses. You don't want to know.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
ISO position; see <http://patriot.net/~shmuel/resume/brief.html>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN