I have an idea but have not tested this.
You set a local variable in the job as %%MYDATE=%%$ODATE.
So the first run will have today's date.
In the On/Do of the job, when Ended OK, do a Set var statement so:
%%MYDATE=%%CALCDATE %%MYDATE +1
(not sure about the exact syntax of the %%CALCDATE, read about it in the help)
So 2nd run will have tomorrow's date, and so on.
It worked from first execution
however for second execution it throws an error :
+ echo CTMERRCALCDATE CTMERRMYDATE +1
CTMERRCALCDATE CTMERRMYDATE +1
I tried with %%MYDATE=%%CALCDATE %%DATE +1 in on do it worked for two runs
however again in third run it given 180209
You basically have to use a counter. Unless you reset the variable with the plus 1 each time(Global Variable ??), it will always resolve to the same odate +1.
A quick way to do this (maybe not the cleanest) would be to do something like this based off the runcount.
%%MYDATE=%%$CALCDATE %%$ODATE +%%RUNCOUNT
I tried with %%MYDATE=%%$CALCDATE %%$ODATE +%%RUNCOUNT
First execution was ok gave 20180208
however Second execution was ko gave 20180210 instead of 20180209
because counter is set to two once we run the job with parameter %%MYDATE = %%$ODATE
Not sure why it would have done that.. The RUNCOUNT should be 1 the first time the job executes, so it would be the ODATE +1, second run would be ODATE +2, and so on..
Was it a fresh, newly ordered job you used, or update to a job already in the AJF??
GTS - Merchant Services
TSYS Acquiring Solutions
office (706) 644-0792
This message is for the designated recipient only and may contain privileged, proprietary or otherwise private information. If you have received this message in error, please notify the sender immediately and delete the original message. Any other use of this message by you is prohibited
Here what I am doing
ordering a cyclic job with
Command: echo %%MYDATE
where Local variable MYDATE = %%$ODATE
and in on do
First execution gives 20180208
second execution gives 20180210
requirement is to
for example, client want to catch up 2 months of data load: which uses date parameter to load the data
From December 1st to January 31st.
OK. Try this.
Remove the variable you have in the “On DO” altogether.
Then just add a regular variable as I described previously and order out a new job with just that one variable..
Here’s the only one I set in my test job. (not sure what version you are on, so it may look a little different).
image001.png 4.6 K
it skips today's date
I want today's date as parameter to start with and so on
%%$CALCDATE %%$ODATE +%%RUNCOUNT