BookmarkSubscribeRSS Feed
sasuser8675309
Calcite | Level 5

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.\

4 REPLIES 4
sasuser8675309
Calcite | Level 5

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....

Tom
Super User Tom
Super User

What is the error message?

sasuser8675309
Calcite | Level 5

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.

Ksharp
Super User

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

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 496 views
  • 0 likes
  • 3 in conversation