SAS - 如何知道先前的 PROC SQL 是否修改了数据库 Table?
SAS - How to know if previous PROC SQL modified a Database Table?
使用 PROC SQL 可以连接到数据库(在我的例子中是 Db2)并执行插入、删除等。
如果一个这样的过程不会导致对目标的修改Table,您将在日志中看到这样的注释:
NOTE: No data found/modified.
很明显,SAS 会在每个这样的步骤后检查这一点。
除了动态解析日志之外,我能否在程序执行期间访问此信息?
也许某种自动 Macrovariable/Dataset 存储最后一步的状态?
编辑:我正在使用 Pass Thru SQL 和 EXECUTE-Statements。
检查 automatic macro variables PROC SQL 在远程执行后创建。
SQLXMSG contains descriptive information and the DBMS-specific return
code for the error that is returned by the pass-through facility.
Note: Because the value of the SQLXMSG macro variable can contain
special characters (such as &, %, /, *, and ;), use the %SUPERQ macro
function when printing the following value: %put %superq(sqlxmsg); For
information about the %SUPERQ function, see SAS Macro Language:
Reference.
SQLXRC contains the DBMS-specific return code that is returned by the
pass-through facility.
使用 PROC SQL 可以连接到数据库(在我的例子中是 Db2)并执行插入、删除等。
如果一个这样的过程不会导致对目标的修改Table,您将在日志中看到这样的注释:
NOTE: No data found/modified.
很明显,SAS 会在每个这样的步骤后检查这一点。
除了动态解析日志之外,我能否在程序执行期间访问此信息? 也许某种自动 Macrovariable/Dataset 存储最后一步的状态?
编辑:我正在使用 Pass Thru SQL 和 EXECUTE-Statements。
检查 automatic macro variables PROC SQL 在远程执行后创建。
SQLXMSG contains descriptive information and the DBMS-specific return code for the error that is returned by the pass-through facility.
Note: Because the value of the SQLXMSG macro variable can contain special characters (such as &, %, /, *, and ;), use the %SUPERQ macro function when printing the following value: %put %superq(sqlxmsg); For information about the %SUPERQ function, see SAS Macro Language: Reference.
SQLXRC contains the DBMS-specific return code that is returned by the pass-through facility.