BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi

I have written a program converting flat files into data. These files are submitted weekly. My problem is that I have files from back to 2006 and to avoid manually runnning the program for each week I would like to do find an easier way.

As the first thing in my program I have a macro giving a week number and a year number:
%let week = XX;
%let year = XX;

Is it possible for the week to go from 01 til 52? (running the program 52 times with only week changed). I have tried putting it all in a do-loop but it doesn't seems to work with an entire program.

All help is appreciated.

Thanks.
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Share what code you have for feedback. Yes, the WEEK of a year can go to 53, and there are considerations for what is termed "ISO year/date/week" to consider, influenced by the day-of-week when a year starts. The SAS support http://support.sas.com/ website has reference information on the topic - here is a Google advanced search argument against site SAS.COM only:

iso week site:sas.com



Scott Barry
SBBWorks, Inc.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

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
  • 1 reply
  • 725 views
  • 0 likes
  • 2 in conversation