LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 20 Mar 2005 09:56:02 -0600
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Pudding Man <>
Subject:      Re: REXX and SAS interface....
Comments: To: Kanthan <>
In-Reply-To:  <>
Content-Type: text/plain; charset=ISO-8859-1

In case your Rexx routine proves to be a problem, you can do a Rexx-less verification using FILEEXIST, if I've properly digested the problem.

Here is a z/os batch SAS 8.2 log that demo's:

2 %macro bs(fn=); 3 %if %sysfunc(fileexist(&fn)) %then 4 %put The external file &fn does exist.; 5 %else 6 %put The external file &fn does not exist.; 7 %mend bs; 8 9 %bs(fn=xxxxx.DUM) The external file xxxxx.DUM does exist. 10 %bs(fn=yyyyy.DUM) The external file yyyyy.DUM does not exist. 11

Skoal, Puddin'

***************************************************************** *** Puddin' Man PuddingDotMan at GmailDotCom ** *****************************************************************;

"A truly good birddawg, even if you never hunt her, is a Precious, Precious Thing! Mayhap ruin ya for homo sapiens ..."

On Wed, 16 Mar 2005 11:51:47 -0800, Kanthan <> wrote: > Hi SAS-L, > > I need help in interfacing to REXX from SAS. The SAS online document v8 > says that I can use REXXMAC and REXXLOC= (SASREXX DD name) to interface > with REXX. > > I have tried the REXXMAC and REXXLOC= options and successfully called > my REXX script from my SAS program. But I am not able to call back, > i.e, I am not able to submit SAS statements from my REXX script. > > I have tried the following program. Could you please go through it and > give me ur suggestions/answers. I have submitted a batch job in > mainframe... > > //S10P EXEC SAS8 > //SASLOG DD SYSOUT=* > //SASLIST DD SYSOUT=* > //SASPARM DD DUMMY > //SASREXX DD DSN=SASTST.REXX.PROGRAMS,DISP=SHR > //SYSOUT DD SYSOUT=* > //SYSIN DD * > OPTIONS REXXMAC; > REXX1 SASTST.REXX.SAMPLE; > > The REXX script is: SASTST.REXX.PROGRAMS(REXX1): > /* REXX */ > PARSE UPPER ARG FNAME . > RETCODE = LISTDSI("'"FNAME"'") > IF RETCODE = 0 THEN DO > ADDRESS SAS "++SASLOG" FNAME "ALREADY EXISTS" > END > ELSE DO > ADDRESS SAS "++SASLOG" FNAME "DOESNOT EXISTS" > END > EXIT > -------------------------------------------------------- > > To be more clear, what I am trying to do is: > I submit a batch SAS program in which I call a REXX routine REXX1. From > inside the REXX routine, I am trying to invoke the SAS command > processor, which I can't do. I would like to expand the program to use > GETEXEC and PUTEXEC, etc... > > I picked this code from sas online doc v8, but not able to successfully > run it. When I submitted the above job, I got the following in SASLOG: > > NOTE: The initialization phase used 0.08 CPU seconds and 5325K. > 1 OPTIONS REXXMAC; > 2 REXX1 SASTST.REXX.SAMPLE; > > 2 ! > > NOTE: The SAS session used 0.10 CPU seconds and 5453K. > > I dont get any indication whether the REXX routine was called or not... > I didn't get any message writen in SASLOG...but I got the return code > of zero for the job... I am confused...!!! > > Can somebody please help me out in this ?? I want the message whether > the dataset is present or not to be writen in SASLOG. > > Thanks, > Kanthan. >

Back to: Top of message | Previous page | Main SAS-L page