converting-diva-lectab

Converts legacy DIVA seek_xxx and Lectab calls to the Give_/Find_ business object API during Divalto migrations.

6|Updated May 11, 2026
One-click install
npx skills add https://github.com/divalto/divalto-ia-devkit --skill converting-diva-lectab-divalto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: converting-diva-lectab
Source: https://github.com/divalto/divalto-ia-devkit/tree/main/plugins/divalto-devkit/skills/converting-diva-lectab
Command: npx skills add https://github.com/divalto/divalto-ia-devkit --skill converting-diva-lectab-divalto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Migrating Divalto DIVA source code requires replacing thousands of legacy ISAM read calls (seek_xxx, Lectab) with the new business object API (Give_xxx, Find_T0nn, Load_gtfdos). Doing this by hand is slow and error-prone, and blind regex conversion breaks code when the target function does not exist in the destination pack or when a seek_ wrapper still survives in the target version. ## Core Features & Use Cases - Validated bulk conversion: Converts seek_xxx and Lectab calls across .dhsp, .dhsf, .dhsi, and .dhsq files, checking each target function against the destination Std pack before converting; unresolved calls stay intact with a ;TODO migration comment. - Three-way seek decision: Uses the compiled .dhop object tree of the target version to decide per call whether to keep a surviving seek_ wrapper, convert it to Give_<ent> (with a ;TODO hooks note), or flag it for manual investigation. - Mask-safe processing: On .dhsf/.dhsi overload masks, transforms only the [diva] block and never touches the frozen [diva_base] standard copy, with fail-safe skipping of malformed tag structures. - Use Case: An integrator migrating a partner's DIVA sources to Harmony X.13 runs the script with --src, --out, --std, and --objets, then reviews the regExResult.txt report grouping all TODOs by type (hooks, Get_Record, migration, key, args) before compiling. ## Quick Start Ask the AI to convert the legacy seek and Lectab read functions in your DIVA source folder to the business object API, providing the destination Std pack path and the compiled .dhop objects tree.

Frequently Asked Questions about converting-diva-lectab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert DIVA seek_xxx and Lectab calls to the new object API?

Run the convert_lectures.py script with --src (source folder), --out (output mirror), --std (destination Std pack), and --objets (compiled .dhop tree of the target version). It converts seek_xxx to Give_xxx and Lectab to Give_T0nn or Find_T0nn, writing only modified files plus a regExResult.txt report.

When does Lectab convert to Give_T0nn versus Find_T0nn?

The third argument decides: a Lectab without an error number becomes Give_T0nn(T0nn, key), which fills the instance without displaying an error. A Lectab with an error number (11nn = 1100 + table number) becomes Find_T0nn(key), which reproduces the automatic error display of the legacy call.

Why does the script refuse to run without the --objets parameter?

The --objets tree of compiled .dhop files is mandatory because seek_ wrappers may survive in the target version. Without that index the tool cannot decide whether to keep or convert each seek_ call, so it exits with code 2 to avoid blind over-conversion.

Does the conversion modify the [diva_base] block in .dhsf or .dhsi masks?

No. On overload masks the engine transforms only the exact [diva] block containing partner-specific code; the [diva_base] frozen standard copy stays byte-identical. Malformed tag structures cause the file to be skipped and listed in the report.

What happens when the target Give_ or Find_ function is missing from the Std pack?

The line is left unchanged and a ;TODO migration comment is appended, with an entry in the report. Locally defined seek_xxx helper functions are never converted or flagged, and commented lines remain untouched.

Can I estimate the migration scope without writing converted files?

Yes, use the --dry-run option. It generates the full regExResult.txt report, including conversions, kept seek_ calls, and TODOs grouped by type with counters, without writing any converted mirror files.