BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Aexor
Lapis Lazuli | Level 10

 

data country;
input country_ID state $ country_name $;
datalines;

1 Texas Colin
. Texas Dallas
3 . Deklab
;
run;

I have below dataset here if i am using " "  in 3rd row , I am getting lost card error but if i am using "." Which we used for numeric missing value. I am getting the o/p. Please tell me Why this is happening  

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Since you do not use an INFILE statement with the DSD option, a sequence of delimiters (blanks) will be read as one delimiter, causing a skip to the next dataline.

 

When using the default $w. informat, a single dot will also be interpreted as a missing character value.

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User

Since you do not use an INFILE statement with the DSD option, a sequence of delimiters (blanks) will be read as one delimiter, causing a skip to the next dataline.

 

When using the default $w. informat, a single dot will also be interpreted as a missing character value.

Aexor
Lapis Lazuli | Level 10
Thanks !! Yes if we use infile then we can easily specify DSD .
I just wanted to confirm that while using default format for char variable we can use '.' or is there any way out for this ?
Kurt_Bremser
Super User

Whenever I need to read missing values (or values containing blanks) from datalines, I use INFILE, DSD and DLM= with a suitable delimiter (comma, pipe, ...)

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 3826 views
  • 2 likes
  • 2 in conversation