Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to loop a field and output?

Status
Not open for further replies.

praise12

IS-IT--Management
Mar 17, 2002
17
US
I'm too new to SAS, I have a field with a Code# field, and I need to use SAS to loop it and print out if code# appears 1 time only, two times only and etc.... The counts are mutually exclusive.
Any advice is appreciated.
 
Couldn't you do this with proc freq? If the code number is called "codenum":

proc freq data=whatever;
tables codenum;
run;

Add order=freq to the proc freq statement if you want the codes to appear in order of greatest frequency. However, maybe I didn't understand your question properly and this is too simplistic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top