Turnover and External Procedures is twisting my melon, Man!

Submitted by NickLitten on Thu, 02/16/2012 - 14:43
every rhino expects a soft landing

I've been having 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.... doesnt. I'm still none the wiser. Grrrrr

external stored procedure definition in TurnoverSo 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.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Some Bloke

Projex dot com is the cyber home of Nick Litten an AS400 IBMi developer, RPG programmer, SOA code enthusiast, website tinkerer, information technology evangelist, early adopter, proponent of open source and hopeless technology addict...

Nick Litten looking dazed while refactoring some RPG2 code to kick it into this century

Born and raised in Rainy England, now enjoying programming in the sunshine of Southern USA. Founder of SOFTWARE PROJEX.

Clustermap

Locations of visitors to this page

glqxz9283 sfy39587stf02 mnesdcuix8
sfy39587stf03
sfy39587stf04