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

Below I have two codes but with slight difference - one has observation entered after indentation and other without indentation. I am not able to figure out why one character is getting missed out when using indents. Isn't SAS supposed to be insensitive to indentation or is it because SAS takes indent (used tab button) as a character when providing character observations. Didn't face this issue while entering numerical observations after indentation.

datalines with indentationdatalines with indentation

 

with indentation results in one missing character from PAT_ID variablewith indentation results in one missing character from PAT_ID variable

 

everything same as previous but without indentationeverything same as previous but without indentation

 

no missing character in PAT_ID variable when using without indentationno missing character in PAT_ID variable when using without indentation

 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

 

SAS is insensitive to indentation, but not in the datalines (cards) obviously.

You should always start entering the data in the left-most column of your editor.

 

I have never experimented with it, but I guess the tab becomes part of your string.

 

Cheers,

Koen

View solution in original post

1 REPLY 1
sbxkoenk
SAS Super FREQ

Hello,

 

SAS is insensitive to indentation, but not in the datalines (cards) obviously.

You should always start entering the data in the left-most column of your editor.

 

I have never experimented with it, but I guess the tab becomes part of your string.

 

Cheers,

Koen

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 774 views
  • 0 likes
  • 2 in conversation