for /f "tokens=1-4 delims=/-\ " %%a in ('date /t') do (
SET mjour=%%a
SET mmois=%%b
SET mannee=%%c
)
SET date=%mjour%%mmois%%mannee%
echo 'hello' > "D:\db2support\dbauditarchive%date%.log" 2>&1
D:\DB2_V9\IBM\SQLLIB\BIN\db2cmd.exe "rexx D:\db2support\dbauditarchive.cmd" > D:\db2support\dbauditarchive%date%.log 2>&1
I am running a REXX program containing DB2 commands. To run this REXX program I created the .bat file as shown above. But my output never gets written to the output(log) file. The file gets created but is blank. The REXX file contains no errors and if I run it through a cmd window the the output shows on the cmd window. Can you see what is my mistake here?