Setting Time in Auto-Edit

All questions about Control-M jobs definitions
Post Reply
User avatar
rpetersonesq
Nouveau
Nouveau
Posts: 5
Joined: 05 Jan 2009 12:00
Location: Salt Lake City, UT

Setting Time in Auto-Edit

Post by rpetersonesq » 09 Mar 2012 5:50

I'm trying to set a variable to submission time minus 5 minutes. I have it working except for top of the hour through 4 minutes past. This is because I parse %%TIME to HH and MM, then %%MINUS 5 from the MM. Top of the hour returns a negative value plus the HH would need correction. Any suggestions would be appreciated.

User avatar
matom
Nouveau
Nouveau
Posts: 37
Joined: 29 Nov 2006 12:00
Location: Ile de France

Post by matom » 11 May 2012 11:23

One way of doing it with AutoEdit :

%%MonHeureSys
_____________2%%SUBSTR %%TIME 1 4
%%MaskMinutes
_____________0000004444
%%MaskHeures
______________02400
%%HeureInter
_______________%%MonHeureSys %%MINUS 5 (<== 0< minutes to subtract <41)
%%PosDansMaskMin
__________%%SUBSTR %%HeureInter 4 1
%%PosDansMaskMin
__________%%PosDansMaskMin %%PLUS 1
%%DizainePourSoustr
_________%%SUBSTR %%MaskMinutes %%PosDansMaskMin 1
%%HeureInter2
______________%%HeureInter %%MINUS %%DizainePourSoustr.0
%%PosDansMaskHeure
________%%SUBSTR %%HeureInter2 1 1
%%PosDansMaskHeure
________%%PosDansMaskHeure %%PLUS %%PosDansMaskHeure
%%AjouterHeures
____________%%SUBSTR %%MaskHeures %%PosDansMaskHeure 2
%%MonHeureCalculee
_________%%HeureInter2 %%PLUS %%AjouterHeures.00
%%HH
_____________________%%SUBSTR %%MonHeureCalculee 2 2
%%MM
_____________________%%SUBSTR %%MonHeureCalculee 4 2

Regards

Post Reply