BookmarkSubscribeRSS Feed
ADN
Fluorite | Level 6 ADN
Fluorite | Level 6

I am pulling data from Azure Databricks using JDBC when I get an error as below. It seems to be a transcoding issue. My SAS session is running on LATIN1 encoding. I am using below command to run my programs right now. Any idea how to invoke SAS in UTF-8 mode from command line in Unix.

 

ERROR: Data from column 'Var1' in row 273138 of the result set was not presented in UTF-8 format. The length of this data is 17 
       bytes, and the first 7 characters are 'Castili'. Adding -JREOPTIONS (-Dfile.encoding=UTF-8) to the SAS invocation may 
       circumvent the issue. Otherwise the data should be corrected to UTF-8 format.
NOTE: The DATA step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.

SAS Unix command: 

/opt/sas/sharebi/config/Lev1/Applications/SASGridManagerClientUtility/9.4/sasgsub -gridsubmitpgm data_pull.sas -gridwork /data/team_abc/log -gridwaitnoresults
3 REPLIES 3
Quentin
Super User

Did you try the suggestion from the log to add -JREOPTIONS to the invocation?

 

/opt/sas/sharebi/config/Lev1/Applications/SASGridManagerClientUtility/9.4/sasgsub -gridsubmitpgm data_pull.sas -gridwork /data/team_abc/log -gridwaitnoresults -JREOPTIONS (-Dfile.encoding=UTF-8)
BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
ADN
Fluorite | Level 6 ADN
Fluorite | Level 6
I did. But same error.
Quentin
Super User

The error message is weird.  SAS is saying the data isn't UTF-8.  Generally if SAS recognized the data as being UTF-8, it would at least try to transcode it for you, and you might get some transcoding warnings but it would "work".  You might want to work with SAS tech support on this.  You could try adding -encoding UTF-8 to your invocation.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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