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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4927 views
  • 2 likes
  • 2 in conversation