BookmarkSubscribeRSS Feed
__Renee__
Fluorite | Level 6

Hello,

I am a fairly new programmer, and my expertise is mostly in SAS Enterprise Guide. I've just created a couple reports that I am going to automate. I work for a college and am in charge of the enrollment reports. These are completed with sif files generated by my boss. I use an infile in a program to start my Enrollment reports. This is a daily report.

Question 1. I want the SAS Report generated at the end to show which dates are being described. So for this example, I am comparing this years data to this time last year.

The infiles look like this:

Infile 'C:\Enrollment Reports\SP15\SIF_SP15_26Apr2015.dat'

and

Infile 'C:\Enrollment Reports\SP14\SIF_SP14_27Apr2014.dat'

How do I get the end report title to say

"Compare Report 2014-2015"

"26Apr2015 & 27Apr2014"

I was able to enable the date the data was executed, but I want the title to reflect the SIF files the reports are generated from.

Question 2.These reports will be exported every day and have a new name each day. The name is based on the 2015 date being analyzed, which is always the day before. On April 27, I run the program based on the April 26 SIF. How do I get the exported report name to reflect this date? Such as "Compare_Report_SP_26Apr2015"? I'm guessing I add code during the export wizard, but I don't know what to type.

Thanks for any suggestions!

1 REPLY 1
Reeza
Super User

If you're running this process every day how are you changing the file name every day? Whatever method you're using there will probably help to suggest how to add in the dates to the title.

My initial suggestion is to say create two macro variables that are used to run the report and include those in the title.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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