For the ABORTJOB part you could use the LISTSPF command which lists the
jobs spoolfiles and returns a warning if none are found. I've got a UDC
which accepts the job name and gives me the spoolfiles. I've included it
whole, but you could extract only the LISTSPF part.
SJ
PARM Progno1=""
IF "!Progno1" <> "" THEN
SETVAR Progno "!Progno1"
ELSE
INPUT NAME=Progno2;PROMPT="Enter a full JOBNAME :";WAIT=30
SETVAR Progno "!Progno2"
ENDIF
LISTSPF O@;SELEQ=[JOBNAME=!Progno]
DELETEVAR Progno
Costas Anastassiades,
Intracom SA
Athens-Greece