EPA-450/3-74-045
JULY 1974
       COMPREHENSIVE DATA
      HANDLING SYSTEM, AIR
    QUALITY DATA HANDLING
        SUBSYSTEM (AQDHS-H)
 PROGRAM DOCUMENTATION
           AND USER'S GUIDE
    U.S. ENVIRONMENTAL PROTECTION AGENCY
       Office of Air and Waste Management
    Office of Air Quality Planning and Standards
    Research Triangle Park, North Carolina 27711

-------
                                     EPA-450/3-74-045
    COMPREHENSIVE DATA HANDLING
SYSTEM,  AIR QUALITY DATA HANDLING
    SUBSYSTEM  (AQDHS-II)  PROGRAM
  DOCUMENTATION  AND  USER'S GUIDE
                         by

                    The IBM Corporation
                  Federal Systems Division
                    18100 Frederick Pike
                 Gaithersburg, Maryland 20760
                   Contract No. 68-02-0638
               EPA Project Officer: Lloyd Hedgepeth
                      Prepared for

              ENVIRONMENTAL PROTECTION AGENCY
               Office of Air and Waste Management
             Office of Air Quality Planning and Standards
               Research Triangle Park, N. C. 27711

                       July 1974

-------
This report is issued by the Environmental Protection Agency to report
technical data of interest to a limited number of readers.  Copies are available
free of charge to Federal employees, current contractors and grantees,
and nonprofit organizations  as supplies permit  from the Air Pollution
Technical Information Center, Environmental Protection Agency, Research
Triangle Park, North Carolina 27711; or,  for a fee, from the National Technical
Information Service, 5285 Port Royal Road, Springfield, Virginia  22151.
This report was furnished to the Environmental Protection Agency by the IBM
Corporation, Gaithersburg, Maryland 20760, in fulfillment of Contract No. 68-
02-0638.  The contents of this report are reproduced herein as received
from the IBM Corporation. The opinions, findings, and conclusions expressed
are those of the author and not necessarily those of the Environmental
Protection Agency. Mention of company or product names is not to be
considered as an endorsement by the Environmental Protection Agency.
                    Publication No. EPA-450/3-74-045

-------
                          TABLE OF CONTENTS

               ••••••••••X
1.0  Introduction   .........    2
2.0  Air Quality Data Handling Subsystem (AQDHS) Overview   .    4
     2.1  Organization   ........    5
     2.2  Communication and Data Formats     ....    10
          2.2-1   Master File	10
          2.2-2   Master File Maintenance Transactions .    .    15
     2.3  Routines	23
3.0  Conversion Programs ........    27
     3.1  Old AQDHS File to New AQDHS Input  ....    28
          3.1.1   Organization     ......    29
          3.1.2   Communication and Data Formats  ...    31
          3.1.3   Routines    .......    32
     3.2  Old AQDHS (SAROAD) Input to New AQDHS Input  .    .    33
          3.2.1   Organization     ......    34
          3.2.2   Communication and Data Formats  ...    36
          3.2.3   Routines    .......    37
     3.3  AQDHS File to SAROAD Input    .    .    .    .    .    38
          3.3.1   Organization     ......    39
          3.3.2   Communication and Data Formats  ...    41
          3.3.3   Routines    .......    42
4.0  Table Maintenance   ........    43
     4.1  Parameter Code Table Maintenance   ....    44
          4.1.1   Organization     ......    46
          4.1.2   Communication and Data Formats  ...    48
          4.1.3   Routines    .......    49
     4.2  Site Code Table Maintenance   .....    52
          4.2.1   Organization     .    .         •    •    *    53
          4.2.2   Communication and Data Formats  ...    55
          4.2.3   Routines    .......    56
                                 iii

-------
     4.3  Parameter Standards Table Maintenance   ...    59
          4.3.1   Organization     ......    61
          4.3.2   Communication and Data Formats  ...    63
          4.3.3   Routines    .......    64
5.0  File Maintenance and Transaction Editor ....    67
     5.1  Transaction Editor  .......    68
          5.1.1   Organization     ......    70
          5.1.2   Communication and Data Formats  ...    73
          5.1.3   Routines    .......    74
     5.2  File Maintenance    .......    75
          5.2.1   Organization     ......    76
          5.2.2   Communication and Data Formats  ...    79
          5.2.3   Routines    .......    80
6.0  Data Retrieval .........    81
     6.1  Retrieval Language Processor  .....    82
          6.1.1   Organization     ......    85
          6.1.2   Communication and Data Formats  ...    87
          6.1.3   Routines    .......    89
     6.2  Retrieval .........    102
          6.2.1   Organization     ......    103
          6.2.2   Communication and Data Formats  .    .     .    105
          6.2.3   Routines    .......    106
7.0  Output Programs     ........    107
     7.1  Detail List	108
          7.1.1   Organization     ......    109
          7.1.2   Communication and Data Formats  .    .     .    113
          7.1.3   Routines    .......    114
     7.2  Sliding Average     .......    116
          7.2.1   Organization     ......    117
          7.2.2   Communication and Data Formats  .    .     .    120
          7.2.3   Routines	121
                                 iv

-------
7.3  Data Analysis  ......
     7.3.1   Organization     ....
     7.3.2   Communication and Data Formats
     7.3.3   Routines    .....
7.4  Statistical List    .....
     7.4.1   Organization     ....
     7.4.2   Communication and Data Formats
     7.4.3   Routines    .....
7.5  File Flagging  ......
     7.5.1   Answer File Flagging
          7.5.1.1  Organization
          7.5.1.2  Communication and Data Formats
          7.5.1.3  Routines   ....
     7.5.2   Parm-Code-Key File Flagging
          7.5.2.1  Organization
          7.5.2.2  Communication
          7.5.2.3  Routines   ....
        Code Tables ......
        AQDHS Diagnostic Messages  .    .    .
        Program Modification  ....
        Cataloged Procedures  ....
Appendix
Appendix
Appendix
Appendix
Appendix E:  AQDHS Load Sheets
A:
B:
C:
D:
123
125
128
129
130
131
133
134
135
136
137
139
140
141
142
144
145
146
151
154
165
264

-------
                            FIGURES

2.1.1     AQDHS System Data Flow	7
2.2-1.1   AQDHS Master File Record Format    ....    11
2.2-2.1   AQDHS File Maintenance Transactions     ...    16
2.3.1     AQDHS - Organization          	26
3.1.1     BXCONVRT - Organization	30
3.2.1     CXCONVRT - Organization	35
3.3.1     AXCONVRT - Organization	40
4.1.1     HXTABLE1 - Organization	47
4.1.4     Parameter Code Table Transactions  ....    50
4.2.1     HXTABLE2 - Organization	54
4.2.4     Site Code Table Transaction	57
4.3.1     HXTABLE3 - Organization	62
4.3.4     Parameter Standards Table Transaction   ...    65
5.1.1     TXTREDIT - Organization	72
5.2.1     FXFILMNT - Organization	78
6.1.1     LXLNGPRC - Organization	86
6.1.4-1   Retrieval Control Cards  .     .    ...    .     .    91
6.1.4-2   Retrieval Language Specifications  ....    93
6.1.4-3   Valid Retrieval Data Names    .....    95
6.1.4-4   Sample Retrieval Specifications    ....    100
6.2.1     Retrieval - Organization ......    104
7.1.1     EXRPTLST - Organization	112
7.1.4     Detail List Control Card	115
7.2.1     IXSLDAVG - Organization	119
7.2.4     Sliding Average Control Card  .....    122
7.3.1     JXSTATIS - Organization	127
7.4.1     SXPRINTS - Organization	132
7.5.1.1   MXSENTNL - Organization  	    138
7.5.2.1   NXSENTNL - Organization  	    143
                                 vi

-------
PREFACE

This version of the Air Quality Data Handling Subsystem (AQDHS)  of the
Comprehensive Data Handling System (CDHS)  is a major revision of and
completely replaces the version of AQDHS described in APTD-1086.  Con-
version programs have been provided to assist the user in his transfer
from the old AQDHS to the new AQDHS.   Unless specifically mentioned,  any
occurrence of the term AQDHS refers to this version of AQDHS and not the
previous version.

All of the programs in this subsystem have been written in ANS COBOL with
the exception of one program.  The Data Analysis program has been written
in ANS FORTRAN for the Level G IBM FORTRAN-IV compiler.

-------
1.0   INTRODUCTION

This document is aimed at two different audiences.  Its primary target
is the person who will be using the Air Quality Data Handling Subsystem
(AQDHS) of the Comprehensive Data Handling System (CDHS).   By referring
to the general program write-ups, input card formats, and cataloged pro-
cedures, the AQDHS user should be able to use the system without reference
to detailed program documentation.  However, sufficient detailed docu-
mentation is provided for the programmer responsible for the maintenance
of AQDHS.  This documentation takes the form of flow diagrams, organi-
zation, data formats and subroutines for each program in AQDHS, as well
as several appendices.  With these goals in mind, the document is organ-
ized in the following fashion:

     o    Section 2.0 - Contains an overview of AQDHS, a brief func-
          tional description of each program comprising the system,
          and a detailed discussion of the system master file and the
          transactions required to build the master file.

     o    Sections 3.0 through 7.0 - Contain detailed functional descrip-
          tions of each program in AQDHS, along with complete instructions
          on the use of all program functions.  Following these are the
          descriptions of program logic, organization, data formats and
          subroutines for each program.  The sections are organized as
          follows:

          Section 3.0 - Conversion programs
          Section 4.0 - Table Maintenance programs
          Section 5.0 - File Maintenance and Transaction Editor
                        programs
          Section 6.0 - Data Retrieval programs
          Section 7.0 - Output programs

-------
In general, each program in AQDHS is organized in the top-down manner
in which higher level programming modules execute one or more lower level
modules to perform specific functional tasks.  These lower level modules
may in turn execute still lower level modules to perform other specific
tasks.  Each module has one entry and one exit only.  Thus, each program
basically consists of a hierarchical structure of programming modules.

In addition, each program in AQDHS is programmed using structured pro-
gramming techniques.  These techniques include using only three basic
types of programming construction blocks (IF/ELSE, DO and PROCESS) and
preclude the use of explicit branches.  These techniques, along with the
top-down organization, make for programs which are extremely readable with
straightforward logic and no branching to confuse the program flow.  This
also enhances the maintainability of the programs which comprise the system.

Because of the advanced manner in which AQDHS was developed, it became
obvious that the standard method of program documentation, instruction by
instruction and field by field, would not provide the level of infor-
mation about the programs necessary for valid understanding.  Therefore,
the AQDHS programs have been documented by first describing their hier-
archical top-down structure and then giving detailed descriptions of each
main module within the structure.  Thus, the serious AQDHS user can find
his way directly into virtually any subroutine of a given program where
he will then find the programming details in the structured code.

In addition, descriptions of all important data areas and all crucial high
level modules within each program have been provided as well as hierarchi-
cal flow charts of each program.

-------
2.0   AIR QUALITY DATA HANDLING SUBSYSTEM (AQDHS) OVERVIEW

When dealing with atmospheric pollution, it is necessary to amass,  catalog,
sort, evaluate, and perform calculations upon large volumes of data.   The
Air Quality Data Handling Subsystem of the Comprehensive Data Handling
System provides a systematic method for collecting this data in a data base
that will provide a central source for the information needed to help
control air pollution.  If the system is to be helpful, it must maintain
the data base, keeping the information current, and provide a means for
access to the information, presenting it in a usable form.

The Air Quality Data Handling Subsystem provides the ability to create and
maintain, and to retrieve and print data from the data base.  The creation
and maintenance is accomplished with the File Maintenance program.   This
program allows the user to keep his data base information current and useful.
Access to the data base information is provided by the Retrieval program
set.  These programs provide the means of extracting desired information from
the data base.  The output print programs are then used to convert  the
extracted information to a form readable by the user.  These three func-
tions form the basic system.

In addition to the basic system, several preprocessor and postprocessor
programs are provided which perform functions necessary to make this system
compatible with existing systems.  All of the system programs are described
in detail in the following sections.

-------
2.1   ORGANIZATION

AQDHS is organized around two main programs, File Maintenance and Retrieval.
There are fourteen other programs in the system that perform service
functions.  The interface for the programs that feed the File Maintenance
program is the AQDHS transaction card.  The AQDHS master file serves as
the interface for the other programs.

The AQDHS components are:

     o    Old AQDHS File to New AQDHS Input - Converts existing AQDHS
          files to new AQDHS transactions for building a new AQDHS
          master file.

     o    Old AQDHS (SAROAD) Input to New AQDHS Input - Converts old
          AQDHS transactions (SAROAD format) to new format AQDHS trans-
          actions .

     o    Parameter Code Table Maintenance - Maintains a table
          containing the valid combinations of parameter, method and
          unit codes along with their descriptions plus the minimum
          detectable value of the parameter.

     o    Site Code Table Maintenance - Maintains a table containing
          the valid combinations of state, area, site, agency and project
          codes along with a description of the site.

     o    Parameter Standards Table Maintenance - Maintains a table
          containing state and federal standards for parameters.

     o    Transaction Editor -  Edits file maintenance transactions and
          converts them to an internal form usable by File Maintenance.

     o    File Maintenance - Creates and maintains the AQDHS master file.

-------
     o    Retrieval Language Processor - Generates  a  COBOL  program to
          retrieve records from the master file based on user
          specifications.

     o    Retrieval - Generated by the Retrieval Language Processor.

     o    Detail List - Provides a detailed formatted listing  of  the
          contents of the master file.

     o    Sliding Average - Formats each record in  the master  file and
          computes a sliding average of the readings  contained therein.

     o    Answer File Flagging - Appends an end-of-file (EOF)  sentinel
          record to the answer or master file for use by Data  Analysis.

     o    Parm-Code-Key File Flagging - Appends an  end-of-file (EOF)
          sentinel record to the key portion of the parameter, method, unit
          codes table file for use by Data Analysis.

     o    Data Analysis - Performs various statistical analyses on
          the readings in the master file.

     o    Statistical List - Formats the results of the analyses
          performed by Data Analysis.

     o    AQDHS File to SAROAD Input - Extracts new and changed
          readings in the AQDHS file and generates  magnetic tapes
          for submission to SAROAD.

Figure 2.1.1 illustrates a possible data flow through AQDHS.

-------
                           Old AQDHS
                           Transactions
| Table Build
 Transactions
 Tr,
                                                      New AQDHS
                                                      Transactions
                                                        Internal
                                                         Trans-
                                                         actions
                   AQDHS  System Data Flow
                        Figure 2.1.1

-------
 Retrieval
Specification
                         Answer
                          File
                   AQDHS  System Data  Flow
                  Figure  2.1.1 (continued)

-------
 Program
 EXRPTLST
Detailed
 Report
Sliding
 Average
 Report
  Farm
Descrip.
  File
                                     Site
                                     Code
                                     File
Stat-
istics
 File
                               Statistical
                                  Report
                   AQDKS  System  Data Flow
                  Figure  2.1.1  (continued)

-------
2.2   COMMUNICATION AND DATA FORMATS

2.2-1   MASTER FILE

The AQDHS master file record is designed to contain all data related to
a particular parameter collected at a specific site.  Each record
represents a certain logical period of time—the length of the period
being determined by the interval at which samples are taken.  For any
sampling interval less than 24 hours, the record represents one day's
worth of data.  Daily and weekly sampling intervals are contained in
records representing one month's worth of data.  Monthly and quarterly
sampling intervals yield records representing a full year's worth of
data.  All records have the same format and are variable in length,
with the length being determined by the number of readings actually
stored in the record, not the maximum possible.  For instance, a record
for hourly intervals could hold a maximum of 24 readings.  If readings
1, 3 and 6 were supplied when the record was created, the physical
record would be 6 readings long, with reading 2, 4 and 5 filled with 9s
to indicate a null value.

The AQDHS master file records will also store composite data.  The
composite readings are grouped in records representing a full year's
worth of data with the exception of weekly composite data.  Weekly
composite data is stored one reading per record.

The format of the master file record is illustrated in Figure 2.2-1.1.
                                       10

-------
AQDUS blaster Record
Position


3
5
9

13

16
18
20
22
24
29
31

34

37
1
2
- 4
- 8
- 11
12
- 14
15
- 17
- 19
- 21
- 23
- 28
- 30
- 32
33
- 35
36
- 40
Format

     9
     9
    XX
  9999
   999
     A
    99
     X
    99
    99
    99
    99
 99999
    99
    99
     9
    99
     A
  9999
Symbol

Numeric
Numeric
Alphameric
Numeric
Numeric
Alphabetic
Numeric
Alphameric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Alphabetic
Numeric
Description

Action Code
Form Code
State Code
Area Code
Site
Agency
Project
Time Code
Year
Month
Day
Start Hour
Parameter Code
Method Code
Unit Code
Decimal Code
Number of Readi
Status Flag
Data Field
Note:  Positions 36 - 40 may be repeated to include more than one reading
in the Master Record.  The number of repetitions is determined by the
value in the Number of Readings field.
                       AQDHS Master Record Format
                             Figure 2.2-1.1
                                     11

-------
2.2-1.1   DEFINITION OF AQDHS MASTER FILE RECORD FIELDS

Action Code:  This code indicates the last action that was performed on
     this record.  The action codes are two (2) for Add and three (3) for
     Change.

Form Code:  The three SAROAD transmittal-form codes currently accepted by
     AQDHS are:  form #1, less than 24-hour sampling interval; form #2,
     24-hour or greater sampling interval; and form #3, multiple station
     form.  The corresponding AQDHS forms use the same form codes.  Form
     #2 is also used for composite data.

State Code:  State names are arranged in alphbetic sequence and assigned
     numbers from 01 to 52.  To maintain consistency, both the District
     of Columbia and the territory of Puerto Rico are considered as states.

Area Code:  Within each state the names of all incorporated areas with a
     population of more than 2500 and all counties are arranged alpha-
     betically and assigned a four-digit number.  County codes are used
     only for stations located outside incorporated areas.

Site:  Specific sampling sites are designated by a three-digit number that
     permits a maximum of 999 sites in each city or county area within a
     state.  Users are advised to contact the National Aerometric Data
     Bank to obtain their site codes.  The valid SAROAD site codes from
     NADB will be used by the edit program when the transaction cards
     are checked.

Agency:  The type of agency responsible for the sampling is designated by
     a single, alphabetic code.  The current agency codes are shown in
     Appendix A, Table 1.

Project:  The project codes classify projects according to the purpose
     of the project under which the data is generated.  The principal
     categories are shown in Appendix A, Table 2.

                                     12

-------
Time Code:  A single-digit alphameric code.  The time codes used by AQDHS
     to indicate sampling intervals are shown in Appendix A, Table 3.

Year:  The AQDHS date validation check accepts years from 1960 to the
     current year.

Month:  The AQDHS date validation check accepts months from 01 to 12.

Day:  The AQDHS date validation check accepts days from 01 to the maximum
     for each month.  The maximum for February is 29.

Start Hour:  A two-digit numeric code that indicates the hour of the first
     reading.  The range of hours is from 00 to 23.

Parameter Code:  A five-digit numeric code which permits a branching sub-
     categorization of pollutants.  A list of currently assigned codes
     may be found in EPA Publication No. APTD-0633;  SAROAD Parameter
     Coding Manual.

Method Code:  A two-digit numeric code designating the methods of collec-
     tion and analysis.  A list of valid codes may be obtained from EPA.

Unit Code:  A two-digit numeric code used to designate the unit of measure-
     ment.  A list of valid unit codes may be obtained from EPA.   A partial
     list may be found in Appendix A, Table 4.

Decimal Code:  A single-digit numeric code from 0 to 4 which indicates
     the number of digits in the data field that are to fall to the right
     of the decimal point.

Number of Readings:  A two-digit numeric field that indicates the number
     of Data Fields and Status Flags that are in the record.  This number
     is generated by the File Maintenance program and is used by the out-
     put programs.
                                      13

-------
Status Flag:  This is a single-digit alphabetic code that indicates that
     the associated Data Field has been sent to SAROAD (value is 'S'),
     or is to be sent as an Add Record (value is 'A'), or Change Record
     (value is 'C').  The flag is set by the File Maintenance program
     and by the ADQHS File to SAROAD Input conversion program.

Data Field:  The data fields contain the data as a four-digit number
     right-justified with leading-left Eeros.
                                       14

-------
2.2-2   MASTER FILE MAINTENANCE TRANSACTIONS

The master file is constructed from the information contained on the
AQDUS input transaction cards.  These are three types of cards:  Format 1,
Format 2 and Format 3.  The Format 1 transactions aro used to enter read-
ings taken at less than daily intervals.  The Format 2 and Format 3 trans-
actions are used to enter readings taken at daily or greater than daily
intervals. , Format 2 allows readings for multiple parameters to be entered
while Format 3 allows readings from multiple stations to be entered.  For-
mat 2 transactions are also used to enter composite data.

Figure 2.2-2.1 illustrates the formats of the various transactions.
                                     15

-------
Format 1 AQDIIS Transaction
     Columns
Format
Symbol
1
2-3
4-7
8-10
11
12-13
14
15-16
17-18
19-20
21-22
23-27
28-29
30-31
32
33-36
37-40
41-44
45-48
49-52
53-56
57-60
61-64
65-78
79
80
9
XX
9999
999
A
99
9
99
99
99
99
99999
99
99
9
9999
9999
9999
9999
9999
9999
9999
9999

A
9
Numeric
Alphameric
Numeric
Numeric
Alphabetic
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric

Alphabetic
Numeric
Description

Form Code
State Code
Area Code
Site Code
Agency Code
Project Code
Time Code
Year
Month
Day
Start Hour
Parameter Code
Method Code
Units Code
Decimal Position
Reading
Reading
Reading
Reading
Reading
Reading
Reading
Reading
Unused
Status Flag
Action Code
                  AQDHS  File Maintenance Transactions
                            Figure 2.2-2.1
                                      16

-------
Format 2 AQDHS Transactions
     Columns
Format
Symbol
1
2-3
4-7
8-10
11
12-13
14
15-16
17-18
19-20
21-22
23-27
28-29
30-31
32
33-36
37-50
51-64
65-78
79
80
9
XX
9999
999
A
99
X
99
99
99
99
99999
99
99
9
9999



A
9
Numeric
Alphameric
Numeric
Numeric
Alphabetic
Numeric
Alphameric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric



Alphabetic
Numeric
Description

Form Code
State Code
Area Code
Site Code
Agency Code
Project Code
Time Code
Year
Month
Day
Start Hour
Parameter Code
Method Code
Units Code
Decimal Position
Reading
Repeat Columns 23-36
Repeat Columns 23-36
Repeat Columns 23-36
Status Flag
Action Code
                  AQDHS File Maintenance  Transactions
                      Figure 2.2-2.1   (continued)
                                       17

-------
Format 2 AQDHS Composite Transaction

     Columns        Format         Symbol         Description
                                                  Period
                                                  Number of Samples
                                                  Composite Type
                                                  Time Code*
     All other fields have the same format and meaning as those in
     the standard Format 2 transaction.
17-18
19-20
21
22
99
99
9
X
Numeric
Numeric
Numeric
Alphameric
*  Use SAROAD time code (APTD-0663 - Code Table 3)  instead of AQDHS time
   code.

                  AQDHS File Maintenance Transactions
                       Figure 2.2-2.1  (continued)
                                      18

-------
Format 3 AQDHS Transaction
     Columns
Format
Symbol
1
2-3
4
5-6
7
8-12
13-14
15-16
17
18-19
20-21
22-23
24-25
26-29
30-32
33-36
37-49
50-62
63-75
76-78
79
80
9
XX
A
99
X
99999
99
99
9
99
99
99
99
9999
999
9999




A
9
Numeric
Alphameric
Alphabetic
Numeric
Alphameric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric




Alphabetic
Numeric
Description

Form Code
State Code
Agency Code
Project Code
Time Code
Parameter Code
Method Code
Units Code
Decimal Position
Year
Month
Day
Start Hour
Area Code
Site Code
Reading
Repeat Columns 24-36
Repeat Columns 24-36
Repeat Columns 24-36
Unused
Status Flag
Action Code
                 AQDHS  File Maintenance Transactions
                      Figure  2.2-2.1   (continued)
                                       19

-------
2.2-2.1   DEFINITION OF AQDHS FILE MAINTENANCE TRANSACTION FIELDS

Action Code:  Indicates the action to be performed by this transaction.
     Valid codes are:
          1 - Delete
          2 - Add
          3 - Change

Agency Code:  Identifies the agency responsible for these readings.   Valid
     codes are found in Appendix A, Table 1.

Area Code:  Identifies the area in which the  sampling site is located.

Composite Period:  Identifies the period during which the composite
     sample was taken.  Valid codes are:
          01 - 04                  Quarterly  and Seasonal Composite
          01 - 12                  Monthly Composite
          01 - 52                  Weekly Composite
          00                       Annual Composite
     Refer to APTD - 0663 for a full discussion of composite data.

Composite Number of Samples:  Indicates the number of individual samples
     that were composited.

Composite Time Code:  Indicates the interval  at which the individual
     composited samples were taken.  This time code should be taken
     from Code Table 3 in APTD-0663 rather than from Appendix A,
     Table 3 in this document.

Composite Type:  Indicates the interval at which the samples are com-
     posited.  Valid codes are:
          1 - Quarterly Composite
          2 - Seasonal Composite
                                      20

-------
          3 - Monthly Composite
          4 - Weekly Composite
          5 - Annual Composite

Day:  The day of the month on which the sample was taken.

Decimal Position:  A single-digit number from 0 to 4 which indicates the
     number of digits in the reading that are to fall to the right of
     the decimal point.

Form Code:  The Identification number of the form being used; 1, 2 or 3.

Method Code:  Identifies both the collection method and the analysis
     method of the parameter being measured.

Month:  The month of the year during which the sample was taken.

Parameter Code:  Identifies the parameter being measured.  Refer to
     APTD-0633 for a full list of currently accepted parameter codes.

Project Code:  Identifies the project in association with which the
     sample was taken.  Valid codes are found in Appendix A, Table 2.

Reading:  The value of the sample taken.

Site Code:  Identifies the site at which the sample was taken.

Start Hour:  On the Format 2 and Format 3 transactions, the hour at
     which the sample was taken.  On the Format 1 transaction, the
     hour at which the first reading was taken.

State:  Indicates the state (or other geographic division) in which
     the sampling site is located.
                                       21

-------
Status Flag:  Indicates the status of the readings on the transaction.
     Valid codes are:
          S              previously sent to SAROAD
          blank          to be sent to SAROAD

Time Code:  Indicates the interval at which the samples were taken.  Valid
     codes are found in Appendix A, Table 3.

Units Code:  Indicates the units in which the parameter was measured.
     A partial list may be found in Appendix A, Table 4.

Year:  The year in which the sample was taken.
                                        22

-------
2.3   ROUTINES

Within each program in AQDHS, certain similarities of construction and
format will immediately become apparent.  The top level paragraph (the
one with which execution begins) in each COBOL program is named
ROOT-SEGMENT.  This paragraph controls, on a gross level, the sequence
of execution of all other paragraph in the program.  ROOT-SEGMENT performs
at least three other paragraphs in this order:  PGM-INIT, MAIN-LOOP,
WRAP-UP.  Within ROOT-SEGMENT there may be other paragraphs performed
or other READS, WRITES or switch settings to tailor ROOT-SEGMENT to
the particular program, however, the three basic paragraphs remain.
          This paragraph performs whatever program initialization
          functions are necessary.  These generally consist of
          opening all files, clearing work areas and initializing
          switches.

     o    MAIN-LOOP
          This paragraph controls the main-line processing of the
          program.  Usually, this consists of reading an input
          record and, based on that input, determining the action
          to be taken.

     o    WRAP-UP
          This paragraph performs whatever program termination
          functions are necessary.  These usually consist of
          writing program execution statistics messages and
          closing all files.

Because the paragraphs ROOT-SEGMENT, PGM-INIT, MAIN-LOOP and WRAP-UP are
found in each COBOL program in AQDHS and their functions are similar,
the detailed program documenation usually begins with a description of
MAIN-LOOP.

Figure 2.3.1 shows the general AQDHS program organization.

                                     23

-------
During the development of AQDHS, it became apparent that many programs
had certain identical functions to perform.  For example, each program
needed a print routine to control the printing of any messages it may
have.  Whenever a function performed by more than one program could be
identified and could be accomplished by identical code, a paragraph or
group of paragraphs was developed to fulfill the functions.  These
functional modules could then be "plugged into" any program needing this
function.  The use of "global code" aided greatly in the reduction of
coding time and effort during the development of AQDHS.  Some of the
global modules are identified below.

     o    PRINT-ROUTINE
          This routine controls the printing of any messages from
          the program to the user.  It keeps track of the number
          of lines printed on the page and handles the printing of
          titles at page overflow.

     o    BUILD-TABLES
          This routine reads in the valid site code table file and
          the key portion of the parameter, method, unit codes
          table file and builds them as arrays in core storage.

     o    BUILD-PARM-DESCRIPTION
          This routine reads in the description portion of the
          parameter, method, unit codes table file and builds it
          as an array in core storage.

     o    BUILD-STANDARDS-TABLE
          This routine reads in the parameter standards table
          file and builds it as an array in core storage.

     o    SEARCH-TABLES
          This routine searches the valid site code table array
          and the parameter, method, unit codes table array and
          returns the subscripts of the correct entries.
                                       24

-------
LOCATE-STANDARD
This routine locates the appropriate state and federal standards
for the parameter in question.  Refer to section 4.3 for a
discussion of the selection algorithm.

ERROR-ROUTINE
This routine handles the printing of error messages.
                              25

-------
S - Organization
Figure 2.3.1
          26

-------
                   .OGRAMS
AQDHS provides three conversio . r_ .„  — *• •"" -ii«;  r -        ig data  into
and extracting data from the AQDHS master file.  Two provide  conversi.
of data for input to AQDHS.  They are the Old AQDHS File  to New AQDHS
Input and the Old AQDHS (SAROAD) Input to New AQDHS Input  conversion
programs.  The AQDHS File to SAROAD Input conversion program  extracts
data from the AQDHS master file for submission to SAROAD.
                                        27

-------
3.1   OLD AQDHS FILE TO NEW AQDHS INPUT

The Old AQDHS File to New AQDHS Input conversion program extracts the
information contained in an old format AQDHS master file and converts
it to the new AQDHS input format.  These transactions may then be run
through the Transaction Editor and File Maintenance programs to build
a new format AQDHS master file.

All data in the old AQDHS master file should be sent to SAPOAD before
the conversion to the new AQDHS master file ae this program sets
the status flag to 'S'3 indicating that the data has been sent to
SAROAD.

