+ All Categories
Home > Documents > Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 ·...

Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 ·...

Date post: 27-Aug-2018
Category:
Upload: hamien
View: 216 times
Download: 0 times
Share this document with a friend
51
United States General Accounting Office GAO April 1991 Preparing, Documenting, and Referencing Microcomputer Data Base Applications GAO/IMTEC-11.1.1
Transcript
Page 1: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

United States General Accounting Office

GAO

April 1991

Preparing,Documenting, andReferencingMicrocomputer DataBase Applications

GAO/IMTEC-11.1.1

Page 2: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,
Page 3: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Contents

Chapter 1 Introduction

4Overview of Data Base Software 4When to Use a Data Base Management

Program5

Terms Defined 5

Chapter 2 Planning

7Identifying Data Sources 7Validation Plan 8Data Analysis Plan 8Data Base Design Considerations 9Creating Data Bases 9Referencing and Technical Reviews 12Defining Roles and Responsibilities 12

Chapter 3 Data Validation,Documentation,and Testing ofData Analysis

13Data Validation 13Data Transfer 14Documenting Interactive Work Sessions 15Documentation and Testing of Data Analysis 16

Chapter 4 ProgrammingWith Data BaseSoftware

19Using Programmed Data Entry Screens 19Writing Programs 21Tips for Use With More Complex Programs 22Testing 23

Chapter 5 Referencing

24EIC’s Responsibilities 24Referencer’s Responsibilities 25Technical Reviewer’s Responsibilities 26

Appendixes Introduction to the Appendixes 30Appendix I: Data Base Structure 31Appendix II: Data Base Dictionary 32Appendix III: Analysis Plan Flow Chart 34

GAO/IMTEC-11.1.1Page 1

Page 4: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Contents

Appendix IV: Alternate File of a DbaseInteractive Work Session

36

Appendix V: Process Flow Chart 40Appendix VI: Data Collection and Reporting

System Flow Chart42

Appendix VII: Sample Program 43Appendix VIII: Major Contributors to This

Publication46

Bibliography 47

Abbreviations

EIC evaluator-in-chargeGAO General Accounting OfficeIMTEC Information Management and

Technology DivisionTAG technical assistance group

GAO/IMTEC-11.1.1Page 2

Page 5: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

GAO/IMTEC-11.1.1Page 3

Page 6: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 1

Introduction

This document provides guidelines for the use ofmicrocomputer data base software, and for theplanning, documenting, testing, and referencing ofdata base applications. The examples and illustrationsused throughout this document refer to dBASE1

because of its widespread use in GAO. However,methods discussed usually have counterparts in otherdata base software. This chapter presents

• an overview of data base software,• when to use a data base management program, and• definition of terms.

Overview of DataBase Software

Data base software allows staff to create, use, modify,and access information from multiple data bases. Itenables staff to

• collect data through automated data entry forms andscreen entries for accuracy;

• import existing agency files;• store and analyze large amounts of data;• produce custom reports quickly and easily;• store commands in programs for repeated execution;• produce stand-alone systems for data collection and

analysis; and• speed execution and save disk space (as compared to

spreadsheet processing).

In using data base software, staff should take specialcare to provide an audit trail. Data are notcontinuously visible to the user, and the softwaredoes not automatically provide a record of datachanges and computations. dBASE has two modes ofoperation— interactive or programming—eachrequiring different steps for creating an audit trail.The interactive mode allows a user to issue individual,ad hoc commands intermittently to the software. In

1dBASE and dBASE III Plus are registered trademarks ofAshton-Tate.

GAO/IMTEC-11.1.1Page 4

Page 7: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 1

Introduction

the programming mode, all commands are stored in afile and executed at one time when the program isrun.

When to Use aData BaseManagementProgram

Use data base software’s advanced analysis andreporting capabilities when the data volume exceedswhat a spreadsheet can efficiently handle. The speedand ease with which data can be used depends onrecord length and type and capacity of hardware.

Data base software also allows flexibility in data inputand retrieval. The software can be used to create dataentry screens. For instance, if several hundredrecords need to be entered, it pays to take the time towrite programs setting up data collection screens.These screens can include explanatory text, andprograms may contain edit checks to increase dataaccuracy. (Chapter 3 gives additional information.) Ifdata are collected by different people at various sites,these screens increase data entry consistency. Oncethe data base is complete, the software provides easyand flexible query and reporting capabilities.

Data base software has many built-in analysisfeatures, providing selection and arithmeticcapabilities. More complex analyses can beprogrammed, as well as a complete system for bothdata retrieval and analysis.

Terms Defined Definitions of terms used in this guide are as follows:

Compile: The act of translating a language sourceprogram into an object module or program written inmachine language. Programs written with data basesoftware must be run while the software is in use. Acompiler converts such programs into machine

GAO/IMTEC-11.1.1Page 5

Page 8: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 1

Introduction

