Hello--
I have a simple input statement that I am using to test a program. It works fine in SAS 9.3 and EG 5.1 on my personal machine. However, when I try this on my work computer, which uses EG 6.1 through the SASApp Server, it has issues. The syntax is fine, so I cannot understand what the issue is.
data example;
input productgroup $ state $ id amount price;
cards;
lumber NC 17442 21324 66.83
lumber NC 17951 353726 19.40
;
run;
Any help would be greatly appreciated, since this seems to be a simple issue and it's driving me crazy.
Nick
ps. I can "force" it to work with length statements, but I shouldn't have to. Also, not practical since I will sometimes be testing this with larger datasets.\
I can also force it to work by altering the statement to
data example;
infile cards delimiter=',';
input productgroup $ state $ id amount price;
cards;
lumber,NC,17442,21324,66.83
lumber,NC,17951,353726,19.40
;
run;
This seems unnecessary, since the original syntax was correct....am I missing something here? I'm losing my mind....
What is the error message?
Weird....
I tried the old "turn it off and turn it back on" trick and now it's working. Maybe the server had stored a stale image of the data set somehow? Either way, thanks for response.
Maybe your work computer mistake blank delimiter as TAB delimiter , just guess.
data example;
infile cards expandtabs ;
input productgroup $ state $ id amount price;
cards;
lumber NC 17442 21324 66.83
lumber NC 17951 353726 19.40
;
run;
Xia Keshan
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.