Toad World® Forums

TOAD for DB2 z/os - Disabled 'Compile SQL Procedure...'

Hi,
I have downloaded trial TOAD for db2 z ver. 5.5 and now is trying to understand how to work with functions and procedures.
I connected to existing database in DB2 for z, choosed a proper procedure in objects tree, double clicked on it and edited body.

What should I do to compile altered procedure?

I can't found a button for it and the context menu item 'Compile SQL Procedure...' is disabled.
See the picture.

Once you have the alter dialog up and alter the procedure you may click the 'show script' button (on that dialog) to show the generated script which will apply your changes. (see image)

You don't need to compile \ compile with debug 'Native SQL' procedures - that is why those actions are disabled.

If you select an 'External SQL' procedure, you will see that those actions are enabled.

Yes, i saw the button ‘Show Script’ but in the window, which shows the script also there is no button for run the script, only ‘Send to Editor’. After i push it, the script indeed is sent to Editor window, but also isn’t applied.

Is it correct that a user after every change made to a procedure should, first - push the button ‘Show Script’, second - push the button ‘Send to Editor’ and, third - run the script in the editor? It’s too long way.

Why there is no just a button ‘Compile’ or ‘Apply changes to DB’ ??

OK - I understand your question now a bit better. Thanks for the details.

When Toad generates a script that processes your alteration changes and that script results in a DROP and then a CREATE of that object (because your alterations could not be made with a simple native ALTER) we will force the user to execute that script in the SQL editor because the SQL editor has good restartability and there is an option to generate #SYNC statements in scripts that also assists in restarting any script that fails.The image below shows the option to generate #SYNC statements.