In order for this conversion program to work correctly, the format of
the old AQDHS master file must correspond to the file description in
APTD-1086.  Any other file format will cause unpredictable results.

The name of the load module is BXCONVRT.
                                     28

-------
3.1.1   ORGANIZATION

The Old AQDHS File  to New AQDHS  Input  conversion program  is  organized
in a top down, modular structure.  There  is only one  entrance  and  one
exit from the program, both contained  in  the highest  level module.
Each lower level module invoked  has  the same characteristics:  one
entrance and one exit.

     o    MAIN-LOOP
          This routine is performed  by ROOT-SEGMENT until an
          end-of-file is detected on the  old AQDHS file.  First
          the time codes are checked for  form-1, form-2,  or  an
          invalid form number.   If it  is  a form-1 (less than
          daily sampling interval),  CONVERT-TO-FORM-1 is
          performed.  If it is a form-2 then CONVERT-TO-FORM-2
          is performed, otherwise an error message is printed.
          F-fnoiiv  RjrAn_tmnTTMF  -to -erformed whii*=    __!_  _'.._
          next old AQDHS record.

     o    CONVERT-TO-FORM-1
          This routine builds a  new  AQDHS input record.   First
          the data fields are moved.  Then EXTRACT-TRANS-1 is
          performed which edits  and  moves the valid readings
          to the new record.  If there are any readings in the
          new record then WRITE-ROUTINE is performed which writes
          a new AQDHS record.

     o    CONVERT-TO-FORM-2
          This routine builds a  new  AQDHS input record.  First
          the data fields are moved.  Then EXTRACT-TRANS-2 is
          performed which edits  a specific data field and moves
          it to the new record;  afterwards, WRITE-ROUTINE is
          performed.

Figure 3.1.1 shows the organization  of BXCONVRT.
                                       29

-------
-;.  - k i ganiz
,--•„, v ,  •  '   i
£•  -p, .: c  •, j. . i
            30

-------
3.1.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.  If true, a data set end-
          of-file has been detected.
                                       31

-------
3.1.3   ROUTINES

The following are major subroutines of the Old AQDHS File to New AQDHS
Input conversion program.

     o    PRINT-SAROAD-RECORD
          This routine reformats the old AQDHS file record
          and prints it out.

     o    READ-ROUTINE
          This routine reads an AQDHS record and performs
          PRINT-SAROAD-RECORD.

     o    WRITE-ROUTINE
          This routine writes a new AQDHS record.
                                     32

-------
3.2   OLD AQDHS (SAROAD) INPUT TO NEW AQDHS INPUT

This program accepts old AQDHS (SAROAD) format transactions and action
cards and outputs new AQDHS format transactions.  These transactions
may then be used to create or update the AQDHS master file.

An action card indicates the action to be performed by all old AQDHS trans-
actions following it until the next action card is encountered.  Action
cards are identified by a '$' in column 1 and an action code in column 2.
There are three valid action codes: '!', '2', and '3'.  '!' signals
'delete1, '2' indicates 'add' and '3'  means 'change'.  A '$4' card is a
status flag card and indicates that all old AQDHS transactions following
it have been sent to SAROAD and the program begins generating a status
flag of 'S'  on the new AQDHS output transactions.  This status flag code
does not override the action code currently in effect (1,  2 or 3) nor
can it be reset for the rest of the execution of the program.

The name of the load module is CXCONVRT.
                                       33

-------
3.2.1   ORGANIZATION

The Old AQDHS (SAROAD) Input to New AQDHS Input conversion program is
organized in a top down, modular structure.  There is only one entrance
and one exit from the program, both contained in the highest level
module,  iiach lower level module invoked has the same characteristics:
one entrance and one exit.

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an
          end-of-filc is detected on the input file.  First the
          input record is tested for an action card and, if it
          is, the action code is saved.  If it is a valid trans-
          action, then CONVERT-TRANS is performed which branches
          to CONVERT-TRANS-1, CONVERT-TRANS-2, or CONVERT-TRANS-3
          depending on the transaction code.  Finally, READ-ROUTINE
          is performed which reads the next input record.

Figure 3.2.1 shows the organization of CXCONVRT.
                                      34

-------
CXCONVKT - Organization
      Figure 3.2.1
                35

-------
3.2.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.   If true, a data set
          end-of-file has been detected.

     o    SAROAD-STATUS-IS-SENT-SW
          May contain TRUE or FALSE.   If true, the status of
          TRANS-STATUS-FLAG will be sent ('S').

     o    ACTION-CODE-SAVE
          Carries the value of the current action card in
          effect (other than 'sent').
                                       36

-------
3.2.3   ROUTINES

The following are major subroutines of the Old AQDHS (SAROAD) Input to
New AQDHS Input conversion program.

     o    CONVERT-TRANS
          This routine edits the fields on the input record
          for valid data.  If invalid, an appropriate error
          message is printed out.

     o    READ-ROUTINE
          This routine reads an input record until end-of-
          file.  Then TRUE is moved to END-OF-FILE-SW.

     O    SPLIT-TRANS-1
          This routine splits the input transaction between
          two work areas and re-calculates the start hour in
          the second work area.  If there is data in the work
          data fields, then WRITE-TRANS is performed.

     o    WRITE-TRANS
          This routine writes the output transactions and
          clears the transaction work area.
                                      37

-------
3.3   AQDHS FILE TO SAROAD INPUT

The AQDHS File to SAROAD Input conversion program provides the user with
the capability of periodically extracting new or changed data from the
AQDHS master file and sending it to SAROAD for inclusion in the National
Aerometric Data Bank.  It is still the user's responsibility, however,
to notify the EPA Regional Office and the NADB when previously submitted
data is deleted from the AQDHS master file.

All data which has been previously sent to SAROAD is not re-sent.   All
data which has been previously sent to SAROAD but has been changed is
sent as a change transaction.  All new data is sent as an add transaction.
As each reading is sent to SAROAD, its associated status flag is changed
from 'A' or 'C' to 'S', indicating that it has been sent.  The master
file output from this program contains the same information as the
input master file except that all status flags are set to 'S1.  This
master file thereby becomes to current AQDHS master file.

There are two ouput files containing transactions to be sent to the NADB.
One file will begin with a '$2' action card followed by all add trans-
actions, if any.  The other file will contain a '$3' action card and all
change transactions, if any.  The '$2' and '$3' cards indicate the
action to be performed by the transactions following them, add or change.

The name of the load module is AXCONVRT.
                                      38

-------
3.3.1   ORGANIZATION

The AQDHS File to SAROAD Input conversion program is organized in a top
down, modular structure.  There is only one entrance and one exit from
the program, both contained in the highest level module.  Each lower level
module invoked has the same characteristics: one entrance and one exit.

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an
          end-of-file is detected on the AQDHS master file.
          It determines the form code and invokes the appropriate
          conversion routine.  If the record has any add or
          change fields, a record is written to the SAROAD add
          file or the SAROAD change file.  Afterwards, a new
          master file record is written and an old master file
          record is read.

     o    CONVERT-FORM-1 and CONVERT-FORM-2
          These routines build the SAROAD transaction records.
          First the ident key is moved from the master record.
          Then CONVERT-TIME-CODE is performed to convert the
          AQDHS time code to SAROAD time code.  Next EXTRACT-DATA
          is performed to build the SAROAD add or change
          fields of the SAROAD transaction record.  If the add
          or change fields are built, a record is then written.

Figure 3.3.1 shows the organization of AXCONVRT.
                                       39

-------
               MAIN-LOOP
  CONVKkT-
   FOKM-I
AXCONVR1]  - Organization
       Fi gu r e 3.3.1

-------
3.3.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.  If true, a data set
          end-of-file has been detected.

     o    TIME-CODE-LOCATED-SW
          May contain TRUE or FALSE.  If true, a match from
          a master file record is equal to a time code in
          the time-code-table.

     o    TYPE-IS-ADD-SW
          May contain TRUE or FALSE.  If true, a record is
          written to the add file.

     o    WRITE-TRANS-SW
          May contain TRUE or FALSE.  If true, a Form-1 record
          is written.

-------
3.3.3   ROUTINES

The following are major subroutines of the AQDHS File to SAROAD Input
conversion program.

     o    EXTRACT-DATA-1
          This routine extracts readings and converts all the
          add or change flags in the master record to 'S',
          indicating that it has been sent to SAROAD.

     o    EXTRACT-DATA-2
          This routine extracts readings and converts all the
          add or change flags in the master record to 'S'.
          If the status is not 'S', the INCREMENT-BY-TIME-CODE
          routine is performed.  Then a SAROAD add or change
          record is written.

     o    INCREMENT-BY-TIME-CODE
          This routine converts the time code from the master
          record to hour, day, or month for the SAROAD trans-
          action record.

     o    READ-ROUTINE
          This routine writes a new master file record and
          then reads the next old master file record.

     o    WRITE-ROUTINE
          This routine writes a SAROAD add or change record and
          performs INCREMENT-BY-TIME-CODE.
                                      42

-------
4.0   TABLE MAINTENANCE

Three programs are provided by AQDHS to maintain tables necessary for
editing and report formatting.  They are the Parameter Code Table
Maintenance, the Site Code Table Maintenance and the Parameter Standards
Table Maintenance programs.  As with File Maintenance, they are used
to create and update their respective tables.
                                         43

-------
4.1   PARAMETER CODE TABLE MAINTENANCE

The Parameter Code Table Maintenance program creates and maintains a
table containing the valid combinations of parameter code, analysis
and collection methods code, units code and the minimum detectable value
of the parameter.

The table is stored externally in two segments. The key portion of the
table, containing the parameter codes, methods codes, units codes and
minimum detectable values, is stored in one segment while the associated
description portion is stored in the other segment.  The description
portion contains prose descriptions of the values contained in the
key portion of the table.

The Parameter Code Table flaintenance program operates in one of three
modes: ADD, CHANGE and DELETE.  The transactions entered into the
program determine the mode of operation.

Two transactions must be entered for each entry in the table.  The table
file is searched in an attempt to match the key of the transactions with
the key of an entry in the table.  If no match can be found, the program
operates in ADD mode and adds the entry described by the transactions to
the table.  If a matching key is found, the description portions of the
transactions are examined.  If they are blank, the program operates in
DELETE mode and deletes the entry from the table.  Otherwise, the program
operates in CHANGE mode and replaces the description portion of the table
entry with the description portions of the transactions.

Refer to Figure A.1.4 for a description of the transactions.
                                     44

-------
The transactions must be sorted on the following fields before being read:
          Key
          Transaction-id
bytes 2-15
byte 1
ascending
ascending
The name of the load module is HXTABLE1.
                                     45

-------
4.1.1   ORGANIZATION

The Parameter Code Table Maintenance program is organized in a top down,
modular structure.  There is only one entrance and one exit from the
program, both contained in the highest level module.  Each lower level
module invoked has the same characteristics:  one entrance and one
exit.

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an
          end-of-file is detected on the transaction file.
          First, EDIT-TRANS is performed, which validates the
          fields in the transactions.  If the cards are valid,
          LOCATE-MSTR is performed until the proper position
          is located.  The required update is then performed.
          Finally, READ-ROUTINE is performed which reads two
          cards into the transaction work area.

Figure 4.1.1 shows the organization of HXTABLE1.
                                      46

-------
I

I
I) IT-TRANS
                                             RKAD-liOUTINK
        HXTABLE1 -  Organization
              Figure  4.1.1
                         47

-------
4.1.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.   If true,  a data set
          end-of-file has been detected.

     o    ERROR-FOUND-SW
          May contain TRUE or FALSE.   If true,  an error has
          been detected during the card read routine processing.

     o    LAST-TRANS-WAS-DELETE-SW
          May contain TRUE or FALSE.   If true,  the last
          transaction deleted a parameter table entry.

     o    READ-SUPPRESSED-SW
          May contain TRUE or FALSE.   If true,  suppresses  the
          reading of the transaction file.

     o    RECORD-LOCATED-SW
          May contain TRUE or FALSE.   If true,  the transactions
          have been matched against the parameter table.

     o    TRANS-REJECTED-SW
          May contain TRUE or FALSE.   If true,  there is an error
          in one or more of the input data fields being edited.

     o    KEY-SAVE
          Contains the current old parameter table key until
          end-of-file, then it is replaced with high values.
                                       48

-------
4.1.3   ROUTINES

The following are major subroutines of the Parameter Code Table Main-
tenance program.

     o    COPY-MSTR
          This routine performs WRITE-MSTR which writes out the
          new parameter table records unless the last transaction
          delete switch is on.  Next, it moves the old parameter
          table records to work areas.  Last, READ-MSTR is per-
          formed which reads the old parameter table files.

     o    EDIT-TRANS
          This routine edits the fields in the input card for valid
          data.  If invalid, an appropriate error message is
          printed out.

     o    LOCATE-MSTR
          This routine cycles through the parameter table files,
          performing COPY-MSTR and WRITE-MSTR until an equal-to
          or greater-than condition occurs between the old
          parameter table and the input data.

     o    READ-CARD-ROUTINE
          This routine reads two cards and verifies that they
          have the same key and are in the proper sequence.  If
          there is an error, an appropriate error message is
          printed out.

     o    READ-ROUTINE
          This routine performs READ-CARD-ROUTINE until
          END-OF-FILE-SW is true or ERROR-FOUND-SW is false.
                                       49

-------
Parameter Code Table Transactions
Card 1
Columns
1
2-6
7-8
9-10
11 - 14
15
16 - 45
46 - 70
71 - 80
Card 2
Columns
1-15
16 - 40
41 - 70
71 - 80

Format
9
99999
99
99
9999
9
X - X
X - X


Format

X - X
X - X

                                        Symbol

                                        Numeric
                                        Numeric
                                        Numeric
                                        Numeric
                                        Numeric
                                        Numeric
                                        Alphameric
                                        Alphameric
                                        Symbol
                                        Alphameric
                                        Alphameric
Description

Card Type
Parameter Code
Method Code
Units Code
Minimum Detectable
Decimal Point
Parameter Description
Collection Method
Unused
Description

Same as Card 1
Analysis Method
Units Description
Unused
                   Parameter Code Table Transactions
                             Figure 4.1.4
                                      50

-------
4.1.4   DESCRIPTION OF PARAMETER CODE TABLE TRANSACTION FIELDS

Card Type:  Identifies the transaction as either card 1 or card 2 of a
     two card set.  Valid values are 1 and 2.

Parameter Code:  Identifies the parameter being described.  Refer to
     APTD-0633 for a full list of currently accepted parameter codes.

Method Code:  Identifies both the collection method and the analysis
     method of the parameter being described.

Units Code:  Indicates the units in which the minimum detectable value
     is expressed.  A partial list may be found in Appendix A, Table 4.

Minimum Detectable:  Specifies the minimum value detectable using the
     specified collection and analysis methods.

Decimal Position:  A single-digit number from 0 to 4 which indicates
     the number of digits in the minimum detectable value that are to
     fall to the right of the decimal point.

Parameter Description:  A prose description of the parameter.

Collection Method:  A prose description of the collection method.

Analysis Method:  A prose description of the analysis method.

Units Description:  A prose description of the units.
                                      51

-------
4.2   SITE CODE TABLE MAINTENANCE

The Site Code Table Maintenance program creates and updates a table
containing valid site codes for this installation of AQDHS plus a prose
description of the site.

The key of each transaction contains the full coded identification of
the site:  state code, area code, site code, agency code and project
code.  If a matching key is found in the table file and the site
description in the transaction is blank, the table entry is deleted
from the file.  If the transaction description is not blank, it
replaces the description in the table.  If no matching key is found,
a new table entry is created.  This process is identical to that
described in section 4.1.

Refer to Figure 4.2.4 for a description of transaction.

The transactions must be sorted on the following field before being
used:

          Key                 bytes 1-12          ascending

The name of the load module is HXTABLE2.
                                      52

-------
4.2.1   ORGANIZATION

The Site Code Table Maintenance program Is organized In a top down,
modular structure.  There Is only one entrance and one exit from the
program, both contained in the highest level module.  Each lower level
module invoked has the same characteristics:  one entrance and one exit.

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an end-
          of-file is detected on the transaction file.  First
          EDIT-TRANS is performed which validates the fields on
          card input.  If the fields on the card are valid,
          LOCATE-MSTR is performed until the master file is
          positioned properly.  The required update is then
          performed.  Finally, READ-TRANS is performed which
          reads the next card.

Figure 4.2.1 shows the organization of HXTABLE2.
                                        53

-------
HXTABLE2 - Organization
      Figure 4.2.1
               54

-------
A.2.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.  If true, a data set
          end-of-file has been detected.

     o    LAST-TRANS-WAS-DELETE-SW
          May contain TRUE or FALSE.  If true, the last
          transaction deleted a site code table entry.

     o    RECORD-LQCATED-SW
          May contain TRUE or FALSE.  If true, the trans-
          action has been matched against the site code
          table.

     o    TRANS-REJECTED-SW
          May contain TRUE or FALSE.  If true, there is an
          error on one or more of the input data fields being
          edited.

     o    KEY-SAVE
          Contains the current site code table key until end-
          of-file, then it is replaced with high values.
                                      55

-------
4.2.3   ROUTINES

The following are major subroutines of the Site Code Table Maintenance
program.

     o    COPY-MSTR
          This routine performs WRITE-MSTR which writes out the
          site code table record unless the last transaction
          delete switch is on.   Next,  it moves the old site code
          table record to a work area.

     o    EDIT-TRANS
          This routine edits the fields on card input for valid
          data.  If invalid, an appropriate error message is
          printed out.

     o    LOCATE-MSTR
          This routine cycles through the site code table file,
          performing COPY-MSTR and WRITE-MSTR until an equal-to
          or greater-than condition occurs between the old site
          code table and the input data.

     o    READ-MSTR
          This routine reads a site code table record and moves
          the old site code table key to key-save until end-of-
          file, then high values are moved to key-save.

     o    READ-TRANS
          This routine reads a transaction record and at end-of-
          file turns the END-OF-FILE-SW on.
                                      56

-------
Site Code Table Transaction
Columns
               Format
                   Symbol
                    Description
 1
 3
 7

11
13
73
 2
 6
 9
10
12
72
80
   XX
 9999
  999
    A
   99
X - X
Alphameric
Numeric
Numeric
Alphabetic
Numeric
Alphameric
State Code
Area Code
Site Code
Agency Code
Project Code
Site Description
Unused
                      Site Code Table Transaction
                             Figure 4.2.A
                                      57

-------
4.2.4   DESCRIPTION OF SITE CODE TABLE TRANSACTION FIELDS

State Code:  Indicates the state (or other geographic division)  in which
     the sampling site is located.

Area Code:  Identifies the area within the state in which the sampling
     site is located.

Site Code:  Identifies the sampling site.

Agency Code:  Identifies the agency responsible for this sampling site.
     Valid codes are found in Appendix A, Table 1.

Project Code:  Identifies the project using this sampling site.   Valid
     codes are found in Appendix A, Table 2.

Site Description:  A prose description of the sampling site.
                                        58

-------
4.3   PARAMETER STANDARDS TABLE MAINTENANCE

The Parameter Standards Table Maintenance program is used to create and
maintain a table containing both state and federal parameter standards.
Both of these standards may then appear on any reports relating to those
parameters.

A maximum of one state standard and one federal standard will be selected
for each report. Each standard is selected in the following fashion.
The table is searched and the location of the first state or the first
federal standard for the parameter in question is saved.  An attempt is
then made to match the unit codes in the master file with those in the
table.  If more than one match is made on the unit codes, the first one
encountered is used.  If no match on unit codes is made, the first standard
for the parameter is used.  Therefore, it is important to enter standards
in order of decreasing priority.  It may be desirable to create several
standards tables with different priorities assigned to a given standard.

The key of each transaction contains the following information: parameter
code, federal/state flag, and standard number.  If a matching key is
found in the table file and the description on the transaction is not
blank, the proper description (primary or secondary) in the table entry
is replaced.  If the description is blank and the transaction indicates
a primary standard, the entire table entry is deleted.  Otherwise, only
the secondary standard is deleted.  If no matching key is found, a new
table entry is created.

Refer to Figure 4.3.4 for a description of the transaction.

The transactions must be sorted before being input on the following fields:

          parameter code           byte 1-5       ascending
          federal/state flag       byte 6         ascending
                                      59

-------
          standard number          bytes 7-8      ascending
          primary/secondary flag   byte 9         ascending

The name of the load module is HXTABLE3.
                                      60

-------
4.3.1   ORGANIZATION

The Parameter Standards Table Maintenance program is organized into two
routines, the root segment and the main loop.

     o    ROOT-SEGMENT
          Opens the data sets required by the program module,
          initializes work areas, switches, and files.  Next,
          the data file is processed by MAIN-LOOP until end-
          of-file.  Table entries are written or deleted
          according to edited input.  Finally, summary totals
          are written, files closed, and then the root segment
          terminates the run.

     o    MAIN-LOOP
          Editing is performed on card input by EDIT-TRANS.
          If no errors are found, LOCATE-MSTR is performed
          until record found switch is true and it is not a
          delete entry.  Then the master record is updated
          or a new record added.  Perform the READ-ROUTINE.

Figure 4.3.1 shows the organization of HXTABLE3.
                                        61

-------
            MAIN-LOOP
 LOCATK-MSTR
                                      READ-ROUTINE
KXTABLE3  - Organization
       Figure 4.3.1
                62

-------
4.3.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names;

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.  If true, a data set
          end-of-file has been detected.

     o    LAST-TRANS-WAS-DELETED-SW
          May contain TRUE or FALSE.  If true, the last
          transaction deleted a standards table record.

     o    RECORD-FOUND-SW
          May contain TRUE or FALSE.  If true, either a new
          record is added or an old record is changed.

     o    TRANS-REJECTED-SW
          May contain TRUE or FALSE.  If true, an error or
          errors have been found upon editing card input.

     o    KEY-SAVE
          Contains the old standards table key until end-
          of-file, then it is changed to high values.

-------
4.3.3   ROUTINES

The following subroutines are part of the MAIN-LOOP.

     o    EDIT-TRANS
          This paragraph edits all fields for valid data.   If
          any fields are invalid,  they are flagged and
          ERROR-ROUTINE is performed which lists an appropriate
          error message.

     o    LOCATE-MSTR
          This paragraph positions the standards file so that
          an existing record may be updated or deleted or  a
          new record may be created.

     o    READ-ROUTINE
          This paragraph reads a card and lists it.

     o    UPDATE-RECORD
          This paragraph checks to see if the input record is
          new or old, lists an added or replaced message,  and
          updates the work area.
                                    64

-------
Parameter Standards Table Transaction
Columns
               Format
                   Symbol
                    Description
 1 -
 7 -
10
12
62
 5
 6
 8
 9
11
61
80
99999
    A
   99
    9
   99
X - X
Numeric
Alphabetic
Numeric
Numeric
Numeric
Alphameric
Parameter Code
Standard Source (F/S)
Standard Number
Standard Type
Units Code
Standard
Unused
                 Parameter Standards Table Transaction
                             Figure 4.3.4
                                       65

-------
4.3.4   DESCRIPTION OF PARAMETER STANDARDS TABLE TRANSACTION FIELDS

Parameter Code:  Identifies the parameter for which this standard applies.
     Refer to APTD-0633 for a full list of currently accepted parameter
     codes.

Standard Source:  Identifies the source of this standard.  Valid codes
     are F for federal and S for state.

Standard Number:  A two-digit number indicating the frequency of use of
     this standard.  01 should represent the most frequently used
     standard for this parameter (i.e. the default to be used when no
     match can be made on units code).

Standard Type:  Differentiates between primary and secondary standards.
     Valid codes are 1 for primary standard and 2 for secondary standard.

Units Code:   Indicates the units in which the standard is expressed.  A
     partial list may be found in Appendix A, Table 4.

Standard Description:  A prose description of the standard.
                                       66

-------
5.0   FILE MAINTENANCE AND TRANSACTION EDITOR

Two programs are used to build and maintain the AQDHS master file.  They
are the Transaction Editor program and the File Maintenance program.  The
AQDHS File to SAROAD Input program also modifies the AQDHS master file.
Refer to Section 3.3 for a discussion of these modifications.
                                        67

-------
5.1   TRANSACTION EDITOR

The Transaction Editor program performs two basic functions.  First, it
edits all input transactions for correctness and informs the user of any
errors.  Second, it converts all input transactions passing the edit into
an internal format usable by the File Maintenance program.  The editing
and conversion of a transaction is unaffected by any other transaction,
either preceding or following.  Therefore, transactions may be entered
in any order.

The internal format transactions output from the Transaction Editor
program must be sorted into master file sequence before they are input
to the File Maintenance program.  The order of the sort is as follows:

          Key-1               bytes 4-18          ascending
          Key-3               bytes 25-34         ascending
          Key-2               bytes 19-24         ascending
          Action-code,        bytes 1-3           ascending
          Form-code ft
          Status-flag

The action to be performed by an input transaction is indicated by the
action code in column 80.  A one (1) indicates that the master file record
identified by this transaction is to be deleted.  A two (2) indicates that
the data on this transaction is to be added to the master file.  This
may occur through the creation of a new master file record or through
addition to an existing master file record.  A three (3) in column 80 indi-
cates that the data on this transaction is to replace data already existing
in a master file record.  The same action code appears in the internal
transaction following conversion.

Each diagnostic message pertaining to an input transaction is self-
explanatory and contains the column number of the first column of the
                                       68

-------
field in error.  Errors detected in the repeating fields of the form 2
and form 3 transactions do not cause the entire transaction to be
rejected but only the repeating field containing the error.

Refer to Figure 2.2-2.1 for the formats of the transactions.

The name of the load module is TXTREDIT.
                                       69

-------
5.1.1   ORGANIZATION

The following are the main modules of the Transaction Editor program.

     o    MAIN-LOOP
          Performed by ROOT-SEGMENT, this routine edits input
          transactions, creating internal (system recognizable)
          transactions.  Depending on the input transaction
          code, the routine performs a lower level segment to
          edit the different transaction formats.

     o    CONVERT-TRANS
          Performed by MAIN-LOOP, this routine performs lower
          level segments to do the actual editing and to write
          the "edited" form out to the internal transaction
          file.

     o    SCAN-FULL-KEY
          Performed by CONVERT-TRANS, this routine scans the
          input transaction in its entirety for user errors,
          e.g., invalid time code, non-numeric project code,
          invalid day, etc.

     o    TRANS-1-REPEAT
          This routine is performed by CONVERT-TRANS when the
          input transaction form code is "1".  It performs the
          necessary editing functions on the readings and in
          the case of invalid entries, prints out appropriate
          error messages.

     o    TRANS-2-REPEAT
          This routine is performed by CONVERT-TRANS when the
          input transaction code is "2".  It performs the
                                       70

-------
          necessary editing functions on the repeating fields
          and, in the case of invalid entries, prints out
          appropriate error messages.

     o    TRANS-3-REPEAT
          This routine is performed by CONVERT-TRANS when the
          input transaction code is "3".  It performs the
          necessary editing functions on the repeating fields
          and, in the case of invalid entries, prints out
          appropriate error messages.

Figure 5.1.1 shows the organization of TXTREDIT.
                                       71

-------
TXTREDIT - Organization
      Figure 5.1.1
               72

-------
5.1.2   COMMUNICATION AND DATA FORMATS

The following COBOL working storage section fields are the major control
and data areas internal to the Transaction Editor program.

     o    END-OF-FILE-SW
          When equal to TRUE,  indicates that an end-of-file
          has occurred on the  input transaction file.

     o    FULL-SCAN-SW
          Used by the routines which scan the form 2 and form
          3 transactions.  When equal to FALSE, indicates
          that only the fields in the repeating segments
          are to be scanned rather than the entire key.

     o    "1AXIMUM-VALUES
          A table containing the maximum values of certain
          parameter/unit codes combinations.  Any reading
          exceeding a value in this table will be rejected.

     o    WORK-TRANSACTION
          The area in which the internal format transaction
          is built.
                                    73

-------
5.1.3   ROUTINES

The following are internal subroutines of the Transaction Editor
program.

     o    LOCATE-MAX-VAL
          Searches the MAXIMUM-VALUES table attempting to match
          the parameter and unit codes in the transaction with
          those in the table.

     o    SEARCH-FOR-PARM
          Searches the key portion of the parameter,  method,  unit
          codes table attempting to match the combination in  the
          transaction with one in the table.  If no match is
          found, the field in error in the transaction is flagged
          by a diagnostic message.

     o    SEARCH-FOR-SITE
          Searches the valid site code table attempting to match
          the site identification in the transaction  with an
          entry in the table.  If no match is found,  the field
          in error in the transaction is flagged by a diagnostic
          message.
                                        74

-------
5.2   FILE MAINTENANCE

The File Maintenance program is used to create and maintain the AQDHS
master file.  Internal format transactions from the Transaction Editor
program are used to accomplish these functions.  These internal trans-
actions must be sorted into file sequence before they are input to
the File Maintenance program (see cataloged procedure AQSFUPDT).

Each internal transaction either adds data to, changes data in or
deletes data from the AQDHS master file.  Any combination of sites,
parameter codes, sampling intervals, etc., may be entered in one
execution of the File Maintenance program with the following exception:
each composite type (annual, weekly3 etc. ) must be entered in a separate
execution of the program.  Otherwise, the data may be separated in the
file rather than being collected into one record (i.e. multiple reports
may be generated with one reading each).

If, at the time a master file record is created, ail readings are not
supplied, all blank fields up to the last supplied reading are filled
with nines to indicate a null reading.  These fields may then be updated
by either an Add or a Change transaction.  It is illegal to attempt to
Change a non-existing reading or to Add to an existing reading.

If a reading has been unchanged since its submission to SAROAD, its
status flag is 'S1.  If it has been changed since submission to SAROAD,
its status flag is 'C'.  Its status flag is 'A* if it has not yet been
sent to SAROAD.

Refer to Figure 2.2-1.1 for the format of the master file records.

The name of the load module is FXFILMNT.
                                       75

-------
5.2.1   ORGANIZATION

The following are the main modules of the File Maintenance  program.

     o    MAIN-LOOP
          Performed by ROOT-SEGMENT,  this routine (on the basis
          of the transaction action code) performs lower  level
          segments to either add a record or data to the  file,
          change a record in the file or delete a record  from
          the file.

     o    FM-ADD
          This routine, performed by MAIN-LOOP, controls  the
          adding of records or data to the system master  file.
          It performs lower level routines to locate the  place
          in the old master where the record should be added
          and adds the record to the new master file.

     o    FM-CHANGE
          This routine, performed by MAIN-LOOP, controls  the
          changing of a record on the system file.  It performs
          lower level routines that locate the record to  be
          changed, makes the appropriate changes, and writes
          the updated record onto the file.

     o    FM-DELETE
          This routine, performed by MAIN-LOOP, controls  the
          deletion of a record from the system master file.
          It performs lower level routines to locate the
          record to be deleted and deletes it from the file.
                                       76

