BookmarkSubscribeRSS Feed
woo
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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?

5 REPLIES 5
woo
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

and adding to this;

Options noQuoteLenMax;


is not solution i think it's just took warning msg off from log and still job can failed...

mohamed_zaki
Barite | Level 11

I tried it on SAS 9.4 and not getting any error message

%let dir=w:\data\finance\;

%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.

woo
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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...

Options noQuoteLenMax;

Reeza
Super User

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;

jakarman
Barite | Level 11

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? 

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3857 views
  • 0 likes
  • 4 in conversation