(too old to reply)
REXX to Assembler
Matthew Stitt
2004-12-13 19:21:02 UTC
I've got an assembler routine which I've been trying to make work when called from REXX. Needless to say it's been eye-opening.

At this point my simple REXX is not seeing the parameters being returned from the assembler routine. When I place a "say" after the LINKMVS call, it shows the values of the parameters as being unchanged. Yet the second parameter should be changed as a result of the assembler routine.

Anyone got any clues about how I can get REXX to see my returned values?

Here is the code:
/* REXX */
func = 01
inp1 = '00000000000000000000'
outp1 = '00000000000000000000'
address LINKMVS "G207DCAN func inp1 outp1"
say func " " inp1 " " outp1

And when I run it in batch:
READY
%DATEG207
01 00000000000000000000 00000000000000000000
READY

The second parameter should contain today's date in gregorian.

You can't get any simpler than this......but I know you people <g>
**************************************************************************************************
****************************************************************************************************
This e-mail and any files transmitted with it are confidential to abc distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
are intended solely for the individual named. If you are not the named addressee, you
are notified that any copying, dissemination, distribution or disclosure of any or all of its
contents, and any action taken in reliance on the transmission, are unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have received this
transmission in error and take all necessary and appropriate actions to permanently
delete it from your system.
*****************************************************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Bob Bridges
2004-12-13 19:29:55 UTC
I'm not an assembler programmer (nor do I even play one on TV), but I'm
unreasonably sure that the replies you'll get from the knowledgeable
assembler geeks will ask for the code to your assembly program,
particularly how you receive and return the parameters.

---
Bob Bridges, ***@discoverfinancial.com, 224 405-0811
***@attglobal.net, 847 520-1684 xt 243

/* We should be careful to get out of an experience only the wisdom that
is in it -- and stop there -- lest we be like the cat that sits down on a
hot stove-lid. She will never sit down on a hot stove-lid again, and that
is well; but also she will never sit down on a cold one any more. -Mark
Twain */




Matthew Stitt <***@ABCDISTRIBUTING.COM>
2004-12-13 13:21


To: TSO-***@VM.MARIST.EDU
cc:
Subject: REXX to Assembler

I've got an assembler routine which I've been trying to make work when
called from REXX. Needless to say it's been eye-opening.

At this point my simple REXX is not seeing the parameters being returned
from the assembler routine. When I place a "say" after the LINKMVS call,
it shows the values of the parameters as being unchanged. Yet the second
parameter should be changed as a result of the assembler routine.

Anyone got any clues about how I can get REXX to see my returned values?

Here is the code:
/* REXX */
func = 01
inp1 = '00000000000000000000'
outp1 = '00000000000000000000'
address LINKMVS "G207DCAN func inp1 outp1"
say func " " inp1 " " outp1

And when I run it in batch:
READY
%DATEG207
01 00000000000000000000 00000000000000000000
READY

The second parameter should contain today's date in gregorian.

You can't get any simpler than this......but I know you people <g>


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jeff Byrum
2004-12-13 19:53:40 UTC
Matthew:

I'm not an expert on this, but I'm pretty sure the answer is that Rexx
keeps its variables in its own internal location and they are not
accessible through the normal kind of addressing your Assembler program
is doing.

I believe that you will need to have your ASM program call ISPF services
(EP=ISPLINK) to do a VDEFINE of the variable that you want your REXX
exec to use to find the results. Sorry, I'm not sure where this is all
documented...

Jeff



-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Matthew Stitt
Sent: Monday, December 13, 2004 2:21 PM
To: TSO-***@VM.MARIST.EDU
Subject: REXX to Assembler

I've got an assembler routine which I've been trying to make work when
called from REXX. Needless to say it's been eye-opening.

At this point my simple REXX is not seeing the parameters being returned
from the assembler routine. When I place a "say" after the LINKMVS
call, it shows the values of the parameters as being unchanged. Yet the
second parameter should be changed as a result of the assembler routine.

