Code & SQL Text Search

This report performs text string searches across PeopleCode programs (PSPCMTXT), SQL Objects (PSSQLTEXTDEFN), and Application Engine SQL statements (PSAESTMTDEFN).
New to psLens? This page documents one specific report. To see how it runs in the product, what the output looks like, and how teams use it in practice, start with a live walkthrough.
Tailored Operational Context
  • Target Database:
  • Context Type:
  • Alert Severity:
  • Triggered Time:
  • Firing Context:

Code & SQL Text Search Report

Report ID: code-sql-search
Category: Objects / Development

Purpose

The Code & SQL Text Search report performs text searches across PeopleCode, standalone SQL Objects, and Application Engine SQL statements. It returns matched line numbers, surrounding code context, and deep links to psLens detail pages.

Use this report when searching for references to deprecated fields, custom function calls, hardcoded URLs, or specific SQL statements.


Metadata Tables Searched

  1. PSPCMTXT (PeopleCode Source Text): Searches plain-text PeopleCode across Record, Page, Component, Component Interface, App Package, Message, App Engine, and Menu PeopleCode programs. Concatenates multi-row PROGSEQ sequences to compute line numbers and extract 2-line code context.

  2. PSSQLTEXTDEFN (SQL Object Source Text): Searches SQL text for views, standalone SQL objects, App Engine SQL definitions, and App Class SQL statements. Concatenates multi-row SEQNUM rows to return line-level matches.

  3. PSAESTMTDEFN (App Engine SQL Actions): Searches inline SQL action statements embedded directly within Application Engine steps.


Report Output

The generated Markdown output contains:

  • Summary: Total match counts broken down by PeopleCode, SQL Objects, and App Engine SQL.
  • PeopleCode Matches: Program type, record or package name, event or class name, line number, and a syntax-highlighted code block with surrounding context lines and a match indicator (<-- MATCH).
  • SQL Object Matches: SQL ID, line number, code snippet, and deep links to /sqlobjects/{SQLID}.
  • App Engine SQL Matches: Application Engine ID, section, step, line number, code snippet, and deep links to /appengines/{APPLID}.

Parameters

ParameterRequiredTypeDefaultDescription
search_termYesStringThe text string to search for across code and SQL text.
scopeNoStringAllSearch scope: All, PeopleCode, or SQL.
case_sensitiveNoBooleanfalseSet to true to perform exact case-sensitive text matching.
custom_onlyNoBooleanfalseSet to true to filter for items last updated by non-PPLSOFT user IDs.
max_resultsNoInteger200Maximum total matches to return in the report output.

Use Cases

  1. Impact Analysis: Before modifying a record field or function signature, search PSPCMTXT to locate all calling locations.
  2. Hardcoded Reference Audit: Search for hardcoded URL paths, IP addresses, or environment-specific strings in PeopleCode and SQL objects.
  3. Upgrade & Tax Update Triage: Search for modified SQL views or Application Engine SQL statements when evaluating target database releases.