United States
            Environmental Protection
            Agency
            Environmental Monitoring
            Systems Laboratory
            Las Vegas NV 89114
EPA 600/8-84-028
Nov 1984
            Research and Development
vvEPA
User's Guide
for the
Computer Program
REsponse FACtor

-------
                                              EPA-600/8-84-028
USER'S GUIDE FOR THE COMPUTER PROGRAM REsponse FACtor
                          by

             Mary C. Bates and Glinn G.  Hansen
     Environmental Monitoring Systems Laboratory
               Las Vegas, Nevada 89114
     ENVIRONMENTAL MONITORING SYSTEMS LABORATORY
          OFFICE OF RESEARCH AND DEVELOPMENT
         U.S. ENVIRONMENTAL PROTECTION AGENCY
               LAS VEGAS, NEVADA 89114

-------
                                     NOTICE
     This guide has been reviewed in accordance with the U.S.  Environmental
Protection Agency's peer and administrative review policies and approved for
presentation and publication.   Mention of trade names or commercial  products
does not constitute endorsement or recommendation for use.

-------
                                    CONTENTS
                                                                           Page
Figures	iv
Acknowledgment	   v
Scope and Content	   1
How REFAC Works 	   3
     Initialization Process 	   4
     Ongoing Process	   5
Running REFAC 	   7
     REFAC Command List	   8
REFAC Documentation	13
     Major Variables	13
     Subroutines	15
     Functions	16
     File Formats	16
Notes	17
References	35

-------
                                    FIGURES
Number                                                                    Page
  1     Statistics are Performed and Information  is  Printed Out on
          One Sheet	    3
  2     REFAC and User Interaction Flowchart	10
  3     Initialization Sample Output	11
  4     Ongoing Sample Output 	  12
  5     IFB Format Sample Output	18
  6     Listing of CMPND.DS 	  20
                                       IV

-------
                                 ACKNOWLEDGMENT


     Mr. A.  D. Sauter,  private consultant,  Las Vegas,  Nevada,  for initiating
the project, for technical  review,  and for  a valuable  discussion regarding
software algorithms employed, and revision  of the draft report.

     Dr. L.  D. Betowski, U.S. Environmental  Protection Agency, Environmental
Monitoring Systems Laboratory, Las  Vegas,  Nevada, for  technical  review of the
manual.

     Dr. J.  Werth, University of Nevada, Las Vegas,  Nevada,  for technical
review of the software.

-------
                                   SECTION 1

                               SCOPE AND CONTENT


     Each analyte in the internal  standard quantitative analysis  by electron
impact Gas Chromatography/Mass Spectroscopy has a constant associated with it
called the response factor (RF).  For comparable injected weights,  the response
factor of an analyte is simply a ratio of the ion current of analyte and inter-
nal standard at their respective quantisation m/z values.  It has been shown in
an interlaboratory study for extractable priority pollutants that Fused Silica
Capillary Column Gas Chromatography/Mass Spectroscopy (FSCC GC/MS)  can yield
similar response factors (1) and that the RF values can be effectively instru-
ment independent when adequate quality control is maintained (2).  Thus, the
acquisition and monitoring of RF data are important in determining the level  of
instrument/laboratory performance and the acceptability of GC/MS  data in inter-
laboratory applications of this technology and ultimately for determining the
amount of analyte present in a sample.  A quality control (QC) protocol to
standardize experimental FSCC GC/MS acquisition parameters, acquisition
sequence and data reporting was written and has been subsequently updated to
reflect programmatic and other changes in the U.S. Environmental  Protection
Agency's Contract Laboratory Program (3).

     The Consensus Organic Protocol of the Contract Laboratory Program requires
two processes to establish and subsequently monitor system performance using
the response factor.  The first process, INITIALIZATION, requires the analysis
of the system performance standard, followed by data acquisition  of five multi-
level, multianalyte calibration standards.  The ONGOING or monitoring process
requires the running of the system performance standard and a single level,
multianalyte calibration standard at the beginning of each day or at a minimum
of every 8 hours of GC/MS data acquisition.  In both the INITIALIZATION and the
ONGOING process, the resulting response factors are compared to contract
specified criteria.  The computer program, REsponse FACtor (REFAC), simply
facilitates the examination and reporting of the response factors.

     REFAC is written in FORTRAN IV as implemented by the Data General Corpor-
ation.  It reads response lists for any given set of analytes, calculates the
statistics required for system monitoring as determined by the Quality Control
Protocol for the Contract Laboratory Program referenced above, and also pro-
vides additional response factor statistics, including correlation coefficients
of ion current ratio plots, standard errors for linear fit and average relative
retention times.  REFAC creates a disk file to store the initialization
statistics for later use in the ONGOING process.  REFAC not only  eliminates
time-consuming hand calculations and transcription errors, which  can occur in
multianalyte quantitative GC/MS, but also facilitates the identification of

-------
potential  problems.   As currently written,  REFAC  is only compatable  with  the
INCOS Disk Operating System and Finnigan MAT file structures.

     The purpose of  this manual  is to describe REFAC to the  user  and to
demonstrate how to run the program.   A description of the INITIALIZATION  and
ONGOING process is given in Section  2 along with  the formulas  used to calculate
relevant statistics.  Section 3 describes the running of REFAC, provides  a
command list, and also gives examples of REFAC generated output for  both  ONGOING
and INITIALIZATION processes.  REFAC variables and data structures are presented
along with the source listing in Section 4.

-------
                                   SECTION 2

                                HOW REFAC WORKS
     Using Finnigan MAT system software, the analyst can reduce raw GC/MS data
into a quantisation list.  This list contains the compounds detected in the
data file by the MSDS program SEARch, the ion current area at the quantisation
m/z value determined by the MSDS program CHROmatogram, the calculated extract
concentration consistent with the reference library, and other data.  The MSDS
program QUANtitate (QUAN) can be used to display results and to create (or
append) a response list for each compound in the quantisation list.   REFAC
reads the response lists and computes the statistics stipulated by the user (see
Section 3).  An example of REFAC output from MSDS generated response lists is
given below.  It should be noted that REFAC calculates statistics using data
read from the response lists, and the program assumes that the results passed
to REFAC are accurate.
                            Input
                         Q300005.RL
                         2,4-DINITROTOLUENE
                   Q300004.RL
                   ACENAPHTHENE
             Q300UOT.RL
             ACENAPHTHYLENE
       Q300002.RL
       2,6-DINITROTOLUENE
 RESPONSE LIST
 Q300001.RL
 DIQ-ACENAPHTHENE
Output


2,4-DINITROTOLUENE
ACENAPHTHENE
ACENAPHTHYLENE
2,6-DINITROTOLUENE
DIQ-ACENAPHTHENE
Mean %RSD
RF
1.000 0.0
1.645 11.4
2.265 10.5
0.441 6.0
1.000 0.0
       Figure 1.  Statistics are performed and information is  printed out
                                 on one sheet.

     REFAC was written using the current QC protocol  as  a  guideline  (3),  however,
it can be easily updated to meet modified versions  (see  Section  4).   The
referenced QC protocol  contains requirements that must be  met  in order for the
data processed to be considered acceptable.  These  requirements  can  be classified
into three groups:

-------
     QC requirements during the initialization process
£..   QC requirements during sample analysis
3.   QC requirements during the ongoing calibration
     1.
     2.
     Only the INITIALIZATION and ONGOING processes have QC requirements involv-
ing response factor calculations, and consequently, only these processes will
be considered below.

INITIALIZATION PROCESS

     The INITIALIZATION process requires five calibration standards (concentra-
tions of 20, 50, 80, 120, 160 ug/mL/analyte) to be run.  Each of these stan-
dards contains the 61 semivolatile priority pollutants.  For each of the
compounds a response list is created by the user.   Each response list should
contain a response factor for each of the five runs.  For specific analytes
(Benzoic acid, 2,4,5-Trichlorophenol, 4-Nitroaniline,  3-Nitroaniline,
2-Nitroaniline, 4-Nitrophenol, Pentachlorophenol,  and  4,6-Dinitro-2-Methyl-
phenol) only 4 response factors may result because th  20 ug/mL concentration
level approaches the detection limit for these compounds.  In this case the
output for REFAC in the 20 ng column is set to zero and is not averaged into
the mean response factor calculations.  For the remaining compounds, REFAC
calculates the mean response factor and the relative standard deviation assum-
ing that 5 entries are in each response list.  See Figure 3 for an example of
INITIALIZATION output for REFAC.  As the statistics are calculated, the data
are written to an LN.IN file, where LN is the first two letters of the response
list name and IN is the extension given by REFAC.   This file is subsequently
used to do calculations in the ONGOING process for any response lists
corresponding to the initialization response lists.  Unless reinitialization is
necessary this file is retained since ONGOING will access it.

     REFAC users are cautioned that output will be only as valuable as the
quality of the quantisation list from which response lists, and subsequent
REFAC output is derived.  Also, REFAC does not check to see if the results are
within the QC requirements; this is left up to the user.

     In initialization the average response factor is  calculated using:

                                         n
                              R^ave  =  «^ R^i'• n


where RFj is the corresponding response factor for the i   entry, and n is set
to 4 or 5.  Relative standard deviation is calculated using:
                                                   /n
                 % RSD  =  \  L1 = l        	=!	 x 100
                                         'ave

where RFi, RFave and n are defined as above.  The correlation coefficient is
calculated using:

-------
           n
           Z
                             AC,
                                                            /n
      cc  =
VCl
                                          n
                                          z
               '/n