Anyone got any clues about how I can get REXX to see my returned values?

Here is the code:
/* REXX */
func = 01
inp1 = '00000000000000000000'
outp1 = '00000000000000000000'
address LINKMVS "G207DCAN func inp1 outp1"
say func " " inp1 " " outp1

And when I run it in batch:
READY
%DATEG207
01 00000000000000000000 00000000000000000000
READY

The second parameter should contain today's date in gregorian.

You can't get any simpler than this......but I know you people <g>
************************************************************************
**************************
************************************************************************
****************************
This e-mail and any files transmitted with it are confidential to abc
distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging
to abc, which
are intended solely for the individual named. If you are not the named
addressee, you
are notified that any copying, dissemination, distribution or disclosure
of any or all of its
contents, and any action taken in reliance on the transmission, are
unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have
received this
transmission in error and take all necessary and appropriate actions to
permanently
delete it from your system.
************************************************************************
*****************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
John Kalinich
2004-12-13 19:53:55 UTC
I believe that you have to write your assembler routine as a Rexx
external function call in order to return variables and stems. There
are some free external functions at Rob Scott's (author of MXI) web
site: http://www.mximvs.com/rexx-functions.shtml.

Regards,
John Kalinich
Computer Sciences Corp

> -----Original Message-----
> From: Bob Bridges [mailto:***@DISCOVERFINANCIAL.COM]
> Sent: Monday, December 13, 2004 1:26 PM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: REXX to Assembler
>
>
> I'm not an assembler programmer (nor do I even play one on
> TV), but I'm unreasonably sure that the replies you'll get
> from the knowledgeable assembler geeks will ask for the code
> to your assembly program, particularly how you receive and
> return the parameters.
>
> ---
> Bob Bridges, ***@discoverfinancial.com, 224 405-0811
> ***@attglobal.net, 847 520-1684 xt 243
>
> /* We should be careful to get out of an experience only the
> wisdom that is in it -- and stop there -- lest we be like the
> cat that sits down on a hot stove-lid. She will never sit
> down on a hot stove-lid again, and that is well; but also she
> will never sit down on a cold one any more. -Mark Twain */
>
>
>
>
> Matthew Stitt <***@ABCDISTRIBUTING.COM>
> 2004-12-13 13:21
>
>
> To: TSO-***@VM.MARIST.EDU
> cc:
> Subject: REXX to Assembler
>
> I've got an assembler routine which I've been trying to make
> work when called from REXX. Needless to say it's been eye-opening.
>
> At this point my simple REXX is not seeing the parameters
> being returned from the assembler routine. When I place a
> "say" after the LINKMVS call, it shows the values of the
> parameters as being unchanged. Yet the second parameter
> should be changed as a result of the assembler routine.
>
> Anyone got any clues about how I can get REXX to see my
> returned values?
>
> Here is the code:
> /* REXX */
> func = 01
> inp1 = '00000000000000000000'
> outp1 = '00000000000000000000'
> address LINKMVS "G207DCAN func inp1 outp1"
> say func " " inp1 " " outp1
>
> And when I run it in batch:
> READY
> %DATEG207
> 01 00000000000000000000 00000000000000000000
> READY
>
> The second parameter should contain today's date in gregorian.
>
> You can't get any simpler than this......but I know you people <g>
>
>
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access
> instructions, send email to ***@VM.MARIST.EDU with the
> message: INFO TSO-REXX
>

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Mark Zelden
2004-12-13 20:44:16 UTC
Matthew,

I think you may need LINKPGM instead of LINKMVS. For a sample
see SYS1.SAMPLIB(IGGCSIRX).

Mark
--
Mark Zelden
Sr. Software and Systems Architect
mailto: ***@zurichna.com
Systems Programming expert at http://Search390.com/ateExperts/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html


