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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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