BookmarkSubscribeRSS Feed
rashmirao99
Fluorite | Level 6

Hi

I need  to create a listings. And trying to do it with proc report.  is there anyway I can create a common Heading called 'Date' and under Date I have three columns(variables). Basically it should look like this: Is this possible in proc report?

 

                                                      Date

                                 Birthdate          Rficdtc       Incdat

 

Hope it is understandable.

 

Thanks

Rashmi.

 

                                                     

 

 

2 REPLIES 2
Reeza
Super User

Yes its possible, usually use the option ACROSS within the DEFINE statement.

Vague questions get vague answers. If you need more help, post more details.

 


@rashmirao99 wrote:

Hi

I need  to create a listings. And trying to do it with proc report.  is there anyway I can create a common Heading called 'Date' and under Date I have three columns(variables). Basically it should look like this: Is this possible in proc report?

 

                                                      Date

                                 Birthdate          Rficdtc       Incdat

 

Hope it is understandable.

 

Thanks

Rashmi.

 

                                                     

 

 


 

PGStats
Opal | Level 21

A small example:

 

proc report data=sashelp.cars;
where make="Acura";
columns model ("Miles per Gallon" MPG_City MPG_Highway);
define model / format=$24.;
define MPG_City / "City";
define MPG_Highway / "Highway";
run;
                                               Miles per Gallon
                   Model                          City    Highway
                    MDX                             17         23
                    RSX Type S 2dr                  24         31
                    TSX 4dr                         22         29
                    TL 4dr                          20         28
                    3.5 RL 4dr                      18         24
                    3.5 RL w/Navigation 4dr         18         24
                    NSX coupe 2dr manual S          17         24

The expression in parentheses in the columns statement does it. 

PG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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