BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
deleted_user
Not applicable
Thank you for the note. The missing period is the problem. After I used '$30.', it worked!

-FD

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 705 views
  • 0 likes
  • 2 in conversation