where n is defined as above,  C^  is  the  concentration of  the compound in the ith
run, ACi is the area of the compound found  in  the  ith  run and AIS-j is the area
of the internal standard found in the ith run.   The formulas used for the
standard error for linear fit are as follows:
                               /[ n   /ACT     Aq     V17
                           =  J   S   (	2   /n
                              If Ll=l  \AISi    AISi  est/ J
with -      =  a + b Ci.   a and b  are defined  as  follows:
          est
               b  =

n


n
Z
i=l

ACi
Ci 	
AISi
n
n Z (
/ "
- Z C
Vi=l
:.2_ (;
\ /n
i *
I \i=l
c>
ACi
	
AISi

      a  =
                                   /n-  b
                                            tf=l
/n
This compares the area of the compound divided  by  the  area  of  the  internal
standard to the amount of the compound.

ONGOING PROCESS

     To monitor system performance,  the  QA/QC requirements  contained  in the
Consensus Organic Protocol  of the Contract Laboratory  Program  requires a single
level multianalyte standard at a concentration  of  50 ug/mL  to  be run  at the
beginning of each day or after every 8 hours of data acquisition.  After the
sample is run and the raw data are reduced to a quantisation list  as  described
in the INITIALIZATION process, REFAC assumes that  the  response lists  are
appended, and consequently, the last entry in each response list will corre-
spond to the run currently completed.   REFAC reads the last response  factor and
performs ONGOING calculations.  The  referenced  QC  protocol  only requires the
calculation of the percentage difference but REFAC also calculates the standard
error of the linear fit of all response  factors in each list.

-------
     To calculate the percentage difference,  data are needed for comparison
from the INITILIZATION process.   The INITIALIZATION data are read from the
LN.IN file generated during the  INITIALIZATION process.   (If the .IN file is
accidentally destroyed, re-initialize and only intialization points  will  be
taken from the response list generating a new .IN file.   The formula used to
calculate the percentage difference is as follows:
                                    RF0 -
                                                100
                                       RFj
where RF0 is the response factor from the current run and W\  is the average
response factor from the initialization process.   Standard error from the
linear fit is calculated the same as in the initialization process,  except that
n is set to the number of entries read in from the response list.   Normally
this can be a maximum of 300; however, for this program the maximum is 50.

-------
                                   SECTION  3

                                 RUNNING  REFAC


     In the implementation of REFAC,  certain  assumptions  were  required  due  to
the nature of a computer and its limitations  in handling  exceptions  while  still
being reasonably efficient.   Before explaining  how to  run REFAC  it will  be
helpful to know these basic  assumptions.   They  are listed below:

     1.   REFAC assumes that there are 5  response factors contained  in  each
          list including the response lists for compounds that are not  detected
          at 20 ug/mL.  For these compounds,  data should  be recorded, but  the
          data will  not be considered accurate.  As explained  in  INITIALIZATION,
          REFAC will  disregard the 20 pg/mL run and only  use the  other  four
          response factors present.

     2.   To print output data in a format acceptable  for the  Contractor
          Laboratory Program (in IFB format), compounds in the response list
          must be spelled exactly the same as in the file CMPND.DS (see
          Figure 6).

     3.   If REFAC receives as input a response list identifier  that does  not
          exist an error message will result.  Be sure to check  that each
          response list exists input by the user or read  from  the library
          list using the @ command.

     To run REFAC, type onto the terminal:   RUN REFAC

     The program will respond by welcoming you  to REFAC,  and asking  which
process (initialization or ongoing) is wanted.   Respond with I or 0. Note:
Within REFAC, the process (I or 0) cannot be  changed once selected.   If you
wish to change the process,  then exit and restart the  program.

     REFAC will then ask the user if IFB  format is wanted.  Respond  with Y  or
N.  If the user responds N,  then REFAC will skip IFB headings  and ask about
hardcopy.  If IFB format is wanted REFAC  will then select the  proper heading
depending on the process selected, and will print it to the terminal.   For
initialization it will look as follows:

             INITIAL CALIBRATION DATA - SEMIVOLATILE HSL  COMPOUNDS

CASE NO. 87654321                                  CONTRACT LAB:   LEMSCO
CONTRACT NO. DA1202                       INSTRUMENT IDENTIFIER:   FINNIGAN  4010
CALIBRATION DATE:  3/22/84
MINIMUM MEAN RF FOR SPCC IS 0.05
MAXIMUM XRSD FOR CCC IS 30X

-------
     For Ongoing,  the  heading will  look as follows:

                CALIBRATION CHECK  - SEMIVOLATILE HSL COMPOUNDS
                                                   CONTRACT LAB:
                                          INSTRUMENT  IDENTIFIER:
                                                                LEMSCO
                                                                FINNIGAN 4010
CASE NO. 87654321
CONTRACT NO. DA1202
CALIBRATION DATE:  3/22/84
STANDARD FILE:  ABCDEFGHIJK
DATE:  3/1/84     TIME:   10:23
MAXIMUM % D FOR CCC IS 20

     REFAC then asks if you want to make changes to the heading,  type Y_ or NL

     If the response is Y, REFAC will  display a portion of the heading at a
time.  If a value different from the default value is desired, type in the new
value and then carriage return.   If no change is desired just type carriage
return and the default value will  be used.

     When finished with changes  to the heading, or if a typed N response was
given when REFAC inquired "DO YOU WANT TO MAKE CHANGES," REFAC will enter
command mode and prompt with "REFAC:"
REFAC COMMAND LIST
        N
        H
        E
                cancels hardcopy
                resets hardcopy
                exits the program
                lists REFAC  commands
     Variable Initialization Formats
        C
        L
        R
                outputs correlation  coefficient  to  initialization  output
                outputs linear standard error to initialization  output
                outputs average relative retention  time  to  initialization
                output
     Variable Ongoing Format

        L     ;   adds linear standard error to ongoing output

     To Perform Statistics
  $ LN, I, J
#LN, I, J, K
           @
                 $ denotes consecutive entries from I  to J  in response lists LN
                 # denotes separate entries I, J,  K,  etc.  in response lists LN
                 uses library list
     When in REFAC command mode, the user can cancel  or reset hardcopy,  choose
the column heading format wanted and then perform statistics.   If the user
entered 'Y1 to "IFB FORMAT (Y or N)" at the beginning of REFAC,  then any format
change commands are ignored.   All  the user needs to enter is one of the  statis-
tic commands.

-------
     REFAC will  always default to output relative  standard  deviation  in
initialization and percent difference  in ongoing unless  one of  the  column
heading change commands is entered before the  first statistic command.   A
flowchart (Figure 1)  and sample output (Figures 2  and  3)  are provided on the
following pages to clarify REFAC questions and commands.   In Figures  2 and  3
the response factors  are not necessarily indicative of values obtained follow-
ing the current QC protocol  and the operator should not  use the response factor
data as a determination for acceptable response factors.

-------
                                              Is
                                             This
                                          Initial (I)
                                              or
                                        Ongoing (0)
                                 Initialization
                                 Header Displayed
                                                                                            Ongoing
                                                                                     Header Displayed
      Any
Y /Changes
      To
     Header
                                                                                                        Any
                                                                                                      ChangesX Y
                                                                                                         To
                                                                                                       Header
                                                                                                         7
Make Changes
To Header
   Make Changes
      To Header
       Is
   Hard copy
    Wanted
Output
Initialization
Header To Printer
                                                                                                         Is
                                                                                                     Hardcopy
                                                                                                      Wanted
                                                                                                         7
 Output Ongoing
Header To Printer
                 Separata Library Entrias
                                     Print Column Haadar
                                     Perform Statistics On
                                   Consecutive Library Entrias
                                        Print Results.
                      Initialization
                        REFAC
                      Commands
                                                                                                                      Separate Library Entries
                                                                                                   Consecutive Library Entries
         Average Rslative
         Retention Time
         Column Format
  Standard Error
  Column Format
                                                                                                            Linear
                                                                                                         Standard Error
        Figure  2.    REFAC  and  user  interaction  flowchart.

-------
         COMPOUND
D4-1.4 DICHLOROBENZENE
N-NITR OSODIMETHYLAMINE
2-FLUOROPHENOL
2-FLUOROANIHNE
PENTAFLUOROPHENOL
D5-PHENOL SURROGATE
PHENOL
ANILIN
BIS C2-CHLOR OETHYL)ETHER
2-CHLOROPHENOL
1,3-DICHLOROBENZENE
1,4-DICHLOROBENZENE
BENZYL ALCOHOL
1,2-DICHLOROBENZENE
ORTHO CRESOL
BIS(2-CHLOROISOPROPYL)ETHER
PARA CRESOL
N-NITROSO-DI-N-PROPYLAMINE
HEXACHLOROETHANE
DS-NAPHTHALENE
05-NITROBENZENE SURROGATE
NITROBENZENE
DECAFLUOROBIPHENYL
ISOPHORONE
2-NITROPHENOL
2, 4-DIMETHYLPHENOL
BIS(2-CHLOROETHOXY)METHANE
BENZOIC ACID
2.4-DICHLOROPHENOL
1, 2. 4-TRICHOROBENZENE
NAPHTHALENE
4-CHLOROANILIN
HEXACHLOROBUTADIENE
4-CHORO-3-METHYLPHENOL
2-METHYLNAPHTHALENE
D10-ACENAPHTHENE
HEXACHLOROCYCLOPENTADIENE
2. 4. 6-TRICHLOROPHENOL
2,4. 5-TRICHLOROPHENOL
2-FLUOROBIPHENYL
2-CHLORONAPHTHALENE
2-NITROANILINE
DIMETHYLPHTHALATE
ACENAPHTHYLENE
2.6-DINITROTOLUENE
3-NITROANILINE
ACENAPHTHENE
2,4-DINITROPHENOL
4-NITROPHENOL
DIBENZOFURAN
2, 4-DINITROTOLUENE
DIETHYLPHTHALATE
FLUORENE
4-CHLOROPHENYL-PHENYL ETHER
4-NITROANILINE
D10-PHENANTHRENE
4, 6-DINITRO-O-CRESOL
N-NITROSODIPHENYLAMINE
2. 4. 6-TRIBROMOPHENOL
4-BROMOPHENYL-PHENYL ETHER
ALPHA-BHC
HEXACHLOROBENZENE
BETA-BHC
RF
SONG
O. OOO
1 491
1. 959
1. 912
O. BIS
1. 613
2. 316
2. 5O3
1. 640
1. 477
1. 324
1. 587
0. 969
1. 374
1. 360
2 847
1. 334
0. 000
O. 444
1. 000
0. 165
0. 351
O. 189
0. 614
O. 163
0. 318
O. 434
0 OOO
0. 313
0. 317
1. O39
0. 401
0. 166
0. 316
0. 796
1. OOO
O. 000
0. 450
0. 502
2. 162
1. 897
0. 523
1. 740
2. 561
0. 381
0. 416
1. 777
O. 000
0. OOO
2. 404
0. 421
1. 725
1. 998
1. 098
0. 377
0. OOO
O. 050
0. 270
0. 088
0. 237
0. 142
0. 240
0. 113
RF
SONG
1.
0.
1.
1.
O.
1.
Z.
2.
1.
1.
1.
1.
1.
1.
1.
3.
1.
0.
0.
1.
O.
O.
O.
0.
0.
0.
0.
0.
O.
0.
1.
0.
0.
0.
0.
1.
0.
0.
0.
2.
2.
0.
1.
2.
0.
0.
1.
0.
0.
2.
0.
1.
2.
1.
0.
1.
0.
0.
0.
0.
O.
0.
0.
000
819
230
6O7
825
534
219
434
655
475
69O
754
130
615
567
637
645
979
589
OOO
176
357
264
639
194
322
506
136
337
359
190
423
180
291
790
000
538
548
578
496
248
601
882
B7O
434
438
882
O81
261
445
435
394
O08
139
374
OOO
078
316
110
283
ISO
273
123
RF
SONG
1.
0.
1.
1.
O.
1.
2.
2.
1.
1.
1.
1.
1.
1.
1.
3.
1.
1.
O.
1.
O.
0.
O.
0.
0.
0.
O.
O.
0.
0.
1.
0.
0.
0.
0.
1.
0.
O.
0.
2.
2.
0.
1.
2.
O.
0.
1.
O.
O.
2.
0.
1.
1.
1.
O.
1.
0.
0.
0.
0.
0.
0.
0.
OOO
842
287
641
787
533
31O
347
649
490
694
734
113
393
497
708
59O
O23
557
OOO
175
375
278
681
199
335
499
140
339
356
187
431
178
312
812
OOO
473
554
531
492
170
617
842
723
423
434
812
O89
308
335
429
599
970
123
323
OOO
095
330
125
297
132
296
121
RF
12ONG
1.
1.
1.
1.
O.
1.
2.
2.
1.
1.
1.
1.
1.
1.
1.
2.
1.
0.
0.
1.
0.
0.
O.
0.
O.
O.
0.
O.
O.
0.
1.
O.
0.
0.
O.
1.
O.
O.
0.
2.
2.
0.
2.
3.
0.
0.
2.
O.
0.
2.
O.
2.
2.
1.
0.
1.
0.
0.
0.
0.
0.
0.
0.
OOO
214
328
733
808
361
1O2
646
710
626
814
811
033
381
423
938
4O2
924
492
OOO
180
49e>
293
772
242
3B2
363
164
390
396
354
481
185
281
783
000
529
337
637
615
554
662
183
195
468
308
279
1O8
281
953
479
1O7
6O7
533
411
000
082
322
130
3O2
136
274
121
RF
16ONG
1.
1.
1.
1.
O.
1.
a.
3.
1.
1.
1.
1.
1.
1.
1.
S.
1.
0.
0.
1.
0.
0.
O.
0.
0.
O.
0.
0.
O.
0.
1.
O.
0.
0.
0.
1.
0.
0.
0.
2.
2.
0.
2.
3.
0.
0.
2.
0.
O.
2.
0.
1.
2.
1.
0.
1.
0.
0.
0.
0.
0.
0.
0.
OOO
529
442
843
839
607
186
696
737
694
800
845
040
622
474
917
437
708
544
OOO
192
333
278
389
192
307
482
191
338
369
217
474
187
309
874
000
365
390
614
354
410
683
025
039
468
334
134
117
313
831
461
893
449
379
434
OOO
OB9
319
139
298
157
277
125
MEAN
XRSD
RF
1.
1.
1.
1.
0.
1.
2.
2.
1.
1.
1.
1.
1.
1.
1.
3.
1.
0.
0.
1.
0.
O.
0.
0.
O.
0.
0.
0.
0.
0.
1.
0.
0.
0.
O.
1.
O.
O.
0.
2.
2.
0.
1.
2.
O.
O.
1.
O.
O.
2.
0.
1.
2.
1.
0.
1.
0.
0
0.
0.
0.
0.
0.
000
179
449
747
815
57O
227
565
682
533
7O4
746
061
557
464
21O
49O
909
525
OOO
178
387
261
663
198
333
5O1
163
348
339
20 1
446
179
302
811
000
527
54O
572
464
256
617
934
882
435
470
977
099
292
594
443
784
206
235
384
OOO
079
311
119
284
131
272
120
O. 0
23. 8
18 2
6 6
2 1
2. 2
3. 5
3. 6
2 6
S. 8
6. 1
5. 0
5. 4
5. 9
4. 7
11. 8
7. 4
13. 3
9 7
0. 0
4. 8
14. 2
14. 2
9. 5
12. 7
7. 8
7. 1
11. 2
7. 1
7. 0
7. 8
6. 8
4. 1
4. 5
4. O
0.0
6. -
B. 7
8. 7
6. 3
9. 8
8. 9
7. 9
7. B
7. 4
9. 3
9. 9
14. 5
7. 4
9. 6
4. 8
1O. 9
12. 1
13. 7
9. 8
0 O
19. 6
6. 8
13. 1
B. 4
3. 4
6. 6
3. 4
                Figure 3.   Initialization sample output.
                                      11

-------
           COMPOUND

D4-1.4 OICHLOROBENZENE
N-NITR OSODIMETHYLAMINE
2-FLUOROPHENOL
2-FLUOROANILINE
PENTAFLUOROPHENOL
D3-PHENOL SURROGATE
PHENOL
ANILIN
B IS <2-CHLOROETHYL> ETHER
2-CHLOROPHENOL
1.3-DICHLQRQBENZENE
1,4-DICHLOROBENZENE
BENZYL ALCOHOL
1,2-DICHLOROBENZENE
ORTHO CRESOL
BIB(2-CHLOROISOPROPYL)ETHER
PARA CRESOL
N-NITR OSO-DI-N-PROP YLAMINE
HEXACHLOROETHANE
DS-NAPHTHALENE
DS-NITROBENZENE SURROGATE
NITROBENZENE
DECAFLUOROBIPHENYL
ISOPHORONE
2-NITROPHENOL
2.4-DIMETHYLPHENOL
BIS(2-CHLOROETHOXY > METHANE
BENZOIC ACID
Z,4-OICHLOROPHENQL
1.2.4-TRICHOROBENZENE
NAPHTHALENE
4-CHLOROANILIN
HEXACHLOROBUTAOIENE
4-CHOR O-3-METHYLPHENOL
2-METHYLNAPHTHALENE
D10-AC ENAPHTHENE
HEXACHLOROCYCLOPENTADIENE
2.4.6-TRICHLOROPHENOL
2,4,5-TRICHLOROPHENOL
2-FLUOROBIPHENYL
2-CHLORONAPHTHALENE
2-NITROANILINE
DIMETHYLPHTHALATE
ACENAPHTHYLENE
2,6-DINITROTOLUENE
3-NITROANILINE
ACENAPHTHENE
2,4-DINITROPHENOL
4-NITROPHENOL
DIBENZOFURAN
2,4-DINITROTOLUENE
DIETHYLPHTHALATE
FLUORENE
4-CHLOROPHENYL-PHENYL ETHER
4-NITROANILINE
D10-PHENANTHRENE
4/ 6-DINITRO-O-CRESOL
N-NITROSODIPHENYLAM1NE
2. 4. 6-TRIBROMOPHENOL
4-BROMOPHENYL-PHENYL ETHER
ALPHA-BHC
HEXACHLOROBENZENE
BETA-BHC
MEAN
RF(I)
1. 000
1. 179
1. 449
1. 747
0. 815
1. 370
2. 227
2. 965
1. 682
1. 553
1. 7O4
1. 746
1. 061
1 557
1. 464
3. 210
1. 490
0. 909
0. 525
1 . 000
0. 178
0. 387
0. 261
0. 663
0. 198
0. 333
1. 682
O. 163
0. 348
0. 359
1. 201
0 446
0. 179
0. 3O2
O. 811
1. 000
O. 327
0. 540
0. 572
2. 464
2. 256
0. 617
1. 934
2. 882
O. 433
0. 47O
1. 977
0. O99
O. 292
2. 594
0. 445
1. 784
2. 2O6
1. 255
0. 384
1. OOO
0. 079
0. 311
0. 119
0. 284
0. 131
0. 272
0. 120

RF<0)
1. OOO
0. 9O9
1. 442
1. 623
O. 77O
1. 498
2. 271
2. 350
1. 393
1. 469
1. 387
1. 611
1. 082
1. 463
1. 483
1. 738
1. 435
0. 873
0. 323
1. OOO
0. 185
0. 373
0. 239
0. 679
0. 2O1
0. 336
0. 305
O. 130
O. 340
0.330
1. 2O3
0. 439
0. 179
0. 289
0. 786
1. OOO
O. 324
O. 334
0. 378
2. 472
2. 311
0. 630
2. O80
2. 884
O. 441
O. 330
1. 984
0. 127
O. 317
2. 399
0. 505
1. 862
2. 188
1. 33O
O. 436
1. OOO
0. 096
O. 333
0. 103
0. 273
0. 132
O. 237
O. 123

X D
0. OOO
-22. 897
-0. 466
-7. O33
-3. 313
-4. 579
1. 973
-O. 600
-9. 322
-5. 333
-6. 868
-7. 723
1. 994
-5. 941
1. 322
-45. 215
-2. 337
-3. 9O4
-0. 318
0. 000
4. 038
-3. 698
-8. 497
2. 438
1. 336
1. 026
-69. 942
-7. 711
-2. 328
-2. 693
O. 131
-1. 344
-0 161
-4. 381
-3. 139
O. OOO
-O. 322
2. 666
O. 933
O. 341
2. 432
3. 273
7. 343
O. O68
1. 423
12. 729
O. 368
28. 9O1
8. 739
O. 22O
13. 449
4. 37O
-0. 813
6. O23
18. BO6
O. OOO
21. 797
7. 334
-13. 33O
-3. O98
O. 461
-12. 723
2. 271
            Figure 4.   Ongoing sample  output.
                              12

-------
                                   SECTION 4

                              REFAC DOCUMENTATION


     This section assumes the reader has a knowledge of FORTRAN IV and the
INCOS Disk Operating System (IDOS) as used by the Finnigan Corporation for
GC/MS data systems.  The purpose of this section is to clarify REFAC code to
help the user easily modify REFAC to fit various needs in different laboratory
situations and to easily update it to keep up with IFB Contract Laboratory
procurement changes.  This section should be used as a reference when reading
through the code before making changes.   It is divided into three parts:   an
explanation of major variables, an explanation of subroutines and functions,
and an explanation of file formats.

MAJOR VARIABLES

AC      - an array dimensioned to 50 that contains the area of the compound
          divided by the area of the reference compound.

C       - an array dimensioned to 50 that contains the amount of the compound for
          each entry in the response list.

CC      - contains the correlation coefficient.

FNUM    - an array dimensioned to 30 that contains any real  numbers input to the
          terminal in REFAC command mode.

IANS    - hardcopy flag.

1C      - a counter set up to count the  number of response lists read.

ICL     - an integer array dimensioned to 10 that contains the name of the
          contract lab for the main header.

ICOMI(O)- an integer array dimensioned to 14 that contains the name of the
          compound for initialization (ongoing).

ICQHD   - an integer array that contains all  variable information pertaining to
          the main header.  It is equivalenced to the CQHD common block.

ICR     - a counter set up to count the  number of entries in a response list.

ICSN    - an integer array dimensioned to 5 that contains the case number for
          the main header.
                                       13

-------
ICTN    - an integer array dimensioned  to  5  that  contains  the contract  number
          for the main header.

ID      - an integer array dimensioned  to  10 that contains the  instrument
          identifier for the  main  heading.

IDATE   - an integer array dimensioned  to  4  that  contains  the calibration  date  for
          the main header.

IDESC   - contains the file descriptor  for the  response  lists.

IFB     - IFB format flag.

IHEAD   - an integer array dimensioned  to  84 that holds  the response  list  header
          information.  It is equivalenced to the CHEAD  common  block.

I IN     -a two dimensional array  that  holds initialization information for  each
          compound.

INCNT   - a counter set up to count the number  of initialization  compounds read
          in from the .IN file for use  in  ongoing calculations.

IOK     - flag used to determine if main header changes  are wanted.

ION     - a two dimensional array  that  holds ongoing  information  for  each
          compound.

IPROC   - initialization or ongoing flag.

IQ      -a two dimensional containing  response list  entry information  for each
          run.

ISO     - contains standard file date for  the main header.

ISF     - contains name of the standard file for  the  main  header.

1ST     - contains standard file time for  the main header.

JIN     - an array that contains initialization information for the current
          compound.

JON     - an array that contains ongoing information  for the current  compound.

JQ      - an array that contains response  list  entry  information  for  the current
          run.

KDESC   - file descriptor for the  file  containing main header information.

LDESC   - file descriptor for the  file  containing the initialization  informa-
          tion.  Ongoing reads from it  and initialization  writes  to it.

MAXQ    - the maximum amount  of entries allowed in a  response list.

                                       14

-------
MAXD    - the maximum number of response lists that can be referenced.

MAXIN   - the number of initialization runs.

NFL     - column flag to determine which output to use.

MUM     - an array dimensioned to 30 that contains any integers inputted to the
          terminal in REFAC command mode.

RETM    - contains the average relative retention time.

RDEV    - contains the relative standard deviation of the response factors.

RF      - an array containing the response factors for a compound as read in
          from the response list.

RFL     - contains the last response factor read in.

RFMI(O) - contains the mean response factor.

RLINI(O)- contains the standard error for linear fit with area of compound
          divided by area of reference compound plotted against amount.

RSUM    - contains the summation of all response factors.

ST      - contains the standard deviation of the response factors.

SUBROUTINES

     Call IFORM (IPROC, NFL, ION, UN, IDEV,  1C)

     This routine prints ongoing or initialization data out in IFB format.  It
will print out all semi volatile compounds.  For the compounds that have  no
data, only the name will be printed out.  The arguments are defined under
explanation of major variables.

     Call IZERO (IDESC)

     This routine initializes a response list file descriptor.

     Call QUEST ("string", II, ICHAR, 12)

     This routine prints out a string constant, an associated character  variable
and waits for input to change the character variable.  A carriage return does
not change the character variable.  The arguments are defined as follows:

     "string" - a string literal  to be printed out as written.

     II       - an integer containing the number of characters in "string."  II
                must be greater than 10 even  if "string" is shorter.
                                      15

-------
     ICHAR    - a character  array containing  data  pertaining to the string.   It
                must be less than or  equal  to 9.

     12       - an integer containing the  length of  ICHAR.

     Call  SORT (RARY1,  RARY2,  II)

     This  routine sorts the  first II  elements of two real arrays from smallest
to largest.   It does this  by comparing values in RARY2.   II cannot be greater
than 5.  Also, if the smallest element of  RARY2 is 35,  it only sorts I1-1
elements and sets the first  element of RARY1  to 0.

FUNCTIONS

     RMEAN (R, 1C)

     This  function divides the real argument  (R) by  the  integer argument (1C).

     RST (Rl, R2)

     This  function divides Rl  by R2 and multiplies by 100.

     STDEV (RARY, AVE,  1C)

     This  function finds the standard deviation of an array of real numbers
(RARY) containing up to 250  elements.  AVE is the  mean  of the array and 1C is
the number of elements.

FILE FORMATS

     LNOOOOn.RF

     This  file is a response list created  by  QUAN  where  LN is a one or two
character  library name  and n is a right justified  integer no larger than 5
digits.  It consists of an 84 word  header  containing variables defined in
the common block CHEAD.  The header is followed by 22 word entries.  Each file
can have a maximum of 300 entries.  The variables  contained in each 22 word
block are  defined by the common block CLIST.

     LN.IN

     This  file is created by REFAC  when initialization  is chosen.  LN will be
any one or two character library name.  It consists  of 34 word entries.  It can
have any amount of entries.   The variables contained in  each 34 word block are
defined by the common block  CIN.

     HEAD.IN

     This  file is one 52 word block containing main  header information for IFB
output.  The variables  are defined  by the  common block  CQHD.
                                       16

-------
     CMPND.DS

     This is a FORTRAN readable file containing in  IFB  order the  69  semi volatile
compounds.   It is used to sort ongoing or initialization  data.

NOTES

     To change the number of initialization runs the  user needs to change  the
parameter MAXIN from 5 to the number of initialization  points desired.   Format
statements to print column headings (labels 1170-1186)  and initialization  output
(label 1230) will also need to be changed to reflect  data output.  The  necessary
format changes should be clear.  It is suggested that the user copy  REFAC  to a
file named to reflect the number of initialization  points REFAC will  use.   For
example, if 3 points are used call  the new program  REFAC3.FR.

     To change the order or spelling of compounds in  IFB  format the  user need
only edit the file CMPND.DS.  If different compounds  or additional compounds
are desired just insert them into the file where desired.  CMPND.DS  cannot have
more than 75 compounds.
                                       17

-------
         INITIAL. CALIBRATION DATA - SEMIVOLATILE HSL  COMPOUNDS3
CASE NO.  87694321
CONTRACT NO.  DA12O2
CALIBRATION DATE: 3/22/84
MINIMUM MEAN RF FOR 8PCC IS O. O9
MAXIMUM XRSD FOR CCC IB 3OX
         COMPOUND
NITROSODIMETHYLAMINE
PHENOL
ANILINE
BIS(2-CHLOROETHYL)ETHER
2-CHLOROPHENOL
li 3-DICHLOROBENZENE
1.4-DICHLOROBENZENE
BENZYL ALCOHOL
1,2-DICHLOROBENZENE
2-METHYLPHENOL
N-NITROSO-DI-N-PROP YLAMINE
HEXACHLOROETHANE
NITROBENZENE
ISOPHORONE
2-NITROPHENOL
2. 4-DIMETHYLPHENOL
BENZOIC ACID
BIS < 2-CHLOROETHYL)ETHER
2,4-DICHLOROPHENOL
1.2. 4-TRICHLOROBENZENE
NAPHTHALENE
4-CHLOROANILIN
HEXACHLOROBUTADIENE
4-CHLORO-3-METHYLPHENOL
2-METHYLNAPHTALENE
HEXACHLOROCYCLOPENTADIENE
Z, 4.6-TRICHLOROPHENOL
2,4, 5-TRICHLOROPHENOL
2-CHLORONAPHTHALENE
4-NITROANILINE
DIMETHYLPHTHALATE
ACENAPHTHYLENE
3-NITROANILINE
ACENAPHTHENE
2.4-DINITROPHENOL
4-NITROPHENOL
DIBENZOFURAN
2.4-DINITROTOLUENE
2.6-DINITROTOLUENE
DIETHYLPHTHALATE
4-CHLOROPHENYL-PHENYL ETHER
FLUORENE
2-NITROANILINE
4.6-DINITRO-O-CRESOL
N-NITROSODIPHENYLAMINE
AZOBENZENE
4-BROMOPHENYL-PHENYL ETHER
HEXACHLOROBENZENE
PENTACHLOROPHENOL
PHENANTHRENE
ANTHRACENE
DI-N-BUTYLPHTHALATE
FLUORANTHENE
BENZIDINE
PYRENE
             CONTRACT LAB:  LEMSCO
    INSTRUMENT IDENTIFIER:  FINNIOAN 4O1O
RF
20NO
1. 64O
1. 477
1. 924
1. 987
O. 969
1. 374
0. OOO
0. 444
0. 163
0. 318
1. 64O
0. 319
0. 401
0. 166
0. OOO
0. 490
0. 902
1.897
O. 377
1. 740
2. 961
0. 416
O. OOO
0. OOO
0. 421
O. 381
1. 729
1.O98
0. 923
O. 090
O. 27O
0. 237
O. 240
0. 089
RF
SONS
1.
1.
1.
1.
1.
1.
0.
0.
0.
0.
1
0.
0.
0.
0.
0.
0.
a.
o.
i.
2.
O.
o.
o.
0.
0.
1.
1.
0.
0.
0.
o.
0.
o.
699
479
690
794
13O
619
979
989
194
322
699
337
423
180
938
948
978
248
374
882
870
438
OBI
261
439
434
994
139
601
O78
316
289
273
116
RF

BONO
1.
1.
1.
1.
1.
1.
1.
0.
0
0.
1
0
0.
0.
o.
0.
0.
2.
0.
1.
2.
0.
o.
0.
0.
0.
1.
1.
o.
o.
0.
0.
0.
0.
649
490
694
734
119
993
023
997
199
339
649
339
491
178
479
994
931
17O
323
842
723
494
O89
308
429
429
999
123
617
099
330
297
296
143
1.
1.
1.
1.
1.
1.
0.
O.
0.
0.
1.
0.
o.
0.
0.
0.
0.
2.
0.
2.
3.
0.
O.
0.
0.
0.
2.
1.
0.
0.
0.
0.
0.
0.
RF
120NO
710 1.
626 1.
814 1.
811 1.
O93 1.
581 1.
924 0.
492 O.
242 O
382 0
710 1
390 0
481 0.
189 0.
929 0.
997 0.
637 0.
994 2.
411 0.
183 2.
199 3.
9O8 0.
JOS O.
281 O.
479 O.
468 0.
107 1.
939 1.
662 0.
O82 0
322 0.
3O2 0.
274 0.
128 0.
RF
MEAN
16ONO
797
694
800
849
O40
622
7O8
944
192
307
797
398
474
187
969
990
614
41O
434
O29
O99
934
117
319
461
468
899
379
683
O89
319
298
277
131





1.
0.
0.
0.
0.
1.
0.
0.
O.
O.
0.
O.
2.
0.
1.
2.
O.
O.
0.
0.
0.
1.
1.
o.
o.
0.
0.
0.
o.
RF
682
993
704
746
O61
997
9O9
929
198
333
682
348
446
179
927
940
972
296
384
934
882
470
O99
292
449
439
784
299
617
079
311
284
272
122
XRSD

2.
9.
6.
9.
9.
9.
13.
9.
12.
7.
2.
7.
6.
4.
6.
8.
8.
9.
9.
7.
7.
9.
14.
7.
4.
7.
10.
13.
8.
19.
6.
8.
6.
14.

,643
843
101
078
496
942
322
761
775
833
643
168
802
198
227
726
794
892
80S
973
875
382
932
462
837
402
942
769
996
614
810
446
670
960
1. 239 1. 346 1. 323 1. 660 1. 463
1. 4O6
10. 397
                     Figure  5.   IFB format sample output.
                                        18

-------
   BUTYL.BENZYLPHTHALATE         0. 791 0. 898 0. 899 0. 987 O. 963    0. 908     7  540
   3, 3'-DICHLOROBENZIDINE       0.391 0. 396 0. 379 0. 46O O. 468    0.419     8.930
   BENZO (A) ANTHRACENE           1.320 1.469 1.526 1.466 1.432    1.442     4  735
   B IS < 2-ETHYLHEX YD PHTHALATE   0.818 0.919 0.919 1.013 1.C10    0.936     7  664
   CHRYSENE
   DI-N-OCTYLPHTHALATE          1.727 1. 9O1 1.971 2.319 2.463    2.076    13  132
   BENZO(B)FLUORANTHENE
   BENZO(K)FLUORANTHENE
   INDENO<1, 2, 3-CD)PYRENE
   DIBENZ(A,H)ANTHRACENE
   BENZO(OHI)PERYLENE
                               Figure 5.   Continued


a Output  for some compounds  are blank as a  result of different spellings  in the
  response  list and the  file CMPND.DS or the response  list identifier  Us
  described in Section 3)  in REFAC command  mode was not  given.
                                          19

-------
N-NITROBODIMETHYLAMINE        1   9
PHENOL                         2   5
ANILINE                        3   9
B18(2-CHLOROETHYL)ETHER        4   9
2-CHLOROPHENOL                 9   9
1.3-DICHLOROBENZENE            6   9
1.4-DICHLOROBENZENE            7   9
BENZYL ALCOHOL                 8   9
1.2-DICHLORO8ENZENE            9   9
2-METHYLPHENOL                1O   9
BIS(2-CHLOROISOPROPYL)ETHER   11   9
4-METHYLPHENOL                12   9
N-NITRO8O-DI-N-PROPYLAMINE    13   9
HEXACHLOROETHANE              14   9
NITROBENZENE                  19   9
ISOPHORONE                    16   9
2-NITROPHENOL                 17   9
2.4-DIMETHYLPHENOL            18   9
BENZOIC ACID                  19   9
BI8(2-CHLOROETHOXY>METHANE    2O   9
2.4-DICHLOROPHENOL            21   9
1.2.4-TRICHLOROBENZENE       22   9
NAPHTHALENE                   23   9
4-CHLOROANILINE               24   9
HEXACHLOROBUTADIENE           29   9
4-CHLORO-3-METHYLPHENOL       26   9
2-METHYLNAPHTALENE            27   9
HEXACHLOROCYCLOPENTADIENE     28   9
2.4.6-TRICHLOROPHENOL         29   9
2,4,9-TRICHLOROPHENOL         30   9
2-CHLORONAPHTHALENE           31   9
2-NITROANIHNE                32   9
DIMETHYL PHTHALATE            33   9
ACENAPHTHYLENE                34   5
3-NITROANILINE                39   9
ACENAPHTHENE                  36   9
2.4-DINITROPHENOL             37   4
4-NITROPHENOL                 38   4
DIBENZOFURAN                  39   9
2.4-DINITROTOLUENE            4O   9
2.6-DINITROTOLUENE            41   9
DIETHYLPHTHALATE              42   9
4-CHLOROPHENYL-PHENYLETHER    43   9
FLUORENE                      44   9
4-NITROANILINE                49   9
4.6-DINITRO-2-METHYLPHENOL    46   4
N-NITRO80DIPHENYLAMINE        47   9
4-BROMOPHENYL-PHENYLETHER     48   9
HEXACHLOROBENZENE             49   9
PENTACHLOROPHENOL             90   4
PHENANTHRENE                  91   9
ANTHRACENE                    92   9
DI-N-BUTYLPHTHALATE           93   9
FLUORANTHENE                  93   9
BENZIDINE                     99   4
PYRENE                        96   9
BUTYLBENZYLPHTHALATE          97   9
3.3'-DICHLOROBENZIDINE        98   9
BENZO(A)ANTHRACENE            99   9
BI8(2-ETHYLHEXYL)PHTHALATE    60   9
CHRYSENE                      61   9
DI-N-OCTYL PHTHALATE          62   9
BENZO(B)FLUORANTHENE          63   9
BENZO(K)FLUORANTHENE          64   9
BENZO(A)PYRENE                69   9
INDENO(1. 2. 3-CD)PYRENE        66   9
01BENZ
-------
C  RF
C  MARY BATES 7/5/B4
C  OLINN HANSEN 12/13/83
C
       PARAMETER MAXQ-3O.LEN««2.LENH-B4, LENI-34, LENO*>22. MAXD-1OO. MAXIN-S
       PARAMETER LENQ-52,MAXS-2OO, TTO-1O, DSK-1. LPT-2
       PARAMETER IDLEN-11. NLEN-3S, ILEN-14
       INTEGER IIN, ION(LENO. MAXD). JON.
     *              ISF(IO),IBD(4). I8T<4)
C
       COMMON/CHEAD/NAMECNLEN), FMASS, SMASS. IU1. IU2. LNAMER, LNUMR,
     +              NAMER (NLEN), FMA88R. SMASBR, IU3, IU4
