Hey Everyone, I'm having trouble displaying only specific graphs when a back-end SAS program is ran using SASPy. For the sake of simplicity, I have the following code: import saspy
import os
from IPython.display import HTML
### os.environ["PATH"] += INSERT PATH NAME IF NEEDED ###
sas = saspy.SASsession(cfgname="winlocal")
sas.symput("SASPGRM", "[INSERT PATH NAME OF SAS FILE]", quoting=None)
sas_submit_return_value = sas.submit(
"""
%INCLUDE "&SASPGRM";
""")
### Sucessful when using Jupyter Notebook ###
HTML(sas_submit_return_value['LST']) where code for the SASPRM is: TITLE "PLOT 1";
PROC SHEWHART DATA=SASHELP.CARS;
SYMBOL V=DOT;
IRCHART ENGINESIZE*MAKE / OUTTABLE=CHRTVIOL1(WHERE=(_TESTS_ NE ''));
RUN;
QUIT;
TITLE "PLOT 2";
PROC SHEWHART DATA=SASHELP.CARS;
SYMBOL V=DOT;
IRCHART ENGINESIZE*MAKE / OUTTABLE=CHRTVIOL2(WHERE=(_TESTS_ NE ''));
RUN;
QUIT; TITLE"PLOT 3"; PROC SHEWHART DATA=SASHELP.CARS; SYMBOL V=DOT; IRCHART ENGINESIZE*MAKE / OUTTABLE=CHRTVIOL3(WHERE=(_TESTS_ NE ''));RUN;
QUIT; Typically, when I want to only display specific graphs, I can use PROC GREPLAY and specify the graphs that are saved in a temp catalog in WORK.GSEG or really any permanent catalog defined in a GOUT statement. I've noticed that when running these procedures in my SAS Environment, the GSEG catalog is created in the same location as my WORK directory. However, when running the code in the submit block using SASPy, the catalog doesn't appear but the SAS datasets do appear. Note: The log states that the "Body file: _TOMODS1" was created in the work directory location. Even though this file is created, it is either deleted or invisible in the windows file explorer. The question is, are there similar functions like GREPLAY in SASPy? I've tried using the GOUT option but the defined catalog isn't created like it does in my SAS Environment. I only want to create pdf files if the user wants them by selecting a custom button in my Python application. Do any of you have any insights or comments? Note: We're restricted from changing any back-end SAS programs so any solutions that requires changing the SAS Program itself would probably be a non-starter within my organization. Thanks!
... View more