Discussion:
SAS calling REXX
(too old to reply)
Ken MacKenzie
2016-01-20 16:22:29 UTC
Permalink
Raw Message
Does anyone have any experience of calling REXX from SAS?

I managed to prove the mechanism by calling a simple "HELLO" program but I
can't figure out how to pass parameters and return values. In the
following examples I would expect to see:
Parameter passed is BX29PS.X117424.COBOL, ABC
Parameter passed is BX29PS.X117424.EXEC, XYZ
(two messages)

Instead I see:
Parameter passed is FILENAME, SYSNAME
(one message)

I have the following REXX:
/* REXX */
Arg myparm
Say 'Parameter passed is' myparm
Return 0


And the following (JCL and SAS):
//SAS EXEC SAS
//SYSTSPRT DD SYSOUT=*
//SASREXX DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC
//FILES DD *
BX29PS.X117424.COBOL ABC
BX29PS.X117424.EXEC XYZ
//SYSIN DD *
OPTIONS REXXMAC;
DATA FILES;
INFILE FILES;
INPUT @1 FILENAME $44.
@45 SYSNAME $3.
;
DATA _NULL_;
SET FILES;
DO;
PUTLOG FILENAME;
SASHELLO FILENAME, SYSNAME;
END;
PROC PRINT DATA = FILES;



Ken MacKenzie
Pramerica Systems Ireland Limited
is a private company limited by shares
incorporated and registered in the Republic of Ireland with registered
number 319900
and registered office at 6th Floor, South Bank House, Barrow Street,
Dublin 4, Ireland.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Steve Coalbran
2016-01-20 16:43:49 UTC
Permalink
Raw Message
Hi Ken


Never touched SAS although
I would like to learn.
In case this is too tricky between SAS and TSO/MVS, Is it possible to pass this
in as a SYSPARM records?
This might be easier?
ALLOC the communication file SYSPARM in the JCL as VB 32760,
Inside the REXX just add...
ADDRESS MVS "EXECIO * DISKR SYSPARM (STEM PARM. FINIS "


/Steve
Date: Wed, 20 Jan 2016 16:22:21 +0000
Subject: [TSO-REXX] SAS calling REXX
Does anyone have any experience of calling REXX from SAS?
I managed to prove the mechanism by calling a simple "HELLO" program but I
can't figure out how to pass parameters and return values. In the
Parameter passed is BX29PS.X117424.COBOL, ABC
Parameter passed is BX29PS.X117424.EXEC, XYZ
(two messages)
Parameter passed is FILENAME, SYSNAME
(one message)
/* REXX */
Arg myparm
Say 'Parameter passed is' myparm
Return 0
//SAS EXEC SAS
//SYSTSPRT DD SYSOUT=*
//SASREXX DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC
//FILES DD *
BX29PS.X117424.COBOL ABC
BX29PS.X117424.EXEC XYZ
//SYSIN DD *
OPTIONS REXXMAC;
DATA FILES;
INFILE FILES;
@45 SYSNAME $3.
;
DATA _NULL_;
SET FILES;
DO;
PUTLOG FILENAME;
SASHELLO FILENAME, SYSNAME;
END;
PROC PRINT DATA = FILES;
Ken MacKenzie
Pramerica Systems Ireland Limited
is a private company limited by shares
incorporated and registered in the Republic of Ireland with registered
number 319900
and registered office at 6th Floor, South Bank House, Barrow Street,
Dublin 4, Ireland.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Cardenas, Gilbert
2016-01-20 16:58:24 UTC
Permalink
Raw Message
Have you seen this link:
https://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#mvs-ifaces-rexx.htm
Invoking a REXX Exec



-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Ken MacKenzie
Sent: Wednesday, January 20, 2016 10:22 AM
To: TSO-***@VM.MARIST.EDU
Subject: [TSO-REXX] SAS calling REXX

Does anyone have any experience of calling REXX from SAS?

