EIA-176 Query System Readme


1.0  INTRODUCTION TO THE EIA-176 FRONT END QUERY FACILITY

This system provides a method of extracting and using the EIA-176 data, and
saving the query results in various mediums and formats.  There are pre-set 
data extractions available, which allow the user to select and run the most 
often-used queries.

1.1  Hardware Requirements

The minimum hardware requirements are:  

-       An IBM-compatible personal computer (PC) 386SX 16 MHZ with 2 megabytes
        RAM.  (A 486DX 33MHZ with 4 megabytes RAM is recommended).

-       MS-DOS operating system (version 3.x or greater), or compatible, or
        Network operating system capable of emulating MS-DOS.

-       MS-DOS file handles should be set to at least 50 in the CONFIG.SYS.  In 
        Windows NT, this file is called CONFIG.NT.

-       A hard drive with a minimum of 13 megabytes of free disk space (for
        local installation).

-       594 kilobytes if Conventional Memory available.

-       A VGA color monitor

1.2  Installing the EIA-176 Front End Query System

On your PC, create a subdirectory called QUERY.

If downloading from the Internet:

1.      Download the file named 176DAT99.EXE from the EIA web site
        (http://www.eia.gov) to the newly-created QUERY directory on your
        hard drive.

2.      At [drive]:\QUERY prompt, type 176DAT99.  The following files will be
        uncompressed into the QUERY directory:

                README99.TXT
                INSTALL.BAT
                176DAT99.EXE

3.      At [drive]:\QUERY prompt, type "INSTALL" to properly install the
        system on the QUERY directory.  The installation process then loads the
        system on to your hard drive (into this QUERY subdirectory)
        automatically.

If downloading from a diskette:

1.      Insert the EIA-176 QUERY SYSTEM diskette into your floppy drive (drive
        A:\ or B:\), and copy files from a:\ (b:\) to the newly-created QUERY
        directory on your hard drive.

2.      Follow the instructions above (in Steps 2 and 3) to complete the
        installation to your hard drive.

1.3  Initializing the EIA-176 Front End Query System

If using either the Windows 95 or Windows NT operating system:

-       In Windows 95, a CONFIG.SYS file must exist, and it must contain a
	"Files=50" statement (default is usually "Files=20").  In Windows NT,
	use Notepad to edit the CONFIG.NT file, found in the C:\winnt\system32
	directory, and change the "Files=20" line to read "Files=50".

-       To print from the EIA176 Query System, a printer must be captured and
        the Query System must be set to print to that port.

Begin at the DOS prompt.  Change from the root directory to the QUERY directory
(which is loaded on each individual PC's hard drive, as described in section
1.2 above).  Type "176DATA" at the [drive]:\QUERY prompt and press the 
key.  The EIA-176 Query Screen is displayed, as shown below.

  +--------------------------------------------------------------------------+
  |                              EIA Query System                            |
  +--------------------------------------------------------------------------+

                                  EIA 176 Data
                        _________________________________
                                                        
                             EIA 176 Company Filings
                        _________________________________

                                      Exit
                       _________________________________
  +--------------------------------------------------------------------------+
            F1 : Help     _        : Movement    _        ESC : Quit    _     
        ___________________    ___________________    ___________________     
  +--------------------------------------------------------------------------+

2.0  CREATING AND RUNNING A NEW QUERY

Press the  key while the default option ("EIA 176 Data) on the main
screen is highlighted.  The following Query Facility Main Screen is
displayed:

                              EIA176 Query Facility
 File   Edit   Run   View   Options   Window   Help
                                     Fields
     Field                                 Report  Sort   Group  Report
      ID             Field Name           Position Order Summary Summary
     ----- ------------------------------ -------- ----- ------- -------










  _____________________________________________________________________________
                                   Conditions




  _____________________________________________________________________________
 <INS> add field,  edit, <DELDEL> delete,  add calculated field


The following functionality is available on the Query Facility Main Screen:

     Menu                     Appears at the top of the screen and is
                              accessible by pressing the  key together
                              with one of the following, highlighted,
                              characters:  File, Edit, Run, View, Options,
                              Window, Help.

     "Fields" Roster          Window below the menu line where the field(s)
                              selected is(are) displayed.  The "Fields"
                              roster consists of the following six columns:

                    ID                  Field ID that is automatically
                                        assigned by the system.  An ID
                                        starting with "C" indicates that the
                                        field is a calculated field.

                    Name                Field Name

                    Report Position     Report column where the field(s)
                                        will be placed in the output.

                    Sort Order          Used to sort the field's query result
                                        in ascending or descending order.


                    Group Summary       Used to summarize fields based on the
                                        groups created by the sort order.

                    Report Summary      Used to summarize fields at the end of
                                        the report.

     "Conditions"       Roster Window below the "Fields" roster describing the
                        specific query conditions of one or more "Fields"
                        roster fields.

     Status Line        Last line of the main screen that displays additional
                        help information when moving inside either the "
                        Fields" roster or the "Conditions" roster.

2.1  Using the Menu and Shortcut Keys

Menus are accessible by pressing the  key while pressing one of the
highlighted characters (F(ile), E(dit), R(un), O(ptions), V(iew), W(indow) or
H(elp)).  Note that only the File, Edit, and Options menus have options; Run,
View, Window and Help are actually options.

The File Menu, Edit Menu, and Options Menu have options that can be selected
either by using the arrow keys <, , ,> to highlight the desired option
and then pressing the  key or by pressing the shortcut key shown between
the "<>" next to the option text.  Shortcut keys enable the user to skip the
step of first calling the File or Edit menus, highlighting the desired option
and then pressing the  key.  All shortcut keys are described in the
reference section of this guide.

A Help screen is available from any system screen and can be displayed by
pressing the  key.

2.2  Indicating Report Query Criteria

The simplest (and most often-used) type of query to run are the pre-set
queries.  To run a pre-set query, see the following section (2.2.1).
To set up a query manually, see section 2.2.2.

2.2.1  Running a Pre-Set Query

Pre-set queries are queries whose conditions have already been created.  These
queries save the user the trouble of having to set the desired conditions each
time he/she wishes to run the pre-set query.

The following pre-set queries are available:

Sorted by:
        State
        Volumes by sector (sales + transported)
        Prices by sector
        Rankings, by volume, national, and within States
        Type of Company
        Gas activities

        Other:
        Individual company filings
        Full name and address lists: National, sorted alphabetically by state

To run any of the above pre-set queries, press the  + keys to
highlight the "File" on the Query Facility Main Screen.  Move the cursor to
the "Load" option on the File Drop-Down Menu, and press the  key.

A box is displayed which lists the available queries (listed above).

Select the desired query name and press the  key.  The selected canned
query is then run automatically.  Follow the instructions in sections 2.5
("Previewing the Query Result") and 2.6 ("Outputting Query Result") to view
and/or print the generated report.

2.2.2  Manually Creating a Query

This section discusses the user-steps involved to specify various report-
related information for each field shown on the "Fields" roster (the main
portion of the Query Facility Main Screen).  The user may specify, for example,
a field's report position, its sort order, as well as whether tallies are to be
reported at the group and/or total levels.  The user specifies this information
by completing one or more of the four columns to the right of the "Name" column
in the "Fields" roster.

Indicating Report Position (Report Position column):

The user determines whether a field will be included in a report and/or be used
in defining a condition.  To report a field, it is necessary to indicate in
which column the field should be printed.

To indicate a field's value in the "Report Position" column of the "Fields"
roster:

-    For each field, use the arrow keys to position the cursor over the
     "Report Position" column.

-    Type in the report position number (valid numbers are 1 to 9,999).

-    Press the  key.

Sorting Fields to Report (Sort Order Column):

For each field for which a numerical "Report Position" has been identified,
the user can also identify a "Sort Order" (ascending (from A to Z) or
descending (from Z to A)).  If the user wishes to set a "Sort Order" for more
than one field, the "Report Position" value should also be considered by the
user because the "Report Position" is used in combination with the "Sort Order"
to determine the final sort order.

To indicate each field's value in the "Sort Order" column of the "Fields"
roster:

-    For each field, use the arrow keys to position the cursor over the "Sort
     Order" column.

-    Press the  bar key to toggle the sort order between "Asc" and
     "Desc".

                               NOTE

     Data will be reported in the order in which the data were found if no
     "Sort Order" has been established.

Indicating Summaries (Group Summary and Report Summary Columns):

Indicating report summaries enables users to indicate the fields for which
he/she wishes to report tallies at both the group and report-total levels.
Report summaries can be generated for each field for which a "Report Position"
has been identified.  However, a "Group Summary" can be performed only if a
"Sort Order" has been established.

The following summaries are available:

     Count     Counts the number of occurrences (records or detail lines) of a
               field;

     Sum       Produces a sum (for numeric fields only);

     Average   Produces an average (for numeric fields only).

To indicate each field's value in the "Group Summary" and/or "Report Summary"
columns of the "Fields" roster:

-    For each field, use the arrow keys to position the cursor over the "Group
     Summary" and/or "Report Summary" column.

-    Press the  bar to toggle between "Count", "Sum," or "Avg."

                               NOTE

     The  bar key will not toggle to "Sum" or "Avg" if the field is a
     non-numeric field.

2.3 Applying Conditions

Conditions can be specified to select a subset of the forms' database.  An
example of such a condition could be:  Select only forms where Reporting Year
is equal to 1999.

To indicate (add) a condition in the "Conditions" roster:

-    Move to the "Conditions" roster by pressing either the ,  or  key(s).

-    Press  to display the Edit Menu.

-    Highlight the "add condition" option.

-    Press the  key to select the option and display the "Adding
     Conditions" screen.

"Choose a field to compare" line:

Select the field you wish to use in the condition as follows:

-    Press the  key to display a window that lists the fields you selected
     earlier in the "Fields" roster.

-    Use the arrow keys to position the cursor on the field you wish to use in
     the condition ("Reporting Year," for example).

-    Press the  key to select the field and position the cursor on the
     "How to compare the field:" line of the "Adding Conditions" screen.

"How to compare the field:" line:

Select "how" the just-selected field is to be compared.

-    Press the  key to display the "Select how to compare the field"
     window.

-    Highlight the comparison type you wish to use ("IS EQUAL TO," for
     example).

-    Press the  key to select the comparison type.

     (The cursor moves to the "Value to compare the field to:" line of the
     "Adding Conditions" screen.)

"Value to compare the field to" line:

Select the value that will be compared to the field and comparison type you
selected above.

-    Provide a value using one of the following two methods:

     --   Type in a value ("1999," for example), or.

     --   Press the  key to display a window listing from 1 to 10 sample
          values based on real data (use if the format of the value is not
          known).  Select a value from the list, or press the  key to
          leave the window and Type in a value.

-    Accept or cancel the condition as follows:

     --   To accept the specified condition, press the  (Done) key,

     --   To cancel the condition, press the  key.

If  (Done) is selected, a window is displayed asking the user if he/she
wants to "Add another condition? (Yes or No)".

2.4 Running the Query

After selecting the fields, indicating any report options, and specifying any
conditions, the query definition is complete and ready to be executed.  The
query result will consist of data that meets the condition(s) specified by the
user; the report itself is not produced at this point in the procedure.

To execute (run) the query:

-    Press <Alt + R>.

As the query processing proceeds, a window is displayed indicating its
progress.

                               NOTE

     To cancel the query execution, press the  key.

     If the query results in data not being found, a warning message is
     displayed, and, consequently, results can not be previewed (see below).

2.5 Previewing the Query Result

When the query execution ends, a window showing the query results is displayed
that enables the user to review the results before generating the final output.

The user may navigate around the "Query Result" window using the arrow keys
(<,>), , , , and the mouse.

To leave the "Query Result" window and return to the Query Facility Main
Screen, press the  key.  Refer to section 2.9 when outputting the query
result to a printer, screen, or file.

2.6 Outputting Query Result

The query result can be sent to any of the following devices/files:  printer,
screen, text file, DBF file (in Dbase file format), ASCII file and/or a
delimited text file.  The last three options (DBF file (in Dbase file format),
ASCII file and a delimited text file) should be used only when data needs to be
exported to another system or application.

Normally, the query result output is either sent to a printer or a screen, or
placed under your "Files" subdirectory (a special subdirectory based on your ID
and the configuration of the system that called the Query Facility - the
complete path is (Drive):\PERSONAL.QRY\FILES, where (Drive) is usually "C" or
"D").

-    Press  to display the "Query Output Menu" screen.

To send the query result to a printer or to a file:

-    Press the  (Printer) or  (File) key.

     (If the query has not yet been saved and the user wishes to send the
     output result to a printer, screen,  or to a file, the system will display
     the "Enter Report Title" window.)

-    Type in the report title and press  to continue.

To send the query result to the screen in report format:

-    Press the  (View Report) key.

     (The report output will be generated and displayed in a window.  Use the
     general keystrokes to scroll and review the report.)

-    To print the report press , or,

-    To save the report to a text file press .

To send the query result to a text file (Delimited File or ASCII File):

-    Press the  (Delimited File) key or the  (ASCII File) key.

-    Either Type in a file name, or accept the default file name ("temp.txt").

-    Press the  key.

                              NOTE:

     If a query result is saved to a file, it is sent to
     the [drive]:\QUERY\FILES directory.

A query result can be sent to different devices/files without having to execute
the query again.  Just redisplay the "Query Output Menu" and select another
output.

To return to the Query Facility Main Screen, press the  key.

"Freeze Columns":

The "Freeze Columns" feature of the "Query Output Menu" enables the user to
select columns that will always be displayed both on the Query Result browse
window as well as on the report (whether the report is printed or sent to a
text file or screen).  The columns selected are the left-most columns of the
Query Result browse window.  This feature is very useful when a report spans
into sub-pages.  The frozen columns will be displayed on the left side of every
page and sub-page.

To use the "Freeze Columns" feature:

-    Press  and, from the displayed dialog window, enter the number of
     columns to freeze.  A vertical double-line will be displayed after the
     last frozen column.  To unfreeze all columns, type "0" (zero) columns to
     freeze.

Printer Setup (Output Configuration):

When printing to the printer or to a file and changing the default printer
settings (port, name, print type, and orientation):

-    Press the  (Print Setup) key to display the Printer Setup window.

-    Make the desired printer setup change(s) based on the following
     configuration choices (defaults are underlined):

     Port           (LPT1, LPT2, LPT3);
     Printer Name   (Selected from a list of printers available);
     Orientation    (Landscape or Portrait);
     Print Type     (Condensed or 10 pitch).

-    To accept the change(s), press the  key; to cancel the change(s),
     press the  key.

     (Changes will remain in effect only while the "Query Output Menu" is
     displayed.)

                                           NOTE

     The user should use caution when naming files because typing-in a file
     name that already exists will automatically overwrite the contents of the
     already-existing file.  That is, the system does not request confirmation
     before overwriting the file in such cases.

     Printing a report to a printer other than the specific printer that the
     report was configured for will produce unpredictable results.

2.7  Saving Query Definition

This option enables the user to save a just-created or modified query
definition for later use.

To save the query definition:

-    From the Query Facility Main Screen, press  to display the "File
     Menu".

-    Highlight the "Save" (Query) option.

-    Press the  key to display the "Enter Query Description" window.

-    Type in a definition description for the newly-created query, and press
      to save the query definition.

     (A message is displayed while the query is being saved).

2.8 Exiting the Query Facility

To exit the Query Facility, execute the following steps from the Query Facility
Main Screen:

-    Press  to display the "File Menu."

-    Highlight the "Exit" option.

-    Press the  key to exit the Query Facility.

     (The system will always display the "Save query before quitting? (Yes/No)"
     window prior to exiting the Query Facility.)

     --   To save the query definition prior to exiting the Query Facility,
          select "Yes", or

     --   To not save the query definition and exit the Query Facility, select
          "No", or

     --   To not exit the Query Facility, press the  key.

3.0 ADDITIONAL QUERY FACILITY FEATURES

3.1 Loading a Saved Query Definition

To load a previously saved Query Definition:

-    From the Query Facility Main Screen, press  to display the "File
     Menu".

-    Highlight the "Load" (Query) option.

-    Press the  key to load the saved query.

     (If at least one query had been saved earlier, the "Saved Queries List"
     window similar to the window shown below will be displayed.)

-    Highlight the previously saved query that you wish to load.

-    Press the  key to load the query.

     (The system will update the "Fields" roster and the "Conditions" roster
     with the just-loaded query.)

3.2 Erasing a Saved Query Definition

To erase a saved query definition:

-    Display the "Saved Queries List" window using the same steps used to load
     a saved query definition.

-    Highlight the name of the query definition that is to be erased.

-    Press  to erase the selected query.

                              NOTE

     Use precaution when erasing queries, because the system does not request
     user confirmation.

3.3 Creating Variations of a Saved Query and Saving as Another Query Definition

After an existing query definition has been loaded and displayed on the screen,
the user can make changes to the "Fields" roster and "Conditions" roster and
then save the newly-formulated definition using a unique description that
differentiates it from the definition from which it was formed.

After opening and making changes to an existing query definition, save a newly-
formulated definition by following these steps:

-    From the Query Facility Main Screen, press  to display the "File
     Menu."

-    Highlight the "Save As" option.

-    Press the  key to save the new query definition.

-    Type in a new query description and press  to save the new query
     definition.

                               NOTE

     The user may, of course, make changes to an existing query definition and
     "Save" (not "Save As") the newly-formulated definition under the same
     name.  In that event, the contents of the existing file will be
     overwritten with the contents of the newly-formulated definition.

3.4 Changing the Screen Resolution

This feature allows the user to dictate the number of lines that are displayed
on the screen.  The default is 25 lines, but 43 and 50 lines are also
available.

To change the current screen resolution:

-    From the Query Facility Main Screen, press  to display the
     "Options Menu."

-    Highlight the "Zoom" option.

-    Press the  key to display the available resolutions (25, 43, or 50
     lines).

-    Highlight the desired resolution.

-    Press the  key.

3.5 Selecting Database Set

This option allows the user to select database sets with the last 2, 5, or all
years of data. (The total number of years available differs from survey to
survey).

To query only the current and/or previous year, select "Current and Previous
Reporting Years."  As a result, the query result will be generated faster.

The database set currently in use is shown at the top right corner of the
screen.

To select a database set:

-    From the Query Facility Main Screen, press  to display the
     "Options Menu."

-    Highlight the "Database set (2, 5, or all years)" option and press the
      key to display the list of database sets available.

-    Highlight the desired database set.

-    Press the  key to select the highlighted database set.

3.6 Creating Calculated Fields

Calculated fields are fields defined and described by the user that are useful
both in making calculations using other fields.

To create a calculated field:

-    From the Query Facility Main Screen, press the  key to move the
     "Fields" roster if necessary.

-    Press  to display the "Edit Menu".

-    Highlight the "Add Calculated Field" option.

-    Press the  key to display the "Adding Calculated Field" window.
-    Type in a descriptive name for the calculated field and press the 
     key to position the cursor on the "Expression:" line.

-    Press the  key to display the "Select a field" window that lists the
     fields in the "Fields" roster.

-    Highlight the first field you wish to use in the expression ("Marketed
     Production" is one example) and press the  key to select the
     field.

-    Type in the appropriate operator that is to be used in performing the
     calculation ("-" is one example).  Valid operators are:  + (addition or
     concatenation), - (subtraction), * (multiplication), / (division), and **
     (exponential).

-    Press the  key to again display the "Select a Field" window.

-    Highlight the second field you wish to use in the expression ("Natural
     Gas Used on Leases" is one example) and press the  key to select
     the field.

-    Press the  key to position the cursor on the "Size:" line.  The
     size (or field length) must be large enough to hold the calculation
     result.

-    Type in the desired size ("12" is one example) and press the  key.

-    To accept the now-defined calculated field and exit the "Adding
     Calculated Fields" window, press the  key.

                              NOTE:

     For more information on specifying the calculated field expression, press
     the  key to display the on-line Help screen.  Press the  key to
     exit the Help screen.

     Selecting the summaries "Sum" and/or "Avg" for a numeric calculated field
     yields a summary based on the formula and not the results of the formula
     for individual records.  For example, to have an accurate average summary
     of an average, define a calculated field and specify the formula to
     obtain the average.  The system will accumulate all the components of the
     formula and calculate the average summary applying the formula to the
     accumulated values.

3.7 Using Calculated Field on Conditions

Calculated fields are used in conditions the same way any other field is used.
The only difference is that the  "Value Example" feature is not available.
Refer to the "Applying Conditions" section of this guide for a description and
explanation of the  "Value Example" feature.

3.8 Changing the Name and Length of a Field

To change the name and length of a field:

-    From the "Fields" roster, highlight the field you wish to edit and press
     the  key.

     (The "Editing Field" window is displayed identifying the current
     characteristics of the field you selected.)

-    Type in the new field name and/or field length.

-    Press the  key to accept the change(s) or press the  key to
     cancel the change(s).    

                              NOTE:

     For fields that are not calculated, "blanking" the field name line will
     restore the field's original name.

     A calculated field's name and length can be changed using the same steps
     as shown above.

4.0  PRINTING FORM FACSIMILES

From the EIA-176 Query Facility Screen, use the Arrow Keys to highlight the
"EIA-176 Company Filings" option and press the  key.

-    You must initially select an output destination (Screen, Printer, or
     File).

                              NOTES:

     If "Printer" is selected, a box is displayed which allows you to adjust 
     the Printer Name and Port (press the  key to view a list of 
     available printers and ports while highlighting the respective category).

     If "File" is selected, the report is sent to the [drive]:\QUERY\FILES
     directory.

-    Select how you would like the companies to be sorted (By State + Name
     or Name + State).

-    Select a company or companies to include in the report from the list
     that is displayed (tag a company by highlighting it and pressing
     the <+> key).  Press the  key after tagging each selection.

-    The initially-selected report is displayed on the screen.


Back to Top

File last modified: 10/17/2000
ftp://ftp.eia.doe.gov/pub/oil_gas/natural_gas/applications/eia_176_query-system/eia_176_readme.html