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 (November 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 28 Nov 2006 21:59:02 +0100
Reply-To:   LouisBB <nospam@HCCNET.NL>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   LouisBB <nospam@HCCNET.NL>
Subject:   Re: Help on data creation for SAS
Comments:   To: sas-l@uga.edu

Dear Kumar,

Only the code block in the if first.id section contains an output statement. That is why only those records will be written to your target table A. All the other calculations are in vain, since no output statement follows them.

The documentation http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000194540.htm writes oubout output: "By default, every DATA step contains an implicit OUTPUT statement at the end of each iteration that tells SAS to write observations to the data set or data sets that are being created. Placing an explicit OUTPUT statement in a DATA step overrides the automatic output, and SAS adds an observation to a data set only when an explicit OUTPUT statement is executed. Once you use an OUTPUT statement to write an observation to any one data set, however, there is no implicit OUTPUT statement at the end of the DATA step. In this situation, a DATA step writes an observation to a data set only when an explicit OUTPUT executes. " http://support.sas.com/onlinedoc/913/docMainpage.jsp

Kind regards,

LouisBB.

"Kumar" <iyer.bharath@gmail.com> wrote in message news:1164744074.710251.261330@j72g2000cwa.googlegroups.com... > Dear Sir, > > I have data set that i am preparing for use in NONMEM. I used an > existing macro in SAS to create the data file, but i am able to read > only the first row which is the data at time zero (a sample of the data > set shown below) none of the other observations are recorded onto my > output file... Can you please help me > > DATA A; > > SET B; > > BY ID; > > IF FIRST.ID THEN DO; > > EVID = 1; > MDV = 1; > DV= 0; > CMT = 1; > AMT = DOSE; > OUTPUT; > AMT= .; > EVID = 0; > DV = CONC; > CMT = 2; > END; > ELSE DO; > AMT = .; > EVID = 0; > DV = CONC; > CMT = 2; > END; > RUN; > > Sample Data Set > > > > ID TIME CONC DOSE > 101 0 0 5000 > 101 0.25 0 5000 > 101 0.5 1.8 5000 > 101 0.75 16.5 5000 > 101 1 20.9 5000 > 101 1.5 32.3 5000 > 101 2 28.2 5000 > 101 3 24.7 5000 > 101 4 24.4 5000 > 102 0 0 5000 > 102 0.25 20 5000 > > > Regards > Kumar >


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