Showing posts with label dsd. Show all posts
Showing posts with label dsd. Show all posts

Friday, May 30, 2008

dsd and csv

What does the following code do?
data check;
infile 'c:\datanew\tolearn\input.csv' dsd;
input name $ gender $ Age Height Weight;
run;
Answer:
It converts a comma seperated value file called input to a SAS dataset called check. The variables in the file is name and gender(Character variables), age weight and height(Numeric variables) and stores in a dataset called check.
data creates a dataset.
infile statement is used to specify the filename which is to be converted to a SAS dataset.
input statement specify the variables present in the file.The variables are seperated by a comma.
dsd specifies it is a csv file.
Functions of DSD and proc import similarities are to be dealt tomorrow.