# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexbase.in/flexbase-mcp-ai-prompts/legacy-migration-pb-analysis-prompts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
