BookmarkSubscribeRSS Feed
SAS_Beginner
Calcite | Level 5
Hi,

I am a beginner with SAS and my knowledge is limited.

I have got a fairly simple data in excel file. It has got quite a few missing values and blank cells.

There are 5 variables. Each variable has 5 reading. In excel, it is in a format of 5X5 table.
One of the variable starts with a blank cell(no text in the cell) and the other with missing value (by missing value, I mean a '.')

I have used proc import to read in this data from excel to sas.


The problem I faced was that SAS didn't read 1st and last values of Variable B. Varible B was like this:

B

1
.
.
.
6


Then I tried 'Mixed=Yes' option in proc import, it read in all the values for Variable B, but when I looked it in the viewtable, the values for B, C , D and E are left-aligned i.e. SAS has read it as a text variable, but it was a number variable.

I am sheerly confused now!


Can anyone help me out please?


Thanks in advance
SAS_Beginner
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
For assistance, you will need to reply to your post providing SAS log output with the SAS-generated DATA step code from the PROC IMPORT (pasted in your reply from your SAS session log). Adding a simple PROC CONTENTS; RUN; after the import code would also help, and activating the SAS OPTIONS setting SOURCE is important to generate as much SAS log diagnostics as possible.

Scott Barry
SBBWorks, Inc.

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!

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.

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
  • 1 reply
  • 575 views
  • 0 likes
  • 2 in conversation