-------
     o    FM-READ-TRANS
          Performed by MAIN-LOOP, this routine reads the next
          record from the transaction file.

Figure 5.2.1 shows the organization of FXFILMNT.
                                      77

-------
FM-DELETE
                                    FM-CHANGE
              FXFILMNT  -  Organization
                    Figure 5.2.1
                               78

-------
5.2.2   COMMUNICATION AND DATA FORMATS

The following COBOL working storage section fields are the major control
and data areas internal to the File Maintenance program.

     o    END-OF-FILE-SW
          When equal to TRUE, indicates that an end-of-file
          has occurred on the transaction file.

     o    LAST-TRANS-WAS-DELETE-SW
          When equal to TRUE, indicates that the preceding
          transaction deleted a record from the master file.

     o    MSTR-RECORD-LOCATED-SW
          Used by LOCATE-MSTR to indicate the positioning of
          the master file.  When equal to 0, the master file
          has not been properly positioned.  When equal to 1,
          the master file has been positioned and the key of
          the transaction is greater than the preceding master
          file record but less than the following master file
          record.  The only valid action which may be taken
          is to build (add) a new record from the transaction.
          When equal to 2, the master file has been positioned
          and a matching key has been found.  Data may be
          added to or changed in the record or the record may
          be deleted.
                                       79

-------
5.2.3   ROUTINES

The following are internal subroutines of the File Maintenance program.

     o    FM-COMPUTE-SUB
          This routine calculates the position within the
          master file record into which the first reading on
          the transaction will be placed.

     o    FM-COPY-MSTR
          This routine copies records from the old master file
          into the new master file.

     o    FM-LOCATE-MSTR
          This routine uses the key of the transaction to
          position the master file so that the action indicated
          on the transaction may be performed.

     o    FM-SCAN- RECORD
          This routine scans the new master file record before
          it is written to the new master file.  Any readings
          which have not been supplied by this point will be
          filled with nines to indicate that they are null.
                                       80

-------
6.0   DATA RETRIEVAL

The capability to retrieve data from the AQDHS master file is provided
by the Retrieval Language Processor program and the Retrieval program.
                                        81

-------
6.1   RETRIEVAL LANGUAGE PROCESSOR

The Retrieval Language Processor program generates the actual Retrieval
program based on English-like requests entered by the user.   These
retrieval requests are edited and, if no severe errors are found,  the
Retrieval program is compiled and executed to extract any data meeting
the user's specification.  Those records in the master file which have
qualified are placed in a separate answer file for subsequent processing.
The records in the answer file are in the same order and have the same
format as the records in the master file.  Therefore, the answer file
may be used by any program which accepts the master file for processing.
Care should be used, however, as the answer file is a subset of the master
file.  Consequently, any changes to the answer file will not necessarily
be reflected in the master file.

Every retrieval request contains two control cards.  The $$END card
signals the end of the request.  The $$SELECT card signals the beginning
of the request and the type of request.  There are three different
types of request:  AQDHS retrieval language specifications, inline
COBOL language specifications and copied COBOL language specifications.

Refer to Figure 6.1.4-1 for the formats of the $$SELECT and $$END cards.

Retrieval specifications written in the AQDHS retrieval language are
entered immediately following the $$SELECT card, expressing one relation-
ship per card.  For example, A = B expresses a relationship where A is
the subject name, = is the relational operator and B is the object name.
Multiple relationships may be expressed by connecting single relationships
with a Boolean operator.  For example, A = B AND C = D OR E = F expresses
three relationships, A = B, C = D and E = F connected by the Boolean
operators AND and OR.

Refer to Figure 6.1.4-2 for the format of the AQDHS retrieval language
specifications.
                                       82

-------
The subject name field and object name field may each contain either a
valid data name (see Figure 6.1.4-3) or a literal enclosed in apostrophes.
An invalid data name or missing apostrophes will cause the retrieval to
abort.  Parentheses may be used for grouping provided that the first
occurrence of a repeating data name is not enclosed in parentheses.
After the first occurrence of a repeating name, parentheses may be used
freely.  Parentheses must be balanced when the specifications are
terminated.

The negation field must contain the negation character, 'N', or blank.
Any other character will result in a warning message.  The program will
then assume that negation was intended and continue processing.

An invalid relational or Boolean operator will cause the retrieval
to abort.

The Boolean operator field may contain blanks or the words AND or OR.
Blanks in this field signal the end of the retrieval specification and
terminate editing.  The program then expects that the next card x^ill
be the $$END card.  The words AND or OR indicate that another relation-
ship follows and that editing is to continue.

Inline COBOL language specifications are entered immediately following
the $$SELECT card.  These cards are punched according to COBOL rules
for syntax and punctuation.  Any user defined paragraph or section
name should begin with the prefix, USER-, to avoid conflict with other
names in the program.  Any valid PROCEDURE DIVISION statements, with
the exception of DECLARATIVES, may be entered.  Since the Retrieval
Language Processor program does not examine the statements, any errors
could result in COBOL diagnostics or unpredictable results.  A data
name named SUB (PIC 99 COMP SYNC) is provided for use as a subscript
for referencing repeating data names.
                                     83

-------
Copied COBOL language specifications have the same attributes as inline
COBOL specifications.  However, they are stored externally and are copied
in at the time the Retrieval program is compiled.

Refer to Figure 6.1.4-4 for sample retrieval specifications.

The name of the load module is LXLNGPRC.
                                       84

-------
6.1.1   ORGANIZATION

The following are the main modules in the Retrieval Language Processor
program.

     o    MAIN-LOOP
          This routine has a conditional branch which branches
          to GENERATE-COBOL, COPY-COBOL, or COPY-MEMBER depending
          on the option entered on the $$SELECT card.

     o    GENERATE-COBOL
          This routine processes AQDHS retrieval language specifi-
          cations and, after editing, generates the proper COBOL
          code to perform the retrieval.

     o    COPY-COBOL
          Inline COBOL language specifications are copied into
          the Retrieval program skeleton by this routine.

     o    COPY-MEMBER
          Code to copy an external COBOL member into the Retrieval
          program skeleton is generated by this routine.

Figure 6.1.1 shows the organization of LXLNGPRC.
                                       85

-------
              MAIN-LOOP
                                 CKNL'RATK
                                  COBOL
                                COPY-COBOL
                               COPY-MKMBKR
LXLNGPRC - Organization
      Figure 6.1.1
                  86

-------
6.1.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    BOOLEAN-SW
          May contain 'O1 (NO-PRECEDING-BOOLEAN), '!' (LAST-
          BOOLEAN-WAS-OR), or '2' (LAST-BOOLEAN-WAS-AND)
          depending on the contents of the Boolean operator
          field of the last control card processed.

     o    CHECK-REPEATING-NAME-SW
          May contain TRUE or FALSE.  If true, a search is
          performed to determine whether or not the current
          data name is a repeating data name.

     o    CONTINUATION-PENDING-SW
          May contain TRUE or FALSE.  If true, Boolean checks
          are made and/or an output record is written.

     o    DATA-NAME-FOUND-SW
          May contain TRUE or FALSE.  If true, the data name
          has been found in the list of valid data names.

     o    END-CARD-FOUND-SW
          May contain TRUE or FALSE.  If true, either the
          $$END card has been found or an end-of-file has
          occurred on the control card file.

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.  If true, a data set
          end-of-file has been detected or signaled.
                                       87

-------
ERROR-FOUND-SW
May contain TRUE or FALSE.  If true, an error has
been found during editing.

IF-WRITTEN-SW
May contain TRUE or FALSE.  If true, the IF clause
has been written to the Retrieval program skeleton.

PARENS-BALANCED-SW
May contain TRUE or FALSE.  If true, the number of
left parentheses are equal to the number of right
parentheses.

REPEATINfr-NAME-SW
May contain TRUE or FALSE.  If true, the current
data name is a repeating data name.
                              38

-------
6.1.3   ROUTINES

The following are major subroutines of the AQDHS Retrieval Language
Processor program.

     o    CHECK-DATA-NAME
          This routine first performs STRIP-PARENS which strips
          the left and right parentheses from the current data
          name and replaces them with blanks.  Next SEARCH-TABLE
          is performed which checks for a valid data name.  If
          it is not a valid data name, then an error is printed.

     o    CliECK-FOR-SUBSCRIPT
          This routine first replaces the left and right paren-
          theses with blanks.  Then WORK-DATA-NAME is moved to
          DATA-NAME-BUFFER left justifying the name.  Next
          CHECK-REPEATING-DATA-NAME is performed which checks
          for a repeating data name.   If it is a repeating
          name, then '(SUB)' is moved to the output record work
          area.

     o    EDIT-NOH-REPEATING-DATA
          This routine performs PROCESS-CONTINUATION if
          CONTINUATION-PENDING-SW is true.  Next EDIT-NON-
          REPEATING-GUTS is performed which does edit checking
          and prints an error message for an invalid field or
          writes an output record.

     o    EDIT-REPEATING-DATA
          This routine performs PROCESS-CONTINUATION if
          CONTINUATION-PENDING-SW is true.  Next EDIT-REPEATING-
          GUTS is performed which does edit checking and prints
          an error message for any invalid field.  If DATA-NAME-
          FOUND-SW is true then CHECK-FOR-SUBSCRIPT is performed.
                                       89

-------
If END-OF-FILE-SW ia false, CHECK-DATA-NAME is
performed for data name and comparand.

GEN-ELSE
This routine generates an ELSE clause in the Retrieval
program.

GEN-PERFORM
The routine generates a PERFORM clause in the Retrieval
program to handle repeating data names.

PROCESS-CONTINUATION
This routine tests for a Boolean 'OR' or 'AND' and then
tests PARENS-BALANCED-SW and REPEATING-NAME-SW generating
the proper code for the switch configuration.

READ-ROUTINE
This routine reads a control card and prints it.

WRITE-READ-ROUTINE
This routine writes a record then performs READ-ROUTINE.
It is used for copying inline COBOL language specifica-
tions into the Retrieval program.
                              90

-------
Retrieval Control Cards
Columns

 1-8
      9
10 - 13
14 - 15
16 - 23
24 - 80
Format
 A - A
  AAAA
 X - X
Symbol

Alphabetic

Alphabetic

Alphameric
Description

Card Type
Unused
User Id
Unused
Member Name
Unused
                        Retrieval Control Cards
                            Figure 6.1.4-1

                                    91

-------
6.1.4-1   DESCRIPTION OF RETRIEVAL CONTROL CARD FIELDS

Card Type:  Identifies the card as either a $$SELECT card or a $$END
     card.  The keyword must be left justified within the field.

User Id:  If the keyword USER is entered in this field, it indicates
     that the retrieval request is in COBOL, rather than in AQDHS
     retrieval language.  Valid only on the $$SELECT card.

Member Name:  Specifies the name of the member in an external source
     library containing the COBOL retrieval request.  Valid only in
     conjunction with the USER option.  If blank, indicates that the
     COBOL specifications are inline, rather than on a library.
                                      92

-------
Retrieval Language Specifications
Columns
 1 -
28 -

69 -
72 -
22
23
24
25
26
27
67
68
71
80
               Format
X - X
X - X
  AAA
Symbol

Alphameric

Alphabetic

Special Character

Alphameric

Alphabetic
Description

Subject Name
Unused
Negation Flag
Unused
Relational Operator
Unused
Object Name
Unused
Boolean Operator
Unused
                   Retrieval Language Specifications
                            Figure 6.1.4-2
                                       93

-------
6.1.4-2   DESCRIPTION OF RETRIEVAL LANGUAGE SPECIFICATIONS

Subject Name:  The name of a field in the AQDHS master file record whose
     content is to be tested, or a literal (enclosed in apostrophes)  to be
     compared against the value specified by the object name.

Negation Flag:  When non-blank, indicates the Boolean NOT condition.
     Valid codes are N and space.

Relational Operator:  Indicates the relationship to be tested between
     the subject name and the object name.  Valid codes are:
          =    equal
          >    greater than
          <    less than

Object Name:  The name of a field in the AQDHS master file record whose
     content is to be tested, or a literal (enclosed in apostrophes)  to be
     compared against the value specified by the subject name.

Boolean Operator:  Connects a relationship or group of relationships  to
     another relationship or group of relationships.  Valid values are
     AND and OR.  AND indicates that both relationships or groups must
     be true in order for the entire relationship to be true.   OR
     indicates that if either relationship or group is true,  the entire
     relationship is true.
                                      94

-------
Valid Data Names for Retrieval
          ACTION-CODE
          AGENCY
          AREA-CODE
          COMPOSITE-KEY-2
          COMPOSITE-PERIOD
          COMPOSITE-SAMPLES
          COMPOSITE-TIME-CODE
          COMPOSITE-TYPE
          DATA-FIELD*
          DAY-CODE
          DECIMAL-CODE
          FORM-CODE
          IDENT-KEY
          KEY-1
          KEY-2
KEY-3
METHOD-CODE
MONTH
NBR-OF-READINGS
PARAMETER-CODE
PROJECT
RPTING-SECTION*
SITE
START-HOUR
STATE
STATUS-FLAG*
TIME-CODE
UNIT-CODE
YEAR
*  Repeating data names.
                      Valid Retrieval Data Names
                            Figure 6.1.4-3
                                       95

-------
6.1.4-3   DESCRIPTION OF RETRIEVAL DATA NAMES

ACTION-CODE:  Indicates the last action to be performed on the master
     file record.  The only possible values are '2'  for Add and '3'  for
     Change.

AGENCY:  Identifies the agency responsible for the sampling.   Valid
     codes are found in Appendix A, Table 1.

AREA-CODE:  Identifies the area in which the samples were taken.

COMPOSITE-KEY-2:  Identifies, as a group, the following fields:
          COMPOSITE-PERIOD
          COMPOSITE-SAMPLES
          COMPOSITE-TYPE
          COMPOSITE-TIME-CODE

COMPOSITE-PERIOD:  Indicates the period during which the composite
     sample was taken.  Valid codes are:
          '01' - '04'         Quarterly and Seasonal Composite
          '01' - '12'         Monthly Composite
          '01' - '52'         Weekly Composite
          '00'                Annual Composite

COMPOSITE-SAMPLES:   Indicates the number of individual samples that
     were composited.

COMPOSITE-TIME-CODE:  Indicates the interval at which the individual
     composited samples were taken.  This time code should be taken
     from Code Table 3 in APTD-0663 rather than from Appendix A,
     Table 3 in this document.
                                      96

-------
COMPOSITE-TYPE:  Indicates the interval at which the samples are
     composited.  Valid codes are:
          'I1            Quarterly Composite
          '2'            Seasonal Composite
          '3'            Monthly Composite
          '4'            Weekly Composite
          '5*            Annual Composite

DATA-FIELD:  The value of the reading or sample taken.

DAY-CODE:  The day of the month on which the sample was taken.

DECIMAL-CODE:  A single-digit number from 0 to 4 which indicates the
     number of digits in the reading that are to fall to the right of
     the decimal point.

FORM-CODE:  The number of the form used to create the master file
     record, 1, 2 or 3.

IDENT-KEY:  Identifies, as a group, the following fields:
          KEY-1
          KEY-2
          KEY-3

KEY-1:  Identifies, as a group, the following fields:
          STATE
          AREA-CODE
          SITE
          AGENCY
          PROJECT
          TIME-CODE
          YEAR
                                       97

-------
KEY-2:  Identifies, as a group, the following fields:
          MONTH
          DAY-CODE
          START-HOUR

KEY-3:  Identifies, as a group, the following fields:
          PARAMETER-CODE
          METHOD-CODE
          UNIT-CODE
          DECIMAL-CODE

METHOD-CODE:  Identifies both the collection method and the analysis
     method of the parameter being measured.

MONTH:  The month of the year during which the sample  was taken.

NBR-OF-READINGS:  The number of readings or samples contained in the
     master file record.

PARAMETER-CODE:  Identifies the parameter being measured.  Refer to
     APTD-0633 for a full list of currently accepted parameter codes.

PROJECT:  Identifies the project in association with which the sample
     was taken.  Valid codes are found in Appendix A,  Table 2.

RPTING-SECTION:  Identifies, as a group, the following repeating fields:
          STATUS-FLAG
          DATA-FIELD

SITE:  Identifies the site at which the samples were taken.

START-HOUR:  The hour at which the first sample was taken.
                                        98

-------
STATE:  Identifies the state (or other geographic division) in which
     the sampling site is located.

STATUS-FLAG:  Indicates the status of the associated reading.  Valid
     codes are:
          'A'                      Added since submission to SAROAD
          'C'                      Changed since submission to SAROAD
          'S'                      Sent to SAROAD

TIME-CODE:  Indicates the interval at which the samples were taken.
     Valid codes are found in Appendix A, Table 3.

UNIT-CODE:  Indicates the units in which the parameter was measured.
     A partial list may be found in Appendix A, Table 4.

YEAR:  The year in which the sample was taken.
                                     99

-------
Examples of Retrieval Specifications

A:
     $$SELECT
     TIME-CODE                     - '!'
     $$END

B:
     $$SELECT
     YEAR                          > '70'                   AND
     (MONTH                        < '04'                   OR
     MONTH                         > '06')                  AND
     TIME-CODE                     = '8'
C:
     AGENCY                        = 'F'                    OR
     AGENCY                        = 'G'                    OR
     AGENCY                        = 'H'                    OR
     TIME-CODE                     - 'C'         •           AND
     COMPOSITE-TYPE                = '3'
     $$END

D:
     $$SELECT USER  RETRVL01
     $$END

E:
     $$SELECT USER
          COBOL code
     $$END

                    Sample Retrieval Specifications
                             Figure 6.1.4-4
                                     100

-------
6.1.4-4  EXPLANATION OF SAMPLE RETRIEVAL SPECIFICATIONS

A:   This specification will select all data from the file with a time
     code equal to '!'.  Any data collected at intervals of other than
     hourly will not appear in the answer file.

B:   This specification will select all data collected at daily intervals
     (time code equal to '8') in the first, third or fourth quarter
     (month less than '04'  or greater than '06') of any year after 1970
     (year greater than '70').  A warning message will be printed because
     of the missing $$EWD card.

C:   This specification will select any data collected by a state agency
     (agency code equal to 'F'), a county agency (agency code equal to
     '£') or a city agency (agency code equal to 'II'), or any composite
     data (time code equal to 'C') composited at monthly intervals (com-
     posite type equal to '3').  The missing $$SELECT card will cause a
     warning message to printed.

D:   This specification will cause a member named r.ETRVLOl to be copied
     from the user's source library into the retrieval program skeleton.
     This member should contain the COBOL code necessary to perform the
     desired selection.

E:   This format would be used to test the COBOL code to be used in for-
     mat D prior to its being placed into the source library.  The COBOL
     code would simply be included between the $$SELECT and the $$END cards.
                                     101

-------
6.2   RETRIEVAL

The AQDHS Retrieval program reads the master file and, based on user
specifications edited by the Retrieval Language Processor program,
selects those records which qualify for inclusion in an answer file.
                                       102

-------
6.2.1   ORGANIZATION

The following is the main module of the Retrieval program.

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an
          end-of-file is detected on the AQDHS master file.
          First QUALIFY-RECORD is performed which is expanded
          by the Language Processor.  Next, if the RECORD-
          QUALIFIES- SW is true, then an answer record is
          written.  Finally, the next AQDHS master record is
          read.

Figure 6.2.1 shows the organization of the Retrieval program.
                                        103

-------
Retrieval - Organization
      Figure 6.2.1
                104

-------
6.2.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names:

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.   If true, a data set
          end-of-file has been detected.

     o    RECORD-QUALIFIES-SW
          May contain TRUE or FALSE.   If true, an answer
          record will be written.
                                        105

-------
6.2.3   ROUTINES

The following are major subroutines of the AQDHS Retrieval program,

     o    READ-ROUTINE
          This routine reads an AQDHS master file record.

     o    WRITE-ROUTINE
          This routine moves data to the answer file work  area
          and writes a record.

     o    QUALIFY-RECORD
          Contains the code generated by the Retrieval Language
          Processor program to perform the qualification of the
          master file record.
                                       1Q6

-------
7.0   OUTPUT PROGRAMS

AQDHS provides three output programs for producing various listings of
data contained in the master file.  These are the Detail List program,
the Sliding Average List program and the Data Analysis/Statistical List
program set.  The Data Analysis program also requires the use of two
File Flagging programs.
                                       107

-------
7.1   DETAIL LIST

This program formats data contained in the AQDHS master file and provides
a detailed listing of the data.  The formats of the reports are controlled
by the sampling interval of the data contained in the records being pro-
cessed and by a user-supplied control card.

The control card has only two valid options.  The keyword MEAN entered
in columns 1 through 4, causes the number of readings, the mean reading
and the maximum reading for each line and column to be printed on the
report.  The keyword SUM, entered in columns 1 through 3 (column 4 must
be blank), causes the number of readings and the sum of the readings
for each line to be printed.  With the SUM option, no column footings
are printed.  Columns 5 through 80 of the control card are ignored by
the detail list program.  If the control card is missing or invalid, a
warning message is issued, the MEAN option is assumed, and processing
continues.

Refer to Figure 7.1.4 for the format of the control card.

The name of the load module is EXRPTLST.
                                       108

-------
7.1.1   ORGANIZATION

The following are main modules of the Detail List program.

      o   MAIN-LOOP
          Performed by ROOT-SEGMENT, this routine generates (based
          on a specified "sampling interval") an Air Quality Data
          Report for some hourly, daily, weekly, monthly, quarterly
          or composite period.  The readings for each interval are
          always displayed as are the number of such readings.
          However, the user has the additional option of specifying
          that the report be "mean" in which case mean and maximum
          values are displayed (for row and column data) or that
          the report be "sum", in which case, the sum of the readings
          (row only) are displayed.

      o   FILL-TITLES
          Performed by MAIN-LOOP, this routine completes skeletal-
          type headings (titles) with certain identifying informa-
          tion (e.g., agency, state, project, parameter, parameter
          standards, sampling interval, etc.) so that they appropriately
          reflect the data to be listed.

      o   REPORT-LESS-THAN-DAILY
          This routine, performed by MAIN-LOOP, sets up the appro-
          priate report format when the data to be listed reflects
          some hourly interval less than one day (i.e., the sampling
          interval is less than one day).  The resulting report is
          such that for each hourly interval of each day (of a
          specified month) a reading is displayed.  Additionally,
          for each interval, the number of readings and the mean
          and maximum values are determined and displayed or if
          the report is "sum", the sum.
                                     109

-------
REPORT-DAILY
This routine, performed by MAIN-LOOP, sets up the
appropriate report format when the data to be listed
is "daily", i.e., the sampling interval is one day.
The report structure is such that readings are displayed
for each day and the number of readings, and mean and
maximum values (or sums) are determined and displayed for
each day and each month.

REPORT-WEEKLY
This routine, performed by MAIN-LOOP, sets up the
appropriate report format when the data to be listed
is "weekly", i.e., the sampling interval is one week.
The resulting report is similar in form to that of
the report described when the data is "less than daily".

REPORT-MONTHLY
This routine, performed by MAIN-LOOP, sets up the
appropriate report format when the data to be listed
is "monthly", i.e., the sampling interval is one month.
The resulting report is similar in form to that of the
report described when the data is "less than daily".

REPORT-QUARTERLY
This routine, performed by MAIN-LOOP, sets up the appro-
priate report format when the data to be listed is
"quarterly", i.e., the sampling interval is one quarter.
The resulting report is similar in form to that of the
report described when the data is "less than daily".

REPORT-COMPOSITE
This routine, performed by MAIN-LOOP, sets up the
appropriate report format when the sampling interval
                            110

-------
          is made up of distinct parts, i.e., is composite.
          The resulting report is similar in form to that of
          the report described when the data is "less than
          daily".

Figure 7.1.1 shows the organization of EXRPTLST.
                                       Ill

-------
EXRPTLST - Organization
      Figure 7.1.1
                112

-------
7.1.2   COMMUNICATION AND DATA FORMATS

The following COBOL working storage section fields are the major control
and data areas internal to the Detail List program.

     o    COMPOSITE-REPORT-SW
          When equal to TRUE, indicates that composite data
          is to be formatted.

     o    PRINT-FOOTINGS-SW
          When equal to TRUE, indicates that cross-footings
          are to be printed.

     o    REPORT-IS-MEAN-SW
          When equal to TRUE, indicates that the MEAN option
          was selected on the control card.  When equal to
          FALSE, the SUM option was selected.

     o    LINES-AREA
          Report formatting work area.

     o    PAGE-MATRICES
          In-core buffer to hold up to two pages of report to
          allow column and line footings.

     ^    qATTF—TTVPWT—
          Holds the key of the first master tile record in the
          reporting period.  Used to d^te^t n '-barge 1* rb<3
          WORK-AREA
          Work area for formatting readings.
                                      113

-------
7.1.3   ROUTINES

The following are internal subroutines of the Detail List program.

     o    COMPUTE-INTERVAL
          Determines the format of less than daily reports and
          fills in the interval field of the titles.

     o    FOOTING-ROUTINE
          Formats and prints cross footings when the option on
          the control card was MEAN.

     o    FORMAT-MEAN-COLS
          Formats column NO. MEAN and MAX when the option on the
          control card was MEAN.

     o    FORMAT-MEAN-LINE
          Formats line NO. MEAN and MAX when the option on the
          control card was MEAN.

     o    FORMAT-SUM-LINE
          Formats line NO. and SUM when the option on the control
          card was SUM.
                                        114

-------
Detail List Control Card
Columns             Format              Symbol              Description

 1-4               AAAA              Alphabetic          Report Type
 5-80                                                     Unused

Report Type:  Specifies the type of report to be produced.   Valid
     values for columns 1-4 are:  MEAN AND SUM.
                       Detail List Control Card
                             Figure 7.1.4
                                      115

-------
7.2   SLIDING AVERAGE

This program formats the readings contained in each record in the AQDHS
master file and computes sliding averages of the readings.  The number
of readings in each average is controlled by a user-supplied control card.
The control card also determines whether the number of readings, the mean
reading and the maximum reading in each record is printed (MEAN option)
or the number of readings and the sum of the readings in the record (SUM
option) is printed.

The MEAN option and SUM option of the control card occupy the same
columns as used by the Detail List program.  The default is also MEAN
if an incorrect option is specified.  If the control card is mission,
the program is aborted.  The number of readings to be used in each
average is entered in columns 5 and 6.  A leading zero must be specified
for numbers less than 10.  If the field is invalid (non-numeric, less
than 02 or greater than 31), the program is aborted.

Refer to Figure 7.2.4 for the format of the control card.

The average for each group readings is printed directly under the last
reading in the group.  More than half the readings in the group must be
non-null, otherwise asterisks are printed in place of the average.  If
the entire record contains too few non-null readings to compute averages,
a message is printed to that effect.  Each group of readings to be averaged
must be contained within a single record as the program does not span
records to accumulate readings.

Composite data is not supported by this program.

The name of the load module is IXSLDAVG.
                                      116

-------
7.2.1   ORGANIZATION

The following are the main modules of the Sliding Average program.

     o    MAIN-LOOP
          Performed by ROOT-SEGMENT, this routine generates (based
          on a specified "sampling interval")  an Air Quality Data
          Report for some hourly, daily, weekly, monthly, or
          quarterly period.  The readings for  each interval are
          displayed, along with the number of  such readings, mean
          and maximum values or when specified,  the sum of the
          readings.  Additionally, on the basis  of a user-supplied
          integer,  n, equal to some number of  intervals, a sliding
          average is computed and displayed.

     o    REPORT-LESS-THAN-DAILY
          This routine,  performed by MAIN-LOOP,  sets up the
          appropriate report format when the data to be listed
          reflects  some hourly interval less than one day.  The
          resulting report is such that for each hourly interval
          of each day (of a specified month) a reading is displayed,
          then for  each day, the number of readings, mean and
          maximum values or the sum of the readings (if so
          specified) are determined and displayed along with the
          sliding averages.

     o    REPORT-DAILY
          Performed by MAIN-LOOP, this routine sets up the appro-
          priate report format when the data to  be listed is
          "daily",  i.e., the sampling interval is one day.  The
          resulting report is similar in form  to that of the report
          described when the data is "less than  daily".
                                       117

-------
     o    FILL-TITLES
          As in Detail List Program

     o    REPORT-MONTHLY
          As in Detail List Program

     o    REPORT-QUARTERLY
          As in Detail List Program

     o    REPORT-COMPOSITE
          Composite data is not supported by this program.

     o    COMPUTE-AVERAGE
          Performed by MAIN-LOOP, this routine uses a user-supplied value
          (n),  where n equals some integral number of readings to
          compute a sliding average, i.e., beginning at the first
          reading after summing for "n" readings, computes an
          average, shifts (slides) right and repeats the process,
          this  time beginning at the second reading; the process
          terminates when the final reading in the record is included
          in the averaging process.

     o    READ-ROUTINE
          Performed by MAIN-LOOP, this routine reads the next record
          from the master file.

Figure 7.2.1 shows the organization of IXSLDAVG.
                                       118

-------
 REPOKT-
LESS-THAN-
  DAILY
REPORT-
WEEKLY
^

r

REPORT-
MONTHLY





1
r
i

r

RKPORT-
COMPOSITI:


REPORT-
QUARTERLY


1
r

COMPUTK-
AVERAGE
          IXSLDAVG -  Organization
                Figure 7.2.1
                            119

-------
7.2.2   COMMUNICATION AND DATA FORMATS

The following COBOL working storage section fields are the major control
and data areas internal to the Sliding Average program.

     o    END-OF-FILE-SW
          When equal to TRUE, indicates than an end-of-file has
          been detected on the input master file.

     o    REPORT-IS-MEAN-SW
          When equal to TRUE, indicates that the MEAN option was
          selected on the control card.  When equal to FALSE,
          indicates that the SUM option was selected on the
          control card.

     o    LINES-AREA
          Report line formatting work area.

     o    WORK-AREA
          Reading formatting work area.
                                      120

-------
7.2.3   ROUTINES

The following are internal subroutines of the Sliding Average program.

     o    COMPUTE-INTERVAL
          For less than daily reports, determines the format of
          the report and fills in the interval field in the
          titles.

                 WERAGE
                  the average        	^.». wwm.uj.n-AVERAGE
          and places it under the last reading in the interval.

     o    FORMAT-MEAN-LINE
          Formats line NO. MEAN and MAX when the option on the
          control card was MEAN.

     o    FORMAT-SUM-LINE
          Formats line NO. and SUM when the option on the control
          card was SUM.

     o    SUM-REAPINGS
          Sums the readings in the interval specified on the
          control card so that the average may be computed.
                                        121

