BookmarkSubscribeRSS Feed
Rafe1
Calcite | Level 5

I am not a SAS user. I am a MF automation guy, currently using OPSMVS. I need to write a rexx exec that can get the expiration date for the current license key for the SAS base product so that I can verify that it is valid.

The 2 choices I have right now are to run a batch job (which I will not get the security authorization to do) or use the TSO SAS interface to submit:

PROC SETINIT:

RUN;

I have not been able to figure out how to do this in rexx yet. Does anyone have an example for rexx code that will work?

Thanks in advance for our help.

Rafe Aalderink

11 REPLIES 11
data_null__
Jade | Level 19

Welcome Rafe,   I don't remember much about REXX but it seems like you could stack the SAS statements you want to run, then call SAS to read the commands in the stack and pass the info back perhaps through andenvironment variable.

 


@Rafe1 wrote:

I am not a SAS user. I am a MF automation guy, currently using OPSMVS. I need to write a rexx exec that can get the expiration date for the current license key for the SAS base product so that I can verify that it is valid.

The 2 choices I have right now are to run a batch job (which I will not get the security authorization to do) or use the TSO SAS interface to submit:

PROC SETINIT:

RUN;

I have not been able to figure out how to do this in rexx yet. Does anyone have an example for rexx code that will work?

Thanks in advance for our help.

Rafe Aalderink


 

Rafe1
Calcite | Level 5

Thanks for your reply. 

I have some very general ideas about how it might be done conceptually. It's the actual codding that's the stumbling block. I've spent too much time already trying different combinations of address statements and TSO commands and parms and I'm hoping someone somewhere has already done this and is willing to share how they pulled it off.

 

Tom
Super User Tom
Super User

Write it to a file and read it back in?

filename setinit 'somefile.your.rexx.can.read';
proc printto log=setinit; run;
proc setinit; run;
proc printto log=log; run;
Rafe1
Calcite | Level 5

Hi Tom. I'm guessing that's the SAS code. I need the rexx code that will issue those commands and get the output back either in memory that I can work with or in a dataset. 

Rafe1
Calcite | Level 5

I've tried a lot of things but I don't have anything that works at all. Nothing worth sharing. That's why I'm hoping someone has done this and can just say "Here's what you need to do."

I can have a rexx with 

ADDRESS TSO "%SAS", 

but that just starts a SAS session within my own TSO session. Then I need to exit it manually so that the rexx exec can finish. 

I'm going to read the doc in the link and see if that helps me.

Thanks for posting it. I don't know why it didn't come up in my searches. 

Tom
Super User Tom
Super User
Can you place the name of the program to execute in the TSO command?
SAS MYFILE.SAS
Then SAS should write the LOG to a file named MYFILE.LOG.
In CMS we could do that.
Rafe1
Calcite | Level 5

That may be possible. I don't know anything about SAS, but I may be able to find someone who can put that together, and then I can have the rexx run it. It would have been much easier if the license key info were in a flat file that I could just read. 

Tom
Super User Tom
Super User

Put this code into one text file.

proc setinit; run;

Follow the instructions for how to call SAS passing in the name of the program to run and the name of the file to store the SAS log.

Then write some REXX code to parse the LOG and pull out the information you need.  Look for the line that looks like this:

Expiration:   31OCT2019.
Rafe1
Calcite | Level 5

Tom,

When you say "Follow the instructions." are you referring to "Invoking a REXX Exec" on the SAS Interface to REXX page? Unless I'm mis-understanding it, that's for running rexx under SAS, which is not what I need to do. I need to have OPSMVS run the rexx exec. I believe that means that I need to allocate the SAS environment in the exec somehow so that I can issue the SAS commands, or call the one-line program. 

Or were you referring to some other instructions somewhere?

I've seen the output from the PROC SETINIT command. I'll have no problem parsing it for what I need. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 1520 views
  • 0 likes
  • 3 in conversation