       -- Determine how many records are in the time range.
       --
       v_count := get_count_by_date_range (p_chan_id, p_start_time, p_end_time);
-      
+
       --- If there is less data than requested, return raw data.
       --- This includes the case of no data at all.
-      IF v_count < p_reduction_nbr
-      THEN
+      IF v_count < p_reduction_nbr THEN
          l_return_raw_data := 1;
       ELSE
          --
          -- Find out what datatype the channel value is.
          --
-         v_datatype := get_sample_datatype (p_chan_id, v_start_time, p_end_time);
-  
-         IF v_datatype IS NOT NULL
-         THEN
+         v_datatype :=
+            get_sample_datatype (p_chan_id, v_start_time, p_end_time);
+
+         IF v_datatype IS NOT NULL THEN
             l_cursor_width_bucket_2 :=
                REPLACE (l_cursor_width_bucket_2, '<tag>', v_datatype);
          ELSE


   ******************************************************************************/
   FUNCTION get_browser_data (p_chan_id         IN NUMBER,
                             p_start_time      IN TIMESTAMP_UNCONSTRAINED,
                             p_end_time        IN TIMESTAMP_UNCONSTRAINED,
                             p_reduction_nbr   IN NUMBER)
      RETURN SYS_REFCURSOR
   IS
      v_start_time            TIMESTAMP_UNCONSTRAINED;
      v_count                 NUMBER;
      v_datatype              VARCHAR2 (9);
      c_browser_data          SYS_REFCURSOR;
      l_return_raw_data       NUMBER := 0;
      l_cursor_stmt           VARCHAR2 (32767);
      l_cursor_width_bucket_1 VARCHAR2 (400) := 'WITH base_result
        AS (';

      l_cursor_base_query VARCHAR2 (400) := '
       smpl_time,
       severity_id,
       status_id,

                             p_end_time     IN TIMESTAMP_UNCONSTRAINED)
      RETURN BOOLEAN
   IS
      v_sql_stmt     VARCHAR2 (4000);
      l_count        NUMBER (1);
      l_count_text   VARCHAR2 (1000)
         := ' COUNT(channel_id) from chan_arch.array_val where channel_id = :1
       AND smpl_time > :2
       AND smpl_time < :3 AND ROWNUM=1';
   BEGIN
      DBMS_APPLICATION_INFO.
       SET_MODULE (module_name   => 'archive_reader_pkg.is_sample_array',
                   action_name   => 'Determine if sample is a waveform');

      v_sql_stmt :=
         get_parallel_degree (p_start_time, p_end_time) || l_count_text;