I managed to prove the mechanism by calling a simple "HELLO" program but I can't figure out how to pass parameters and return values. In the following examples I would expect to see:
Parameter passed is BX29PS.X117424.COBOL, ABC Parameter passed is BX29PS.X117424.EXEC, XYZ (two messages)

Instead I see:
Parameter passed is FILENAME, SYSNAME
(one message)

I have the following REXX:
/* REXX */
Arg myparm
Say 'Parameter passed is' myparm
Return 0


And the following (JCL and SAS):
//SAS EXEC SAS
//SYSTSPRT DD SYSOUT=*
//SASREXX DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC
//FILES DD *
BX29PS.X117424.COBOL ABC
BX29PS.X117424.EXEC XYZ
//SYSIN DD *
OPTIONS REXXMAC;
DATA FILES;
INFILE FILES;
INPUT @1 FILENAME $44.
@45 SYSNAME $3.
;
DATA _NULL_;
SET FILES;
DO;
PUTLOG FILENAME;
SASHELLO FILENAME, SYSNAME;
END;
PROC PRINT DATA = FILES;



Ken MacKenzie
Pramerica Systems Ireland Limited
is a private company limited by shares
incorporated and registered in the Republic of Ireland with registered number 319900 and registered office at 6th Floor, South Bank House, Barrow Street, Dublin 4, Ireland.

----------------------------------------------------------------------
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
Miguel Soltero Diaz
2016-01-20 17:18:10 UTC
Permalink
Raw Message
Ken,
You can take a look at chapter 19 of SAS 9.x z/OS Companion
The second part is about SAS interface to REXX
I think GETEXEX & PUTEXEC Data Steps might be what you are looking for

Sent from my iPhone
Post by Cardenas, Gilbert
https://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#mvs-ifaces-rexx.htm
Invoking a REXX Exec
-----Original Message-----
Sent: Wednesday, January 20, 2016 10:22 AM
Subject: [TSO-REXX] SAS calling REXX
Does anyone have any experience of calling REXX from SAS?
Parameter passed is BX29PS.X117424.COBOL, ABC Parameter passed is BX29PS.X117424.EXEC, XYZ (two messages)
Parameter passed is FILENAME, SYSNAME
(one message)
/* REXX */
Arg myparm
Say 'Parameter passed is' myparm
Return 0
//SAS EXEC SAS
//SYSTSPRT DD SYSOUT=*
//SASREXX DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC
//FILES DD *
BX29PS.X117424.COBOL ABC
BX29PS.X117424.EXEC XYZ
//SYSIN DD *
OPTIONS REXXMAC;
DATA FILES;
INFILE FILES;
@45 SYSNAME $3.
;
DATA _NULL_;
SET FILES;
DO;
PUTLOG FILENAME;
SASHELLO FILENAME, SYSNAME;
END;
PROC PRINT DATA = FILES;
Ken MacKenzie
Pramerica Systems Ireland Limited
is a private company limited by shares
incorporated and registered in the Republic of Ireland with registered number 319900 and registered office at 6th Floor, South Bank House, Barrow Street, Dublin 4, Ireland.
----------------------------------------------------------------------
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Lizette Koehler
2016-01-20 17:25:40 UTC
Permalink
Raw Message
What version of SAS are you running?

And do you just want to do SAS calling REXX or do you want to do REXX calling
SAS?

And if you were not aware there is a SAS List that might be helpful
To join, if you have not done so: SAS http://vm.marist.edu/archives/sas-l.html

