The script I run is to count all the rows of the table.
SELECT COUNT(*) FROM TABLE_NAME_HERE;
This works fine, however, it returns an SQL Code of 100.
The result is 303 (the correct amount of rows on the table). It is only after the commit which is enabled on the SPUFI settings does it return an SQL Code of 0.
---------+---------+---------+---------+---------+---------+---------+---------+
303
DSNE610I NUMBER OF ROWS DISPLAYED IS 1
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100
---------+---------+---------+---------+---------+---------+---------+---------+
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE617I COMMIT PERFORMED, SQLCODE IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1
DSNE621I NUMBER OF INPUT RECORDS READ IS 1
DSNE622I NUMBER OF OUTPUT RECORDS WRITTEN IS 17
******************************** Bottom of Data ********************************
Does anyone know why this is? When this runs in a COBOL program it always returns +100 which is NOT-FOUND.