Turnover Pre-Run and Post-Run Promotion Form Commands

IBM i

Jun 02

Turnover Pre-Run and Post-Run

When we are promoting changed objects, using Soflanding TURNOVER, we sometimes want to run commands before or after the form runs. These pre-run and post-run commands are easy to add to any form, so lets look at how to do it!

How do we add a Pre-Run or Post-Run in TURNOVER?

In TURNOVER for Window – you can view your form details and will notice that the option for overview, objects, command and settings are on the tabs below the form main screen:

Pre-Run or Post-Run in TURNOVER?

As that is so obvious, it makes it almost too easy to use, lets look at the green screen version.

To be honest, this is where most of us propeller heads configure our change management promotions in TURNOVER right?

Don’t let the fact that my green screen is actually white put you off. I simply prefer the light background with black text, when I’m in terminal mode. #greenscreensmatter

Me. Feeling flippant.

How do we add a Pre-Run or Post-Run in terminal (green screen) mode?

Edit the form and use either 11=PreRunCmd or 12=PostRunCmd to add our commands:

Turnover Pre-Run and Post-Run Promotion Form Commands 1
Turnover Pre-Run and Post-Run Promotion Form Commands 2

Error handling for pre-run and post-run commands

When you add a PRERUN command you can specificy what to do if the command fails – for example, if it fails do you want to ditch execution of the form or continue?

C Cancel the form if the command ends in error. If command type is Pre-Run, then this option will cause the form to recover if the command ends in error (same as R option). If command type is Post-run and ‘When to Execute’ is *POSTLINE, this option will also cause the form to recover if the command ends in error (same as R option). If the command type is Post-Run and when to execute is *POSTFORM, this option will not cause the form to
recover (use R to do this), but will stop the form from processing subsequent commands, and cause the form to run with warnings.

G Continue running the form even if an error occurs while processing either the pre- or post-run command. Errors will cause the form to run with warnings.

R Recover the form if the command ends in error.

Note:  You can customize the default value of this field using
the TSETPPCDFT command.                                       

Follow

About the Author

IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd 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 in the words of the most interesting man in the world: Stay thirsty my friend.

>