Problem Note 66786: A DS2 program with a LIKE operator produces an "access violation" error or "general error" message
If the DS2 procedure or the runDS2 action runs a DS2 program with a LIKE operator that results in an empty string, the following error messages can occur for SAS® Viya® 3.5:
ERROR: Access violation
ERROR: General error
The code here is an example of what can produce these errors:
proc ds2;
data _null_;
method init();
dcl varchar(100) character set utf8 s;
s='';
if (s like '_a_a%') then put 'TEST FAILED';
end;
enddata;
run;
quit;
The left side of the LIKE operator should be an empty string (''), which requires either a hardcoded literal or a variable with the type of VARCHAR. A fixed-length variable with the type of CHAR does not hold an empty string because of its fixed length, and the length must always be greater than or equal to 1.
Any product that produces PROC DS2 code, such as SAS® Event Stream Processing and SAS® Intelligent Decisioning, can experience this problem.
Click the Hot Fix tab in this note for a link to instructions about accessing and applying the software update.
Operating System and Release Information
SAS System | SAS Viya | Linux for x64 | 3.5 | 2020.0.6 | Viya | Viya |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> Procedures ==> DS2
|
Date Modified: | 2021-09-21 09:18:06 |
Date Created: | 2020-10-15 11:28:48 |