10-17-2014 06:09 PM
Hello friends, please help me to get this done...i have searched lot on this but not sure how to resolve it.
I have two macro variable resolving properly as belo;
&dir resolves to w:\data\finance\
&f_name resilves to daily_finance_data_file_20141017_654654_787896_354654.txt
and then i am using both path in filename statement as below.
filename chkin "&dir.&f_name."
and then i am getting warning message as mentioned and then error....interesting thing is this program runs sometimes fine and sometimes it gives this warning message and error and program don't run...
do we have any workaround for this?
10-17-2014 06:15 PM
and adding to this;
is not solution i think it's just took warning msg off from log and still job can failed...
10-17-2014 06:54 PM
I tried it on SAS 9.4 and not getting any error message
%let f_name =daily_finance_data_file_20141017_654654_787896_354654.txt;
filename chkin "&dir.&f_name.";
did you checked similar threads it seems that the NOQUOTELENMAX option worked for them.
10-17-2014 07:20 PM
issue is this code works fine sometime and it gives warning message and causing SAS to stops to processing sometimes...again i think below option is only take off warning message from log and it's not treating situation...
10-17-2014 08:27 PM
That's non-standard behaviour.
Does the values of the macro variables changes the different times it runs/doesn't?
Can you post the code from the log with a version that doesn't run?
options mprint symbolgen;
10-18-2014 08:45 AM
You are most likely sometimes having a quote in the macro variables. Users not aware of the meaning of special chars are putting anything in that.
Filenames foldernames are allowing a lot of specials and there you get into trouble as they can possible have a meaning in an other It environment.
- this explains why a job sometimes fails
- this explains the message. It is a warning something unexpected has happened. The name quoting causing a very looooooong string.
That length a far beyond naming limits of folders, just try typing that kind of names.
Ever heard of code-injection? (hint: Check the site of owasp.org )
Ever heard of needing input validation the prevent unexpected breaches?