RAMP-TS now includes a script function GET_MENU_OPTION_NUMBER.
It searches the label fields on the current 5250 form looking for a menu option by name. If the menu option can be found, an attempt is made to deduce an associated menu option number.
This function is useful in applications where the menu option number associated with an activity varies because it allows a text string that identifies the menu option to be dynamically converted to the associated menu option number.
Seein the RAMP-TS guide.