BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

Do you know the script or procedure in JMP on how to remove the repeated items and still retain the row with maximum data. ie

Raw Data
Company Job Salary
ABC D 50
ABC D 60
DEF F 70
DEF G 80

Desired Output
Company Job Salary
ABC D 60
DEF G 80

Thanks,
Phil
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Here's one SAS programming approach using only SORT to generate the result you showed:

data ;
input Company $ Job $ Salary ;
datalines;
ABC D 50
ABC D 60
DEF F 70
DEF G 80
run;
proc sort ;
by company descending salary;
run;
proc sort nodupkey equals ;
by company ;
run;
options nocenter;
proc print u noobs;
run;

Scott Barry
SBBWorks, Inc.
Alankar
Fluorite | Level 6
Hi Scott,

Good Answer.
I've a small Question.
Actually in Proc Sort what is the functionality of "Equals","Noequals".
In which conditions we need to use those options?

Thanks,
Alankar
Cynthia_sas
Diamond | Level 26
Hi:
The documentation talks about it in great detail:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146878.htm

in short:
EQUALS: Maintain relative order within BY groups
NOEQUALS: Do not maintain relative order within BY groups

cynthia

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1806 views
  • 0 likes
  • 4 in conversation