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.

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

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