About IBM i Technical Services
Welcome to the unsung heroics of the IBM i platform - Technical Services. This module dives into the essential tools and utilities that keep your system humming behind the scenes. Whether you're a seasoned RPGLE developer or just getting your feet wet with system administration, understanding these services is key to mastering the IBM i environment.
Module Content
MODULE 5
Welcome to the unsung heroics of the IBM i platform - Technical Services. This module dives into the essential tools and utilities that keep your system humming behind the scenes. Whether you're a seasoned RPGLE developer or just getting your feet wet with system administration, understanding these services is key to mastering the IBM i environment.
How to Restore IBM i Libraries
MEMBERS ONLY
Restoring libraries to entirely different names in the IBM i world might seem straightforward, like using RSTLIB SAVLIB(PRODLIB) RSTLIB(TESTLIB) to create a test environment or clone production. However, this seemingly harmless task can lead to hidden headaches; cross-logical files stubbornly pointing to the original library, SQL temporary objects that fail to restore correctly, and unexpected issues with file triggers, stored procedures, and journals. I’ll walk you through exactly what can go wrong, share real examples with clear diagrams, and most importantly, show you the powerful DFRID(*YES) technique that automatically solves many of these issues. By the end of this short lesson, you’ll know how to avoid those annoying restore surprises and create clean test or recovery environments with much more confidence. Let’s dive in!
Stored Procedures in IBM i
MEMBERS ONLY
An IBM i stored procedure is a user-defined program or routine stored in the IBM i system's database (DB2 for i) that can be called from a client application, another program, or a database interface to perform a specific task or set of operations. It encapsulates business logic or database operations, allowing for modularity, reusability, and improved performance in applications running on the IBM i platform.
To list all stored procedures on IBM i, run this SQL query against the system catalog: SELECT ROUTINESCHEMA AS SCHEMA_NAME, ROUTINENAME AS PROCEDURE_NAME, ORIGIN, PARM_COUNT AS PARAMETER_COUNT, LANGUAGE FROM QSYS2.SYSROUTINES WHERE ROUTINETYPE = 'P' AND ROUTINESCHEMA NOT LIKE 'SYS%' ORDER BY SCHEMA_NAME, PROCEDURE_NAME;
File Triggers
MEMBERS ONLY
Methods to Enable/Disable Triggers Use the Change Physical File Trigger (CHGPFTRG) command or the ALTER TRIGGER SQL statement. Using CHGPFTRG Command; you can enable or disable named triggers or all triggers for a file using the CHGPFTRG command. Using ALTER TRIGGER SQL Statement; you can also disable triggers using the ALTER TRIGGER SQL statement. The third option is using System i Navigator; you can enable or disable triggers.
