apart replying to a 1 year old thread...
did You test the solution You are providing under TSO ?
it is annoying when there is a flow of posts along the lines of ...
i tried to use the snippet You posted but it does not work
furthermore the TS ( Topic Starter ) asked about ISPF not LINE MODE.