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)
The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
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.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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