Welcome to ROCTalk

Welcome to ROCTalk! We’ve designed this area of our website to communicate better with our customers, and those of you who are just taking a look. If you have comments or suggestions for future installments or would like more information about a blog that you've read, please let us know

Using ROC Maestro's Parameter Substitutions for Date Expressions

Maestro for Open Systems job scheduler has the ability to do parameter substitution. A particular parameter can be placed in multiple jobs/tasks and the value updated in one place which will then propagate to all of the jobs that contain that parameter. One great feature of parameters is Date Expressions. Date Expressions allow the script to automatically enter the correct date to which it was set up for without ever having the need to update the date. One such example would be the need with month end reports. Since the end of a month could be the last work day of the month, such as the 28th, 29th, 30th or 31st, it is great to have a way to automatically insert the date. You can accomplish this by using the following Date Expression:

?($?($TODAY PIC MM/01/YYYY) < 1 DAY PIC MM/DD/YYYY)

If a script is doing database queries and requires a date to be entered, you can use Date Expressions in place of having to enter an actual date.

Another common Date Expression needed is end of year. That can be done with the next Date Expression.

?($?($TODAY PIC 01/01/YYYY) < 1 DAY PIC MM/DD/YYYY)

As you can see, Date Expressions can be very handy in filling in dates that change often based on current date. Date Expressions allow several different formats to be returned such as MM/DD/YY, MMDDYYYY, DD-MM-YYYY, and many others.

Bookmark and Share Friday October. 09, 2009
<<   <   >   >>