BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want to report the total sale of each emp in summarized format in base SAS only without using SQL.

data is like that
data emp;
input eid $ job $ sale;
cards;
E101 CLERK 2000
E102 SALES 3000
E103 CLERK 4000
E102 SALES 2003
E103 CLERK 3009
E103 CLERK 4008
E102 SALES 2007
E102 SALES 3006
E101 CLERK 4005
;
output should be like this (total sum of sale)
E101 CLERK 6005
E102 SALES 10016
E103 CLERK 11017
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Look at either PROC REPORT or consider using PROC SUMMARY along with PROC PRINT, or PROC MEANS. The SAS support website http://support.sas.com/ has much to offer, with SAS-hosted documentation and also technical / conference reference material - suggest using the SEARCH facility there or use a Google advanced search, possibly, by coding the parameter "site:sas.com" to limit your search.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Sorry for my wrong way of asking the question.
sir, is it possible that the same dataset (emp) should contain the total sale of every emp like the below output.
E101 CLERK 6005
E102 SALES 10016
E103 CLERK 11017
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Based on the "output data" demonstrated, the SAS PROC SUMMARY can create a new file (or replace the existing file, as preferred) using the CLASS, VAR and OUTPUT statements.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:
proc summary site:sas.com
deleted_user
Not applicable
Thanks sir. Its working

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