It might be easier to use an "if" condition in your code to avoid looking for the given/missing file...
But is something like this (in tcsh syntax):
if ( ! -e EXPECTED_FILE_NAME ) then
3dcalc -a SOMEFILE_OF_CORRECT_DIMENSIONS -expr '0' -prefix EXPECTED_FILE_NAME
endif
what you would want?
It requires that you 1) know the name of the output file in question ahead of time (which you likely do, from scripting it), and 2) know a file of correct dimensionality to use as a grid for your output (again, which I assume you would).
--pt