I do an HRECALL with the WAIT option and messages suppressed so that I can make sure the file is available (before checking if it exists) before attempting to allocate. That way the user shouldn't be interrupted at all or forced to re-start.
Here's the code I use:
"HRECALL ('"tdsname"') WAIT"
msgrset = MSG(msgstat)
If sysdsn("'"tdsname"'") ¬= 'OK' Then
zerrtp = 'ACTION'
zerrsm = 'ALLOC error'
zerrlm = tdsname 'could not be found'
Unfortunately, I'm not suppressing anything it seems. Here's what I get when I attempt to process an SMS archived file:
ARC0612I VOLUME MOUNT ISSUED FOR RECALL OR RECOVER OF DEVSUP.TESTDBT.TRIB.OUTF
ARC1020I DFSMSHSM IS RECALLING FROM TAPE DSN=DEVSUP.TESTDBT.TRIB.OUTF, PLEASE RETRY
THE USER REQUEST AFTER THE RECALL HAS COMPLETED.