DATA Step, Macro, Functions and more

Multiple records to one observation

Reply
Learner
Posts: 1

Multiple records to one observation

Hi, guys
I need help in reading external file.

How to read external text -file with multiple rows to one observation with one column?
Super User
Super User
Posts: 9,402

Re: Multiple records to one observation

Hold the read point over with @@, for instance this gives some examples:

https://analytics.ncsu.edu/sesug/2014/CC-13.pdf

You would need to write the logic as to when to write out the dataset line.

Super User
Posts: 9,873

Re: Multiple records to one observation

Please supply an example of the text file, and how it should end up in the dataset.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 37

Re: Multiple records to one observation

Hi,

 

As per your query i think double trailing '@@' should solve your issue.

 

If you could elaborate your query with a small instance that would be appreciated.

 

Thanks,

Srinath 

Ask a Question
Discussion stats
  • 3 replies
  • 88 views
  • 2 likes
  • 4 in conversation