(ATCScript "Scenario, Location, Constituent List" (Arg "ReportFilename" "*.txt" "") (LoadLibrary "ATCScriptData") (LoadLibrary "ATCScriptFile") (LoadLibrary "ATCScriptGrid") (LoadLibrary "ATCScriptHspf") (Set Scenarios (DataAttrVals "SCENARIO")) (Set Locations (DataAttrVals "LOCATION")) (Set Constituents (DataAttrVals "CONSTITUENT")) (Set Rows (Len Scenarios)) (If (> (Len Locations) Rows) (Set Rows (Len Locations))) (If (> (Len Constituents) Rows) (Set Rows (Len Constituents))) (Grid "SLC" 3 Rows) (Grid 1 1 "Scenarios") (Grid 2 1 "Locations") (Grid 3 1 "Constituents") (Set CurCol 1) (For SLC in (Array Scenarios Locations Constituents) (Set CurRow 1) (For Value in SLC (Grid CurCol (++ CurRow) Value) ) (++ CurCol) ) (Set CurRow (+ Rows 2)) (Grid 1 CurRow "Selected Datasets") (For Data in DataSelected (++ CurRow) (Grid 1 CurRow (DataTser Data "Attrib" "SCENARIO")) (Grid 2 CurRow (DataTser Data "Attrib" "LOCATION")) (Grid 3 CurRow (DataTser Data "Attrib" "CONSTITUENT")) ) (SaveFile (+ OutputDir ReportFilename) (Grid "AsString" (Chr 9))) )