Lizette
Post by Cardenas, Gilbert
-----Original Message-----
Ken MacKenzie
Sent: Wednesday, January 20, 2016 9:22 AM
Subject: [TSO-REXX] SAS calling REXX
Does anyone have any experience of calling REXX from SAS?
I managed to prove the mechanism by calling a simple "HELLO" program but I
can't figure out how to pass parameters and return values. In the following
Parameter passed is BX29PS.X117424.COBOL, ABC Parameter passed is
BX29PS.X117424.EXEC, XYZ (two messages)
Parameter passed is FILENAME, SYSNAME
(one message)
/* REXX */
Arg myparm
Say 'Parameter passed is' myparm
Return 0
//SAS EXEC SAS
//SYSTSPRT DD SYSOUT=*
//SASREXX DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC
//FILES DD *
BX29PS.X117424.COBOL ABC
BX29PS.X117424.EXEC XYZ
//SYSIN DD *
OPTIONS REXXMAC;
DATA FILES;
INFILE FILES;
@45 SYSNAME $3.
;
DATA _NULL_;
SET FILES;
DO;
PUTLOG FILENAME;
SASHELLO FILENAME, SYSNAME;
END;
PROC PRINT DATA = FILES;
Ken MacKenzie
Pramerica Systems Ireland Limited
is a private company limited by shares
incorporated and registered in the Republic of Ireland with registered number
319900 and registered office at 6th Floor, South Bank House, Barrow Street,
Dublin 4, Ireland.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Ed Long
2016-01-20 18:34:45 UTC
Permalink
Raw Message
2 things.
1: Simplest way to do this is put the parameters in a file and then have the called routine, whether SAS or REXX, read the parms from the file. Ezpz.
2: The link for the SAS listserv appears to be for a fossil. The latest update in their archive is from 2005. Is this still an active service? I also didn't see a way to sign up, but that could just be me.

Edward Long

--------------------------------------------
On Wed, 1/20/16, Lizette Koehler <***@MINDSPRING.COM> wrote:

Subject: Re: [TSO-REXX] SAS calling REXX
To: TSO-***@VM.MARIST.EDU
Date: Wednesday, January 20, 2016, 12:25 PM

What version of SAS are
you running?

And do you
just want to do SAS calling REXX or do you want to do REXX
calling
SAS?

And if you were not aware there is a SAS List
that might be helpful
To join, if you have
not done so:  SAS    http://vm.marist.edu/archives/sas-l.html

Lizette
Post by Cardenas, Gilbert
-----Original Message-----
On Behalf Of
Post by Cardenas, Gilbert
Ken MacKenzie
Sent: Wednesday, January 20, 2016 9:22
AM
Post by Cardenas, Gilbert
Subject: [TSO-REXX] SAS calling REXX
Does anyone have any
experience of calling REXX from SAS?
Post by Cardenas, Gilbert
I managed to prove the mechanism by
calling a simple "HELLO" program but I
Post by Cardenas, Gilbert
can't figure out how to pass
parameters and return values.  In the following
Post by Cardenas, Gilbert
Parameter passed is BX29PS.X117424.COBOL,
ABC Parameter passed is
BX29PS.X117424.EXEC,  XYZ (two messages)
Post by Cardenas, Gilbert
Parameter passed is FILENAME, SYSNAME
(one message)
/* REXX */
   Arg myparm
   Say 'Parameter passed
is' myparm
Post by Cardenas, Gilbert
   Return 0
And the following (JCL and SAS):
//SAS      EXEC SAS
Post by Cardenas, Gilbert
//SYSTSPRT DD
SYSOUT=*
Post by Cardenas, Gilbert
//SASREXX  DD  DISP=SHR,
//         
   DSN=BX29PS.X117424.EXEC
//FILES    DD  *
BX29PS.X117424.COBOL                       
ABC
Post by Cardenas, Gilbert
BX29PS.X117424.EXEC         
               XYZ
//SYSIN    DD *
Post by Cardenas, Gilbert
OPTIONS REXXMAC;
DATA FILES;
   
INFILE FILES;
$44.
Post by Cardenas, Gilbert
;
DATA _NULL_;
SET FILES;
DO;
   PUTLOG FILENAME;
   SASHELLO FILENAME,
