Architecting, installing and maintaining your SAS environment

Change encoding to UTF-8 in SAS 9.3

Reply
Occasional Contributor
Posts: 5

Change encoding to UTF-8 in SAS 9.3

[ Edited ]

Hi All,

 

I intend to change the encoding from Wlatin1 to UTF-8. After a lot investifation , i came across a document that mentioned how same can be achieved:

 

https://support.sas.com/resources/papers/AddingAdditionalSASWorkspaceServerstoSupportMultipleEncodin...

 

As i have a unix environment, i added the "export SAS_COMMAND= $SASROOT/bin/sas_u8" line in the file WorkspaceServer_usermods.sh and restart the spawner. Unfortunately, since then I am unable to connect to the workspace server. Can someone please suggest what might have gone wrong and how i can switch to UTF-8.

PROC Star
Posts: 392

Re: Change encoding to UTF-8 in SAS 9.3

What errors are you seeing in your SAS Object Spawner log file (e.g. /opt/sas93/config/Lev1/ObjectSpawner/Logs/ObjectSpawner_2017-07-11_hostname_NNNN.log)?

 

Does the sas_u8 file exist in your $SASROOT/bin directory? e.g. /opt/sas93/sashome/SASFoundation/9.3/bin/sas_u8

Occasional Contributor
Posts: 5

Re: Change encoding to UTF-8 in SAS 9.3

The error is "Launch of server process failed with unknown status code (1)"

 

sas_u8 file does exist at the specified location.

PROC Star
Posts: 392

Re: Change encoding to UTF-8 in SAS 9.3

It looks like you are missing the unicode SAS launch script (and possibly wider unicode support) from your SAS Foundation installation.  Are you missing the unicode directory too? e.g. /opt/sas93/sashome/SASFoundation/9.3/nls/u8/

Occasional Contributor
Posts: 5

Re: Change encoding to UTF-8 in SAS 9.3

THanks for your response Paul.

 

The unicode directory is available at the location. Could you please suggest where I can find the unicode SAS launch script.

PROC Star
Posts: 392

Re: Change encoding to UTF-8 in SAS 9.3

It should have been created when SAS was installed. Has somebody deleted it? This is the diff between my SAS 9.3 sas_en and my sas_u8:

 

100c100
< SASCFGPATH="!SASROOT/sasv9.cfg, !SASROOT/nls/en/sasv9.cfg, !SASROOT/sasv9_local.cfg, $SASCFGPATH"
---
> SASCFGPATH="!SASROOT/sasv9.cfg, !SASROOT/nls/u8/sasv9.cfg, !SASROOT/sasv9_local.cfg, $SASCFGPATH"
102c102
< SASCFGPATH="!SASROOT/sasv9.cfg, !SASROOT/nls/en/sasv9.cfg, !SASROOT/sasv9_local.cfg"
---
> SASCFGPATH="!SASROOT/sasv9.cfg, !SASROOT/nls/u8/sasv9.cfg, !SASROOT/sasv9_local.cfg"

 

You should be able to use that the recreate a sas_u8 script from the sas_en script (if you don't have one available from a backup). Of course there may also be other things missing in which case I would contact your SAS installer and/or SAS tech support and look into re-installing any missing components.

Occasional Contributor
Posts: 5

Re: Change encoding to UTF-8 in SAS 9.3

[ Edited ]

Hi Paul,

The sas_en and sas_u8 scripts are available in SASROOT/bin. I happen to check the 100 and 102 of both the scripts and it matches with your sas_en and sas_u8 files.

PROC Star
Posts: 392

Re: Change encoding to UTF-8 in SAS 9.3

In that case I would suggest you log on to the server and attempt to run the sas_u8 command line, with all of the parameters as shown in the SAS Object Spawner log, as a user that it fails for, to see if you get any additional details are provided to explain the failure (make sure you omit any -noterminal parameter for an interactive test).

 

If that doesn't highlight the issue then I'd suggest the next course of action would be to contact SAS Technical Support.

Contributor
Posts: 73

Re: Change encoding to UTF-8 in SAS 9.3

Hi @jatin_singla

you can follow the steps here to create symlink to UTF-8 SAS.

http://support.sas.com/kb/51/586.html

Thanks,
AV
Occasional Contributor
Posts: 5

Re: Change encoding to UTF-8 in SAS 9.3

Hi Anand, thank you for your response.
I believe that the method specified in the link will change the encoding for all the workspace servers. I intend to change the encoding of one particular workspace server.
Contributor
Posts: 73

Re: Change encoding to UTF-8 in SAS 9.3

Hi @jatin_singla

Just check there is no space in the declaration:

(As mentioned above by you)
export SAS_COMMAND= $SASROOT/bin/sas_u8

(No space)
export SAS_COMMAND=$SASROOT/bin/sas_u8

If it fails again then I would suggest to see if logging can be enabled for WS Server to get more details.

Thanks,
AV
Ask a Question
Discussion stats
  • 10 replies
  • 244 views
  • 0 likes
  • 3 in conversation