Definig Weekday Variable

All questions about Control-M jobs definitions
Post Reply
User avatar
osafr71
Nouveau
Nouveau
Posts: 26
Joined: 21 Jan 2010 12:00

Definig Weekday Variable

Post by osafr71 » 08 Nov 2011 4:36

Hi guys,

Need some help on this. I did search the Forum for something like the one i need but didn't find.

My problem is this:

I need to FTP some files from DHCP servers, and the logs created have this name SERVER1_WEEKDAY.log

Ex: Maximo_Mon.log

Using AFT to do this and using de Autoedit variable %%WDAY or any other it gives always the number.

o=Sunday, 1=Monday, 2=Tuesday

How can i do this ti have thw parameter like the one in Example?

Thanks in advance

osafr71

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

Post by Walty » 10 Nov 2011 8:18

Hi,

Look the '%%LIBMEMSYSM' special AutoEdit variable. It can be used in the AutoEdit Assignment to indicate a text file containing a list of AutoEdit assignments.
This variable enables you to create a central file containing your AutoEdit assignment statements that can be read by many job processing definitions.

See usage in 'CONTROL-M Job Parameter and Variable Reference Guide'

Look this post
Best regards
Walty

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

Post by matom » 10 Nov 2011 11:29

Hi osafr71,

another way:

%%DayList=Sunday0000Monday1111Tuesday222Wednesday3Thursday44Friday5555Saturday66
%%WDayPlus1=%%WDAY %%PLUS 1
%%Position=%%WDay1.0 %%MINUS 9
%%WeekDay=%%SUBSTR %%DayList %%Position 3


Regards

Post Reply