Reputation: 229
Relatively new to SAS Enterprise Guide. I'm looking for a way to prompt the user to upload a file during the process flow execution. The file will be used in the next steps of the process flow.
Is this possible? What alternatives are available?
Upvotes: 1
Views: 268
Reputation: 8513
SAS doesn't appear to support 'native' calls to file open dialog boxes, but it does allow you to make calls to the Windows API which provides the common file picker dialog box you see everywhere.
You will need to make use of the sascbtbl
filename and calls to modulec
in order to do so. I'm putting this answer here as a stub for the moment and will try and expand on it next week.
In the meantime, here's an example of how to use the above to get the current process ID (PID) in windows:
filename sascbtbl "%sysfunc(pathname(work))\sascbtbl.txt" lrecl=500;
data _null_;
file sascbtbl;
infile datalines;
input;
put _infile_;
datalines4;
routine GetCurrentProcessId
minarg=0
maxarg=0
stackpop=called
callseq=byvalue
module=kernel32;
;;;;
run;
%let current_sas_process_id = %sysfunc(modulen(*e,GetCurrentProcessId));
%put ¤t_sas_process_id;
The above is the basic approach you will need to take but instead of call the GetCurrentProcessId
class you will probably need to call the FileOpenDialog
class or something like that (which is more complicated as it takes parameters).
Upvotes: 0