BookmarkSubscribeRSS Feed
R_Win
Calcite | Level 5

Hi every day in this path i will be getting the data "/sas/ saslev1/data/10/may10/may06" this is the path for one day tomoroow the data will be in new folfer as may07 like this for every month the month folder will chage and every day the data folder will be changed

ex: "/sas/ saslev1/data/10/may10/may06"  for may month and may06 date

      "/sas/ saslev1/data/10/may10/may07"  for may month and may07 date

.

. like this the data is placed in the respective floders daily how can i automat and run for each day i having data for 3 years and the data is in excel which is havinf data_may06 ending has the date and data is common how can i do this....

2 REPLIES 2
art297
Opal | Level 21

You can accomplish it like I did, below, or wrap everything into a single %let statement with a bunch of %sysfunc calls:

%let date_wanted=6may2010;

data _null_;

  year=year("&date_wanted."d);

  month=month("&date_wanted."d);

  day=day("&date_wanted."d);

  wmonth=put("&date_wanted"d,worddate3.);

  date_need=catt("sas/saslev1/data/",

  substr(strip(year),3,2),

  "/",

  wmonth,

  substr(strip(year),3,2),

  "/",

  wmonth,

  put(day,z2.) );

  call symput("path",put(date_need,$32.));

run;

%put &path.;

Ksharp
Super User

If you can use filename 's pipe function ,then you can search all the xls under some one directory .

Check the OS command about it , dir for win and ls for Unix, they are all has this ability.

Ksharp

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 559 views
  • 0 likes
  • 3 in conversation