C
       COMMON/CLIBT/IDAY, IRUN, RET, METH(2). AREA.
     +              HIT.AMNT. RETR, METHR<2>, AREAR, HITR, AMNTR
C
       COMMON/C1N/ICOMI(ILEN), RFC(5), RFMI, RSD, RETM, CC.RLINI
C
       COMMON/CON/ICOMO< ILEN), RFMO, RFL. PD, RLINO
C
       COMMON/CMAIN/NPROO,DFSW, DFSW1, ITEMP(IS),
     * DFILE(12, 6). SFILECIDLEN, 4), INSTDO), IREFTABLE(IDLEN),
     + JUNK(7),LIBRNAME, LIBRNUMB, IBUF, ISCN(45), IACQ(100), IDAT(45)
C
       INTEGER IDESC(IOLEN),KDESC,AC(MAXQ>,C(MAXO>
       DIMENSION NUM(MAXD>,FNUM(30). ICQHD
       READU1, 1020)  IPROC
 102O  FORMAT(A2Z)
       IF( IPROC .NE.  "O -  .AND.  IPROC  . NE.  "I •)  GO TO 20
C
C  ASK USER IF IFB  FORMAT IS WANTED
C
   25  WRITE(1O, 1O2S)
 1025  FORMATC" IFB FORMAT(Y OR  N)?:  ". Z)
       READU 1,1026)  IFB
 1026  FORMAT(A2Z)
       IF 
