Oh this is why you needed to send DUMP output to a file. Had I known would've told you to just do DMP <search> so if you typed in DMP RC-721 it would filter your DUMP for ""RC-721"" -- also when sending to file DUMP * will dump all stacks not jut current one, in case you ever need that. Now to your question ..
The problem is you are dealing with a listbox control where the IM3 record is embedded so you can't do GetValue's and such. Only 1 way I can think of:
1. Have a button that runs script perform logic. It could issue this command:
LIST_BOX READ LB_COSTDETAIL.ctl tmp$
(tmp$ has the whole IM3 record for the row you clicked on)
Then a few more lines to parse tmp$ and send that to a text file or UDT or UDF
2. Have a regular button script (I presume this is not an event script) that can grab the IM3 key from the text file, UDT or wherever.
2 buttons are not ideal I know. You can actually have a single button that has both MS script and perform logic but it will always execute the MS script first then the perform, which is not the order of execution you want here.