-------
Sliding Average Control Card
Columns
Format
Symbol
1
5
7
- 4
- 6
- 80
AAAA
99

Alphabetic
Numeric

Description

Report Type
Number of Readings
Unused
Report Type:   Specifies the type of report to be produced.   Valid values
      are:     MEAN and SUM.

Number of Readings: Specifies the number of samples to be averaged.
                      Sliding Average Control Card
                              Figure 7.2.4
                                    122

-------
7.3   DATA ANALYSIS

The Data Analysis program performs various statistical analyses on data
contained in the AQDHS master file.  The results of the calculations are
written to the statistics file to be formatted by the Statistical List
program.

The following statistical information is computed:  minimum and maximum
observations; arithmetic mean; standard deviation; geometric mean and
standard deviation; percentage of readings present; and the 10th, 30th,
50th, 70th, 90th, 95th, 96th, 97th, 98th and 99th percentile occurrence.

The following statistics are used in this program (x represents a raw
data value and n represent the number of values):

Arithmetic Mean:
n
E^ .
i-l

IT X^j i * • • "r X
2 n
                    n
                                       n
Arithmetic Standard Deviation:


x * 1


/v- \2
n 1 / xi
V Xl2 - Vtt /
T~ n
n - 1 J
2 2 (Xl + x2 +
X_ '1 ... T X
n - 1
1/2

• • • v2
n

                                                            I 1/2
                                   123

-------
Geometric Mean:
          Antilog
 n
E
i=l
                          n
                 Antilog
                                              log x1 + log x, + . . . + log x
Geometric Standard Deviation:
                                       n
     a  = Antilog
      o
                     n
                                       E  logxi
                    E   (logxi)'
                       n
          n - 1
                                                         1/2
The files input to the Data Analysis program  (AQDHS master file or answer
file and the key portion of the parameter, method, unit, minimum detectable
table) must be flagged by the File Flagging programs before being used by
Data Analysis.

Composite data is not supported by this program.

The name of the load module is DXSTATIS.
                                      124

-------
7.3.1   ORGANIZATION

Although the Data Analysis program is written in FORTRAN IV rather than
in COBOL, it is still organized in the same fashion as the other programs
in AQDHS.  The gross structure consists of an initialization segment,
a main loop and a wrap-up or termination segment.  The following sub-
segments are identified by the comments preceding them in the program
source listing.

     o    Initialize the Sample Set - Before processing of a sample
          set begins, all accumulators are initialized to their
          nominal values.

     o    initialize Minimum Detectable Table - This code is executed
          only once.  It reads the key portion of the parameter,
          method, unit, minimum detectable table into an internal
          array for future reference by other program segments.

     o    Extract Farms for New Sample Set - This code saves the
          information necessary to identify the sample set.

     o    Determine Minimum Detectable Value - The minimum detectable
          value array is searched until the current parameter code
          and unit code are matched and the associated minimum
          detectable value is extracted.  If no match is found,
          the minimum detectable value is set equal to 1.0.

     o    Accumulator Loop - Accumulates intermediate internal results
          until a change in sample set (new state code, new parameter
          code, etc.) is detected.  At the beginning of each loop, the
          date in the record is assumed to be the last date in the sample
          set and is saved.  Any readings less than the minimum detectable
          value are substituted by half of the minimum detectable value.
                                       125

-------
     o    Compute Statistics - Computes and formats the beginning
          and end of the sample set;  the minimum and maximum
          readings;  the percentile distribution; the means and
          standard deviations; and the percentage of readings
          used in the calculations.

     o    Write Statistics Record - Formats the information based
          on the decimal position indicator and writes the record
          to the statistics file.

Figure 2.3.1 shows the organization of DXSTATIS.
                                       126

-------
                                         Write
                                        Statistics
                                         Record
DXSTATIS -  Organization
      Figure 7.3.1
                 127

-------
7.3.2   COMMUNICATION AND DATA FORMATS

The following variable names are the major control and data areas internal
to the Data Analysis program.

     o    LNORML
          May be .TRUE or .FALSE..   When .TRUE., indicates normal
          program completion.  When .FALSE.,  indicates abnormal
          program completion.

     o    LMREOF
          Set to .TRUE, upon end-of-file on the copied master file.

     o    LMAINS
          Set to .FALSE, upon completion of all processing.  Causes
          the program to leave the main loop and enter termination.

     o    LVFRST
          Set to .FALSE, to indicate that the minimum detectable
          value array has been built.

     o    LACCUM
          When .TRUE., indicates that processing and accumulation
          of the current sample set is to continue.

     o    NRDATA
          Array used to accumulate counts for calculating
          percentiles.
                                      128

-------
7.3.3   ROUTINES
There are no major internal subroutines in the Data Analysis program.
                                       129

-------
7.4   STATISTICAL LIST

This program accepts the statistics file generated by the Data Analysis
program as its input and formats the information contained therein.
There are no user options.

The name of the load module is SXPRINTS.
                                      130

-------
7.4.1   ORGANIZATION

The following are main modules of the Statistical List program.

     o    MAIN-LOOP
          Performed by ROOT-SEGMENT, this routine generates a
          "Data Analysis Report" (from an input statistics file)
          providing such statistical information as percentiles,
          arithmetic and geometric means and arithmetic and geo-
          metric standard deviations.

     o    STATISTICS-REPORT
          Performed by MAIN-LOOP, this routine performs several
          lower level modules to actually format the report,
          (e.g., to set up and print headings) and to display
          it.

     o    READ-ROUTINE
          Performed by MAIN-LOOP, this routine reads the next
          record in the statistics file.

Figure 7.4.1 shows the organization of SXPRINTS.
                                      131

-------
             STATIST1CS-
               RKPORT
READ-ROUTINE
SXPRINTS -  Organization
      Figure 7.4.1
                 132

-------
7.4.2   COMMUNICATION AND DATA FORMATS

The following COBOL working storage section fields are the major control
and data areas Internal to the Statistical List program.

     o    END-OF-FILE-SW
          When equal to TRUE, indicates that an end-of-file
          has been detected on the input statistics file.

     o    RUN-ABORTED-SW
          When equal to TRUE, indicates that an error severe
          enough to cause the run to abort has been detected.

     0    PRINT-CONTROL-BLOCK
          Determines the format of the report listing.
                                        133

-------
7.4.3   ROUTINES

The following are Internal subroutines of the Statistical List program.

     o    FILL-TITLES
          Completes skeletal headings with identifying informa-
          tion (e.g., agency, state, project, standards, etc.) so that
          they correctly identify the data in the report.
                                      134

-------
7.5   FILE FLAGGING

AQDHS supplies two programs to flag the input files used by the Data
Analysis program.  They flag the key portion of the parameter, method,
unit, minimum detectable table and the master file or answer file to
be analyzed.  This flagging is required due to ANS FORTRAN restrictions.
                                       135

-------
7.5.1   ANSWER FILE FLAGGING

This program module copies the answer file and appends an end-of-file
sentinel record.

The name of the load module is MXSENTNL.
                                       136

-------
7.5.1.1   ORGANIZATION

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an
          end-of-file is detected on the answer file.  First,
          the data is moved from the input area to the output
          area.  Next, a new answer record is written and the
          old answer file is read.  After all the input has
          been processed, an end-of-flle sentinel record is
          written.

Figure 7.5.1.1 shows the organization of MXSENTNL.
                                      137

-------
                MAIN-LOOP
^
r

WRITE-ROUTINE

^
r

READ-ROUTINE
MXSENTNL - Organization
     Figure 7.5.1.1
                138

-------
7.5.1.2   COMMUNICATION AND DATA FORMATS

The following defines the usage of certain working storage names;

     o    END-OF-FILE-SW
          May contain TRUE or FALSE.   If true,  a data set
          end-of-file has been detected.

     o    SENTINEL-CHARS
          An area of all nines which will form  part of the
          sentinel record.
                                      139

-------
7.5.1.3   ROUTINES

The following are major subroutines of the AQDHS Data Analysis Copy
program module.

     o    READ-ROUTINE
          This routine reads an answer file record.

     o    WRITE-ROUTINE
          This routine writes an answer file record.
                                       140

-------
7.5.2   PASM-CODE-KEY FILE FLAGGING

This program module copies the Farm-Code-Key file and appends an end-of-
file sentinel record.

The name of the load module is NXSENTNL.
                                       141

-------
7.5.2.1   ORGANIZATION

     o    MAIN-LOOP
          This routine is performed by ROOT-SEGMENT until an
          end-of-file is detected on the Parm-Code-Key File.
          First, the data is moved from the input area to the
          output area.  Next, a new Farm Code record is written
          and the next Parm-Code-Key file record is read.  After all
          the input has been processed, an end-of-file sentinel
          record is written.

Figure 7.5.2.1 shows the organization of NXSENTNL.
                                      142

-------
NXSENTNL - Organization
     Figure 7.5.2.1
                143

-------
7.5.2.2   COMMUNICATION AND DATA FORMATS
                                                            i
The following defines the usage of certain working storage  names:

     o    ENP-OF-FILE-SW
          May contain TRUE or FALSE.   If true,  a data set
          end-of-file has been detected.

     o    SENTINEL-CHARS
          An area of all nines which  will form  part of the
          sentinel record.
                                       144

-------
7.5.2.3   ROUTINES

The following are major subroutines of the AQDHS Data Analysis Copy
program module.

     o    READ-ROUTINE
          This routine reads a Parm-Code-Key file record.

     o    WRITE-ROUTINE
          This routine writes a Parm-Code-Flag file record.
                                       145

-------
                       Appendix A - CODE TABLES
Agency Codes   .........    147
Project Codes  .........    148
Time Codes     .........    149
Unit Codes	150
                                   146

-------
Agency Codes
Code      Agency

A	EPA group responsible for atmospheric surveillance
B	EPA group responsible for meteorological activity
C	EPA group responsible for effects research
D	EPA group responsible for atmospheric research
E	EPA group responsible for abatement activity
F	State agency
G	County agency
H	City agency
I	District agency
J	Private
K	Institution (university, college, etc.)
L	Military
M	International agency
N	Other Federal nonmilitary agencies
0-Y	Open for future expansion
Z	Other
                              Agency Codes
                                 Table 1
                                     147

-------
Project Codes
Long-term Surveillance

      Code     Proj ect
       01	Population-oriented surveillance
       02	Source-oriented ambient surveillance
       03	Background surveillance

Short-term Surveillance

      Code     Project
       04	Complaint investigation
       05	Special studies
       06	Episode monitoring
                         Project Codes
                            Table 2

                                    148

-------
Time Codes


Format 1 Transaction

      Code     Interval
        1	 1 hour
        2	 2 hours
        3	 3 hours
        4	 4 hours
        5	 6 hours
        6	 8 hours
        7	12 hours

Format 2 and 3 Transactions

      Code     Interval
        8	1 day
        9	1 week
        A	1 month
        B	1 quarter
        C	Composite data (Format 2 only)
                          Time  Codes
                            Table  3
                                   149

-------
Unit Codes
Code      Units
 01	micrograms/cubic meter (25° C, 1013 millibars)
 02	micrograms/cubic meter (0° C, 1013 millibars)
 03	nanograms/cubic meter (25° C, 1013 millibars
 04	nanograms/cubic meter (0  C, 1013 millibars)
 05	milligrams/cubic meter (25° C, 1013 millibars)
 06	milligrams/cubic meter (0° C, 1013 millibars)
 07	parts per million (volume/volume)
 08	parts per billion (volume/volume)
 09	COHS/1000 linear feet
 10	RUDS/10,000 linear feet
 11	meters/second
 12	miles/hour
 13	knots
 14.......degrees
 20	microns
 30	picocuries/cubic meter
 31	microcuries/cubic meter
 32	picocuries/square meter
 33	microcuries/square meter
 34	picocuries/cubic centimeter
 35	picocuries/gram
 50	number of threshold levels
 70	milligrams F/100 square centimeters-day
 80	milligrams SC- /100 square centimeters-day
 81	micrograms S0_/square meter-day
 90	tons/square mile-month
                                            a
 91	milligrams/square centimeter-month
                                       o
 92	micrograms/cubic meter-month
                        2-
 98	milligrams SO,  /square centimeters-30 days
 99	milligrams /square centimeters-30 days
Q
  On a calendar-month basis.
                               Unit Codes
                                Table 4
                                     150

-------
Appendix B - AQDHS DIAGNOSTIC MESSAGES
                        151

-------
AQDHS DIAGNOSTIC MESSAGES

Most diagnostic message from AQDHS are self-explanatory.   However, some
messages refer the user to this document for further explanation.   The
message, with their explanation, are listed below.

*** WARNING:  FARM TABLE OVERFLOW.  CONSULT USER GUIDE FOR CORRECTIVE
ACTION.

     AQDHS currently has a built-in limit of 100 entries  in the
     parameter, method, unit codes, minimum detectable table.
     This restriction is included to limit the amount of  core utilized.
     If this message should ever appear, the limit has been exceeded.
     It is possible to increase the limit but only at the expense of
     using additional core.  The following programs must  be modified:
               Parameter Code Table Maintenance
               Transaction Editor
               Detail List
               Sliding Average
               Data Analysis
               Statistical List

     Refer to Appendix C for further instructions on accomplishing
     these changes.

*** WARNING:  SITE TABLE OVERFLOW.  CONSULT USER GUIDE FOR CORRECTIVE
ACTION.

     AQDHS currently has a built-in limit of 100 entries  in the
     valid site code table.  This restriction is included to limit the
     amount of core utilized.  If this message should ever appear, the
     limit has been exceeded.  It is possible to increase the limit
     but only at the expense of using additional core.  The following
     programs must be modified:
                                       152

-------
               Site Code Table Maintenance
               Transaction Editor
               Detail List
               Sliding Average
               Statistical List

     Refer to Appendix C for further instructions on accomplishing
     these changes.

*** WARNING:  STANDARDS TABLE OVERFLOW.  CONSULT USER GUIDE FOR CORRECTIVE
ACTION.

     AQDHS currently has a built-in limit of 50 entries in the
     parameter standards table.  This restriction is included to limit
     the amount of core utilized.  If this message should ever appear,
     the limit has been exceeded.  It is possible to increase the limit
     but only at the expense of using additional core.  The following
     programs must be modified:
               Parameter Standards Table Maintenance
               Detail List
               Sliding Average
               Statistical Liist

     Refer to Appendix C for further instructions on accomplishing
     these changes.
                                       153

-------
                   Appendix C - PROGRAM MODIFICATION
Increasing Size of Farm Code Table .....    155
     Parameter Code Table Maintenance   ....    155
     Transaction Editor  .......    155
     Detail List	156
     Sliding Average     .......    157
     Data Analysis  .     .     .     .     .     .     .     .    157
     Statistical List     .......    158

Increasing Size of Site Code Table .....    159
     Site Code Table Maintenance   .....    159
     Transaction Editor  .......    159
     Detail List    ........    160
     Sliding Average     .     .     ...     .     .     .    160
     Statistical List     .......    161

Increasing Size of Parameter Standards Table .     .     .    162
     Parameter Standards Table Maintenance   .     .     .    162
     Detail List    .     .     .     .     .     .     .     .    162
     Sliding Average     .......    163
     Statistical List     .......    163
                                   154

-------
INCREASING SIZE OF FARM CODE TABLE

Whenever it is desired to increase the size (number of entries) of the
parameter, method, unit codes, minimum detectable table, it is necessary
to modify the following programs:
               Parameter Code Table Maintenance
               Transaction Editor
               Detail List
               Sliding Average
               Data Analysis
               Statistical List

The current limit for the number of entries in the table is 100 entries
in all programs except Data Analysis.  The limit in the Data Analysis
program is currently 120.

The following paragraphs discuss the changes to be made in each program
described above.

     o    Parameter Code Table Maintenance
          Change the VALUE clause of the following sentence:
          77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 100.
          on or about sequence number 00016700, from 100 to the
          new limit of entries.  For example:
          77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 150.
          will increase the limit to 150 entries.

     o    Transaction Editor
          Change the VALUE clause of the following sentence:
          77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 100.
          on or about sequence number 00037400, from 100 to the
                                       155

-------
new limit of entries.  For example:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value should
be the same as that specified in the Parameter Code Table
Maintenance program.

Change the OCCURS clause of the following sentence:
02  PARM-CODE-KEY-ARRAY       OCCURS 100 TIMES.
on or about sequence number 00094300, from 100 to the
new limit of entries.  For example:
02  PARM-CODE-KEY-ARRAY       OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-PARMS.

Detail List
Change the VALUE clause of the following sentence:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 100.
on or about sequence number 00024600, from 100 to the
new limit of entries.  For example:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value
should be the same as that specified in the Parameter
Code Table Maintenance program.

Change the OCCURS clause of the following sentence:
02  PARM-CODE-KEY-ARRAY       OCCURS 100 TIMES.
on or about sequence number 00118600, from 100 to the
new limit of entries.  For example:
02  PARM-CODE-KEY-ARRAY       OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-PARMS.

Change the OCCURS clause of the following sentence:
02  PARM-DESCRIPTION-TABLE    OCCURS 100 TIMES.
on or about sequence number 00123300, from 100 to the
                           156

-------
new limit of entries.  For example:
02  PARM-DESCRIPTION-TABLE    OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-FARMS.

Sliding Average
Change the VALUE clause of the following sentence:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 100.
on or about sequence number 00025000, from 100 to the
new limit of entries.  For example:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value
should be the same as that specified in the Parameter
Code Table Maintenance program.

Change the OCCURS clause of the following sentence:
02  PARM-CODE-KEY-ARRAY       OCCURS 100 TIMES.
on or about sequence number 00110500, from 100 to the
new limit of entries.  For example:
02  PARM-CODE-KEY-ARRAY       OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-PARMS.

Change the OCCURS clause of the following sentence:
02  PARM-DESCRIPTION-TABLE    OCCURS 100 TIMES.
on or about the sequence number 00115200, from 100 to
the new limit of entries.  For example:
02  PARM-DESCRIPTION-TABLE    OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-PARMS.

Data Analysis
Change the array size of the following variable:
X         , MVDATA( 600 )
                             157

-------
on or about sequence number 00015300, from 600 to the
new limit of entries, incrementing by 5 for each new
entry.  The current value of 600 sets a limit of 120
entries.  To increase the limit to 150 entries, enter
A value of 750 as the array size.  The number of entries
should be greater than or equal to the value specified
in the Parameter Code Table Maintenance program.

Statistical List
Change the VALUE clause of the following sentence:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 100.
on or about sequence number 00023600, from 100 to the
new limit of entries.  For example:
77  NBR-OF-PARMS         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value
should be the same as that specified in the Parameter
Code Table Maintenance program.

Change the OCCURS clause of the following sentence:
02  PARM-CODE-KEY-ARRAY       OCCURS 100 TIMES.
on or about sequence number 00086600, from 100 to the
new limit of entries.  For example:
02  PARM-CODE-KEY-ARRAY       OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-PARMS.

Change the OCCURS clause of the following sentence:
02  PARM-DESCRIPTION-TABLE    OCCURS 100 TIMES.
on or about sequence number 00122000, from 100 to the
new limit of entries.  For example:
02  PARM-DESCRIPTION-TABLE    OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-PARMS.
                             158

-------
INCREASING SIZE OF SITE CODE TABLE

Whenever it is desired to increase the size (number of entries) of the
valid site code table, it is necessary to modify the following programs:
               Site Code Table Maintenance
               Transaction Editor
               Detail List
               Sliding Average
               Statistical List

The current limit for the number of entries in the table is 100 entries.

The following paragraphs discuss the changes to be made in each program
described above.

     o    Site Code Table Maintenance
          Change the VALUE clause of the following sentence:
          77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 100.
          on or about sequence number 00014800, from 100 to the
          new limit of entries.  For example:
          77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 150.
          will increase the limit to 150 entries.

     o    Transaction Editor
          Change the VALUE clause of the following sentence:
          77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 100.
          on or about sequence number 00037500, from 100 to the
          new limit of entries.  For example:
          77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 150.
          will increase the limit to 150 entries.  The value
          should be the same as that specified in the Site Code
          Table Maintenance program.
                                      159

-------
Change the OCCURS clause of the following sentence:
02  SITE-CODE-TABLE      OCCURS 100 TIMES.
on or about sequence number 00095900, from 100 to the
new limit of entries.  For example:
02  SITE-CODE-TABLE      OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-SITES.

Detail List
Change the VALUE clause of the following sentence:
77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 100.
on or about sequence number 00024700, from 100 to the
new limit of entries.  For example:
77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value
should be the same as that specified in the Site Code
Table Maintenance program.

Change the OCCURS clause in the following sentence:
02  SITE-CODE-TABLE      OCCURS 100 TIMES.
on or about sequence number 00120200, from 100 to the
new limit of entries.  For example:
02  SITE-CODE-TABLE      OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-SITES.

Sliding Average
Change the VALUE clause of the following sentence:
77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 100.
on or about sequence number 00025100, from 100 to the
new limit of entries.  For example:
77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value
should be the same as that specified in the Site Code
Table Maintenance program.
                             160

-------
Change the OCCURS clause in the following sentence:
02  SITE-CODE-TABLE      OCCURS 100 TIMES.
on or about sequence number 00112100, from 100 to the
new limit of entries.  For example:
02  SITE-CODE-TABLE      OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified for NBR-OF-SITES.

Statistical List
Change the VALUE clause in the following sentence:
77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 100.
on or about sequence number 00023700, from 100 to the
new limit of entries.  For example:
77  NBR-OF-SITES         PIC 999 COMP SYNC VALUE 150.
will increase the limit to 150 entries.  The value
should be the same as that specified in the Site Code
Table Maintenance program.

Change the OCCURS clause in the following sentence:
02  SITE-CODE-TABLE      OCCURS 100 TIMES.
on or about sequence number 00088200, from 100 to the
new limit of entries.  For example:
02  SITE-CODE-TABLE      OCCURS 150 TIMES.
will increase the limit to 150 entries.  The value
should be the same as that specified in NBR-OF-SITES.
                              161

-------
INCREASING SIZE OF PARAMETER STANDARDS TABLE

Whenever it is desired to increase the size (number of entries)  of  the
parameter standards table, it is necessary to modify the following
programs:
               Parameter Standards Table Maintenance
               Detail List
               Sliding Average
               Statistical List

The current limit for the number of entries in the table is 50.

The following paragraphs discuss the changes to be made in each  program
described above.

     o    Parameter Standards Table Maintenance
          Change the VALUE clause of the following sentence:
          77  NBR-OF-STANDARDS     PIC 99 COMP SYNC VALUE 50.
          on or about sequence number 00016900, from 50 to the
          new limit of entries.  For example:
          77  NBR-OF-STANDARDS     PIC 999 COMP SYNC VALUE 100.
          will increase the limit to 100 entires.  Note that
          the picture clause must also be changed to allow for
          more digits.

     o    Detail List
          Change the VALUE clause of the following sentence:
          77  NBR-OF-STANDARDS     PIC 99 COMP SYNC VALUE 50.
          on or about sequence number 00024800, from 50 to the
          new limit of entries.  For example:
          77  NBR-OF-STANDARDS     PIC 999 COMP SYNC VALUE 100.
          will increase the limit to 100 entries.  The value
          should be the same as that specified in the Parameter
          Standards Table Maintenance program.
                                        162

-------
Change the OCCURS clause of the following sentence:
02  STANDARDS-TABLE      OCCURS 50 TIMES.
on or about sequence number 00124100, from 50 to the
new limit of entries.  For example:
02  STANDARDS-TABLE      OCCURS 100 TIMES.
will increase the limit to 100 entries.  The value
should be the same as that specified for NBR-OF-STANDARDS.

Sliding Average
Change the VALUE clause in the following sentence:
77  NBR-OF-STANDARDS     PIC 99 COMP SYNC VALUE 50.
on or about sequence number 00025200, from 50 to the
new limit of entires.  For example:
77  NBR-OF-STANDARDS     PIC 999 COMP SYNC VALUE 100.
will increase the limit to 100 entries.  The value
should be the same as that specified in the Parameter
Standards Table Maintenance program.

Change the OCCURS clause of the following sentence:
02  STANDARDS-TABLE      OCCURS 50 TIMES.
on or about sequence number 00116000, from 50 to the
new limit of entries.  For example:
02  STANDARDS-TABLE      OCCURS 100 TIMES.
will increase the limit to 100 entries.  The value
should be the same as that specified for NBR-OF-STANDARDS.

Statistical List
Change the VALUE clause of the following sentence:
77  NBR-OF-STANDARDS     PIC 99 COMP SYNC VALUE 50.
on or about sequence number 00023800, from 50 to the
new limit of entries.  For example:
77  NBR-OF-STANDARDS     PIC 999 COMP SYNC VALUE 100.
will increase the limit to 100 entries.  The value
should be the same as that specified in the Parameter
Standards Table Maintenance program.
                           163

-------
Change the OCCURS clause of the following sentence:
02  STANDARDS-TABLE      OCCURS 50 TIMES.
on or about sequence number 00122800, from 50 to the
new limit of entries.  For example:
02  STANDARDS-TABLE      OCCURS 100 TIMES.
will increase the limit to 100 entires.  The value
should be the same as that specified for NBR-OF-STANDARDS,
                             164

-------
                   Appendix D - CATALOGED PROCEDURES
AQSACNVT:  AQDHS File to SAROAD Input   ....    166
AQSBCNVT:  Old AQDHS File to New AQDHS Input ...    171
AQSCNVRT:  Old AQDHS Input to New AQDHS Input     .     .    176
AQSDANAL:  Data Analysis .......    181
AQSELIST:  Detail List	188
AQSFUPDT:  Transaction Editor and File Maintenance      .    194
AQSHUPD1:  Parameter Code Table Maintenance  .    .     .    203
AQSHUPD2:  Site Code Table Maintenance  ....    212
AQSHUPD3:  Parameter Standards Table Maintenance  .     .    219
AQSILIST:  Sliding Average    	    226
AQSMSENT:  Answer File Flagging    	    232
AQSNSENT:  Parm-Code-Key File Flagging  ....    237
AQSRETVR:  Retrieval Language Processor and Retrieval   .    242
AQSSLIST:  Statistical List   	    251
AQSTEDIT:  Transaction Editor .    .    .    .    .     .    257
                                   165

-------
AQSACNVT - AQDHS FILE TO SAROAD INPUT

AQSACNVT is executed to convert the AQDHS master file to SAROAD input
format.  The input to the program consists of AQDHS master file records
and is defined by DD name AQSMASTR.  There are four output files created
by the program.  The first, defined by AQSNEWMS, contains the updated
AQDHS master file.  The second, defined by AQSDDFL, contains the add
records.  The third, defined by AQSCHGFL, contains the change records.
The fourth, defined by AQSPRINT, contains diagnostic messages produced
during the conversion process.
                                      166

-------
DP NAME                       DESCRIPTION

AQSMASTR       AQDHS master file to be converted
AQSNEWMS       New AQDHS master file
AQSPRINT       Print file for diagnostic messages
AQSADDFL       SAROAD add file deferred to DDNAME ADDFILE
AQSCHGFL       SAROAD change file deferred to DDNAME CHNGEFL
                          AQSACNVT - DDNAMES
                                       167

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level Index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
AXCONVRT       Program to convert AQDHS file to SAROAD
               input format
OLDMSTR
FTMSTRAA       Lowest level index of AQDHS file to be
               converted
NEWMSTR
FTMSTRAB
Lowest level index of new AQDHS file
UNIT
2314
Unit type upon which the new AQDHS
master file is to reside
SERIAL
009858
Volume serial number of volume upon
which AQDHS master file is to reside
DISP
'NEW, CATLG,   Disposition of new AQDHS master file
DELETE'
SPCUNIT
TRK
Units in which space for the AQDHS
master file is to be allocated
PRIMARY
20
Number of units to be allocated for the
AQDHS master file's primary allocation
SECNDRY
10
Number of units to be allocated for the
AQDHS master file's secondary allocation
OUT
               Sysout class for all print files
                  AQSACNVT - Substitutable Parameters
                                      168

-------
AQSACNVT - Data Flow
              169

-------
                                            OCJOOCCjOCJOOOOClOOO
                                            COCOCOCC. COOCCOC  O
                                            '--                                  -
OOOC.CjCOOOC.t-'OOt.'OOCJOOOC'OtJOt-'OOtJUOtJOOOOOOCJCJOOO
OCOeOOOOOCOOCCOOOCOOOOOcCOOpCoOOOOOOOGOOOO


OOOOOCTCTC O  O C? G  O C"  C  OOOCC'OOC'O'OC'OUOOOOOOOO^OdOOOOOOC^OC'OCOOCiOCJOC'O

OOOGOOOOC  OOC'OCOaOCC'OC  00 C- COOOCOOOOOOOC'C.OOOCJOOCOOOOCieOOC.Oe  CC
OOOOOOOOCOOodOOOOOOOOOOOOOCOCoOOOOOOlvC   COOOOOOOOOCOOOI-CiOOCiO



X.
o
rr\

-o
o




u.
3:
                                                                                                                              «

                                                                                                                             UJ
                                                                                                                             CO
                                                                                                                             _J
                                                                                                                             or
                                                                                                                        »     »

                                                                                                                       _l    >
_i                                                                                                                    tf    or
V-                                                                                                                    >-.    LJ
                                                                                                »                      Ot    Z
ot                                                          t-                                ot                      UJ    <_> at
U.                                                          4                                H                      VI    UJ t-
U.                                                          2.                                V)           UJ        CJ    CO CO
z                                                          a.                         LU     a.           _i        ii     o i
UJ                                                          O                         _l     O           »*        at     • j(                                CO
CC                                                          U.                         w.     _l           U-        UJ    V —                  UJ            LU
                            »                                           •      »        u,     o  •                  »zaJtx«zuJZa.«LU           u,            co            —
                           h-                                G_O'"-l3LU4i—•^->—*-.<3J                         CO            K
        •                  UJ                                i£44CO>~>-4V>4Ot»--«           UJ            UJ            4
       •                   —i                                «-UH-cGC')4f-4KCv«;ii.           o            X            a.
       CO                  LU                                       _lLUO4CLUZtllu9O                  Z                          UJ
       <-»»»»o                                o«oroz«at                  at    —  •     o           4            o            o-
       4t-—     4UJO-Jh-
       v> ^  at at      » —i                                otot—  cozcoxo*-coo        i—    «-• >«i*«a     w     ~a>4    4        > — _)"»     4     u.     4     c;     ^:            *-
       OUJCa.     OC t.  Ji  »   »         4»               O^-O-'-'Q-     4     U>->UL            »i«Q.j_O     CJ     O     O     •     ^     _>
       H4U.U-~lPOJ:t-(V—I         OOC,'     t-     O-Q.(jt>Ct     LJ     a.Q.O:    LU    >-i«L«VQ      4     4     4     (J     •—     O     CO     (_,     U
>-     K-  |l  II   II  <-< O LLi  II  II   II         LJMJ»            CJ»-XCOi     J     IO»JL.    ^    ^  — LJ O «     V>     H     V)      II     LJ     W            U     CO
>     >-         O   |l  _i     LU     |l   II  V   || CO     C     II   II  CO           3  II  U —  II             LU            UJ             II      I      II      II
4.     "J4h-^*f^—i**-aa.         QL^^>     ^     UJLUtarLu«-'            Luujta-     i     wuj^'ii^'      |      a,      i     a.      i      f~            >~     >-*
c.'    i at  co v>  ii  4  ii  z 4 c  4     co o  ii     »     a. >-  ii  i  II      |      a. a. II             n  it  M LU i-        •   4            4            3     v>     ^>     _>
4     nlCXI3a.^l)|      II  ^« UJ     U.     4Z^CX4CL            4OOL    H    ^^U.L,<1     H>     ^     K     •£     h-     U     *"     LJ     O
v)    CLOCjT^-acook— c>*~     2.oa.            Z^c/^TV)     ^-     Z^jco    uj    IHI.JVIVI^I     cu     O     UJ     o     cu     co     cu     co     co
O    Otct-jLUZUj^-Q.aLUj^     ou.»—     co     coo*~co*—     cu     coo»-<    v)    zo*"Cico     "1     O          O     vi     >•     vi     >•     >•
4        Q-OZUcOQcoCLcoLO-otl—     XO>C-OCcoO>Q           3  > O co c;                                       co            co     co
       O                                                    O                                             «                         4           <            4            4
       LJ                                       l_i           OOO4O           t-    Q                   >-Oh-Ot-U>-LJo
       01                                       LU           4CJOI-Q           4    O                   4O4C4CJ4LJa
       Q.                                       X                                      4O                         OOCO
                                                LU           h-                         U
       c-                                                    at                                ot           I—    «/)                   ^-jK_it-t-»-v-
       >                                                    LUcQ                  >->-           3X                   3U.3LL-DZ3Z
       Z                                       h-           >•-                  Dl«           Q.    i                   O.DO,Oa«-Q.     —     >-
       o                                       "•           z_j                  0.4           t-uj                   KOt-xi-at-ot^:
       <                                       i            ua                  zz;           3z                   J43o-!a,_3tv;_j
       vi                                       CO           Ocu                  ^.cO           Ovl                   ovIQv",     CcoCcOoO
       o                                       D>-                         oo                          a            a            o            •>-     >
