SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
CathyVI
Pyrite | Level 9

I am having an issue with my code its not running and this is the result from my log;

 

Code:

{proc import datafile="C:\Users\Adewumi\Documents\EPG194\data\np_traffic.dat"
dbms=dlm
out=traffic2
replace;
guessingrows=200;
delimiter="|";
run;}

 

log;

{NOTE: The quoted string currently being processed has become more than 262 characters long.
You might have unbalanced quotation marks.
400 proc import datafile= "C:\Users\Adewumi\Documents\EPG194\data\np_traffic.dat"
400! DBMS= dlm
401 out= traffic2 replace ;
402 guessingrows=3000;
403 delimiter= "|";
404 run;}

 

How do i fix this;

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

HI:

  It looks like you are working in the Programming 1 e-learning course. In the code you posted, it looks like your quotes are balanced -- in this step. However, my guess is that if you save this program (without the curly braces { }) and close your SAS session, then open SAS back up, you'll find the unbalanced quotes have been cleared. Typically, an error message about unbalanced quotes such as you show happens when a PREVIOUS step had unbalanced quotes and you didn't catch it in time to correct them. The unbalanced quotes from a previous step can impact a new step if you're not careful.

 

  Here's what the correct code should look like:

epg194_read_np_traffic_dat.png

 

The guessingrows was set to 3000 to be sure that the entire raw data file was used to set the variable's type.

 

Hope this helps.

 

Cynthia

 

I believe there is a lecture in the e-learning course about debugging issues like unbalanced quotes. You may want to find it and re-watch the videos.

View solution in original post

1 REPLY 1
Cynthia_sas
SAS Super FREQ

HI:

  It looks like you are working in the Programming 1 e-learning course. In the code you posted, it looks like your quotes are balanced -- in this step. However, my guess is that if you save this program (without the curly braces { }) and close your SAS session, then open SAS back up, you'll find the unbalanced quotes have been cleared. Typically, an error message about unbalanced quotes such as you show happens when a PREVIOUS step had unbalanced quotes and you didn't catch it in time to correct them. The unbalanced quotes from a previous step can impact a new step if you're not careful.

 

  Here's what the correct code should look like:

epg194_read_np_traffic_dat.png

 

The guessingrows was set to 3000 to be sure that the entire raw data file was used to set the variable's type.

 

Hope this helps.

 

Cynthia

 

I believe there is a lecture in the e-learning course about debugging issues like unbalanced quotes. You may want to find it and re-watch the videos.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 939 views
  • 0 likes
  • 2 in conversation