@Ksharp :
If I expected double blanks in a character field (thereby defeating the benefit of the ampersand in the informat for city) , then I would use DLM=',' dropping the blank as a field delimiter. This prevents consecutive internal blanks being interpreted as delimiters. However it would then force me to read in the first three fields as consistently formatted:
data want ;
infile datalines dlm=',';
input (shipid received shipped) ($5. +1 yymmdd10. +1 yymmdd10.)
city :$20. st :$2. zipcode $5.;
format received yymmdd10. shipped yymmdd10.;
datalines;
X8742 2018/03/14 2018/03/17 Little River City, KS, 67457
X8742 2018/03/14 2018/03/17 Little River City, KS, 67457
R9028 2018/06/12 2018/07/10 Bartlett, KS, 67332
run;
... View more