PROCEDURE LIST_A_MONTH (DATE_TO_LOOK_FOR) Local temp, temp_val1, temp_val2, this_range, this_date, selected_month, selected_year, next_month, saved_pce_value; on_error [TPU$_STRNOTFOUND]: eve_bottom; [OTHERWISE]: return; endon_error; this_date := date_to_look_for; ! get the date if not supplied if eve$prompt_string (this_date, temp, "Enter the year and month to list (yymm): ", "Nothing entered -- list cancelled ! ") then this_date := temp; ! extract month and year from date entered selected_month := substr (this_date, 3, 2); selected_year := substr (this_date, 1, 2); temp_val1 := int (selected_month); temp_val1 := temp_val1 + 1; ! zero fill month value if temp_val1 <= 9 then next_month := "0" + str (temp_val1); else next_month := str (temp_val1); endif; ! message (fao ("Month = !AS and !AS ", selected_month, next_month)); ! position to the beginning of the selected month eve_wildcard_find ("\< " + selected_month + "%%%%" + selected_year); eve_select; ! position to end of selected month or end of buffer, whichever applies this_range := search_quietly (" " + next_month, forward, exact); if (this_range = 0) or (length (this_range) = 0) then eve_bottom; else position (this_range); endif; ! eve_print_select; ! copy the selected month's data to another file eve_copy; eve_get_file ("list_a_month.lis"); ! erase the buffer in case list_a_month.lis is not empty saved_pce_value := pce$x_prompt_irrecoverable; pce$x_prompt_irrecoverable := false; pce_erase_to_end_of_buffer; pce$x_prompt_irrecoverable := saved_pce_value; eve_insert_here; ! edit out all date fields except the 1st date position (beginning_of (current_buffer)); this_range := search_quietly (" " + selected_month, forward, exact); ! are there any other date lines ??? if (this_range = 0) or (length (this_range) = 0) then ! no ! position to top of buffer position (beginning_of (current_buffer)); ! display the line count and then exit eve_what_line; update (all); return; endif; cursor_vertical (1); temp_val2 := " " + selected_month; loop ! yes ! kill them all exitif (get_info (temp_val2, "type") = INTEGER); this_range := search_quietly (temp_val2, forward, exact); ! do NOT change the postion of the following 2 exitif lines exitif (get_info (this_range, "type") = INTEGER); exitif ((this_range = 0) or (length (this_range) = 0)); position (this_range); erase_line; endloop; ! position to top of buffer position (beginning_of (current_buffer)); ! display the line count and then exit eve_what_line; update (all); return; endif; ENDPROCEDURE;