BookmarkSubscribeRSS Feed
helannivas88
Obsidian | Level 7

Hi,

 

Currently sas encoding option has been retrieved from the server setting as latin9. I want to utilise latin1 for one particular SAS job ( either in SAS DI or SAS EG). So before starting the actual code, I have given option encoding = wlatin1 but it throws me a warning message.

SAS option ENCODING is valid only at startup of the SAS System. The SAS option is ignored.

 

How to use different encoding standard for particular one job or session. Please let me know.

7 REPLIES 7
Jagadishkatam
Amethyst | Level 16

The best way to use the encoding option CVP at the time when you create the library as below

 

libname getdata cvp '~path of datasets';
Thanks,
Jag
ChrisNZ
Tourmaline | Level 20

@Jagadishkatam latin1 and latin9 are single-byte character sets.

andreas_lds
Jade | Level 19

@helannivas88 wrote:

Hi,

 

Currently sas encoding option has been retrieved from the server setting as latin9. I want to utilise latin1 for one particular SAS job ( either in SAS DI or SAS EG). So before starting the actual code, I have given option encoding = wlatin1 but it throws me a warning message.

SAS option ENCODING is valid only at startup of the SAS System. The SAS option is ignored.

 

How to use different encoding standard for particular one job or session. Please let me know.


Sorry, but changing the sessions' encoding is only possible by using the option in a config-file, when using EG or DI-Studio, meaning that you can't use code executed in a client to change the encoding of the already running session.

ChrisNZ
Tourmaline | Level 20

You can't change the encoding after the session is started, but you can use libname options INENCODING= and OUTENCODING= and dataset option ENCODING=. 

I don't know if DI allows setting SAS session startup parameters.

[Edited for typo. Sorry]

 

Ksharp
Super User
Try :

data want(encoding='any');
set have;
run;
helannivas88
Obsidian | Level 7

No...( encoding=any ) did not help either.

Tom
Super User Tom
Super User

@helannivas88 wrote:

Hi,

 

Currently sas encoding option has been retrieved from the server setting as latin9. I want to utilise latin1 for one particular SAS job ( either in SAS DI or SAS EG). So before starting the actual code, I have given option encoding = wlatin1 but it throws me a warning message.

SAS option ENCODING is valid only at startup of the SAS System. The SAS option is ignored.

 

How to use different encoding standard for particular one job or session. Please let me know.


Do you really need to change the session encoding for that?  Why not just change the encoding used for the files you are reading/writing?

Are there some specific characters that SAS cannot transcode between the two that is appearing in your data?

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 7 replies
  • 960 views
  • 2 likes
  • 6 in conversation