*«4                                   ttCO        «##CO               #*#4        «*#4               #»»<**#4»#*4#«*cO«c'. *
-^X.X.^^X.X.X.X.X.X.^X.X.X.X.X.^X.X.^X^X.X.X.X.V.X.VX.X.X.X.X.V.'XX.V.V.V.X.X.X.X.X.X.X.X.'xX.^v-^^^^^^
170

-------
AQSBCNVT - OLD AQDHS FILE TO NEW AQDHS INPUT

AQSBCNVT is executed to produce AQDHS input transactions from the old
AQDHS master file.  The input to the program consists of old AQDHS master
file records and is defined by DD name AQSAROAD.  There are two output
files created by the program.  The first, defined by AQSTRANS, contains
the AQDHS input transactions.  The second, defined by AQSPRINT, contains
any diagnostic messages generated during the conversion process.
                                       171

-------
DP NAME                       DESCRIPTION

AQSAROAD       Old AQDHS file
AQSTRANS       New AQDHS input transactions
AQSPRINT       Print file for diagnostic messages
                          AQSBCNVT - DDNAMES
                                        172

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level Index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
BXCONVRT       Program to convert old AQDHS file to new
               AQDHS input transactions
OLDFILE
OLDAQDHS
Lowest level index of old AQDHS file
TEMP
SYSOUT
Unit type for temporary work space
PRIMARY
10
Number of units to be allocated for new
AQDHS input transactions' primary
allocation
SECNDRY
               Number of units to be allocated for new
               AQDHS input transactions' secondary
               allocation
OUT
               Sysout class for all print files
                  AQSBCNVT - Substitutable Parameters
                                      173

-------
AQSBCNVT - Data Flow
              174

-------
                       OOOOOOCJOOOOO
    o
    
    •>.
    •o
                                                     en
                                                     z                                                              •
                                                     o                                                            —
                                                     »                                                            UJ
                                                     »-                                                            t«
                                                     U                                                            -I
                                                     <                                                            tt
                                                     I/)                                                              »
                                                     Z                                               in           —
                                                                                                    '  z           >-
    u.                                               a                                               o           a
    a                                               H                                               —a
                                                                                                      K           Z
    >•                                               >-                                  UJ           O           U
    UU                                               D                                  _l           <           UU
    *                                                                                                 
          1/1
          O  •  •
          <>-!/)
           • ax
          I/I > CJ
          X Z   II  II  II
          o a.  01 >- 1- >  >-
CL
I/I
X
o
o
i
UJ
z

1

t—
LU
I/)

t-
4
o
t-
3
CL
*-
3
C

* *
X >
PASS, DELETE
CUN tT, ( EPRI
LOTPKS
u. » o. u
1 je 1/5  O
O
O

l/i
Z
<
a.
h-
i/>
c?
1- < *

GNOSTIC »«ES
«a
*•»
U

1

^
UJ
i/)

t-
4
O
t-
3
CL
t-
3
O

* <
v. >

^i
. CJ
W7
II
f-
-J
CJ
IO
>•
I/I
O
o

1—
z
•M
ct
CL
LO
0
t .
{/)

|
•
V}
^>
UJ
to

t-
<
O
*-
Z5
a
t-
ij
c

!• •& «
^ ^ -^
t-
^
^
(0
(f
^»
^
u
t/)
^.
«/>
u
CJ

L_
z
t—
CL
a.
•
CO
o
o



^~
^>
o
t/0
>-
i- L« -t
^ ^ V

_J
u
w
(1
^~
«J
u
to
^.
t/)
o
a

t_
^
(^;
C-
t^
*n
>
1/1 •*
^ ^

^
U
u?
ft
("••
O
u
VI
^.
Ul
tJ
CJ

i-
i.
u
h-
(__
!*•"
>
" U" *
S ^ -*

— '
tj
W
M
t—
-J
U
u*>
>.
(-0
o
c

a
i.
—
^
_;
t/^
x
t L' v
** V X,
OJ
I/I
u
                                                                                                  175

-------
AQSCNVRT - OLD AQDHS INPUT TO NEW AQDHS INPUT

AQSCNVRT is executed to convert old format AQDHS (SAROAD) input
transactions to new format AQDHS input transactions.  The input
to the conversion program consists of old format AQDHS input
transactions and is defined by DD name AQSAROAD.  There are two
output files created by the program.  The first, defined by
AQSTRANS, contains the new format AQDHS transactions.  The
second, defined by AQSPRINT, contains any diagnostic messages
generated during the conversion process.
                                       176

-------
DP NAME                       DESCRIPTION

AQSAROAD       Old AQDHS (SAROAD) input transactions
AQSTRANS       New AQDHS transactions
AQSPRINT       Print file for diagnostic messages
                          AQSCNVRT - DDNAMES
                                      177

-------
PARAMETER
  NAME
DEFAULT
 VALUE
DESCRIPTION
PROJECT
PROGRAM
'CDHS.AQS1     Highest level Index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)


CXCONVRT       Program to convert old AQDHS input format
               to new AQDHS input format
OUT
               Sysout class for all print files
                  AQSCNVRT - Substitutable Parameters
                                      178

-------
                rold AQDHS
                 (SAROAD)
               Transactions
        ew
      AQDHS
      Trans-
     actions
AQSCNVRT -  Data Flow
                179

-------
   OOOC- OOOOOCOOOOOOCiOtrOOOOOOOCOOC'OOOCOOOOOOOC.OC
   •^f\jc^^i^^rfcrcu^o*^^rosj-in>op-cot7'C>'-'f\jf4'ir>»or-ccC'C»-*ojrrt^'io»or"o^c*o^*<^f O C' C  C C- C  Ci O O O O »-> O O CJ O  C' O d C1 C_>
   OOOOOOCJOOOOOOOOOOOOOt,C OOOCOC.OOO&OOOOOOOOOOC O
   OOOOOO«JOOOOCJOCOOOOOOC1OOOOC?C GOOOOOOOOOOOOOOOO
   X.
   o
   m

   •o
   o
                                   a.
                                   u
                                   u.
   >•
   UJ
   or.
   3
   co
   O
   «c
to
t*  »

 • a
co .»
X Z
CJ CJ
o u
.  X
 II LJ
>-  II
LJ X.
LU <
•> a. 
LJ *4J  *
a  H -i
o. ^ —
co o  II
H  *-i UJ
I o a-

Q. cc >-
                      UJ
                      X
                      UJ
                      a
                      UJ
             Z
             o
          *  LJ
                                   o
                                   cc
                         UJ


                         u
   —.     u. —•
 • Z     CO Z
O •-     3 —
< <     CO «.
CJ I-     CC t-
_J LU     O UJ
 • CC     LJ OC
 •  »      •  »
I- U. —  I/) UJ —
LJ t- CO  Z )- LO
UJ «t V-   u. cc
u — X  i/> — I
 II   || VI  || || LO
UJ ,U —  U. U- ««
i- i  II  t i.  II
 o  O > Q
                                         co
                                         Z
                                         o

                                         f-
                                         u
                                         ^
                                         co
                                         ^
                                         4
                                         CL
                                         L-
                                                               LJ
                                                               CC
                                                                LO


                                                                I
                                         U
                                         O
                                         CL
                                         UJ
                                      * LO
                             Q
                             O
OPERATION
UJ
LO
                                                                                                               U)
                                                                                                                II
                                                                      O
                                                                      o
                                                                                                                      3
                                                                                                                      LJ
                                                                                                                      LO
             a
             o
                   u

                    II

                   3
                   LJ
                   LO
O
C
       w
       II
      U

       II


3
U
LO

LO    CO
             CJ
             LO
O
o
o
o
                                         a.
                                         z
                                                o
                                                OL
                                                                      LO
                                                                      CJ
                                                               o
                                                               <;
                                                                                            « *
                                                                                           . X >«.
                                                                                           . V >.
                                                         Z     3    X.           3
                                                         ~     a     >~    i-     c
                                                         a     K     a    3     co
                                                         a.     3    a.    CJ     o
                                                         i/i     C     co    co     co
                                                         o           >    >•     >
                                                         «»»»l/l»LO«00
                                                                                                                                   i.
                                                                                                                                   a
                                CL
                                Z
                                3
                         I-     LJ
                         U     -•
                         y)     co
o
CO
o
                                                                                               180

-------
AQSDANAL - DATA ANALYSIS

AQSDANAL is executed to perform various statistical analyses on the
AQDHS master file or answer file.  There are two input files used by
this program.  The first, defined by DD name FT08F001, contains the
flagged master file or answer file.  The second, defined by FT09F001,
contains the flagged key portion of the parameter, method, unit codes
table.  There are two output files created by this program.  The first,
defined by FT10F001, contains the statistics file.  The second,
defined by FT06F001, contains any diagnostic messages generated during
the analysis.
                                      181

-------
DP NAME                       DESCRIPTION

FT08F001       AQDHS master file
FT09F001       Key portion of parameter, method, unit table
FT10F001       Statistics output file
FT06F001       Print file for diagnostic messages
                          AQSDANAL - DDNAMES
                                      182

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
DXSTATIS       Program to perform statistical analyses
               of readings in AQDHS master file
MSTRFIL
MTMSTRAA
Lowest level index of AQDHS master file
PARMKFL
NTPRM1AA       Lowest level index of key portion of
               parameter, method, unit table
STATFIL
STMSTRAA       Lowest level index of statistics output
               file
UNIT
2314
Unit type upon which the statistics file
is to reside
SERIAL
009858
Volume serial number of volume upon which
statistics file is to reside
DISP
'NEW.CATLG
DELETE'
Disposition of statistics file
SPCUNIT
TRK
Units in which space for the statistics
file is to be allocated
PRIMARY
10
Number of units to be allocated for the
statistics file's primary allocation
                  AQSDANAL - Substitutable Parameters
                                       183

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
SECNDRY
               Number of units to be allocated for the
               statistics file's secondary allocation
RECFM
FB
Recording format is fixed, blocked.
LRECL
141
Record length for statistics file
BLKSIZE
1692
Block size for statistics file
OUT
               Sysout Class for all print files
                  AQSDANAL - Substitutable Parameters

                              (continued)
                                      184

-------
AQSDANAL - Data Flow
              185

-------
   OOOGOGGGOGOOOOGGOGGOGOOGGOGC
   OOOOOGOGOC'OCCOCOOCOOGOOGOGGO

   <^ OGOOOGC.  G*"'«-««-*'-'»-«»-«i—'»-*»-i»-*rsjr\irsiOvir\jfNjf\i C> O G G G G  O  G t->  O O G O G O C)  C1 O O  G G O C  G G O  O
                                                                                                                                                i  G G  C  O G
                                                                                                                                                '  O O  C  O G
                                                                    'i.ooooo<- C'  c
                                                               O O  C'
                                                               coo
                                                               GOG
                                                         O C O  G O
                                                         G i.  o  G o
                                                         G G O  O o
                                                         O O C  C.' O
                                                            G  G C.' O  O
                                                            G  O C' c.'  c
                                                            O  O O G  O
                                                            G  O C  O  O
                                                                      O  G O O  G G G
                                                                      t  O C' C  O C. G



                                                                      O  O G c  O G O
                                                                      O  O G O  G O o
                                                                      G  G O O  G C O
                                                                      O  O G O  O O O
    <0
    o
   •»•
   U.
   1
    a
    ^j
    3.
                                 UJ
                                 »-
                                 u.
                                                                  OC
                                                                  UJ
                                                                  >-
                                                                  —     ooco                   ••
0^-0^)01:00     i/>TG^i-'-iir  »t-i-«
t-  ||  II  II   II -1  G LU  II  II  II CD  -T II
G 1  —i _i —i (*•  ii  ^;t— >>u.^cu
UJ-i^_j.  ^-Q-C  II  II  "^
-^OCU.5^0-  II  «  II  Z*lOV-J^-<
   CJ)Ot.2.h-K-ta-Q.-J2.^U_GV.  ||
   UKct«~-Lr. V'O — (_'GUJ^t-
   a.co<(—zuj^-Q.occuu-a.-jJ
   o.  a. a uo 3  f, ccoo-o-Ja-JcdCi
          u

          a.

          u
          O
          a.
          a
                                                                  o —
                                                                  0 O
a  ii
fc— LU
C S.
                                                               X
                                                               UJ
                                                                  00


                                                                  £
                                                                            C
                                                                            u.
                                                                            0.

                                                                            «• *
                U  ix
                «l  «.
                U  t-
u —  a.
ct QC   ••
u. a.  a.
u —  x
 II  II  00
UJ LU  —
•>- 2.  II
« 3  O.
s: _j  oo

C >  D

o
o
                                                                                                a
                                                                                                UJ
                              X
                              u
                              u
 I

t-
LU
                                                                                                        >  a.

                                                                                                          UJ .
CN OF PARA
AIN
                                                                                                                          O  t- 00
                                                                                                      UJ  •
                                                                                                             10
-» >  «
U —  o-
a a:   •
Q. o.  a
10 —  j_
 u  II  oo
LU uj  —
*. a.  u
«j O  u.
z _i  oo
oo o  •-
Q >  O

O
a
                                                                                            C
                                                                                            o
                                                                                            LL
                                                                                            CO
                                                                                            O
                                                                                                                    a
                                                                                                                    u
                                                                                                                    CL
                                                                                                                    x:

                                                                                                                     I
                                                                                                                          LU
                                                                                                                                 UO
                                                                                                                    3
                                                                                                                    QL
                                                                                                                    Z
-5 >  «l
G •-  a
cc.cc.*
a. a.  at
u —  x'
 II  II  00
ii. iii  ^
«. a.  ii

2. _J  00
oo o  i—
o >  c

o
a
                                                                                                                          cr
                                                                                                                          o
                                                                      LU
                                                                      00
RETAIN, SER=t SERIAL),


{tPPIC«RY.£SFCNCRY),RLSE),
.CAT4.CSTATFIL,
M,LPECL=f.J.RFCL,BLKSIZE=EBLKS
   ^     ix (_J  LU
   «t   • Z UJ  CL
   >  ~ 3 -5  03
 * •—  a. o G  ii
i— cc  oo o, a  2.
«- o.  — oo a.  u.
^ •—  U CJ CO  G
^  II  u; —  u  uj
w LU  —  u u.  ex.
II  2.  II  UJ 2-  —
h- 3  u. LJ «  II
I— _l  I/)   C 0-1 G,  O


O
O
                                                                            o
                                                                            G
                                                                                                    to
                                                                                                    UJ
                                                                                                    o
                                                                                                    <
                                                                                                    00
                                                                                                    CO
                                                                                                    00
                                                                                                    o
                                                                                                    ^
                                                                                                 z
                                                                                                 u

                                                                                                 >-
                                                                                                 —     t—
                                                                                                                                                                            U
                                                                                                                                                                            CO
                                                                                                                                                                             II
U
OO
                                                                                                                                                                  C
                                                                                                                                                                  a
             00


             00


             LJ
u
00
                                                                                                                               a
                                                                                                                               o
                                                                                                                                        c    -•
                                                                                                    Q.     G    O-     •-
                                                                                                    >-     u-    t-     or
                                                                                                    3     NO    _>     a
                                                                                                    O     O    a     oo
                                                                                                                                                                   *  «  *  u.  «•
                                                                                                                                                                                          un
     .V.-S.N.IXV^.>>.>»'V-S.>«.>.'VV.^^X.>»'>K'N.
o
00
CJ
                                                                                                    186

-------
    o
    o
    0-
    IT
    O
    o
    o
    o
o

-------
AQSELIST - DETAIL LIST

AQSELIST is executed to produce a detailed listing of the contents of
the AQDHS master file.  There are six input files used by the program.
The first, defined by DD name AQSINPUT, contains the control card required
by the program.  The second, defined by AQSMASTR, contain the master or
answer file to be listed.  The third, defined by AQSPARMK, contains the
key portion of the parameter, method, unit codes table.  The fourth,
defined by AQSPARMD, contains the description portion of the parameter,
method, unit codes table.  The fifth, defined by AQSSITES, contains the
valid site codes table.  The sixth, defined by AQSTNDRD, contains the
parameter standards table.  There is one output file created by the
program.  This file, defined by AQSPRINT, contains the detailed report
listing and any diagnostic messages generated during the reporting
process.

Figure 7.1.4 describes the format of the control card.
                                      188

-------
DD NAME
DESCRIPTION
AQSINPUT       AQDHS control card
AQSMASTR       AQDHS master file
AQSPARMK       Key portion of parameter, method, unit table
AQSPARMD       Description portion of table
AQSSITES       Valid site codes table
AQSTNDRD       Parameter standards table
AQSPRINT       Print file for report listing
                          AQSELIST - DDNAMES
                                       189

-------
PARAMETER
  NAME
DEFAULT
 VALUE
DESCRIPTION
PROJECT
'CDHS.AQS*     Highest level of data set names (e.g.,
               CDHS.AQS.DATA. FTMSTRAA)
PROGRAM
EXRPTLST       This program lists the contents of the
               AQDHS master file
MSTRFIL
FTMSTRAA       Lowest level index of the AQDHS master
               file
PARMKFL
HTPRM1AA       Lowest level index of the key portion of
               parameter, method, unit table
PARMDFL
HTPRM2AA       Lowest level index of the description
               portion of the above table
SITEFIL
HTSITEAA       Lowest level index of the valid site
               codes table
STNDFIL
HTSTNDAA       Lowest level index of the parameter
               standards table
OUT
               Sysout class for all print files
                  AQSELIST - Substitutable Parameters
                                     190

-------
Control
  Card
Master
 File
Parm-Cod<
Key File
                         Site
                         Code
                         File
                     Farm
                   Standards
                     File
                  AQSELIST - Data Flow
                                  191

-------
                                                                                                                        .
   ooc-oooooocoo ocoooooooocc. ococ^oooooococooooocooococooocoooco
   ^«vj**i^ir*^r»ajc'C>«^rgro^ir»<>r^oDL>o^rsifrt^ir*.of^ooOtJOoO»fc<«^«-<«-*^4*-'«^"Hp-4»*'^c^'M^<\t(XOsjf\jf\pJ(^imrorOCOOOCOOCOOC,>OOOOOt>OCOOOOCOOCC!OOOOOOCJCCOOOOOOCJC;0«J
   OOOOOOOCiOCCOOOOOC'OOCOOOCOC'OOOOOOOOOOt-OCJt.COtJOOOOOOOCiOOOtiOOO
   OOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOOOOOOOOOCOOOOOOOC'C-OOOOOOCOO
   V
   •O
   O
   *
   LL
   JT
                                                                                                   o
                                                                                                   o
HURLEY RF




>-
,-
— j
UJ
o












* *
x. "v
CO
. CO <
v> _) a
I i— i—
O Q. t/)
O cc a.
11 UJ U-
f II II

~7 Ct LL.
U O O
a. DC co
a. 2.

£
D.

k-
co
to-
_l
UJ
CO
o
- Z »
Ct Q. to— ^ Z
a. a co co «j
X i X X «
II II II II U
U. LL. to. to- O.
2£ LJ U. U. ^ <•?
a- a. LU cj ii u
< . X.
UJ
to-
ll.
at
UJ
H-
1/1
I
^ t/1
00 CJ
r-l • O
«£ —
U II U.
to- LU LJ
o a.
LU to- CO
at >- t-
z
UJ
h-
Z
0
U

>-
CO
to-
J

* *
^ ^ >» >.
..LCAO,
.RETAIN),
.COBSUBR,
^- LU ^* CO —
UJ ^ f" < LO
O — Q- — ' 0-
Q- CL QL > O.
HII V It {/*
M II "/'
11 1 n 1 ^* II 1 ^^
i a. ii i u
< O U. < LL
Z, «/j ^ t/\
«j *" ^ v;
CO O «-* CO to-
CJ > Q C O
O O
O U



CO
to—
J
ex.
LU
t-
* CO *
^. -X >V •-. -X ^ V
o
ex.
u
— J
tx
z
u

1

LU
CO
<
K
^
O

^>
^3
CL
Z
to-

* «
•x. ^

O
• cc
*"" M
^J LU
ex. fo

to- CO
UJ -J
a. CD
< II
C O
o u
o
o


^~
3
a
z
to-
CO
O

•^ ^. v
UJ
_J
a.
cc
LU
h-
1/1
Z
c-j
U
»
.RETAIN),
UJ —
*— CO
 c











*
"^ "X ^*
V N> X.
CN CF PARAMETER, HE
H-
Oi
a.
f.
UJ

l

LU
t/>
.«,
h-
^
O

K-
3
ex.
z
to-

*
>»
..CATA.EPAPMKFL,
.RETAIN),

UJ <
LJ to-
IV yy
U. Q.
ca «.
UJ UJ
a. a.
i 3
co o
c: >
O
o


)L
3.
a
•4
a.
CO


~
CO
a.
oc.
a.
„
ii
Q.

o











«
x, >,
CN PCRTION OF TABLE
"
ex.
CL
CO
LLj
O
1

LU
CO
<
h-
^
0

^v
^
a
z
to—

*
X,
..C*TA.ePARMDFL,
!3
LL)
U
U.
u>
UJ
JL
*
CO
a
o
0


c
z
oe
4
a.
CO
a
* <
X. X.
Z
41
»~
UJ
a.
t- CO
 a












•x x.
u,
CO
LU
O
u
u
LU

CO
o
_J
 a co
<
t-

o

^»
^
ex.
z
to-

» *
X. X. X. X,
..CATA.GSTNCFTL,
t-
o
LU
CJ
or.
b.
C3
II
UJ
a.
«.
CO
u
o
u


O
a.
o
z
H-
CO
O
* <
X. Xk
.RETAIN),
UJ ~-
*- CO
 o












X. X,
o
<
                                                                                   192

-------
i\^-ic-i'-<-'-
4
0
K-
3
Q.
t—
^>
O

* *
". V.
•>. >.


t-
3
u
w
H
2
LJ

>•
l/l

1
VJ
t-
UJ
1/1

<
K
<
o
k-
3
a.
t-
^
C

>,


^~
_)
u
CO
II
J
CJ
v>
>•
in

O
O

K
z
•-•
ct
a
10
>-
>»>»«!


K h-
U _J
LJ U
u? w
II II
3 J
LJ LJ
VI (/)
>. ^
(/) I/I

LJ O
LJ O

K
^
»- c
^J a:
LJ LJ
1/1 I/I
>- >.
t l/> # to t
^ X X X *•
^ X X ^ »


H-
_)
LJ
CO
II
J
tj
I/)
^
(/)

O
a

^_
a
UJ
K—
O
to
>-
t I/} •(!
^ ^* *•
» X >


f-
^
O
UJ
II
3
LJ
I/)
^.
1/1

U
U

a
I
^
CJ
^
u)
>.
r W)
» -v
                                                                  193

-------
AQSFUPDT - FILE MAINTENANCE

AQSFUPDT is executed to create and maintain the AQDHS master file.  The
process occurs in three stages.  First, the input transactions are
edited and converted to an internal format.  Next, these internal
transactions are sorted into file sequence.  Finally, the File
Maintenance program reads the sorted transactions and uses them to
create or maintain the master file.

There are three input files used in the editing phase.  The first,
defined by DD name AQSTRANS, contains the transactions to be edited.
The second, defined by AQSPARMS, contains the key portion of the para-
meter, method, unit codes table.  The third, defined by AQSSITES, contains
the valid site codes table.  There are two output files created during
the editing phase.  The first, defined by AQSINTRN, contains the
edited internal format transactions.  The second, defined by AQSPRINT,
contains any diagnostic messages generated during the editing process.

Figure 2.2-2.1 shows the formats of the file maintenance transactions.

There are two input files used by the maintenance phase.  The first,
defined by AQSINTRN, contains the sorted internal format transactions.
The second, defined by AQSOLDMS, contains the old AQDHS master file
to be updated.  There are four output files created during the
maintenance phase.  The first, defined by AQSNEWMS, contains the new
AQDHS master file.  The second, defined by AQSPRINT, contains any
diagnostic messages generated during the maintenance process.  The
third, defined by AQSOLDRC, contains a listing of any old master file
records which were changed or deleted.  The fourth, defined by AQSNEWRC,
contains a listing of any new master file records added or changed.
                                       194

-------
DD NAME
DESCRIPTION
AQSTRANS       AQDHS input transactions
AQSPARMS       Key portion of valid parm, method, unit table
AQSSITES       Valid site codes table
AQSINTRN       AQDHS output internal transactions
AQSPRINT       Print file for diagnostic messages
SORTIN         AQDHS internal transactions
SORTOUT        Sorted AQDHS internal transactions
AQSINTRN       Sorted AQDHS internal transactions
AQSOLDMS       Old AQDHS master file to be updated
AQSNEWMS       Updated AQDHS master file
AQSPRINT       Print file for diagnostic messages
AQSOLDRC       Old master listing
AQSNEWRC       New master listing
                          AQSFUPDT - DDNAMES
                                      195

-------
PARAMETER
  NAME
DEFAULT
 VALUE
                                        DESCRIPTION
PROJECT
 'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROG1
TXTREDIT       Program to edit AQDHS file maintenance
               transactions
PROG2
FXFILMNT
Program to update AQDHS master file
OLDMSTR
FTMSTRAA       Lowest level index of AQDHS file to be
               updated
NEWMSTR
FTMSTRAB
Lowest level index of new AQDHS master file.
PARMKFL
HTPRM1AA       Lowest level index of the key portion
               of valid parm, method, unit table
SITEFIL
HTSITEAA       Lowest level index of the valid site
               codes table
UNIT
2314
Unit type upon which the new AQDHS
master file is to reside
SERIAL
009858
Volume serial number of volume upon which
AQDHS master file is to reside
DISP
'NEW,CATLG,
DELETE'
Disposition of new AQDHS master file
SPCUNIT
TRK
Units in which space for the AQDHS master
file is to be allocated
                  AQSFUPDT - Substitutable Parameters
                                       196

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PRIMARY
20
Number of units to be allocated for the
AQDHS master file's primary allocation
SECNDRY
10
Number of units to be allocated for the
AQDHS master file's secondary allocation
TEMP
SYSOUT
Unit type for temporary work space
WORKSPC
50
Number of units to be allocated for
temporary work space
SORTCTL
TSORTCTL
Sort control card
OUT
               Sysout class for all print files
                 AQSFUPDT - Substitutable Parameters
                             (continued)
                                      197

-------
            [nternal
             Trans-
            actions
AQSFUPDT - Data  Flow
                198

-------
AQSFUPDT - Data Flow
    (continued)
               199

-------
O  O O O  O O C.'  o C  O  C' C  C  O O O C>  O O O  O O O C  O o C1 O O C  O O C  O O O  C  C' O <_> O  CA C O  C  O O  C  C. O  C O  O C C.  C  o C


OOCOOOC'OCOOOOC. OC'OOOOCOOCCOt-OOOCJOCOOOC'OOOCOC'C'C'OC.  U'OC'LOCC'COOO
O  O O <_>  O O <-'  O O t   O O   O <_" f O  O O O  O C-> O CJ  CJ C~ C- tJ O O d C" O  C ' O O  <->  O C C> C~  <_> O O  <-'  <-' C.  (-' t_' C  C1 C_'  Ci C O  <_•  c,- C
t'Oooec't.oe.ooc-c  o o o o  c o o  o o o o  t,  c c  o o o o e- c  c, o o  o  o o o o  a o o  o  o o  o c o  c  <-  o o c   c  r  o
SJOOOOOC-OOOOOOCOOOOUOOOOCOCCJOCCCJOOOOOOOOOOOOOOC'OOOOOOOOCCic.  O

-
                                                                                                                           UJ
                                                                                                                           a.                                      i«
LL                                                                                                                                                                 Z
OC                                                                                                                          *                                      LJ
                                                                                                                           a.      »                   ..           _
>-                                                                                                                         a     —i                  —i           t-
LU                                                                              V)                                         <     LL                  «-i           LJ                 .
_i                                                                              z                                         a     ^                  u-           <             •
sr                                                                              o                                                i-           u-     uj           ist            —

i                                                                              h-                                         .-.     —        _JLU-~OO



       O         »»»*O                   »                '            VCCLJCO               ZVQC                •QCLUUJ^O








h-     ^~ X ^  II   II   II  II  "—' C  U   II   II  II  I/}  II  II        l_J>C*     ^-    fcC  *— X t^)  X    {J     *-«t/l     LU     USi^X     ^     (*J^_L     ^     ^(^^--0     O
o     t_> h- u_  a  ct _j  _j m  n  ^ H- >•  > > o  —.•       a.  M  ^^     <     n  M  (/>  n  */)         n  u vo            ^  ^:  *»  n






       o                                                                                                                                                          ^                      
