Compile Stored Procedures in Batch

Database
Enthusiast

Compile Stored Procedures in Batch

Version: TD V2R6
Environment: Mainframe

I am trying to find out how to compile Stored Procedure in Batch with just Referencing their Name and without including SP DDL statements. I know how to compile them by including DDL (like below), but what if we have 10 SP, and they need to be recompiled, do we still use their 10 DDL or is there a method to simply use their name and recompile all of them. I have tried using .COMPILE with SP name, but it requires File or DD name with it. I simply need to know Syntax. I search, but could not find it..

One SYSIN contains:
----------------------------
BT;
.COMPILE DD =
;
ET;
SHOW PROCEDURE ;

2nd SYSIN contains:
----------------------------
Create or Replace Stored Procedure
6 REPLIES
Enthusiast

Re: Compile Stored Procedures in Batch

You can recompile an existing procedure by submitting an ALTER PROCEDURE statement.

Example:

ALTER PROCEDURE myprocname COMPILE ;
Enthusiast

Re: Compile Stored Procedures in Batch

Thanks a Bunch, it worked....

Re: Compile Stored Procedures in Batch

Thanks alot.. Alter statement works fine after changing the session to ANSI..

Mini
Enthusiast

Re: Compile Stored Procedures in Batch

for example?

Senior Supporter

Re: Compile Stored Procedures in Batch

If I understand your question correctly the answer would be no:

see Carries comment in 

http://developer.teradata.com/blog/ulrich/2011/11/extract-and-analyse-database-object-dependencies

Enthusiast

Re: Compile Stored Procedures in Batch

plz send me any sp in teradata 

ex : 

1. check obect is exist or not?

2.if exists data will be insert ?

if not exists object/table will created .

after inserts data ?

so plz send me the above senarrio? ans procedure 

thank's

ratnam