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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 657 views
  • 0 likes
  • 2 in conversation