LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Sep 2011 14:05:06 -0400
Reply-To:     Mary Rosenbloom <>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mary Rosenbloom <>
Subject:      sum(of card: ) this works but I can't find documentation for it

Hi all,

I have several variables, all having the prefix "CARD", and all having values of 1 or missing. I want to create one more variable, "not answered" which will take the value of 1 if none of the other variables have a value.

I decided to try this code, and it worked, but I can't find a reference for it anywhere:

data try2; set try1;

if sum(of card:) eq 0 then notanswered=1; run;

Does anyone know of an example of this in the docs? I am a little hesitant to use this, since I can't turn on some analog of MPRINT to "see" what is going on behind the scenes.

Thanks for your help.

Cheers, Mary R.

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