-------
       DO 27 I-l.LENQ
   27  ICQHD(I) -  "  "
       DO 3O   1-1, IDLEN
   3O  KDESC(I) -  0
       KDESC(l) -  "1"
       KDESC(3) »  1
       KDESC(4) -  "HE"
       KDESC(9) »  "AD"
       KDESC(10) - "IN"
       CALL FMCHK
       CALL FMRDdCQHD. ICH1.LENQ, *82OO. IERR)
       CALL FMCL8dCHl,*86OO)
C
C  PRINT OUT HEADER FOR INITIALIZATION OR ONGOING
C
   SO  IDEV •  1O
   60  WRITEdO, 1130)
       IFdPROC . EQ.  "O ")  GO TO 70
       URITEUDEV, 1030)
 1O30  FORMATdOX. "INITIAL  CALIBRATION DATA - SEMI VOLATILE HSL
     +  COMPOUNDS">
       MRITE(IDEV) "   "
       WRITE(IDEV, 1O40) ICSN, ICL
 1O4O  FORMAT(" CASE NO. ". 9A2. 23X. "CONTRACT LAB:  ". 1OA2)
       WRITE(IDEV,109O) ICTN.ID
 109O  FORMAT(" CONTRACT NO.  ",9A2. 1OX, "INSTRUMENT IDENTIFIER: ".
     «•         1OA2)
       WRITEdDEV, 1O60) IDATE
 1OAO  FORMAT<" CALIBRATION DATE:  ".4A2)
       WRITEdDEV, 1O70)
 1O7O  FORMAT<" MINIMUM MEAN  RF FOR SPCC  IS O. 09")
       WRITEdDEV. 1O71)
 1071  FORMATC' MAXIMUM XRSD  FOR CCC IS 30%")
       WRITEdDEV) "   "
       GO TO BO
   70  WRITEdDEV, 1OBO)
 1OBO  FORMATdOX, "CALIBRATION  CHECK - SEMI VOLATILE HSL COMPOUNDS")
       WRITEdDEV. 1O40) ICSN, ICL
       WRITEdDEV, 1O9O) ICTN. ID
       WRITE(IDEV, 106O) IDATE
       WRITEdDEV, 109O) ISF
 1090  FORMAT(" STANDARD FILE:  ",1OA2)
       WRITEdDEV. 11OO) IBD, 1ST
 110O  FORMATC1 DATE:  ", 4A2, 9X, "TIME:  ", 4A2)
       WRITEdDEV, 1110)
 1110  FORMATC MAXIMUM X D FOR CCC IS 2O")
       WRITEdDEV) "   "
