- Home
- Skills
- Data & Databases
- as400 database catalog
as400 database catalog
Explore and document IBM i (AS/400) Db2 database schemas, including physical files, logicals, and field metadata.
$2
Works with the AI Agents you already use
as400 database catalog
Example session with this skill installed
Find all tables in the PRODLIB library related to 'orders' and show the structure of the main header file.
- Read your context and instructions
- Compiled the as400 database catalog
I have searched the PRODLIB library for files related to 'orders' and retrieved the details for the primary header file ORDHDRP.
Database Catalog Analysis: PRODLIB
| File Name | Type | Text Description | Fields |
|---|---|---|---|
ORDHDRP | Physical | Order Header Master | 42 |
ORDDETL | Physical | Order Detail Lines | 35 |
ORDHDRL01 | Logical | Order Header by Date (Key: OHORDT) | 42 |
ORDADRP | Physical | Order Shipping Addresses | 12 |
Structure for ORDHDRP (Order Header Master)
| Field | SQL Name | Type | Length | Dec | Text |
|---|---|---|---|---|---|
OHORD# | ORDER_NUMBER | PACKED | 9 | 0 | Unique Order ID |
OHCUST | CUSTOMER_ID | ZONED | 7 | 0 | Customer Number |
OHORDT | ORDER_DATE | ZONED | 8 | 0 | Date (YYYYMMDD) |
OHSTAT | ORDER_STATUS | CHAR | 1 | 0 | Status Code |
OHTOTL | ORDER_TOTAL | PACKED | 13 | 2 | Total Amount |
Keys: OHORD# (Unique)
Access Paths (Logicals):
ORDHDRL01: Keyed byOHORDT(Descending) for chronological access.ORDHDRL02: Keyed byOHCUST,OHORD#for customer history lookups.
Inferred Relationships:
- Join
ORDHDRPtoORDDETLonOHORD#=ODORD#. - Join
ORDHDRPtoCUSTMASTonOHCUST=CMCUST.
Next steps
- Run
as400_where_usedonORDHDRPto find dependent views. - Query sample data from
ORDHDRPto verifyOHSTATcode values. - Search for
ORDHDRPin source files to identify processing programs.
Connects securely to your tools. The creator never sees your data.
About this skill
Mapping legacy Db2 for i databases is notoriously difficult due to cryptic 10-character names, implicit relationships, and a mix of DDS and SQL definitions. This skill provides a specialized toolset for interrogating the IBM i database catalog to reconstruct data models, locate fields, and trace dependencies.
What it does
- Schema Discovery identifies libraries, owners, and descriptions while honoring system permissions.
- Object Cataloging filters through thousands of physical files, logical files, and views to isolate specific functional areas.
- Deep Inspection retrieves field-level metadata including short names, SQL names, data types, and decimal positioning.
- Dependency Mapping identifies logical files, indexes, and views that depend on a specific table.
- Relationship Inference helps identify join keys in legacy systems where foreign keys are not explicitly declared.
- Routine Auditing lists SQL procedures and functions within a library to understand business logic.
How it works
- Use
as400_table_listwith prefix filters to find physical files related to a specific module like an ERP. - Execute
as400_column_searchto find every instance of a specific field name or description across the library. - Call
as400_file_descandas400_index_listto understand the structure and available access paths for a table. - Run
as400_where_usedto see which views or indexes will be impacted by a schema change.
Frameworks & tools
Specifically built for IBM i (AS/400) environments using Db2 for i. It handles both legacy DDS-defined files and modern SQL DDL objects.
Why this beats prompting it yourself
Standard LLMs struggle with the distinction between Physical Files (PF) and Logical Files (LF) or the nuances of packed/zoned decimals. This skill uses specialized tools to query the system catalog directly, ensuring you get actual metadata rather than hallucinations of what an ERP schema might look like.
Use cases
- Documenting an undocumented legacy ERP module for a migration project.
- Finding all tables containing "Customer ID" to ensure data privacy compliance.
- Investigating the impact of a table change on existing database views.
- Identifying join keys between files that lack formal foreign key constraints.
Known limitations
Does not detect program-level usage in RPG or CL; use source discovery tools for that. Large library searches without filters may time out. Requires the as400-mcp-basics prerequisite.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
Requires as400-mcp-basics. Cannot detect RPG/CL program dependencies. Searches on large libraries without prefix filters may time out. Authority restricted by the user profile.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 7 days ago
- Software
- As400 Basics MCP
Permissions
No special permissions declared or detected