BookmarkSubscribeRSS Feed
malls
Calcite | Level 5

My format table is .csv

 

Here is the code iused to import this table : 


proc import datafile='E:\PUF AY 2017\PUF AY 2017\CSV\PUF_FORMATS.csv'
out=kmus.FORMATS dbms=csv replace;
run;

 

Further, i submitted these codes : 

 

data formats;
set kmus.formats;
run;

DATA fmtDataset;
SET formats;
RENAME Value = Start;
run;

PROC FORMAT CNTLIN=fmtDataset type="C";
RUN;
data test; set dixsept;
format statedesignation statedesignation.;
run;

proc freq data=test;
table statedesignation;
run;

 

Sadly, i still get missing values.

 

Tom
Super User Tom
Super User

Don't use PROC IMPORT to read CSV files.  It has to GUESS how to define the variables. Just write your own data step to read the CSV file and then you can control how the variables are defined.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 16 replies
  • 1548 views
  • 0 likes
  • 3 in conversation