BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
Can someone suggest how can i read a single '.' (Period) for a CHAR column from a File. When I read a file and there is a single '.' for a column with data type CHAR SAS converts the '.' value to a SPACE. I don't want to read . as space. I want to know when there was a space in the input file and when i get . then i want to retain it as some valid data.

When the input file has two back to back periods ('..') then I am able to read them just fine. The above mentioned problem arises when I try to read a single period into a char data type column.
3 REPLIES 3
data_null__
Jade | Level 19
The $w. informat is almost identical to the $CHARw. informat. However, $CHARw. does not trim leading blanks nor does it convert a single period in an input field to a blank, while $w. does both.
deleted_user
Not applicable
Hi data _null_ (dont know your name so will use your community name :))

It works fine now. Thanks for your help.
Ksharp
Super User
Hi. I agree with data null;
Try to use $CHARw. informat.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1544 views
  • 0 likes
  • 3 in conversation