What problem does it solve? When adding a custom menu entry to a Divalto ERP domain, the EnrNo field in the g3f.dhfi menu file must be unique to preserve index integrity. Manually picking a number risks collisions with existing entries or with future standard ERP updates. ## Core Features & Use Cases - Free EnrNo Allocation: Scans all M2 records (Ce=2) in g3f.dhfi and returns the first free EnrNo in the requested range, with support for requesting multiple consecutive numbers. - Semantic Range Handling: Distinguishes the standard range (< 100000, reserved for the ERP) from the custom range (>= 100000, recommended for user customizations). - Multi-Structure Trap Protection: Always applies the Ce=2 filter to avoid misreading the M0 header record with M2 offsets (RETEX R-006). - Use Case: Before writing a new M2 menu record for a custom business entity, run the script to obtain a collision-free EnrNo such as 100000 in the custom range. ## Quick Start Ask the assistant to find a free EnrNo in the custom range of the g3f.dhfi file for your ERP module before creating a new menu entry.