DATA Step, Macro, Functions and more

Having problem with proc import

Reply
N/A
Posts: 1

Having problem with proc import

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
Super Contributor
Super Contributor
Posts: 3,174

Re: Having problem with proc import

Posted in reply to SAS_Beginner
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.
Ask a Question
Discussion stats
  • 1 reply
  • 102 views
  • 0 likes
  • 2 in conversation