Hi,
I am trying to import data using a teams path into my SAS engage. This is the code I am using
filename DATA"C:\DATA\mydata.sas";
proc http
url="https://pathtofolder"
method="GET"
out = DATA;
run;
%include DATA;
When I try to use this code I get these two warnings:
WARNING: Apparent symbolic reference WEB not resolved. WARNING: Apparent symbolic reference E not resolved.
So the data I want to use is stored in teams it's not located on my machine. I cannot download the data onto my machine either due other reasons. So, I tried with the single and double quotes and I got the same warning sign after running the code. The file I am trying to retrieve are SAS files mixed with other files like pdfs, that is why I used % include.
This is the warning I got with the double quotes:
WARNING: Apparent symbolic reference WEB not resolved. WARNING: Apparent symbolic reference E not resolved. NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. ERROR 22-322: Syntax error
It is similar to the warning using single quotes.
At what point in the process did you get that message?
If it was when trying to process the URL you supplied to PROC HTTP then use single quotes instead of double quotes so and & characters in the URL will not trigger the macro processor to try an resolve macro variable references.
Why would use use %INCLUDE with DATA? That is for CODE. Is the file you are retrieving SAS code? Or is it raw data? If it is raw data use a data step and an INFILE statement to read the data into a dataset.
So the data I want to use is stored in teams it's not located on my machine. I cannot download the data onto my machine either due other reasons. So, I tried with the single and double quotes and I got the same warning sign after running the code. The file I am trying to retrieve are SAS files mixed with other files like pdfs, that is why I used % include.
This is the warning I got with the double quotes:
WARNING: Apparent symbolic reference WEB not resolved. WARNING: Apparent symbolic reference E not resolved. NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. ERROR 22-322: Syntax error
It is similar to the warning using single quotes.
The 49-169 points to a problem with unbalanced quotes or similar which has left the SAS system in an unstable state. Start a new session and run only your import code, then copy/paste the whole log into a window opened with this button:
You can overwrite sensitive information with X's.
Are you using the methods shown in this blog post to retrieve the files from Teams. (Remember Teams is using Sharepoint under the hood).
https://blogs.sas.com/content/sasdummy/2024/07/29/sas-programming-office-365-onedrive/
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.