I am trying to import the column in the attached file into SAS; I have been using the following code and I am getting an error in the input line. I am using SAS 9.2; could someone provide some insight as to why this doesn't work?
data WORK.NCDebt;
infile '/SourcePath/Example.csv';
informat Maturity yymmdd8.;
format Maturity yymmdd8.;
input Maturity :yymmdd8.;
run;
Your dates should be read with a mmddyy informat. The while 5 might pass as a year 15 is not a month (the MM part) and 2014 is right out for the day of the month.
and why make an attachment instead of posting:
5/15/2041
5/15/2039
5/15/2038
5/15/2021
5/15/2020
7/2/2015
1/20/2015
11/20/2014
9/16/2014
9/15/2016
Your dates should be read with a mmddyy informat. The while 5 might pass as a year 15 is not a month (the MM part) and 2014 is right out for the day of the month.
and why make an attachment instead of posting:
5/15/2041
5/15/2039
5/15/2038
5/15/2021
5/15/2020
7/2/2015
1/20/2015
11/20/2014
9/16/2014
9/15/2016
DATA WORK.Example1;
LENGTH
F1 8 ;
FORMAT
F1 YYMMDD8. ; /** CHANGE THE FORMAT AS YOU NEED TO DISPLAY OUTPUT */
INFORMAT
F1 YYMMDD10. ;
INFILE 'xxxxx/Example.csv'
LRECL=10
ENCODING="LATIN1"
TERMSTR=CRLF
DLM='7F'x
MISSOVER
DSD ;
INPUT
F1 : ?? MMDDYY10. ;
RUN;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.