BookmarkSubscribeRSS Feed
KB131619
Calcite | Level 5
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         Data Crabs;
 70         Input C  S  W  WT  SA @@;
 71         Datalines;
 
 NOTE: Invalid data for SA in line 81 32-32.
 RULE:      ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                     
 81         2 3 27.5 3.15 6  4 3 23.4 1.90 O  2 3 27.9 2.80 6  3 3 27.5 3.10 3
 C=4 S=3 W=23.4 WT=1.9 SA=. _ERROR_=1 _N_=38
 NOTE: LOST CARD.
 116        ;
 C=1 S=26.5 W=2.35 WT=0 SA=. _ERROR_=1 _N_=173
 NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
 NOTE: The data set WORK.CRABS has 172 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              668.59k
       OS Memory           20900.00k
       Timestamp           02/12/2025 03:13:23 AM
       Step Count                        75  Switch Count  2
       Page Faults                       0
       Page Reclaims                     122
       Page Swaps                        0
       Voluntary Context Switches        13
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 
 116        ;
 117        Proc Print;
 118        Run;
 
 NOTE: There were 172 observations read from the data set WORK.CRABS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.10 seconds
       user cpu time       0.10 seconds
       system cpu time     0.00 seconds
       memory              1206.71k
       OS Memory           20900.00k
       Timestamp           02/12/2025 03:13:23 AM
       Step Count                        76  Switch Count  0
       Page Faults                       0
       Page Reclaims                     83
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           64
       
 
 119        
 120        
 121        
 122        
 123        
 124        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 134        

 
2 REPLIES 2
Patrick
Opal | Level 21

Patrick_1-1739330770684.png

Your variable SA is numeric but on position 32 there is the letter O

A zero would look like the character on position 47

mkeintz
PROC Star

The NOTE about SA: 

In line 81 (i.e. the 10th line of data following the DATALINES statement), there is invalid data for variable SA in column 32.  SAS has printed out the offending line, preceded by a ruler for identifying column numbers.  It shows the letter capital O in column 32 - an invalid character for the numeric variable SA (maybe you intended it to be a zero).

 

The "LOST CARD" note:

Given your INPUT statement specifies 5 variables, SAS expects there to be a multiple of 5 fields over all the lines of data between DATALINES and the semi-colon trailing your inline data.  But somewhere there are up to 4 extra fields or up to 4 missing fields in the data.  

 

The second note is not due to the cause of the first note in my simulation of your code and data.

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 640 views
  • 0 likes
  • 3 in conversation