SYSNAME;
Post by Cardenas, Gilbert
END;
PROC
PRINT DATA = FILES;
Ken MacKenzie
Post by Cardenas, Gilbert
Pramerica Systems Ireland
Limited
Post by Cardenas, Gilbert
is a private company limited by
shares
Post by Cardenas, Gilbert
incorporated and registered in
the Republic of Ireland with registered number
Post by Cardenas, Gilbert
319900 and registered office at 6th Floor,
South Bank House, Barrow Street,
Post by Cardenas, Gilbert
Dublin
4, Ireland.

----------------------------------------------------------------------
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
Ed Long
2016-01-20 19:41:14 UTC
Permalink
Raw Message
Thanks for the info.
My point was that the link leads to a website that among other options includes one for listserv signup. It leads nowhere.
The archives must be elsewhere since this archive ends long ago.


Edward Long

--------------------------------------------
On Wed, 1/20/16, retired mainframer <retired-***@q.com> wrote:

Subject: RE: SAS calling REXX
To: "'Ed Long'" <***@prodigy.net>
Date: Wednesday, January 20, 2016, 2:26 PM
Post by Cardenas, Gilbert
-----Original
Message-----
On Behalf
Post by Cardenas, Gilbert
Of Ed Long
Sent: Wednesday, January 20, 2016 10:35
AM
Post by Cardenas, Gilbert
Subject: Re: SAS calling REXX
2 things.
1: Simplest way to do this is put the
parameters in a file and then have the called routine,
Post by Cardenas, Gilbert
whether SAS or REXX, read the parms from
the file. Ezpz.
Post by Cardenas, Gilbert
2: The link for the SAS
listserv appears to be for a fossil. The latest update in
their archive is
Post by Cardenas, Gilbert
from 2005. Is this
still an active service? I also didn't see a way to sign
up, but that could
Post by Cardenas, Gilbert
just be me.
The SAS-L list is still
active.  The correct address for joining and other commands
is ***@LISTSERV.UGA.EDU. 
The command is the usual SUBSCRIBE SAS-L.

If I remember correctly,
forwarded command messages from other listserv addresses go
to the wrong place.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Lizette Koehler
2016-01-20 19:51:09 UTC
Permalink
Raw Message
Thanks Ed, I will update my notes.

https://listserv.uga.edu/cgi-bin/wa?A0=SAS-L
It now looks to be in the Univ of Georgia List server.


Lizette
Post by Cardenas, Gilbert
-----Original Message-----
Long
Sent: Wednesday, January 20, 2016 12:41 PM
Subject: Re: [TSO-REXX] SAS calling REXX
Thanks for the info.
My point was that the link leads to a website that among other options
includes one for listserv signup. It leads nowhere.
The archives must be elsewhere since this archive ends long ago.
Edward Long
--------------------------------------------
Subject: RE: SAS calling REXX
Date: Wednesday, January 20, 2016, 2:26 PM
Post by Cardenas, Gilbert
-----Original
Message-----
Post by Cardenas, Gilbert
Of Ed Long > Sent: Wednesday, January 20, 2016 10:35 AM > To: TSO-
1: Simplest way to do this is put the parameters in a file and then have
the called routine, > whether SAS or REXX, read the parms from the file.
Ezpz.
Post by Cardenas, Gilbert
2: The link for the SAS
listserv appears to be for a fossil. The latest update in their archive is
Post by Cardenas, Gilbert
from 2005. Is this still an active service? I also didn't see a way to sign
up, but that could > just be me.
The SAS-L list is still
active. The correct address for joining and other commands is
If I remember correctly,
forwarded command messages from other listserv addresses go to the wrong
place.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
BUCKLEY Pete , AXA-TECH-UK
2016-01-21 08:53:54 UTC
Permalink
Raw Message
Here's a simple working example (from many years ago).

SAS Batch job:
//STEP010 EXEC SAS9
//SASREXX DD DISP=SHR,DSN=SYS7.AXA.CLIB <--Rexx Library
//SYSIN DD *
OPTIONS REXXMAC;
@SYSNAME;
//

