Hi,
Here is an example of what I am trying to do. Can I not access (echo or
print or dump to file) the variables within the "BEGIN ATOMIC" ? I get
the error "SQL0104N An unexpected token "ECHO" was found following "a
= cur.TABLE_NAME "
Constraint : I cannot create new tables or procedures.
BEGIN ATOMIC
DECLARE v_counter INTEGER DEFAULT 0;
DECLARE not_found CONDITION FOR SQLSTATE '02000';
DECLARE a VARCHAR(500);
FOR cur AS SELECT TABLE_NAME FROM SYSIBM.TABLES DO
SET a = cur.TABLE_NAME;
ECHO a; <----- Error
<-------------------------------------------
END FOR;
SET v_counter = (SELECT count(*) FROM SYSIBM.TABLES AS TABLE WHERE
TABLE.TABLE_SCHEMA = 'COMP' );
END
@
Randy