executable code so the data base software is nolonger required.

Data base index file: Contains pointers to physicallocations of data base records in a particular sortedorder. Used in conjunction with the data base, theindex “sorts” the data for the user without creating anadditional sorted data base, thus saving disk space.

Data dictionary: Explains in detail the source, format,and meaning of the contents of a data base.

Disk directory: A catalog of all files contained on adisk. This includes the file name, size, and date ofcreation of the file.

Field: A category of information, such as names,cities, birth dates, or salaries.

Flow chart: A diagram showing a process throughpredefined symbols interconnected to indicatesequential individual steps. Explanatory text withinthe symbols clarifies the steps.

Record: A collection of related field entries. Forexample, the name, address, city, state, zip code, andtelephone number for an individual would form arecord.

GAO/IMTEC-11.1.1Page 6

Page 9: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 2

Planning

In planning assignments, audit quality andproductivity can be improved through appropriatecomputer technology. Appendix IX to Chapter 10.1 ofthe Project Manual describes various softwarepackages currently available to GAO staff. Otherpertinent documents are Information Managementand Technology (IMTEC) Division’s TechnicalGuidelines titled, Using Micro Computers in GAOAudits: Improving Quality and Productivity andPreparing,Documenting, and Referencing LotusSpreadsheets. dBASE may be one of several softwarepackages used during an assignment. For example,one may choose dBASE to collect and store data, andSAS2 (a statistical analysis package) for data analysis.This chapter provides guidance for planning the useof data base software, including

• identifying data sources,• developing a validation plan,• formulating a data analysis plan,• data base design considerations,• creating data bases,• planning for referencing and technical reviews, and• defining roles and responsibilities for designing and

using data bases.

Identifying DataSources

Agencies often have established data bases that fulfillaudit objectives. Use such data bases wheneverpossible; verifying their validity is usually cheaperthan developing and maintaining an independent database. If necessary, a dBASE file can be built toaccommodate data from other microcomputersoftware or mainframes.

When external data sources are not available and thestaff must collect data, time should be planned todesign the data base, data dictionary, and any

2SAS and SAS-PC are registered trademarks of the SAS Institute Inc.

GAO/IMTEC-11.1.1Page 7

Page 10: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 2

Planning

programmed collection screens. (See app. I for anexample of a data base structure and app. II for asample data dictionary.) Time must also be factoredin for testing data validity and reliability regardless

of its source.

