SaveDiscardScenarios macro

The SaveDiscardScenarios macro is used to determine the scenarios to be saved or discarded from the Cycle Period. This macro command is executed at the system level.
For executing the macro, the value in the Command field for the macro definition must be specified in this format:
SaveDiscardScenarios(Cycle, [Cycle Period], [Module], [Scenario], [Discard], [Time out])
Note: The optional parameters are specified in [ ].

This table lists the parameters used for the macro:

Parameter Name Description
Cycle The name of the Cycle to which the Cycle Period belongs. The scenarios from this Cycle Period are saved or discarded.
Cycle Period The Cycle Period for which the scenarios are saved or discarded.
Note: 
  • If the value is not specified, the current cycle period is considered.
  • If the value is not specified and Cycle does not have a Cycle Period with Running status, the macro fails and an error message sent to the Audit log.
Module The module for which the scenarios are saved or discarded.
Note: If Null, the applicable scenarios for all modules in the specified Cycle Period are updated.
Scenario The scenarios to be saved or discarded.
Note: If the value is not specified, all the editable scenarios for the specified module and cycle period are updated. If the module is not specified, all editable scenarios for the specified cycle period are updated.
Discard Indicates if the specified scenarios are saved or discarded and set to read-only mode.

Possible values:

  • True - Discarded
  • False - Saved
Note: If the value is not specified, the scenarios are saved.
Time out
The time period (in seconds) you must wait for the cycle period or scenario to become available if currently processing (unavailable).
Note: If the value is not specified, the wait period is indefinite.

This table lists the examples of the SaveDiscardScenarios macro:

Requirement Syntax
Save all scenarios for the currently running cycle period for Normal cycle. SaveDiscardScenarios("Normal","","","","","")
Save all scenarios for the "Normal"-"Mar-13" cycle period. SaveDiscardScenarios("Normal","Mar-13","","","","")
Discard all scenarios for the currently running cycle period for the Normal cycle. SaveDiscardScenarios("Normal","","","","True","")
Discard Demand-Baseline scenario for the currently running cycle period for Normal cycle. SaveDiscardScenarios("Normal","","Demand","Baseline","True","")
Save Demand-Baseline scenario for the currently running cycle period for Normal cycle, with a time out of 600 seconds, if the cycle period or scenario is unavailable at the time of execution. SaveDiscardScenarios("Normal","","Demand","Baseline","False","600")