Turnover and External Procedures are twisting my melon, Man! 

 May 16, 2012

By  NickLitten

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.


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get In Touch

I’m always looking for awesome input, feedback and critique!


Snug CBD

 20% Discount

I have partnered with SNUG CBD givING you Organic CBD
20% discount code "NL20"