Validation Plan The analysis plan should provide for validation ofdata.(See Chapter 3 for validation techniques formicrocomputer data bases.) Regardless of the sourceof the data (agency or GAO), a reliability assessmentshould also be performed. (See the GAO audit guide,Assessing the Reliability of Computer-Processed Data(GAO/OP-8.1.3).

Data AnalysisPlan

To guide and focus the assignment and strengthenconclusions, the Project Manual (6.2) encourages thedevelopment of a detailed data analysis planexplaining how information will be gathered andused.

A process flow chart can supplement a written dataanalysis plan. By showing what will be done atvarious points in the process, a flow chart clarifies theanalysis plan for the benefit of other staff members.See appendix III for a sample flow chart.

Both a written plan and a flow chart should explainplanned data bases, indexes, and their interaction.They should also explain what data analysis steps willbe taken and when, as well as the desired reports.This plan should also be included in the workpapers.

The following questions should be used to design theanalysis plan:

• What analyses must be performed?

GAO/IMTEC-11.1.1Page 8

Page 11: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 2

Planning

• Will the data base software perform the plannedanalysis effectively? Perhaps a statistical packagesuch as SAS-PC or SPSS-PC+3 would be moreeffective than dBASE in performing part or all of theanalysis. To determine the most appropriateanalytical software, staff should consult with theirunit’s Design, Methodology, and Technical AssistanceGroup or Technical Assistance Group (TAG).

• What mode of data base processing, interactive orprogramming, best suits the need? (See below foradditional information on this decision.)

• What type of data validation will be done and when?• How will data analysis steps be tested for accuracy?

Who will do it?

Data Base DesignConsiderations

When designing a data base, one should consider thedata, analysis, and planned reports. Specifically:

• What kind of data will be used? What aremaximum values of numbers? How should characterdata (e.g., names) be stored, and what length isnecessary? Will the data fall within known ranges(e.g., 1 through 5)? If using agency data bases, be sureto get data base structures, data dictionaries, andinformation on how the data were collected andchecked.

• How will the data be analyzed and sorted? Whatcalculations will be done? Will there be a need tomove data between data bases, or to access data frommultiple data bases?

• What will be produced? What type of reports,mailing labels, etc., are needed? Will the data base beused with another software package?

Creating DataBases

When creating a data base both the data base file andfields it contains must be named. Beginning relatedfiles with the same prefix can be helpful. For

GAO/IMTEC-11.1.1Page 9

Page 12: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 2

Planning

example, a data base containing EnvironmentalProtection Agency data for the state of Ohio could benamed EPA-OHIO.DBF and its index EPA-OHIO.NDX.Choose field names that are descriptive of the datathey represent: LASTNAME, ZIPCODE, LOSSAMT,etc.

Data base software provides for a variety of fieldtypes. For example, dBASE gives a choice of five fieldtypes: character, numeric, date, memo, and logical. Itis best to use character fields for everything exceptdates and numbers involved in calculations. Bothmemo and logical fields are slow and have noadvantages over character fields. In fact, memo fieldsare difficult to edit and impossible to search; logicalfields have restricted use and require special logic toanalyze.

Make fields large enough to hold the data withoutwasting space. Make numeric fields large enough formaximum values and for totaling the field. Rememberto include decimal points and numeric signs in thefield size.

These actions will also help:

• Break up character fields into the smallest possibleunits. For example, instead of a field called NAME,use LASTNAME and FIRSTNAME. This allows you tosearch or sort either field.

• Let one field uniquely identify each record to helpeliminate duplicates (e.g., Social Security number).

• Reduce errors and save time by not entering numbersthat can be calculated.

Interactive Vs.Programming Mode

Decide during planning how the data base softwarewill be used. In a typical assignment, it would becommon to use both the interactive and programming

GAO/IMTEC-11.1.1Page 10

Page 13: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 2

Planning

mode. In the interactive mode, the user issuesindividual commands from the dBASE “dot” prompt4

or from a command (“Assist”) menu. In theprogramming mode, all commands are stored in a fileand performed in a continuous sequence when theprogram is executed.

The interactive mode is appropriate when

• ad hoc queries are necessary,• deadlines preclude preparing data collection screens,• data volume is small, or• users have a thorough understanding of the data base

software.

The programming mode is appropriate when

• a stand-alone data collection and analysis system isdesired (programs can be compiled, therebyeliminating the need for copies of the data basesoftware);

• users have limited technical knowledge of the database software, and technical assistants can preparedata collection or analysis systems;

• data will be input at multiple sites or by several staff,thereby raising concerns about data consistency;

• programmed data entry checks are desired; or• the data collection and analysis will be repeated.

Programs should be used for complex analysis thatcannot be performed interactively. For example, aprogram would be used to combine data stored bymonth into another field designed to hold quarterlydata. Another benefit is that a program is itself arecord of how the data was analyzed, thus simplifyingdocumentation.

4dBASE uses a period to prompt the user for input at the commandline, hence the term “dot” prompt.

GAO/IMTEC-11.1.1Page 11

Page 14: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 2

Planning

Referencing andTechnicalReviews

Planning should include a decision about when andhow referencing and technical reviews will be done.(See Chapter 5 for additional information onreferencing.) The referencer may request theassistance of an independent, qualified technicalreviewer to certify the methodology and accuracy ofcomputer-based applications. Regardless of whether atechnical review will be done for the referencer,reviews of computer applications should be done on atimely basis throughout the assignment. Early reviewis particularly important if findings and conclusionsdepend on the data analysis. Thus, any problems canbe identified in time to make adjustments.

Defining RolesandResponsibilities

Expectations concerning roles and responsibilities ofthe evaluators, technical assistance staff, and supportstaff should be clear. Clearly defined roles andresponsibilities help ensure consistency in data entryand analysis, and in keeping track of data basechanges. These roles and responsibilities should befully described in the audit program. In addition,review and approval responsibilities should be builtinto the expectation statements.

The following responsibilities should be clearlydelineated to designated staff:

• developing the data base design and defining the fieldcontents to maintain consistency,

• making and documenting changes to the original dataand storing the original data base,

• securing and maintaining the integrity of the database and programs,

• backing up the data at predefined intervals,• defining analysis and reporting requirements, and• reviewing and approving responsibilities.

GAO/IMTEC-11.1.1Page 12

Page 15: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 3

Data Validation, Documentation, andTesting of Data Analysis

GAO products rely on quality evidence and soundanalysis to support the findings, conclusions, andrecommendations. Therefore, data validation,documentation, and testing of data analysis areextremely important in ensuring quality products.

This chapter discusses

• validating original data,• validating data transferred between computers and

software packages,• documenting interactive work sessions, and• documenting and testing data analysis procedures.

Procedures discussed in this chapter apply to bothdBASE interactive and programming modes.

Data Validation Government Auditing Standards requires checking thevalidity of original data. In addition, it is good practiceto establish checks to ensure the integrity of datawhen it is transferred between computers or differentsoftware packages. These checks generally includereasonableness checks, record counts, data totals,hash totals, and data verification.

• A reasonableness check is a common sense look atthe data. For instance:• Are amounts too small (cost per mile to operate a

1-ton truck = $.004)?• Are amounts too large (accrued annual leave

balance for a non-SES employee = 3,000 hours; astudent loan for $1,500,000)?

• Are the data fields complete (data field for patientname is blank; Social Security data field has onlyeight numbers)?

• Does the data seem logical (a child is older than hermother)?

GAO/IMTEC-11.1.1Page 13

Page 16: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 3

Data Validation, Documentation, and

Testing of Data Analysis

• Record counts should match the original number ofcomputerized records.

• Data totals are the sum of numeric data, such asdollars or quantities. These should be the same in theoriginal and newly transferred or created data bases.

• Hash totals the sum of numbers not normally added,such as Social Security numbers or grade levels. Aswith data totals, they should be the same for bothfiles.

• Data verification compares the contents of the database with its source.

Data Transfer Data bases are often transferred from

• one software package to another,• one microcomputer to another, or• a mainframe computer to a microcomputer.

In this process it is important that procedures bedeveloped to ensure that data transfer will besuccessful.

In whatever way data are transferred, data accuracyshould be verified before any data analysis isperformed. The extent of review depends on howcritical the data are and the risk data transfer entails.Test the data received using the validation techniquesgiven in the previous section.

Minimum documentation of data transfers shouldinclude

• printed copies of the disk directories of both theoriginal and the transferred files;

• an explanation of how the transfer was done,including names of software used; and

• a description of tests used to verify data accuracy andcompleteness.

GAO/IMTEC-11.1.1Page 14

Page 17: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 3

Data Validation, Documentation, and

Testing of Data Analysis

DocumentingInteractive WorkSessions

The interactive mode is often used to analyze agencydata bases, to perform ad hoc queries, and to runsimple analyses. To use the interactive mode, onemust know dBASE and keep a clear audit trail.

When using the interactive mode, enter commandsfrom the dot prompt, not through dBASE command(“Assist”) menus. Procedures accomplished throughsuch menus cannot be adequately documented.

Using Alternate Files dBASE “alternate” files create an audit trail ofinteractive sessions. They are text files that recordmost commands and responses. This file can later beedited and printed, or kept in an electronic file.Appendix IV is an example of an alternate file.

Here are tips on how to set up and use alternate files.

• Type these commands at the dot prompt:

SET ALTERNATE TO logfile

SET ALTERNATE ON

This creates a text file called “logfile,” that willcapture most commands and their results. These filescan be named by date (e.g., ’LOG1022A” for the textfile created during the first work session onOctober 22).

• Then, display the current date and time to record thisinformation in the alternate file. The dBASEcommands are

? DATE()

? TIME()

GAO/IMTEC-11.1.1Page 15

Page 18: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 3

Data Validation, Documentation, and

Testing of Data Analysis

• The alternate file will not capture results ofcommands like CREATE, APPEND, and EDIT. Thiscan be compensated for by doing appropriate checks,such as displaying the data base structure before andafter each procedure. When necessary, comments canbe added to the alternate file after the session iscomplete.

• When opening a data base, type “DISPLAY

STATUS” and “DISPLAY STRUCTURE” to showinformation about the data base.

• Alternate files will not capture reports created by areport format file. To document these, print the reportformat screens or annotate the report.

• To close the alternate file, type “SET ALTERNATE

OFF” before using the “QUIT” command. Becausethe results of each session can be quite lengthy, anedit of the file using a word processor may be useful.Delete mistyped or erroneous commands. Keepcommands and results that create or change data ordata bases, or are part of the analysis. After editing,the alternate files can be printed or stored ondiskettes and included in the workpapers.

Since alternate files can be edited with a wordprocessor, they are not a perfect audit trail; they do,however, illustrate the steps taken. If an independentperson could repeat the steps and achieve the sameresults, the audit trail is sufficient.

Documentationand Testing ofData Analysis

As part of documentation, include logs of interactivework sessions (alternate files), any programs, andresults.

Perform control checks after each step of the analysisto ensure that no data have been lost or altered andthe analysis went as planned. Such control checksinclude

GAO/IMTEC-11.1.1Page 16

Page 19: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 3

Data Validation, Documentation, and

Testing of Data Analysis

• comparing present and previous record counts,• totaling numeric fields before and after each step,• checking for duplicate or blank records, and• hand-calculating computations for a small, diverse

group of records, and comparing the results withcomputer-generated totals.

Workpapers should provide a clear trail of all workdone and include

• an analysis plan;• all interactive session logs, with results (such as

reports, data listings, etc.) in chronological sequence(app. IV is an example);

• a written description or flow chart of the process,cross-referenced to programs and session logs (seeapp. V);

• hierarchy flow charts of any programmed systems(see app. VI);

• all programs (see app. VII) and their results;• printed copies of data entry screens;• a summary of any problems found in the data and

their disposition;• a summary of work performed; and• evidence of timely supervisory review.

AdditionalConsiderations

Here are additional practices to keep in mind:

• Provisions of the Computer Security Act of 1987should be followed as they apply to the processingand storing of sensitive and proprietary data. SeeProject Manual (Chapter 11.1-9).

• The supervisor must review all data collectionprocedures and workpapers, and ensure that the datawere verified against the source.

• Staff should back up data, programs, and other

related files (e.g., indexes, report files)periodically.

GAO/IMTEC-11.1.1Page 17

Page 20: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 3

Data Validation, Documentation, and

Testing of Data Analysis

• Use the dBASE command “QUIT” to exit theprogram. Do not remove the data diskette before

exiting the system because you risk losing the

data.

• Close data bases as soon as use of them is finished.(“CLOSE DATABASES”). dBASE files are vulnerableto damage while the data base is open.

• dBASE calculations treat blank numeric fields aszeroes. Plan for a way to indicate missing data todistinguish it from fields left blank in error, (e.g.,entering “999999” for missing data).

GAO/IMTEC-11.1.1Page 18

Page 21: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 4

Programming With Data Base Software

Data base programs allow the user to do complex orrepetitive tasks quickly and accurately. Theseprograms can do one basic task or automate an entirejob. This chapter offers guidance for

• using programmed data entry screens,• writing programs,• using data base software with complex programs, and• testing programs.

UsingProgrammedData EntryScreens

Data base software’s programming capabilities allowthe user to design screens for data entry and editing.Such screens simplify and clarify data entry, whileproviding the capability to limit input errors. Theyprovide the user with more control than interactivedata entry allows. For example, when adding orediting records in the interactive mode, dBASE willprompt for input using field names. Being limited to 8to 10 characters can make these field namesunrecognizable. Here is an example of a dBASEinteractive input screen.

GAO/IMTEC-11.1.1Page 19

Page 22: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 4

Programming With Data Base Software

The user enters data to the right of the field name(illustrated here with brackets).

In contrast, programmed entry screens can be easierto understand, and allow data checking to increaseconsistency and accuracy. Here is a sample datacollection screen.

Possible data checks that can be programmed areshown in the following examples:

• Limit the values of numbers. For example, the“Patient category” above may be limited to valuesgreater than 0 and less than 6. This can be done witheither the dBASE “range” command or the Clipper5

“valid” command.• Limit the responses of character fields, such as “T”

and “F” for a true/false question.

5Clipper is a trademark of Nantucket Corporation. It can be used tocompile dBASE III Plus programs, but also has its ownprogramming commands.

GAO/IMTEC-11.1.1Page 20

Page 23: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 4

Programming With Data Base Software

• Compare the answers of related questions. Forexample, a child’s age cannot be greater than themother’s.

When practical, use memory variables for data entry,run error/logic checks on them, and then replace theappropriate field with the memory variable contents.

Writing Programs Rather than writing the entire program at once, it iseasier to write and test individual tasks separately.Liberal use of blank lines and indentations will alsomake programs easier to read. Before writing aprogram, answer these questions.

• What is its purpose? Divide a large program into itslogical units and state the purpose of each.

• What data will be used?• What analysis will be done?• What reports will be produced?

InternalDocumentation

Comments within the program tell the user what theprogram does and how it works. Comments should beadded as the program is written. They should include

• a header stating the program name, programmer,when written, purpose, and when last modified (seeapp. VII); and

• explanations of tasks.

WorkpaperDocumentation

The documentation should allow a reviewer orreferencer to independently replicate the work done(see the General Policy Manual, 11.0-1). Forprograms, this should include

• a list of related files and a brief description of each;

GAO/IMTEC-11.1.1Page 21

Page 24: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 4

Programming With Data Base Software

• a list of data base structures and a brief description ofeach field’s purpose;

• the printed programs;• a list of memory variables with the purpose of each,

as well as the possible values they could take;• a description of any report forms used. (In dBASE,

use MODIFY REPORT to display the format, then useSHIFT-PRTSC to print the column contents. Analternative is to mark a printed report with fields andcalculations.);

• a list cross-referencing related files and memoryvariables; and

• a system flow chart showing how programs and databases interact (app. VI is an example).

Tips for Use WithMore ComplexPrograms

The following tips apply to larger and more complexprograms.

• Consider compiling the system. It leads to fasterprogram execution, ensures consistent analysis andresults, allows more error checks, and does notrequire a copy of dBASE for subsequent execution.

• Provide a menu option for reindexing files. Index filescan become damaged or outdated.

• Provide a way to recover from printer problems, suchas paper jams and running out of paper.

Using CompliersWith Dbase

dBASE is an “interpreter,” meaning every time acommand is given, it is changed into machine code.This occurs whenever a program is run. Compilers(such as Clipper) are more efficient. They convertprograms to machine code that never needs to beinterpreted again.

Compilers have several advantages. They identifyprogramming errors and create faster, “executable”programs that can be run from DOS (Disk Operating

GAO/IMTEC-11.1.1Page 22

Page 25: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 4

Programming With Data Base Software

System), eliminating the need for a copy of dBASE.Users cannot modify program code and need notknow dBASE.

Be aware that compilers may not be 100 percentcompatible with the data base software. Interactivecommands like APPEND, EDIT, etc., cannot be usedin a compiled program (though forms of thesecommands, such as “APPEND BLANK,” may be used).

Testing Test programs to ensure desired results and to handleunusual or erroneous data. Run a sample of data andcompare it with pre-determined results. Test to seehow error conditions are handled. Then document thetesting with

• listings of test data,• description and extent of tests, and• actual results and comparisons with predetermined

results.

GAO/IMTEC-11.1.1Page 23

Page 26: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 5

Referencing

The Communication Manual (12.13-1) requires thateach GAO product be referenced to ensure accuracyand adequate support. The evaluator-in-charge (EIC)and referencer are responsible for the quality of thereport; the technical reviewer’s role, if needed, ismore limited. This chapter sets out theresponsibilities of

• the EIC,• the referencer, and• the technical reviewer.

EIC’sResponsibilities

The EIC is responsible for ensuring the product isready to be referenced. Beforehand, the EIC or adesignee must review all workpapers, ensuring thatthey meet GAO standards. This includes usingappropriate summary schedules and cross-indexingrelated workpapers to form an audit trail.

The EIC should document the steps taken to ensuresource data validity. Was a reliability assessmentperformed? If so, does the product explain the stepsGAO took to perform this assessment? If a reliabilityassessment was not done, does the product say soand give appropriate cautions concerning the results?

It is the EIC’s responsibility to ensure the productidentifies any serious data limitations. Theworkpapers should show what is included in the data,the period covered, the source, and any informationexcluded and why.

The EIC should ensure that the workpapers haveenough instructions so that the referencer or atechnical reviewer (see below) can duplicate thework done. In addition, the EIC should ensure thathard copies of key computer-assisted schedules thatsupport the facts and figures in the draft product have

GAO/IMTEC-11.1.1Page 24

Page 27: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 5

Referencing

been printed, reviewed, and approved. (SeeCommunications Manual (12.13-3.) The EIC shouldalso ensure that an independent, qualified person hasexamined and approved the data analysismethodology. This technical review is a part of theassignment process, not the technical assistanceassociated with referencing as discussed below. Assuch, the review should be documented and madepart of the workpapers.

Referencer’sResponsibilities

The referencer is responsible for ensuring that

• required supervisory and technical reviews wereperformed and proper quality control procedureswere followed;

• the product presents data accurately and fairly; and• information, findings, and conclusions are supported

by sufficient evidence.

The referencer need not necessarily be familiar withdata base applications or be a technical expert. GAOpolicy provides that if the referencer encountershighly technical material or a very complex data baseapplication, technical assistance can be requested, ifnecessary, to ensure the accuracy of computations orthe soundness of the data analysis methodology.

In checking for required reviews and quality controlprocedures, the referencer should ask:

• Is there evidence that the supervisor has reviewedeach workpaper indexed in the final product?

• Is there documentation that an independent technicalreviewer has verified the computations and approvedthe data analysis methodology? (See CommunicationsManual, 12.13-5.)

• Does the product contain a statement regarding thevalidity of the data used and how this was assessed?

GAO/IMTEC-11.1.1Page 25

Page 28: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 5

Referencing

• Is there documentation that a reliability assessmentwas performed? If not, is this reported?

• Is there evidence of data entry or transferverification?

• Do the workpapers document changes to the sourcedata as a result of data entry or transfer verification?

• If data have been transmitted, do the workpapersdescribe the steps performed?

The referencer must also verify that figures orstatements of fact agree with the support provided.Generally, it should not be necessary to go beyond thetop schedules of the workpapers, although selectedcritical items should be checked back to the detailedsupporting workpapers. This should be done toensure that supervisory reviews are effective and thatcross-indexing is accurate. Tested items should bemarked on the workpaper and on the referenced draftto indicate they have been verified. The referencershould sign and date the workpaper to indicate thathe or she entered these marks. The referencer is notexpected to check computer programs or verify thatcomputerized data have been keyed correctly (theseare responsibilities of the technical reviewer and theEIC, respectively).

When graphs are used, the referencer should checkthe axes and legends to be sure they reasonablyrepresent the data from the workpapers and that thegraphs are not misleading.

The referencer must determine the adequacy of thesupporting sources and the logical soundness of thefacts and evidence provided.

TechnicalReviewer’sResponsibilities

As discussed above, the referencer may requesttechnical assistance. The technical reviewer, ifneeded, is an assistant to the referencer, and must nothave been involved in developing or operating the

GAO/IMTEC-11.1.1Page 26

Page 29: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 5

Referencing

data base application. The reviewer should examinethe workpapers to ensure proper methods and correctuse of automated techniques. (The referencer isresponsible for proper use of data in the product.)The technical reviewer is responsible for verifying theaccuracy of figures or statements of fact based oncomputer-generated data. The reviewer does not haveto repeat the analysis but must evaluate thesoundness of the methodology, including checkingdBASE program files or commands.

The reviewer should generally check each analysisthat produced figures used in the product, or dosufficient tests to assure the accuracy of the data. Awell-documented analysis will make this easier andquicker. The reviewer must understand the purposeof each step in the analysis, i.e., what the staff wastrying to do. Then the reviewer must check the database software commands used to determine whetherthey would achieve the intended result. In theexample that follows, the reviewer would note thatthe program does not count budget items equal to$50, $100, or $250.

GAO/IMTEC-11.1.1Page 27

Page 30: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Chapter 5

Referencing

The technical reviewer should mark each figureverified. When finished, the reviewer should write abrief statement for the referencing notes describingthe technical review and summarizing conclusions onthe use of the computer-generated data. Any cautionsor problems should be clearly explained. Thereviewer should sign and date the document. If as aresult of the technical review a problem wasidentified but not corrected, the referencer mustdetermine the impact of the problem on the accuracyof computations or the soundness of the data analysismethodology.

GAO/IMTEC-11.1.1Page 28

Page 31: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

GAO/IMTEC-11.1.1Page 29

Page 32: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Introduction to the Appendixes

Appendixes I through VII, taken from a review of theDepartment of Defense’s Medical Cost Recovery, areintended to illustrate the tasks and documentationnecessary to use a data base application. Since everyassignment has unique data processing needs, theseexamples should not be considered inclusive.

The assignment evaluated whether Defense hadrecouped expenses at military medical facilities forcivilian care. The GAO staff transferred an agencydata base into dBASE, worked with data interactively,and programmed a data collection and reportingsystem. The application has been simplified forillustration.

GAO/IMTEC-11.1.1Page 30

Page 33: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix I

Data Base Structure

Data Base Structure The following example of a dBASE data basestructure was designed for patient data at variousmedical facilities. It shows field names, the data typefor each field (character, numeric, date, logical, ormemo), field lengths, and decimals. dBASE producesthis report with the command LIST STRUCTURE.

GAO/IMTEC-11.1.1Page 31

Page 34: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix II

Data Base Dictionary

A data base dictionary explains the source, format,and meaning of the data. It describes acceptablevalues and may provide sample entries. Its purpose isto explain the data base and ensure properinterpretation.

Data Dictionaryfor the RecoveryData Base

Source of data: the “Record of Inpatient Treatment” inthe inpatient medical file.

1.Facility (field name: FACILITY; character, 4 long)abbreviation of medical facility providing service e.g.,WHMC — Wilford Hall Medical Center BAMC —Brooks Army Medical Center

2.Sample Number (field name: SAMPLENUM;numeric, 3 long) sample number assigned by GAO;can contain numbers from 1 to 999; uniquely identifiesrecord

3.Register Number(field name: REGSTRNUM;numeric, 7 long) number assigned by medical facilityat time of admission (inpatient only); unique for eachcase

4.SSN/FMP (field name: SSN FMP; character, 11long) Social Security Number (positions 1-9) andFamily Member Prefix (FMP) (positions 10-11); theSocial Security Number is that of the enlisted/retiredperson; the FMP identifies the actual member of thatperson’s family who is receiving the medical care

5.Patient Category (field name: PATCATGRY;numeric, 1 long) patient category represents thepatient’s military status1 - active duty (AD)2 - dependent AD3 - dependent of deceased4 - retiree

GAO/IMTEC-11.1.1Page 32

Page 35: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix II

Data Base Dictionary

5 - dependent retiree6 - civilian7 - other9 - missing record

6.Type of Treatment (field name: TYPETRTMNT;numeric, 1 long) type of treatment refers to whetherthe patient received treatment as an inpatient, in theemergency room, or a clinic1 - inpatient2 - emergency room clinic3 - physical therapy clinic4 - orthopedic clinic5 - neurosurgery

7.Charges (field name: CHARGES; numeric, 12 long,2 decimals) amount charged by the medical facilityfor

the patient visit

8.Admission Date (field name: TRTMNTDATE; date—mm/dd/yy) date patient was admitted (inpatient) orreceived treatment (outpatient)

9.Discharge Date (field name: DISCHARGE; date—mm/dd/yy) date patient was discharged frommedical facility (inpatient)

GAO/IMTEC-11.1.1Page 33

Page 36: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix III

Analysis Plan Flow Chart

An analysis plan flow chart shows planned datacollection and analysis steps. It begins with obtainingthe source data and ends with the desired reports.

GAO/IMTEC-11.1.1Page 34

Page 37: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix III

Analysis Plan Flow Chart

GAO/IMTEC-11.1.1Page 35

Page 38: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix IV

Alternate File of a Dbase InteractiveWork Session

An alternate file records dBASE commands and theirresults and saves them to a disk file. To clarify thework done, add narrative comments with wordprocessing software. The command SETALTERNATE TO creates the disk file; SETALTERNATE ON/OFF begins or ends the recording.The following is an example of an alternate file.

GAO/IMTEC-11.1.1Page 36

Page 39: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix IV

Alternate File of a Dbase Interactive

Work Session

GAO/IMTEC-11.1.1Page 37

Page 40: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix IV

Alternate File of a Dbase Interactive

Work Session

GAO/IMTEC-11.1.1Page 38

Page 41: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix IV

Alternate File of a Dbase Interactive

Work Session

GAO/IMTEC-11.1.1Page 39

Page 42: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix V

Process Flow Chart

A process flow chart shows actual steps in datacollection, verification, and analysis.

GAO/IMTEC-11.1.1Page 40

Page 43: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix V

Process Flow Chart

GAO/IMTEC-11.1.1Page 41

Page 44: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix VI

Data Collection and Reporting SystemFlow Chart

A system flow chart illustrates how programs anddata bases interact.

GAO/IMTEC-11.1.1Page 42

Page 45: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix VII

Sample Program

Here is an example of a dBASE program that storescommands to a disk file where they can be executedat any time. Asterisks denote comments that are notcommands; hence, they cannot be executed.

GAO/IMTEC-11.1.1Page 43

Page 46: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix VII

Sample Program

GAO/IMTEC-11.1.1Page 44

Page 47: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix VII

Sample Program

GAO/IMTEC-11.1.1Page 45

Page 48: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Appendix VIII

Major Contributors to This Publication

Dallas RegionalOffice

Barbara A. Johnson, Senior EvaluatorDavid W. Irvin, Senior Evaluator/TAG Manager

Los AngelesRegional Office

Barbara Y. House, Senior Evaluator

Resources,Community, andEconomicDevelopmentDivision,Washington, D.C.

Annette Wright, Senior Evaluator

InformationManagement andTechnologyDivision,Washington, D.C.

Daniel C. White, Director, Planning and ReportingWilliam C. Oelkers, Associate DirectorDennis L. O’Connor, Reports Analyst

GAO/IMTEC-11.1.1Page 46

Page 49: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Bibliography

dBASE III Plus Manual, Vol. II. Torrance, CA:Ashton-Tate, 1985.

Castro, Luis, Jay Hanson, and Tom Rettig. “ProgramDocumentation,” Advanced Programmers’ Guide.Culver City, CA: Ashton-Tate, 1985, pp. 141-151.

Liskin, Miriam. Advanced dBASE III PlusProgramming And Techniques. Berkeley, CA: OsborneMcGraw-Hill, 1987, pp. 717-725.

Seman, Stewart O. “Controlling the Quality ofElectronic Work Papers,” The GAO Review, 21, (No.4, Fall 1986), pp. 11-14, 33.

U.S. General Accounting Office. InformationManagement and Technology Division. Using MicroComputers in GAO Audits: Improving Quality andProductivity, Technical Guideline 1. Washington,D.C., 1986.

. Assessing the Reliability of Computer-ProcessedData. (8.1.3) Washington, D.C., 1990.

. Information Management and Technology Division.Preparing, Documenting, and Referencing LotusSpreadsheets, 11.1.3. Washington, D.C., 1987.

. Project Manual. Washington, D.C., 1989, chapter10.1.

GAO/IMTEC-11.1.1Page 47

Page 50: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

Ordering Information

The first copy of each GAO report and testimony

is free. Additional copies are $2 each. Orders

should be sent to the following address,

accompanied by a check or money order made

out to the Superintendent of Documents, when

necessary. Orders for 100 or more copies to be

mailed to a single address are discounted

25 percent.

Orders by mail:

U.S. General Accounting Office

P.O. Box 6015

Gaithersburg, MD 20884-6015

or visit:

Room 1100

700 4th St. NW (corner of 4th & G Sts. NW)

U.S. General Accounting Office

Washington, DC

Orders may also be placed by calling

(202) 512-6000 or by using fax number

(301) 258-4066, or TDD (301) 413-0006.

Each day, GAO issues a list of newly available

reports and testimony. To receive facsimile

copies of the daily list or any list from the past

30 days, please call (301) 258-4097 using a

touchtone phone. A recorded menu will provide

information on how to obtain these lists.

Page 51: Preparing, Documenting, and Referencing Microcomputer Data Base Applications … · 2018-03-19 · Documenting, and Referencing Microcomputer Data Base Applications ... data (e.g.,

United States

General Accounting Office

Washington, D.C. 20548-0001

Official Business

Penalty for Private Use $300

Address Correction Requested

Bulk Mail

Postage & Fees Paid

GAO

Permit No. G100


Recommended