First, we will implement the check for the number of stored procedures that there are under the 'DB2AUTH' schema. To do this, we need to look at the SYSCAT.PROCEDURES table, to see how many rows have 'DB2AUTH' in the 'PROCSCHEMA' column.
We need an actionScript to perform this check. While we perform the action, we don't want the user to click any other buttons. So, we set the attribute 'lockScreen' to 'true. To review actionScripts, refer back to '5. actions' of this tutorial.
You will notice that there are four parameters:
This action performs the query, 'SELECT COUNT(*) FROM SYSCAT.PROCEDURES WHERE PROCSCHEMA = 'DB2AUTH'
The action will return true if there are 7 or more rows returned, and false otherwise.