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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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