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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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