C
C  ASK IF HEADER IS OKAY -  IF SO CONTINUE
C
   80  IF (IDEV .EQ.  2) GO  TO 139
   90  WRITEdO, 1120)
 1120  FORMAT(" DO YOU WANT TO  MAKE CHANGES 
-------
       12-9
       CALL QUEST("CASE NO. H. II.IC3N, 12)
       II - 13
       12-9
       CALL QUEST("CONTRACT LAB".XI.ICL,12)
       12-3
       CALL QUEST("CONTRACT NO. ". II. ICTN. 12)
       11-22
       12-9
       CALL QUEST("INSTRUMENT IDENTIFIER".II.ID.12)
       II - 16
       12-4
       CALL QUEST("CALIBRATION DATE". II.IDATE. 12)
       IFdPROC  . EQ.  "I ")  OO TO 6O
       II - 14
       12-9
       CALL QUEST("STANDARD FILE". II. ISF. 12)
       11-9
       12-4
       CALL QUEST("DATE", II.ISO.12)
       CALL QUEST("TIME". II. 1ST. 12)
       OO TO 60
C
C  HEADER IB CORRECT  SO LET'S CONTINUE
C
  1OO  CALL FMOPN(KDESC, ICHI, *86OO. IERR)
       CALL FMP08(0.0,ICH1.»86OO,IERR)
       CALL FMWRT(ICQHD. ICH1,LENQ,*86OO. IERR >
       CALL FMCLS(ICHI.*860O)
       WRITEUO, 1130)
  13O  N - 1
       IDEV - 10
       DO 131 I-l.MAXD
  131  NUM(I) -  0
       NUN - 0
       NIC - O
       1C - O
       CFL - 0
       CALL RESET



C
C
C











139 WRITEdO, 119O)
119O FORMAT (" REF AC: ".
136 CALL ICETK INPUT.

DETERMINE WHICH REF AC

IF ( IFL . EQ. "» "
IFOFL . EQ. "« ")
IF ( INPUT . EQ. "E
IF ( INPUT . EQ. "H
IF (INPUT . EQ. "Z
IF ( INPUT . EQ. "N
IF (IFL . EO. "? "
IF ( INPUT . EQ. "L
IF (IPROC . EQ. "0
IF (INPUT . EQ. "C
IF ( INPUT . EQ. "R

Z)
IFL. IBIT, 3O. NUI

COMMAND IS WAI

.OR. IFL . EQ.
GO TO 219
") OO TO 9OOO
") GO TO 16O
") GO TO 9OOO
") OO TO 17O
) 00 TO 180
") OO TO 19O
") OO TO 19O
") OO TO 2OO
") OO TO 210
                                                   »sioo)
                                           ')  00 TO 22O
  19O  WRITEdO, 1190)
       OO TO 136
C
C  HARDCOPY COMMAND REQUESTED
C
  160  IDEV - 2
       WRITEdO, 1130)
       WRITEdO, 99)
   99  FORMAT (" HARDCOPY ENABLED">
       CALL OPLPTdDEV. «8900)
                        23

-------
       OO TO 6O
C
C  NO HARDCOPY COMMAND REQUESTED
C
  170  IDEV - 10
       WRITEdO, 1130)
       WRITEdO.98)
   98  FORMAT <" HARDCOPY DISABLED")
       OO TO 13O
C
C  LIST REFAC COMMANDS REQUESTED
C
  180  CALL COPY(IDEV)
       OO TO 130
C
C  LINEAR STANDARD ERROR REQUESTED  IN OUTPUT
C
  190  CFL « 1
       WRITEdO, 1130)
       00 TO 135
