Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Descending Alphabetical Order in proc report

Reply
Contributor
Posts: 49

Descending Alphabetical Order in proc report

data two;

input Name $20. Number $22-34;

Last=scan(name, -1);

cards;

Jeff W. Snoker          (908)782-4382

Raymond Albert          (732)235-4444

Alfred Edward Newman (800)123-4321

Steven J. Foster      (201)567-9876

Jose Romerez          (516)593-2377

;

proc report data=two nowd;

column name Number last;

define last / order noprint;

define number/ 'Phone Number' ;

run;

This is the code for report in Ascending order of last variable. But I want the Names and Phone Numbers in descending Alphabetical Order by Last Name.

Can any one help?

Respected Advisor
Posts: 3,799

Re: Descending Alphabetical Order in proc report

Posted in reply to devarayalu

 

DESCENDING

Super Contributor
Posts: 387

Re: Descending Alphabetical Order in proc report

Posted in reply to devarayalu

define last / order descending noprint;

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473627.htm, scroll to ORDER option.

Contributor
Posts: 49

Re: Descending Alphabetical Order in proc report

Posted in reply to ScottBass

Thank you for the prompt answer.

Ask a Question
Discussion stats
  • 3 replies
  • 480 views
  • 0 likes
  • 3 in conversation