Matthew Stitt
<***@ABCDISTRI To: TSO-***@VM.MARIST.EDU
BUTING.COM> cc:
Sent by: TSO REXX Subject: REXX to Assembler
Discussion List
<TSO-***@VM.MARIST.EDU>


12/13/2004 01:21 PM
Please respond to TSO
REXX Discussion List






I've got an assembler routine which I've been trying to make work when
called from REXX. Needless to say it's been eye-opening.

At this point my simple REXX is not seeing the parameters being returned
from the assembler routine. When I place a "say" after the LINKMVS call,
it shows the values of the parameters as being unchanged. Yet the second
parameter should be changed as a result of the assembler routine.

Anyone got any clues about how I can get REXX to see my returned values?

Here is the code:
/* REXX */
func = 01
inp1 = '00000000000000000000'
outp1 = '00000000000000000000'
address LINKMVS "G207DCAN func inp1 outp1"
say func " " inp1 " " outp1

And when I run it in batch:
READY
%DATEG207
01 00000000000000000000 00000000000000000000
READY

The second parameter should contain today's date in gregorian.

You can't get any simpler than this......but I know you people <g>
**************************************************************************************************

****************************************************************************************************

This e-mail and any files transmitted with it are confidential to abc
distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to
abc, which
are intended solely for the individual named. If you are not the named
addressee, you
are notified that any copying, dissemination, distribution or disclosure of
any or all of its
contents, and any action taken in reliance on the transmission, are
unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have
received this
transmission in error and take all necessary and appropriate actions to
permanently
delete it from your system.
*****************************************************************************************************


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Marcel Harleman
2004-12-13 20:44:54 UTC
Matthew,

My guess would be you want to use the contents of the three
parameters, so you might wanna code

address LINKMVS "G207DCAN" func inp1 outp1

Otherwise you would just pass the strings "func", "inpl" and "outpl".

HTH

Marcel.

>I've got an assembler routine which I've been trying to make work when called from REXX. Needless to say it's been eye-opening.
>
>At this point my simple REXX is not seeing the parameters being returned from the assembler routine. When I place a "say" after the LINKMVS call, it shows the values of the parameters as being unchanged. Yet the second parameter should be changed as a result of the assembler routine.
>
>Anyone got any clues about how I can get REXX to see my returned values?
>
>Here is the code:
>/* REXX */
> func = 01
> inp1 = '00000000000000000000'
> outp1 = '00000000000000000000'
> address LINKMVS "G207DCAN func inp1 outp1"
> say func " " inp1 " " outp1
>
>And when I run it in batch:
>READY
> %DATEG207
>01 00000000000000000000 00000000000000000000
>READY
>
>The second parameter should contain today's date in gregorian.
>
>You can't get any simpler than this......but I know you people <g>
>**************************************************************************************************
>****************************************************************************************************
>This e-mail and any files transmitted with it are confidential to abc distributing, llc.
>("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
>are intended solely for the individual named. If you are not the named addressee, you
>are notified that any copying, dissemination, distribution or disclosure of any or all of its
>contents, and any action taken in reliance on the transmission, are unauthorized and
>prohibited. Please notify abc immediately by e-mail reply if you have received this
>transmission in error and take all necessary and appropriate actions to permanently
>delete it from your system.
>*****************************************************************************************************
>
>----------------------------------------------------------------------
>For TSO-REXX subscribe / signoff / archive access instructions,
>send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
George, William , DHS-ITSD
2004-12-13 20:57:15 UTC
This sounds familiar...
See last week's "Invoke a Cybermation ESP command from Rexx" thread
where the LINKMVS and passed parameters is discussed.

Hence,
address LINKMVS "G207DCAN func inp1 outp1"
would be correct.


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Marcel Harleman
Sent: Monday, December 13, 2004 11:54 AM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler

Matthew,

My guess would be you want to use the contents of the three
parameters, so you might wanna code

address LINKMVS "G207DCAN" func inp1 outp1

Otherwise you would just pass the strings "func", "inpl" and "outpl".

HTH

Marcel.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Matthew Stitt
2004-12-13 20:57:44 UTC
Nope, got an RC(-2) doing it that way......

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU]On Behalf
Of Marcel Harleman
Sent: Monday, December 13, 2004 2:54 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler


