Hello, I'm trying to rename a file using a variable in the CPYTOIMPF command. I want to append the current date.
CPYTOIMPF FROMFILE(QTEMP/B1183) +
TOSTMF('tmp/B1183_&DATE.csv') +
MBROPT(*REPLACE) STMFCODPAG(*STDASCII) +
RCDDLM(*CRLF) STRDLM(*NONE) FLDDLM(',')
It's not working and my file name ends up B1183_&DATE.csv. I'm not very familiar with this command.
Does anyone know a workaround?
Thank you so much.
Muskalane
CPYTOIMPF FROMFILE(QTEMP/B1183) +
TOSTMF('tmp/B1183_&DATE.csv') +
MBROPT(*REPLACE) STMFCODPAG(*STDASCII) +
RCDDLM(*CRLF) STRDLM(*NONE) FLDDLM(',')
It's not working and my file name ends up B1183_&DATE.csv. I'm not very familiar with this command.
Does anyone know a workaround?
Thank you so much.
Muskalane