Initializing Data Source Variables

If you defined a new data source variable file and you did not assign a file location to it when you defined it, you must initialize it before you can refer to it in your rule procedure. Initializing it sets the file path for the data source variable and specifies some additional handling options.

To initialize a data source variable

  1. Add a DATA SOURCE INITIALIZATION command to your rule procedure in the appropriate location.
  2. In the Comment field, enter an optional description or explanation of the data source you are defining.
  3. In the Data Source field, select the name of the data source you want to initialize from the drop-down list.
  4. In the File Pathname field, enter either a parameter value or the complete path to the data source file on your system.
  5. If you want to write to the file path name exactly as specified every time you write values to this file, select the Exact file name option. If you want to have A&AS append a unique identifier to the file name for data written within a given cycle, select the Unique file namefor each cycle option.

    If you want to have A&AS append a unique identifier to the file name for data written in each run of each cycle, select the Unique file name for each cycle and run option.

  6. If you are reading data from a file initialized with the Unique file name for each cycle or the Unique file name for each cycle and run option, then do one of the following:
  • To have A&AS use an absolute cycle value to resolve the file name from which it should read when you reference this data source variable, select the Absolute option in the Cycle field and indicate the appropriate absolute cycle value.
  • To have A&AS use a relative cycle value to resolve the file name from which it should read when you reference this data source variable, select the Relative option in the Cycle field and indicate the appropriate relative cycle value.

If you are only writing to the file and not reading data from the file, or you selected the Exact file name option in step 5 above, you can ignore these fields. Refer to the Writing to and Reading from Data Source Files topic for more information about how these fields are used when reading from data sources. Refer to Planning for Balancing for more information about absolute and relative cycle numbers.

  • If you selected the Relative option and you want to indicate at what level the search to resolve a relative cycle with missing data should be performed, select the GENLEVEL check box. Depending on whether the cycle number should be resolved at the application level, the source level, or the field level, select APPLICATION, SOURCE, or FIELD, respectively. If you do not select the GENLEVEL check box, A&AS resolves the cycle number at the application level by default. Refer to the Planning for Balancing topic for more information about how relative cycle values and the GENLEVEL option work.

  • Click OK.

The data source initialization rule you created appears in the list of RULES displayed in the upper-left pane of the Rule Editor.