The error "Parameter 'xxxxxx' contains characters that cannot be processed by the SAS server" occurs when you execute a stored process


When you execute a SAS® Stored Process using the SAS® Stored Processes web application, the following error message is displayed:

Stored Process Error

Error returned from stored process.

Critical TK KERNEL error

STP: Parameter 'xxxxxx' contains characters that cannot be processed by the SAS server (wlatin1 encoding).

This error occurs if the SAS® Stored Process Server receives a parameter that contains a character with an invalid encoding. If you receive this error when you run a SAS Stored Process request, follow these steps:

1. Submit the request using the &_DEBUG=TRACE,LOG parameter in the URL for the SAS Stored Process web-application request so that the parameter values that are passed will be displayed.

2. Check the list of input parameters for a value that contains a character that is not displayed properly. For example, you might see a small "square box" instead of a printable character.

3. Modify your input parameters to remove any invalid characters or change the values to UTF-8 encoding. The SAS Stored Process web application uses UTF-8 encoding, so values should also be encoded in UTF-8.

You can use the URLENCODE function to encode a value in UTF-8, as shown in this example:

options urlencoding="UTF8"; data _null_; parm1= urlencode('ääkkö'); /* Encode using UTF-8 */ put parm1; run;
 

In this example, the PARM1= value is represented in UTF-8 as follows:

%C3%A4%C3%A4kk%C3%B6
 

Using that representation, you can specify a URL similar to the following:

http://your.server.name:8080/SASStoredProcess/do?_program=/Teststp/mystp1&parm1=%C3%A4%C3%A4kk%C3%B6
 

In addition, you can specify the UTF-8 encoding in a FILE_WEBOUT statement, as shown in this example:

data _null_; file _webout encoding='utf-8'; parm1= urlencode ('ääkkö'); /* Encode using UTF-8 */ put parm1; run;