BookmarkSubscribeRSS Feed
ballardw
Super User

@CathyVI wrote:

@PaigeMiller @ballardw  Thank you for sharing your knowledge. This means alot to me as I continue to learn SAS. Two last question please.

1. How do I learn data manipulation? Is there any book/material you can recommend.

The first step in anything related to programming, at least in my sometimes humble opinion: Clearly define the manipulation. 

 

I often find that when I don't get desired or expected results from code it is because I did not state clearly enough what the output would be and identify which step handles which requirement.

 

Let's look at your second question about the column headings.

When you looked @PaigeMiller's Column statement did you consider how the text "Active" is placed about the count and percent? or "Reserve"?

 

Let's see this:

proc report data=test2;
    columns serv table ("Component" ("Active" active active_pct) ("Reserve" reserve reserve_pct));
    define serv/group "Serv";
    define table/group "Table";
    define active/'N' format=comma10.0;
    define active_pct/'%' format=percent8.2;
    define reserve/'N' format=comma10.0;
    define reserve_pct/'%' format=percent8.2;
run;

The ( ) on the Columns statement does column heading grouping. Adding an extra layer of () around the Active and Reserve groups places the text Component above those groups.

The appearance was about COLUMN HEADING, not grouping by defines.

 

PaigeMiller
Diamond | Level 26

@CathyVI wrote:

 

1. How do I learn data manipulation? Is there any book/material you can recommend.

 


Also, Maxims of Maximally Efficient SAS Programmers

Especially maxims 10, 12, 14 and 19, and all the rest are important too.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 16 replies
  • 1975 views
  • 4 likes
  • 3 in conversation