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 (March 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 12 Mar 2002 09:43:45 +0100
Reply-To:   Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Subject:   Re: Hold Line
Comments:   To: Thomas Allen Schmitt <schmitta@csd.uwm.edu>
Content-Type:   text/plain; charset="iso-8859-1"

Hi Tom,

Yes, I already stated it might be something like what I proposed. Dependent on your data it might become a little bit different. My assumption was that your data is ordered such that t has the values 1, 2 and 3 repetitively in subsequent records. If not, than you would either have to adapt the code or you should presort your data: PROC SORT DATA=yourdata [ OUT=......... ]; BY yourcase T; RUN; "yourcase" should be some variable identifying cases with 3 records each, with the three t-values. The result of that ordering would be:

yourcase t 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3 . .

HTH. Regards - Jim. -- Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070 senior statistician, P.O. Box 1 fax. +31 412 407 080 senior data manager 5350 AA BERGHEM IMRO TRAMARKO: a CRO J.Groeneveld@ITGroups.com the Netherlands in clinical research

My computer beeps when it complains; I complain when it beeps

Notice of confidentiality: this e-mail may contain confidential information intended for the addressed recipient only. If you have received this e-mail in error please delete this e-mail and please notify the sender so that proper delivery can be arranged.

> -----Original Message----- > From: Thomas Allen Schmitt [SMTP:schmitta@csd.uwm.edu] > Sent: Tuesday, March 12, 2002 2:30 AM > To: Jim Groeneveld > Subject: Re: Hold Line > > Thanks Jim for your reply. I did almost work except it is excluding the > cases in this manner except for the last case: > > -3.950626 -3.406841 -3.191472 > -3.906149 > > It's strange because for the first two columns it is excluding the first > case. The first number in each of the two columns above is actually the > the second case from the second iteration. I used the code as you sent it > to me. Any suggestions? > > Tom > > > > > > Thomas, > > > > The output you get is correct, regarding your code. At each iteration of > the > > data step loop var is being written at a position dependent on t. You > > indicate to end each iteration by an empty PUT statement, which writes > an > > end-of-line to the record and releases it. Each iteration writes to a > new > > line and var starts at the charater position determined by t. > > > > What you want is something like: > > if t=1 then put @1 var @; > > else if t=2 then put @11 var @; > > else if t=3 then put @21 var; > > assuming you want 3 var values on one line and only then starting a new > > line. > > > > HTH, > > > > Regards - Jim. > > -- > > Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070 > > senior statistician, P.O. Box 1 fax. +31 412 407 080 > > senior data manager 5350 AA BERGHEM IMRO TRAMARKO: a CRO > > J.Groeneveld@ITGroups.com the Netherlands in clinical research > > > > My computer beeps when it complains; I complain when it beeps > > > > Notice of confidentiality: this e-mail may contain confidential > information > > intended for the addressed recipient only. > > If you have received this e-mail in error please delete this e-mail and > > please notify the sender so that proper delivery > > can be arranged. > > > > > -----Original Message----- > > > From: Thomas Allen Schmitt [SMTP:schmitta@CSD.UWM.EDU] > > > Sent: Friday, March 08, 2002 7:26 PM > > > To: SAS-L@LISTSERV.UGA.EDU > > > Subject: Re: Hold Line > > > > > > Ya, I have did have that but the output then looks like this: > > > > > > -3.97596 > > > -3.918436 > > > -3.835795 > > > -3.870338 > > > -3.721172 > > > -3.708684 > > > > > > Instead of looking like this: > > > > > > -3.902281 -3.788578 -3.640653 > > > -3.929888 -3.853189 -3.732347 > > > > > > Tom > > > > > > > Hi Tom, > > > > Do you have a final PUT statement without a trailing @ at the end > of > > > this > > > > section of code? You'll need that to release the line. > > > > Nancy > > > > > > > > Nancy Brucken > > > > Clinical/Regulatory Informatics > > > > Pfizer Global Research & Development, Ann Arbor > > > > (734) 622-5767 > > > > E-mail address: Nancy.Brucken@pfizer.com > > > > > > > > > > > > -----Original Message----- > > > > From: Thomas Allen Schmitt [mailto:schmitta@csd.uwm.edu] > > > > Sent: Friday, March 08, 2002 12:06 PM > > > > To: SAS-L@LISTSERV.UGA.EDU > > > > Subject: Hold Line > > > > > > > > > > > > Hi All! I have written the following syntax: > > > > > > > > file 'out'; > > > > if t=1 then put @1 var @; > > > > if t=2 then put @2 var @; > > > > if t=3 then put @3 var @; > > > > > > > > Everything works great until at the end of each line when I use the > @ to > > > > hold the line. The file 'out' is empty when I try holding the line. > > > > The log file is fine, there are no error messages or warinings. Any > > > > ideas or suggestions? Thanks, > > > > > > > > Tom > > > > > > > > > > > > > > > > > ========================================================================== > > > Tom Schmitt Phone: (414) 229-4470 > > > Department of Educational Psychology E-mail: schmitta@uwm.edu > > > University of Wisconsin - Milwaukee Homepage: > www.uwm.edu/~schmitta > > > Enderis Hall Fax: (414) 229-4939 > > > 2400 East Hartford Avenue > > > P.O. Box 413 Milwaukee, WI 53201 > > > USA > > > > > > ========================================================================== > Tom Schmitt Phone: (414) 229-4470 > Department of Educational Psychology E-mail: schmitta@uwm.edu > University of Wisconsin - Milwaukee Homepage: www.uwm.edu/~schmitta > Enderis Hall Fax: (414) 229-4939 > 2400 East Hartford Avenue > P.O. Box 413 Milwaukee, WI 53201 > USA >


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