- trns = pool_create_container (struct autorecode_trns, pool);
- trns->specs = pool_nalloc (trns->pool, arc->var_cnt, sizeof *trns->specs);
- trns->spec_cnt = arc->var_cnt;
- for (i = 0; i < arc->var_cnt; i++)
+ /* Execute procedure. */
+ input = proc_open (ds);
+ for (; (c = casereader_read (input)) != NULL; case_unref (c))
+ for (i = 0; i < arc->n_specs; i++)
+ {
+ struct arc_spec *spec = &arc->specs[i];
+ int width = spec->width;
+ const union value *value = case_data_idx (c, spec->src_idx);
+ size_t hash = value_hash (value, width, 0);
+ struct arc_item *item;
+
+ item = find_arc_item (spec, value, hash);
+ if ( (item == NULL)
+ &&
+ ( arc->blank_valid
+ || val_type_from_width (spec->width) == VAL_NUMERIC
+ || ! value_is_blank (value, width, dict))
+ )
+ {
+ item = xmalloc (sizeof *item);
+ item->width = width;
+ value_clone (&item->from, value, width);
+ hmap_insert (&spec->items->ht, &item->hmap_node, hash);
+ }
+ }
+ ok = casereader_destroy (input);
+ ok = proc_commit (ds) && ok;
+
+ /* Re-fetch dictionary because it might have changed (if TEMPORARY was in
+ use). */
+ dict = dataset_dict (ds);
+
+ /* Create transformation. */
+ for (i = 0; i < arc->n_specs; i++)