May 16

0 comments

Turnover and External Procedures are twisting my melon, Man!

By NickLitten

May 16, 2012

changemanagement, external, extproc, procedures, Turnover

Turnover and External Procedures

I’ve been having a problem promoting Stored Procedures today. After an hour of looking at two different Applications defined in Turnover – where one works fine and the other… *cough…. doesn’t.

I’m still none the wiser. Grrrrr

External stored procedure definition in turnover

So this little cheat sheet may come in handy for me (and for you!)

Possible reasons why Turnover can’t delete existing stored procedure

For TurnOver to properly promote your routine’s catalog entries, you must do the following:

  • Create a source member that uses the CREATE PROCEDURE or CREATE FUNCTION statements, to be run with the RUNSQLSTM or TRUNSQLSTM commands.
  • Give your source member the same name as the program that it references.
  • Use the SPECIFIC statement to give the routine’s catalog entries the same name as the source member name.

The *MOVOBJ method is used during archiving of existing catalog entries, during distribution, and during recovery processing, as follows:

  • For archiving and distribution, this method ensures that you have source for the existing catalog entries. It does so by generating SQL DDL source from the existing catalog entries in the archive or distribution library. This provides a safeguard against promoting catalog entries that may have been created without source through iSeries navigator.
  • For archiving, this method also drops the existing catalog entries to allow you to create new entries.
  • For recovery processing, this method ensures that the catalog entries are recreated properly from archived source, or from source that may have been automatically generated for archive.

So – to recap:

  1. Use a source member to define the CREATE PROCEDURE or CREATE FUNCTION statements, and make use of the SPECIFIC statement.
  2. The source member name and the SPECIFIC name should match.
  3. Do not use library names as qualifiers in this source – the TRUNSQLSTM command will set up the *CURLIB correctly.
  4. If you do need to use library names as qualifiers (as is the case with *SRVPGMs), make use of the RPLLIB parameter on the TRUNSQLSTM command and use &LIBRARY instead of the actual library name.
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>