.st0{fill:#FFFFFF;}

Using EXTPRC with iSeries Turnover at V5R4 

 July 25, 2017

By  NickLitten

Question: How do I promote External Procedure using Turnover and get them to automatically *REPLACE on the destination machine?

Answer: Like this!

The problem here, is that SQL Stored Procedures have no equivalent of *REPLACE on the CREATE PROCEDURE statement (they do in IBMi 6.1+). That’s easy – “just add a Drop to line one of the SQL source code” I hear you say… Well its not that easy in Turnover either. Adding a DROP to the SQL, while using IBMi V5R4 issues a Severity 20 warning message and unfortunately a SEV(20) causes the Turnover SQL Promotion to *FAIL. Aaaarrrgh!

But wait… help is at hand. We just need to over-ride the default SQL *EXTPRC command to only fail if the severity breaches 20. How about we set it at 25? Luckily thats easy to do:

1 – Set 25 Default

Setup Turnover to over-ride the default severity on the TRUNSQLSTM command (this is the command that Turnover runs to create stored procedures during promotions).

So, launch Turnover and goto – DEV | ADMIN | Type Codes and select EXTPRC.

Using EXTPRC with iSeries Turnover at V5R4 1

Note that you need to add the EXTRADFT(‘ERRLVL(25)’) to this command.

2 – Use this DROP and CREATE in your Procedures

For every SQL Source member that is being promoted using Turnover make sure you DROP first then CREATE :

extprc

and Tada!!!! it work just lovely.

/insert grin!

NickLitten


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"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

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

>