BookmarkSubscribeRSS Feed
pervamatt
Calcite | Level 5

Hello,

First post... I am a new SAS user, and am trying to connect using ODBC...I can use a LIBNAME statement to connect via ODBC, and I can see the data tables, view the records, etc., however, when I use a DATA statement to pull the data in, it will read all of the data in, and then throw this error:

 

ERROR: CLI cursor extended fetch error: [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0501
- Cursor SQL_CUR0ABB58E0 not open.

 

Any idea what I am perhaps doing wrong or have configured incorrectly? Thank you.

3 REPLIES 3
Reeza
Super User

Are you accessing a table or a view?

Can the view successfully execute on the server side?

pervamatt
Calcite | Level 5
I believe it's a table...? I have accessed it via IBM ShowCase Query many times in the past, but I receive that error when trying to get it via SAS. As an example the code I am using after the LIBNAME statement is this:

DATA TEST;
SET PROD.IDCS;
RUN;

And SAS will read all the records, then throw that error.
pervamatt
Calcite | Level 5

Here is the code I try to execute (password replaced)

 

LIBNAME PROD ODBC USER = 'mperva' PASSWORD = 'XXXXXXX' DATAsrc='Production' SCHEMA = 'OLYDBF';

DATA TEST;
SET PROD.IDCS;
RUN;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2067 views
  • 0 likes
  • 2 in conversation