/* QLI - Quick List Intercept */

address spot
options results


signal on Syntax
signal on failure
options failat 20


parse arg area,lid,iname

'gotoarea'Area
if rc=0 then do
	'MessageList'

	/* Includes all mail with subjects that fit the ISUB */

	'include "#?'iname'#?" to UNREAD NOGUI NOREQ'

	/* Get info for Report File */

	'Getnumselected'
        selected=RESULT

	if selected>0 then selected='spot/addtolist'(lid)
	if selected>0 then 'setflags unread unreplied'

	'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