C
C  CORRELATION COEFFICIENT REQUESTED IN OUTPUT
C
  2OO  CFL - 2
       WRITEdO.113O)
       OO TO 135
C
C  AVERAGE RELATIVE RETENTION TIME  REQUESTED  IN  OUTPUT
C
  21O  CFL - 3
       WRITEdO. 113O)
       GO TO 135
C
C  READ FROM THE LIBRARY LIST TO OUTPUT IN  IFB FORMAT
C
  215  DO 216 1-1, IDLEN
  216  JFILE(I) -  DFILEd-2)
       WRITEdO. 1130)
       CALL FMOPS/2
       LIBNM = JFILE(A)
       OO TO 230
C
C  PREPARE TO PERFORM  STATISTICS ON LIBRARY ENTRIES
C
  220  LIBNM - INPUT
       WRITEdO. 113O)

C
C  OPEN LIBNM.IN FILE
C
  230  DO 240 1*1, IDLEN
  240  LDESC(I) -  O
       LDESCd) -  "0<0>"
       LDESCC3) =  1
       LDESCC4) =  LIBNM
       LDESCdO)  = "IN"
C
C  CHECK TO SEE IF INITIALIZATION  OR ONGOING
C
       IF  (IPROC  .EQ.  "O  ")  GO  TO  25O
C
C  PRINT OUT THE  APPROPRIATE COLUMN HEADER  FOR  INITIALIZATION
                            24

-------
       CALL FMOPN
 1176  FORMATC' •'. 9X. "COMPOUND". T26. SOX, "RF" ), 4X, "MEAN", 3X, "RETM" )
 1180  FORMAT
       WRITEdDEV, 1190)
 1190  FORMAT<" ", T32, "MEAN")
       IF (CFL . EQ. O) WRITEdDEV, 1192)
       IF (CFL .EQ.  1) WRITEdDEV, 1194)
 1192 FORMATC1 ". 11X. "COMPOUND", T32. "RFd >", 6X, "RF(Q) ", 7X, "X D" )
 1194 FORMAT(" ". 1IX, "COMPOUND", T32, "RFd )", AX. "RF(O) ". 7X, "X D", 7X, "XLSD" )
       WRITEdDEV)  "  M
