From your file names, I wonder, if your second file might be linked or still being used.
For example if the second file (dt_pp_t) was a summary of the first (dt_pp), closing dt_pp will automaticaly close dt_pp_t and the second close statement might cause an error, and the third statement is not run.
When you run your script, look at the log file (CTRL + Shift + L) to see if there is an error statement; that might help.
You did not state if you were running your script interactively, or scheduled/batch. If a JSL statement results in a prompt when running interactively, when running remote/batch, the script will end.
Just a few ideas on where to look.