application
IBM i Application Services
Query and explore application objects on IBM i using SQL services from QSYS2.
Available Tools
The ibmi CLI is the primary tool for executing application queries. Set SKILL_DIR to this skill's installed location (the directory containing this SKILL.md file):
# SKILL_DIR = directory containing this SKILL.md
# Examples: ./skills/application, ~/.claude/skills/application
ibmi tools --tools "$SKILL_DIR/tools/" --toolset application_default
ibmi tool list_programs --tools "$SKILL_DIR/tools/"
ibmi sql "SELECT * FROM QSYS2.PROGRAM_INFO WHERE PROGRAM_LIBRARY = 'MYLIB' FETCH FIRST 20 ROWS ONLY"
The ibmi-mcp-server also provides execute_sql and describe_sql_object for MCP-connected agents.
Service Selection Guide
Object Discovery
- QSYS2.COMMAND_INFO — CL command metadata (library, processing program, threadsafe)
- QSYS2.PROGRAM_INFO — ILE/OPM program details (language, activation group, size)
- QSYS2.EXIT_PROGRAM_INFO — Registered exit programs by exit point
Data Objects
- QSYS2.DATA_AREA_INFO (view) — Broad data area search across libraries
- QSYS2.DATA_AREA_INFO (table function) — Targeted lookup by name
- QSYS2.DATA_QUEUE_INFO — Data queue status, message counts, configuration
Runtime & Configuration
- QSYS2.ENVIRONMENT_VARIABLE_INFO — System and job environment variables
- QSYS2.WATCH_INFO — Watch/service monitor sessions
- QSYS2.BINDING_DIRECTORY_INFO — Binding directory entries
- QSYS2.BOUND_MODULE_INFO — Modules bound into ILE programs
- QSYS2.BOUND_SRVPGM_INFO — Service programs bound into ILE programs
Data Interchange
- QSYS2.DATA_QUEUE_ENTRIES — Read data queue entries
- QSYS2.USER_SPACE / USER_SPACE_INFO — User space contents and metadata
- QSYS2.USER_INDEX_INFO / USER_INDEX_ENTRIES — User index data
Key Capabilities
Command Discovery
- List commands by library with processing program details
- Check threadsafe and proxy command attributes
- Find validity check programs for commands
Program Analysis
- Inventory programs by library, type (ILE/OPM), and language
- Check activation groups and creation timestamps
- View program sizes for capacity planning
Data Object Inspection
- Read data area values and metadata
- Monitor data queue message counts and configuration
- Browse user spaces and user indexes
Runtime Monitoring
- List active and ended watch sessions
- Check environment variables (system vs job level)
- Review exit program registrations for security auditing
Common Use Cases
1. Library Inventory
List all programs, commands, and data areas in a specific library
2. Data Area Lookup
Retrieve the current value of a specific data area
3. Data Queue Monitoring
Find data queues with the most pending messages
4. Environment Variable Check
List system or job-level environment variables
5. Exit Program Audit
Review registered exit programs for security analysis
6. Program Analysis
Find ILE vs OPM programs and their languages
7. Watch Session Monitoring
Check active watch sessions and their configuration
CL Command Migration
| CL Command | SQL Service |
|---|---|
| DSPCMD | COMMAND_INFO |
| DSPDTAARA | DATA_AREA_INFO (table function) |
| DSPPGM | PROGRAM_INFO |
| WRKREGINF | EXIT_PROGRAM_INFO / EXIT_POINT_INFO |
| WRKENVVAR | ENVIRONMENT_VARIABLE_INFO |
| WRKWCH | WATCH_INFO |
Quick Examples
List commands in a library
SELECT COMMAND_NAME, THREADSAFE, TEXT_DESCRIPTION
FROM QSYS2.COMMAND_INFO
WHERE COMMAND_LIBRARY = 'MYLIB'
ORDER BY COMMAND_NAME;
Get a data area value
SELECT DATA_AREA_NAME, DATA_AREA_VALUE
FROM TABLE(QSYS2.DATA_AREA_INFO('MYDTAARA', '*LIBL'));
Find programs by language
SELECT PROGRAM_NAME, PROGRAM_TYPE, PROGRAM_LANGUAGE, CREATION_TIMESTAMP
FROM QSYS2.PROGRAM_INFO
WHERE PROGRAM_LIBRARY = 'MYLIB'
ORDER BY PROGRAM_NAME;
Data queues with most messages
SELECT DATA_QUEUE_LIBRARY, DATA_QUEUE_NAME, CURRENT_MESSAGES
FROM QSYS2.DATA_QUEUE_INFO
ORDER BY CURRENT_MESSAGES DESC
FETCH FIRST 20 ROWS ONLY;
Pre-built Tools
The tools/application.yaml file provides 8 ready-to-use tools:
| Tool | Description |
|---|---|
list_commands |
CL commands with library and attributes |
list_data_areas |
Data area inventory across libraries |
get_data_area_value |
Targeted data area value lookup |
list_data_queues |
Data queues with message counts |
list_environment_variables |
System and job environment variables |
list_programs |
ILE/OPM programs by library and type |
list_exit_programs |
Registered exit programs |
list_watches |
Watch sessions and status |
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" # Execute
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" --dry-run # Preview SQL
ibmi tools show <tool_name> --tools "$SKILL_DIR/tools/" # View details
Reference Documentation
- Application Services Catalog — All APPLICATION services
- Application Examples — Working SQL examples
- IBM i Services - Application — IBM documentation
More from ajshedivy/ibmi-agent-skills
work-management
Query, monitor, and analyze jobs on IBM i using SQL table functions via the ibmi CLI. Use when user asks about: (1) finding jobs by status, user, subsystem, or type, (2) monitoring active job performance (CPU, I/O, memory), (3) detecting long-running SQL statements, (4) analyzing lock contention, (5) checking job queues, (6) scheduled jobs, (7) job logs, (8) replacing WRKACTJOB, WRKUSRJOB, WRKSBSJOB, WRKSBMJOB commands, or (9) any IBM i work management task.
12system-health
Monitor IBM i system health including CPU, memory, disk, ASPs, system limits, and network status via SQL services. Use when user asks about: (1) CPU utilization or system status, (2) memory pool sizes or page faults, (3) disk capacity or ASP usage, (4) system limits approaching thresholds, (5) TCP/IP connections and network status, (6) system activity overview, (7) replacing WRKSYSSTS, WRKDSKSTS, WRKTCPSTS commands, or (8) any system health monitoring task.
4database-performance
Monitor IBM i database performance including index statistics, maintained temporary indexes (MTIs), database monitors, query supervisor thresholds, and materialized query tables. Use when user asks about: (1) index usage or unused indexes, (2) maintained temporary indexes and whether to create permanent indexes, (3) database monitor configuration, (4) query supervisor thresholds, (5) MQT statistics and refresh status, or (6) tables with high MTI overhead.
3template-skill
Replace with description of the skill and when Claude should use it.
3skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
3ibmi
Core skill for working with IBM i systems via the ibmi CLI and ibmi-mcp-server. Provides text-to-SQL methodology, iterative querying best practices, schema discovery, and SQL validation patterns for Db2 for i. Use as the foundation for ANY IBM i task — install this skill first, then add domain-specific skills (ibmi-database, ibmi-system) as needed.
3