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

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 989 views
  • 0 likes
  • 2 in conversation