Relative Content

Tag Archive for sas

How to loop to get column name?

The general idea is to get the column name, and calculate the mean and std one by one in SAS. But there are over 50 columns, and no pattern in their column names. I don’t know how to get using SAS, but the idea I want is as below by using R:

SAS Proc Report variable columns

I am trying to automate a daily report using Proc Report (instead of Excel). The report is a running 8-day report with the dates being the column names. How do I reference the date columns in the COLUMN and DEFINE statements, so that I can format the cell values?

Find a number in a list that is closest to another number

I have some sample data below and I need to find the scenario where the value is closest to but no greater than 94,000,100. The answer would be 12. How do I accomplish this in SAS? This is a piece of code within a large SAS program. Any input is greatly appreciated!