When I run a proc in SAS EG, I keep getting the errors
ERROR: CLI prepare error: [Sybase][ODBC Driver][Sybase IQ]Connection was terminated
SQL statement: SELECT "FLG_CUST_TYP", "TXT_CUST_TYP" FROM MIGFCR_SNAPSHOT.CI_CUST_TYPES .
ERROR: PROC SQL runtime error for operation=sqxsrc.
ERROR: An error has occurred.
3 The SAS System 08:39 Wednesday, July 24, 2019
ERROR: CLI close cursor error: [Sybase][ODBC Driver][Sybase IQ]Connection was terminated : [Sybase][ODBC Driver][Sybase
IQ]Connection was terminated
ERROR: CLI close cursor error: [Sybase][ODBC Driver][Sybase IQ]Connection was terminated
If I execute the proc again it runs with no issue. Anyone who has experienced in the past please assist.
Ask your Sybase DBA to check his database logs for evidence of this problem.
By any chance is there any macro code involved?
I ask because there are a number of timing things that can happen with macro code, such as setting a macro variable in the wrong order, that can cause an error the first time (something not defined for example) but runs the second time because it now has the value set (after needed).
A flat out guess might be a macro variable in a connection string.
It usually helps to show the entire Proc or data step that generates an error from the log along with the error messages, not just the error itself. Paste the log or editor entries into a code box opened on the forum with the {I} or "running man" icons to preserve formatting of text as the message windows here will remove white space and sometimes introduce html that makes code not runnable.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.