The routine itself has to return the file handle. But you could use the system variable @USER.RETURN.CODE, or one of the system variables @USER0 through @USER4, or the invoking job's user status area, as ways in which to return the flag you require. You could also return the flag through one of the ...