FW JOB TO FIND THE FILE WITH "FILENAME MMYY"

All questions about Control-M jobs definitions
Post Reply
User avatar
master4usrcm
Nouveau
Nouveau
Posts: 12
Joined: 08 Mar 2010 12:00
Location: Bangalore India

FW JOB TO FIND THE FILE WITH "FILENAME MMYY"

Post by master4usrcm » 09 May 2010 7:49

Hello All,

My Filewatcher job has to look for a file with name "filename MMYY" where it has to look for previous month.
Ex: In May it has to look for "filename 0410"

So for this I have used auto edit variables as below.

For Year I have selected as %%YY=%%SUBSTR %%$ODATE 3 2

but how should I extract the month with previous month value.

I cannot use %%MM=%%OMONTH - 1.

Can anyone please help me in this??


Thanks & regards

hipikll

Post by hipikll » 09 May 2010 9:02

I do not know, if i remember clearly, but ...

try to look for the CALCDATE in manual.

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 10 May 2010 9:40

Hi,

Suggestion:

%%MY_VAR=%%$CALCDATE %%$ODATE -%%ODAY
%%MY_YEAR=%%SUBSTR %%MY_VAR 3 2
%%MY_MONTH=%%SUBSTR %%MY_VAR 5 2
%%MY_LAST_MONTH=%%MY_MONTH.%%MY_YEAR
Best regards
Walty

User avatar
master4usrcm
Nouveau
Nouveau
Posts: 12
Joined: 08 Mar 2010 12:00
Location: Bangalore India

Post by master4usrcm » 10 May 2010 12:54

Thanks Walty I appreciate.....

Post Reply