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 (April 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Apr 2008 14:18:21 -0400
Reply-To:     msz03@albany.edu
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Zdeb <msz03@ALBANY.EDU>
Subject:      Re: Problem
Content-Type: text/plain;charset=iso-8859-1

hi ... if this is supposed to write to a file, and if only of of the conditions can be true, how about ...

col = (pp1 eq 'Y') * 101 + (pp2 eq 'Y') * 153 + (pp3 eq 'Y') * 201;

put @01 data1 $char10. @12 data2 $char19. @70 'C' @col data3 $char10. @;

ps I'm not sure what this means to SAS (if anything) ...

IF PP1 = 'Y' THEN DO; @101 DATA3 $CHAR10. @; end;

the code between do/end should be some executable statement not just a portion of a PUT statement, yes/no?

-- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475

> Hi Guys , I was facing a peculiar problem while writing the sas > datafile. > > consider the following statements > > @1 data1 $char10. > @12 data2 $char19. > @70 'C' > @; > IF PP1 = 'Y' THEN DO; > @101 DATA3 $CHAR10. > @; > END; > IF PP2 = 'Y' THEN DO; > @153 DATA3 $CHAR10. > @; > END; > IF PP3 = 'Y' THEN DO; > @201 DATA3 $CHAR10. > ; > END; > > NOW ONLY THOSE RECORDS WERE WRITTEN FROM THE INCOMING DATASET WHICH > HAD ALL THE VARIABLE PP1,PP2,PP3 CONDITION SATISFIED. > > REST WERE JUST NOT WRITTEN. > > WHAT CAN BE A POSSIBLE REASON FOR THIS ???? > >


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