Rexx: SYS7.AXA.CLIB(@SYSNAME)
/******************************* REXX *********************************/
/* */
/* Find sysname */
/* */
/**********************************************************************/
trace o
sysname=sysname()
/*-------------- Execute a SAS Procedure --------------*/

address SAS
"data _null_; "
" rxsys = GETEXEC('SYSNAME'); "
" put 'System name is: ' rxsys; "
" call symput('sysname',rxsys); "
" run; "
/*-------------- Return to the SAS System -------------*/
EXIT
return



Pete BUCKLEY
AXA TECH

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Ken MacKenzie
Sent: 20 January 2016 16:22
To: TSO-***@VM.MARIST.EDU
Subject: [TSO-REXX] SAS calling REXX

Does anyone have any experience of calling REXX from SAS?

I managed to prove the mechanism by calling a simple "HELLO" program but I can't figure out how to pass parameters and return values. In the following examples I would expect to see:
Parameter passed is BX29PS.X117424.COBOL, ABC Parameter passed is BX29PS.X117424.EXEC, XYZ (two messages)

Instead I see:
Parameter passed is FILENAME, SYSNAME
(one message)

I have the following REXX:
/* REXX */
Arg myparm
Say 'Parameter passed is' myparm
Return 0


And the following (JCL and SAS):
//SAS EXEC SAS
//SYSTSPRT DD SYSOUT=*
//SASREXX DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC
//FILES DD *
BX29PS.X117424.COBOL ABC
BX29PS.X117424.EXEC XYZ
//SYSIN DD *
OPTIONS REXXMAC;
DATA FILES;
INFILE FILES;
INPUT @1 FILENAME $44.
@45 SYSNAME $3.
;
DATA _NULL_;
SET FILES;
DO;
PUTLOG FILENAME;
SASHELLO FILENAME, SYSNAME;
END;
PROC PRINT DATA = FILES;



Ken MacKenzie
Pramerica Systems Ireland Limited
is a private company limited by shares
incorporated and registered in the Republic of Ireland with registered number 319900 and registered office at 6th Floor, South Bank House, Barrow Street, Dublin 4, Ireland.

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


This email originates from AXA Technology Services UK Limited (reg. no. 1854856) which has its registered office at 5 Old Broad Street, London EC2N 1AD, England.

This message and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this in error, you should not disseminate or copy this email. Please notify the sender immediately and delete this email from your system.

Please also note that any opinions presented in this email are solely those of the author and do not necessarily represent those of The AXA UK Plc Group.

Email transmission cannot be guaranteed to be secure, or error free as information could be intercepted, corrupted, lost, destroyed, late in arriving or incomplete as a result of the transmission process. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission.

Finally, the recipient should check this email and any attachments for viruses. The AXA UK Plc Group accept no liability for any damage caused by any virus transmitted by this email.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Ed Long
2016-01-21 20:00:10 UTC
Permalink
Raw Message
I've been a member of this list for a full day.
2 posts, both from a vendor.
I'm not sure how active this group is either.

*****The link*****

The SAS-L list is still
active.  The correct address for joining and other
commands
is ***@LISTSERV.UGA.EDU. 
The command is the usual SUBSCRIBE SAS-L.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
retired mainframer
2016-01-21 22:53:19 UTC
Permalink
Raw Message
Patience grasshopper. There are high days and low days. On the 19th I received 24 messages. Except for IBM-MAIN, I find it more active than most of the mainframe lists I subscribe to (such as ISPF and RACF).
Post by Cardenas, Gilbert
-----Original Message-----
Of Ed Long
Sent: Thursday, January 21, 2016 12:00 PM
Subject: Re: SAS calling REXX
I've been a member of this list for a full day.
2 posts, both from a vendor.
I'm not sure how active this group is either.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Loading...