Hi Forum,
The title is the best description I could think of so I'll describe the issue.
Before my time, someone had created a clever method of exporting the results of an EG project to a files server location.
In the code there is a line such as;
&tmp\reports\oct17\report_results;
The &tmp part is setup somewhere to represent the first part of the UNC path & the rest is the path to the Files folder on the Server.
After the files are stored there, the code then retrieves it to attach to an email.
I haven't seen this setup before & no-one who created it is left to explain it.
Can someone help me understand how this works or point me towards some articles books?
Thanks
....have you seen an example of a variable being used to replace part of a directory path?
Yes, that's quite common, i.e. for implementation of code in a DEV environment which then gets moved to PROD. I'd normally use a macro variable for all root paths so that no code changes between environments are required (i.e. for a change from LEV3 to LEV1).
I also want to understand where this info is located.
That totally depends on your actual code. But yes, the macro variable must get created somewhere. &TMP feels like done in your code using either a %LET statement or CALL SYMPUT(). EG also has an option to define code in an EG project to be run when you create a new session - check your SAS log right after connecting to an application server.
I want to follow how to export the EG Project results to the Server File Folder
EG is your client. The code gets executed on the server so the results get directly written from the SAS server to the folder location (and that's also the reason why you can't write results to your local C-drive as this drive is not accessible from the Server side).
Not sure which part you don't understand but in a nutshell:
SAS EG is your client connecting to a SAS server. Execution happens on the server side so you need to thing from the server side.
It appears you SAS process (server side) first creates some files and stores them somewhere on disk, then the process has another step where it sends "stuff" to an email server for execution (SAS takes here the role of the email client).
Many sites have all the connection configuration for the email server already done. You can get what has been defined via:
proc options group=email;
run;
If everything is defined and working (ports open) then it's simply about writing correct SAS syntax so SAS sends the necessary information to the mail server. This syntax is fully documented. I've done a quick Google search...
site:support.sas.com 9.4 email
...and got links like:
http://support.sas.com/kb/19/767.html
Thanks Patrick,
That's very useful, have you seen an example of a variable being used to replace part of a directory path?
I also want to understand where this info is located.
Normally there would be a %let Statement to pass the string value of the variable but this '&tmp' value must be stored somewhere else.
I want to follow how to export the EG Project results to the Server File Folder for later retrieval & emailing.
Thanks again.
....have you seen an example of a variable being used to replace part of a directory path?
Yes, that's quite common, i.e. for implementation of code in a DEV environment which then gets moved to PROD. I'd normally use a macro variable for all root paths so that no code changes between environments are required (i.e. for a change from LEV3 to LEV1).
I also want to understand where this info is located.
That totally depends on your actual code. But yes, the macro variable must get created somewhere. &TMP feels like done in your code using either a %LET statement or CALL SYMPUT(). EG also has an option to define code in an EG project to be run when you create a new session - check your SAS log right after connecting to an application server.
I want to follow how to export the EG Project results to the Server File Folder
EG is your client. The code gets executed on the server so the results get directly written from the SAS server to the folder location (and that's also the reason why you can't write results to your local C-drive as this drive is not accessible from the Server side).
Thanks Patrick,
I understand this better now, thank you.
I need to see where the &tmp variable path is eet as it isn't done anywhere I can see.
There's no %Let or Symput statement or anything stored under Tools >> Options >> SAS Programs
Thanks for your help.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.