If the INFILE is the troublemaker, then shouldn't it be the same for other cases? But this code produces no problem when it just reads PCES rather than PECND as follows. filename PCES "%sysfunc(getoption(work))\PCES.csv";
proc http method="get" out=PCES url="https://fred.stlouisfed.org/graph/fredgraph.csv?id=PCES";
run;
data PCES;
infile PCES;
input TIME yymmdd10. +1 PCES;
TIME=put(TIME,yymmddn8.)+0;
run; Both PCES and PCEND are structurally identical as follows. DATE,PCES
1959-01-01,138.7
1959-02-01,140.0
1959-03-01,140.5
1959-04-01,141.5
1959-05-01,142.8
1959-06-01,144.3
1959-07-01,145.1
1959-08-01,146.1
1959-09-01,147.4
1959-10-01,148.3
1959-11-01,149.2
1959-12-01,150.4 The left and right are PCEND and PCES, respectively. SAS doesn't read the January in PCEND, but does read in PCES. Why are the results different? By the way, some FRED data are uneven—UMCSENT, for example, is less frequent than monthly before 1978, but becomes monthly in 1978. Also, date information in FRED such as 1950-01-01 actually means 1950-01-31 sometimes. So I rather used TIME here.
... View more