%include <head.h>
cat %WORKDIR%/%DATABASE%/%CUBE% || true
if [[ ! -f data ]]
then
$MARSCMD <<@
retrieve,
database=%DATABASE%,
%REQ%,
target=tmp
@
mv tmp data
fi
%include <tail.h>