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 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Sep 2005 20:19:12 -0700
Reply-To:     t@T.T
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         t@T.T
Subject:      Re: How to input data from different column for different rows
Comments: To: sas-l@uga.edu
In-Reply-To:  <1126217886.717909.117790@o13g2000cwo.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi

Dan Nordlund few days ago suggested following to me for my similar problem:

data test; Input x 1 y 2-5 z 6-8 d :mmddyy10. t :time8. xx 30-34 yy 35-40 zz 41-42; Put d=date9. t=time8.; Cards; 86857484 1/1/2005 8:05:59 5849384343535 28493834 11/29/2004 16:59:59 2939283985948 ; run;

Seems the ":" before the datatype identifier may be the secret. More specific help on that is in the SAS help.

Toby

Jerry wrote: > I am wondering if there is a way to use "input" statement to read in > data that are in different columns. > For example, if I have the following data: > > > > 77343 A XX XX > 2 7 B XX XX > 2 2 2 c XX XX > > > I want to start reading in the data from the letters, i.e. the first > variable value for each obs will be A, B, and c respectively. However, > A, B, C are not in the same column. The data before A, b, and c is > really a mess so you can't use list\formatted input. > > > I am new to SAS. please forgive me if this question is stupid. > Thank you in advance. >


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