BookmarkSubscribeRSS Feed
nathan10
Calcite | Level 5

Most University employees are paid twice per month, on the 15th of the month (or the last working day before that day) and the last day of the month (or the last working day before that day).  Write a SAS program to generate a printout which, for the entire year 2019, shows in words the day of the week, month, and date, of each such payday.  For example, “Tuesday January 15, 2019” (without quotes) would be the first row of this table.  Don’t worry about holidays, but if the 15th or last day of the month falls on a weekend, the payday is on the Friday beforehand – the program must figure out that date and print it.  Use a DO loop in a DATA step, with strategic OUTPUT statements.  DO NOT use the intnx function, or input the dates yourself, or create them with 12 or 24 IF-THEN statements – use program statements to figure out the dates.  Your program should be flexible enough so that if you change the number 2019 in one place to a different year, it will work for that year too.  Give me your program, your SAS log showing a successful run, and your generated table of paydays.  Hint: the last day of any month is the day before the first day of the next month.

 

 How do I do this problem?

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Don't ask us to do your homework.

Try and ask question (providing code) if something unexpected comes.

nathan10
Calcite | Level 5

I tried but I don't know where to start.

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