C
C  CREATE THE FILE DESCRIPTOR
C
  29O  CALL IZERO  (IDESC)
  3OO  1C - 1C +  1
       NUN * NUN •»•  1
       IF O" + MOD(NUMB, 10)
         IB * 14  + IBYTE - I
         IB1 » IB  . AND.  1
         IWORD -  (IB  + l>/2
         LWD = IDESC(IWORD)
         IF (IB1)  IDESC < IWORD) = (LWD. AND. 377K) + ISHFTdDIG, 8)
         IF (IB1   EQ.  0) IDESC(IWORD) - (LWD.AND.1774OOK)  + IDIO
         NUMB = NUMB/10
  31O  CONTINUE
       NUM(2> " NUM(2) + 1
       GO TO 340
C
C  CREATE FILE DESCRIPTOR  FOR  SEPARATE ENTRIES OR ENTRIES.  TAKEN
C  FROM LIBRARY LIST
C
  32O  N - N -t- 1
       IF (IFL .EQ.  "# ">  GO TO 329
       LIBNM - ISd.N-1)
                                   25

-------
       NUM(N>
       IF (N-l . OT.  IC8) CO TO 470
  325  IF (NUfUN) . EQ.  O) CO TO 470
       IDE8C(4) - LIBNM
       IBYTE • (LIBNM .AND.  377K)  EQ  0
       NUMB * NUMCN)
       DO 330 1-1,9
         IDIC - "0" «• MOD (NUMB, 10)
         IB - 14 •«• IBYTE - I
         IB1 * IB .AND.  1
         IWORD - (IB + l)/2
         LWD - IDESC(IWORD)
         IF (IB1) IDESCUWORD) -  (LWD  .AND.  377K)  «• ISHFTtIDIO.B>
         IF 
         DO 36O J-l.LEN
           IQ(J,I) - JQ(J)
  360    CONTINUE
       ICR - ICR «• 1
  370  CONTINUE
C
C  CHECK TO SEE IF THE NUMBER OF  WORDS READ IS EQUAL TO THE PROPER
C  AMOUNT   IF NOT GIVE AN ERROR  MESSAGE.
C
  38O  IF (IERR .NE. -LEN) CO TO  83OO
       CALL FMCLS(ICH, »B4OO>
C
C  CALCULATE THE RESPONSE FACTOR  FOR EACH  ENTRY.   STORE THIS
C  RF  IN A TEMPORARY ARRAY ALONG  WITH  RELATIVE RETENTION TIME
C  AND THE RATIO OF THE  INTERNAL  STANDARD  AREA DIVIDED BY
C  THE COMPOUND AREA.   THE ARRAYS USED ARE RESPECTIVELY "RF",
C  "RTM,  AND "AC".
C
C
       IFUPROC .EQ. "I ") ICR -  MAXIM
       DO 4OO 1*1,ICR
         DO 39O J-l.LEN
           JO(J) - IQ(J,I)
  390    CONTINUE
         A - AREA * . 5
         AR - AREAR + . 9
         C(I) » AMNT «• . OOO9
         RF(I> • (AREA/AREAR) *  (AMNTR/AMNT) + . OOO9
         RT(I) - RET/RETR + . OOO9
                                26

-------
         ACd) - AREA/AREAR + .9
  4OO  CONTINUE
       RFL « RF(ICR)
       DO 4O1 1-1, MAXIN
  401  RFC (I) - RFd)
C
C  INITIALIZE VARIABLES USED IN LINEAR ERROR  AND
C  CORRELATION COEFFICIENT CALCULATIONS.   IF
C  INITIALIZATION SORT RF'S ACCORDINO TO CORRESPONDING
C  AMOUNT SO THAT WHEN PRINTED OUT THEY WILL  BE IN
C  CORRECT ORDER.
C
       Xl-0
       X2-0
       Yl-O
       Y2-O
       IF (IPROC . EQ. "I  ">CALL SORT(RFC, C. MAXIN. AC)
       M - ICR
       II - 1
       IF (RFCd) . EQ. 0)11-2
       IF (11 . NE. 1> M - ICR - 11 +  1
       IF (CFL . NE.   1) 00 TO 42O
C
C  LINEAR ERROR CALCULATION
C
       DO 410 I-I1.ICR
          XI - XI +  Cd)
          X2 - X2 +  ACd)
          Yl - Yl *  Cd)*AC(I>
          Y2 - Y2 +  Cd)*Cd)
  41O  CONTINUE
       B - (M»Y1 - X1*X2)/(M»Y2 - X1»X1)
       A - X2/M - B  * Xl/M
       S-0
       DO 419 I - II.ICR
          EST - A •«•  B*C(I)
          S - S * (ACd) - EST)»*2
  419  CONTINUE
       RLINI - SQRT(S/M>* 10O
       RLINO - RLINI
       00 TO 429
  42O  IF (CFL .NE.   2) OO TO 429
       IF (ICR . OT.   MAXIN) ICR - MAXIN
C
C  CORRELATION COEFFICIENT CALCULATIONS
C
       W-O
       DO 429 I - II.ICR
          XI -XI + Cd) * Cd)
          X2 - X2 •»•  Cd)
          H - W + Cd) * ACd)
          Yl - Yl +  ACd)
          Y2 - Y2 +  ACd) * ACd)
  429  CONTINUE
       X - W - (X2 * YD/M
       Zl - XI - (X2 * X2)/M
       Z2 - Y2 - (Yl * YD/M
       CC - X/SQRT(Z1 * Z2)
C
  429  ICRT - ICR
       RSUM - SUM(RF. ICRT)
       IFdPROC .EQ.  "I ") RSUM - SUM (RFC, ICRT)
       RFMI - RMEAN(RSUM, ICRT)
       ST - STDEVCRF, RFMI. ICR)
       IFdPROC .EQ.  "I "> ST - STDEV( RFC. RFMI. ICR)
       RDEV - RST(8T,RFMI)
                             27

-------
       RETM - BUIKR1. ICR)
       RETH - RHEAN(RETM. ICR)
       RFHO - RFHI
C
C  BRANCH TO INITIALIZATION OR ONGOING TO STORE  DATA
C
       IF (IPROC . EO. "I "> 00 TO 49O
C
C  THE ONGOING PROCESS IS DESIGNATED SO SEARCH THE INITIALIZATION
C  OUTPUT CORRESPONDING  TO THE CURRENT ONOOINO DATA AND PERFORM
C  PERCENTAGE DIFFERENCE CALCULATION.
C
       CALL FHCHK(LDE8C.»89OO>
       CALL F«OPR(LDESC, ICHIN.LENI,»B919.IERR)
         CALL FMPOS(0.0. ICHIN,»891O, IEE>
         DO 431 I-l.HAXD
           CALL FMftD(JIN. ICHIN.LENI,*4311. XERR)
           DO 432 J-1,7
             IF(ICOMKJ) . NE. ICOMO(J)) CO  TO 431
  432      CONTINUE
           GO TO 433
  431    CONTINUE
 4311  PD - 0
       00 TO 434
C
C  CALCULATE PERCENTAGE  DIFFERENCE
C
  433  PD - (RFL - RFMD/RFMI *  10O
       RFHO * RFHI
C
C  STORE THE ONOOINO DATA INTO AN ARRAY CALLED "ION" AND OO BACK TO
C  GET MORE DATA
C
  434  DO 44O I-l.LENO
        ION (I.1C) - JON(I)
  440  CONTINUE
       CALL FMCLS(ICHIN, *86OO>
       00 TO 300
C
C  INITIALIZATION PROCESS IS  DESIGNATED SO  STORE DATA IN THE
C  ARRAY -UN".  "IIN" ONLY HOLDS TEN RECORDS SINCE THE
C  FORTRAN RUN TIME STACK WILL OVERFLOW  IF  TOO MANY DATA STRUCTURES
C  ARE CREATED.  AS A RESULT  WHEN TEN ENTRIES ARE  FINISHED THE DATA
C  ARE WRITTEN TO THE FILE ON THE DISK AND  "IIN" CAN THEN BE
C  OVERWRITTEN.
C
  450  R8D « RDEV
       DO 460 I-l.LENI
         IINU.NIIN) - JIN(I)
  460  CONTINUE
       12 * 10
       MIC - MODdC, 10)
       IF (MIC . EQ.  0) OO TO  910
       00 TO 300
C
C  ALL OF THE DATA ARE WRITTEN.  DETERMINE  WHICH FORMAT DATA ARE TO
C  BE PRINTED OUT IN.
C
C
  470  1C - 1C - 1
       IF (IPROC .EQ. "0 N> 00 TO 481
       12 - MODdC, 10)
       IF (IS .NE.  O) 00 TO 910
  481  IF (IFB .EQ.   "Y  ") CALL IFORMdPROC. CFL. ION, UN. IDEV, 1C. LDESC )
       IF (IFB .EO.   "Y  ") 00  TO  ISO
       IF (IPROC . EQ. "I ") OO TO 490
                                28

-------
c
C  PRINT OUT ONGOING  DATA
C
       DO 48O  1-1, 1C
         DO 473 J-l. LEND
           JON(J)  - ION.L-1, 3).
     +     RFMI.CC
           IF(CFL. EQ. 3)WRITEdDEV. 123O) < ICOJ1KK). K-l,  14). (RFC(L).L-l. 3).
     *     RFHI.RETH
           IF(CFL. EQ. 0)WRITEdDEV, 123O) dCOMI (K), K-l,  14), (RFC(L>, L-l. 3).
     +     RFMI.RSD
 123O      FORMATC1 ", 14A2. T3O, 3(F3. 3, 2X), F3. 3, 2X, F3.  1)
 1231      FORMAT C ". 14A2. T3O, 3(F3. 3. 2X ), F3. 3, 2X. F6. 4)
  306    CONTINUE
  3O7  CALL FHCLS  GOTO 3OO
       CALL FMCLS(LDESC,»86OO)
       GO TO 481
C
C  WRITE OUT ERROR MESSAGES
C  CLOSE FILES AND END PROGRAM
C
 81OO  WRITE(IO) "OPEN RL FILE  ERROR-
       GO TO 9OOO
 8200  WRITEdO) "FILE READ ERROR  FOR  HEADER-
       GO TO 9OOO
 83OO  WRITE(10) "FILE READ ERROR  FOR  ENTRIES-
       GO TO 9OOO
 8400  WRITE*1O) "FILE CLOSE ERROR"
       GO TO 900O
 83OO  WRITEdO) "OPEN PRINTER  ERROR-
       GO TO 9OOO
 8AOO  WRITEdO) " WRITE ERROR  "
       GO TO 9OOO
 89OO  WRITEdO) " YOU NEED TO  INITIALIZE - START AGAIN"
       GO TO 9OOO
 8910  WRITEdO) "FILE POSITION ERROR-
       GO TO 90OO
 8913  WRITEdO) "OPEN LN. IN  FILE  ERROR", IERR
       GO TO 9OOO
 892O  WRITEdO) "OPEN LIBRARY  LIST  ERROR"
       GO TO 133
                                    29

