U.S. GEOLOGICAL SURVEY DIGITAL DATA SERIES 37 Data from Selected U.S. Geological Survey National Stream Water-Quality Monitoring Networks (WQN) [This is the \DOCFILES\GSSEARCH.TXT file] A BRIEF TUTORIAL This document describes a search and retrieval exercise using the WQN data. It does not cover all of the features of GSSEARCH, but does show enough so that you can explore the others on your own. Before doing the exercise, you should print a hard copy of this document and the overview (OVERVIEW.TXT) and data description (DATA_DOS.TXT) documentation. Save the hard copies for future reference. The GSSEARCH software runs only on a DOS computer system (including Windows operating systems). If you are using any computer system other than a DOS PC, the GSSEARCH software will not run on your system (unless you have a DOS PC emulator). Please see the DATA_ALL.TXT file. If you have not already done so, run the installation procedure by making the CD-ROM drive the active drive and typing INSTALL followed by the Enter key. Follow the on-screen instructions to complete the installation. Once the installation is complete, start the GSMENU software by typing WQN96 and pressing the Enter key. The purpose of this lesson is to find all the water quality samples taken at stations in Virginia and Maryland that have a drainage basin between 200 and 500 square miles and total hardness greater than 75 and save it to a disk file. Step 1. Make sure that the "Main WQN96 menu" window is displayed. The highlight bar should be on the "(S) Search databases (execute GSSEARCH)" line of the menu. (Select the other options to examine the documentation - particularly the Report which describes the rationale and details of the WQN data set.) To continue with the search and retrieval tutorial, select GSSEARCH either by typing the letter "s" or by scrolling the highlight bar to the "(S) Search databases (execute GSSEARCH)" line using the cursor keys or the mouse and then pressing the Enter key or the left mouse button. You now have your choice of 15 databases to search. Select "(D) WQ data". You will see the GSSEARCH selection window. As you make or change your search criteria, they appear in this window. The main menu bar at the bottom of the window shows the functions available to you. You may use any of three methods to select a function. The first method is to use the mouse, if you have one, to highlight the function you want and then press the left mouse button or the Enter key. The second method is to use the LeftArrow and RightArrow keys to highlight the function you want and then press the Enter key or the left mouse button. The third method is to press the highlighted letter of the function you want and then press the Enter key or the left mouse button. You may switch among the methods at will. Note: At anytime while making selections, you may press the F1 key to view HELP information for the highlighted selection. After pressing the F1 key, use the LeftArrow and RightArrow keys or the mouse to highlight Database help or Program help and then press the Enter key or the left mouse button. At any time, you may return to the previous window by pressing the Escape key or the right mouse button. Step 2. As you have not entered any selection criteria yet, highlight the Add function by using the LeftArrow and RightArrow keys, the letter A key, or the mouse and press the Enter key or the left mouse button. (Normally, the Add key will already be highlighted and you will only need to press Enter or the left mouse button to get started.) You may now scroll through a list of all the indexed fields in the data base using the cursor keys (UpArrow, DownArrow, PageUp, PageDown, Home, and End) or the mouse. You may include any combination of these fields in a search as you will see below. Step 3. Using the cursor keys or the mouse, scroll the highlight bar to the State index and press the Enter key or the left mouse button. A divided window will open. The upper part of this window will contain the search criterion you are working on. The lower part of the window contains a list of the STATE abbreviations and the number of occurrences of each term in this field in the data base. Press the HELP key (F1) and select Database help to display a brief explanation of the STATE index. Press the Escape key or the right mouse button to return to the previous window. Step 4. There are two ways to select the desired STATE abbreviation. The first method is to scroll the highlight bar to the desired STATE using the cursor keys or the mouse and press the Enter key or the left mouse button. Please scroll the highlight bar to the STATE abbreviation VA and press the Enter key or the left mouse button. Notice that the index name (STATE) and the search term (VA) are copied to the selection window. The right hand side of the selection window displays the number of occurrences (4659) of the STATE abbreviation VA. Note that there might be fewer records than this because the same term can occur more than once in the same field in a record. Step 5. The second method is to type the first few letters of the STATE abbreviation and then press the Enter key or the left mouse button. As in Step 2, again select Add (it should already be highlighted) by pressing the Enter key or the left mouse button. Notice that a new window has appeared on the left side of the screen. It contains a list of logical operators (And, Or, and Not). You must select from these operators to connect the search criteria. Because we want stations in either one of the states Virginia or Maryland, select the Or logical operator by moving the highlight bar, if necessary, with the UpArrow and DownArrow keys or the mouse and press the Enter key or the left mouse button. Step 6. As in Step 3, again select the index STATE (it should already be highlighted) by pressing the Enter key or the left mouse button. Now type "m". Notice that the highlight bar moves to the STATE abbreviation MA (for Massachusetts). Now type "d". Notice that the highlight bar moves to the desired state abbreviation MD. Press the Enter key or the left mouse button to select the STATE abbreviation MD and add this search criterion to the selection window. You now have created a search criteria that will look for all the records where STATE="VA" or STATE="MD". At this point, the Selection window contains both the search criteria and their corresponding record counts plus the logical operator. Note: As you add a search criterion to the search set, you must connect it to the previous criteria with a logical operator. The And operator narrows a search, whereas the Or operator widens a search. The Not operator is for excluding record from a search set. The logical operators are used in order in the table from top to bottom. There are no parentheses available; so you must plan ahead for complex searches. Step 7. Now we add the criterion of the drainage area being in the range of 200 to 500 square miles. Again select the Add function. Because we want stations that are both in one of the states and in this range of drainage area, select the logical operator And. Select DRAIN_AREA from the INDEXES list. Highlight - but do not select - the drainage area value of 200.00. (Since this is a long list, typing "200" is the easiest way.) Now press the Tab key. Notice that the value of "200.00" has been centered before the double-headed arrow in the upper part of the window indicating that it has been selected but that this search criterion is not complete. Now highlight "500.00" by typing or scrolling and select it by pressing either the Enter key or the left mouse button. The selection window now has the selection criteria: STATE=VA Or STATE=MD And 200<=DRAIN_AREA<=500. Step 8. Now we add the final criterion that the total hardness (HARDTOT_V) is greater than or equal to 200. Again select the Add function. Because we want stations that satisfy both the earlier criteria and this new criterion, select the logical operator And. This time, select HARDTOT_V from the INDEXES list. Before highlighting any value for the HARDTOT_V criterion, hold down the Alt key and press the greater-than key, ">". (The greater-than key is actually interpreted as the greater-than-or-equal-to operator. Likewise the less-than key is interpreted as the less-than-or-equal-to operator.) (On some Windows systems, the Alt-> and Alt-< do not work; use Alt-g and Alt-l instead.) Notice that the greater- than-or-equal-to sign is placed in the upper part of the window. Now highlight and select the HARDTOT_V value of 75.00. The selection window now has your final selection criteria: STATE=VA Or STATE=MD And 200<=DRAIN_AREA<=500 And HARDTOT_V>=75.00 Notice that the maximum HARDTOT_V of 8300.00 is automatically shown to complete the range on HARDTOT_V. You are ready to run the search. Step 9. Select the Search function on the main menu bar at the bottom of the window. After a short time, the number of records, or "hits" that satisfy the search criteria appears in the lower right corner of the window. For this exercise, the number is 21. You could, at this point, Add additional search criteria and Search the data base again. Step 10. To display the records that satisfied the search criteria, select the Display function on the main menu bar. Notice that it is already highlighted. The list displayed is a summary or "browse" list of the "hits" or records found meeting your selection criteria. It displays only a few of the fields in a record. There are five of these browse formats. You may select any of the browse formats by simply pressing the format number (1 through 5). Step 11. To view the entire record, move the highlight bar to any record and press the Enter key or the left mouse button. You may scroll up and down within a record using the cursor keys (UpArrow, DownArrow, PageUp, PageDown, Home, and End) or the mouse. To view a different record, press the Plus key to display the next record or the Minus key to display the previous record. The menu bar reminds you of the options available. You may press Escape or the right mouse button should you wish to return to the Selection window. Step 12. In addition to displaying the selected records or "hits" on your screen, you may send those records either to your printer or to a disk file by using the Output function. Select the Output function from the menu bar by pressing the F8 key. The first of several menus appears on the right of the screen. Within each of these menus you may select options by any of the three usual mechanisms: scroll the highlight bar with either the cursor keys or the mouse and then select by pressing the Enter key or the left mouse button or, alternatively, by simply pressing the indicated letter key. In any of these menus, selecting "eXit (X)" quits the Output function and returns you to the browse display or full record display you come from. Pressing the Escape key moves you back up one menu. Step 13. To print the 21 "hits" from Step 9, select the following sequence of options: in the RECORD menu, select "All"; in the FORMAT menu, select "Flat ASCII"; and in the DATA FIELDS menu, select "Selected". Now select the eight fields STA_NUM, STA_NAME, DRAIN_AREA, SAMP_DATE, SAMP_TIME, HARDTOT_V, HARDTOT_R, and HARDTOT_M for output by repeatedly pressing the Insert key to turn on the arrow in front of each of these fields. After turning on the arrow in front of all eight, press the Enter key or the left mouse button to accept the selections. You now have the option of excluding or retaining null fields in the output. For example, if there are no comments, the comments field will be empty, or "null". For this tutorial select "Exclude". In the DESTINATION menu, select "Printer" and the printer will print the selected fields for each of the 21 records. If you do not have a printer attached, the SYSTEM MAY LOCK UP and you will have to break out of GSMENU using Control-Break or the Windows Task Manager and start over. Step 14. To save the same information in a disk file, in the DESTINATION menu, select "File" instead of "Printer". At the top of the screen you have the opportunity using the Insert, Delete, Backspace, and cursor keys to modify the name of the file to which the output will be written. Press the Enter key or the left mouse button when you are satisfied with the name of the output file. The selected fields for each of the 21 records will be written to the output file. Select "eXit" to return to the record display. Press Escape or the right mouse button to return to the selection window and the main menu bar. Step 15. To begin a new search, select the Clear function on the main menu bar. Step 16. To exit GSSEARCH and return to GSMENU, select Quit on the main menu bar. You have now completed a tutorial running GSSEARCH using the WQN data base.