Matthew,

My guess would be you want to use the contents of the three
parameters, so you might wanna code

address LINKMVS "G207DCAN" func inp1 outp1

Otherwise you would just pass the strings "func", "inpl" and "outpl".

HTH

Marcel.

>I've got an assembler routine which I've been trying to make work when called from REXX. Needless to say it's been eye-opening.
>
>At this point my simple REXX is not seeing the parameters being returned from the assembler routine. When I place a "say" after the LINKMVS call, it shows the values of the parameters as being unchanged. Yet the second parameter should be changed as a result of the assembler routine.
>
>Anyone got any clues about how I can get REXX to see my returned values?
>
>Here is the code:
>/* REXX */
> func = 01
> inp1 = '00000000000000000000'
> outp1 = '00000000000000000000'
> address LINKMVS "G207DCAN func inp1 outp1"
> say func " " inp1 " " outp1
>
>And when I run it in batch:
>READY
> %DATEG207
>01 00000000000000000000 00000000000000000000
>READY
>
>The second parameter should contain today's date in gregorian.
>
>You can't get any simpler than this......but I know you people <g>
>**************************************************************************************************
>****************************************************************************************************
>This e-mail and any files transmitted with it are confidential to abc distributing, llc.
>("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
>are intended solely for the individual named. If you are not the named addressee, you
>are notified that any copying, dissemination, distribution or disclosure of any or all of its
>contents, and any action taken in reliance on the transmission, are unauthorized and
>prohibited. Please notify abc immediately by e-mail reply if you have received this
>transmission in error and take all necessary and appropriate actions to permanently
>delete it from your system.
>*****************************************************************************************************
>
>----------------------------------------------------------------------
>For TSO-REXX subscribe / signoff / archive access instructions,
>send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
**************************************************************************************************
****************************************************************************************************
This e-mail and any files transmitted with it are confidential to abc distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
are intended solely for the individual named. If you are not the named addressee, you
are notified that any copying, dissemination, distribution or disclosure of any or all of its
contents, and any action taken in reliance on the transmission, are unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have received this
transmission in error and take all necessary and appropriate actions to permanently
delete it from your system.
*****************************************************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Matthew Stitt
2004-12-13 20:57:56 UTC
That got it.

Thanks Mark......

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU]On Behalf
Of Mark Zelden
Sent: Monday, December 13, 2004 2:55 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler


Matthew,

I think you may need LINKPGM instead of LINKMVS. For a sample
see SYS1.SAMPLIB(IGGCSIRX).

Mark
--
Mark Zelden
Sr. Software and Systems Architect
mailto: ***@zurichna.com
Systems Programming expert at http://Search390.com/ateExperts/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html


Matthew Stitt
<***@ABCDISTRI To: TSO-***@VM.MARIST.EDU
BUTING.COM> cc:
Sent by: TSO REXX Subject: REXX to Assembler
Discussion List
<TSO-***@VM.MARIST.EDU>


12/13/2004 01:21 PM
Please respond to TSO
REXX Discussion List






I've got an assembler routine which I've been trying to make work when
called from REXX. Needless to say it's been eye-opening.

At this point my simple REXX is not seeing the parameters being returned
from the assembler routine. When I place a "say" after the LINKMVS call,
it shows the values of the parameters as being unchanged. Yet the second
parameter should be changed as a result of the assembler routine.

Anyone got any clues about how I can get REXX to see my returned values?

Here is the code:
/* REXX */
func = 01
inp1 = '00000000000000000000'
outp1 = '00000000000000000000'
address LINKMVS "G207DCAN func inp1 outp1"
say func " " inp1 " " outp1

