- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to call a SAS program "under the covers" from an ISPF/REXX application? I know there is an interactive SAS, but I don't want my users to necessarily know they are using SAS. I just want them to enter some parameters on an ISPF screen and then get the results. Today the ISPF application builds SAS JCL and then puts them into an ISPF Edit session for them to review the jobcard and then submit. I would like to give them a "Foreground/Background" option so they can choose. I would write the results to a dataset and then put them into a browse session showing them the results.
The 2nd part of the problem is that the ISPF application allows user to choose to see the report in one of several ODS formats (CSV/EXCEL/PDF/HTML) so it would be really nice if I could open a window with the spreadsheet, but today I send that over an email and I can continue to do that.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here's what I was finally able to make work. It worked well and faster than I thought.
My next step will be to enable the SAS code to issue ISPF commands and build an ISPF table to display the results. Currently the output is sent to SYSOUT and/or sent via email, so the ISPF output option will be another option.
ADDRESS TSO "ALTLIB ACT APPL(EXEC) DA(SAS.SASRX.LIB)"
call sasrx "-input 'my.sas.source(fritz)' log(2) print(2)"
ADDRESS TSO "ALTLIB DEACTIVATE APPL(EXEC)"
RETURN
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sounds very sophisticated. 👍
You should be able to build JCL that can be submitted to the internal reader without human review. The JCL would run the SAS program(s) and send out an email with the output as an attachment. I would think that would be workable.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Jim,
I was looking for more of a "Foreground/Background" option. I don't want to submit the JCL without giving someone a chance to review the jobcard options.
I did find two methods for invoking SAS - once is via the SAS clist and another via SASRX. And there is an input option that should allow SAS to startup and run a SAS program. I'll continue trying to get them to work - as soon as I find a little free time!
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm pretty sure this should be possible. Back in the dim, distant past when I used SAS on mainframes you could invoke SAS interactively by just typing something like TSO SAS on a TSO command line to invoke a SAS interactive session. Perhaps invoking SAS via SASRX and supplying a SAS program name on the command will get you what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That's exactly what I'm working on - trying to find the right combination of options and TSO allocations to get it to work. I'm trying both SAS and SASRX and I'm close, but, can't work on this now because of other priorities. I'll get back to it soon and post what I found.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
See the documentation for using SAS on z/OS. You want "non interactive mode"
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, thanks. I have all that doc and I've been experimenting with SAS INPUT and SASRX -INPUT, allocate, etc. It might be an installation problem as most of the times I get an error about an unbalanced comment and it hasn't even begun to execute my code. I'll try to get back to this when I can!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here's what I was finally able to make work. It worked well and faster than I thought.
My next step will be to enable the SAS code to issue ISPF commands and build an ISPF table to display the results. Currently the output is sent to SYSOUT and/or sent via email, so the ISPF output option will be another option.
ADDRESS TSO "ALTLIB ACT APPL(EXEC) DA(SAS.SASRX.LIB)"
call sasrx "-input 'my.sas.source(fritz)' log(2) print(2)"
ADDRESS TSO "ALTLIB DEACTIVATE APPL(EXEC)"
RETURN