0
votes

I'm exporting a SAS data set from Enterprise Guide as CSV to my local pc. I like to have the "Automatically open data or results when generated" setting active in the preferences but not for this export. The file is to big to be opened so SAS struggles with it when it tries to open it after the export.

I was wondering if I can run a code that deactivates the setting. Then do the export and then run a code to activate it again.

So I want to know if it's possible to programmatically set preferences.

1

1 Answers

1
votes

There is not a way to programmatically change this feature of Enterprise Guide on-the-fly. Being an IDE, Enterprise Guide is, more or less, completely independent of the SAS system.

Enterprise Guide settings in Windows are stored in C:\Users\<userid>\AppData\Roaming\SAS\EnterpriseGuide\<Version>\EGOptions.xml. They are read and loaded only when EG starts up. Once EG is running, settings are stored in-memory and saved to this XML file when EG closes.

I suppose you could write a script to change the line <autoDisplayGenDataOrResults>true</autoDisplayGenDataOrResults> from true to false. This could technically be done through SAS with a datalines statement, but it could only be done on start-up and would have to call base SAS first before launching EG.

data egsettings;
    infile "C:\Users\&sysuserid.\AppData\Roaming\SAS\EnterpriseGuide\7.1\EGOptions.xml" lrecl=32767 length=len;
    input line $varying32767. len;

    line_modified = line;

    if(find(upcase(line), upcase('<autoDisplayGenDataOrResults>true</autoDisplayGenDataOrResults>') ) ) 
        then line_modified = tranwrd(line, 'true', 'false');
run;

data _null_;
    set egsettings_modified(keep=line_modified);
    file "C:\Users\&sysuserid.\AppData\Roaming\SAS\EnterpriseGuide\7.1\EGOptions.xml";
    put line_modified;
run;

In other words, this would just save you a few clicks and that's about it.