-------
                                                                                                                                                                             .
OCeoC'OOCCOCooOCC'OOOOOC  OOC  OOOOOOOC.  OOC  C. O O O O  o  O O O O C  OCC  O O O C.  o  C  OO
O-O'—cgrosj-u'  ^r^oju'c  ^-^pyrtt>j-u;i>tfx-ouc7'o^iNf^r'tiJ  m«£ji^ccu  C'^^f\jr^sj-m^r^y'l<)'*l^'O^*0'C*i-'»-»f\j**>^r*/^sCi
ir»^joO'ij'C>c«i.|'*3'O^.'i^-r^r^-p-rs-ffc-f*-rwr^r-oLtijccia.cLcooca-cna,u oso-c*^C7NCT'Cx(7'troi-'OC'OOOo<-O'-*'^--«»-<'--«f-«'^
OOOOC'OC-OOOCJOOOCOt'OOCiOOOOOCOOOO'-JC.^OOOC'OC-CCC'—'-^'^'-<'-'—'— -^^i-i--1—•—  —  —'—>—'
o u o o u  o  c  <-' cj cj c- c' c L> c. c> o  o c- c o o <-> c' o  o c: o i-' o <-> c o  o o c  o o c- o cr  c  o u o o o  o c_~ o o o c c,i  o  c-  o o
OOOCOC.COC  Ol_OC?OCCOC  C'OC'OC OCOOOOCC CCCJOCOC^C'C. OOOOOCJOC.OCOOOC  OC  C O
oooc'C-oococooooooccc-ooooooooooooooocjooocc-oooeoooc-oooocoocr-o

^2
U
It
^
^>
LJ
X
oo

0
O


t—
z
k—i
a
0.
00
CJ
< *
z
0
ct
u
a
LJ
a.
OO
>.
00
1

I/J
UJ
IT,

^
H-
<[
O

^~
o
Q,
t-
_J
O
•fr «•
h-
^
LJ
II
+-
3
00
5-
I/I

O
O


t-
z
,„,
a
a
OO
£ r
t-
Z3
LJ
|l
h-
^3
CO
>•
*/)

0
0




^_
3
CJ
l/l
i *n i
h-
_J
U
H
r*
-J
t/i
>•
t/i

O
C


K-
J
c
a.
CJ
t/*
, r^ r

13
«-•
II
h-
i5
00
>-
" 1
0
0 •
LJ it •"
0 • of
II 00
LLJ -Mr
2 II
Z OO
V) •— '
c o

O
CJ



cc
»M
_J
+-
CC
c
uo 4

^3
<->
II
r-
J
00
X
00

0
Q




^>
O
0
00
X
)• 00 f
.{&V.CRKSPC),, CCNTIG)
0. X
Z. a.
1- w
OJ ||
II LU
_ ^
Z 0-
.3 IX)

CJ
CJ


••H
o
^
i
t-
tx
a
1-1X1 *
F,SEP = SCRTHKP1 ) ,
,(£WCPKSPC>,, CCNTIG)
>_ *
UJ CC
03 ~
•— II
II U-
•— «
z a.
~ IX)

Cj
o


r\j
o
y
JE
h-
C*
OO *•
F,SFP=(SCRTWK01 .SCRTWK02)
,(ChCRKSPC),,CrNTIG)
z .,..£


— II
II UJ
_ 7^
Z Q.
^ oo

0
c


r"
O
:*.
JC
t—
2C"
O
00 «
LU
00 LU
Z —i
IN),
PASS)
or or »
a a- ex
II II IX!
U- UJ —
2. 2. II
^ -J 00
I/) C —
O > Q

C
O





z.

0-
00 *

(M * —
U O O
a. n •—
u, ^. —
03 LJ M
II ^* UJ
Z. L? 2.
l_) LU —
a ct >-

LJ
LU
X
UJ


tL«
H-
^
U
a.
Z3 *
UJ
u.
QC
UJ
0-
^
2
00
X
O
O


z

4
K
^
**
<
^
JL 4
OJF.CT. .LCAD,
Jl
Q.
II
UJ
2.
^

OO
LJ

O
0



a.
(M
«j
Q.
LLJ
00
IVATE, RET/SIN),
PASS)
QC •
Q. a.
** *-
II i/.
UJ ^*
<*• II
1 rt
_i u:
C *~"
> C












1 .ANS.COHSUBR,
PASS)
00 •
X 0.
|l VI
UJ -v
£. II
^ in
(X) •— «
c c

CJ
CJ









                                                                                          201

-------
C'OOOOCOOOOOcC^OOOCC'CiCOCCOOOOOtCCOOOCOCOOCOCCO
^-coo^O'-'fvm^j-ir^^r^xO'  ci«-*(Njtvt*TLr\H^N-ccfio«-rifi'i;r^cvcT'o
i-i «-i i-^ (\j ru CNJ  CM  (\j c\j rv, rg c\> r\j n  f«" pi m f<^ r\ r*^  (^  r^.  m ^r <  «r <• ^ >r ^ ^f  «?•  *r  co IT  u-. in in LT\ 1/1 l/^ u> cr,  NL;

uoooc^oc  odooc  ct  ooccooccc  ocuc  cc cjooooc'c^ooc^ooooo
OOOOOOOC'OCOOOOOCJC'C  C'CCOC  OCOC.'OOO'-'OOOCOOC'OOOOOO
OOOOOC-OOOOOOOOOOOOCOC'OOOOOOOOOOOOC^CCOOOOOOO
CO
z
0
*•
*-
LJ
<
CO
z
-

_)
-
z
••*

o
LU
t—
a
u
CO

1

c_
LU
CO
•a.
K-
4
U

fc-
r>
a
z
*—

















^
» LU
0 »-
LU LU
h- —I
a cu
CJ 0
VI ••
u o
CO _J
II 0

2. II
— co
UJ < CO
~J >  Q
O
O


CO
s:
o
_j
c
CO
O






LU
*
LL

or
LU
t—
C*)
<1
s:

3
u_
^

CO
I.
CJ
c_?

Z
MM

Q
O


CO
i^
JC
u_
^
CO
Q
^_
ot
LJ
Z
cj or
LU h-
CO CO
» Jt
>- u.
CL Z
 <
Oi ^~
a <
CO CJ
^ •
» •
h~ ^~
*M CJ
» Z LLi
— -) I
CL ^ CJ
t/^ U- Q.
•- CO O.
C- cJ -O
CO — II
•— II CU'
II LU 2.
CL L. .
CO
CJ,
o


f—
z
^x
ar
a
co
O








0
z

^-
co
«_,
^

cr
cu
h-
co
-
CO
Q
O


LJ
a
LJ
^^
C
CO
O








O
z

c-
CO
|M
_J

a.
LU
f^
CO
^J
2.

35
LU
^.

1

^
LU
CO

K
<%
CL

h-
^
a.
h-
_j
^























1—
j
a
CO
II

^ )
0
CO
>-
CO
Q
CJ


LJ
or
jt
UJ
^
CO
O









Z
o
•-4
t-
«J
or
cu
a.
CJ

2.
LU
^-
CO >_ (_ K
^ ZJ JJ 1^
V} LJ LJ LJ
CO u CO
1 II II II

VI 3 J ^J
»- LJ (_' LJ
CU CO CO CO
CO > > >-
CO CO CO
1- CJ c Q
« CJ C D
U

K" h- H~
O Z J
a. •- »- o
t- 0. 3 Cj
o a c Q
Lv C' CO CO
>• > X






















1- h-
_3 — ?
Cj LJ
u; CO
II II

13 ^>
U LJ
CO CO
>> >-
CO CO
u o
CJ O


i. a
or I
LU Ij
•- C

CO CO

                                                                 *<;*««
                                                                                          202

-------
AQSHUPD1 - PARAMETER CODE TABLE MAINTENANCE

AQSHUPD1 is executed to create or maintain the parameter, method, unit
codes tables.  The process occurs in two phases.  First, the transactions
are sorted into table sequence and then the actual maintenance takes
place.

There are three input files used in the maintenance phase.  The first,
defined by DD name AQSCARDS, contains the sorted table maintenance trans-
actions.  The second, defined by AQSOLDT1, contains the key portion of the
parameter, method, unit codes table to be updated.  The third, defined
by AQSOLDT2, contains the description portion of the same table.
Three output files are created during this phase.   The first, defined
by AQSNEWT1, contains the key portion of the new parameter, method,
unit codes table.   The second, defined by AQSNEWT2, contains the
description portion of the new table.  The third,  defined by AQSPRINT,
contains any diagnostic messages generated during the table maintenance.

Figure 4.1.4 shows the formats of the parameter code table maintenance
transactions.
                                       203

-------
DP NAME                       DESCRIPTION

AQSCARDS       Control card
AQSOLDT1       Old master key portion parameter code table
AQSOLDT2       Old master description portion parameter code table
AQSNEWT1       New master key portion parameter code table
AQSNEWT2       New master description portion parameter code table
AQSPRINT       Print file for diagnostic messages
                          AQSHUPD1 - DDNAMES
                                      204

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
HXTABLE1
Program to generate parameter code table
OLDMST1
HTPRM1AA       Lowest level index of old key portion
               parameter code table
OLDMST2
HTPRM2AA       Lowest level index of old description
               portion parameter code table
NEWMST1
HTPRM1AB       Lowest level index of new key portion
               parameter code table
NEWMST2
HTPRM2AB       Lowest level index of new description
               portion parameter code table
UNIT1
2314
Unit type upon which the new key portion
parameter code table is to reside
UNIT2
2314
Unit type upon which the new description
is to reside
SERIAL1
009858
Volume serial number of volume upon which
key portion parameter code table is to
reside
SERIAL2
009858
Volume serial number of volume upon which
description portion parameter code table
is to reside
                  AQSHUPD1 - Substitutable Parameters
                                        205

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
DISP1
'NEW.CATLG,
DELETE'
Disposition of new key portion parameter
code table
DISP2
'NEW.CATLG,    Disposition of new description portion
DELETE*        parameter code table
SPUNIT1
TRK
Units in which space for the key portion
parameter code table is to be allocated
SPUNIT2
TRK
Units in which space for the description
portion parameter code table is to be
allocated
PRIMRY1
10
Number of units to be allocated for the
key portion parameter code table's primary
allocation
PRIMRY2
10
Number of units to be allocated for the
description portion parameter code table's
primary allocation
SCNDRY1
               Number of units to be allocated for the
               key portion parameter code table's secondary
               allocation
SCNDRY2
               Number of units to be allocated for the
               description portion parameter code table's
               secondary allocation
                  AQSHUPD1 - Substitutable Parameters
                               (continued)
                                        206

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
TEMP
SYSOUT
Unit type for temporary work space
SORTSPC
10
Number of units to be allocated for the
sort work space
SORTCTL
HSRTCTL1
Sort control card
OUT
               Sysout class for all print files
                  AQSHUPD1 - Substitutable Parameters
                              (continued)
                                       207

-------
                  Table Build
                  Transactions
  New
Farm-Code
 Key  File
   AQSHUPD1  -  Data Flow
                    208

-------
    OOOOOOOOOOOOCOC  OCCCOCOLCCOCOC
    O O  O O C1
    o cj  o t.1 c>
    OOOOO
    OOOCJO
   LJ  O C.  LJOOLJOOOC  OL-OOLJC_>O«-OCJtJOLJOCJL. LJ O
   c  c o  o o o  o c.  c  o c  o o  o o c,  c o  o o  o o c  o o  o c o o


c_oc  COOCOCOLJC  o o  c o o  c c.  0 c  LJ o o  o c-  o t_ c  c
C1 C"1  <~) O  <_  C1 C  CJ O  O C1 r~  O L,1  C' C.' LJ  C* O  CJ O  O C.1 O  O O  CJ LJ O C
O L>  O L.' O C O  <_  C LJ  L.  O <-'  LJ C"  <_ O C.  C  C  O O C
O LJ  o o LJ> c L>  f  C- LJ  <_• o o  o c  «.• c.; c.  t  r.'  r  L.  c-
O O  O C O o O  C1  C O  C  o O  O O  O O C  <_  C   C  C  O  C' c_ C  O C  C  O O  C' C  O O O  O LJ  O O c  O <-•  O L) o o O  C' O  O C
OLJOOOCOOOCJC-OCOC-OOOOC  OCOOLJOCCOOOCOC  OOOOOOOOOOOOOOOO
    •o
    o
                                                                                                                                                                      rn
                                                                                                                                                                      o
                                                                                                                                                                      XL
    UL
    CC
SEQUENCE
G
K02
$CR
G)
SCRTWK02, SCR
SCR
          V)
          o  •»•••»
          « •-« « *a  UJ CC
                                            UJ UJ
                                            h- 1-
                                            UJ UJ
                                            UJ UJ
                                            O C

          •  x*-fr-fr~i--J'-TLJC'.*.*a:crL)O  »   • 3 c,1  vi

          I—  II   II  ||  II   II m (^  u  ii  ^ ^  ||   ||  ||  ||   ii  i|  vi  II  II
    D
    o
          O L3 2.  5.  3L i.
          o
          o
          cc.
          CL
          o
          a
          i/l



»
tj
0 •
U X. —
LJ O f
CC sC •
a. u "•
LU ^ *-
^- LJ II
II N- UJ
Z 0 i
O LU —
a. a. t-
u
LU
X
_j
U-
u
>-
Z
V)
2.
O
»-«
1—
LJ
<
V)
^
Cl
CC
»—

LT
2
I
U
LJ
a,
CC »»
D V)
I/I V^
• <
— a
V] •
>- a.
VI I
|| V!
UJ M
9L II
% 0-
*£ V)
V) *~
0 C
a
a






h-
^
O
fcO
II
t—
^3
LJ
V)
>-
l/l
O
C-

z-
o
0
LJ
CL
VI
t-
cc
a
V5
iO
» »
CL ii
I QC
UJ t—
h- *-
u: ||
II LL.
t- LJ
«— • 



en
o
a.
It
LJ
LL.
» CC
V) _J
^ »
<^ U.
0. II
fr— ^
U3 LL
O LJ
II UJ
LL, CC
2 —
< II
Z a
VI LJ
O U



o -
^ ^
i/i - »-
VI LL.
• CL
t- U- —
LJ k— VI
LU *1 VI
~3 "> -
C > C
C
o

                                                                                                                                       rv.
                                                                                                                                       O
                                               m
                                               o

h-
ct
O
* VI

Ct-
0
V)

^ £
>. -v v.
•J
fr-
CC
c
* V)
•X -x. >
^
o
V)
>-
* l/l <
» V. X. >
^
fr-
ee
c

- »x >
J.
H-
JC
^
•i.- V
v >~ -X V
^
fr-
CC
c
«• V,
V X X >
b«
fr-
a
C
•It V)
y X X. N
C.

CC
o
•ft ^1
v X X. >. X
Z

l/l
>.
•» V

X
V)
(J
                                                                                                    209

-------
                                                                                                                                                                                     .
OC.OC-l-)CCOC'Ot-CCt.iC. COCOOOCOCOCOOC'C'CJOOCJOt-OC-COO^-i — --<—. — —i^-  — -<—>^—i—i  — -- — —i
O  O O O C' O C.' t> C' <-'  C' O O C~ O t  O O  C~  C  CJ C-> C <~ C^ I.J O  O O C O C- O O O  C-> O C  C_ C ' C.' C! C  O O C O C  t  o <-' ' ' O  c.  c   cc  (.occcoooccooooococc.(_occccecooo'>ooO'_''fj
                                                                                                                                                                              ~





*
2.
^ »
a. * —
L3 O CJ
LJ ^ »
cc u -i
U- ^ *~
•0 LJ II
II ^* UJ
L2 UJ »»
Q. a. t-

LJ
UJ
X
UJ
00
u:
_i
Oj
<
t-
UJ
_J
CJ
>-
LJ
UJ
UJ
CJ
z

••
u
X
t-~
u.
2

»
a
u.
H-
%_
 2
<3 w  
— X 00
II i/^ l|
U» ^* LU
•*- II 2.
—>  c o

D
CJ






00
oo
 «-"
CJ C.

a
o



KEY PCRTICN TABLE

a.
»—
01
«3
2.

CJ
.J
U

1
\-
II .
00

  o —
o > o

CJ
c


UJ
_J
m
o
DESCRIPTION PORT]

ct
k_
on
 ^
LJ >- a.
IX (X »
u. ex a:
to — i
II II 00
UJ LU **
2. 2. II
^ _l 00
oo o •-!
O > O

a
a


Lb
00
z
o
oc
O
a
UJ
a
UJ
00
MST1
CL — •
» » •
t- • 1- LJ
< "^ IM Uj
•>-•<: -5
— ^- a. o O
^- a i/i u. a£
— a. •- oo Q.
il — CJ to tO
u ii to ••* u
to u- — II UJ
II 2. II UJ 2-

z o — a oo
3 > CJ 00 0

o
o


UJ
_J
1C
LJ
DESCRIPTION PCR1
IX
UJ
00

r\j i—
f- tx
!•— 1 O
^. «^
3 II
to u.
II 2-
— _j
i: c.
= >

O
CJ


UJ
00
tt
f,PR IMPY?, eSCNCRYJ
DATA. ENEV.MST2
*^ •
•• •
• t- LJ
— ~ UJ
rvj ^ ~~>
0- 3 c
oo u. a.
— 00 Q.
LJ or CO
OJ _ ||
T* II UJ
II U 2.
00 « ^
— O. 00
C 00 O






I
L-
•—
c/>
C-
^.
C3
.
(/>

LJ
LJ



ERATION
a.
u
^
LU
K-
U)
>-
CO

1

V)
u~
to

<
H-
<
a .








f—
_,
LJ
1C
II
t—
_;
t/;
>.
00

CJ
LJ









f—
J3
w. i
CO
II
f—
-3
oo
>
CO

LJ
LJ









^-
-J
LJ
CO
I*
r-
~J
CJ
>-
i/j

^
O









h-
^
1—
u?
II
*—
^>
CO
>_
uO

0
CJ


G


•X.
t—
ii
^~-
<
z

* ^
cu
l—>
^ J
a.
LLi
t—
T ^ ^ ^ >
H-
^)
a
z:
i— i

X. X. X. *
LJ
ac.

*-
c
1
Cv
00
O
* ^
^. t-
3 O
C- _)
z c
— 00
c
* * « <1
^
Q.
K

o

* # 4
t-
JT
UJ
z
(/)
0
1 * ^
^
O-
H-
^
a

« * «
^_
JC
LU
Z
I/)
o
C v. >
-^
a.
r-
^3
O

•u- «•
z
i— •
ry
C.
t/^
CJ
* «3 «
^
CL
t-

c

•li-
^
>
yj  •*-
                                                                                           210

-------
   o o o
   000
   t- oo cr
   o o o
   o o o
   o o o
      u
      I/)
     a.
     2:
      X
   «  I/1 *
J.
i/l

-------
AQSHUPD2 - SITE CODE TABLE MAINTENANCE

AQSHUPD2 is executed to create and maintain the valid site codes table.
The process occurs in two stages.   First, the transactions are sorted
into table sequence and then the actual maintenance takes place.

The maintenance phase uses two input files.  The first, defined by DD name
AQSTRANS, contains the sorted transactions.  The second, defined by
AQSOLDMS, contains the old valid site codes table.   There are two
output files created during the maintenance phase.   The first, defined
by AQSNEWMS, contains the new valid site codes table.  The second,
defined by AQSPRINT, contains any diagnostic messages generated during
the maintenance process.

Figure A.2.4 shows the format of the site code table maintenance transaction.
                                      212

-------
 DP NAME                      DESCRIPTION

AQSTRANS       Site code input transactions
AQSOLDMS       Old valid site codes table
AQSNEWMS       New valid site codes table
AQSPRINT       Print file for diagnostic messages
                          AQSHUPD2 - DDNAMES
                                       213

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
HXTABLE2       Program to generate valid site codes
               table
OLDMSTR
HTSITEAA       Lowest level index of the valid site
               codes table
NEWMSTR
HTSITEAB       Lowest level index of the new valid site
               codes table
UNIT
2314
Unit type upon which the new valid site
codes table is to reside
SERIAL
009858
Volume serial number of volume upon which
valid site codes table is to reside
DISP
'NEW.CATLG,
DELETE'
Disposition of new valid site codes table
SPCUNIT
TRK
Units in which space for the valid site
codes table is to be allocated
PRIMARY
10
Number of units to be allocated for the
valid site codes table's primary allocation
SECNDRY
               Number of units to be allocated for the
               valid site codes table's secondary
               allocation
                  AQSHUPD2 - Substitutable Parameters
                                       214

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
TEMP
SYSOUT
Unit type for temporary work space
SORTSPC
10
Number of units to be allocated for the
sort work space
SORTCTL
HSRTCTL2
Sort control card
OUT
               Sysout class for all print files
                  AQSHUPD2 - Substitutable Parameters
                              (continued)
                                       215

-------
            Table Build
            Transactions
AQSHUPD2 - Data  Flow
               216

-------
    OCOOOOCCOOOCCCOCC  L- C  C  c. O C.'
                                                                                  c O O  O O O c.  C  C. O  C  O C  0  c  CC   CCOCOCC- OOOOCC'COCO
O O  W O CJ CJ  C' o <-'

C,> O  O O O O  C  C" <-'
                                    t-i'- — ^- — —  "— •— •fv-tNJ(Njr\I(N.txt\,!N(\,(\jf>rnr^, r  rr  m m m r -r  •J  -r «r »t  >T u. tr>  ir> "' in u\  m ui if,
                                    O  C' O O O (   C. C' i-   r > O O O  O O O O  O C- <-> lj  t_> C  C  C  O <_ t  C' C, C  C'  LJ O  CJ  O O O  O O O  O CJ O O  C O O
                                    13  LJ C.' O LJ C  LJ C' C •  I   C_' O C-'  C< O <-> O  O C  O C,  C_> f~i O  C  O '. <_'  C_< t- C.  C>  rj tJ  C '  f l-J O  t> O O  O O O <->  C • U O
                       oo'-oc-occcic  r-tc   c.  oc  c  o o c- o  o c o o  c  u o  c  oc c.  c  c v,  o  c «-  o  o c c.  ooooooooco
                       C' O f C. O  O O C t' o  «.' <••> <~>  <->  (-' C' O  C O C O  C C  O c  <-  O O  C  O C «->  C C C  O  O C-  O  O O O  O O O  O C O O  O O O
    •o
    o
    .*•
    u.
                                                                                                                                      CC
                                                                                                                                      O
                                                                                                                                      i«
                                                                                                                  CM
                                                                                                                  C1
I/O
c? *
« CJ
• UJ
in _i
J- a.
LJ - II
CJ 2,
u- <1
-> a
oc c
o. a-
a
u
Q-
o-

e\t
u
a
o
x
to
o
4 *1
X V. >.

» »
< au
< «l
UJ Oi
h- >-

to to
k- (-
I X
II II
oc a
K- >—
V> i/1
2. 2-
d j*
«J UJ
O *













e,
TLG.CFLETE',
U> - >• r
(NJ _J "- to- O. JC VI
II < II ^ *i £Ji II
II a tn LJ ^ o i
^ uj •— a. ac uu u.
^) v/> c. f> a. i^, t-













f\J
K C
» CC O •
C1 V LJ ^ **
— x o cj o
II M QC ^ *
LJ — • OC II t-i
Q. h~ U- ^ ^
01 W  (/)
• • 0^
ui x
II (/)
U- —
i- II

I/O *—
o o
c
c



O-
•— 1
_J
t—
a.
C
to »



u>
^?
LJ
tj
II
r-
->
to
>.
V)
a
o




t-
_j
C3
v"
>
'/I «
X ^

SCRTSPC,,CONTIG)
 «

SEP=SCPTWK01),
SrPTSPC,,CPNTIG)
* CJ
u. »
S- ^
*J-' QC
h- »—
faj tar
— II
II U.
•- <*
2: a
z: ^
u
c


0«
c-
^
.V
t-
...
L.
*y %.
^- "-x •"--

SFP=(SCPTWIO1, SCPTWK
SCPTSPf , ,CCNTl£)
* cO
to. *<
i. XL
UJ ft.
H- *""
W «—
— • II
II UJ
— <
i: a
— ^
u
u


r
C1
i

—
_

"• , -v -~N.
*N. -X "^
»
*r
SEP={SCRTWK01, SCPTWK
t— ii »
~ UJ <•*-
0. isj i
^ i— Uj
•" V> h-
M 5C CO
W-> —J *-
JL ff II
^ c: *—
t— c ^T
c^ c ^
C- C!
t~ . L-



, —
—
«-
i- --
^_ 	
..
• ' •* J
^ -^ ^ ^
SS,DFLFTC) ,
SCRTSPC.PLSF ) ,
NS,
,LRErL=6C,PLKSIZF=80
^ **J d y_
a. » a. M
» ^: t- i.
-« cr w u-
LU h- «-J O
*: — II u-
*- || LU O-
II LLj i. -—
v 
ECT..SYSIM&SCRTCTL)
ATE, RETAIN),
SS)
"9 ^ ^
LJ •- a
a. oc »
u. o. ac
to — x
II II V)
UJ UJ ~-
i- i. II
255)
to C ^~
o > o
a
c





Z1
•HI
I/)

( U) «
s ^ ^ *v ^
ft
Jr
•a •
a. x -~
O 0 0
LJ ^ *
a ii -i
a. ^ — •
U u II
«e o 2.
C3 UJ »i
o, a i—
^j
UJ
X
UJ


UJ
>-
-
UJ
o
LJ
U

UJ
^
*—
I/)
u
k*4
_J
>

z

«1
>-
^
»rt
^
X

* *
^ V.
ECT..LCAD,
ATE, RETAIN),
-j >
CJ —
a. cc
a. a.
u —
II II
UJ UJ
2. 2.
Z -I
to o
f •*. >
a
o



co
•^
_j
o.
ai
^~
to
x^ «v
•^ ^s.
CJ
a.
x
i/)
CJ
                                                                                                     217

-------
       (X
       CD
       CO
       O
       o
        •
   ~  i/> *•
   00  *(i I/O
   to  

   a.  —i a
    ^  i/i  »
   a.  >• a

   1/1  u  to
   —  uj **
    II  2.  u
   a.  < a.
   to  Z uo

   O  Q C

       O
       O
O
          UJ
        .  o
                                 UJ
                                 o
                                 u
uo

o
                Q
                	i
                U

                 I
                       cc
                       K
                       co
                       ^
                       CJ
                       _J
                       o
                       to .
AIN
                                                    UJ

                                                    cc
                   UJ
                   o
                   o
                   o
        I  UJ «—     I
      o
      o
                       I/I
                       Z
                       l/l
                       CJ
      o
      o
                       i/;
                       X.
_J
<
»— 1
o:
u.
i/i
<*>
li
Ct

W UJ *•*
II i- II
1- ^> U-
•^ »J I/I
z. o —
3 > U
o
o
>
at
C.)
2
LJ at
UJ t-
irt i/i
•-: s.
• ^
^ UJ
at Z
< to
Si •
.— <
a. H-
o. <
io c
*•* •
« *
t— H-
«-* o
i: LJU
o c
u. ct
LO a.
M UJ
LLJ i_
O 
-------
AQSHUPD3 - PARAMETER STANDARDS TABLE MAINTENANCE

AQSHUPD3 is executed to create and maintain the parameter standards
table.  The process occurs in two phases.  First, the transactions
are sorted into table sequence and then the actual maintenance takes
place.

The maintenance phase uses two input files.  The first, defined by
DD name AQSCARDS, contains the sorted transactions.  The second, de-
fined by AQSOLDTB, contains the old parameter standards table.  There
are two output files created during the maintenance phase.  The first,
defined by AQSSTDTB, contains the new parameter standards table.
The second, defined by AQSPRINT, contains any diagnostic messages
generated during the maintenance process.

Figure 4.3.4 shows the format of the parameter standards table mainte-
nance transaction.
                                      219

-------
DP NAME                       DESCRIPTION

AQSCARDS       Parameter standards input transactions
AQSOLDTB       Old standards table
AQSSTDTB       New standards table
AQSPRINT       Print file for diagnostic messages
                          AQSHUPD3 - DDNAMES
                                      220

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
HXTABLE3
Program to generate standards table
OLDMSTR
HTSTNDAA
Lowest level index of the standards table
UNIT
2314
Unit type upon which the new standards
table is to reside
SERIAL
009858
Volume serial number of volume upon which
standards table is to reside
DISP
'NEW.CATLG,
DELETE'
Disposition of the new standards table
SPCUNIT
TRK
Units in which space for the standards is
to be allocated
PRIMARY
10
Number of units to be allocated for
standards table's primary allocation
SECNDRY
               Number of units to be allocated for
               standards table's secondary allocation
TEMP
SYSOUT
Unit type for temporary work area
SORTSPC
10
Number of units to be allocated for the
sort work space
                  AQSHUPD3 - Substitutable Parameters
                                       221

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
SORTCTL
HSRTCTL3
Sort control card
OUT
               Sysout class for all print files
                  AQSHUPD3 - Substitutable Parameters
                              (continued)
                                       222

-------
              Table Build
              Transactions
AQS1IUPD3 - Data Flow
                223

-------
o  o o o  o o o  o o o o o  o c c-
o  o o o  o o o
O  O O CJ  O O LJ
c>  o o o  c- o <->
o  o o o  o o o
O  O O O  LJ O V."

j  *r >t  >T*J-  < >y  >y  -j  >r  m u\  in »r,  U" u*  IT  U'
O c_>  o C  C  U O O O  O C < J  O O C  O O  O C  O  O O  O f> O  O L,'  O C- O C O  CJ  CJ O  O C  C U  O  <-.  O  O CJ  O O  CJ o  c  C
c  c-  o c_  o ij o o o  o r u  o cj c)  o o  o o o  o o  o o o  c> o  o o o o o  cj>  o o  o o  c' o  o  o  o  o cj  o c:  <_.' o  o  <-
CjCOOCGCOCCCOOOOOOOOOOOOOOC'COOOC'OfOCCCOOCOCC'COCC. OCC
OOOOOOCOOOOOOOOOOOOOCOOOOOOOOOOOOOOOOOOCOOOCJOOCJOOC
                                                                                                                                        ft
                                                                                                                                        CJ
                                                                                                                                        X
                                                                                                                                        JT
                                                                                                                                        K
                                                                                                                                        oc
                                                                                                                                        u
                                                                                                                                        uo
a

X
                           UJ
                           >~
                           ai
                           UJ
                           o
                i a
                 z
o
o.
          3.  I
           II  II
~T O  i t-  —«
—• CJ  U.  II  II
m  ll  ^ t—  f

                                                             h-
                                                             a.
                                                             o
•-I  Q.
00   »
>•  a.
V)  I
II  00
u
(O
 II
SCRTKK02
G)
                                                                                            o z
                                                                                            X Q
                                                                                            JT LJ
                                                                                            t-  » •
                                                                                            a  "
                                                                                            U LJ
                                                                                            00 O-
                                                                                            ^ 00
                                                                                            II  t-
                                                                                            a. a
                                                                                            UJ LJ
                                                                                            OO OO
                                                                                                                             _J I
                                                                                                                             IX '
                                                                                            CJ
                                                                                          •  00
                                                                                            II
                                                                                                                                        1M
                                                                                                                                        o
                                                                                                                                        X.
                                                                                                                                        JT
                                                                                                                                        (-
                                                                                                                                        or
                                                                                                                                        o
                                                                                                                                        00
                                                          o
                                                          ^  »
                                                          Jl	p
                                                          t— Lu a
                                                          cc- <-  •
                                                          LJ LL. U
                                                          00 _( O-
                                                          w IX. OO
                                                          II Q t-
oo oo oo

a. o,  •
3.   > ^
UJ  3; ct
I— LU't-
                                                                                                                o
                                                                                                                a>
                                                                                                                 II
                                                                                                                                              UJ     _l
GSCR
,
                                                             03     «•  —
                                                               -     ^-  ^
                                                             O     *-  i—
                                                             cu     oo  «a
                                                              II     >  I-
                                                             _l     OO  UJ
                                                             LJ       •  OC
O  I- oo
LU  <* OO
—J  > 
oj U.
tO LJ
 II  LU
                                                                                                                                                                          a. M  —
                                                                                                                                                                          ty o  o
                                                                                                                                                                          E  II
                                                       —' UJ
                                                        • at:
                                                                                                                                                                          Cr  cr
                                                                                                                                                                          LL  CL
                                                                                                                                                                           II  II
                                                                                                                                                                          UJ  LU
                                                                                                                                                                          2.  2.
                                     c;  ii  o-i LJ
                                     ^  LL t— I—
                              <    >~ LJ ii     a.    i  ii      3
                               tl      II •-• UJ     H-    «  LX     LJ
                              i-     s: L5 a.           z  o-i     oo
                              2    OLL.—     O    OOl-i     >
                                     Q. C t-     Z    CJ  C     00
                                                                                        CJ
                                                                                        o
                                                                                        c
                                                                          o
                                                                          o
                                                                                                 C,
                    o
                    u
                                                                                  OJ O II
                                                                                   II ^" LU
                                                                                  i O Z.
                                                                                  O u_ •—'
                                                                                  Q- Q. I-
                                                2


                                                Q
                                                «]
                                                CL
                                   o
                                   c.
                                                                                                                                                         3L

                                                                                                                                                         .J
                                                                                                                                                         c
                                                                                                     224

-------
RLS
•aansao
u
•
-. —
CO ^ CO
CO < CO
< • <1
0. -" 0.
» CO •
a > o

CO II CO
**• UJ *~
II 2- II
O_  CO •-
C 0 C
O
u

CO
z
u
»—»
1-
o
<
CO
^
<1
ex
t-

1

^»
LL
CO
4
t-
<

•«•
UJ
* H-
CO UJ
Z -J
O. UJ
a a
V*- *
to O
W '
II U
UJ w
2. II
 «
O — a
QC cy »
a u- a
to *^ X
II II VI
U-' U^ ~
2. JS. II
< J a.
Z -J v-
co C —
Q > O
O
U

UJ
_l
e:
-
CO
C-l
a.
<.
u
^r
4
h-
co

jt
LL
^

1

t~
u.
CO

K-
<
LJ
ETAIN,SFR==ESERIAL
SPPIMARY, CSFCNCRY
CATA.f,NEV«*STR
a ** '
* » •
UJ >- )—
1- •- U
< • z u.
> — 3 ~>
• *— O. O LJ
h- a. i/> a OL
^- a. ~- co "•
^ ^ C_. U3 CJ
_J II l-J — II
UP U- •— • II UJ
|| 2- II LU 2.
H- S U- U «
^•^ ' I/- «l J**
Z C — o. co
3 > O co O
O
O

VESSAGFS
u
»™<
>-
CO
O
i;
O

^
LJ
CO
^
co
Q
C

ERATION
a
o

2.
Uj
^
CO c-
^ .j
CO U
CO
1 II
I—
CO ^
*- a
UJ CO
CO >
CO
t- c
«l o
CJ







^
^J
LJ
U
II
r—
^
u
CO
J*
CO
c
o








t-
^
u
U3
H

^3
U
CO
^i
CO
a
0








t—
_j
u
b?
II

^J
O
co
^>
CO
^J
o








K

U
u
ii
h-
3
U
CO
^
CO
o
o

LJ

CO
(J
             CD
             t-
             c
o
CO
a.


O
               x

               o
                                                       a.
                                                       2.
                                                                         c" * CO  *
                                                           225

-------
AQSILIST - SLIDING AVERAGE

AQSILIST is executed to produce a detailed listing of each record in the
master or answer file and to calculate a sliding average of the readings
in the record.  There are six input files used by this program.  The
first, defined by DD name AQSINPUT, contains the control card required by
the program.  The second, defined by AQSMASTR, contains the answer or master
file to be listed.  The third, defined by AQSPARMK, contains the key
portion of the parameter, method, unit codes table.  The fourth, defined
by AQSPARMD, contains the description portion of the parameter, method,
unit codes table.  The fifth, defined by AQSSITES, contains the valid
site codes table.  The sixth, defined by AQSTNDRD, contains the parameter
standards table.  There is one output file created by this program.  This
file, defined by AQSPRINT, contains the detailed report listing and any
diagnostic messages generated during the reporting process.

Figure 7.2.4 shows the format of the sliding average control card.
                                      226

-------
DD NAME
DESCRIPTION
AQSINPUT       AQDHS control card
AQSMASTR       AQDHS master file
AQSPARMK       Key portion of parameter, method, unit table
AQSPARMD       Description portion of table
AQSSITES       Valid site codes table
AQSTNDRD       Parameter standards table
AQSPRINT       Print file for report listing
                          AQSILIST - DDNAMES
                                     227

-------
PARAMETER
  NAME
DEFAULT
 VALUE
DESCRIPTION
PROJECT
'CDHS.AQS*     Highest level of data set names (e.g.,
               CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
IXSLDAVG       This program lists the contents of the
               AQDHS master file and computes sliding
               averages
MSTRFIL
FTMSTRAA       Lowest level index of the AQDHS master
               file
PARMKFL
HTPRMIAA       Lowest level index of the key portion of
               parameter, method, unit codes table
PARMDFL
HTPRM2AA       Lowest level index of the description
               portion of table
SITEFIL
HTSITEAA       Lowest level index of the valid site
               codes table
STNDFIL
HTSTNDAA       Lowest level index of the parameter
               standards table
OUT
               Sysout class for all print files
                  AQSILIST - Substitutable Parameters
                                       228

-------
Control
  Card
                         Master
                          File
'arm-Code
 Key File
                                             Farm
                                            Standards
                                             File
                                 Sliding
                                  Average
                                  Report
                AQSILIST  - Data Flow
                                 229

-------
OOOC/OOOOC  COOOOOOOOOOC  OCOOCOOOOOOOOOOOOOOOOOOOOOOCOOC  O C O  C  C
                                                                                                          ~
             C"1 O  O O
                                  J O <->  C."  C  O
                                                                     -
                                                           O t-l O <-•  O O
                                                                                     O O  O  O <-' O  O O O C.  tJ C • O  C-' C  C' C.'
                                                                                                                                                  1 <-  O
                                                                                                                                                                 O
                                                                                                                                                                                         -
                                                                                                                                                                       C)  O O >->  c  <-.
OGOOOCL
oooc^oooGooooooooooooooocooooaoooeoooooc-oococoooooocaoooocc;
o
JT1
•C
o
•3-
LL
Jl
                                                 z
                                                 •-
                                                 Q
                                                 «l
                                                 UJ
                                                 LL
                                                 O

                                                 UJ
                                                 O
                                                 <
                                                 at
                                                 LU
                                                 O
                                                                                                               CD
                                                                                                               <
                                                                                                               o
                                                                                                               u
                                                                                                               X
LL
Cf
                                                                                                                                   LU
                                                                                                                                   _J
                                                                                                                                   OU
HURLEY





1C
UJ
o
<











# *
»
UJ
1>SS3S<
I o i- a. x i- z
O _i ui ac a. — r—
LJ UJ 2. CL CL UJ U>
» x h- >- i— i— t—
II «- LL X X I X
^CCU!£CJLL'U!<;
£cj^ctct^z/I.
o. cc uj 01 < •—• r— ID
CL 2. CL CL UJ UJ O
LJ
CC
a

(-
UJ
i—
_j
i—
UJ
o
< *


,
2; *
 l_i II
II "— UJ
2. O 2.
CD LU »—i
CL CC h-
^j
LU
X
LU


t-
Of
0
a
u>
cc *
UJ
X
K
Jt
Lu
LL
CC
LU
K
2.

V.
X
o
LL
CJ
CO
fr-
uit
^
z
o
^)

^_
(/)
«— «
_J

* tt
.LCAO,
IFTAIMt
• *
*- UJ -*
UJ  ^
a •- o.
OC CL ••
II II Ul
LU LL *-
«. 2. II
Z -J u,
ui a —
a > c
o
c



01
*"«
_J
a
LL
*—
UJ
;OPSUBR,
^
.
UJ —
< U)
• <1
r-l CL

II UJ
LU —
Z II
Z UJ
UJ ~
0 0
o
a









*
o
ff

_j
u
cc
!2
LJ
1
1—
LU
UJ
«j
^.
^
u

i—
3
CL
Z
^«

* «

^J
* CO
1- II
^3 LU
CL IVI
II ^
LU _l
2. CC
^ II
<<: cc
Q 0
o a
o
0


f—
u
a
z
*-•
UJ
0
H < *
LU
LL
ii i
t-
2.

U)
X
Q
1
,_
LU
UJ
,j
h-
«j
Q

^»
3
a
z
*M

* *
.CATA.CMSTRFIL
DETAIN) ,
. »
(_ LU —
LL  «t
LJ ^- CL
CC CC •
0- CL CC
II II UJ
UJ LU *•*
2. 2. II
Z _- UJ
U". C —
D > O
CJ
0


a
^.
UJ
<
2
I/I
C

M OF PARAMETER
LJ
CC
CJ
a
>
i
K
UJ
UJ
«(
f*
4
o

t-
^1
C-
z
(—1

r * *
.CATA.CPARfKFL
DETAIN),
. »
U_ <1 U)
-5 ?•  Cj
o
o


1C
2.
Cc
•c
CL
Ul
o-
< *
t-
a
u
O
H-
CC
u
CL
y
U
a
i_i
cc
•LJ
UJ
O
1
,_
LL
UJ
«j
H-
^
O

t-
3
CL
Z
^x

« *
.CATA.EPARMOFL
»ETAIN),
• »•
K LU -^
UJ < tO
~7 > ^
O »- 0.
QL a: ••
a, a. ex
li* (I u:
UJ UJ — '
«- i. II
^ ~J CL
^ _J UJ
uj o •—
CJ > O
a
o


0
2
cc
4
a.
UJ
CJ
1- < *
LU
_J
CO
LU
Q
LJ
LL
Ul

O
~
1
,_
LLJ
UJ
^
1—
^
O

)—
Ij
a.
z
M

* «•
_J
»-4
U
UJ
>-
UJ
u
.
 <3
— CL
cc- -
a. cc
II UJ
UJ «-•
2. II
wJ CL
_| UJ
L-r ~~
> 0











«•
STANDARDS TAPL
'cc
i_
LL
2
_
Ij
UJ
,J
h-

^
a
z
•M

* «
.HATA.eSTNTFIL
DETAIN),
• *
t- UJ -*
l_5 H- t/1
UJ < I/"
~ 3 .^ ^
LJ «— Q.
o: cc »
Q- CL Ct
li tl  c
CJ,
CJ


0
a:
^\
^
t-

-------
 OOUOOOCJOOOOOOOOU
 ooooocoooooooooo
 C^O^rsJrO'jU'Oi^cocro-^cMrritj-
 ir\-oo>o<3*c^j'O^oofw'^-r^r^i^
 OOOOOC'OOC'OOOOCiOO
 o o «-» o o o o o o <_> o o cj o  o  <_>
 o o o o o o o -
      CO
      c
      o
             I

            CO
      LL
      V)
o
to
 II
                  u
                  CO
            o
            o
                  v-l     U
                         CJ
                         CO
            o
            o
u
10
u
u
ca
II
                        CO
                        >
                        CO
      LJ
      u
<£    o    z
—    a    —    t-
Otu-    IX-J
a    3    CL    c
CO    C'CO    CO
O          >    X
                              >-
                              on
                                     3.
                                     a
                                    CO
                                    >-
                                                                                           231

-------
AQSMSENT - ANSWER FILE FLAGGING

AQSMSENT is executed to append an end-of-file sentinel record to the AQDHS
master or answer file before it is input to Data Analysis.  The input to
the program consists of the AQDHS master of answer file and is defined by
DD name AQSMASTR.  There are two output files created by this program.
The first, defined by AQSENTNL, contains the flagged file.  The second,
defined by AQSPRINT, contains any diagnostic messages generated during the
flagging process.
                                      232

-------
DP NAME                       DESCRIPTION

AQSMASTR       AQDHS master file
AQSENTNL       Flagged AQDHS master file
AQSPRINT       Print file for diagnostic messages
                          AQSMSENT - DDNAMES
                                       233

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
MXSENTNL       Program to copy master file and append
               end-of-file sentinel record
MSTRFIL
FTMSTRAA
Lowest level index of master file
STATFIL
MTMSTRAA
Lowest level index of flagged file
UNIT
2314
Unit type upon which the flagged file
is to reside
SERIAL
009858
Volume serial number of volume upon
which flagged file is to reside
DISP
'NEW.CATLG,
DELETE'
Disposition of flagged file
SPCUNIT
TRK
Units in which space for the flagged
file is to be allocated
PRIMARY
20
Number of units to be allocated for the
flagged file's primary allocation
SECNDRY
10
Number of units to be allocated for the
flagged file's secondary allocation
OUT
               Sysout class for all print files
                  AQSMSENT - Substitutable Parameters
                                       234

-------
AQSMSENT - Data Flow
              235

-------
    OtJOOOCOCOtJOOOCUOOtJOOOO
    OOC-OCOOCOOOOOOOOC'CJOOOC
    •-^)h-a;c  u—itx
                                                                       1C. OOC-'OCJOCOOOCJOOOOOOOOOCOOOOOOOOOO
                                                                       >C GCOOC/OOOOCOOOOCC  OOCOCjOC-'OOOOGCCO
    C'OOt'OOOOC
                                 <-'OOOOOOOOOOOl_C(_iCOC_C'C  CJOC  C  OOOOOOCOOC  C1 C O t. t;  O O C  OOC'C'C
                                     O O O  O O C~  Cl O O O C- O <-'  CJ C< O  O CJ O CJ r > <_> C.' C <-'  *.
          ~> a.  a.
          u c9  a i
     GO I/I
I     CO ^   *
     00 Q.  *
>  » it*  »  o:


 ,-> l_> Ul  II


' CM «J •   •—

 t- — d  _•
                                                               o
                                                               a.
                                                               u
                                                               u
                                                               UJ
                                                               ex

                                                               _)
                                                               UJ
                                                               z
                                                               M
                                                               K
                                                               ^
                                                               UJ
                                                               00
             UJ
             a.
             a.
                                                   •~     a.
                                                 • Z     a,
                                                CJ •-*     ^
                                                -
                                                                      «     a
                                                                      !->     O
                                                                      a     z
                                                                      UJ     CJ -J
                                                                      OO     U_ •"
                                                                      U     00 U.
                                                                       II     U3 I—
                                                                      oc      » - I-
                                                                      oo     a. oo
                                                                       •     < u
                                                                      ^     r  •
                                                                      •—     M - a


 II  II  00   ||    C  C C

C        O
o        o
                                                            CO


                                                            a.


CJ
CJ

ct
oo
^
2.
(/-,
0
^,
00
D.
»
o:
x
VI
^f
II
o.
oo
^~
o










00
LJ
Uj
IT
<1
_J
U.

1

^~
UJ
oo

^
h-
—
t- a.
•— Q.
^£ ~-
=) II
^f UJ
M a.
K- i3
•" -J
Z. O
— >

CJ
u

-J
t—
^
tu
^
u
O- <
to O
«- • •
». •
(- 1-
jr ^ "•
a. 0 cj
i/-, a ct
"" oo a.
CJ OJ CO
05 «— II
— II UJ
II UJ 2.
a u «
00 
CJ
oo
>-
oo

C-
CJ

h-
—r

QL
a.
00
u
at
UJ
a
u
2.
UJ
00
>•
00

1

*/)
^
LU
OO

