Seems there is a limit to the string size that can be passed in a SAS variable and/or SAS macro variable. ERROR: CLI describe error: [IBM][CLI Driver][DB2/AIX64] SQL0101N The statement was not processed because a limit such as a memory limit, an SQL limit, or a database limit was reached. SQLSTATE=54001 To resolve this is the only solution to create a sastemp? Are there alternative ways? The string criteria limiting the data is a combination of two variables and is huge . Sample : g p 297 A 297 B 462 CA 462 CB 462 CS 462 CT 462 EA 462 EB 462 ES 462 ET 635 JC 635 JD 635 JK 635 JL 1987 AA 1987 AB 1987 BA 1987 BB Sample query: proc sql; connect to db2(database=xxxxx000 &_log_host );/*connect to the database*/ create table temp as select * from connection to db2 ( select a.x, a.y from abc.clm as a where a.open_dt between '2024-01-01' and '2024-12-31' and ( a.g in ('297') and a.p in ('A','B')) or ( a.g in ('462') and a.p in ('CA','CB','CS','CT','EA','EB','ES','ET')) or ( a.g in ('635') and a.p in ('JC','JD','JK','JL')) or ( a.g in ('1987') and a.p in ('AA','AB','BA','BB')) or .... ) with ur); %put &sqlxmsg; disconnect from db2; %put &sqlxmsg; quit;
... View more