And when I run it in batch:
READY
%DATEG207
01 00000000000000000000 00000000000000000000
READY

The second parameter should contain today's date in gregorian.

You can't get any simpler than this......but I know you people <g>
**************************************************************************************************

****************************************************************************************************

This e-mail and any files transmitted with it are confidential to abc
distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to
abc, which
are intended solely for the individual named. If you are not the named
addressee, you
are notified that any copying, dissemination, distribution or disclosure of
any or all of its
contents, and any action taken in reliance on the transmission, are
unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have
received this
transmission in error and take all necessary and appropriate actions to
permanently
delete it from your system.
*****************************************************************************************************


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
**************************************************************************************************
****************************************************************************************************
This e-mail and any files transmitted with it are confidential to abc distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
are intended solely for the individual named. If you are not the named addressee, you
are notified that any copying, dissemination, distribution or disclosure of any or all of its
contents, and any action taken in reliance on the transmission, are unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have received this
transmission in error and take all necessary and appropriate actions to permanently
delete it from your system.
*****************************************************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Matthew Stitt
2004-12-13 21:05:50 UTC
That's where I got the idea. But Mark Z's LINKPGM worked perfectly.....

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU]On Behalf
Of George, William (DHS-ITSD)
Sent: Monday, December 13, 2004 3:53 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler


This sounds familiar...
See last week's "Invoke a Cybermation ESP command from Rexx" thread
where the LINKMVS and passed parameters is discussed.

Hence,
address LINKMVS "G207DCAN func inp1 outp1"
would be correct.


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Marcel Harleman
Sent: Monday, December 13, 2004 11:54 AM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler

Matthew,

My guess would be you want to use the contents of the three
parameters, so you might wanna code

address LINKMVS "G207DCAN" func inp1 outp1

Otherwise you would just pass the strings "func", "inpl" and "outpl".

HTH

Marcel.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
**************************************************************************************************
****************************************************************************************************
This e-mail and any files transmitted with it are confidential to abc distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
are intended solely for the individual named. If you are not the named addressee, you
are notified that any copying, dissemination, distribution or disclosure of any or all of its
contents, and any action taken in reliance on the transmission, are unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have received this
transmission in error and take all necessary and appropriate actions to permanently
delete it from your system.
*****************************************************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Imbriale, Donald , Exchange
2004-12-13 21:19:08 UTC
From my reading about LINKMVS vs. LINKPGM, both will allow you to update
variables, but LINKPGM cannot change the lengths of those variables.
With LINKMVS, a half-word length field is built for each parameter
passed to the invoked program; you tell the environment what to do with
those parameters upon return to REXX by setting the length field (less
than 0 means 'do not update variable'; 0 means 'set it to a null
string'; greater than 0 means 'update the variable for that parameter
with the value the program returned in the parameter list, using the
length in the length field').

Don Imbriale


>-----Original Message-----
>From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
Behalf Of
>Matthew Stitt
>Sent: Monday, December 13, 2004 4:00 PM
>To: TSO-***@VM.MARIST.EDU
>Subject: Re: REXX to Assembler
>
>That got it.
>
>Thanks Mark......
>
>-----Original Message-----
>From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU]On Behalf
>Of Mark Zelden
>Sent: Monday, December 13, 2004 2:55 PM
>To: TSO-***@VM.MARIST.EDU
>Subject: Re: REXX to Assembler
>
>
>Matthew,
>
>I think you may need LINKPGM instead of LINKMVS. For a sample
>see SYS1.SAMPLIB(IGGCSIRX).
>
>Mark
>--
>Mark Zelden
>Sr. Software and Systems Architect
>mailto: ***@zurichna.com
>Systems Programming expert at http://Search390.com/ateExperts/
>Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
>
>
> Matthew Stitt
> <***@ABCDISTRI To: TSO-
>***@VM.MARIST.EDU
> BUTING.COM> cc:
> Sent by: TSO REXX Subject: REXX to
Assembler
> Discussion List
> <TSO-***@VM.MARIST.EDU>
>
>
> 12/13/2004 01:21 PM
> Please respond to TSO
> REXX Discussion List
>
>
>
>
>
>
>I've got an assembler routine which I've been trying to make work when
>called from REXX. Needless to say it's been eye-opening.
>
>At this point my simple REXX is not seeing the parameters being
returned
>from the assembler routine. When I place a "say" after the LINKMVS
call,
>it shows the values of the parameters as being unchanged. Yet the
second
>parameter should be changed as a result of the assembler routine.
>
>Anyone got any clues about how I can get REXX to see my returned
values?
>
>Here is the code:
>/* REXX */
> func = 01
> inp1 = '00000000000000000000'
> outp1 = '00000000000000000000'
> address LINKMVS "G207DCAN func inp1 outp1"
> say func " " inp1 " " outp1
>
>And when I run it in batch:
>READY
> %DATEG207
>01 00000000000000000000 00000000000000000000
>READY
>
>The second parameter should contain today's date in gregorian.
>
>You can't get any simpler than this......but I know you people <g>
>********************************************************************
>******************************
>
>********************************************************************
>********************************


