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

In a sas log where everything seems to look right. When you get an exclamation mark (!) in sas log does that signify an error and should I be concern about my codes.

 

data test2;

set test;

if x=1 then do;

if

! sum( a,b,c,

!d, e)=0 then y=1;

end;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Usually it means your lines of code are too long.  If the lines of code are longer than the line length used for the LOG then the wrapped lines of code are tagged with the !.

 

Lines of text in a program that is going to be read and edited by humans should be limited to about 75 characters each.  Otherwise the human will need to scan left and right to review the code.  Think about how newspapers organize articles on a page into columns.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Usually it means your lines of code are too long.  If the lines of code are longer than the line length used for the LOG then the wrapped lines of code are tagged with the !.

 

Lines of text in a program that is going to be read and edited by humans should be limited to about 75 characters each.  Otherwise the human will need to scan left and right to review the code.  Think about how newspapers organize articles on a page into columns.

data_null__
Jade | Level 19

@CathyVI wrote:

In a sas log where everything seems to look right. When you get an exclamation mark (!) in sas log does that signify an error and should I be concern about my codes.

 

data test2;

set test;

if x=1 then do;

if

! sum( a,b,c,

!d, e)=0 then y=1;

end;

run;


You should have show the log.  Notice that line 44 is displayed multiple times.

 

 Capture.PNG

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
  • 2 replies
  • 2885 views
  • 8 likes
  • 3 in conversation