contents

put_pha

Called by:  put_data

Includes:   iscloc.h

External:  repid and out_agency set in read_config .

Input arguments:
Pointer to solution structure.
Array of phase structures.

Calls:  
purge_reading, deprecate_reading, update_reading from this file.
sql_error in oracle_funcs
ORACLE package rn.

Structure members updated:  none.

Return:  0/1 for success/failure.

Written in ORACLE Pro*C this function needs to be precompiled to get C code.

This function inserts ASSOCIATION rows into the ISC database to associate the phases used to locate an event with the solution.  Purged and duplicate readings are not associated.  Purged readings have pref_rd set to rdid so that no link with the event remains.  Duplicate readings have pref_rd set equal to the rdid of a reading that is associated.  STAMAG rows are also inserted into the database for phases that have had them calculated unless the phases have been purged.