***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Mark Zelden
2004-12-13 21:18:19 UTC
It's the assembler style parameter list that is key here:

http://tinyurl.com/6uny2

Mark
--
Mark Zelden
Sr. Software and Systems Architect
mailto: ***@zurichna.com
Systems Programming expert at http://Search390.com/ateExperts/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html


Matthew Stitt
<***@ABCDISTRI To: TSO-***@VM.MARIST.EDU
BUTING.COM> cc:
Sent by: TSO REXX Subject: Re: REXX to Assembler
Discussion List
<TSO-***@VM.MARIST.EDU>


12/13/2004 03:01 PM
Please respond to TSO
REXX Discussion List






That's where I got the idea. But Mark Z's LINKPGM worked perfectly.....





******************* PLEASE NOTE *******************
This E-Mail/telefax message and any documents accompanying this
transmission may contain privileged and/or confidential information and is
intended solely for the addressee(s) named above. If you are not the
intended addressee/recipient, you are hereby notified that any use of,
disclosure, copying, distribution, or reliance on the contents of this
E-Mail/telefax information is strictly prohibited and may result in legal
action against you. Please reply to the sender advising of the error in
transmission and immediately delete/destroy the message and any
accompanying documents. Thank you.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Paul Gilmartin
2004-12-14 02:25:21 UTC
In a recent note, Marcel Harleman said:

> Date: Mon, 13 Dec 2004 20:54:02 +0100
>
> My guess would be you want to use the contents of the three
> parameters, so you might wanna code
>
> address LINKMVS "G207DCAN" func inp1 outp1
>
> Otherwise you would just pass the strings "func", "inpl" and "outpl".
>
No; no; no! Discussed on this list a scant 3 days ago, circa:

Linkname: TSO-***@www2.marist.edu post from ***@UNIX.STORTEK.COM :
URL: http://www2.marist.edu/htbin/wlvtype?TSO-REXX.14492

Read the thread.

> > address LINKMVS "G207DCAN func inp1 outp1"
> > say func " " inp1 " " outp1
> >
That passes the values correctly to G207DCAN, but as others have pointed
out in this thread, they are passed as copies and not restored on return.
You may need to use the:

12.4 Variable Access Routine - IRXEXCOM

interface from:

Title: z/OS V1R5.0 TSO/E REXX Reference
Document Number: SA22-7790-04

(I used to know this a long time ago; not lately)

-- gil
--
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jeremy C B Nicoll
2004-12-15 18:47:26 UTC
In article
<***@usres3mail.asg.com>,
Jeff Byrum <***@ASG.COM> wrote:
> Matthew:

> I'm not an expert on this, but I'm pretty sure the answer is that
> Rexx keeps its variables in its own internal location and they are
> not accessible through the normal kind of addressing your Assembler
> program is doing.

