[Swift-commit] r2724 - SwiftApps/pc3

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Mar 21 14:07:58 CDT 2009


Author: lgadelha
Date: 2009-03-21 14:07:57 -0500 (Sat, 21 Mar 2009)
New Revision: 2724

Modified:
   SwiftApps/pc3/pc3.swift
Log:


Modified: SwiftApps/pc3/pc3.swift
===================================================================
--- SwiftApps/pc3/pc3.swift	2009-03-21 14:26:27 UTC (rev 2723)
+++ SwiftApps/pc3/pc3.swift	2009-03-21 19:07:57 UTC (rev 2724)
@@ -1,11 +1,6 @@
 type xmlfile;
 type textfile;
 
-(xmlfile output) ps_load_executable(xmlfile input, string s) {
-  app {
-    ps_load_executable_app @input s @output;
-  }
-}
 
 (xmlfile output) ps_load_executable(xmlfile input, string s) {
   app {
@@ -25,8 +20,7 @@
 }
 
 (boolean output) ps_load_executable_boolean(xmlfile input, string s) {
-  xmlfile xml_out;
-  xml_out = ps_load_executable(input, s);
+  xmlfile xml_out = ps_load_executable(input, s);
   output = extract_boolean(xml_out);
 }
 
@@ -108,12 +102,13 @@
     stop_app;
   }
 }
-
-xmlfile  csv_root_path_input <"CSVRootPathInput.xml">;
+string csv_root_path_input_arg = @arg("csvpath");
+string job_id_arg = @arg("jobid");
+xmlfile csv_root_path_input <single_file_mapper;file=csv_root_path_input_arg>; 
+xmlfile job_id <single_file_mapper;file=job_id_arg>; 
 boolean  is_csv_ready_file_exists_output;
 xmlfile  read_csv_ready_file_output;
 boolean is_match_csv_file_tables_output;
-xmlfile job_id <"JobIDInput.xml">;
 xmlfile create_empty_load_db_output;
 textfile count_entries_output;
 int entries;
@@ -134,7 +129,7 @@
       split_list_output[i] = extract_entry(read_csv_ready_file_output, i);
     }    
     
-    foreach i in entries_seq {
+    iterate i {
       
       boolean is_exists_csv_file_output;
       xmlfile read_csv_file_column_names_output;
@@ -144,9 +139,9 @@
       boolean is_match_table_row_count_output;
       boolean is_match_table_column_ranges_output;
      
-      is_exists_csv_file_output = is_exists_csv_file(split_list_output[i]);
+      is_exists_csv_file_output = is_exists_csv_file(split_list_output[i+1]);
       if(is_exists_csv_file_output) {
-	read_csv_file_column_names_output = read_csv_file_column_names(split_list_output[i]);
+	read_csv_file_column_names_output = read_csv_file_column_names(split_list_output[i+1]);
 	is_match_csv_file_column_names_output = is_match_csv_file_column_names(read_csv_file_column_names_output);
 	if(is_match_csv_file_column_names_output) {
 	  load_csv_file_into_table_output = load_csv_file_into_table(create_empty_load_db_output, read_csv_file_column_names_output);
@@ -179,7 +174,7 @@
       else {
 	stop();
       }
-    }
+    } until ((i + 2) > entries);
     compact_database(create_empty_load_db_output);
   }
   else {




More information about the Swift-commit mailing list