DATA Step, Macro, Functions and more

Input data inside data step

Reply
N/A
Posts: 0

Input data inside data step

I need to read in some data within a data step. If I use $30, then the results are blank. If I just use $ for ds_name, then only the first 8 characters are read. The data is one record per line. What else should I do? I am using SAS8.2

Thanks,
-FD
data test;
input ds_name $30 ;
datalines;
prestudy
qs160009
suppqs160009
qs160012
suppqs160012
qs160014
suppqs160014
qs160016
suppqs160016
qs160018
suppqs160018
qs160019;
run;
Super Contributor
Super Contributor
Posts: 3,174

Re: Input data inside data step

Your use of the INFORMAT $30 is incorrect - it requires a trailing period.

Also, suggest you work to get up to a more current, supported SAS version as soon as possible.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Input data inside data step

Thank you for the note. The missing period is the problem. After I used '$30.', it worked!

-FD
Ask a Question
Discussion stats
  • 2 replies
  • 128 views
  • 0 likes
  • 2 in conversation