LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 May 2003 21:58:58 -0700
Reply-To:     "Huang, Ya" <yhuang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Huang, Ya" <yhuang@AMYLIN.COM>
Subject:      Re: count then obs (was no subject)
Comments: To: Kit Leung <hello_joecool@HOTMAIL.COM>
Content-Type: text/plain; charset="iso-8859-1"

Kit,

This is the second time you post without a subject line recently. Please remember to add a subject line to your message, so that people won't miss it.

data xx; input ZIPCODE $1-5 MSANAME $7-30 zip4 $32-35; cards; 00016 Bakersfield, CA MSA 0001 00017 Fresno, CA MSA 0001 00010 N/A 0001 00011 N/A 0001 00012 N/A 0001 00019 N/A 0001 00014 Tucson, AZ MSA 0001 00015 Tucson, AZ MSA 0001 00018 Ventura, CA PMSA 0001 00028 Chico-Paradise, CA MSA 0002 00027 Colorado Springs, CO MSA 0002 ;

options nocenter; proc sql; select distinct zip4, sum(msaname^='N/A') as msa, sum(msaname ='N/A') as na from xx group by zip4 ;

--------------------

zip4 msa na ffffffffffffffffffffffff 0001 5 4 0002 2 0

HTH

Ya -----Original Message----- From: Kit Leung [mailto:hello_joecool@HOTMAIL.COM] Sent: Tuesday, May 06, 2003 7:09 PM To: SAS-L@LISTSERV.UGA.EDU Subject:

I was wondering is it possible to count how many n/a and non-n/a records within the same 4-digit zipcode ?

ZIPCODE MSANAME zip4

00016 Bakersfield, CA MSA 0001 00017 Fresno, CA MSA 0001 00010 N/A 0001 00011 N/A 0001 00012 N/A 0001 00019 N/A 0001 00014 Tucson, AZ MSA 0001 00015 Tucson, AZ MSA 0001 00018 Ventura, CA PMSA 0001 00028 Chico-Paradise, CA MSA 0002 00027 Colorado Springs, CO MSA 0002

Basically, what I need is to come up a table like this:

zip4 MSA N/A

0001 5 4 0002 2 0

_________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus


Back to: Top of message | Previous page | Main SAS-L page