Seb,
A function to generate a temp file and erase it after the program execution will be useful for sure.
We name the file with the date because it's necessary in some specific cases. Then we have a script in Linux do clean the files that was created more that 2 days ago.
We also have a function to generate this temporary file name, with the date and user code as follows.
function monta_caminho_temporario(l_nome)
define l_nome string,
l_caminho string,
l_time char(25)
whenever error call erro_cont
let l_time = current year to fraction (5)
if l_nome is null
then
let l_nome = downshift(gg_sis.sissist) clipped, gg_dmp.dmpcod[4,6]
end if
let l_caminho = gg_path.tmp, # /tmp/
l_nome clipped,
l_time[03,04], # Ano
l_time[06,07], # Mês
l_time[09,10], # Dia
l_time[12,13], # Hora
l_time[15,16], # Minuto
l_time[18,19], # Segundo
l_time[21,25], # Fração
gg_usu.usucod using "&&&&&&" # Usuário
return l_caminho
end function