Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
  • 1.  SQL Stored Procedures Definition Search

    Posted Fri July 21, 2023 05:27 PM

    How can a set of SQL stored procedure definitions in ACS be searched for a string?  Is there an SQL view or function for that?  



    ------------------------------
    Amy Vozza
    ------------------------------

    #SQL


  • 2.  RE: SQL Stored Procedures Definition Search

    Posted Sat July 22, 2023 08:57 PM
    Edited by Satid Singkorapoom Sat July 22, 2023 09:09 PM

    Dear Amy

    I could not find any such service from the current set of IBM i and DB2 for i Services. I'm fairly certain this can be done programmatically but also suspect it would take a handsome effort to write the code. If Kent is in the mood, he may post a blog of his on this :-)  

    If all these procedures happen to be kept in the same library, I would manually use multiple selection and Generate SQL function to recover the codes of all  procedures of your interest into Run SQL Scripts session (for the procedure that is not obfuscated) and do the simple Ctrl+F. 



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 3.  RE: SQL Stored Procedures Definition Search

    Posted Mon July 24, 2023 07:49 AM

    Satid,

    I think this might encourage more to check them all:  https://ibm-power-systems.ideas.ibm.com/ideas/IBMI-I-3722



    ------------------------------
    Robert Berendt IBMChampion
    ------------------------------



  • 4.  RE: SQL Stored Procedures Definition Search

    Posted Sun July 23, 2023 11:06 AM

    Have you had a look at the SYSPROCS view. It includes the Procedure Definition (i.e. the SQL Skript for SQL Procedures) in the Column ROUTINE_DEFINITION 

    ... so you might be able to search through the column PROCEDURE_DEFINITION (with a like condition) to find what you need.



    ------------------------------
    Birgitta Hauser
    Database and Software Engineer
    Selfemployed - Modernization-Education-Consulting on IBM i
    Kaufering
    +49 170 5269964
    ------------------------------