Help using Base SAS procedures

problem with special charachters from excel

Accepted Solution Solved
Reply
Contributor
Posts: 57
Accepted Solution

problem with special charachters from excel

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


Accepted Solutions
Solution
‎11-28-2013 12:05 PM
Super User
Super User
Posts: 6,502

Re: problem with special charachters from excel

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


All Replies
Solution
‎11-28-2013 12:05 PM
Super User
Super User
Posts: 6,502

Re: problem with special charachters from excel

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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