Hello Folks, A fellow colleague and friend asked me for a solution for the following problem.
She says-"somehow I couldn't use %include in sas eg. it works when I connect to local, but doesn't work when I connect to SASApp server. The program file is on the sharedrive. so is it in local? if I connect to local, it works. I store a macro as a .sas. could like to call it whenever I need it"
LOG note:
WARNING: Apparent invocation of macro CIS_TELLER_TRANSACTION not resolved.
26 %CIS_Teller_Transaction;
_
180
I'm assuming the %INCLUDE file is a program defining the macro CIS_Teller_Transaction - is this correct?
If the %INCLUDE fails when running on your remote SAS server, that simply means the shared folder location of the SAS program is not defined, or is defined differently on that server. Talk to your SAS administrator to resolve this as it has to be fixed at the OS level and is not really a SAS problem.
Posting the %INCLUDE statement and error would help.
I'm assuming the %INCLUDE file is a program defining the macro CIS_Teller_Transaction - is this correct?
If the %INCLUDE fails when running on your remote SAS server, that simply means the shared folder location of the SAS program is not defined, or is defined differently on that server. Talk to your SAS administrator to resolve this as it has to be fixed at the OS level and is not really a SAS problem.
Posting the %INCLUDE statement and error would help.
Try opening the program and Save As to a location on the server. Then include with the path to the file on the server.
Otherwise, you will need to save it to a network drive that the remote machine has access to - for example, we run SAS on a linux machine and have a network drive specifically for exporting datasets to be retrieved locally.
Thank you @SASKiwi and @unison for your responses. She says
From her:
"Thanks
The two replies in the community are what I thought too, the sharedrive I used may not the one of the SASApp server. Server could need a special connection.
Thanks for your help.
Thanks."
Subject: %Include failing in SAS EG app server
From me to her:
"Hey, Just to confirm my understanding and the discussion we had , I posted the question to see what responses we could get"
Network environment and UNC paths may be the solution if currently using drive letters in a Windows environment. Once spent hours trying to resolve "missing data" between two users to eventually find that drive Q: which looked the same for the first 40+ characters wasn't actually the same UNC path, one of those 0 O issues hard to see in long names with lots of digits in various directories.
Thank you Sir @ballardw I will ask my colleague to read your post too. She might not know unless I let her know. Cheers!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.