Incrementing cycles programmatically

Create a rule procedure that includes a rule to advance the application cycle, if you specified a programmatic cycle type while defining the application in A&AS Explorer.

This rule procedure could be used to process either normal data sources or a special dummy control file generated at the beginning or end of the cycle specifically for the purpose of triggering A&AS to advance the cycle. Or, it could be a dummy rule procedure that contains only a rule to advance the cycle; this rule procedure could be scheduled to run on a certain date or whenever some external conditions are met.

You should set up the process that works best for your production environment. You can use a scheduling program to run the rule procedure at a specified time or run rule procedure manually.

There are several ways to increment a cycle within a rule procedure. For example, you can advance the cycle by a relative increment, or set the cycle to a specific value based on the system date, the version of a report you are processing, or some other date available to the rule procedure. The sample rule below shows an example of advancing the application cycle by one relative increment. (See Planning for Balancing for more information about relative cycle values.)

APPLICATION_CYCLE = APPLICATION_CYCLE(1)

The sample rule below shows an example of advancing the application cycle by two relative increments based on the rule procedure’s current cycle value.

APPLICATION_CYCLE = CURRENT_CYCLE(2)

The sample rule below shows an example of setting the application cycle to the current system date. Whenever you run this rule procedure, the application cycle is incremented to the current system date.

APPLICATION_CYCLE = SYSTEM_DATE

The sample rule below shows an example of setting the application cycle to the date indicated in the report version being processed by the rule procedure. Whenever you run this rule procedure against a report, the application cycle is incremented to the date indicated by the report version.

APPLICATION_CYCLE = REPORT_VERSION