<
t-
<
o
^~
Q.
K-
_>
C



1-

u
u
II
»—
o
LJ
00
>.
00

u
c;

»-
„
a.
a.
^/)
>


t—
_;
O
U9
II
*-
_)
O
00
>.
00

o
Q


^_
_3
C;
00
>


H-

O
O
II
h-
3
W
OO
V
00

o
c

K-
Q
CL
CJ
00
X


1—
3
u
to
II
*—
^J
LJ
00
>.
00

CJ
a

z
LU
^*
0
00
>


,_
J
CJ
IO
II
^*
_J
CJ
00
>-
00

o
o

c.
^
CJ
_J
00
>
00
CJ)
                                                                                                     236

-------
AQSNSENT - PARM-CODE-KEY FILE FLAGGING

AQSNSENT is executed to append an end-of-file sentinel record to the
key portion of the parameter, method, unit codes, minimum detectable
table before it is input to Data Analysis.  The input to the program
consists of the key portion of the table and is defined by DD name AQSPARMK.
There are two output files created by the program.  The first, defined
by AQSPARMF, contains the flagged table.  The second, defined by
AQSPRINT, contains any diagnostic messages generated during the
flagging process.
                                      237

-------
DP NAME                       DESCRIPTION

AQSPARMK       Key portion of parameter, method, unit codes table
AQSPARMF       Flagged key portion
AQSPRINT       Print file for diagnostic messages
                          AQSNSENT - DDNAMES
                                       238

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
NXSENTNL       Program to copy parm-code-key file and
               append end-of-file sentinel record
PARMKFL
HTPRM1AA
Lowest level index of parm-code-key file
PARMFFL
UNIT
NTPRM1AA       Lowest level index of flagged file

2314           Unit type upon which flagged file is to
               be allocated
SERIAL
009858
Volume serial number of volume upon which
flagged file is to be allocated
DISP
•NEW.CATLG,
DELETE'
Disposition of flagged file
SPCUNIT
TRK
Units in which space for the flagged file
is to be allocated
PRIMARY
10
Number of units to be allocated to the
flagged file's primary allocation
SECNDRY
               Number of units to be allocated to the
               flagged file's secondary allocation
OUT
               Sysout class of all print files
                  AQSNSENT - Substitutable Parameters
                                       239

-------
    Flagge
    Farm-Code
    Key File
AQSNSENT - Data  Flow
                240

-------
                                                                                                                                    O CJ CJ c_- CJ  O O O CJ
                                                                                                                                 C-OOOOGCC  CC
                                                                                                                                       tr C> t-i INi  rr, si- u.  <;

OOOCOOOCCT'C'CCOGOOOCCOCOOOCCOOOOCC.'OOOOCOOOCJOOOCCCOO
O C-  <-> t- O  o O C «-• C-'  C' O  C  CJ O O  O Cl C  O  C~> O C.'  O O C^  C' O O O O <-j (_•  o <-• O  O C' O  O C' O O O O  O O O C
C CCJOCCC'COOOOCOCGC  C  oOCOOwOOOOC'C'OOOOOC  OCjOCOOC(_C-OCc_)C
coococcooocjcoocococoooowocjcocoooooooooooccjooeoeco
    OOCGOOCOOCOCOOOC.eCOOC'OC  OCC  OOOOCCOOc;OOOC.OOOOCOOO
    *^cyro^iri^f^
    OOOOOOO
    OOOOOOO
    o o o  o o  cj
    O O O  O C) O O
    OOOOOOt-'
                                                                                         UJ
                                                                                         _l

                                                                                         <
    u.
    I
                                                               o
                                                               OC
                                                               o
                                                              o
                                                              o
w
co
iJ
o:
HURLEY RF

^_
z
UJ
CO
^
CO
CJ
^












*
^
UJ
» >-
- UJ
CO _J
CJ » » » UJ
< -I «! «I Q
• z « < •
I Z 2. I CO CO
O UJ IX CL LT < *
. x t- >~ »o- »c.o »
IIZiH>rcjit--"cr>
K- II II || •— CJ Uj II II II
CJa__j_jf u 21— xx
•^OC^-U, II v"XNtVV«v«^x.x,>vV.
V.^-x-N.'v.N.'XV.V.^.V.V.V,

cj c. <->
ex %c *
a u -H
II LJ II
2. — Uj
C. O 2.
C. Uj t— t
a >-
{j
UJ
X
CU

J
UJ
z
^-»
t-
z
UJ
CO *
>s. -V, >. X>
.E AND APPEND SENTINEL R
u.

>•
it

QL
UJ
H-
cu
2.
<
ex
<
CL

X
a.
o
CJ

« #
v. x!

DJECT..LCAO,
I VATE.OETAIM,
3ASS) .
L .ANS.COPSUBR,
3«SS)
CC O- • CO »
u. o, ix X a.
to «^ x co x
II II i/ II c-j
i i. II i II
« _> ex « o.
 C CJ c

o c;
U CJ



CO
«—l
_J
a
LL.
t—
CO *
•V "X "v V, N, •«

"CPTICN OF PARAMETER, ME
:JECT..DATA.£PARPKFL,
X a.
UJ CO
^ II
t 2.
ARyFFL
oe • « t-ai/iacx
a a _j ^cx — cocu
•^X CL ^ — O CC W
II "J 3 || 10 « II
2. II II 2. II CL 2.
3d. *- »— ^Q-LJ^
_ j uj u. ^^ »J t/; «1 ^£
cj»- co zu — aco
> O 3 > Q CO D
^
1- C
<. CJ
CJ

h- u.
3 2.
o. a
>—  * *
X >. -X

u
CO
II
j
CJ
CO
>-
CO

o
0


h-
Z
M
o£
Q.
•S*
c-
. -.

^
CO
II
_J
CJ
CO
>•
CO

a
o




H-
^
o

X
t CO «•
•. >. X,

CJ
CJ
II
;j
CJ
CO
>
CO

r*.
Cj


^.
^
o

CJ
CO
X

X. «*

CJ
CO
II
J
CJ
CO
X
CO

0
Q


2.
c^
UJ

Q

X

^ «v
•
CJ
CO
II
J
CJ
CO
>•
cr.

e_;
o


a
i
~
c_
_ j
•y
>
x. ^C C
X. X» N^
Z
UJ
CO

CO
CJ
•a
                                                                                                     241

-------
AQSRETVR - RETRIEVAL

AQSRETVR ±a executed to generate an AQDHS Retrieval program, compile
and link-edit it, and execute it to retrieve an answer file from the
AQDHS master file.

There are two input files to the generation phase of this procedure.
The first, defined by DD name AQSINPGH, contains the skeleton of the
Retrieval program.  The second, defined by AQSINPUT, contains the control
cards specifying the qualification to be performed on the master file.
Two output files are created by the generation phase.  The first, defined
by AQSRTRVR, contains the Retrieval program to be compiled and link-
edited.  The second, defined by AQSPRINT, contains any diagnostic
messages generated during the program generation phase.

The actual retrieval phase uses one input file.  The file is the AQDHS
master file and is defined by AQSMASTR.  There are two output files
created in this phase.  The first, defined by AQSANSWR, contains the
records in the master file which met the qualification criteria.  The
second, defined by AQSPRINT, contains any diagnostic messages generated
during retrieval.

Figures 6.1.4-1 and 6.1.4-2 show the formats of the retrieval control and
specification cards.
                                      242

-------
DP NAME                       DESCRIPTION

AQSINPGM       Retrieval program skeleton
AQSINPUT       Retrieval specifications
AQSRTRVR       Retrieval program
AQSPRINT       Print file for diagnostic messages
AQSMASTR       AQDHS master file
AQSANSWR       AQDHS answer file
AQSPRINT       Print file for diagnostic messages
                          AQSRETVR - DDNAMES
                                       243

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS'     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
LXLNGPRC       Program to produce an AQDHS retrieval
               program
TEMP
SYSOUT
Unit type for temporary work space
MSTRFIL
FTMSTRAA
Lowest level index of master file
ANSWRFL
RTANSRAA
Lowest level index of answer file
UNIT
2314
Unit type upon which the answer file is
to reside
SERIAL
009858
Volume serial number of volume upon which
answer file is to reside
DISP
'NEW.CATLG,
DELETE'
Disposition of answer file
SPCUNIT
TRK
Units in which space for answer file is
to be allocated
PRIMARY
20
Number of units to be allocated for
answer file's primary allocation
SECNDRY
10
Number of units to be allocated for
answer file's secondary allocation
                  AQSRETVR - Substitutable Parameters
                                       244

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
MEMBER
RTRETRVR
Retrieval program skeleton
OUT
               Sysout class for all print files
                  AQSRETVR - Substitutable Parameters
                              (continued)
                                      245

-------
 f Retrieval
 Specification
     Cards
Retrieval
 Program
Skeleton
                 Retrieval
                 Program
                  Load
                  odule
AQSRETVR  - Data  Flow
                246