There's no problem accessing rexx variables' storage from assembler,
because the address environment used passes to assembler the address of
each parm you specify.

> I believe that you will need to have your ASM program call ISPF
> services (EP=ISPLINK)

Wrong. There's no need to do this unless you need ispf services.

--
Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jeremy C B Nicoll
2004-12-15 18:47:28 UTC
In article
<***@scsmail.scsnet.csc.com>,
John Kalinich <***@SCSNET.CSC.COM> wrote:

> I believe that you have to write your assembler routine as a Rexx
> external function call in order to return variables and stems.

Not exactly. If you have an assembler program and call it with - say -

buffer = left("",80)
address <whatever> "myprog buffer"

then the address of the 80-byte storage area that rexx associates with
the name "buffer" will be passed to the assembler program. It can read
or write that 80-byte area as it pleases. Depending on which
addressing scheme you use there may or may not be a halfword length (of
buffer) also available to the assembler program.

However if you want the assembler program to add new variables to those
that rexx knows about (rather than update existing ones) you can use
ibm-supplied routines which will access its variable storage.

In neither case need the extra logic be coded as a rexx external
function - that's only required if you want the programmer to be able
to code: wibble = xyzfunct(foo,bar)

--
Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jeremy C B Nicoll
2004-12-15 18:47:30 UTC
In article
<***@drexchmb04.bsna.bsroot.bear.com>,
"Imbriale, Donald (Exchange)" <***@BEAR.COM> wrote

