> For the complete documentation index, see [llms.txt](https://docs.flexbase.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexbase.in/flexbase-mcp-ai-prompts/legacy-migration-pb-analysis-prompts.md).

# PowerBuilder Project Analysis Prompts

> Auto-detect PowerBuilder project format (Exported Solution vs Binary Workspace), read source files appropriately, and extract complete migration artifacts.

## How to Use

Point your AI agent at a PowerBuilder project folder. It will auto-detect the format and read source files accordingly.

**Example prompts you can give your AI agent:**

```
Analyze this PowerBuilder project folder for FlexBase migration
```

```
Read this PowerBuilder application and extract all DataWindows, windows, and user objects
```

```
Detect the PowerBuilder format and extract migration data from this folder
```

***

## PowerBuilder Project Formats

PowerBuilder projects exist in two distinct formats:

| Format                | What It Means                                                              | Analysis Depth                                                       |
| --------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| **Exported Solution** | `.pbl` entries are folders with text source files (`.srd`, `.sru`, `.srw`) | Full source analysis — complete extraction                           |
| **Binary Workspace**  | `.pbl` entries are binary files                                            | Limited to config/metadata files — export PBLs for complete analysis |

The agent auto-detects the format and reports it to you before proceeding.

***

## What Gets Extracted

**From Exported Solutions (full analysis):**

* DataWindow definitions → domain entities with attributes and relationships
* Window scripts → features (CRUD operations, navigation)
* User objects → services and utilities
* Menu/RibbonBar → module and feature structure
* Config files → database connection, settings
* Post-COMMIT calls → events and subscribers

**From Binary Workspaces (limited):**

* Library list from `.pbt` → module boundaries
* Config files, RibbonBar XML, theme JSON, README
* Database schema (if DB access available)

***

## Database Access

For complete extraction, provide database access via one of:

* Connection string in the prompt
* Config.ini in the PB app folder (auto-discovered)
* "No database access available" for artifact-only mode

With DB access, the agent performs FK chain analysis to discover all related entities, junction tables, and lookup tables.

***

## Related

* **General migration:** [Legacy Migration → Markdown](/flexbase-mcp-ai-prompts/legacy-migration-prompts-md-file.md)
* **SP extraction:** [Stored Procedure & Trigger Extraction](/flexbase-mcp-ai-prompts/legacy-migration-stored-procedures-prompts.md)
* **JSON generation:** [Legacy Migration → JSON](/flexbase-mcp-ai-prompts/legacy-migration-prompts-json-file.md)
