BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dingdang
Fluorite | Level 6

Hi,

i want to use proc import to read an excelsheet into SAS. some fields of this sheet include long texts and speical characters like tab " ' : ; and many others. I tried to eliminate all the special characters but i probably didnt catch all of them and then i saved the sheet in .txt data and read that into SAS. the variables and observations were not correctly identified by SAS and i got error notes like:

NOTE: Invalid data for RTF01_0380_030 in line 10 74-104.

NOTE: Invalid data for RTF01_0390_030 in line 10 106-115.

NOTE: Invalid data for RTF01_0400_030 in line 10 117-122.

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+--- 10

CHAR  der Liquidationsansatz berechnet, um dessen Einhaltung zu validieren.".2.ggf. kurze Erlä     ZONE  667246776667666766767726676666672276266776624666667766277276666667662203066622677762476E   

NUMR  4520C91594149FE31E314A0252538E54C05D045335E059E81C45E70A5061C949525EE2929776E0B52A5052C4     

89  uterung zu 2.4.2.31.12.2012.FALSCH.FALSCH.WAHR.0,1585 141   

ZONE  77677662772323230332332333304445440444544054450323333   

NUMR  54525E70A502E4E2931E12E2012961C338961C3389718290C1585 RTF01_0360_030=der Liquidationsansatz berechnet, um dessen Einhaltung zu validieren."

I dont really know how to understand these error messages. Can someone please explain what the message is trying to tell me and how can i identify the problem fields with them?  Or can someone please share his or her experience reading data with speical characters into SAS? or maybe someone has made similar experience but it wasnt because of the speical characters?

I would be very grateful for that!!

BR Dingdang

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

It is complaining of invalid characters in columns 74-104, 106-115 and 117-122.

First make sure to read the log using a fixed space font so that the ZONE and NUMR rows line up under the CHAR line.

The ZONE and NUMR values combine to make the hexadecimal code for the actual value. The CHAR line shows the characters with unprintable characters displayed as periods.  The characters themselves do not look too bad to me. There a still tab characters ('09'X) at columns 71,73,105,115,123 and more.

It really looks to me like SAS is complaining that you are trying to read text into numeric variables.  So it cannot convert "ggf. kurze Erläuterung zu 2.4.2" into a number.

Sounds like your input statement has gotten out of sync with the data in the file.

NOTE: Invalid data for RTF01_0380_030 in line 10 74-104.

NOTE: Invalid data for RTF01_0390_030 in line 10 106-115.

NOTE: Invalid data for RTF01_0400_030 in line 10 117-122.

RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---

10

CHAR  der Liquidationsansatz berechnet, um dessen Einhaltung zu validieren.".2.ggf. kurze Erlä    

ZONE  667246776667666766767726676666672276266776624666667766277276666667662203066622677762476E 

NUMR  4520C91594149FE31E314A0252538E54C05D045335E059E81C45E70A5061C949525EE2929776E0B52A5052C4   

  89  uterung zu 2.4.2.31.12.2012.FALSCH.FALSCH.WAHR.0,1585 141 

ZONE  77677662772323230332332333304445440444544054450323333 

NUMR  54525E70A502E4E2931E12E2012961C338961C3389718290C1585


RTF01_0360_030=der Liquidationsansatz berechnet, um dessen Einhaltung zu validieren."

View solution in original post

1 REPLY 1
Tom
Super User Tom
Super User

It is complaining of invalid characters in columns 74-104, 106-115 and 117-122.

First make sure to read the log using a fixed space font so that the ZONE and NUMR rows line up under the CHAR line.

The ZONE and NUMR values combine to make the hexadecimal code for the actual value. The CHAR line shows the characters with unprintable characters displayed as periods.  The characters themselves do not look too bad to me. There a still tab characters ('09'X) at columns 71,73,105,115,123 and more.

It really looks to me like SAS is complaining that you are trying to read text into numeric variables.  So it cannot convert "ggf. kurze Erläuterung zu 2.4.2" into a number.

Sounds like your input statement has gotten out of sync with the data in the file.

NOTE: Invalid data for RTF01_0380_030 in line 10 74-104.

NOTE: Invalid data for RTF01_0390_030 in line 10 106-115.

NOTE: Invalid data for RTF01_0400_030 in line 10 117-122.

RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---

10

CHAR  der Liquidationsansatz berechnet, um dessen Einhaltung zu validieren.".2.ggf. kurze Erlä    

ZONE  667246776667666766767726676666672276266776624666667766277276666667662203066622677762476E 

NUMR  4520C91594149FE31E314A0252538E54C05D045335E059E81C45E70A5061C949525EE2929776E0B52A5052C4   

  89  uterung zu 2.4.2.31.12.2012.FALSCH.FALSCH.WAHR.0,1585 141 

ZONE  77677662772323230332332333304445440444544054450323333 

NUMR  54525E70A502E4E2931E12E2012961C338961C3389718290C1585


RTF01_0360_030=der Liquidationsansatz berechnet, um dessen Einhaltung zu validieren."

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 777 views
  • 0 likes
  • 2 in conversation