-------
90OO  CONTINUE
      CALL. FHCLS(ICHIN)
      CALL CLOSE(IDEV)
      CALL CLOSE(ICHAN)
      CALL LOAOIT("EXEC")
      STOP
      END
                                   30

-------
c
C  THIS SUBROUTINE FINOS  THE  STANDARD DEVIATION OF AN
C  ARRAY OF REAL NUMBERS  GIVEN  THE AVERAGE VALUE AND
C  THE NUMBER OF ELEMENTS IN  THE  ARRAY.
C    RARAY - ARRAY OF REAL NUMBERS
C    AVE *• MEAN REAL NUMBER OF  THE ARRAY DETERMINED IN FUNCTION
C    ICOUNT - NUMBER OF ELEMENTS  IN THE ARRAY
C
       FUNCTION STDEV(RARAY.AVE. ICOUNT)
       DIMENSION RARAY(S9O)
       SUM * 0. 0
       DO 10 0-1, ICOUNT
         DET - (RARAY(J)  - AVE)**2
         IF (RARAY(J). EQ. 0) DET =•= 0
         SUM - SUM + DET
   1O  CONTINUE
       STDEV • SORT(SUM/FLOAT(ICOUNT))
       RETURN
       END
C
C
C  THIS FUNCTION FINDS THE RELATIVE STANDARD DEVIATION
C  GIVEN THE STANDARD DEVIATION AND THE AVERAGE
C    ST - THE STANDARD DEVIATION  OF A SET OF NUMBERS
C    AVE - THE AVERAGE OF THE SAME SET OF NUMBERS
C
       FUNCTION RST(ST,AVE)
       RST - 8T/AVE »1OO
       RETURN
       END
C
C
C  THIS FUNCTION SUMS AN  ARRAY  OF REAL NUMBERS AND
C  CHANGES THE VALUE OF ICOUNT  TO SKIP ANY NUMBERS OF THE
C  ARRAY THAT MERE ZERO.
C    RF - THE REAL ARRAY  INPUTTED BY USER
C    1C - THE NUMBER OF ELEMENTS  IN THE ARRAY
C
       FUNCTION SUM(RF, 1C)
       DIMENSION RF(2OO)
       SUM - 0. O
       IN - 1C
       DO 1O 1-1, IN
         IF(RF(I). EQ. 0) 1C  -  1C - 1
         SUM - SUM + RF(I)
   10  CONTINUE
       RETURN
       END
C
C
C  THIS FUNCTION FINDS THE  AVERAGE GIVEN THE SUM OF
C  AN ARRAY AND THE NUMBER  OF NON-ZERO  ELEMENTS
C    RSUM - THE SUM OF AN ARRAY OF NUMBERS
C    ICOUNT - THE NUMBER  OF ELEMENTS IN THE ARRAY
C
       FUNCTION RMEAN(RSUM, ICOUNT)
       RMEAN - RSUM / ICOUNT
       RETURN
       END
C
C
C  THIS SUBROUTINE INITIALIZES  A  . RL FILE DESCRIPTOR
C    JDESC - THE ARRAY THAT WILL  CONTAIN THE DESCRIPTOR
C
       SUBROUTINE I ZERO(JDESC)
       DIMENSION vTDESCdl)
                                31

-------
       JDEBC(l) «"0<0>"
       JDESCC2) * 0
       JDESCO) - 1
       DO 1O 1-4.9
          JDESC(I) * O
   10  CONTINUE
       JDEBCUO) -"RLM
       JDESC(U) - 0
       RETURN
       END
C
C  THIS SUBROUTINE INITIALIZES A RESPONSE LIST HEADER.
C    IUS - USER PARAMETER
C    IU6 - USER PARAMETER
C
       SUBROUTINE HINIT(IU9, IU6)
       COMMON/CHEAD/NAME(39>, FMASS. SMASS. IU1, IU2. LNAMER. LNUMR.
     +      NAMERO9) > FMASSR, SMASSR, IU3. IU4
       DO 1O I - 1.39
          NAME(I) * 0
          NAMER(I) - 0
   10  CONTINUE
       IU1 - O
       IU2 - 0
       IU3 * O
       IU4 - O
       IU9 - 0
       IU6 « 0
       FMASS « 0
       SMASS = 0
       FMASSR - 0
       SMASSR - O
       RETURN
       END
C
C
C  THIS SUBROUTINE PRINTS OUT A STRING AND  ITS
C  DEFAULT VALUE AND WAITS  FOR CARRIAGE RETURN
C  OR INPUT TO CHANGE THE DEFAULT  VALUE.
C    NAME - A STRING LITERAL TO BE PRINTED  OUT AS WRITTEN
C    II - AN INTEGER CONTAINING THE  NUMBER  OF CHARACTERS IN NAME.
C         II MUST BE GREATER THAN  1O EVEN  IF NAME IS SHORTER.
C    ICH - A CHARACTER  ARRAY CONTAINING DATA PERTAINING TO THE
C          NAME.   IT MUST BE LESS  THAN OR EQUAL  TO 9.
C    12 - AN INTEGER CONTAINING THE  LENGTH  OF ICH
C
       SUBROUTINE QUEST(NAME, II, ICH. 12)
C
       INTEGER FMT<13), ICH(9), ICH2(9>
C
       FMT<1> =  "('"
       FMT<2) -  "  '"
       FMT<3> -  ".S"
       FMT(4) -  ((11/10) +  60K) *  296 + (MOD(Il.lO) + 6OK)
       FMTO) -  ", '"
       FMT(6) -  "( "'
       FMT(7) -  ",  "
       FMT(8> -  (I2+48) * 296 + 101K
       FMT(9) -  "2. "
       FMT(IO) -  "')"
       FMT(11)-".  "
       FMT(12) -  "'. "
       FMT(13) -  "Z>"
       WRITE(IO.FMT)  NAME. (ICH
-------
       IF .EQ.  "   ")  RETURN
       DO 20 1-1-12
         ICH(I) « ICH2(I)
   2O  CONTINUE
       RETURN
       END
C
C  THIS SUBROUTINE READS  IN "CMPND. D8" TO SORT DATA
C  INTO IFB FORMAT
C
       SUBROUTINE IFORM(IPROC, NFL, ION. UN. IDEV, IC.LDESC)

       COMMON/C IN/ICOMI (14), RFC(5>. RFM1, RSD. RETM, CC. RLINI
C
       COMMON/CON/ICOMO<14).RFMO, RFL, PD. RLINO
C
       INTEGER IIN04. 1O). JINO4). ION(22, 75). JON(22). NAME(14)
       INTEGER LDESC(ll)
C
       EQUIVALENCE  (JIN. ICOMI), (JON, ICOMO)
C
       IFdDEV. EQ. 2)  CALL OPLPT(IDEV, «999>
       LENI * 34
       ICH1 -  1
       CALL OPENR("1-CMPND DS", ICH1, IERR. *BOOO>
       CALL FMOPR(LDESC. ICHIN, »999,IERR)
  1OO  READdCMl. 1OOO, END-999)  (NAME( I >. 1-1. 14)
 1000  FORMAT<14A2>
       IF  (IPROC  .EQ.  "0  ") OO TO 60
C
C  INITIALIZATION DATA
C
       CALL FMPOSCO,0. ICHIN, *999, IERR)
       JN  - 1C +  1
         DO 2O J-l. JN
           CALL FMRD
-------
                                 OPEN CMPND. DS ERROR")
                                 READ .  IN FILE ERROR")
C
C
C
C
C  SO
C
BOOO  WRITEdO. 1025) IERR
1O25  FORMAT(" IDOS ERROR".19.
      OO TO 999
BO10  WRITEdO. 1026) IERR
1O26  FORMAT<" IDOS ERROR".15,
 999  CALL CLOSE(DSK, IE)
      CALL RESET
      RETURN
      END

  THIS SUBROUTINE SORTS AN ARRAY DIMENSIONED TO  5  -  SMALLEST
  TO LARGEST.   IF THE SMALLEST NUMBER  IS  GREATER  THAN
  35 IT ASSUMES THE FIRST ELEMENT OF THE ARRAY SHOULD NOT  BE  FOUND
     IT SETS IT TO ZERO

      SUBROUTINE SORT(RFC-C, MAXIN)

      DIMENSION C(S).RFC(5)

      IN - MAXIN - 1
      DO 20 1=1,IN
        ON - MAXIN - I
        DO 1O J« 1,JN
          IF (C - TEMPI
        TEMPI » TEHP2
  30  CONTINUE
      RETURN
      END
                         C CO TO  10
                                   34

-------
                                   REFERENCES

1.   Sauter, A. D.;  Mills,  P.  E.;  Fitch,  W.  L.;  Dyer,  R.   High Resolution
     Chromatography  and Chromatography Communication  1982, 5, pp. 27-30.

2.   Sauter, A. D.;  Betowski,  L. D.;  Ballard, J. M.   Analytical Chemistry 1983,
     55, pp. 116-119.

3.   Consensus Organic Protocol, Attachment  I:   Statement  of Work, Exhibit E,
     Contract Number WA-84-A266/2BT
                                      35

-------