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 (May 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 May 2009 08:46:04 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: what is wrong with my code for %length of a data set
In-Reply-To:  A<a9d07103-0d73-40ba-a03d-c97fb9389a86@o30g2000vbc.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Interesting - an OUTPUT statement *before* a SET statement referring to an empty dataset will produce a record of missing values from an empty dataset.

data nada; set sashelp.class; if "F"<sex<"M" then output; run;

data zerolines; set nada; run;

data zerolines2; set nada; output; run;

data oneline; output; set nada; run;

Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of jingtailan@gmail.com Sent: Wednesday, May 13, 2009 8:04 AM To: SAS-L@LISTSERV.UGA.EDU Subject: what is wrong with my code for %length of a data set

dear all:

i am trying to output ONE record from a 0 obseration data set. but the macro is not working, can you please help ? thks.

Jingtailan ============================

data three; set postz; by subjid labcat ltstcod d_vwin _trt; if last.subjid; d_vwin=9999; run;

%macro try;

data post1; set one two %if %length(three) %then %do; flp; %end; %else %do; output; vwin=9999; output; %end; run; %mend;

%try ;


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