May not the complete answer, but the command should use variables like %delta% & %TIME%. %% notation only works within Control-M. Windows CMD doesnt recognise %%somename. It only knows %somename%.
Can you confirm "VARIABLE_INC_SEC" Control-M System Parameter value set to "SYSTEM" or Default value "LOCAL" ? if not Change it to "SYSTEM"
3 of 3 people found this helpful
OK, now that I'm awake I see your problem. Unfortunately, set variable is designed to work that way:
"Variables are resolved (replaced) at the time a job is submitted. The Set Variable parameter can be used to assign a value to a variable for use in a rerun of the job. When a job is rerun, statements specified in Set Variable are evaluated after statements specified in Variable Assignment."
So, by design the %%TIME variable you set at the end of current run is only resolved after next execution is submitted.
Fortunately, you can use 'Capture from job output' as long as you are displaying current time somewhere in your job. I was able to do this:
1. Output current time from the command/script
2. Capture the current time from output into a local variable
3. Output of the command set in 1st step