-------
    OOOOdOOOCOOOOOCOCGOCOOOOGOOCCOCC.  OOOCOCC.OOC.~iO COO  OOCOOOCOOCCO
    «-4(\jr>i>jin>ijr—ccuc — <\i<»'-3'iri<.''--c-,cro--rv4<'<-, -^ir\-oi~-ODao—•ruc-jm^r-a.c^tj^tvf. ^j-ui-l'f-a.i/'O^'Cv.i'O-J-u   ,0  r- co
    O G  o o o  c  OOC  .-*'-'^»-i~*»-ti-''-'*-*t-«'MC\jryrNJ(Njrvjc\jr\,r\tr\jfrir'"ip,r~r<  roc**fr»<'Om«j *j-*j-^^j->y<'*j->jNiu~'U'\Uii^tf'u   u*  j? IT
    a c,  o o c'  o c o  c  a c- c o  c  o o  o o  o o o  o o o  o o  o o c-  o o  a  o c-  o c  o  o <-)  o c  o o o  o c-  c- <-' o o c  o: o o c  c  c c.
    OCOCOC1C_CJCO<-'Ot.'<->OC'OOtJOOOC'Ct>t>OOCCJtJC'<-Jt  O O  CJ  C. O>  C> C  <-> O C  C: O  c <->  O O e  C  CO
    OCOGOCOOCOOCO-OOOOOOOCOOOCOOCC'C.OOOCCOCiCOOOCOOOCOCOC'COOGOC.CO
    OOOOOCOOOOOCi-'OOOOOOOOOOOCOOOOOCOCOCCOOOOOCOOOOOOCCC.OOOOC-OO


    *T
    r-
    "V
    o
    m
    V.
    •a
    CJ
                                                                                                                      in
                                                                                                                      O
    LL                                                                                                                CC
    a.                                                                                            x.                  «t
                                                                                                  O      •>           O
    >•                                                                                            »-     •*
    uj                                                                                            uj     a           z
    _l                                                                                            _J     LU           U
    a                                                                                            UJ     CD           —
    ;_•>                                                                                            *     2.           i-                                      uo
    X                                                                                            oo     LU           <                                      uj
                                                                                  •      »               SE  »       O              SE                     O            Z
                                   •                                             .»     o£        2.     W —       ~          •    <            •<            O
                                -.                                            »Z     m        <     —z       u.              a:           —        oo            _
                                  UJ                                          O »•     ~~J        a     >- >—       >-              O           ujoo            I-
           »                     H-                                   2.<1~oo<        o>        oo»aoo            i
          IOH-OOUJ<[OO^     »OOUJ        OOLOC^O            UJ
          OZ»OO^    U^<1    LU    K  II     *-"        <3«— LJ     -     (-
          •   3<^H-»—  ••ux*-ac_iccr        "x^**     J>     ocac'»oo»     ct     oca;*'    ac    0.1*4    H-    o.»^io.     «     "^     >-     J     ^"3     —>
           II.J'JU.CtlNfr'-JjIh-  f"*''-'*-        OCJO     U-     Q.Q.CC>*CK.     K     U-Q.OC    H-    ^:*-    LU    Z.JCcC'*"     •—     I—(     OO     LJ     L-l     CJ
    a;    f-Hooiiii^^du^iiniia        LJ^J*     «—     to^-3.ooj_     LU     w*-i    uj    *-"oo    a.    U_LL>~OJ     o     03            oj     u~     oj
    ^>    o 2 > —i _i ^  ii  ^ >-  > >  ii        a n  -*     or     n   n oo n  oo     a     11   n  oo    a     11  x.           t-  ^ ~-  n             n      I      u      n     u
    f-    ujLL(Sj_j->-aOLa.        u,^:—     t-     UJUJ~-LL,-—            UJLL—           >*J_J     i     w—  HUJ      i     t-            p-     t-     i—
    UJ    -1arllU.'>'ll<'ll^—Q-—J2.^crM      ii  "—• uj     QC     <^a.OO'~tC'2H-    2O2.            Z^OOZOO     H*     ^«JOO    h-    ^tfj    UJ    ^"O^«5Z     LL     OO     U_     OO     UO     OO
    O    a.a.ujooi^JiLL,'— a.a:ujLL,ZJ    OLL.^^     oo     OOQ^HOO*—     LU     ooo*"    LLJ    CJo    oo    z^-a.oo     oo     >•     oo     >-     >-     >
    ^        CLh- au<."jO".  C.OOQ.002.C    CXQCH-     X     O>OOO     00     C>O    00    OC           ""3C.OOCJ            00            00     o^     OO

          o                                            o           a     o        Q        <     o           -c.    o        t-    o               H-     Q     t-     o     t-     o
          a.                                             uj                                                       LL3               "JZ-^ZO
          h-                                            -J           Qi—                  DO.           "~jo.o.a:               a.^-a.^-*~c
          LU                                             —•           O-J                  a.z           Q.    ^        >-    i—               j-ah-a.—'a.
          a.                                             tx           oca.                  z«-           z~_jLt               ^c."jai_u
          OO                                             X           Q.UJ                  ^-OO           i—>    OO        C    OO               CoOC^^CO
          O'                                      CJ                  t-                         O                  0(J                      o'>>->-
    «•«<                                          «O        **«00               «*«<        «««•->4r^
                                                                  :  <
00
o
                                                                                                      247

-------
    oooooocooooooooooooocococcoceococooocooooooooc.e-Ooooooooocc
    tro»-''Mfo>j'iri'4-r--ccL1'O'-*(\jrMNTU>'OP-occi'C'-*osjro*yu   ^r^ajcPC.'—«^NijvOso^>crwr^f^f^r^r^f^r^^r^Q^cocLcuxoL'xx<^ooa^c^^Cj>c^cro^crtrc7^oooc-oooooo»-^«--'«-<^^^H«-«^H
    o o o f o  o o o c.  c_~  c  c. o  c  coc c_  <_> o o c o  c  oc oooc;oococ"OC-oc_'Cjci«-<^-i^-i — t-j—i^H—ir-i—1^«—«^.-<^i
    o o c o o  o o o o  c'  o o o  c-  o c o o  o o c~ u r  c.' <_• o c.  c o o c.  o o o o  o c_- o o  i-- c  coooooooo^oooooccr
    OOOOOOl-'COOOOOOOCOOCOCOOC.C'OCOC-i-JCOOOoOOOOOOUC-OOOOOOOOOC-OCl-C'O
    OOOOOC'OCt-'C-OOOOC'OOOOOOOC'OCC OOC  OC  OOOOOOOOGOOCOOOOOOOOOOOOOC2O
   u
    II
   LJ
   CO
   CO

   CJ
   O
   CO
OUPCE,SUPMAP
OSEO
0K
BU
       • -J
      o a-   ••
      o n  :*
      _j LU  t; —
      co r«i  o o

      LL C^  II  tNj
3    1-1  II  LJ  II
O     II  2.  "• U,
CO    2.  (X  O i
>•    O   a
CO I
 u co
UJ v
2.  II
«1 O-

CO •—
O C

o
o
BRARY
                                                o
                                                a
LJ
CO

 I
o z
Q£ —
—J <1
U K
CO LU
 • a
 •  *
t- uj  —
u *-  f
LU <  CO
-3 >  
co O  1—
C >  O

C
CJ
PRQCRAM SOURCE CODE
FV
TR
                   u
                   a.
                   LJ
3    CQ
Q.    —
                                             «•  «  *  CO
                    —  II  U-
  II  UJ Z
• Q. LJ •<
• CO < Z
. 1-4 -
                                                                                                                                                  00
                                                              3 ~    CO —
                                                              CO —    >- —
                                                              X O    CO C
                                                              CO O    — f
                                                              II  ^     II  —
                                                              Q.  »    Q.  •
                                                              LU O    LU CT
                                                              CO 1T\    CO If*
                                                                                                                                                            CO

                                                                                                                                                            CO
                                                                                                                                                            3
                                                                                                                                                            CO
                                                                                                           1/1 —
                                                                                                           > —
                                                                                                           LO O
                                                                                                           — O
                                                                                                            II •-"
                                                                                                           OL  »
                                                                                                           LU O
                                                                                                           CO IT»
                                                                                                                                                                •• O
                                                                                                                                                               H- CD
                                                                                                                                                               U-, C.
                                                                                       3
                                                                                       o.
                                                          3
                                                          O
                                                       o
                                                       o
                             z
                             — .
                             _J
                             CO
Q. a£
i. a.
UJ 9~

CO II
II LU
1— LJ
*•"* ^
z a
3 CO
0
CO

jr ^
11 1 Q£
tw p—

— II
II LU
1- LJ
•— ' ^
Z Q-
3 ««
O
O

2. ^
LU CL
W —
»•• II
II UJ
t— {_?
*-* <1
Z Q.
3 CO
£;
0

>- 2£
LU Cf.
^. ^_
CJ — •
— M
II LU
1- LJ
*•"• ~ O —
• CO _J O 0
1 »_, ^ ,_^ ^
Jt _J IT, II -*
LU K »^ ^, *^
•-II II U II
II i- I_ — LU
2. (t Z O i
O « C LU i— >
Q. O. LJ O. H-
o
LU
X
                                                                                                                                                                                         O
                                                                                                                                                                                         LU
                                                                                                                                                                                          I
                                                                                 *  #  * I/I  *
                       t-    3
                       3    co
                                                                                                                    *  •»  *  LO
                               3
                               CO
3
LO
O
JJ
                                                                                                                                                        *  CO    *  _J
                                                                                                                                                    . -^ -V  "». >v. -s.  ^
ex
LO
CJJ
                                                                                                   248

-------
    OOOCOCOC.OCOCOCOCOOC.-COC. OCOOCOOOOOOOOC-OOOOC'C.-C'OOOOOCCOCOOOC'-O
    r^GDC^c-^^r*i^i^M^i^Gocrc»^fvr<"i>xu^Nor^cocro»^r\f^^iri>r^v^p^a,oo^^^f^^^<:r"QL'Uvt'--^^r^^^^^^u^lr^u>u.t/^^u^u^UlU^^O*o>o^o<)<3<)^^^,^0'^^^f^p^r-

    OOOCOOOC  O O O O O CJ O O C  O  C  C_~  O O O C> O O C O O O C,' O O O  o  O O O 0- O O O O G O O  O  O O O O O C O C  C  <-' O
    O C' Q C  O C  C C  O O C  O C- <-' O C; O  O  C  O  o O O CJ o C O O O O O O O O  C  O O O C' O C O C' O o O  O  O C  O O O O <~- C  o  t-' C'
    ooooocootooooooooooc-oocooooooocoooocooaocoooooooooooocoeoo
ALL LIBRARY
ECT..LTAC,
ATE, RETAIN),
SS)
A N s . c c e s u e P ,
SS)
<_J "^ > <1 •  Q.
^ IO s. ' ± U) X
•a |i i| oo u oo
1 i- i. ll i II
 C Q CJ

< 0 0
y- c. c.

o

^-
r; cc.
a. >-.
z _j
•— OO
>
« * I/ ft
»• •«v'V>vv.>vVx^
RETRIEVAL PROGRAM OBJECT COD1

_j
c^
cc
LJ
«J
1

K
LU
OO

>
*• LU
CJ »—
U Ol O
Z _1 » CC
~5 LU »— II
CC O 'J LU
L_l » Q- ^-J
to O Z ^*
*^ -J •— V.
II U II bt
i- u at- cc
«i CL <; M
Z 00 Z CO
00 ^ LJ I_J
C Q CJ O

CJ LJ
O CJ




Z
»—
_J
00
>-
* 1-0 «
OSTIC MESSAGES
^
O
«a
HH
CJ
1

t—
LU
CO

-
<
0

t-
o
a
^_
^
c

V. N


>—
-J
CJ
*o
M
_>
CJ
VI
>-
t/)

CJ
a


|M.
Z
*— 1
a:
a.
t/i
>.
^ LO *
** x. *.
RETRIEVAL PRCGRAM LOAC MOOUl
•j
o
cc
u
Vw>


f—
LU
l/l

4
^
•a
O

^~
^
a.
t-
3
D

rJ
Ol
UJ
• ct
— LU
""* °-
» U\ Q
~ » D
OO .
* 00 i







f_
01
OO

^
^
•
1—
l-a
J
••^
H"
^

f * -ft
in
0
i-4
—
» »
a. ^
S- Ct
LU h-
*~ "
II OJ
1- 0

z a


o
0




*-«
h-
u
OO
>•
I/' *
•N. X *v
SYSLMPD,
COBOL) ,(5,LT,LKEOM,
. »
0 I- »
o» «i at —
^ » o o
«J U\ >U 9-
• — II r-<
II II U II
a. a ^- uj
o z o a.
a o LU _.
o a. »-
^
LLJ
X
LU

LU
^
LL
ta-*
Ct
K
LU
Ct
X. X. V. >,
X, X X X.
OH ACDHS MASTPR FILE
ct
u_

UJ
_J
•-1

ct
LU
3
00
Z
4

LU
;>
UJ

ct
^_
UJ
ct

^ # It
ECT..LOAC,
ATE, RETAIN),
-j >
o >-
ct ct
U. CL
IO —
II II
i. i.


CJ
CJ



CO
M
_J
O-
U-
t—
00
x x
SS)
ANS.COBSUBP,
SS)
< • - ct
i l/l X
V, U l/l
II i- II
0. < a.
oo 2: i/i
— 00 "-
0 0 D

O
U









t
X X X >
MASTER FILE

00
X
LJ
c_*
<
1

t-
LU
00

 o












1
X X s
UJ
u.
ct
LLJ
•3.
l/l
S
•a

I
t-
UJ
00

^.
^~
^
o

H-
13
a

.j
c

v X I
ATE,RETAIN,SER=£SERIAL),
>
+• >— i
K- Ct
>- (X
^ *-•
-> u
it a.
^~ 13
*— i __ j
Z O
o >

u
CJ


u:
X
i/>
z
<1
oo
CJ
K X -X
f •
NtT,(CP«IMARYt£SFCNCRY),RLSE
FCT ..CMA.CANSWRFL
^- ^ ~D
CL O (—
i/ a CL
i— . OO LL.
r> u: cj
CC — ' II
fc— 11 ^
u a' •*-
u- LJ 
-------
OOOC'OC.'OOOOCO1_>OOCJCJOOO
OOOOOC  C-CC-L-CC-COOOC  COOOO
lOor-oocrc  «-*  rj r •  -r  tn -^ r*-  a^^  o^- c»  «-•  C' C  C, C  C  L C'  O C O  O C  O  C' C' O O C  O
OOOOOCJC-C'CJOOC OCCOOOOOCO
to
LU
LD
to
o
o

o
 I
3
c
_;
LJ

 II
       l«


       O
IX
a
to
tJ
             a
             a
x
to
a
h-

a
LJ
co
II
0
to
£
CJ
o
K
z
VI
a:
0.
tr.
to <
LJ
CO
II
u
to
to
CJ
a


h-
_J
u
to
f to •!
u
CO
II
t—
LJ
to
to
CJ
LJ
H-
3
a
01
LJ
to
} to 4
LJ
CO
II
U
to
to
c
c
2.
a.
LU
H-
C;
to
t to »
LJ
to
II
t-
LJ
to
to
o
CJ
a.
5;
3
o
_j
CO
to
          P LU
          O K
          X LU
          O _l
 *        
-------
AQSSLIST - STATISTICAL LIST

AQSSLIST is executed to format the statistics file created by Data
Analysis.  There are five input files.  The first, defined by DD name
AQSTATIS, contains the statistics file to be formatted.  The second,
defined by AQSPARMK, contains the key portion of the parameter, method,
unit codes table.  The third, defined by AQSPARMD, contains the descrip-
tion portion of the parameter, method, unit codes table.  The fourth,
defined by AQSSITES, contains the valid site codes table.  The fifth,
defined by AQSTNDRD, contains the parameter standards table.  There is
one output file created by this program.  The file, defined by AQSPRINT,
contains the formatted listing of the statistics file and any diagnostic
messages generated during the formatting process.
                                     251

-------
DP NAME                       DESCRIPTION

AQSTATIS       Defines statistics file to be formatted
AQSPARMK       Defines key portion of parameter, method, unit, minimum
               detectable table file
AQSPARMD       Defines description portion of above file
AQSSITES       Defines valid site codes table file
AQSTNDRD       Defines parameter standards file
AQSPRINT       Statistical report and diagnostic messages
                          AQSSLIST - DDNAMES
                                       252

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
 'CDHS.AQS1     Highest level Index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
SXPRINTS       Program to format and print statistical
               report
PARMKFL
HTPRM1AA       Lowest level index of key portion of
               parameter method, unit, minimum detectable
               table file
PARMDFL
HTPRM2AA       Lowest level index of description portion
               of above file
SITEFIL
HTSITEAA       Lowest level index of valid site codes
               table file
STNDFIL
HTSTNDAA       Lowest level index of parameter standards
               table file
STATFIL
STMSTRAA
Lowest level index of statistic file
OUT
               Sysout class of all print files
                  AQSSLIST - Substitutable Parameters
                                      253

-------
                  Parm-Cod(
                  Key File
         Site
         Code
         File
  Farm
Standards
  File
AQSSLIST - Data Flow
                254

-------
                                            .-,_
OCOCOOC  OOOCOOCOOC'CCOCC  C C' C.  o C O  COCOOOOCC-COOCOCC-OCOCCOOOCCC  COO
~-*rvjm»yu"'£.f^arcrOi--«r\jm>j-m>t/r--a:crG~-r\.rr!>r«r*.cr^a;crc.  ^-irgrONTu^^r-cocrCt—•fNjrrNj'U\>or^°-U1c.1»-'f>«Jo^<4'ir<;^-ao
OOOCOCioC'O^^'^»^'^'^»^'^«^'^*^^rvr^f\jr^rvjf^c\j^r\jr^rifOf^f*1cfO(*i^^^>T<^>4'^^^u^iriir>u"\u\inir'irLO
o  o  o c> r   c> i  c  o  o o c  c.  c • c.  o c  c o  c c.  o  o o o  c o c   o c. c.  c  c  o r.  c  o o c o  o  o c  o c; o  o o c  c  <~ c.  c  o o  c  o  o
t_>  CJ  C  O O  O CJ C - C  U O C  «-' O <-^  C-> O <-% C-  O C   U  C O C'  O O <-'  O <~ C?  O  O O O  O O O C.' CJ  O  C' C>  C' l_i C>  O O C  O O O  O O O  C  O  C
O  O  O O C'  C  OOoOOOCoC  O O O O  <-• C   C  OOC  C. O C.   c  C  C  OCC C  O C OC-OC  OC  C  COOOOOC'CCOOC-'C  O
OOOOOCoaoOOCOOOOC'OOOCOOaoOOOOC'OOOOOOCOOOCOOOCOOOOOCO  OOCCOO
o

x,.
sC
Ul
_J

<
                                                                                                a
                                                                                                a
                                                                                                 '
STRCUP





t~
t*o

_i
00
00
o











i •*
00
^ OO ^
oo *: —C
X «-i 2
o i- o
II 00 I
t- II II
UJ — •—
CJ LL. U- LL -
—1
^
^

^
l~
-
_l UJ
* o
t- LU
C! *~
LL, «
C ~
a. Q.
U3 ^*
II II
U_ LU
2- •»-
<1 -J
2 _i
CJ >

U
t_;



CL
M-l
	 1
a
LU
£
i
-^
o-i 2 oo
oo < oo
S ^ It
c. > a
"^ ""' Ji
— U--
ll 2. II
o- < u-
00 Z V}
ceo

U
CJ








»
u
u.
0
t-
^
I—
00
00
CJ
^

1

>-
00

^
K-
<
a

>—
13
a.
^r
•—
* *
.DATA.SSTATFIL,
(ETAIM,
• u-
* •>
O >— */>

C — Q.
O- a. a;
w — X
II II Vi
UJ Uu ^
i. i- II
< r) a.
Z — "'
D > C

Q
O


OO
*-<
h-
.
LU

|

1-
00

<^
»-

CJ

H-
^
a
z
b«
* <
,HATA. EPAR^KFL ,
IETAIN1,
- ^
O H- OO
Lu  Q

0
O


X.
s.
cc
«2
Q.
OO
1- -c «
s PCRTION CF TA
4b
U
h-
a
ct
00
^_1

t

h-
00

.ETAIN>,
CCCE TABLE
» w.
• » UJ
i— u- -» ^-
L-> >— t/i •"•*
Lu < t/) l/>
CJ •— a c:
a. a a. _j
CO — • X «1
II II *" ^
U- UJ •—
2. 2. If 1
< ^ Q.
2- — J *" ^
0 > C 00

CJ - UJ ~~
O 1— 00
u, «a oo
LJ *- a
Q. O- ct
OJ ^> X
II II t^*
ii i ii . ^f.
2. 2 ff
« ^ O-
^ -J 00
C. > 0

O
c;


00
LU
t—
»-4
00
00
O
t 
•4
a

>-•
^
a.
**
i—
* i
»
_i
U-
o
2
K
00 •
w — .
• z
 c

o
c


CJ
ct
a
z
t—
oo
o
CD
1—
—

H-
CJ
LL
u.
1

h^
LL.

4
h—
<1
Cu

^»
_ j
a
K-
_J
O





t-
o
"
(—
_J
O
00
00

c
CJ.


^_
z
^*
a;
Q-
OO
CJ
c
a
LU
£
>
UJ
V
VJ
1

VI
h-
u.
t/)


-------
OOQJOC C^O
OCOC'OOO
                     OOC  O
O O O C' O O O  C  C  C  O
O O " t.i O C  O  C  O  O  O
OOOOOf  OOOOC
O O O O C  C' O  O  O  O  O
  (-1
  W
   II
a
w
II
                        u
                        u
                        II
(J    (J    L.
V}    VI    l/l
  u
  O
      O
      C
l/l

u
O
                    C
                    I/I
                    >-
      O
      O
                   i.
                   a.
  Ot
  o.
              —
              -O
                                                                                    256

-------
AQSTEDIT - TRANSACTION EDITOR
                                                                 »
AQSTEDIT is executed to edit AQDHS file maintenance transactions.  There
are three input files used by this program.  The first, defined by DD name
AQSTRANS, contains the AQDHS transactions.  The second, defined by AQSPARMS,
consists of the key portion of the valid parameter, method, unit code table.
The third, defined by AQSSITES, contains the valid site codes table.  There
are two output files created by this program.  The first, defined by
AQSINTRN, consists of the AQDHS internal transactions.  The second, defined
by AQSPRINT, contains a listing of diagnostic messages.  Afterwards, the
AQDHS internal transactions are sorted into file sequence.

Figure 2.2-2.1 shows the formats of the file maintenance transactions.
                                      257

-------
DP NAME                       DESCRIPTION
       *

AQSTRANS       Defines input data set containing transactions to be edited
AQSPARMS       Defines key portion of parameter, method, unit, minimum
               detectable table file.
AQSSITES       Defines valid site code table file
AQSINTRN       Defines output data set to contain edited transactions
AQSPRINT       Diagnostic messages
                          AQSTEDIT - DDNAMES

                                     258

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
PROJECT
'CDHS.AQS1     Highest level index of data set names
               (e.g., CDHS.AQS.DATA.FTMSTRAA)
PROGRAM
TXTREDIT       Program to edit AQDHS file maintenance
               transactions
UNIT
2314
Unit type to which edited transactions are
to be written
SERIAL
009858
Volume id to which edited transactions
are to be written
DISP
'NEW,PASS,
DELETE'
Disposition of edited transactions
SPCUNIT
TRK
Units in which space for the edited
transactions is to be allocated
PRIMARY
10
Primary space allocation
SECNDRY
               Secondary space allocation
TRANS
TRANS
Lowest level index of data set to contain
edited transactions
PARMKFL
HTPRM1AA       Lowest level index of parameter code key
               file
SITEFIL
HTSITEAA
Lowest level index of valid site code file
                  AQSTEDIT - Substitutable Parameters
                                       259

-------
PARAMETER
  NAME
DEFAULT
 VALUE
          DESCRIPTION
TEMP
SYSOUT
Unit type for temporary allocations
WORKSPC
20
Space allocation, in tracks, for work
space
SORTCTL
TSORTCTL       Member of SYSIN section containing sort
               control card
OUT
               Sysout class for all print files
                  AQSTEDIT - Substitutable Parameters
                              (continued)
                                     260

-------
AQSTEDIT - Data Flow
              261

-------
    O C • O O  C  C  C  O
                  '
                                     C_' O C  O
                                                                  O  L,  C  C C  C  C. C
                                                                                                                      ' t,  O O C  C' C.  (_;  C  O
                                                                                                                                                                   C O O C  C   C  C C  <_> C
    o o o o  c  c> o  c; L  c  o o c o  o c. o  <~  c. o  o c1 o c  o o o  o o <_•  c  t> o  o o o  o <-> o  c> o o  c  o c   o c. c  o o o o o  o c; c-  o o
    t> C  C- O  O O O  O C1 O  C .» O C C   l_! C" C   C )  O O  t-> C' O C  f -' O CJ  C' l-J C.1  O *• J <-'  O O f~  O CJ O  t_t O C  C.  O O  O O C'  CJ O C? C* O  O C-> C~  O < '
    o c> o c  C' o c  c  e c.  c o c o  o c c  c.  c o  c  o o e  c c o  o o o  c  e o  c o c  c  o «_,  o e_> o  o c  o  r  o o  o o c  c  o  c  o c  c  c
    C'OOCCJOOOOCOOCOOCOOOOCOOOOCOOOOOt-(_iOOC.OOOOOOOCjOOOOC^OOOOOOC_'OO
    o
    o
                                                                                                                       UJ
                                                                                                                       _J
                                                                                                                       CD
    LL
    3
HLRLEY RF

^
o
oo
o













* *
*
LU
- LU
00 _J
C-' - LL1
<1 (- Q
oo O • 
X uj oo v/>
LJ at v* -i LJ LU || II
uj < tvj _i • »— a
-5 CC II < II Z «•.
£ § Z LL 12 Q? a
O- ^3 OO Q OO CX
O
LJ
a
a

>—
M
C
LU
>—
00
O
J------
<~> LU O
it- 1— •
» a. — < » a 2,
oOCXl/Jh-»LJ 

0
CJ



CO
•~«
_l
O.
LU
k-
f 00
.PASS)
S1.ANS.C06SUBR,
.PASS)
a. >• a.
x oo x
O-J || 00
II 2. II

C Q O

a
a









*
HS TRANSACTIONS
CJ
CJ
1
LU
00

^
1-
<
a

t-
^
a
^
•M

* *
O
•> CD
t- II
-J LU
a. FNI
z ^*
II ^
LU — 1
2. CD
< II
O LJ
0 0

D
Q


OO
z

a

00
O
l- «: *
PCPTICN CF VALID PAPM, PETH,
>-
^
1
UJ
4/>

<1
•—
,
,PASSI
ID SITE CCOE TABLE
LL Q a _J
II II v: >
UJ u_' »•»
i i II 1
<1 o tt
00 O ""* LU
CJ > C 00

O  o

CJ
CJ


00
LU
1—
l_t
on
00
0
< *
CHS INTERNAL TRANSACTIONS
P,
,F*SS,DFLETF) ,
PCUNIT,(£PRIMARVf£SECNCRY),RLS
TRANS
O >- JE 00 «
«l LU LU OJ OJ
t— Z — II
| W — II LU
II II Lu 2.
t- »— Q. LJ «
00 Z — CL 00
^5 Q oo a
«l
t- CJ
< Q
Q

^— 4;
D a
CL *-
H- Z

O ">
CjT
* * 
a

^
C-

* *

LJ
wl
II
U
^!
00

CJ
LJ


h-
Z

a

ui
a
* *
G
LL
h-
un
                                                                                                     262

-------
                        .
    O O O  C  C: C  C  O C.   C'
                                                                   oooocc-oc
                      ..
    C_  C . O  O O O  O C  C '-  C-  C  O O O C '  C  O C '  O  -
    o o o  u o •-•  o c  i- o  c- L>  c> c o o  o o c_'  o c
    <_' C O  O O C  C1 O O C.  O U  c; O O CJ  O
    _
    ooococ  ocooco
                                                                   o o c
   C"  C
   c  <-
CJ O  C
                                                    OC^CJCJOV-OOOCJOOOOOOOOO
                                                    cocrocooccc  o o c c  — —•  ^ •"•
                                                                                                                               a o  o-
O o  «J O O  C-
o c  o o o  c
                                                                     O  O O O  O O C.
                                                                     o  c- o o  o
_  t_; CJ C^ '_  i.' (_ t.'  CJ c_'  t-  CJ c^>  ^' ^-' t- t-' C' O  t.  l_  t-'  c- O O  C_J t^' L-'
!?OCO<~OOOOeOOOOOOOOOC'OOOOOOCJO
                                                                                                                                                cooo
                                                                                                                                                «(\jr'. -T
                                                                                                                                                o c t  o
O C.'  C O O O C'
c. o  c  c' o o o
O tj  o C- O <-J O
                                                                                                                                  UJ
                                                                                                                                  to
                                                                                                                                  .J
                                                                                                                                  QL
YSTEM OPERATION
10
I
oo
Y-
U.I
to

<{
1—
-
t/)

CJ
LJ


h-
Z

tx
a
to
>_
L/l -t
N^ •»
\ ^
t-
LJ
II
_,
U
to
>-
CO

o
a




h—
_J
C
k/>
>-
( t/) -tt

LJ
II
^
LJ
to
X
t/)

O
CJ


H-
^
o
Cj
c;
OO
>.
t/ •«•
^•s ^x

<•-*
II
;j
LJ
to
>-
on

CJ
o


i
a.
U.
*—
CJ
v~
>-
i/» ^t•
^ ^
-J
LJ
II
j
LJ
C/j
>.
w>

O
Q


a
5.

C
_;
to
>-
to -«
0
0 »
1— O O
a u —
"-• LJ II
II ~ LU
a. o z.
LJ LU —
O. Q. t-

LJ
UJ
X
UJ




^—
a:
LJ
1- l/l i
^ ^ "x -x •>
UJ
UJ
13
Cj>
LU
00
UJ
-J
UL
LJ
Z
t/1
c
H-
«
"1.
u.
t-

	 i
- a
to x
u to
a. u
< o-
Z to
to •->
c: Q

c
CJ



CD
h_4
_J
H-
or
C
I- to -tt
>-
G
u
^
LJ
to
X
to

Q
C-,




h-
^J
C
to
>-
to *
p,
K,(SWCRKSPC),,CONTIG)
z. a:
w *"
II LU
t- LJ
•-i <
H Q-
O to

U
CJ


f-t
o
it
Jt
t-
rc
^_]
^ to 4
NF,SEP = SORTWKC1 ) ,
K, (GWCRKSPC ) ,,CCNTIG)
UJ Ct
to -
II LU
1- <_J
*~*  a LJ  Q 10 C.

CJ
U



^
^
LJ
H-
a.
LJ
* 1/1
y=FP,LRPCL=6e,RLKSIZF=163
ROJEf T..SYSIN(CSCRTCTL),
U- CL
u- II
•— 2.
II <
tti Z
LJ to
o a

0
Q





Z
•— "
v/1
>.
^ *S~'
*^ ^-^
RIVATE, RETAIN),
,FASS)
0. QL
II 00
i- II
3 "-
_l 00
C —
> c,












--
LA

LJ
                                                                                                     263

-------
Appendix E - AQDHS LOAD SHEETS
                   264

-------
AQDHS LOAD SHEETS

The following load sheets are suggested for use with AQDHS.  Data
encoded upon them may be easily keypunched and entered into the system.
A separate load sheet is provided for each different type of transaction
(form //I, form #2, and form #3) as well as for composite data.
                                      265

-------
 EE
 SS
£0< _
                       266

-------
                                              -t-
                                             	I
267

-------
268

-------
269

-------
                                  TECHNICAL REPORT DATA
                           (I'lcasc read Instructions on the reverse before completing)
1  REPORT NO
 EPA - 450/3-74-045
                                                          3. RECIPIENT'S ACCESSIOr+NO.
4. TITLE AND SUBTITLE
 Comprehensive Data Handling System,
 Air Quality Data Handling Subsystem  (AQDHS-II)
 Program Documentation and Users  Guide
             5. REPORT DATE
                July 1974
             6. PERFORMING ORGANIZATION CODE
WWCorporation
 Federal  Systems Division
                                                          8. PERFORMING ORGANIZATION REPORT NO.
       rsburn, Ma-r-y-J-and	20760	
       IMING ORGANIZATION NAME AND ADDRESS
    = ORMING
                                                          10. PROGRAM ELEMENT NO.
 Office of Air Quality Planning  and  Standards
 Control Programs Development  Division
 Research Triangle Park, N.C.  27711
                  2AH-137
             11. CONTRACT/GRANT NO.
                                                           68-02-0638
12. SPONSORING AGENCY NAME AND ADDRESS
 U.S.  Environmental Protection Agency
 Office of Air and Waste Management
 Office of Air Quality Planning  and  Standards
 Research Triangle Park, North Carolina  27711
                                                          13. TYPE OF REPORT AND PERIOD COVERED
               Final
             14. SPONSORING AGENCY CODE
15. SUPPLEMENTARY NOTES
16. ABSTRACT
 When dealing  with atmospheric pollution,  it  is  necessary to amass, catalog,  sort,
 evaluate,  and perform calculations upon large volumes  of data.  The Air Quality
 Data Handling System (AQDHS-II) provides  air pollution control agencies with
 the capability to create and maintain their  own air quality data base and  to
 retrieve data and generate reports from that data  base.   This report contains
 documentation for the computer programs which comprise AQDHS-II.  It is also
 written as a  Users Guide with each program described,  input requirements
 described,  field  descriptions, etc.  In addition to the basic system, several
 preprocessor  and  postprocessor programs are  provided which perform functions
 necessary  to  make this system compatible  with existing systems such as SAROAD
 and the original  AQDHS.   The  system  has a powerful retrieval  capability which
 Hows  the  user to retrieve virtually  any piece  of data  in his  file.  They  system
 also  allows the user to automatically  generate'his quarterly  air  quality  progress
 report in SAROAD format.
                               KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
 Computer  Programs
 Computer  Software
 Data  Processing
 Air Pollution
 Data  Handling
 Computer  Systems Programs
                                             b.IDENTIFIERS/OPEN ENDED TERMS
  CDHS
  AQDHS-II
  Atmospheric  Pollution
  SAROAD
                           :.  COSATI 1-ield/Group
13 DISTRIBUTION STATEMENT
                                             19. SECURITY CLASS /This Report)
                                                 Unclassified
                           21. NO OF PAGES
                               269
  Unlimited
iO. SECURITY CLASS (Thispage)
   Unclassified
                           22. PRICE
EPA Form 2220-1 (9-73)

-------
                                                    >

                                                    m

                                                    £
                                                    >
                     3 O


                     § *

                     5 ?
                     Z <«

                     3 «
                       8
                                                    1
                                                    o
                           ?



                           Ill
                           HO 5
                           2. « 0)
  i
rl
                                                           Ill
                               5 >>

                               &«
                                m


                                Q
 to
 i-1
 I-H
 n
 I-H

 O
2
O
•

w
Ul

O
                               NO 3)
Xg3
Q. o> -»
  a"
    0)
  D> (D
  Q. —
  Q. -
  -^ -«•
  (V

  "•^
  CO O


  CO U.

  3 °
  I"




  5|
  -. O
  o to

  £<
  
-------