How to use IBMi External Procedures in TURNOVER with *LIBL or specific library

  • Home
  • /
  • Blog
  • /
  • How to use IBMi External Procedures in TURNOVER with *LIBL or specific library

May 25, 2013

IBMi External Procedures in TURNOVER

Turnover (the one written by Softlanding that does Change Management, not the one that is full of apple and tastes delicious) is a pretty cool Software Change Management application native to IBMi. But of course, you already knew that.

But, did you know that you can promote an EXTERNAL PROCEDURE to a specific library and then have it invoke its program component from that library, or from any library that you care to define to Turnover or of course from the *LIBL?

It’s all down to these basic rules:

  • &LIBRARY is the variable that TURNOVER will replace with the name of your target library during promotion
  • if you quote the procedure name (ie: ‘program’) then it must have either a hardcoded library (‘QGPL/THING’) or the variable (‘&LIBRARY/THING)
  • If not quotes (ie: EXTERNAL NAME THING) then *LIBL will be used to call the THING program

Example *EXTPRC using &LIBRARY VARIABLE:

CREATE PROCEDURE CHKCASACT

(OUT ACCOUNTNUM9 DEC(9,0),
IN BIRTHDATE DEC(6,0),
IN DRIVERSLIC CHAR(25),
IN DRIVERSLICSTATE CHAR(2),
IN PASSPORTID CHAR(20),
IN OTHERID CHAR(30),
IN RZIPCODE CHAR(15),
IN LASTNAME CHAR(25),
IN FIRSTNAME CHAR(25),
IN RADDRESS1 CHAR(25),
OUT RETURN_CODE CHAR(25),
OUT RETURN_MSG CHAR(100))
DYNAMIC RESULT SETS 2
LANGUAGE RPGLE
SPECIFIC CHKCASACT
NOT DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL
INPUT EXTERNAL NAME ‘&LIBRARY/CHKCASACT’
PARAMETER STYLE GENERAL ;

And of course to change that external name to :

EXTERNAL NAME CHKCASACT

will result in it calling it from the *LIBL

It took me a lot of head scratching to figure it out… and YES…. I know I probably could have just opened a manual and found that out. 🙂

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"}

Start your
7-day free trial

Take This Course with ALL ACCESS

Unlock your Learning Potential with instant access to every course and all new courses as they are released.
 [ For Serious Software Developers only ]

IBM i Training For Technology Experts

New!

Successfully Work Remote 

 $ 129.00  $59.00

By adding new skills in information technology, employers will be confident that you have the necessary skills and tools needed to successfully work remotely

>

Snug CBD

 20% Discount

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