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 (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at 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.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 629 views
  • 0 likes
  • 2 in conversation