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.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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