Syntax, DLM= option:
DLM=delimiter(s)
|
data sasuser.creditsurvey;
infile cccomma dlm=',';
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;
data work.finance2;
filename find 'c:datafindat2';
infile find dsd;
length SSN $ 11 Name $ 9;
input ssn name Salary : comma. Date : date9.;
run;
proc print data=work.finance2;
format date date9.;
run;
data sasuser.creditsurvey;
infile creditcr missover;
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;
data sasuser.creditsurvey;
infile credit2 dlm=',';
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;
1
is
read for Age. The program continues to read subsequent incorrect values
for Bankcard 8
, FreqBank 0
,
and Deptcard 0
. The program then attempts
to read the character field FEMALE, at the beginning of the second
record, as the value for the numeric variable FreqDept. This causes
the value of FreqDept in the first observation to be interpreted as
missing. The input pointer then moves down to the third record to
begin reading values for the second observation. Therefore, the first
observation in the data set contains incorrect values, and values
from the second record in the raw data file are not included.
data sasuser.creditsurvey;
infile credit2 dsd;
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;
data sasuser.creditsurvey;
infile credit3 dsd dlm='*';
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;
data sasuser.creditsurvey;
infile credit4 dsd;
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;
data sasuser.creditsurvey;
infile credit5.dat dsd dlm=' ';
input Gender $ Age Bankcard FreqBank
Deptcard FreqDept;
run;
proc print data=sasuser.creditsurvey;
run;