/* NNA - Nuke Not All */

address spot
options results

signal on Syntax
signal on failure
options failat 20



parse arg area

yname=getclip('IMP_NAME')

'gotoarea NAME 'area
if rc=0 then do
	'messagelist'

        'excludeflag all'
	'include "~(All|'yname')" TO UNREAD NOGUI NOREQ'

        'getnumselected'
	selected=result

	if selected > 0 then do
		'deletemessage noreq'
		'excludeflag all'
	end

        'excludeflag all'
end

exit selected

syntax:
failure:

signal off failure
signal off syntax

parse source . . . program

program = subword(program,1,words(program)-2)

call 'spot/impmaster/imperror'(program,rc,sigl,sourceline(sigl))

exit

