BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Shuail_Ibrahim
Calcite | Level 5

I have to import a few columns from a data set from 1 to 4. in future I might have from 1 to n. Currently, the issue I'm facing is if i give as  (diag_1 $ diag_2 $ diag_3 $ diag_4 $ ) its able to pick the string value , but if i give as (diag_1 $ - diag_4 $;) only in 1 and 4th we are getting the string , , 

Please can anyone help me on this, since I'm new to SAS.

data file1;
infile '/folders/input/step1/file5.csv' dlm=',' firstobs=2;
input recipno diag_1 $ - diag_4 $;
run;  

 

1 ACCEPTED SOLUTION
4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

A text file is not a data set.

A data set is a SAS table. At least when talking to SAS users like you are here. Use the proper terminology to get the best help. 🙂

You want to import from a text file into a SAS data set.

Shuail_Ibrahim
Calcite | Level 5
@ChrisNZ, I'm extremely sorry for that, since I'm new to SAS that's why these sets of questions get arrived. if I get experienced I can match your terminology ... which will make you easier to answer.
ChrisNZ
Tourmaline | Level 20

No worries. That's exactly why I highlight the terminology issue 🙂

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 454 views
  • 0 likes
  • 3 in conversation