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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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