DATA Step, Macro, Functions and more

Creating dataset from .csv file

Accepted Solution Solved
Reply
Contributor
Posts: 36
Accepted Solution

Creating dataset from .csv file

Hi all, I have .csv file with below data :-

 

[sas@apptest Lev1]$ cat test.csv

Filesystem            Size  Used Avail Use% Mounted on

/dev/vda3              30G   11G   18G  37% /

tmpfs                  16G  176K   16G   1% /dev/shm

/dev/vda1             194M   32M  153M  17% /boot

/dev/vda5             9.9G  155M  9.2G   2% /opt

/dev/vda6             9.9G  399M  9.0G   5% /var

/dev/vdl              5.0G  2.1G  2.7G  44% /dbclient

/dev/vdn               30G  1.4G   27G   5% /sasconf

/dev/vdo               99G   12G   83G  13% /saswork

/dev/vdp               50G   11G   37G  23% /sasinst

/dev/vdq               99G   61G   34G  65% /sasdata

/dev/vdr              9.9G  1.7G  7.7G  19% /mysql

/dev/vdm              9.9G  179M  9.2G   2% /users

 

 and i want to create dataset in sas with column name  FILESYSTEMS$ SIZE$ Used$ Avail$ use$ mountedon$ from above .csv file and i have wriiten below code which not creating dataset .

 

data adfbase.cleaned;

infile "/sasconf/sas/Lev1/test.csv" ;

input FILESYSTEMS$ SIZE$ Used$ Avail$ use$ mountedon$;

run;

 

 

proc print  data=cleaned;

run;

 

How can i create same? please let me know .

 

manu thanks in advance .


Accepted Solutions
Solution
‎02-07-2017 05:20 AM
Super User
Posts: 17,868

Re: Creating dataset from .csv file

Ok, please mark the question solved.

 

View solution in original post


All Replies
Super User
Posts: 17,868

Re: Creating dataset from .csv file

What does your log say?

Contributor
Posts: 36

Re: Creating dataset from .csv file

i got my mistake i was checking work.cleaned and i have inserted records in adfbase.cleaned.

 

mentioned code is working fine.Smiley Happy

Solution
‎02-07-2017 05:20 AM
Super User
Posts: 17,868

Re: Creating dataset from .csv file

Ok, please mark the question solved.

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 182 views
  • 0 likes
  • 2 in conversation