> you tell the environment what to do with those parameters upon return
> to REXX by setting the length field (less than 0 means 'do not update
> variable'; 0 means 'set it to a null string'; greater than 0 means
> 'update the variable for that parameter with the value the program
> returned in the parameter list, using the length in the length
> field').

Is this something new? Address linkpgm/linkmvs never used to do this.

--
Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Imbriale, Donald , Exchange
2004-12-15 19:24:40 UTC
It seems to be the case all the way back to OS/390 2.5


Don Imbriale


>-----Original Message-----
>From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
Behalf Of
>Jeremy C B Nicoll
>Sent: Wednesday, December 15, 2004 12:34 PM
>To: TSO-***@VM.MARIST.EDU
>Subject: Re: REXX to Assembler
>
>In article
><***@drexchmb04.bsna.bsroot.bear.c
>om>,
> "Imbriale, Donald (Exchange)" <***@BEAR.COM> wrote
>
>> you tell the environment what to do with those parameters upon return
>> to REXX by setting the length field (less than 0 means 'do not update
>> variable'; 0 means 'set it to a null string'; greater than 0 means
>> 'update the variable for that parameter with the value the program
>> returned in the parameter list, using the length in the length
>> field').
>
>Is this something new? Address linkpgm/linkmvs never used to do this.
>
>--


***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Ryerse, Robin
2004-12-17 20:06:22 UTC
I realize I am late to the thread (in fact I am not sure about further posts
to the thread). I suspect that G207DCAN is not a "stand alone" program but
rather a subroutine. As such it expects to be given a list of 3 addresses
(parmlist) that point to storage locations it will use/manipulate. Address
"LINKMVS" does not build the 'parmlist' that the (subroutine) G207DCAN
requires.

To interface with a subroutine, you must build a 'shell' program that builds
the 'parmlist' and then calls the subroutine.

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU]On Behalf
Of Jeff Byrum
Sent: Monday, December 13, 2004 2:51 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler


Matthew:

I'm not an expert on this, but I'm pretty sure the answer is that Rexx
keeps its variables in its own internal location and they are not
accessible through the normal kind of addressing your Assembler program
is doing.

I believe that you will need to have your ASM program call ISPF services
(EP=ISPLINK) to do a VDEFINE of the variable that you want your REXX
exec to use to find the results. Sorry, I'm not sure where this is all
documented...

Jeff



-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Matthew Stitt
Sent: Monday, December 13, 2004 2:21 PM
To: TSO-***@VM.MARIST.EDU
Subject: REXX to Assembler

I've got an assembler routine which I've been trying to make work when
called from REXX. Needless to say it's been eye-opening.

At this point my simple REXX is not seeing the parameters being returned
from the assembler routine. When I place a "say" after the LINKMVS
call, it shows the values of the parameters as being unchanged. Yet the
second parameter should be changed as a result of the assembler routine.

Anyone got any clues about how I can get REXX to see my returned values?

Here is the code:
/* REXX */
func = 01
inp1 = '00000000000000000000'
outp1 = '00000000000000000000'
address LINKMVS "G207DCAN func inp1 outp1"
say func " " inp1 " " outp1

And when I run it in batch:
READY
%DATEG207
01 00000000000000000000 00000000000000000000
READY

The second parameter should contain today's date in gregorian.

You can't get any simpler than this......but I know you people <g>
************************************************************************
**************************
************************************************************************
****************************
This e-mail and any files transmitted with it are confidential to abc
distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging
to abc, which
are intended solely for the individual named. If you are not the named
addressee, you
are notified that any copying, dissemination, distribution or disclosure
of any or all of its
contents, and any action taken in reliance on the transmission, are
unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have
received this
transmission in error and take all necessary and appropriate actions to
permanently
delete it from your system.
************************************************************************
*****************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jeremy C B Nicoll
2004-12-18 01:08:25 UTC
In article
<***@camkm232.amer.corp.eds.com>,
"Ryerse, Robin" <***@EDS.COM> wrote:
> I suspect that G207DCAN is not a "stand alone" program but rather a
> subroutine. As such it expects to be given a list of 3 addresses
> (parmlist) that point to storage locations it will use/manipulate.
> Address "LINKMVS" does not build the 'parmlist' that the (subroutine)
> G207DCAN requires.

Address LINKMVS specifically *does* build a parmlist containing a list
of n addresses. So, are you saying that you think that the subroutine
uses a parmlist, but not of the type that LINKMVS builds, or are you
just guessing what LINKMVS does?

--
Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Matthew Stitt
2004-12-21 19:16:55 UTC
I'm the writer of the subroutine. It uses standard MVS linkage convention and works with practically every other programming language that follows those rules.

The REXX LINKMVS command does not follow those rules as I learned them 25+ years ago and wrote the subroutine against. The REXX LINKPGM does follow those rules, so the subroutine works without modification when called from REXX.

BTW....If anyone wants to understand the subroutine, go get file 527 from the CBT tape. <g>

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU]On Behalf
Of Jeremy C B Nicoll
Sent: Friday, December 17, 2004 8:03 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: REXX to Assembler


In article
<***@camkm232.amer.corp.eds.com>,
"Ryerse, Robin" <***@EDS.COM> wrote:
> I suspect that G207DCAN is not a "stand alone" program but rather a
> subroutine. As such it expects to be given a list of 3 addresses
> (parmlist) that point to storage locations it will use/manipulate.
> Address "LINKMVS" does not build the 'parmlist' that the (subroutine)
> G207DCAN requires.

Address LINKMVS specifically *does* build a parmlist containing a list
of n addresses. So, are you saying that you think that the subroutine
uses a parmlist, but not of the type that LINKMVS builds, or are you
just guessing what LINKMVS does?

--
Jeremy C B Nicoll - my opinions are my own.
**************************************************************************************************
****************************************************************************************************
This e-mail and any files transmitted with it are confidential to abc distributing, llc.
("abc"), and may contain proprietary or copyrighted materials belonging to abc, which
are intended solely for the individual named. If you are not the named addressee, you
are notified that any copying, dissemination, distribution or disclosure of any or all of its
contents, and any action taken in reliance on the transmission, are unauthorized and
prohibited. Please notify abc immediately by e-mail reply if you have received this
transmission in error and take all necessary and appropriate actions to permanently
delete it from your system.
*****************************************************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX