&EPA
           United States
           Environmental Protection
           Agency
          Environmental Monitoring and Support EPA-600/4-80-011
          Laboratory         February 1980
          Cincinnati OH 45268
           Research and Development
Program
Documentation for the
Gas Chromatography
Automation System

-------
                 RESEARCH REPORTING SERIES

Research reports of the Office of Research and Development, U.S. Environmental
Protection Agency, have been grouped into nine series. These nine broad cate-
gories were established to facilitate further development and application of en-
vironmental technology. Elimination  of  traditional grouping was consciously
planned to foster technology transfer and a maximum interface in related fields.
The nine series are:

      1.   Environmental Health Effects Research
      2.   Environmental Protection Technology
      3.   Ecological Research
      4.   Environmental Monitoring
      5.   Socioeconomic  Environmental Studies
      6   Scientific and Technical  Assessment Reports (STAR)
      7.   Interagency Energy-Environment Research ana Development
      8.   "Special" Reports
      9.   Miscellaneous Reports

This report has been assigned  to the  ENVIRONMENTAL MONITORING series.
This series describes research conducted to develop new or improved methods
and instrumentation for the identification and quantification of environmental
pollutants  at the lowest conceivably significant concentrations. It also includes
studies to determine the ambient concentrations of pollutants in the environment
and/or the variance of pollutants as a function of time or meteorological factors.
Thts document is available to the public through the National Technical Informa-
tion Service, Springfield, Virginia  22161.

-------
                                              EPA-600/4-80-011
                                              February 1980
          PROGRAM DOCUMENTATION FOR THE
       GAS CHROMATOGRAPHY AUTOMATION SYSTEM
                        by

                Jonathan E.  Kopke
   Southwestern Ohio Regional  Computer Center
            University of Cincinnati
             Cincinnati, Ohio  45220
            Contract No. GS-05S-10458
                 Project Officer

                John M. Teuschler
      Physical  and Chemical  Methods Branch
Environmental  Monitoring and Support Laboratory
            Cincinnati, Ohio 45268
ENVIRONMENTAL MONITORING AND SUPPORT LABORATORY
       OFFICE OF RESEARCH AND DEVELOPMENT
      U.S. ENVIRONMENTAL PROTECTION AGENCY
            CINCINNATI, OHIO 45268

-------
                                  DISCLAIMER

    This document has been reviewed by the Environmental Monitoring and
Support Laboratory - Cincinnati, U.S.  Environmental Protection Agency, and
approved for publication.   Approval does not signify that the contents
necessarily reflect the views and policies of the U.S. Environmental
Protection Agency, nor does mention of trade names or commercial products
constitute endorsement or  recommendation for use.
                                     ii

-------
                                   FOREWORD

    Environmental measurements are required to determine the quality of
ambient waters and the character of waste effluents.  The Environmental
Monitoring and Support Laboratory - Cincinnati, conducts research to:

    •  Develop and evaluate techniques to measure the presence and
       concentration of physical, chemical, and radiological pollutants in
       water, wastewater, bottom sediments, and solid waste.

    •  Investigate methods for the concentration, recovery, and
       identification of viruses, bacteria and other microbiological
       organisms in water, and to determine the responses of aquatic
       organisms to water quality.

    •  Develop and operate an Agency-wide quality assurance program to
       assure standardization and quality control of systems for monitoring
       water and wastewater.

    •  Develop and operate a computerized system for instrument automation
       leading to improved data collection, analysis, and quality control.

    This report was developed in the Advanced Instrumentation Section of the
Environmental Monitoring and Support Laboratory in the interest of advancing
laboratory techniques and quality control through computerization.
                                    Dwight G. Ballinger
                                    Director
                                    Environmental Monitoring and Support
                                    Laboratory - Cincinnati
                                     111

-------
                                   ABSTRACT

    This book contains complete documentation for the 22 programs of the EPA
Gas Chromatography Automation System (6CAS).  The 6CAS is a system which
accepts information from a commercially available chromatography data system
and performs multi-point calibration, calculation of concentrations,
identification of compounds, calculation of relative retention times or
capacity ratios, calculation of EPA standard quality control statistics,
calculation of replicate statistics, dissimilar analysis confirmation, and
reporting of results to the Sample File Control System.

    The programs of the GCAS are written in Data General Extended BASIC,
Revision 4.3, under the operating system RDOS, Revision 6.2.  In this
document, there is a functional description, a functional flowchart, a
symbol definition table, a program listing, and a symbol cross reference
table for each of the programs.  The structure of all data files is also
completely described.

    This report was submitted in partial fulfillment of Task No. 79-219 by
the Southwestern Ohio Regional  Computer Center of the University of
Cincinnati.  It covers work done between January 10, 1979, and May 31, 1979,
and work was completed as of May 31, 1979.
                                     iv

-------
                                   CONTENTS
Foreword	i i i
Abstract	iv
    8.
    9.
   10.
   11.
   12.
   14.
   15.

   16.
   17.
   18.
   19.
   20.
   21.
   22.
   23.
   24.
Introduction.
Program GCOO
Program GC01
Program GC02
Program GC03
Program GC04
Program GC05

Program GC06
Program GC07
Program GC08
Program GC09
Program GC10
Program GC12
Program GC13

Program GC14
Program GC15
Program GC16
Program GC17
Program GC18
Program GC19
Program GC20
 1.   Introduction	1
 2.   Program GCOO - Master Control	3
 3.   Program GC01 - Method Interaction	9
 4.   Program GC02 - Concentration Pattern Interaction	25
 5.   Program GC03 - Internal  Standards Calibration	32
 6.   Program GC04 - Purge and Trap  Calibration	34
 7.   Program GC05 - Liquid/Liquid Extraction and
                        Direct Aqueous Injection Calibration	46
                    Calibration Curve Plotting	53
                    Extant Injections Listing	65
                    Internal  Standards Concentration Calculation	72
                    Purge and Trap  Concentration Calculation	74
                    Liquid/Liquid Extraction Concentration
                       Calculation	82
13.   Program GC11 - Direct Aqueous  Injection Concentration
                       Calculation	87
                    Retention Time  Calculation	92
                    Compound  Identification and Data Processing
                       Report	97
                    Control Standards Calculation	106
                    Spiked Samples  Calculation	112
                    Duplicate Samples Calculation	120
                    Surrogate Spikes Calculation	127
                    Replicate Statistics Calculation	133
                    Dissimilar Analysis Confirmation	140
                    Sample File Control Interaction	148
     Program GC21 - Microcomputer Interface	162
     File Structures	172

-------
                                  SECTION 1

                                 INTRODUCTION


    The Gas Chromatography Automation System (6CAS) is a set of 22 computer
programs which perform extensive processing of data from a commercially
available chromatography data system.  This book contains complete technical
documentation for the programs.  Two other related publications contain the
functional specifications and user's guide for the GCAS.

    The GCAS is written in Data General Extended BASIC, Revision 4.3, under
the operating system RDOS, Revision 6.2.  The 22 programs are named GCOO
through GC21,  The chaining relationships and functions of these programs
are shown in Figure 1.

    One special consideration which adds significant bulk to the GCAS is
that the system handles all errors and escapes without reverting to BASIC
command level.  This protects the integrity of the system by not allowing
any user to perform any unauthorized functions.  It also makes the system
easy to use by catching human errors, explaining them, and repeating the
relevant questions.

    The GCAS is designed to be enhanced as more advanced techniques are
developed.  For example, although the system accepts data only from a Varian
220L Chromatography Data System, a carefully designed replacement for
program GC21 would allow the GCAS to be used with a different commercial
system.  Furthermore,  the internal standards calibration method can be added
to the GCAS by implementing programs GC03 and GC08.  This document contains
all information necessary for the maintenance and enhancement of the GCAC.

-------
ro
                              Figure 1. Program modules and their chaining relationships.

-------
                                  SECTION 2

                        PROGRAM GCOO - MASTER CONTROL
    GCOO is the master control program of the Gas Chromatography Automation
System.  It is entered by chaining from INITIALIZE or any of the other GC
programs.

    The main function of GCOO is to invoke the other programs at the option
of the user.  For most of the options, GCOO chains directly to the
appropriate program.  For calibration or processing, the program reads the
type of method (internal standards, purge and trap, etc.) from the method
file and then chains to the appropriate program.  For quality control
statistics, the program gives the user a choice of four types of quality
control and then branches to the appropriate program.

    GCOO also opens the method file and leaves it open when it chains to
another program.  Furthermore, the method file remains open when the other
programs chain back to GCOO.  More precisely, GCOO opens the method file
when it is first entered from INITIALIZE, GC01, or GC19, but not chaining to
GC01 or GC19.  It closes the method file when it  1) chains to GC01 or GC19,
2) chains to the Sample File Control programs RUNEDIT or SEND, or 3) logs
off from the Nova.

-------
T 	 '
/



1
C

                                                               CHAIN
                                                                           GC20
CHAIN
                                                               \tt-C  GC19  J
Figure 2. Flowchart of Program GCOO.

-------
                TABLE 1.  SYMBOL DEFINITIONS FOR PROGRAM GCOO

Nl    the type of calibration and processing
            Nl=l   internal standards
            Nl=2   purge and trap
            Nl=3   liquid/liquid extraction
            Nl=4   direct aqueous injection
T     the number of the method
T$    the name of the method file
U$    the name of the user
V     a flag for keeping track of the method file
            V=0   a method file is open
            V=l   no method file is open
X     the user's answer to multiple choice questions
X$    the user's answer to a Y or N question

-------
7/20/1979
                                      A-U-HHHK-I-O-N
                        PROGRAM LISTING FOR GCOO
                                            S-Y-S-T-E-N G-A-S   C-H-R-0-M-A-T-O-G-R-A-P-H-Y   A-U-HH1-A-T-I-0-N   S-Y-S-T-E-M
                                                PAGE  1 7/20/1979                                                       PAGE  2
                                                                                PROGRAM LISTING FOR GCOO
GAS CHROMATOGRAPHY AUTOMATION SYSTEM
PROGRAM GCOO, MASTER CONTROL
BY:  J. KOPKE (SHORCC), JANUARY 10,  1979
MOST RECENT REVISION:  APRIL 16,  1979
                                                                     f
                                                                     f
                                                                     f
1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
0010 REM
0020 REM
0030 REM
0040 REM
0050 REM
0060 REM
0070 REM
0080 LET VM>
0090 GOTO 0110
0100 LET V=l
0110 ON ESC THEN GOTO 0280
0120 ESC
0125 PAGE =74
0126 GOTO 0280
0130 PRINT
0140 PRINT
0150 PRINT 'THESE ARE THE MASTER OPTIONS:
 0170 PRINT       0.  SIGN OFF"
 0180 PRINT       1.  METHOD INTERACTION"
 0190 PRINT       2.  CONCENTRATION PATTERN INTERACTION
 0200 PRINT       3.  CALIBRATION"
 0210 PRINT       4.  CALIBRATION CURVE PLOTTING'
 0220 PRINT       5.  INJECTION LISTING'
 0230 PRINT       6.  PROCESSING"
 0240 PRINT       7.  QUALITY CONTROL"
 0250 PRINT       8.  REPLICATE STATISTICS"
 0260 PRINT       9.  DISSIMILAR ANALYSIS CONFIRMATION"
 0270 PRINT      10.  SAMPLE FILE CONTROL'
 0275 GOTO 0285
 0280 PRINT
 0285 PRINT
 0290 TIME =120
 0300 ON ERR THEN GOTO 0340
 0310 TINPUT "WHICH MASTER OPTION DO YOU WANT TO USE?
*     N' FOR HELP)  ",X*
 0320 ON ERR THEN STOP
 0325 IF LEN(X*)=0 THEN GOTO 0140
 0326 ON ERR THEN GOTO 0405
 0327 LET X=VAL(X«)
 0328 ON ERR THEN STOP
 0330 GOTO 0360
                   1234567891123456789212345678931234567894123456789512345678961234567897
                            0000000
                   0340 ON ERR THEN STOP
                   0350 IF SYS(7)=60 THEN GOTO 0370
                   0360 IF XOO THEN GOTO 0400
                   0370 PRINT
                   0380 PRINT "YOU ARE BEING SIGNED OFF FROM  THE NOVA BY  THIS PROGAH,H
                   0385 CLOSE
                   0390 BYE
                   0400 IF X=INT(X) THEN IF X>0 THEN IF X<11  THEN GOTO 0460
                   0405 ON ERR THEN STOP
                   0410 PRINT
                   0420 PRINT "<7X7>'!X$;" IS NOT  A VALID OPTION NUMBER."
                   0430 GOTO 0140
                   0440 REH   	
                   0450 REM          OPEN THE METHOD FILE
                   0460 IF VO1 THEN GOTO 0770
                   0470 IF X=l THEN GOTO 0770
                   0480 IF X=9 THEN GOTO 07/0
                   0490 PRINT
                   0500 ON ERR THEN GOTO 0520
                   0510 INPUT 'WHAT IS THE NUMBER OF THE METHOD YOU WANT TO USE?  M
                   0520 ON ERR THEN STOP
                   0530 IF T=ABS";T!"IS NOT A  VALID METHOD NUMBER."
                   0560 GOTO 0490
                   0570 LET T$='GCOOOO"
                   0580 LET T$r7-LEN(STR$(T)),6]=STR$(T)
                   0590 ON ERR THEN GOTO 0610
                   0600 RENAME T$,T$
                   0610 ON ERR THEN STOP
                   0620 IF SYS(7)O-48 THEN GOTO 0650
                   0630 DELAY =1
                   0640 GOTO 0590
,n ..  ™ ,r™«   O*50 IF SYS(7)=-9 THEN GOTO 0690
(0-10,  OR 'RETUR   0660 PRINT
                   0670 PRINT "<7X7>THERE IS NO EXISTING METHOD WITH THE NUMBER ";T$[3,6
                  *     ];"."
                   0680 GOTO 0490
                   0690 ON ERR THEN GOTO 0730
                   0700 OPEN FILE[4,OJ,T$,200
                   0710 ON ERR THEN STOP
                   0720 GOTO 0770
 12m7891123456789212345678?31234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897

-------
G-A-S   C-HHMHHK-0-G-R-A-P-tt-Y   AHJ-T-Q-H-A-T-I-Q-N   S-Y-S-T-E-H
7/20/1979                                                       PAGE  3
                        PROGRAM LISTING FOR GCOO

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0730 ON ERR THEN STOP
 0740 DELAY =1
 0750 GOTO 0690
 0770 ON X THEN GOTO 0800,  0850, 0890,  0960, 1000,  1040,  1120,  1350,  13
*     90. 1440
 0780 REH   	
 0790 REN          INTERACT WITH METHOD
 0800 CLOSE
 0810 NOESC
 0820 CHAIN "CCOl"
 0830 REH	___
 0840 REH          INTERACT WITH CONCENTRATION PATTERNS
 0850 NOESC
 0860 CHAIN 'GC02-
 0870 REH   	
 0880 REH          CALIBRATE
 0890 NOESC
 0895 READ FILEf.4,11,T$,U*,N1
 0900 ON Nl THEN GOTO 0910, 0920, 0930, 0930
 0910 CHAIN 'GC03'
 0920 CHAIN 'GC04'
 0930 CHAIN •GC05"
 0940 REH   	—
 0950 REN          EXAMINE CALIBRATION CURVES
 0960 NOESC
 0970 CHAIN "GC06"
 0980 REH   	=	
 0990 REH          LIST EXTANT INJECTIONS
 1000 NOESC
 1010 CHAIN 'GC07'
 1020 REH   -—	
 1030 REH          PROCESS INJECTIONS
 1040 NOESC
 1045 READ FILE[4,1LT*,U$,N1
 1050 ON Nl THEN GOTO 1060, 1070, 1080, 1090
 1060 CHAIN "GC08*
 1070 CHAIN "GC09'
 1080 CHAIN 'GC10'
 1090 CHAIN 'GC11'
 1100 REH   	
 1110 REH          CALCULATE QUALITY CONTROL STATISTICS
 1120 PRINT

 123456789112345678921234567893123456789412345678951234567^             1234567891123456789212345678931234567894123456789512345678961234567897
          uu         Q         °        °        °         °            0         0         0         0         0         0         0
G-A-S   C-ti-R-0-H-A-T-O-C-R-A-P-H-Y   A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                       PAGE  4
                        PROGRAM LISTING FOR GCOO

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1130 PRINT 'THESE ARE THE TYPES OF QUALITY CONTROL STATISTICS:'
 1140 PRINT
 1150 PRINT •     1.  CONTROL (CHECK) STANDARDS'
 1160 PRINT '     2.  SPIKED SAHPLES"
 1170 PRINT '     3.  DUPLICATE SAHPLES'
 1180 PRINT '     4.  SURROGATE SPIKES'
 1190 PRINT
 1200 ON ERR THEN GOTO 1220
 1210 INPUT 'WHICH TYPE DO YOU WANT TO USE?  (I, 2,  3,  OR 4)   '.X
 1220 ON ERR THEN STOP
 1230 IF X=INT(X) THEN IF X>0 THEN IF X<5 THEN GOTO 1270
 1240 PRINT
 1250 PRINT '<7X7>";X;'IS NOT A VALID TYPE NUMBER."
 1260 GOTO 1120
 1270 NOESC
 1280 ON X THEN GOTO 1290, 1300, 1310, 1320
 1290 CHflIN '6C14'
 1300 CHAIN 'GC15"
 1310 CHAIN 'GC16-
 1320 CHAIN 'GC17*
 1330 REH	
 1340 REH          CALCULATE REPLICATE STATISTICS
 1350 NOESC
 1360 CHAIN 'GC18'
 1370 REM	
 1380 REH          PERFORM DISSIMILAR ANALYSIS CONFIRMATION
 1390 CLOSE
 1400 NOESC
 1410 CHAIN 'GC19'
 1420 REH   	
 1430 REM          REPORT RESULTS TO SAMPLE FILE CONTROL
 1440 NOESC
 1450 CHAIN "GC20'

-------
G-A-S   C-H-R-0-H-A-T-O-G-fi-A-P-H-Y   A-U-T-0-N-A-T-I-tHI   S-Y-S-T-E-M G-A-S  C-H-RHHI-A-T-O-C-R-A-P-H-Y   A-U-T-0-H-A-T-I-O-tt   S-Y-S-T-£-fl
7/20/1979               	                                   PAGE  5 7/20/1979                                                       PAGE  6
                        SYMBOL TABLE FOR GCOO                                                   SYMBOL TABLE FOR GCOO

SYMBOL    REFERENCES                                                    SYMBOL    REFERENCES
 0110  0090                                                               T$   0570  0580  0600  0670  0700  0895  1045
 0140  0325  0430                                                         US   0895  1045
 0280  0110  0126                                                         V    0080  0100  0460
 ?285  0275                                                               X    0327  0360  0400  0470  0480  0770  1210  1230  1250  1280
 0340  0300                                                               X$   0310  0325  0327  0420

 0370  0350
 0400  0360
 0405  0326
 0460  0400
 0490  0560  0680
 0520  0500
 0570  0530
 0590  0640
 0610  0590
 0650  0620
 0690  0650  0750
 0730  0690
 0770  0460  0470  0480  0720
 0800  0770
 0850  0770
 0890  0770
 0910  0900
 0920  0900
 0930  0900
 0960  0770
 1000  0770
 1040  0770
 1060  1050
 1070  1050
 1080  1050
 1090  1050
 1120  0770  1260
 1220  1200
 1270  1230
 1290  1280
 1300  1280
 1310  1280
 1320  1280
 1350  0770
 1390  0770
 1440  0770
 RM  0700  0895  1045
 Nl    0895  0900  1045  1050
 T     0510  0530  0550  0580

-------
                                   SECTION 3

                       PROGRAM GC01  - METHOD  INTERACTION


    GC01  is the program which generates,  modifies,  deletes,  and  displays
GCAS method files.  This program  is entered  by  chaining from GCOO (the
master control program), and it chains  back  to  that program  if the escape
key is pressed.

    As GC01 begins, it displays the four  types  of method interactions  which
are possible,  inputs the user's choice, and  then branches  to the appropriate
section of code.

GENERATE A NEW METHOD

    To generate a new method, GC01 first  inputs the method number.   If the
specified method number is not a  positive  integer of four  or fewer digits, a
message is printed telling the user that  the method number is invalid.   The
program then creates the name of  the method  file and attempts to rename that
file with its own name.  This step always  causes an error  which  is trapped.
If the error number is -9, there  is already  a method file  in existence with
the specified number.  The user is  informed  of  this fact,  and the program
branches back to the original four choices.

    If the specified method number  is usable, the program  inputs the name of
the user, the type of calibration and processing, the type of retention time
calculations, and either the relative retention time reference identifier or
the dead volume time.  These items are written  into the first record of the
method file.  The program then inputs the  identifiers,  the true  names  of
compounds, and CAS Registry numbers for the  method  and  writes these into the
method file.  When the user types the word "END" as an  identifier,  the
program closes the method file and asks if the  method should be  displayed.
If the user wants to have the method displayed, the program  branches to that
routine.   Otherwise, it chains back to GCOO.

MODIFY AN EXISTING METHOD

    If a user wants to modify a method, this program asks  for the method
number.  It checks whether the method number is reasonable and whether  the
method file already exists, as described  above.  It then presents four  types
of modifications, inputs the user's choice,  and branches to  the  appropriate
section of code.

-------
Add Another  Identifier

    If  the user  wants to  modify  the  method  by adding another identifier, the
program simply  locates the  end of  the  method  file and then branches to the
section for  generating a  new method.   That  section then appends additional
identifiers  to the method file.  All of  the concentration pattern files for
the method are deleted.

Delete  an Identifier

    If  the user  wants to  delete  an identifier,  the program inputs the
identifier and searches through  the method  file for it.   If the specified
identifier is not  in the  method  file,  a  message to that effect is printed.
If the  specified identifier  is found in  the method file,  it is replaced by
the dummy entry  "99999."  After  either circumstance,  the program asks
whether the  user wants to deal further with any method,  and then either
branches back to the original four choices  in this program or chains back to
GCOO.

Add Another  Compound to an  Identifier

    If  the user wants to  add  another compound to the  list of those
associated with  an identifier, this program first inputs the identifier and
searches for it  in the method file.  If  there is no matching identifier in
the method file, or if the  specified identifier already has the limit of
three compounds associated with  it, an appropriate message is printed.
Otherwise, the additional compound name  and CAS number are input and written
into the method file.  Then  the  program  asks  whether  the user wants to deal
further with any method,  and  it  branches accordingly.

Change  Retention Time Data

    If  the user wants to change  retention time  data,  this section of code
provides the choice of relative  retention time  or capacity ratio
calculations.  If the user  selects relative retention  time,  the program asks
for the  identifier of the compound to  whose retention  time all  others are
relative.  If the user selects capacity  ratio,  the program asks for the dead
volume  time.   In either case, the  data items  are written  into the method
file.

DELETE  AN EXISTING METHOD

    If  the user wants to delete  an existing method, this  program inputs the
method  number and checks whether the number is  reasonable and whether the
corresponding method file actually exists.  If  the file  does exist,  it is
deleted and that event is confirmed to the  user.   Also,  all  of the
concentration pattern files  for  the method  are  deleted.   The program then
asks if the user wants to deal further with any method  and branches
accordingly.
                                      10

-------
DISPLAY AN EXISTING METHOD

    If the user wants to display an existing method, this  program  again
inputs the method number and checks whether the corresponding method  file
actually exists.  It then prints headings  and the compound identification
information from the method file.  The program then asks if the  user  wants
to deal further with any method and branches accordingly.

SUBROUTINE TO CHECK CAS NUMBERS

    Whenever a user enters a CAS Registry  number, 6C01 branches  to this
subroutine to check whether the number is  reasonable.  A carriage return
alone is always accepted as a valid CAS number.  The subroutine  does  not
check whether the CAS number is the correct number for the compound named;
it only checks the form of the number.

    CAS Registry numbers are always of the form
where dn is a numeric digit.  Any of the digits d4 through dg may be
blanks, although no embedded blanks are allowed.  The positions of the
hyphens never vary.  Digit dg is a check digit which is used to verify
that the number has been typed correctly.  The check digit is the remainder
from the following division:

              8
              £      i"(d.j)

             1=1            	
                    10

    In this subroutine, the CAS number typed by the user  is first padded  on
the left with spaces until it is 11 characters long.  Then if the seventh
and tenth characters are not hyphens, the number is immediately identified
as invalid.  If the hyphens are in the correct positions, the subroutine
begins the calculation for the check digit.  In doing this, the subroutine
must convert each digit from a string to a number.  If there is any
non-numeric character in the CAS number, an error results, and the number is
invalid.  Finally, if the calculated check digit does not match the input
check digit, the CAS number is invalid.  Valid CAS numbers are returned to
the invoking procedure changed only by having been padded with blanks.
Invalid CAS numbers are changed to "99999" before being returned to the
invoking procedure.  If the main program finds that a returning CAS number
is "99999," it prints an error message and asks for another CAS number.

SUBROUTINE TO CHANGE SLASHES TO COMMAS

    The names of many chemical compounds have commas in them, but BASIC does
not allow commas to be part of an answer to an INPUT statement.  Therefore,
this program is set up to allow the user to type a slash where a commas is
needed in an identifier or in the name of a compound, and this subroutine
substitutes a comma for every slash.

                                     11

-------
C  GCOO   J-"-fENTER GCO-M



              [	TYPE OF
                                                                                  Ql
            -5 3-
              INTERACTION;
                                  RETN.
                                                    {DELETE ALL/
                                                    :ONC. PAT.
                                                     FILES    I
   METHOD

<  REPORT  I
"^OMF
NFORM

!PLAC
METH
FILE
1
1DENT1F,ER CO=G DATA ,
-—^1
•OUND
«Fiuh /DELE'
[ FROM
\ METH
UN / \HLk
OD [
1



M I MDETHT0°D / / M--ED /
M ^F|LE ^ (^ETHOD(

i

1
1

1?
   o
CU  C
—HQ
                                                                                     rt-
                                                                                     3-
                                                                                     fD

                                                                                     ro
                                                                                     CT>

                                                                                    TO
                                                                                     o
                                                                                     (/>
                                                                                     (/)
                                                                                     —I*
                                                                                     GT

                                                                                     ro

                                                                                     n
                                                                                     o

                                                                                     o
                                                                                     
                                                                                     3
                                                                                     ri-
                                                                                     1
                                                                                     CU
                                                                                     c-f
                    CO
                    d
                    DO
                    73
                    O
                                                                                          CD
                                                                                          m
                                                                                          r>
                                                                                          o

                                                                                          o
                                                                                          m
                                                                                          73
              ^  CHAIN  X/W'  GCOO  ^
 Figure 3. Flowchart of Program GC01.

-------
                TABLE 2.  SYMBOL DEFINITIONS  FOR  PROGRAM  GC01
A6$      the name of a concentration pattern file
I        a record number counter and control variable  for  loops
12       the control variable for loops
13       the total  in check digit calculations
14       the control variable for a loop
J        the line number in method displays
N$       the identifier for the compound to whose retention time  all  others
         are relative, or the dead volume time
Nl       the type of method
              Nl=l     internal standards
              Nl=2     purge and trap
              Nl=3     liquid/liquid extraction
              Nl=4     direct aqueous  injection
N2       the type of retention time calculations
              N2=l     relative retention time
              N2=2     capacity ratio
T        the method number
T$       the name of the method file
L)$       the user's name
V        the number of compounds associated with an  identifier
V$       an identifier
Vl$      the first  compound associated with an  identifier
V2$      the CAS number for VIS
V3$      the second compound associated with an  identifier
                                     13

-------
                             TABLE  2.   (continued)
V4$      the CAS number for  V3$
V5$      the third compound  associated with  an  identifier
V6$      the CAS number for  V5$
V7$      the identifier to be modified
V8$      the additional compound to be associated with an  identifier
V9$      the CAS number for  V8$
W3$      a CAS number being  sent to the subroutine
W4$      a CAS number padded with  a space
X        the user's answer to a multiple choice question
X$       the user's answer to Y or N questions
X4       a dummy variable
X5       a dummy variable
Z5       the position of a slash in Z5$
Z5$      a string being sent to the subroutine to change slashes to commas
                                     14

-------
O1
G-d-S   C4f*-OHHK-0-G-fl-A-P-H-Y   A-U-T-0-H-A-T-I-O-ff   S-Y-S-T-E-M
7/20/1979                                                      PAGE  1
                       PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0010 REN   +at=+=t=+=+=t=+=t=+=t=+=t=+=f=f=+=-f=-K!+=t='i«+=+«+=+=+=+=t=+
 0020 REH   4   GAS CHROHATDGRflPHY AUTOMATION SYSTEM                  +
 0030 REH   +   PROGRAM GC01, METHOD GENERATION                       +
 0040 REN   +   BY:  J. KOPKE (SWORCC), JWHUARY 26, 1979              +
 0045 REH   +   HOST RECENT REVISION:  MARCH 26, 1979                 <•
 0050 REH   +=+=+=+=+=t=t=+=+=+=f=t=+=t=+=t=t=+=+=+=+=t=+=+=+=t=+=+=+=+
 0060 RO)
 0070 ESC
 0080 ON ESC THEN GOTO 4000
 0090 DIH T$I6],U«30],VH83,Vl«mV2*i:U],V3$[40],V4ttn],V5*[40J
 0100 DIH V6$[ll],V7$[8LV8$[40LV9$ni:i,X«3],H3$i:il],W4$niLN«8]
 0101 DIH Z5*M01.Mtt9]
 0110 PRINT
 0120 PRINT "HERE WE  THE TYPES OF METHOD INTERACTIONS:11
 0130 PRINT
 0140 PRINT *     1.   GENERATE A NEW METHOD"
 0150 PRINT '     2.   MODIFY AN EXISTING METHOD'
 0160 PRINT '     3.   DELETE AN EXISTING METHOD'
 0170 PRINT"     4.   DISPLAY AN EXISTING METHOD*
 0180 PRINT
 0189 ON ERR THEN GOTO 0191
 0190 INPUT "WHICH TYPE DO YOU WANT TO USE?  (1, 2, 3,  OR 4)  ",X
 0191 ON ERR THEN STOP
 0200 ON X THEN GOTO 0260, 1750, 3120, 3370
 0210 PRINT
 0220 PRINT "<7X7>";X;"IS NOT A VALID TYPE NUMBER."
 0230 GOTO 0110
 0240 REH   	
 0250 REH          GENERATE A NEW METHOD
 0260 PRINT
 0269 ON ERR THEN GOTO 0271
 0270 INPUT "WHAT SHOULD BE THE NUMBER FOR THE NEU METHOD?  ",T
 0271 ON ERR THEN STOP
 0280 IF T=INT(A8S(T)) THEN IF K=9999 THEN GOTO 0320
 0290 PRINT
 0300 PRINT "<7X7>"5T;"IS NOT A VALID METHOD NUMBER."
 0310 GOTO 0260
 0320 LET T$="GCOOOO'
 0330 LET T*[7-L£N(STR$(T)),6]=STR$(T)
 0340 ON ERR THEN GOTO 0360
 0350 RENAME T$,T$
 0360 ON ERR THEN STOP
G-fl-S   C4HH)-M-^HHHHH>-H-Y  A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  2
                        PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0370 IF SYS(7)O-48 THEN GOTO  0400
 0380 DELAY =1
 0390 GOTO 0340
 0400 IF SYS(7)0-9 THEN GOTO 0480
 0410 PRINT
 0420 PRINT "<7X7>THERE IS AN  EXISTING METHOD WITH THE NUMBER ";T$C3,6
t     1** *
 0430 PRINT "YOU MAY MODIFY METHOD  ";T$C3,6]5", OR YOU MAY DELETE IT AN
*     DTHEN"
 0440 PRINT"     GENERATE  A NEW METHOD USING ";T*t3,6];" AS THE METHOD
*      NUMBER.'
 0450 PRINT "     HOWEVER,  YOU  NAY  NOT GENERATE A SECOND METHOD WITH TH
*     E"
 0460 PRINT"     SANE METHOD NUMBER.'
 0470 GOTO 0110
 0480 OPEN FILEC4,0],T(,200
 0490 ON ESC THEN GOTO 0510
 0500 GOTO 0560
 0510 CLOSE FILEC4]
 0520 PRINT
 0530 PRINT "<7X7>METHOD ";T«3,6]?' HAS BEEN DELETED BECAUSE IT WAS I
•     NCOMPLETE."
 0540 DELETE T$
 0550 GOTO 4000
 0560 PRINT
 0570 ON ERR THEN GOTO 0590
 0580 INPUT "WHAT IS YOUR NAME? ",U$
 0581 ON ERR THEN STOP
 0582 LET Z5*=U$
 0583 GOSUB 4370
 0584 LET U*=Z5*
 0585 GOTO 0600
 0590 ON ERR THEN STOP
 0591 PRINT
 0592 PRINT "<7X7XJSE A SLASH  (/)  WHERE YOU WANT A COMMA."
 0593 GOTO 0560
 0600 PRINT
 0610 PRINT "HERE ARE THE TYPES OF  METHODS:"
 0620 PRINT
 0630 PRINT "     1.  INTERNAL  STANDARDS"
 0640 PRINT "     2.  PURGE AND TRAP"
 0650 PRINT '     3.  LIQUID/LIQUID EXTRACTION"
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               ooooooo            ooooooo

-------
CTl
      G-A-S  C-4HHHHKHHHHHHMT   A-U-HHHK-I-O-N   S-Y-S-T-E-M
      7/20/1979                                                      PAGE  3
                             PROGRAM LISTING FOR GCOi

       1234567891123456789212345678931234567894123456789512345678961234567897
         000000
0660 PRINT '     4.  DIRECT AQUEOUS INJECTION'
0670 PRINT
0679 ON ERR THEN GOTO 0681
0680 INPUT "WHICH TYPE DO YOU WANT TO USE?  (1,  2,  3,  OR 4)   ",N1
0681 ON ERR THEN STOP

0700 PRlSf"*80*"'8*11 ^ IF N1>0 N0* IF N1<5 TH0* G0™ 073°
0710 PRINT "<7X7>";N1!"IS NOT A VALID TYPE NUMBER."
0720 GOTO 0600
0730 PRINT
0740 PRINT 'HERE ARE THE TYPES OF RETENTION TIME CALCULATIONS:"
0750 PRINT
0760 PRINT '     1.  RELATIVE RETENTION TIME"
0770 PRINT "     2.  CAPACITY RATIO"
0780 PRINT
0789 ON ERR THEN GOTO 0791
0790 INPUT -WHICH TYPE DO YOU WANT TO USE?  (1 OR 2)   ",N2
0791 ON ERR THEN STOP
0800 PRINT
0810 IF N2=l THEN GOTO 0850
0820 IF N2=2 THEN GOTO 0880

0840 WoTsT^"'^"18 N°T A VALI° TYPE I*JMBER>"
0850 PRINT "WHAT IS THE IDENTIFIER FOR THE REFERENCE COMPOUND FOR"
0851 ON ERR THEN GOTO 0860
0852 INPUT "     RELATIVE RETENTION TIMES?  ",N$
0853 ON ERR THEN STOP
0854 LET Z5$=N$
0355 COSUB 4370
0856 LET N$=Z»
0857 GOTO 0890
0860 ON ERR THEN STOP
0861 PRINT
0862 PRINT "<7X7>USE A SLASH (/)  WHERE YOU WANT A COMMA."
0863 PRINT
0864 GOTO 0850
0880 ON ERR THEN GOTO 0882

                                    Tne'
      0883 LET X4=VAL(N$)
      0884 ON ERR THEN STOP
      0885 GOTO 0890
G-A-S   C-H-R-Q-H-A-T-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  4
                        PROGRAM LISTING FOR GCOI

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0886 ON ERR THEN STOP
 0887 PRINT
 0888 PRINT "<7X7>";N$5"  IS NOT A  VALID DEAD VOLUME TIME."
 0889 GOTO 0300
 0890 WRITE FILE[4,1LT*,U$,N1,N2,I«
 0900 GOTO 0910
 0910 LET 1=1
 0920 PRINT
 0930 PRINT "ENTER THE FOLLOWING COMPOUND  IDENTIFICATION INFORMATION."
 0940 PRINT "USE A SLASH (/) WHERE  YOU WANT A COMMA."
 0950 PRINT "TYPE 'END' AS AN IDENTIFIER TO TERMINATE THE LIST."
 0960 IF K=60 THEN GOTO 1010
 0970 PRINT
 1000 GOTO 1660
 1010 LET V3$="99999"
 1020 LET V4$="99999"
 1030 LET V5S="99999"
 1040 LET V6$="99999"
 1050 PRINT
 1060 ON ERR THEN GOTO 1080
 1070 INPUT "IDENTIFIER?   ",V$
 1071 ON ERR THEN STOP
 1072 LET Z5$=V$
 1073 GQSUB 4370
 1074 LET V$=Z5*
 1075 GOTO 1090
 1080 PRINT
 1082 PRINT "OXTXJSE A  SLASH  (/) WHERE YOU WANT A COMMA. '
 1083 GOTO 1050
 1090 IF V$="END" THEN GOTO  1660
 1099 ON ERR THEN GOTO 1101
 1100 INPUT "     NUMBER  OF  COMPOUNDS?  (1, 2, OR 3)  ",V
 1101 ON ERR THEN STOP
 1110 IF V=INT(ABS(V))  THEN  IF V>0 THEN IF V<4 THEN GOTO 1170
 1130 PRINT "<7X7>    "5V;" IS NOT A VALID NUMBER OF COMPOUNDS.
 1150 GOTO 1100
 1170 PRINT "     NAME OF "5
 1180 IF VO1 THEN PRINT  "FIRST ";
 1189 ON ERR THEN GOTO 1200
 1190 INPUT "COMPOUND? ",V1*
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               0000000            0000000

-------
G-fr-S   C^HMHf^HHJ-R-A-P-H-Y  A-U-HHHt-T-HHf   S-Y-S-T-E-H G-A-S   C-H-R-0-H-A-T-O-G-R-A-P-H-Y  A4J-T-0-M-A-T-I-0-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  5 7/20/1979                                                      PAGE  6
                       PROGRAM LISTING FOR GC01                                                PROGRAM LISTING FOR GC01
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1191 ON ERR THEN STOP
 1192 LET Z5$=V»
 1193 GOSUB 4370
 1194 LET V1$=Z5$
 1195 GOTO 1210
 1200 ON ERR THEN STOP
 1201 PRINT
 1202 PRINT "<7X7>     US£ A SLASH  (/) WHERE YOU WANT A COMMA."
 1204 GOTO 1170
 1210 ON ERR THEN GOTO 1230
 1220 INPUT •          CAS NUMBER?   ",V2$
 1230 ON ERR THEN STOP
 1240 IF LEN(V2$)=0 THEN GOTO  1320
 1250 LET «3$=V2$
 1260 GOSUB 4050
 1270 IF W»O"99999" THEN GOTO 1310
 1290 PRINT '<7X7>         "5V2$;" IS NOT A VALID CAS NUMBER. "
 1300 GOTO 1210
 1310 LET V2t=U3*
 1320 IF V<2 THEN GOTO 1620
 1330 ON ERR THEN GOTO 1350
 1340 INPUT "     NATE OF SECOND COMPOUND?  ",V3$
 1341 ON ERR THEN STOP
 1342 LET Z5$=V3f
 1343 GOSUB 4370
 1344 LET V3$=Z5$
 1345 GOTO 1360
 1350 ON ERR THEN STOP
 1351 PRINT
 1352 PRINT '<7X7>     USE A SLASH  (/> WHERE YOU WANT A COMMA. •
 1354 GOTO 1330
 1360 ON ERR THEN GOTO 1380
 1370 INPUT '          CAS NUMBER?   ",V4$
 1380 ON ERR THEN STOP
 1390 IF L£N(V4*)=0 THEN GOTO 1470
 1400 LET H3$=V4$
 1410 GOSUB 4050
 1420 IF W3*O'99999" THEN GOTO 1460
 1440 PRINT "<7X7>         ";V4$;' IS NOT A VALID CAS NUMBER."
 1450 GOTO 1360
 1460 LET V4ttJ3$
 1470 IF V<3 THEN GOTO 1620

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
1430 ON ERR THEN GOTO 1500
1490 INPUT "     NAME OF THIRD COMPOUND?  ",V5$
1491 ON ERR THEN STOP
1492 LET Z5*=V5*
1493 GOSUB 4370
1494 LET V5*=Z5$
1495 GOTO 1510
1500 ON ERR THEN STOP
1501 PRINT
1502 PRINT "<7X7>     USE  A SLASH £/) WHERE YOU WANT A COMMA."
1504 GOTO 1480
1510 ON ERR THEN GOTO 1530
1520 INPUT '          CAS NUMBER?  ",V6*
1530 ON ERR THEN STOP
1540 IF LEN(V6*)=0 THEN GOTO 1620
1550 LET W3$=V6*
1560 GOSUB 4050
1570 IF W3$O»99999' THEN GOTO  1610
1590 PRINT "<7X7>          ";V6$5" IS NOT A VALID CAS NUMBER."
1600 GOTO 1510
1610 LET V6$=U3$
1620 WRITE FILEC4,3*I-1],V*,V1$,V2*,V3$,V4$,V5*,V6$
1630 WRITE FILE[4,3*IL"99/99/99",",99999,99999,99999,99999,99999
1640 LET 1=1+1
1650 GOTO 0960
1660 CLOSE FILEW
1670 PRINT
1680 ON ERR THEN GOTO 1700
1690 INPUT "DO YOU WANT TO  DISPLAY THIS METHOD?  (Y OR N)  *,X$
1700 ON ERR THEN STOP
1710 IF X$n,l]="Y" THEN GOTO 3550
1720 GOTO 4000
1730 REM   	
1740 REM          MODIFY AN EXISTING METHOD
1750 PRINT
1759 ON ERR THEN GOTO 1761
1760 INPUT "WHICH METHOD DO YOU WANT TO MODIFY?  ",T
1761 ON ERR THEN STOP
1770 IF flBS(INT(T))=T THEN  IF K=9999 THEN GOTO 1810
1780 PRINT
1790 PRINT "<7X7>";T;"IS NOT A VALID METHOD NUMBER."
1800 GOTO 1750

1234567891123456789212345678931234567894123456789512345678961234567897
         0000000

-------
oo
G-A-S   C-H-*HHHK-0HHHH>-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  7
                        PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1810 LET T$='GCOOOO'
 1840 RENAME T$,T$
 1850 ON ERR THEN STOP
  1880 GOTO 1830

  1900
 1920

 1940
 1950
 1960
 1970
 1980
 1990
 2000
 2010
 2020
 2030

 2050
 2060
 2°70
*
 2080
                             195°
      PRINT "aX7>THERE  IS NO EXISTING METHOD WITH THE NUMBER 'JW3.6

               METHOD HAS BEEN MODIFIED.'
 2099
     PRINT
     ON ERR THEN GOTO 1990
     OPEN FILE[4,OLT$,200
     ON ERR THEN STOP
     GOTO 2020
     ON ERR THEN STOP
     DELAY  =1
     GOTO 1950
     PRINT
     PRINT  'HERE ARE THE TYPES OF METHOD MODIFICATION:"

     PRINT  '     1.  ADD AN IDENTIFIER"
     PRINT'     2.  DELETE ANIDENTIFIER-
     FiSL^    3-  MO W^ CO-ELUTING COMPOUND TO THE LIST FOR A
     N  lUtNllrltn
     PRINT"     4.  CHANGE RETENTION TIME DATA'
     nflNT
     ON ERR THEN GOTO 2101
2110 ON X THEN GOTO 2170,  2270,  2460,  2910
2120 PRINT
2130 fRJNT "<7X7>';X;"IS NOT A  VALID  TYPE NUMBER."
2140 GOTO 2020
2150 REM	
2160 REN     ADD ANOTHER IDENTIFIER
2170 NOESC
2171 GOSUB 4430

1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
G-A-S   C-H-R-0-M-A-T-O-G-R-A-P-H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  8
                        PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 2172 ESC
 2173 PRINT
 2174 PRINT 'ALL CONCENTRATION PATTERNS FOR METHOD  ";T$C3,63!' HAVE BEE
*     N DELETED.'
 2175 LET 1=1
 2180 READ FILE[4,3*I-1LV*
 2190 IF EOF(4) THEN GOTO 2220
 2200 LET 1=1+1
 2210 GOTO 2180
 2220 PRINT
 2230 PRINT 'ENTER THE COMPOUND IDENTIFICATION  INFORMATION FOR THE NEW
*     IDENTIFIER.'
 2240 GOTO 0940
 2250 REH   	
 2260 REN     DELETE AN IDENTIFIER
 2270 PRINT
 2280 ON ERR THEN GOTO 2300
 2290 INPUT 'WHICH IDENTIFIER DO YOU WANT  TO DELETE?  ',V7$
 2291 ON ERR THEN STOP
 2292 LET Z5$=V7$
 2293 GOSUB 4370
 2294 LET V7$=Z5f
 2295 GOTO 2310
 2300 ON ERR THEN STOP
 2301 PRINT
 2302 PRINT "<7X7>USE A SLASH (/) WHERE YOU WANT A COMMA.'
 2303 GOTO 2270
 2310 LET 1=1
 2320 READ FILEC4,3*I-1LV$
 2330 IF EOF(4) THEN GOTO 2370
 2340 IF V*=V7* THEN GOTO 2400
 2350 LET 1=1+1
 2360 GOTO 2320
 2370 PRINT
 2380 PRINT '<7X7>THERE IS NO IDENTIFIER  ";V7$J" IN METHOD ';T$t3,63;'
*
 2390 GOTO 3930
 2400 WRITE FILE[4,3*I-1L'99999', '99999","99999%'99999","99999",'9999
*     9','99999'
 2410 PRINT
 2420 PRINT "IDENTIFIER '!V7*;' HAS BEEN DELETED FROM METHOD "?T$t3,63
 2430 GOTO 3930

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
G-A-S   C-fHHHf-A-HHrfl-A-P-H-Y  A-U-HHHK-I-O-fl   S-Y-S-T-C-M
7/20/1979                                                      PAGE  9
                        PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 2440 REN   	
 2450 REH     ADD ANOTHER COMPOUND TO AN  IDENTIFIER
 2460 PRINT
 2470 ON ERR THEN GOTO 2490
 2480 INPUT 'WHICH IDENTIFIER DO  YOU WANT TO ADD TO?  *,V7$
 2481 ON ERR THEN STOP
 2482 LET Z5$=V7I
 2483 GOSUB 4370
 2484 LET V7*=Z5f
 2485 GOTO 2500
 2490 ON ERR THEN STOP
 2491 PRINT
 2492 PRINT "<7X7>USE A SLASH (/) WERE  YOU WANT A COMMA."
 2493 GOTO 2460
 2500 LET 1=1
 2510 READ FIl£[4,3«I-lJ,V*,Vl*,V2$,V3$,V4$,V5$,V6i
 2520 IF EOF(4) THEN GOTO 2560
 2530 IF V*=V7* THEN GOTO 2600
 2540 LET 1=1+1
 2550 GOTO 2510
 2560 PRINT
 2570 PRINT "<7X7>THERE IS NO IDENTIFIER ";V7$?" IN METHOD ";T$[3,6];B
*
 2580 PRINT 'NO IDENTIFIER HAS BEEN CHANGED."
 2590 GOTO 3930
 2600 IF V5*="99999" THEN GOTO 2640
 2610 PRINT
 2620 PRINT •<7X7>';V7$?' ALREADY MS THE LIMIT OF THREE CO-ELUTING CO
§     HPOUNDS."
 2630 GOTO 3930
 2640 PRINT
 2650 ON ERR THEN GOTO 2670
 2660 INPUT 'WHAT IS THE NAME OF  THE ADDITIONAL CO-ELUTING COMPOUND?  "
*     tV8$
 2661 ON ERR THEN STOP
 2662 LET Z5*=VB$
 2663 GOSUB 4370
 2664 LET V8$=Z»
 2665 GOTO 2680
 2670 ON ERR THEN STOP
 2671 PRINT
 2672 PRINT "OX7XJSE A SLASH (/) UHERE YOU KANT A COMMA."
G-A-S   C-H-R-KHf-A-T-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE 10
                        PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 2673 GOTO 2640
 2680 PRINT
 2690 PRINT "WHAT IS THE CAS NUMBER FOR "!V8$;
 2700 ON ERR THEN GOTO 2720
 2710 INPUT "?  ",V9*
 2720 ON ERR THEN STOP
 2730 IF LEN(V9*)=0 THEN GOTO  2810
 2740 LET H3$=V9$
 2750 GOSUB 4050
 2760 IF H3$O"99999" THEN GOTO 2800
 2770 PRINT
 2780 PRINT "<7X7>";V9*;" IS  NOT A VALID CAS NUMBER."
 2790 GOTO 2680
 2800 LET V9WJ3*
 2810 IF V3*O"99999" THEN GOTO 2850
 2820 LET V3$=V8$
 2830 LET V4$=V9$
 2840 GOTO 2870
 2850 LET V5$=V8*
 2860 LET V6$=V9$
 2870 WRITE FII£[4,3*I-l],V$,Vl$.V2$iV3*,V4$,V5$,V6$
 2880 GOTO 3930
IOTV ncn
2900 REM
2910 PR
2920 PR
2930 PR]
2940 PR]
2950 PR
NT
NT
NT
NT
NT
CHANGE RETENTION Tilt DATA

"HERE ARE THE TYPES OF RETENTION TIME CALCULATIONS:"

1. RELATIVE RETENTION TIME"
2. CAPACITY RATIO"
 2960 PRINT
 2969 ON ERR THEN GOTO 2971
 2970 INPUT "WHICH TYPE DO YOU WANT TO USE?  (1 OR 2)   ",N2
 2971 ON ERR THEN STOP
 2980 PRINT
 2990 IF N2=l THEN GOTO 3030
 3000 IF N2=2 THEN GOTO 3060
 3010 PRINT "<7X7>"?N2;"IS NOT A VALID TYPE NUMBER."
 3020 GOTO 2910
 3030 PRINT "WHAT IS THE IDENTIFIER FOR THE REFERENCE COMPOUND FOR"
 3031 ON ERR THEN GOTO 3040
 3032 INPUT "     RELATIVE RETENTION TIMES?  ",N*
 3033 ON ERR THEN STOP
 1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
                                                                 S-Y-S-T-E-fJ  G-ft-S   C-
                                                                     PAGE 11  7/20/1979
ro
o
G-d-S   C4HHHHK-(HHHH»-H-Y   A-HHHHHK-I-O-N
7/20/1979
                       PROGRAM LISTING FOR GC01

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 3034 LET I5$=N$
 3035 GOSUB 4370
 3036 LET N*=Z5*
 3037 GOTO 3070
 3040 ON ERR THEN STOP
 3041 PRINT
 3042 PRINT "OXTXJSE A SLASH ";N*;"  IS NOT A VALID DEAD VOLUME TIME."
 3069 GOTO 2980
 3070 READ FILE[4,1LT$,U$,N1
 3080 WRITE F!LEC4.n,T*,U*,Nl,N2,N$
 3090 GOTO 3930
 3100 REM   	
 3110 REM         DELETE AN EXISTING METHOD
 3120 PRINT
 3129 ON ERR THEN GOTO 3131
 3130 INPUT "WHICH HETHOD DO YOU WANT TO DELETE?  ",T
 3131 ON ERR THEN STOP
 3140 IF T=INT(ABS(T» THEN IF K=9999 THEN GOTO 3180
 3150 PRINT
 3160 PRINT '<7X7>";T;'IS NOT A VALID METHOD NUMBER. •
 3170 GOTO 3120
 3180 LET T*="GCOOOO"
 3190 LET m7-LEN(STR*(T»,6J=STRI(T>
 3200 ON ERR THEN GOTO 3220
 3210 RENAME T*,T*
 3220 ON ERR THEN STOP
 3230 IF SYS(7)O-48 THEN GOTO 3260
 3240 DELAY =1
 3250 GOTO 3200
 3260 IF SYS(7)=-9 THEN GOTO 3310
 3270 PRINT
          hR-0-M-A-THMJ-R-A-P-H-Y   A4FHHH1-T-I-0-N

                       PROGRAM LISTING FOR GC01
S-Y-S-T-E-H
    PAGE 12
                                                                               1234567891123456789212345678931234567894123456789512345678961234567897

                                                                              ^3280 PRINT "OX7>THERE IS NO EXISTING METHOD WITH THE NUMBER "JT$[3,6

                                                                               3290 PRINT "NO METHOD HAS BEEN DELETED."
                                                                               3300 GOTO 3950
                                                                               3310 NOESC
                                                                               3311 DELETE T$
                                                                               3312 GOSUB 4430
                                                                               3313 ESC
                                                                               3320 PRINT
                                                                                                                  a OF ITS CONCENTRATION PATTERNS H
3340 GOTO 3950
3350 REM
3360 REH
                                                                                                DISPLAY AN EXISTING METHOD
3379 ON ERR THEN GOTO 3381
3380 INPUT "WHAT METHOD DO YOU WANT TO DISPLAY?   ",T
3381 ON ERR THEN STOP
3390 IF T=INT(ABSm) THEN IF K=9999 THEN GOTO 3430
3400 PRINT
3410 PRINT "<7X7>";T!"IS NOT A VALID METHOD NUMBER."
3420 GOTO 3370
3430 LET T$="GCOOOO"
3440 LET T$[7-LEN(STR*{T)),6]=STR$(T)
3450 ON ERR THEN GOTO 3470
3460 RENAME TS.Tt
3470 ON ERR THEN STOP
3480 IF SYS(7)O-48 THEN GOTO 3510
3490 DELAY =1
3500 GOTO 3450
3510 IF SYS(7)=-9 THEN GOTO 3550
3520 PRINT
3530 PRINT "<7X7>THERE IS NO EXISTING METHOD WITH THE NUMBER "?T$[3,6

3540 GOTO 3950
3550 ON ERR THEN GOTO 3590
3560 OPEN FII£[4,01t»,200
3570 ON ERR THEN STOP
3580 GOTO 3620
3590 ON ERR THEN STOP
3600 DELAY =1
3610 GOTO 3550
       1234567891123456789212345678931234567894123456789512345678961234567897  1234567891123456789212345678931234567894123456789512345678961234567897
                0000000           0000000

-------
      G-A-S   C4HHHHK-OHHHHHi-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-H G-A-S   C-H-R-0-H-A-T-O-G-fi-A-P-H-y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
      7/20/1979                                                     PAGE 13 7/20/1979                                                     PAGE 14
                             PROGRAM LISTING FOR GC01                                               PROGRAM LISTING FOR GC01
       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
       3620 PRINT
       3630 READ FILE£4,1],T$,UJ,N1,N2,I«
       3635 PRINT
       3636 PRINT
       MggjT  TABC24);'M-£-T-H-0-D   R-E-P-0-R-T'

       3640 PRINT "ANALYST:  '5U$; TAB(53)I'METHOD NUMBER:  '!T«3,6]
       3660 PRINT 'TYPE OF METHOD:  '!
       3670 ON Nl THEN GOTO 3680, 3700, 3720, 3740
       3680 PRINT 'INTERNAL STANDARDS*
       3690 GOTO 3750
       3700 PRINT 'PURGE AND TRAP "
       3710 GOTO 3750
       3720 PRINT 'LIQUID/LIQUID EXTRACTION'
       3730 GOTO 3750
       3740 PRINT 'DIRECT AQUEOUS INJECTION'
       3750 ON N2 THEN GOTO 3760, 3780
       3760 PRINT 'IDENTIFIER FOR RELATIVE RETENTION TIME REFERENCE PEAK:  ";
|\J    *     Nf
-•     3770 GOTO 3790
       3780 PRINT 'DEAD VOLUME TIME FOR CAPACITY RATIOS:  'JN*J" SECONDS"
       3790 PRINT
       3800 PRINT •    IDENTIFIER               NAME OF COMPOUND
      *        CAS NUMBER*
       3810 PRINT '    ^ ---

       3820LET~I=1
       3830 LET J=0
       3840 READ FILE[4,3tI-U,W,Vl$,V2S,V3$,V4*,V5f,V6$
       3850 IF EOF(4) THEN GOTO 3930
       3860 IF V$='99999' THEN GOTO 3910
       3870 LET J=J*1
       3880
                    ttlHIIIIH*.J,V<,Vl$,V2$
      3890  IF V3*O"99999' THEN PRINT USING  *
      »      iiimniiiiiiiiiiiiiiimii  ************, w,w
      3900  IF V5$O"9999?* THEN PRINT USING  '                  ttfttttfltittt
      »      •Hlllllllllllimilllllllll  *«**««**•, V5*,V6$

      3920  GOTO 3840
      3930  CLOSE FILEI43
      3940  ON ESC THEN GOTO 4000
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 3950 PRINT
 3955 PRINT
 3960 ON ERR THEN GOTO 3980
 3970 INPUT 'DO YOU WANT TO DEAL FURTHER WITH ANY METHOD?   (Y OR N)  ',
*     X*
 3980 ON ERR THEN STOP
 3990 IF X*n,n=BY'  THEN GOTO 0110
 4000 CLOSE
 4010NOESC
 4020 CHAIN "GCOO* THEN GOTO 0100
 4040 Rffl
 4050 REK   tt-MMHMI IH Mil IH-4HHI mmHHI ItHHH+MHHIHtH-
 4060 REM          SUBROUTINE TO CHECK VALIDITY OF CAS NUMBERS
 4070 IF LEK(H3*)=H  THEN GOTO 4110
 4080 LET H4$=* ',«3$
 4090 LET W3$=H4$
 4100 GOTO 4070
 4110 IF H3tf7,7]='-" THEN  IF H3ttlO,10]='-" THEN GOTO 4130
 4120 GOTO 4310
 4130 LET 13=0
 4140 FOR 14=1 TO 6
 4150   IF H3*[I4,I4]O" " THEN GOTO 4170
 4160 NEXT 14
 4170 FOR 12=14 TO 6
 4180   ON ERR THEN GOTO 4310
 4190   LET I3=I3+VAL
-------
           .MHHHHH-I-O-H   S-Y-S-T-E-H  G-A-S   C4HHHHK-(HHHH>-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-H
      7/20/1979                                                     pflGE  15  7/20/1979                                                      PAGE 16
                             PROGRAM LISTING FOR GC01                                                SYMBOL TABLE FOR GC01

       1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
                0000000
       4360 REN   	  SUBROUTINE TO CHANGE SLASHES TO COMMAS                0100  4020
       4370 LET Z5=POS(Z5$,VM)                                              0110  0230  0470  3990
       4380 IF Z5=0 THEN RETURN                                                0191  0189
       4390 LET 25«Z5,Z5]=V                                                 0260  0200  0310
       4400 GOTO 4370                                                         0271  0269
       4405 REN                                                               0320  0280
       4410 REN   n n 111111 n 1111111111 m 11111111 H 11 H u H t++ H 111 n m+f+   0340  0390
       #31 PI! *,* „ . J5ROUTINE T0 fl0^ CONCENTRATION  PATTERNS            0360  0340
       4430 LET A6$=T$,"000"                                                   0400  0370
       4440 FOR 1=1 TO 26                                                      0480  0400
       4450   LET A6ttlO-LEN(STRt(I)),93=STR$U)                                0510  0490
       4460   ON m THEN GOTO 4480                                            0560  0500  0593
       4470   DELETE A6*                                                      0590  0570
       4480   ON ERR THEN STOP                                                 0600  0585  0720
       4490 NEXT I                                                            0681  0679
       4500 RETURN                                                            0730  0690  0840
                                                                              0791  0789
                                                                              0800  0889
ro                                                                            0850  0810  0864
M                                                                            0860  0851
                                                                              0880  0820
                                                                              0882  0880
                                                                              0886  0882
                                                                              0890  0857  0885
                                                                              0910  0900
                                                                              0940  2240
                                                                              0960  1650
                                                                              1010  0960
                                                                              1050  1083
                                                                              1080  1060
                                                                              1090  1075
                                                                              1100  1150
                                                                              1101  1099
                                                                              1170  1110  1204
                                                                              1200  1189
                                                                              1210  1195  1300
                                                                              1230  1210
                                                                              1310  1270
                                                                              1320  1240
                                                                              1330  1354
                                                                              1350  1330
                                                                              1360  1345  1450
                                                                              1380  1360
       1234W7891123456789212345678931234567894123456789512345678961234567897   1460  1420
               0         0        0         0         0         0         0   1470  1390

-------
     G-A-S   C-H-R-(HM-T-0-G-«-A-f-H-y   A-U-HH1-A-T-I-0-N   S-Y-S-T-E-H  3-A-S   C-H-R-(Hf-A-T-(H>-R-A-P-H-Y   A-U-THHHK-I-O-N   S-Y-S-T-E-H
     7/20/1979                                                      PAGE 17  7/20/1979                                                      PAGE 18
                             SYMBOL TABLE FOR GC01                                                   SYMBOL TABLE FOR GC01

     SYMBOL    REFERENCES                                                    SYMBOL    REFERENCES
      1480  1504                                                             3040  3031
      1500  1480                                                             3060  3000
      1510  1495  1600                                                       3062  3060
      1530  1510                                                             3066  3062
      1610  1570                                                             3070  3037   3065
      1620  1320  1470  1540                                                 3120  0200   3170
      1660  1000  1090                                                       3131  3129
      1700  1680                                                             3180  3140
      1750  0200  1800                                                       3200  3250
      1761  1759                                                             3220  3200
      1810  1770                                                             3260  3230
      1830  1880                                                             3310  3260
      1850  1830                                                             3370  0200   3420
      1890  1860                                                             3381  3379
      1950  1890  2010                                                       3430  3390
      1990  1950                                                             3450  3500
      2020  1980  2140                                                       3470  3450
      2101  2099                                                              3510  3480
^    2170  2110                                                             3550   1710   3510  3610
c3    2180  2210                                                              3590  3550
      2220  2190                                                              3620  3580
      2270  2110  2303                                                        3680  3670
      2300  2280                                                              3700  3670
      2310  2295                                                              3720  3670
      2320  2360                                                              3740 3670
      2370  2330                                                              3750 3690  3710  3730
      2400  2340                                                              3760  3750
      2460  2110  2493                                                        3780  3750
      2490  2470                                                              3790 3770
      2500  2485                                                              3840  3920
      2510  2550                                                             3910  3860
      2560  2520                                                             3930  2390   2430  2590  2630  2880  3090 3850
      2600  2530                                                             3950   1930   3300  3340  3540
      2640  2600  2673                                                        3980  3960
      2670  2650                                                             4000  0080   0550  1720  3940
      2680  2665  2790                                                       4050  1260   1410  1560  2750
      2720  2700                                                             4070  4100
      2800  2760                                                             4110  4070
      2810  2730                                                              4130  4110
      2850  2810                                                              4170  4150
      2870  2840                                                             4310  4120   4180  4230  4270  4280
      2910  2110  3020                                                       4370  0583   0855  1073  1193  1343  1493 2293  2483  2663  3035
      2971  2969                                                                   4400
      2980  3069                                                             4430  2171   3312
      3030  2990  3044                                                       4480  4460

-------
?±l^"H~R~(HI~A"T"{HH?~fi~P"H"Y   fl-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M  c-A-S   C-H-R-0-H-A-T-O-G-R-A-P-ff-Y   A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                       PAGE 19  7/20/1979                                                       PAGE 20
                        SYMBOL TA8LE FOR GC01                                                    SYMBOL TABLE FOR 6C01

SYMBOL    REFERENCES                                                     SYMBOL    REFERENCES
A6* 0101
FLU 0480
2510
I


12
13
14
J
N*

Nl
N2
0910
2350
4450
4170
4130
4140
3830
0100
3036
0680
0790
4430
0510
2870
0960
2400
4490
4190
4190
4150
3870
0852
3061
0690
0810
4450
0890
3070
1620
2500

4210
4240
4160
3880
0854
3063
0710
0820
4470
1620
3080
1630
2510

4220
4280
4170

0856
3068
0890
0830
1630
3560
1640
2540

4240



0881
3080
3070
0890
1660
3630
2175
2870

4260



0883
3630
3080
2970
1960
3840
2180
3820





0888
3760
3630
2990
2180
3930
2200
3840





0890
3780
3670
3000
2320
2310
3910





3032


3010
2400
2320
4440





3034


3080
X* 0100
X4 0883
X5 3063
Z5 4370
Z5$ 0101
1344
3036







1690
4380
0582
1492
4370







1710 3970
4390
0584 0854
1494 2292
4390







3990

0856 1072 1074 1192 1194 1342
2294 2482 2484 2662 2664 3034








       3630  3750
 T     0270  0280  0300  0330  1760  1770  1790  1820  3130  3140
       3160  3190  3380  3390  3410  3440
 Tf    0090  0320  0330  0350  0420  0430  0440  0480  0530  0540
       0890  1810  1820  1840  1910  1960  2174  2380  2420  2570
       3070  3080  3180  3190  3210  3280  3311  3330  3430  3440
       3460  3530  3560  3630  3640  4430
 I*    00900580058205840890  3070  308036303640
 V     1100  1110  1130  1180  1320  1470
 V*    0090  1070  1072  1074  1090  1620  2180  2320  2340  2510
       2530  2870  3840  3860  3880
 Vl$   0090  1190  1192  1194  1620  2510  2870  3840  3880
 V2$   0090  1220  1240  1250  1290  1310  1620  2510  2870  3840
       3880
 V3$   0090  1010  1340  1342  1344  1620  2510  2810  2820  2870
       3840  3890
 V4$   0090  1020  1370  1390  1400  1440  1460  1620  2510  2830
       2870  3840  3890
 V5*   0090  1030  1490  1492  1494  1620  2510  2600  2850  2870
       3840  3900
 V6$   0100  1040  1520  1540  1550  1590  1610  1620  2510  2860
       2870  3840  3900
 W$   0100  2290  2292  2294  2340  2380  2420  2480  2482  2484
       2530  2570  2620
 V8$   0100  2660  2662  2664  2690  2820  2850
 V9$   0100  2710  2730  2740  2780  2800  2830  2860
 U3$   0100  1250  1270  1310  1400  1420  1460  1550  1570  1610
       2740  2760  2800  4070  4080  4090  4110  4150  4190  4240
       4280  4320
 U4$   0100  4080  4090
 X     0190  0200  0220  2100  2110  2130

-------
                                  SECTION 4

               PROGRAM GC02 - CONCENTRATION PATTERN  INTERACTION


    GC02 is the program which creates, deletes, displays, and  lists  the
names of concentration patterns.  It is entered by chaining from the master
control program, GCOO, and it returns control to that program  if the escape
key is pressed.

    The functions of this program are relatively simple.  It first gives  the
user the choice of the four possible actions and then branches to the
appropriate routine.

    To create a concentration pattern file, the program  loops  through  the
method file and asks the user for the prepared concentration for each
identifier.  It places these concentrations in the concentration pattern
file named by the user.

    To delete an existing pattern, the program simply asks the user  for the
name of the pattern and deletes that file.

    To display an existing pattern, the program loops through  the method
file and the concentration pattern file simultaneously and prints the
identifiers and their associated concentrations.

    To list the names of the existing concentration patterns, the program
checks each of the 26 possible concentration pattern file names to see if
such a file exists.  It prints the names of those which do exist.

    At the end of this program, it chains back to GCOO.
                                      25

-------
C GCOO  \*<-(ENTER 0002)
Figure 4. Flowchart of Program GC02.
                 26

-------
                TABLE 3.  SYMBOL DEFINITIONS FOR PROGRAM GC02
A5       the prepared concentration input by the user
A6$      the name of the concentration pattern file
A7       the position of A8$ in A9$
A8$      the single letter name of a concentration pattern
A9$      the alphabet
I        the control variable for loops
12       a counter for the number of concentration patterns associated with
         a method
T$       the name of the method file
V$       an identifier from the method file
X        the user's answer to multiple choice questions
X$       the user's answer to Y or N questions
                                     27

-------
ro
CO
G-A-S   C4HHHHK-0-G-R-A-P-H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  1
                        PROGRAM LISTING FOR GC02

 1234567891 123456789212345678931234567894123456789512345678961234567897
          0000000
 0010 REH   +=+=+=f=+=*=+=+=+=+=+-=+=t=+=+=+=+=+=t=+=+=f=t=t=-i-=t=+=+=t=t
 0020 REM   +   GAS CHROMATOGRAPHY AUTOMATION SYSTEM                  +
 0030 REM   +   PROGRAM GC02,  CONCENTRATION PATTERN INTERACTION       +
 0040 REM   *   BY:  J. KOPKE (SMORCC),  MARCH 23,  1979                +
 0050 REM   +   MOST RECENT REVISION:   MAY 18,  1979                   +
 OO&'l  t-il   +=+=+=t=+=4=+=t=+=+=*='f=+=+=+=+=+=+=+=-»-=+rt=+=f=tr+r+r+=+=+
 0070 fi£M
 0080 ON ESC THEN GOTO 1830
 0090 ESC
 0100 DIM A6$m,A8f[lLA9«263,T$C6LV$[8],X«3]
 0110 LET A9*="ABCDEFGHIJKLMNOPQRSTUVHXYZ"
 0120 READ FILE[4,1],T$
 0130 REM   - ___ --

      FWNT
 0160 PRINT "HERE ARE THE TYPES OF CONCENTRATION PATTERN INTERACTION FO
*     R METHOD "5T$[3,6];":'
 0170 PRINT
 0180 PRINT "     1.  CREATE A NEW CONCENTRATION PATTERN"
 0190 PRINT "     2.  DELETE AN EXISTING PATTERN"
 0200 PRINT "     3.  DISPLAY AN EXISTING PATTERN"

 0220 PRINT "     4>  LIST ^ EXISTING PATTERNS FOR "f™00 "5T$[3,6J
 0230 ON ERR THEN GOTO 0250
 0260 IF X=INT(X) THEN IF XX) THEN IF X<5 THEN GOTO 0300
 0270 PRINT
 0280 PRINT o"OX7>";X;"IS NOT A VALID TYPE NUMBER."

 0300 ON X THEN GOTO 0330,  0820, 1050,  1530
 0310 REH   ---
 0320 REH          CREATE A NEU CONCENTRATION  PATTERN FILE
 0330 PRINT
 0340 ON ERR THEN GOTO 0360
 0350 INPUT "WHAT SHOULD BE THE LETTER NAME FOR THE NEW PATTERN?  (A, B
*     ,  C, . .  . ,  OR Z)  ",A8*
 0360 ON ERR THEN STOP
 0370 LET A7=POS(A9$,A8$,1)
 0380 IF A7OO  THEN GOTO 0420
 0390 PRINT
 0400 PRINT "<7X7>";A8$;"  IS NOT A  VALID LETTER."
G-A-S   C4HHHHH-0-G-R-A-P-H-Y   A-U-T-G-M-A-T-I-O-N   S-Y-S-T-E-fl
7/20/1979                                                      PAGE  2
                        PROGRAM LISTING FOR GC02

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0410 GOTO 0330
 0420 LET A6$=T$,"000'
 0430 LET A6$[10-LEN(STR$(A7)),9]=STR$(A7)
 0440 ON ERR THEN GOTO 0460
 0450 RENAME A6$,A6$
 0460 ON ERR THEN STOP
 0470 IF SYS(7J=-10 THEN GOTO 0510
 0480 PRINT
 0490 PRINT '<7X7>THERE IS ALREADY A PATTERN NAMED  '";A8$;"' FOR METHO
*     D "?T$[3,6J5V
 0500 GOTO 0330
 0510 OPEN FILEC7,0],A6$,4
 0520 ON ESC THEN GOTO 0540
 0530 GOTO 0590
 0540 CLOSE FILEC7]
 0550 DELETE A6$
 0560 PRINT
 0570 PRINT "<7X7>PATTERN "SAS*;"'  HAS BEEN DELETED BECAUSE IT HAS IN
*     COMPLETE."
 0580 GOTO 1860
 0590 CLOSE FILEC4]
 0600 OPEN FILEC4,0],T*,200
 0602 PRINT
 0604 PRINT 'HERE ARE THE ALLOWABLE UNITS OF CONCENTRATION:"
 0606 PRINT
 0608 PRINT "     1.  NANOGRAMS PER MICROLITER"
 0610 PRINT "     2.  MICROGRAMS PER  LITER"
 0612 PRINT
 0614 ON ERR THEN GOTO 0618
 0616 INPUT "WHICH UNIT DO YOU WANT TO USE?  (1 OR 2)  ",X
 0618 ON ERR THEN STOP
 0620 IF X=INT(X) THEN IF X>0 THEN IF X<3 THEN GOTO 0630
 0622 PRINT
 0624 PRINT "<7X7>";X;"IS NOT A VALID UNIT  NUMBER."
 0626 GOTO 0602
 0630 PRINT
 0640 FOR 1=1 TO 60
 0650   READ FILEC4,3*1-13,V*
 0660   IF EOF(4) THEN GOTO 0770
 0670   IF V$O"99999" THEN GOTO 0700
 0680   LET A5=9.99999E-07
 0690   GOTO 0750
 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000           0000000

-------
      G-A-S   MHHHHhHHHHHHHT  A-U-T-0-M-A-T-I-O-N
      7/20/1979
                             PROGRAM LISTING FOR GC02
ro
to
                                                           S-Y-S-T-E-M G-A-S   C-H-R-0-ff-A-T-O-G-R-A-f-H-y   A-U-HHHK-I-O-N  S-Y-S-T-E-M
                                                               PAGE  3 7/20/1979                                                      PAGE  4
                                                                                               PROGRAM LISTING FOR GC02
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0700   IF 1=1  THEN PRINT  "CONCENTRATION OF '5
 0710   PRINT  TAB(17);V$5"?"5 TAB(28)5
 0720   ON ERR  THEN GOTO 0740
 0730   INPUT ",A5
 0740   ON ERR  THEN STOP
 0741   IF A5>0 THEN  GOTO  0745
 0742   PRINT "C7X7>";A5;"IS NOT A VALID CONCENTRATION VALUE."
 0743   GOTO 0700
 0745   IF X=i  THEN LET A5=1000*A5
 0750   WRITE FILEt7,IJ,A5
 0760 NEXT I
 0770 CLOSE FILEE71
 0780 ON ESC THEN GOTO 1830
 0790 GOTO 1780
 0800 REM   ----
 0810 REN          DELETE  A CONCENTRATION PATTERN FILE
 0820 PRINT
 0830 ON ERR THEN GOTO 0850
 0840 INPUT "WHAT IS  THE NAME OF THE PATTERN  TO BE DELETED?  (A, B, C,
*     . . . , OR 7)  ",A8$
 0850 ON ERR THEN STOP
 0860 LET A7=POS(A9$,A8$,1)
 0870 IF A7OO  THEN GOTO 0910
 0880 PRINT
 0890 PRINT "aX7>"?AW;" IS  NOT A  VALID LETTER."
 0900 GOTO 0820
 0910 LET A6$=T«, "000"
 0920 LET A6$tlO-LEN(STR$(A7)),9]=STR$(A7)
 0930 ON ERR THEN GOTO 0985
 0940 DELETE A6*
 0950 ON ERR THEN STOP
 0960 PRINT
 0970 PRINT "PATTERN  ";A8$?"' HAS BEEN DELETED."
 0980 GOTO 1780
 0985 ON ERR THEN STOP
 0990 PRINT
 1020 GOTO 1780
 1030 REN
 1040 REH
 1050 PRINT
                         DISPLAY A CONCENTRATION PATTERN
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1060 ON ERR THEN GOTO 1080
 1070 INPUT "WHAT IS THE NAME OF THE PATTERN TO BE DISPLAYED?  (A, B, C
>     , . . .  , OR Z)  SAW
 1080 ON ERR THEN STOP
 1090 LET A7=POSCA9$,A8$,1)
 1100 IF A7OO THEN GOTO 1140
 1110 PRINT
 1120 PRINT "<7X7>'"5A8$;"' IS NOT A VALID LETTER."
 1130 GOTO 1050
 1140 LET A6*=T$,"000"
 1150 LET A6«10-LEN(STR$(A7)),9]=STR$(A7)
 1160 ON ERR THEN GOTO 1180
 1170 RENAME A6$,A6$
 1180 ON ERR THEN STOP
 1190 IF SYS(7J=-9 THEN GOTO 1230
 1200 PRINT
 1210 PRINT "<7X7>THERE IS NO EXISTING PATTERN NflflED  '"!A8*J"."
 1220 GOTO 1050
 1230 ON ERR THEN GOTO 1270
 1240 OPEN FILEI7,0],A6$,4
 1250 ON ERR THEN STOP
 1260 GOTO 1300
 1270 ON ERR THEN STOP
 1280 DELAY =1
 1290 GOTO 1230
 1300 CLOSE FILEC4]
 1310 OPEN FrLEC4,0],T*,200
 1320 PRINT
 1330 PRINT
 1340 PAGE =74
 1350 PRINT  TAB(9);"C-0-N-C-E-N-T-fi-A-T-I-0-N   P-A-T-T-E-R-N   R-E-P-
*     0-ft-T"
 1360 PRINT "CONCENTRATION PATTERN:   ";A8»5  TAB(53)5"METHOD NUMBER:  "!
*     T$[3,63
 1370 PRINT
 1380 PRINT "     IDENTIFIER     CONCENTRATION"
 1390 PRINT "	"
 1400 FOR 1=1 TO 60
 1410   READ FIL£[4,3*I-1],V$
 1420   IF EOF(4) THEN GOTO 1470
 1430   IF V$="99999" THEN GOTO 1460
 1440   READ FILEC7.H.A5
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               ooooooo            ooooooo

-------
 G-A-S   CHt*HHHKHHJ-R-A-P-tt-Y  A-U-T-Q-H-A-T-I-O-N   S-Y-S-T-E-H  W^   C-H-fiHHf-fl-T-0-G-R-A-P-H-Y   A-U-HHHK-I-O-N  S-Y-S-T-E-N
 7/20/1979                                                      p«3E 5  7/20/1979                                                     PAGE  6
                        PROGRAM LISTING FOR GC02                                               PROGRAM LISTING FOR GC02

 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000
 1450   PRINT USING •      ttitttti        tttt.HT.Vt.A5              1850 ON ERR THEN STOP
 1460 NEXT I                                                            I860 NOESC
 1470 PRINT                                                             1870 CWIN 'GCOO'
 1480 PRINT
 1490 CLOSE FILEm
 1500 GOTO 1780
 1510 REH   - _ -
 1520 REN          LIST EXTANT CONCENTRATION PATTERN FILES
 1530 PRINT
 1540 PRINT
 1550 PRINT  TflB(8}?"CHHK-EHf-T-R-A-T-I-(HI   P-A-T-T-£-R-fl   L-I-S-
*     T"
 1560 PAGE =72

         lCT1n<)N PflTTERMS FOR NETHOD
 1590 LET 12=0
 1600 FOR 1=1 TO 2&
 1610   LET A6$[10-LEN(STR${IM,9]=STR$U)
 1620   ON ERR THEN GOTO 1640
 1630   RENAME A6$.A6$
 1640   ON ERR THEN STOP
 1650   IF SYS(7)O-9 THEN GOTO 1720
 1660   LET 12=12+1
 1670   IF 1201 THEN PRINT  ', '?
 1680   IF 12011 THEN GOTO  1710
 1690   PRINT
 1700   PRINT '     '?
 1710   PRINT A9$[I,I];
 1720 NEXT I
 1730 IF 12=0 THEN PRINT "NONE"
 1740 PRINT
 1750 PRINT
 1760 FEN
 1770 REN          URAP-4F PROCEDURE
 1780 PRINT
 1790 ON ERR THEN GOTO 1810
 1800 INPUT 'DO YOU WANT TO DEAL FURTHER WITH ANY CONCENTRATION PATTERN
«     ?  (Y OR N)  ",X*
 1810 ON ERR THEN STOP
 1820 IF X*[1,1]='V  THEN GOTO 0150
 1830 ON ERR THEN GOTO 1850
 1840 CLOSE FIL£[7]

 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000           0000000

-------
G-A-S   C4HHHHK-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-Q-N   S-Y-S-T-E-M G-A-S   C-H-fl-(HHK-0-
-------
                                  SECTION 5

                PROGRAM GC03 - INTERNAL STANDARDS CALIBRATION
    The internal standards calibration method is a planned future
enhancement of the GCAS, but it has not been implemented in Version I.
                                    32

-------
      G-A-S   C-H-R-CHHi-T-O-6-R-A-P-H-Y   A-U-T-O-M-A-T-I-0-N   S-Y-S-T-€-M G-A-S   C-H-R-0-M-A-T-O-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-EH1
      7/20/1979                                                       PAGE  1 7/20/1979                                                       PAGE  2
                              PROGRflH LISTING FOR GC03                                                SYMBOL TABLE FOR GC03

       1234567891123456789212345678931234567894123456789512345678961234567897 SYMBOL    REFERENCES
                0000000
       0010 REH   +=+=+=*=+5^=+c+=+s+=+=+=t=t=t=+=+=+=+=+=+=t=-(of=+=f=+=+=+=t  0120  0080
       0020 REM   +   GAS CmOMATOGRAPHY AUTOMATION SYSTEM                  +
       0030 REH   +   PROGRAH GC03.  INTERNAL STANDARDS CALIBRATION          t
       0040 REN   +   BY:  J. KOPKE (SUORCC), JANUARY 10,  1979              +
       0045 REH   +   HOST RECENT REVISION:  MARCH 21, 1979                 +
       0050 REM   +c+=t=+=f=+=+=+=+=+=+c*=*=+=+=+=+=f=+=+=+=+=+=*=4=+=+=+=+=+
       0060 REM
       0070 ESC
       0080 ON ESC THEN GOTO 0120
       0090 PRINT
       0110 PRINT •<7X7>INTERNAL STANDARDS CALIBRATION IS NOT OPERATIONAL AT
      *      THIS TIME.'
       0120NOESC
       0130 CHAIN "GCOO"
CO
OJ
       1234567891123456789712345678931234567894123456789512345678961234567897
                0000000

-------
                                   SECTION 6

                   PROGRAM GC04 - PURGE AND TRAP CALIBRATION


     GC04 is the program which performs external standards calibration for
 the purge and trap method.   It is entered by chaining from the master
 control program, GCOO, and  it chains back to that program when it has been
 completed or when the escape key is pressed.

     The first task of GC04  is to flag the compounds to be calibrated.  Array
 F is a one-dimensional array of flags, as shown in Figure 5.  The ntn
 identifier in array F corresponds to the nth  identifier in the method
 file.   A "1" in array F indicates that the corresponding identifier is to be
 calibrated;  a zero implies  the opposite.   The user is asked if all of the
 compounds are to be calibrated.   If so,  all  of the flags in array F are set
 to  1.   If not all  of the identifiers are to be calibrated, the user is asked
 about  each identifier separately, and only the appropriate positions in
 array  F are  set to 1.

     Next,  GC04 asks for the  injection ID for  a standard,  The program checks
 whether the  ID is  reasonable  and whether  the  data  file exists.   It then
 opens  the injection data file and checks  the  data  file useability flag in
 the  first  record to see if the data  file  can  be used.   It  also looks for any
 error  messages in  the injection  data file and displays them in case they are
 important  to the user.

     GC04  then  asks  the  user  for  the  concentration  pattern  and opens the
 concentration  pattern file.   For each flagged identifier,  the program
 searches  the injection  data  file for the  peak area and the concentration
 pattern  file for the  prepared  concentrations.   These  data  elements are
 placed  in  the  array G,  as shown  in Figure 5.   Each row of  array G contains
 calibration  data corresponding to one identifier.   Odd numbered columns
 contain prepared concentrations,  and even numbered columns contain peak
 areas.   If the  injection data  file does not have a peak  area  for  one of  the
 identifiers, the program refuses  to  use that  data  file and asks for  another.
 The  injection  ID for  each good data  file  is concatenated to  the superstring
 1$.

    The program  continues to ask  for more calibration  standards until  the
 user types "END" or until the  limit  of 15  is  reached.  Then  it  gives  the
user the choice  of  linear regression, quadratic regression,  linear
 interpolation, and  linear regression  forced through the origin.   The  program
requires at  least three standards for  linear  regression, since  three
 standards are necessary to confirm that the curve  is linear.  Similarly, at


                                     34

-------
least four standards are required for quadratic regression,  since  four  are
necessary to confirm that the curve is parabolic.

    The program then branches to one of three curve fitting  routines.   If
the user has selected linear or quadratic regression, the program  branches
to the normal regression routine.  This least squares regression algorithm
is documented in great detail in Statistical Methods for Business  Decisions
by Charles Clark and Lawrence Schfcade (South-Western Publishing Company,
Cincinnati, Ohio, 1969).

    If the user has selected linear interpolation, the program simply puts
the calibration standards into ascending order by peak area  and writes  them
into the method file.  Array G2, shown in Figure 5, is used  to hold  one  row
of array G simply so that it can be placed into the method file by a MAT
WRITE FILE statement.

    If the user has selected linear regression forced through the  origin,
the program calculates the equation of a line in the form y=bx, where b  is
determined by the formula:
         ,  _    ^(Signal • Concentration)	
                         ^(Signal*)

    For all three types of curve fitting, this program also calculates  a
"fitting error" which is actually a percent, relative, standard error of
estimate, calculated by the formula:

                          lonw  I«(Known Conc' ~ Calculated Cone.)
    Fitting Error =           v ~         Number of Standards - 2
                                        Mean Concentration
    When the regression calculations are complete, the calibration data
items are written into the method file, and the program chains back to  GCOO.
                                    35

-------
                TABLE 4.  SYMBOL DEFINITIONS  FOR  PROGRAM  GC04.
A6$      the name of a concentration pattern  file
A7       the position of A8$  in A9$
A8$      the name of a concentration pattern
A9$      the alphabet
A{)      an array used in regression calculations
B        the retention time of a compound
C        the peak area of a compound
D        a holding variable used in a sorting process
D2       a holding variable used in a sorting process
D2$      the injection ID number
D3       a holding variable used in a sorting process
D3$      the name of the data file
D4$      the date of calibration
F        the number of identifiers in the method
F()      the array of flags used to indicate which  identifiers are to be
         calibrated
G$       an identifier read from the data file
62()     an array consisiting of one row from array G
G()      the array of calibration information {concentrations and peak  areas)
H$       the peak type
I        the control variable for several loops
1$       the superstring of injection IDs for the calibration standards
                                     36

-------
                              TABLE 4.  (continued)
 12$       the  superstring  of  injection  IDs  in  order for linear interpolation
          purposes
 12        the  control  variable for  several  loops
 13        the  control  variable for  several  loops
 14        the  control  variable for  several  loops
 15        a counter for the number  of calibration standards
 16        the  control  variable for  several  loops
 0         the  data file useability  flag
 03        the  fitting  error
 04        the  calculated concentration of a  standard
 05        the  sum of the squares of the differences between  the  prepared  and
          calculated concentrations of standards
 06        the  sum of the concentrations of the  standards
 07        used  in calculating  linear regression forced  through the origin
 08        used  in calculating  linear regression forced  through the origin
 09        used  in calculating  linear regression forced  through the origin
 P9        the  record number of  the  first record in  a data file which
          describes a  peak
 R2        the  coefficient of the linear term of a regression  equation  in  a
          linear regression forced  through the  origin
 R()       an array used in regression calculations
T        the method number
 T$        the  name of  the method file
T()       an array used in regression calculations
V$        an identifier from a method file
V0$      an error message from the  data file
X        the user's answer to  a multiple choice question
                                    37

-------
                              TABLE 4  (continued)
X$       the user's  answer  to a Y or N question
Z3       a variable  used  in regression calculations
                                             ARRAY G



LL
cc
oe
< ^


1
1
0
1
0
•<
1
0
Identifier 1
Identifier 2
Identifier 3
Identifier 4
Identifier 5
> «
Identifier 59
Identifier 60
C
C
C
C
C
bfc
C
C
A
A
A
A
A
C
C
C
C
C

A
A
C
C
A
A
A
A
A

A
A
C
C
C
C
C

C
C
A
A
A
A
A
C
C
C
C
A
A
A
v —


A
C A
c
c
c
c
c.
A
A
A
A
A

A
A
C
C
A

A A

•o -o
•O - "O «-

C = concentration .g "c 5 1
A = area of peak <5 £ « 2
(A (A
•0 £
*- c -o «=
2 8 •£ =
5 »- £
c
c
A
A
C
C
C
C
C

C
c
A
A
A
A
A
i
A
A
V
•a
*- "O
ID £
•a 
-------
                             DENTIF1ERS|
                             O BE CALIBRATED
CO
VO
                                       yes
                                                                                          TYPE Of FIT
                            /READ PEAK/
                            (AREA FROM)
                            IDATA FILE \

                             (READ     7
                             CONC.    /
                             :ROM PATT.I
                              FILE     V
-4
                             / NEXT\
                          --^IDENTIFIER >
FOB NO.\
  OF   \
      IS/
       /
                                                              IDENTIFIERS
                                                         I—
    /  NEXT\
    'lDENTIFIER\
                                /PLACE CAL./
                                / INFO INTO i
                                I METHOD  I
                                \FILE
                                                                      /
                                                                                          /NEXT  \
                                                                                      L_ /IDENTIFIER^
                                                                                            CHAIN
                                                                                                            GCOO
                                                     Figure 6. Flowchart of Program GC04.

-------
G-fl-S   C-H-R-0-tt-ft-HHHHH>-H-Y   A-U-T-0-M-A-T-HHI   S-Y-S-T-E-M
7/20/1979                                                      PAGE  1
                        PROGRAM LISTING FOR GC04
G-A-S   C-H-R-;"   (Y OR N)'5
 0355   ON ERR THEN GOTO 0365
 0360   INPUT "  ",X*
 0365   ON ERR THEN STOP
 0370   IF X*C1,1]='Y' THEN LET Fm=l
 0380 NEXT I
 0390 REN   	
 0400 REH          PRINT INSTRUCTIONS FOR ENTERING DATA
 0410 PRINT
 0420 PRINT "ENTER THE FOLLOWING CALIBRATION INFORMATION."
 0440 PRINT 'TYPE 'END' AS AN INJECTION ID TO TERMINATE THE LIST.*
 0450 LET 15=0
 0450 REH   	
 0470 REH          OPEN SELECTED DATA FILE
 0480 LET 15=15+1
 0490 IF I5<16 THEN GOTO 0540
 0500 PRINT
 0510 PRINT "<7X7>YOU HAVE USED FIFTEEN CALIBRATION STANDARDS, WHICH I
*     S THE LIHIT'
 0520 PRINT '     FOR THIS PROGRAM.'
 0530 GOTO 1230
 0540 PRINT
 0545 ON ERR THEN GOTO 0555
 0550 INPUT 'INJECTION ID FOR CALIBRATION STANDARD?  'iD2*
 0555 ON ERR THEN STOP
 0560 IF D2*="END" THEN GOTO 1230
 0570 IF LEN(D2$)=8 THEN GOTO 0610
 0580 PRINT
 0590 PRINT •<7X7>";D2$?' IS NOT A VALID  INJECTION ID NUMBER."
 0600 GOTO 0540
 0610 LET D3$='GC",D2t
 0620 ON ERR THEN GOTO 0640
 0630 RENAME D3$,D3$
 0640 ON ERR THEN STOP
 0650 IF SYS(7)O-48 THEN GOTO 0680
 0660 DELAY =1
 0670 GOTO 0620
 0680 IF SYS(7)=-9 THEN GOTO 0720
 0690 PRINT
 0700 PRINT "<7X7>THERE IS NO EXISTING DATA FOR  INJECTION ID  '5D2*;"."
  1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
G-ft-S   C^-0-fHKHHHHHVH-Y   A-tHHHHH-HHH  S-Y-S-T-E-rt
7/20/1979                                                     PAGE  3
                       PROGRAM LISTING FOR GC04

 1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
 0710 GOTO 0540
 0720 ON ERR THEN GOTO 0760
 0730 OPEN FILEC3,OLD3$,31
 0740 ON ERR THEN STOP
 0750 GOTO 0810
 0760 ON ERR THEN STOP
 0770 DELAY =1
 0780 GOTO 0720
 0790 REH  	
 0800 REH         CHECK DATA FILE USABILITY FLAG
 0810 READ FILEC3,13,J
 0820  IF J=l THEN  GOTO 0900
 0830 PRINT
 0840  IF J=2 THEN  PRINT m<7X7>",m\m CANNOT BE USED BECAUSE THE REPOR
*    T DID NOT  HAVE A TOTAL AREA."
 0850 IF J=3 THEN  PRINT "<7X7>";D2$!" CANNOT BE USED BECAUSE THE REPOR
*    T HAS IN THE URONG FORMAT.*
 0860 CLOSE FILEC3J
 0870 GOTO 0540
 0880 REH  	
 0890 REH         PRINT ANY ERROR MESSAGES FOUND IN THE DATA FILE
 0900LETP9=2
 0910 READ FILE[3,P91,VO$
 0920 IF VOttl.7]O"MESSAGE" THEN GOTO  1001
 0930 PRINT
 0940 PRINT "THE FOLLOWING MESSAGE HAS  PART OF THE REPORT FOR"
 0950 PRINT '      INJECTION  '!D2$!":  "JVO»5V
 0960 PRINT
 0970 LET P9=P9+1
 0980 GOTO 0910
 0990 REH	
 1000 REH         OPEN CONCENTRATION PATTERN FILE
 1001 ON ERR THEN GOTO 1003
 1002 INPUT •      CONCENTRATION PATTERN FOR STANDARD?  ",A8$
 1003 ON ERR THEN STOP
 1004 LET A7=POS(A9$,A8$,1>
 1005 IF A7OO THEN  GOTO 1008
 1006 PRINT "<7X7>     ";A8*;" IS NOT A VALID LETTER."
 1007 GOTO 1001
 1008 LET Af*=«,"000"
 1009 LET A6*riO-LEN(STR$(A7)),9]=STR$     THERE IS NO EXISTING PATTERN NAMED ";A8$;".'
 1015  GOTO 1001
 1016  ON ERR THEN GOTO 1020
 1017  OPEN FIL£[7,0],A6M
 1018  ON ERR THEN STOP
 1019  GOTO 1026
 1020  ON ERR THEN STOP
 1021  DELAY =1
 1022 GOTO 1016
 1024 REM  	
 1025 REH         GATHER CALIBRATION DATA
 1026 LET P9=P9+2
 1027 FOR 1=1  TO F
 1030   IF FmOl THEN GOTO 1190
 1040   READ FIL£[4,3tI-l],V*
 1041    IF V$O'99999" THEN GOTO 1060
 1042   LET Fm=0
 1043   GOTO  1190
 1060   READ FILE[7,I].GU.2*I5-1]
 1070   LET  I2=P9
 1080   READ FILE[3,I2LG$,H»,B.C
 1090   IF EOF(3) THEN GOTO 1130
 1100   IF G*=V* THEN IF CO-9999 THEN GOTO 1180
 1110   LET  12=12+1
 1120   GOTO 1080
 1130   PRINT
 1140   PRINT "<7X7>THE REPORT FOR INJECTION -,V2to'  DOES NOT INCLUDE
*     AN AREA  FOR "5W."
 1150   PRINT "THEREFORE, ";D2$5" CANNOT BE USED IN THIS CALIBRATION.'
 1160   CLOSE  FILEtt]
 1165   CLOSE  FILEm
 1170   GOTO 0540
 1180   LET GCI,2*I5]=C
 1190 NEXT I
 1200 CLOSE FILEfS]
 1201  CLOSE FILEI7J
 1210 LET I«=I$,D2$
 1220 GOTO 0480
 1230  LET 15=15-1
 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
ro
G-A-S   C-H-R-£Hf-A-THHHHH»-H-Y   A-U-T-0-H-A-T-I-Q-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  5
                        PROGRAM LISTING FOR GC04

 1234567891123456789212345678931234567894123456789512345678961234567897
          0         0        0         0         0         0         0
 1240 IF I5X> THEN GOTO 1310
 1260 PRINT
 1270 PRINT '<7X7>BECAUSE NO STANDARDS WERE PROVIDED, NO CALIBRATION H
*     AS BEEN DONE."
 1280 GOTO 3000
 1290 REH   ----
 1300 REM          CREATE  DATE OF CALIBRATION
 1310 LET D4$='00/00/00"
 1320 LET D4$r3-LEN(STR*(SYS(2)»,23=STR$(SYS(2»
 1330 LET M*[6-LEN1STRS
 1350 REH   ----------
 1360 REM          SELECT  TYPE OF FIT
 1370 PRINT
 1380 PRINT "HERE ARE THE  TYPES OF CALIBRATION CURVE FITTING:'
 1390 PRINT
 1400 PRINT '     1.   LINEAR REGRESSION"
 1410 PRINT •     2.   6UADRATIC REGRESSION0
 H20 PRINT "     3.   LINEAR INTERPOLATION EXTENDED TO THE ORIGIN"
 1430 PRINT '     4.   LINEAR REGRESSION FORCED THROUGH THE ORIGIN"
 1440 PRINT
 1445 ON ERR THEN GOTO 1455
 1450 INPUT 'WHICH TYPE DO YOU WANT TO USE?  (1, 2, 3, OR 4)  %X
 1455 ON ERR THEN STOP
 1460 IF X=l THEN IF I5>2  THEN GOTO 1500
 1465 IF X=2 THEN IF I5>3  THEN GOTO 1500
 1470 IF X=3 THEN GOTO 1500
 1475 IF X=4 THEN IF I5>2  THEN GOTO 1500
 1480 PRINT '<7X7>YOU HAVE NOT USED ENOUGH STANDARDS FOR THIS FIT."
 1490 GOTO 1370
 1500 ON X THEN GOTO 1890, 1890, 1560, 2650
 1510 PRINT
 1520 PRINT "<7X7>";X!'IS NOT A VALID TYPE NUMBER."
 1530 GOTO 1370
 1540 REN   --
 1550 REN          LINEAR  INTERPOLATION
 1560 FOR 1=1 TO F
 1570   IF FCI301 THEN GOTO 1830
        1590   REH     COPY STWfflARDS TO SMALLER ARRAY
        1600   FOR  12=1 TO 30
        1610     LETG2CI2}=GfI,I23
G-A-S   C-H-R-0-M-A-T-O-G-R-A-P-H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  6
                        PROGRAM LISTING FOR GC04

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1620   (€XT 12
 1630   REH   	
 1440   REN     PUT STANDARDS  IN ORDER BY AREA
 1645   LET I2*=I$
 1650   FOR 13=15-1 TO 1 STEP  -1
 1660     FOR 12=1 TO 13
 1670       IF G2[2*I2JCG2[2*(12+1)3 THEN GOTO 1770
 1680       LET D2=G2[2*I2-n
 1690       LET D3=G2t2*I23
 1700       LET D2*=I2tt8*I2-7,8*123
 1710       LET G2[2*I2-13=G2[2*I2*13
 1720       LET G2C2«I23=G2I2*I2+23
 1730       LET I2*[8*I2-7,8*I23=I2*[8*fI2+l>-7,8*(I2+l>3
 1740       LET G2[2*I2+13=D2
 1750       LET G2C2*I2+23=03
 1760       LET I2$[8*fI2+l}-7,8*(I2+m=D2$
 1770     NEXT 12
 1780   NEXT 13
 1790   REM   	
 1800   REN     PUT STANDARDS  INTO METHOD FILE
 1810   NAT WRITE FILE[4,3*I+1LG2
 1820   WRITE FIL£C4,3*I],D4$,I2I,X,99999,99999,99999,0
 1830 NEXT I
 1840 PRINT
 1850 PRINT 'METHOD '5T*[3,63JH HAS BEEN CALIBRATED.'
 1860 GOTO 3000
 1870 REH   	
 1880 REM          NORMAL FIRST AND SECOND DEGREE RECESSION
 1890 FOR 1=1 TO F
 1900   IF FCI3O1 THEN GOTO 2590
 1910   REH   	
 1920   REH     PERFORM REGRESSION
 1930   MAT R=2ER
 1940   MAT T=ZER
 1950   MAT A=ZER
 1960   LET AC13=I5
 1970   FOR 12=1 TO 15
 1980     FOR 13=2 TO 2«+l
 1990       LET ACI33=A[I33+G[I,I2*23A(I3-1)
 2000     f£XT 13
 2010     FOR 13=1 TO X+l
 2020       LET RCI3,X+23=TtI33+G[I,I2f2-13*GCI,I2*23A(I3-n
        1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
                0000000           0000000

-------
G-fl-S   C-fHWHHJ-THMr-R-fl-P-H-y   A-U-HHJ-A-M-0-N
7/20/1979
                       PROGRAM LISTING FOR GC04
                                                                 S-Y-S-r-E-M  G-A-S  C-*HMHHK-0-G-R-A-P-H-Y   A-U-HHHHT-I-O-N   S-Y-S-T-E-H
                                                                    PAGE  7  7/24/1979                                                      PAGE  8
                                                                                                    PROGRAM LISTING FOR GC04
       1234567891123456789212345678931234567894123456789512345678961234567897
               0000000
       2030       LET T[I3]=T[I3]+GCI,I2«2-1]*GCI,I2*2]A(I3-1i
       2040     NEXT 13
       2050     LET TCX+2]=T[X+2]+G[M2*2-llA2
       2060   NEXT 12
       2070   FOR 12=1 TO X+l
       2080     FOR 13=1 TO X+l
       2090       LETR[I2,I31=AtI2+I3-l]
       2100     NEXT 13
       2110   NEXT 12
       2120   FOR 12=1 TO X+l
       2130     FOR  13=12 TO X+l
       2140       IF RtI3,I2]OO THEN GOTO 2210
       2150     NEXT 13
       2160     READ FILEt4,3*I-lLV$
       2170     PRINT
       2180    PRINT  "<7X7>THERE  IS NO UNIQUE SOLUTION FOR THE CALIBRATION
      *     EQUATION FOR ";V»5"."
       2190    PRINT  "THEREFORE, *;V$;" HAS NOT BEEN CALIBRATED."
4^     2200    GOTO 2590
w     2210    FOR 14=1 TO X+l
       2220       LET D=R[I2,I4]
       2230       LETR[I2,I4]=RCI3.I4]
       2240       LET RCI3,I4]=D
       2250     NEXT 14
       2260     LET Z3=1/RCI2,I2]
       2270     FOR 14=1 TO X+2
       2280       LET RCI2,I4]=Z3iRU2,I4]
       2290     NEXT 14
       2300     FOR 14=1 TO X+l
       2310       IF 14=12 THEN GOTO 2360
       2320       LET Z3=-1«R£I4,I2]
       2330       FOR 16=1 TO X+2
       2340         LETRU4.I6>RU4,I6]+Z3*RU2.I6]
       2350       NEXT 16
       2360     NEXT 14
       2370   NEXT 12
       2380   REH   	
       2390   REH     CALCULATE FITTING ERROR
       2400   LET J5=0
       2410   LET J6=0
       2420   FOR 12=1 TO 15
       2430     LET J4=R[1,X+2J+GII,I2*2J*R[2, X+2J
                                                                        1234567891123456789212345678931234567894123456789512345678961234567897
                                                                                0000000
                                                                        2440     IF X=2 THEN LET J4=J4+RC3,X+2]tftM2*2r2
                                                                        2450     LET J5=J5+(GCI,I2*2-1KJ4)A2
                                                                        2460     LET J6=U6+GtI,I2*2-l]
                                                                        2470   NEXT 12
                                                                        2480   LET J3=SQR{J5/U5-2))/X+2:i.R[3,X+2LJ3
                                                                        2590NEXTI
                                                                        2600  PRINT
                                                                        2610  PRINT  'METHOD  ';Ti[3,6];" HAS BEEN CALIBRATED."
                                                                        2620 GOTO 3000
                                                                        2630 REH   	
                                                                        2640 REH         LINEAR REGRESSION FORCED THROUGH THE ORIGIN
                                                                        2650 FOR 1=1  TO F
                                                                        2660   L£TJ7=0
                                                                        2670   LET J8=0
                                                                        2680   LET J9=0
                                                                        2690   IF FU1O1 THEN GOTO 2950
                                                                        2700   FOR 12=1 TO  IS
                                                                        2710     LET J7=J7+G[M2«2-13*G[1,12*21
                                                                        2720     LET J8=J8+GH, 12*2^2
                                                                        2730     LET J9=J9+GtM2*2-n
                                                                        2740   NEXT 12
                                                                        2750   LETR2=J7/J8
                                                                        2760   REM   	
                                                                        2770   REM     CALCULATE FITTING ERROR
                                                                        2780   LET J5=0
                                                                        2790   LET J6=0
                                                                        2800   FOR 12=1 TO  15
                                                                        2810     LET J5=J5+(GEI, I2»2-1]H}[I, I2*2HR2)A2
                                                                        2820      LET J6=J6+GU,I2t2-l]
                                                                        2830    NEXT 12
                                                                        2840   LET J3=S8R(J5/(I5-2))/(J6/I5)
                                                                        2850   LET J3=J3»100
 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
      G-A-S   C-H-RHHHK-(HHH»-P-H-Y   A4K-0-H-A-T-I-0-N   S-Y-S-T-E-fl
      7/20/1979                                                       PAGE  9
                              PROGRAM LISTING FOR GC04
                                                                       G-A-S   C-H-R-(HHK-0-G-R-A-P-H-Y   A4J-T-0-W-A-T-I-0-N   S-Y-S-T-£-H
                                                                       7/20/1979                                                       PAGE 10
                                                                                               SYMBOL TABLE FOR GC04
       1234567891123456789212345678931234567894J23456789512345678961234567897 SYMBOL    REFERENCES
                0000000
              REM   	
              REN     COPY STANDARDS INTO SMALLER ARRAY
              FOR 12=1 TO 30
2860
2870
2880
2890
2900
2910
2920
2930
2940
2950
2960
2970
2980
2990
3000
                LETG2tI2]=G£I,I23
              NEXT 12
              REM   	
              REM     PUT DATA INTO METHOD FILE
              MAT WRITE FILEC4.3*I*1],G2
              MUTE FILE[4,3«I]>D4*,I*.X,0,R2,0,vJ3
            NEXT I
            PRINT
            PRINT 'METHOD "5T«3,6];' HAS BEEN CALIBRATED.*
            JEM   	
            REM          RETURN TO MASTER CONTROL
                             3020
-p.
-fa.
     ON ERR THEN GOTO
3010 CLOSE FILEI33
3020 ON ERR THEN GOTO 3040
3030 CLOSE FILEm
3040 ON ERR THEN STOP
3050NOESC
3060 CHAIN 'GCOO-
        1234567891123456789212345678931234567894123456789512345678961234567897
                0         0         0         00         0         0
0170  0200
0230  0180
0242  0237
0300  0250
0365  0355
0380  0340
0410  0290
0480  1220
0540  0490  0600  0710  0870  1170
0555  0545
0610  0570
0620  0670
0640  0620
0680  0650
0720  0680  0780
0760  0720
0810  0750
0900  0820
0910  0980
1001  0920  1007  1015
1003  1001
1008  1005
1012  1010
1016  1013  1022
1020  1016
1026  1019
1060  1041
1080  1120
1130  1090
1180  1100
1190  1030  1043
1230  0530  0560
1310  1240
1370  1490  1530
1455  1445
1500  1460  1465  1470  1475
1560  1500
1770  1670
1830  1570
1890  1500
2210  2140
2360  2310
2590  1900  2200
2650  1500
2950  2690

-------
en
ini-a fc-n-n~u~n~H-i-vu n H i 'n T M-u-i~u-n~H-|-i-irH ;
7/20/1979
SYMBOL TABLE FOR GC04
SYMBOL REFERENCES
3000
3020
3040
A
A6t
A7
A8t
A9I
AC
B
C
D
D2
D2$

D3
03$
D4»
FLI3
RI7
Ft

G$
AX
62
G2I
G[
H$
I




I*
12





12*
0080 1280
3000
3020
1950
0105 1008
1004 1005
0105 1002
0105 0106
0090 1960
1080
1080 1100
2220 2240
1680 1740
0100 0550
1140 1150
1690 1750
0100 0610
0100 1310
0120 0150
0730 0810
0160 0165
2580 2930
1017 1060
0100 0270
At 1A
0110
0100 1080
4 f)4 A 1C*TA
1810 2570
0100 1610
*wwv
2890
0100 1060
2450 2460
0100 1080
0260 0270
1042 1060
1890 1900
2460 2530
2810 2820
0100 1210
1070 1080
1700 1710
2020 2030
2220 2230
2440 2450
2730 2740
0100 1645
1860 2620
1009 1011
1009
1004 1006
1004
1990 2090
1180

0560 0570
1210 1700
0630 0730
1320 1330
0170 0190
0860 0910
0166 0170
2940
1165 1201
0370 1030

1100
4WW
2930
1670 1680
1180 1610
2530 2710

0280 0320
1180 1190
1990 2020
2570 2580
2890 2930
1645 2580
1110 1600
1720 1730
2050 2060
2260 2280
2460 2470
2800 2810
1700 1730
1017
1014

0590 0610
1760

1340 1820
0260 0320
1080 1160
0330 1040
3030
1042 1570


1690 1710
1990 2020
2720 2730

0330 0370
1560 1570
2030 2050
2590 2650
2940 2950
2940
1610 1620
1740 1750
2070 2090
2310 2320
2520 2530
2820 2830
1760 1820


0700 0840


2580 2940
1027 1560
1200 3010
1810 1820

1900 2690


1720 1740
2030 2050
2810 2820

0380 1027
1610 1810
2160 2430
2690 2710


1660 1670
1760 1770
2110 2120
2340 2370
2540 2700
2880 2890



0850


1890
2160




1750
2430
2890

1030
1820
2440
2720


1680
1970
2130
2420
2710
2900

&-T-»-i-t-n U-H-O L.-n-n-u-n-H-i-u-o-n-H-r-n-T H-u-i-u-n-8-l-i-u-H a-Y-b-l-t-n
PAGE 11 7/20/1979 PAGE 12
SYMBOL TABLE FOR GC04
SYMBOL REFERENCES


0950


2650
2570




2530
2440

1040
1830
2450
2730


1690
1990
2140
2430
2720


13
14
15
16
J
J3
J4
J5
J6
J7
J8
J9
P9
R2
R[
T
I
T$
tr
1 1>

V0$
X
x$
Z3














1650
2080
2210
2320
0450
1650
2330
0810
2480
2430
2400
2410
2660
2670
2680
0900
2750
0090
2340
1940
»* "V
0100
2180
fcA WV
0090
1450
2020
2430
0100
2260














1660 1780
2090 2100
2220 2230
2340 2360
0480 0490
1960 1970
2340 2350
0820 0840
2490 2580
2440 2450
2450 2480
2460 2480
2710 2750
2720 2750
2730
0910 0970
2810 2940
2020 2090
2430 2440
0160 0166
2020 2030
JvVAV AVWV
0170 0330
2190
0910 0920
1460 1465
2050 2070
2440 2580
0240 0250
2280 2320














1980 1990 2000
2130 2140 2150
2240 2250 2270
1060 1180 1230
2420 2480 2700
0850
2840 2850 2940
2780 2810 2840
2790 2820 2840



1026 1070
2140 2220 2230
2580
0235 1008 1850
0340 0350 1040

0950
1470 1475 1500
2080 2120 2130
2940
0360 0370
2340














2010 2020 2030 2040
2230 2240
2280 2290 2300 2310
1240 1460 1465 1475
2800 2840




2240 2260 2280 2320
2610 2970
1041 1100 1140 2160


1520 1820 1980 2010
2210 2270 2300 2330
















-------
                                  SECTION 7

             PROGRAM GC05 - LIQUID/LIQUID EXTRACTION AND DIRECT
                        AQUEOUS INJECTION CALIBRATION


    GC05 is the program which performs calibration for standards prepared by
the liquid/liquid extraction and direct aqueous injection methods.   It  is
essentially the same as program GC04.  The only difference is that  in
addition to asking the user for the concentration of each compound,  this
program also asks for the injection volume of each standard.  It then
multiplies the prepared concentration (in micrograms per liter) times the
injection volume (in microliters) times 1000 to get the mass (in nanograms)
of each compound.  Calibration is then done on the basis of mass.

    One additional symbol is used in GC05.  It is Z, the volume of  the
injection.
                                      46

-------
G-A-S   C-»HHHHK-0--H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-fl G-A-S   C4HMHHKHHHHHHf-Y   ft-U-THHHK-HHf   S-Y-S-T-E-H
7/20/1979                                                     PAGE   1  7/20/1979                                                      PflGE  2
                        PROGRAM LISTING FDR GC05                                                PROGRAH LISTING FOR GC05
  1234567891123456789212345&78931234567894123456789512345678961234567897
          0000000
  0010 REH   +=+=*=4=+=4=+=*=+s+=+=+=+=+e+=f=+ct=f=4.at=1
 0380 NEXT I
 0390 REH   	
 0400 REN          PRINT INSTRUCTIONS FOR ENTERING DATA
 0410 PRINT
 0420 PRINT 'ENTER THE FOLLOWING CALIBRATION INFORMATION.'
 0440 PRINT "TYPE 'END' AS AN INJECTION ID TO TERMINATE THE LIST.'
 0450 LET 15=0
 0440 REN   	
 0470 REH          OPEN SELECTED DATA FILE
 0480 LET 15=15+1
 0490 IF KC16 THEN GOTO 0540
 0500 PRINT
 0510 PRINT "<7X7>YOU HAVE USED FIFTEEN CALIBRATION STANDARDS, WHICH I
«     S THE LIMIT"
 0520 PRINT"     FOR THIS PROGRAH.'
 0530 GOTO 1230
 0540 PRINT
 0545 ON ERR THEN GOTO 0555
 0550 INPUT 'INJECTION ID FOR CALIBRATION STANDARD?  *,D2»
 0555 ON ERR THEN STOP
 0560 IF D2*="END" THEN GOTO 1230
 0570 IF LEN(D2*)=8 THEN GOTO 0610
 0580 PRINT
 0590 PRINT '<7X7>';D2»;' IS NOT A MftLID INJECTION ID NUMBER."
 0600 GOTO 0540
 0610 LET D3*="GC",D2*
 0620 ON ERR THEN GOTO 0640
 0630 RENAME D3$,D3»
 0640 ON ERR THEN STOP
 0650 IF SYS(7)O-48 THEN GOTO 0680
 0660 DELAY =1
 0670 GOTO 0620
 0680 IF SYS(7)=-9 THEN GOTO 0720
 0690 PRINT
 0700 PRINT '<7X7>THERE IS NO EXISTING DATA FOR INJECTION ID '?D2t!".'
 1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
      G-A-S   C-
      7/24/1979
                        HHHMf-Y   A-U-HHHH-I-0-N   S-Y-S-T-€-«  G-A-S   C-H-IHHHhUHrR-ft-f-H-Y   A-U-T-0-fl-A-T-I-O-N  S-Y-S-T-E-fl
                                                              PflGE  3  7/24/1979                                                      PAGE  4
                       PROGRAM LISTING FDR 6C05                                               PROGRAM LISTING FOR GC05
.P.
os
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0710 GOTO 0540
 0720 ON ERR THEN GOTO 0760
 0730 OPEN FILEC3,0],D3*,31
 0740 ON ERR THEN STOP
 0750 GOTO 0810
 0760 ON ERR THEN STOP
 0770 BELAY =1
 0780 GOTO 0720
 0790 REN   -
 0800 REN         CHECK DATA FILE USABILITY FLAG
 0610 READ FILER, H,J
 0820 IF J=l THEN COTO 0900
 0830 PRINT
 0840 IF ^2 THEN PRINT "OXT^IE*; * CANNOT BE USED BECAUSE THE REPOR
*     T DID NOT HAW A TOTAL AREA.'
 0850 IF J=3 THEN PRINT 'OX7>";D2*;' CANNOT BE USED BECAUSE THE REPOR
*     T MAS IN  THE WONG FORMAT."
 0860 CLOSE FILEC3]
 0870 GOTO 0540
 0880 REH   -
 0890 REN         PRINT ANY ERROR MESSAGES FOUND IN THE DATA FILE
 0900 LET P9=2
 0910 READ FILE[3,P9LVO$
 0920 IF VO*C1,7JO1CSSASE' THEN GOTO 0992
 0930 PRINT
 0940 PRINT 'THE  FOLLOWING MESSAGE HAS PART OF THE REPORT  FOR*
 0950 PRINT'    INJECTION "JD2I; "i  ';VO$;V
 0960 PRINT
 0970 LET P9=P9+1
 0980 GOTO 0910
 0990 REH   --
 .0991 REM         OPEN CONCENTRATION PATTERN FILE
 0992 ON ERR THEN GOTO 0994
 0993 INPUT '    CONCENTRATION PATTERN FOR STANDARD?  ".Aft
 0994 ON ERR THEN STOP
 0995 LET A7=POS(A9$,A»,1)
 0996 IF A7OO  THEN GOTO 0999
 0997 PRINT 'C7X7>     '"SAW;"' IS NOT A VALID LETTER."
 0998 GOTO 0992
 0999 LET A6$=T$,"OW
 1000 LET A6$[10-tEN(STR$(A7)J,9]=STR$(A7)
 1001 ON ERR THEN GOTO 1003
 1234567891123456789212345678931234567894123456789512345678961234567897
          00        0         0         0         0         0
 1002 RENAME A6S.A6*
 1003 ON ERR THEN STOP
 1004 IF SYS(7)=^9 THEN GOTO  1007
 1005 PRINT "<7X7>     THERE IS NO EXISTING PATTERN NAMED "t'AWJ". •
 1006 GOTO 0992
 1007 ON ERR THEN GOTO 1011
 1008 OPEN FIL£E7,OLA6M
 1009 ON ERR THEN STOP
 1010 GOTO 1020
 1011 ON ERR THEN STOP
 1012 DELAY -1
 1013 GOTO 1007
 1015 REH   	
 1016 REN          GATHER CALIBRATION DATA
 1020 ON ERR THEN GOTO 1022
 1021 INPUT '     INJECTION VOLUME IN HICROLITERS?  ",Z
 1022 ON ERR THEN STOP
 1023 LET P9=P9+2
 1024 FOR 1=1 TO F
 1030   IF FmOl THEN GOTO  1190
 1040   READ FILEE4,3fMJ,V$
 1041   IF VK>"99999' THEN GOTO 1060
 1042   LET FC13=0
 1043   GOTO 1190
 1060   READFIL£[7,I],G[I,2«5-1]
 1065   LET GCI,2fI5-l]=GCI»2*I5-l]*Z*1000
 1070   LET I2=P9
 1080   READ FILE[3,I2],G$,H$,B,C
 1090   IF EOF(3) THEN GOTO 1130
 1100   IF G$=Vi THEN IF CO-9999 THEN GOTO 1180
 1110   LET 12=12+1
 1120   GOTO 1080
 1130   PRINT
 1140   PRINT "OX7>THE REPORT FOR INJECTION ';D2$r DOES NOT INCLUDE
*     AN AREA FOR *;V$;V
 1150   PRINT •THEREFORE,  MJ2*;" CANNOT BE USED IN THIS CALIBRATION."
 1160   CLOSE FIL£[3]
 1165   CLOSE FILEE7]
 1170   GOTO 0540
 1180   LET G[I,2*I5]=€
 1190 NEXT I
 1200 CLOSE FILH3]
 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
     G-rfhS  C^HHHH-T^HHHH)^f•Y   A-U-T-O-H-A-T-I-O-tl  S-Y-S-T-E-H  G-A-S   C-HHMhH-A-THHHHHHH'   A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-H
     7/24/1979                                                      PAGE  5  7/24/1979                                                      PAGE  6
                            PROGRAM LISTING FOR G005                                                PROGRAM LISTING FOR GC05
      1234567891123456789212345678931234567894123456789512345678961234567897
              0000000
      1201 CLOSE FILEm
      1210 LET I$=It,D»
      1220 GOTO 0480
      1230 LET 15=15-1
      1240 IF 1550 THEN GOTO 1310
      1260 PRINT
      1270 PRINT -<7X7>BECAUSE NO STANDARDS HERE PROVIDED,  NO CALIBRATION H
     *    AS BEEN DONE.'
      1280 GOTO 3000
      1290 REH	
      1900 RBI          CREATE DATE OF CALIBRATION
      1310 LET D4$='00/00/00'
      1320 LET D4$C3-LEN(STR$(SYS<2))),2]=STR$(SYS(2))
      1330 LET D4$[6-LEN(STfW(SYS(l))),5]=STR$(SYS(l))
      1340 LET D4$[9-L£N(STR$(SYS(3)-1900)),8]=STR$(SYS(3)-1900)
      1350 REN   	
      1360 REN          SELECT TYPE OF FIT
      1370 PRINT
^    1380 PRINT "HERE ARE DC TYPES OF CALIBRATION CURVE FITTING: •
S    1390 PRINT
      1400 PRINT '    1.  LINEAR REGRESSION*
      1410 PRINT-    2.  QUADRATIC REGRESSION-
      1420 PRINT '    3.  LINEAR INTERPOLATION EXTENDED TO  THE ORIGIN"
      1430 PRINT •    4.  LINEAR REGRESSION FORCED TTOOUGH  THE ORIGIN'
      1440 PRINT
      1445 ON ERR  THEN GOTO 1455
      1450 INPUT "WHICH TYPE 00 YOU WANT TO USE?  (1,  2,  3,  OR 4)  ",X
      1455 ON ERR  THEN STOP
      1460 IF X=l  THEN IF I5>2 THEN GOTO 1500
      1465 IF X=2  THEN IF I5>3 THEN GOTO 1500
      1470 IF X=3  THEN GOTO 1500
      1475 IF X=4  THEN IF I5>2 THEN GOTO 1500
      1480 PRINT -<7X7>YOU HN€ NOT USED ENOUGH STAMMRDS FOR THIS FIT."
      1490 GOTO 1370
      1500 ON X THEN GOTO 1890. 1890, 1560, 2650
      1510 PRINT
      1520 PRINT "<7X7>'5X!'IS NOT A VALID TYPE NUMBER.'
      1530 GOTO 1370
      1540 REN   	
      1550 REN          LINEAR INTERPOLATION
      1560 FOR 1=1 TO F
      1570    IF FCI1O1 THEN GOTO 1830

      1234567891123456789212345678931234567894123456789512345678961234567897
              0000000
1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
1580   REH   	
1590   REH     COPY STANDARDS TO SMALLER ARRAY
1600   FOR 12=1 TO 30
1610     LET G2[I2]=G[I,I21
1620   NEXT 12
1630   REH	
       REH     PUT STANDARDS IN ORDER BY AREA
1640
1645
1650
1660


1690
1700
1710
1720
1730
1740
1750
1760
1770
1780
1790
1800
1810
1820
       LET I2$=I$
       FOR 13=15-1  TO 1  STEP -1
         FOR 12=1 TO 13
           IF G2[2fI2KG2[2*(I2+l>] THEN GOTO 1770
           LET D2=G2C2*I2-1]
           LET D3=G2t2*I23
           LET D2$=I2$£8*I2-7,8*I2]
           LET G2t2*I2-l]=G2C2*I2+lJ
           LET G2[2fI2]=G2[2*I2+2]
           LET I2H8*I2-7,8«I2]=I2$[8t<12+1)-7,8*(12+1)]
           LET G2E2*I2+1]=D2
           LET G2[2*I2+2]=D3
           LET I2tt8*(I2+l)-7,8*(I2+in=D2f
         NEXT 12
       NEXT 13
       REH   	
       REH     PUT  STANDARDS INTO HETHOD FILE
                               HAS BEEN CALIBRATED.'
       HAT WRITE FILE[4,3*I+11,G2
       WRITE FILE[4,3*ILD4$,I2$,X,99999,99999,99999,0
1830 NEXT I
1840 PRINT
1850 PRINT "HETHOD ";T$[3,6];'
1860 GOTO 3000
1870 REH   	
1880 REH          NORNAL FIRST  AND SECOND DEGREE RECESSION
1890 FOR 1=1 TO F
1900   IF FmOl THEN GOTO 2590
1910   REH	
1920   REH     PERFORM REGRESSION
1930   HAT R=ZER
1940   HAT T=ZER
1950   HAT A=ZER
1960   LET Am=I5
1970   FOR 12=1 TO 15
1980     FOR 13=2 TO 2*X+1

1234567891123456789212345678931234567894123456789512345678961234567897
         0000000

-------
      G-A-S   C-HHMHHK-0-G-R-A-P-H-Y   A4J-T-0-H-A-T-I-0-N
      7/20/1979
                              PROGRAM LISTING FOR GC05
                                                          S-Y-S-T-E-rt  G-fr-S  C-H-R-CHHK-0-G-R-A-P-H-Y   A-U-T-0-fl-A-T-I-O-N   S-Y-S-T-E-H
                                                              PACE  7  7/20/1979                                                      PAGE  8
                                                                                              PROGRAM LISTING FOR GC05
VI
o
 123*567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1990      LET AU33=fi[J3J+
 2030      LET T[I3>T[I3]*Gri,I2»2-n*G[I,I2*2r(I3-lJ
 2040     ICXT 13
 2050     LET TCX+2MCX+2J+GCI, 12*2-13*2
 2060  NEXT 12
 2070  FOR 12=1 TO X+l
 2080     FOR 13=1 TO X+l
 2090      LETR£I2,I3]=ACI2*I3-1]
 2100     NEXT 13
 2110  NEXT 12
 2120  FOR 12=1 TO X+l
 2130     FOR 13=12 TO X+l
 2140      IF RII3.I2JOO THEN GOTO 2210
 2150     NEXT 13
 2160     READ FILH4.3H-1LV*
 2170     PRINT
 2180     PRINT "OX7>THERE IS NO UNIQUE SOLUTION FOR TIE CALIBRATION
»     EQUflTION FOR "W$?V
 2190     PRINT 'THEREFORE, "JW HAS NOT BEEN CALIBRATED."
 2200     GOTO 2590
 2210     FDR 14=1 TO X+l
 2220      LET D=RH2,I4]
 2230      LET Rn2,I«=RiI3,I4]
 2240      LET RI13,143=0
 2250     NEXT 14
 2260     LET Z3=1/R[12,I21
 2270     FOR 14=1 TOX+2
 2280      LET Rri2,I4]=Z3*R[12,14]
 2290     NEXT 14
 2300     FOR 14=1 TO X+l
 2310      IF 14=12 THEN GOTO 2360
 2320      LET Z3=-l*RtI4,I2J
 2330      FOR 16=1 TO X+2
 2340        LET RIH, I6MCI4. !4HZ3*R[I2,161
 2350      NEXT 16
 2360     NEXT 14
 2370  NEXT 12
 2390  REH  	
 2390  REK    CALCULATE FIHING ERROR
123456789112345678921234567893123456789412345678951234S678961234567897
         0000000
2400   LET J5=0
2410   LET J6=0
2420   FOR 12=1 TO 15
2430     LET J4=R[l,X+2]+GIM2*2]*R[2,X+2]
2440     IF X=2 THEN LET J4=g4+RC3,X+2I»G[M2»2JA2
2450     LET J5=J5+lGtI,I2t2-l]-J4)A2
2460     LET J6=J6+GCI,12*2-1J
2470   NEXT 12
2480   LET tO=SQR(J5/(I5-2))/(J6/I5)
2490   LET J3=J3*100
2500   REH	
2510   RED     COPY STAMMRDS INTO SMALLER ARRAY
2520   FOR 12=1 TO 30
2530     LET G2CI23=G[I,I21
2540   NEXT 12
2550   REH   	
2560   REH     PUT STANDARDS INTO NETHOD FILE
2570   NftT WITH FILEt4,3*I+lLG2
2580   HRITE FILE[4,3*I],D4»,I*,X,Rn,X*2].R[2>X+2],R[3,X*2],J3
2590NEXTI
2600 PRINT
2610 PRIW 'METHOD -TT$[3.Uf • HAS BEEN CALIBRATED."
2620 GOTO 3000
2630 REN	
2640 REH          LINEAR REGRESSION FORCED THROUGH THE ORIGIN
2650 FOR 1=1 TO F
2660   LET J7=0
2670   LET JB=0
2680   LET J9=0
2690   IF FEIKM THEN GOTO 2950
2700   FOR 12=1 TO 15
2710     LET J7=J7+G[M2*2-1]*G[I,I2*2J
2720     LET J8=J8+GEI,I2*2]A2
2730     LET J9=J9+GH, 12*2-13
2740   NEXT 12
2750   LETR2=J7/J8
2760   REH   	:	
2770   REH     CALCULATE FITTING ERROR
2780   LET J5=0
2790   LET J6=0
2800   FOR 12=1 TO 15
2810     LET J5=J5+(G[I,I2«2-1HJ[M2*23*R2)A2
        1234567891123456789212345678931234567894123456789512345678961234567897  1234567891123456789212345678931234567894123456789512345678961234567897
                0000000           0000000

-------
G-A-S   CHHHHH»-HHHHH>-H-Y   A-U-T-0-M-A-T-I-O-fl   S-Y-S-T-E-M G-A-S   C4HMHHHHHHHHHH   A-U-T-0-rt-A-T-I-O-N   S-Y-S-T-E-tf
7/20/1979                                                      PAGE  9 7/20/1979                                                       PAGE 10
                       PROGRAM LISTING FOR GC05                                                SYMBOL TABLE FOR GC05

 1234567891123456789212345678931234567894123456789512345678961234567897 SYMBOL    REFERENCES
          0000000
 2820     LET J6=J&*G[M2*2-1]                                          WTO  0200
 2830   NEXT 12                                                         0230  0180
 2840   LET J3=SflRCJ5/(I5-2))/(J6/I5>                                    0242  0237
 2850   LETJ3=J3*100                                                   0300  0250
 2860   REH   __                    0365  0355
 2870   REN     COPY STANDARDS INTO SMALLER ARRAY                        0380  0340
 2880   FOR 12=1 TO 30                                                  0410  0290
 2890     LET G2[I23=GtI,I2J                                             0480  1220
 2900   NEXT 12                                                         0540  0490  0600  0710  0870  1170
 2910   REN   -                    0555  0545
 2920   REN     PUT DATA INTO HETHOD FILE                                0610  0570
 2930   NAT NRITE FILEC4, 3*1+13, 02                                      0620  0670
 2940   WRITE FILE[4,3*ILD4$,I$,X,0,R2,0,J3                             0640  0620
 2950 NEXT I                                                            0680  0650
 2960 PRINT                                                             0720  0680  0780
 2970 PRINT 'METHOD ";T$[3,635" HAS BEEN CALIBRATED.'                    0760  0720
 2980 REH   -  0810  0750
 2990 REN          RETURN TO  MASTER CONTROL                              0900  0820
 3000 ON ERR THEN GOTO 3020                                             0910  0980
 3010 CLOSE FILEE3J                                                     099?  0920  0998  1006
 3020 ON ERR THEN GOTO 3040                                             0994  0992
 3030 CLOSE FILEC73                                                     0999  0996
 ^ ON^ THE* STOP                                                  gg  jjoj  im

 3060 CHAIN TOO-                                                      JOH  1007

                                                                        1022  1020
                                                                        1060  1041
                                                                        1080  1120
                                                                        1130  1090
                                                                        1180  1100,
                                                                        1190  1030  1043
                                                                        1230  0530  0560
                                                                        1310  1240
                                                                        1370  1490  1530
                                                                        1455  1445
                                                                        1500  1460  1465  1470  1475
                                                                        1560  1500
                                                                        1770  1670
                                                                         1830   1570
                                                                         1890   1500
                                                                         2210   2140
                                                                         2360   2310
 1234567891123456789212345678931234567894123456789512345678961234567897   2590   1900  2200
          0000000   Z&SO   1500

-------
en
ro
      G-A-S   C^nHHhHHHHHHH   ft-U-T-0-H-ft-T-HHJ   S-Y-S-T-E-M  G-A-S   CHHMH»-ft-THHHHHM*-Y   A-trHHHK-I-O-N   S-Y-S-T-E-K
      7/20/1979                                                      PAGE  11  7/20/1979                                                      PAGE 12
                              SYMBOL TABLE FOR GC05                                                   SYMBOL TABLE FOR GC05
      SYMBOL    REFERENCES
                         1860  2620
                                                                   1040
                                                             1810  1820
                                                                       SYMBOL   REFERENCES
2950  2690
3000  0080  1230
3020  3000
3040  3020
A     1950
A6*   0105  0999  1000  1002  1008
A7    0995  0996  1000
A8»   0105  0993  0995  0997  1005
A9$   0105  0106  0995
At    0090  1960  1990  2090
B     1080
C     1080  1100  1180
D     2220  2240
02    1680  1740
D»   0100  0550  0560  0570  0590  0610  0700  0840  0850  0950
      1140  1150  1210  1700  1760
D3    1690  1750
03*   0100  0610  0630  0730
D4«   0100  1310  1320  1330  1340  1820  2580  2940
F     0120  0150  0170  0190  0260  0320  1024  1560  1890  2650
FLI3  0730  0810  0860  0910  1080  1160  1200  3010
FLU  0160  0165  0166  0170  0330  1040  1810  1820  2160  2570
      2580  2930  2940
FLt7  1006  1060  1165  1201  3030
FC    0100  0270  0370  1030  1042  1570  1900  2690
6     0110
G*    0100  1080  1100
62    1810  2570  2930
G2E   0100  1610  1670  1680  1690  1710  1720  1740  1750  2530
      2890
G[    0100  1060  1065  1180  1610  1990  2020  2030  2050  2430
      2440  2450  2460  2530  2710  2720  2730  2810  2820  2890
H$    0100  1080
I     0260  0270  0280  0320  0330  0370  0380  1024  1030
      1042  1060  1065  1180  1190  1560  1570
      1830  1890  1900  1990  2020  2030  2050  2160  2430  2440
      2450  2460  2530  2570  2580  2590  2650  2690  2710  2720
      2730  2810  2820  2890  2930  2940  2950
It    0100  1210  1645  2580  2940
12    1070  1080  1110  1600  1610  1620  1660  1670  1680  1690
      1700  1710  1720  1730  1740  1750  1760  1770  1970  1990
      2020  2030  2050  2060  2070  2090  2110  2120  2130  2140
      2220  2230  2260  2280  2310  2320  2340  2370  2420  2430
      2440  2450  2460  2470  2520  2530  2540  2700  2710  2720
      2730  2740  2800  2810  2820  2830  2880  2890  2900
12$   0100  1645  1700  1730  1760  1820
13    1650  1660  1780  1980  1990  2000  2010  2020   2030  2040
      2080  2090  2100  2130  2140  2150  2230  2240
14    2210  2220  2230  2240  2250  2270  2280  2290   2300  2310
      2320  2340  2360
15    0450  0480  0490  1060  1065  1180  1230  1240   1460   1465
      1475  1650  1960  1970  2420  2480  2700  2800   2840
16    2330  2340  2350
J     0810  0820  0840  0850
J3    2480  2490  2580  2840  2850  2940
J4    2430  2440  2450
J5    2400  2450  2480  2780  2810  2840
J6    2410  2460  2480  2790  2820  2840
J7    2660  2710  2750
J8    2670  2720  2750
J9    2680  2730
P9    0900  0910  0970  1023  1070
R     1930
R2    2750  2810  2940
RE    0090  2020  2090  2140  2220  2230  2240  2260   2280   2320
      2340  2430  2440  2580
T     1940
T$    0100  0160  0166  0235  0999  1850  2610  2970
Tf    0090  2020  2030  2050
V*    0100  0170  0330  0340  0350  1040  1041  1100   1140   2160
      2180  2190
VO*   0090  0910  0920  0950
X     1450  1460  1465  1470  1475  1500  1520  1820   1980   2010
      2020  2050  2070  2080  2120  2130  22iO  2270   2300   2330
      2430  2440  2580  2940
X*    0100  0240  0250  0360  0370
Z     1021  1065
Z3    2260  2280  2320  2340

-------
                                   SECTION 8

                   PROGRAM  GC06  -  CALIBRATION  CURVE  PLOTTING


    GC06  is  the  program which draws  a  calibration curve and prints  a table
of residuals.  It  is entered by chaining  from the master control  program,
GCOO, and  it chains back to that  program  if the  escape  key is  pressed.   The
plotting features  of this  program are  written exclusively for  a Tektronix
4000 Series  Computer Display Terminal,  or a Hewlett-Packard 2647  or 2648
terminal in  Tektronix compatability mode.  However, the program is  designed
so that it can print all of the calibration information except the  plot
itself on  a  non-Tektronix  terminal.

    This program uses a set of  general  purpose BASIC  Tektronix plotting
subroutines  which were developed  by the Advanced  instrumentation  Section.
Complete documentation for those  subroutines  is  available from that office.

    As GC06  begins, it asks the analyst what  type of  terminal  is  being
used.  It  then asks the user for  the number of the  method.   It checks
whether any  such method file exists.   The program then  opens the  method file
and counts the number of identifiers in that  file.

    Next, the program asks the  user for the identifier  whose calibration
curve is to  be plotted, and it  searches the method  file for that
identifier.  When  it finds the  appropriate identifier,  it reads all  of  the
calibration  data for that  identifier from the method  file.

    Then, on a Tektronix-type terminal, the program clears  the screen by
printing "<27><12>" and DELAYing  one second to allow  the screen to
physically clear.  Then it prints the  headings for the  calibration  curve
plot.  The program uses subroutine BSCPLT.SR  to establish the  origin at a
random location within five addressable points of the lower left  corner of
the screen.  This causes each graph to  be drawn  in  a  slightly  different
location so  that the screen will wear more evenly.

    Next, the program uses subroutine  BSCAXS.SR four  times  to  draw  the  four
sides of the box.  The axes are then identified.

    The subroutine BSCSCL.SR is then used to  generate numbers  which  scale
the horizontal and vertical axes.

    Next, the subroutine BSCMKR.SR is  used to mark the  calibration  standards
on the chart.  If the type of curve fitting is linear interpolation,
BSCMKR.SR also connects the points with straight line segments.   For any of
                                     53

-------
the other types of  curve  fitting, 6C06 uses subroutine  BSCLIN.SR to draw the
curve.  The  bell  is then  sounded five times to tell  the user that the
drawing is complete.  A TINPUT statement then causes GC06  to wait while the
user makes a hard copy  of the calibration curve.  The program continues when
the user presses the RETURN key or when the sixty seconds  allowed for the
TINPUT are over.

    Next, the program prints the table of residuals, and it again sounds the
bell five times and waits while the user makes a hard copy.

    Finally, if the user  wants to produce another graph,  the program
branches back to begin  again.   Otherwise, the program disables the escape
feature and  chains  back to GCOO.
(
                    GCOO
                                  GC06
                                    6\
                                TYPE OF
                               TERMINAL
                              IDENTIFIER
                             / READ CAL, /
                             (INFO FROM/
                             1 METHOD
                             V FILE
                             Figure 7. Flowchart of Program GC06.
                                     54

-------
                TABLE 5.  SYMBOL DEFINITIONS FOR PROGRAM GC06
D4$      the date of calibration
62()     the array of prepared concentrations and peak areas
I        the control variable for loops
1$       the superstring of injection IDs of standards used
15       the number of identifiers in the method file
J3       the fitting error
K        the type of fit
              K=l   linear regression
              K=2   quadratic regression
              K=3   linear interpolation
              K=4   linear regression forced through the origin
L2       the calculated concentration of a standard
Nl       the type of processing and calibration
PI       see BSCPLT.SR
Pl$      see BSCPLT.SR
P2       see BSCPLT.SR
P2$      see BSCPLT.SR
P3       see BSCPLT.SR
P3$      see BSCPLT.SR
P4       see BSCPLT.SR
P4$      see BSCPLT.SR
P5       see BSCPLT.SR
P5$      see BSCMKR.SR
                                     55

-------
                            TABLE 5*  (continued)
P6       see BSCPLT.SR
P7       see BSCPLT.SR
P8       see BSCPLT.SR
P9       see BSCPLT.SR
P()      see BSCLIN.SR
Ql       see BSCAXS.SR
Q2       see BSCAXS.SR
Q3       see BSCAXS.SR and BSCLIN.SR
Q4       see BSCAXS.SR
Q5       see BSCAXS.SR
Q5$      the format of a PRINT USING statement
Q6       see BSCAXS.SR
Q7       see BSCLIN.SR
Q8       see BSCLIN.SR
Q9       see BSCLIN.SR
Q()      see BSCLIN.SR
Rl       the constant term of the regression equation
R2       the coefficient of the linear term of the regression equation
R3       the coefficient of the quadratic term of the regression equation
S$       the axis identification string
SI       see BSCSCL.SR
S2       see BSCSCL.SR
S3       see BSCSCL,.SR
S4       see BSCSCL.SR
                                     56

-------
                             TABLE 5.  (continued)
 S5        see BSCSCL.SR
 S6        see BSCSCL.SR
 S7        see BSCSCL.SR
 S()       see BSCSCL.SR
 T$        the neune  of  the  method file
 U$        the name  of  the  analyst
 Ul        see BSCMKR.SR
 U2        see BSCMKR.SR
 U3        see BSCMKR.SR
 V$        an  identifier in a method file
 V7$       the identifier to be plotted
 X$        the user's answer to a Y or N question
 X7        the x-coordinate of a  point of the curve
 X8        the x-coordinate of the left side of the box
 X9       the  x-coordinate  of the right side of the  box
Y8       the  y-coordinate  of the bottom of the box
Y9       the y-coordinate  of the top of the box
Z5       the  position  of  a slash in a string
                                      57

-------
oo
G-fr-S   C-H-f-0-H-ft-THMi-R-A-P-frY   A-U-T-0-M-A-T-I-Q-N   S-Y-S-T-E-M
7/20/1979                                                      PfiGE  1
                       PROGRAH LISTING FOR GC06

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0010 REN   *=+=+=*=+=+=*=+=+=+=+=+=*=*=+=t=+=+=+=+=*=+=+=+=+=+=f=t=+=t
 0020 REN   +   GAS CHROHATOGRAPHY AUTOMATION SYSTEM                  +
 0030 REH   +   PROGRAM GC06, CALIBRATION CURVE PLOTTING              t
 0040 REH   +   BY:  J. KOPKE (SHORCC), HflRCH 6, 1979                 t
 0045 REH   +   HOST RECENT REVISION:  MAY 8, 1979                    *
 0050 REH   *=+=+=+=+=+=f=+s+=f=+=+=+=+=-f=+=+=t=+=-i-=+=+=t=t=f=+=t=t=+=+
 0060 REH
 0070 OIH D4«8],G2r30},I$[f60]TPC100J,e5«75],QnOO],S$[40J,T«E6]
 0080 DIH U$[20LVtt8],V7$r8J,XH3]
 0090 PAGE =132
 0100 ON ESC THEN GOTO 3130
 0110 ESC
 0120 PRINT
 0121 PRINT 'HERE ARE THE TYPES OF TERMINALS:"
 0122 PRINT
 0123 PRINT "    1.  TEKTRONIX 4000 SERIES'
 0124 PRINT '    2.  HEWLETT-PACKARD 2647 OR 2648"
 0125 PRINT '    3.  ALL OTHER TERHINALS"
 0126 PRINT
 0130 ON ERR THEN GOTO 0150
 0140 INPUT "WHICH  TYPE OF TERMINAL ARE YOU USING?  (1, 2, OR 3)  ",X
 0150 ON ERR THEN STOP
 0151 IF X=ABS(INT0 THEN IF X<4 THEN GOTO 0160
 0152 PRINT
 0153 PRINT "<7X7>";XJ"IS NOT A VALID TYPE NUMBER."
 0154 GOTO 0120
 0160 IF XO3 THEN  GOTO 0210
 0170 PRINT
 0180 PRINT 'THE PLOTTING FEATURES OF THIS OPTION HILL BE SKIPPED."
 0200 GOTO 0260
 0210 GOSUB 9905
 0220 REH	
 0230 REH          OPEN METHOD FILE
 0260 READ FILEE4,1],T$
 0270 CLOSE FILEC4]
 0280 OPEN FILEC4,OJ.T$,200
 0540 REH   	
 0550 REH         COUNT IDENTIFIERS IN METHOD FILE

 0570 READ FILEC4,3*15-1J,V$
 0580 IF EOF(4)  THEN GOTO 0610
 0590 LET I5=I5f1
G-A-S   C-H-R-CHHHT-0-G-R-A-P-H-Y   A4K-04HK-I-0-N   S-Y-S-T-£-H
7/20/1979                                                      PAGE  2
                        PROGRAH LISTING FOR GC06

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0600 GOTO 0570
 0610 LET 15=15-1
 0620 REM	
 0630 REH          INPUT IDENTIFIER  TO BE PLOTTED
 0640 PRINT
 0645 PRINT "WHAT IDENTIFIER FROM HETHOD ";T$[3,6J;
 0650 ON ERR THEN GOTO 0720
 0660 INPUT • DO YOU KANT CALIBRATION DATA FOR?  ',V7*
 0670 ON ERR THEN STOP
 0680 LET Z5=POS(V7$,VM)
 0690 IF Z5=0 THEN GOTO 0780
 0700 LET V7«Z5,Z5]=V
 0710 GOTO 0680
 0720 ON ERR THEN STOP
 0730 PRINT
 0740 PRINT '<7X7>USE A SLASH (/) MHERE YOU WANT A COMMA.'
 0750 GOTO 0640
 0760 REH   --	
 0770 REH          CHECK IF IDENTIFIER IS IN METHOD FILE
 0780 FOR 1=1 TO 15
 0800   READ FILE[4,3*I-1],V$
 0810   IF V*=V7$ THEN GOTO 0880
 0820 NEXT I
 0830 PRINT
 0840 PRINT "<7X7>THERE IS NO IDENTIFIER '";V7$;" IN METHOD -;T$[3,6]
*     •* *
 0850 GOTO 0640
 0860 REH	
 0870 REH          READ DATA FROM HETHOD FILE
 0880 READ FILE[4,3tI],D4$,I$,K,RhR2.R3.J3
 0890 IF D4$O"99/99/99" THEN GOTO 0930
 0900 PRINT
 0910 PRINT »<7X7>IDENTIFIER -?V7*?' HAS NEVER BEEN CALIBRATED."
 0920 GOTO 0640
 0930 HAT READ FILE[4,3*I+1LG2
 0940 READ FILE[4>1J.T*,U$,N1
 0950 REM   	
 0960 REH          CLEAR SCREEN,  PRINT HEADINGS
 0970 IF X=3 THEN GOTO 2530
 0971 IF XO2 THEN GOTO 0980
 0972 PRINT "<27>*DF"
 0973 PRINT "<27>&S1POQ'
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
                0000000           0000000

-------
G-A-5   C H R 0 H A-HHrft-A-f-H-Y   A-U-HHHK-I-0-N   S-Y-S-T-E-M  G-A-S   C-HHMH*-ft-T-(MHHHHf-Y   A-U-HHHK-HHI   S-Y-S-T-E-fl
7/20/1979                                                     PflGE  3  7/20/1979                                                     PflGE  4
                       PROGRAM LISTING FOR GC06                                               PROGRAM LISTING FOR GC06
       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
       0980 PRINT -C27Xm'J
       0990 DELAY =1
       1000 PRINT  TAB(22)!"GAS CHROHATOGRAPKY AUTONATION SYSTEM*
       1010 PRINT  TAB(20);'C-A-L-I-B-JHH-I-O-N    C-if-R-V-E'
       1020 PRINT -ANALYST:  -;ut;  TABWH;-METHOD;  -;T$t3,ti
        030 PRINT -IDENTIFIER:  VV7J; TAB(43);'DATE OF CALIBRATION:   '5D4*
        040 PRINT 'TYPE OF FIT:  ";
        050 ON K THEN GOTO 1060. 1080. 1100,  1120
        060 PRINT -L NEAR REGRESSION";
        070 GOTO 1130
        080 PRINT -QUADRATIC REGRESSION1;
       1090 GOTO 1130
       1100 PRINT -L NEAR INTERPOLATION1;
       1110 GOTO 1130
       1120 PRINT -LINEAR REGRESSION THROUGH ORIGIN"!
       1130 PRINT  TABC51);
       1140 PRINT USING "FITTING ERROR:  ttt.ttr,J3
       1150 REH   	
01     1160 REH          DRW BOX
«>     1170 RANDOMIZE
       1180 LET P1=RND(1H5
       1190 LET P2=RHH2Jt5
       1200 LET P3=Q
       1210 GOSUB 9968
       1220 LET 01=147
       1230 LET B2=70
       1240 LET 0>11
       1250 LET 04=78
       1260 LET 05=2
       1270 GOSUB 9924
       1280 LET 94=54
       1290 LET 05=1
       1300 GOSUB 9924
       1310 LET 92=664
       1320 LET 04=78
       1330 LET Q5=-2
       1340 GOSUB 9924
       1350 LET Cl=1005
       1360 LET 02=70
       1370 LET 04=54
       13301ETQ5=-1
       1390 GOSUB 9924

       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
                                                                        1234567891123456789212345678931234567894123456789512345678961234567897
                                                                                 0000000
                                                                        1400 REN	
                                                                        1410 REH         LABEL AXES
                                                                        1420 LET Pl=0
                                                                        1430 LET P2=500
                                                                        1440 LET P3=3
                                                                        1450 GOSUB 9968
                                                                        1460 LET S$="PEAK AREA"
                                                                        1470 FOR 1=1 TO LEWS*)
                                                                        1480   PRINT SMMJ?"a3>';
                                                                        1490 NEXT I
                                                                        1500 LET Pl=0
                                                                        1510 LET P2=0
                                                                        1520 LET P3=3
                                                                        1530 GOSUB 9968
                                                                        1540 LET ^'CONCENTRATION  IN KICROGRANS PER LITER"
                                                                        1550 IF Nl>2 THEN LET S$*'          MASS IN NANOGRAMS"
                                                                        1560 PRINT •C29>';P4$;'<31>'; TAB(28)JS«
                                                                        1570 REH   	
                                                                        1580 REH         SCALE VERTICAL AXIS
                                                                        1590 LET Sl=0
                                                                        1600 LET S2=0
                                                                        1610 FOR 1=1 TO LEN(I$}/8
                                                                        1620   IF G2[2*D>S2  THEN LET S2=G2C2fI]
                                                                        1630 NEXT I
                                                                        1640 GOSUB 9805
                                                                        1650 LET Y8=Sm
                                                                        1660 LET Y9=S[12]
                                                                        1670 LET Pl=0
                                                                        1680 LET P3=3
                                                                        1690 FOR 1=1 TO 12
                                                                        1700   LET P2=58HI-l)f54
                                                                        1710   GOSUB 9968
                                                                        1720   PRINT •<29>-;P4*;'<31>'5
                                                                        1730   PRINT USING 'Htfttttir.Sm
                                                                        1740 NEXT I
                                                                        1750 HEH   	
                                                                        1760 REN         SCALE HORIZONTAL AXIS
                                                                        1770 LET Sl=0
                                                                        1780 LET S2=0
                                                                        1790 FOR 1=1 TO LEN(I$)/8
                                                                        1800   IF G2f2*I-n>S2 THEN LET S2=G2E2*I-n
                                                                        1810 NEXT I

                                                                        1231567891123456789212345678931234567894123456789512345678961234567897
                                                                                 0        00         0        0         0         0

-------
G-A-S   C-IHHHHKHHHHHHH   A-tf-T-O-N-A-T-I-O-N
7/20/1979
                        PROGRAM LISTING FOR GC06
S-Y-S-T-E-H  G-A-S   C-H-IHHHHHHHM-P-H-Y   A-U-T-0-N-A-T-I-O-N   S-Y-S-T-E-M
    PAGE  5  7/20/1979                                                      PAGE  6
                                    PROGRAM LISTING FOR GC06
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1820 GOSUB 9805
 1830 LET X8=Sm
 1840 LET X9=SI121
 1850 IF Sri2]>=10 THEN GOTO 1880
 1860 LET 85$=" LIT
 1870 GOTO 1920
 1880 IF SC12]>=100 THEN GOTO 1910
 1890 LET Q5f=* «.!'
 1900 GOTO 1920
 1910 LET Q5*="ifffl"
 1920 LET P2=30
 1930 FOR 1=1 TO 12
 1940   LET Plsi05HI-l)f78
 1950   GOSUB 9968
 1960   PRINT *<29>";P4*;'<31>";
 1970   fRINT USING 85$,Sm
 1980 NEXT I
 1990 REN   	
 2000 REM          DRAWHARKERS
 2010 LET P4=P4+147
 2020 LET P5=P5+70
 2030 LET P54='»*
 2040 FOR 1=1 TO LENU$)/8
 2050   LET Prn=858»(G2[2*I-t]-X8)/(X9-X8)
 2060   LET Qm=594*(G2£2*IJ-Y8)/(Y9-Y8)
 2070 NEXT I
 2080 LET Q3=LEN(I$)/8
 2090 LET 87=-i
 2100 IF KO3 THEN GOTO 2160
 2110 LET S7=l
 2120 LET Pl=0
 2130 LET P2=0
 2140 LET P3=3
 2150 GOSUB 9968
 2160 GOSUB 9881
 2170 REN  	.—-——
 2180 REN         DRAW CURVE
 2190 IF K=3 THEN GOTO 2390
 2200 LET 03=1
 2210 FOR I=Y8 TO .99*Y9 STEP (Y9-Y8J/100
 2220  LET Qr83J=594f(I-Y8>/(Y9-Y8)
 2230  LET X7=R1+R2*I

 1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
              1234567891123456789212345678931234567894123456789512345678961234567897
                       0000000
              2240   IF K=2 THEN LET X7=X7+R3*IA2
              2250   LET PCQ3]=858f(X7-X8)/(X9-X8)
              2260   IF PI83KO THEN GOTO 2290
              2270   IF P[Q3»858  THEN GOTO 2290
              2280   LET 83=03*1
              2290 NEXT I
              2300 LET 63=83-1
              2310 LET Pl=Pm
              2320 LET P2=em
              2330 LET P3=3
              2340 GOSUB 9968
              2350 LET 07=0
              2360 GOSUB 9881
              2370 REN   	
              2380 REN         SOUND THE BELL! ALLOW TINE FOR HARD COPY
              2390 FOR 1=1  TO 5
              2400   PRINT  ••
              2410   DELAY  =.3
              2420 NEXT I
              2430 TINE =60
              2440 ON ERR THEN  GOTO 2460
              2450 TINPUT ",X$
              2460 ON ERR THEN  STOP
              2470 PRINT "<27X12>';
              2480 DELAY =1
              2482 IF XO2 THEN GOTO 2490
              2483 PRINT "<27>E'
              2484 PRINT "a7>HC27>J>
              2435 PRINT '<27>tDE'
              2490 PRINT TAB(15);"C-A-L-I-B-R-A-T-HBI   D-A-T-A   R-E-P-Q-R-T"
              2500 GOTO 2690
              2510 REH   	
              2520 REN         PRINT TABLE OF RESIDUALS
              2530 PRINT
              2540 PRINT
              2550 PRINT TAB(15);'C-A-i-I-B-R-A-T-I-0-N   D-A-T-A   R-E-P-0-R-T"
              2560 PRINT 'ANALYST:  *;U${ TAB(60);'ICTHOD:  ";T$[3,6]
              2570 PRINT •IDENTIFIER:  ";V7$! TAB(43)J"DATE OF CALIBRATION:   ";D4$
              2580 PRINT 'TYPE OF FIT:  ";
              2590 ON K THEN GOTO 2600, 2620, 2640, 2660
              2600 PRINT "LINEAR REGRESSION";
              2610 GOTO 2670

              1234567891123456789212345678931234567894123456789512345678961234567897
                       0000000

-------
G-A-S   C4fR-0-M-A-T-0-G-R-ft-P-H-Y  A-ihT-O-M-A-M-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  7
                        PROGRAM LISTING FOR GC06

 1234567891123456789212345678931234567894123456789512345678961234567897
          OOOOOOO
 2620 PRINT 'QUADRATIC REGRESSION';
 2630 GOTO 2670
 2640 PRINT 'LINEAR INTERPOLATION';
 2650 GOTO 2670
 2660 PRINT 'LINEAR REGRESSION THROUGH ORIGIN";
 2670 PRINT  TABI51);
 2680 PRINT USING 'FITTING ERROR: Mt.ttZ",J3
 2690 PRINT
^2700 PRINT 'INJECTION ID  PEAK AREA   PREPARED

 2710 PRINT '	
*     -•
 2720 LET 051='
*     »'
 2730 FOR 1=1 TO L£N'Y" THEN GOTO 0640
 3130NOESC
 3140 CHAIN 'GCOO'
 9800 REH   I I H H 11 H 111 I I 11 IKHf+l 111 I If I 111 I I 111 M I I! I 11 f-Ktt f Ht+t
 9^1 REN          SUBROUTINE  TO PERFORM SCALING  CBSCSCL.SR)
 9805 DIM SC121
 9806 LET S7=0
 9808 LET S3=S2-S1
 9809 IF S3>=1 THEN GOTO 9815
 9810 LET S1=S1*10
 9811 LET S2=S2*10
 9812 LET S7=S7+1
 9813 GOTO 9808
 9815 LET 84=0
 9816 IF S3C100 TBFN GOTO 9820
 9817 LET S3=S3/10
 9818 LET S4=S4+1
 9819 GOTO 9816
 9820 IF Sl=0 THEN IF S3-10*INT
-------
01
no
      G-A-S   CHHHH1-fr-T-OTQ?
9897 RETURN
9900 REH   MinimumIIH
9901 DEN          SUBROUTIIC TO PLACE WRKERS (BSOKR.SR)
                                                                     +H»U
       9905
       9906
     DIM P5JC10]
     SQSUfi
9958
9907 RETURN
9908 LET Pl=Ul-5
9909 LET P2=U2-8
9910 LET U3=P3
9911 LETP3=3
9912 COSUR 9968
9913 PRINT '<29>'?P4$;
9914 PRINT 'C31>';P5$n,LEN(P5$)]
9915 LET P1=U1
9916 LET P2=U2
9917 COSUB 9968
9918 LET P3=U3
9919 RETURN
9920 REH   tP3$[32J,P4*[4]
9959 LET P4=0
9960 LET P5=0
9961 LET P6=0
9962 LET Pl*=" !<34>«»i'()«-,-./0123456789:;<=>?"
9963 LET P2*="«AKDEF(»kiaJWOPCRSTtJVWXYZt\]A_"
9964 LET P3*="vflBCDEFGHIJKU11'
9965 LET P3f=P3$,'NOPCRSTUVHXV"
9966 LET P3S=P3$,'ZI\r-
9967 RETURN
9968 IF P3OO TJCH GOTO 9972
9969 LET P4=P1
9970 LET P5=P2
9971 RETURN
9972 PRINT "C29>"!
9973 IF LEN(P4*)OO THEN PRINT P4$[4,4]J
9974 LET P7=M(PltP4J
9975 LET P8=INT(P2+P5)
9976 IF P7>1023 THEN LET P7=1023
9977 IF P7<0 THEN LET P7=0
9978 IF P8>780 THEN LET P8=780
9979 IF P8<0 THEN LET P8=0
9980 IF P3=2 THEN LET P6=l
9981 IF P3=3 THEN LET P6=0
9982 LET P9=IMT(P8/32)
9983 LET P8=PB-
-------
      C-A-S   C4HH>-H-fl-HHHHH»-H-Y   A-U-T-0-H-A-T-HHf   S-Y-S-T-E-fl G-A-S   C-H-R-(H»-A-T-0-G-R-fl-P-«-Y   A-U-T-0-N-A-T-I-O-N   S-Y-S-T-E-M
      7/20/1979                                                     PAGE 11  7/20/1979                                                      PAGE 12
                             PROGRAH LISTING FOR GC06                                                SYMBOL TABLE FOR GC06

       1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
               0000000
       9988 LET P9=P9+1                                                        0120  0154
       9989 LET P4**4«,Pl«P9,P9J,P2ttP7,P7]                                  0150  0130
       9990 IF P6OO THEN GOTO 9992                                            0160  0151
       9991 PRINT "<29>";                                                      0210  0160
       9992 PRINT P4*                                                          0260  0200
       9993RETUttl                                                             0570  0600
                                                                              0610-0580
                                                                              0640  0750  0850  0920  3120
                                                                              0680  0710
                                                                              0720  0650
                                                                              0780  0690
                                                                              0880  0810
                                                                              0930  0890
                                                                              0980  0971
                                                                              1060  1050
                                                                              1080  1050
                                                                              1100  1050
                                                                              1120  1050
_                                                                            1130  1070  1090  1110
oo                                                                            1880  1850
                                                                              1910  1880
                                                                              1920  1870  1900
                                                                              2160  2100
                                                                              2290  2260  2270
                                                                              2390  2190
                                                                              2460  2440
                                                                              2490  2482
                                                                              2530  0970
                                                                              2600  2590
                                                                              2620  2590
                                                                              2640  2590
                                                                              2660  2590
                                                                              2670  2610  2630  2650
                                                                              2690  2500
                                                                              2750  2740
                                                                              2770  2740
                                                                              2790  2740
                                                                              2800  2760  2780
                                                                              2860  2850
                                                                              2880  2850
                                                                              2900  2850
                                                                              3060  2820  2850  2870  2890
                                                                              3110  3090
       1234557891123456789212345678931234567894123456789512345678961234567897   3130  0100
               0         0         0         0         0        0         09805  1640  1820

-------
G-ft-S   C4ffl-
-------
                                   SECTION 9

                    PROGRAM  GC07  -  EXTANT INJECTION LISTING


    GC07  is  the  program  which  lists  the  injection ID numbers and report
titles for the data files that are currently in  existence.   This program is
entered by chaining from the master  control program,  GCOO,  and it chains
back to that program if  the escape key is pressed.

    As GC07  begins,  it gives the user three choices:. 1)  print all extant ID
numbers for  one  instrument, 2) print ID  numbers  for a specific date for one
instrument,  or 3) print  the report title for any ID from  any instrument.
The program then branches to the appropriate routine.

    The first two choices involve  reading ID numbers  from an ID list file.
GC07 asks the user  for the number  of the instrument,  and  uses  this number to
generate  the name of the appropriate ID  list file.   It then checks whether
the ID list  file exists.  The  ID list file  must  be  opened carefully since
the microcomputer may be running GC21 which also opens ID list files.
Therefore, GC07 establishes an OR  ERR THEN  GOTO  condition,  opens the ID list
file, copies the entire  file into  a  superstring,  and  promptly  closes the
file to avoid making  the microcomputer wait.

    Then, if the user has selected the first type of  report, GC07 prints all
of the ID numbers,  except dummy  ID numbers.   If  the user  has selected  the
second type  of report, GC07 asks for a month and date,  and  prints only those
ID numbers which match the specified month  and date.   If  none  of the ID
numbers match, the  user  is  informed  of that fact.

    The third type  of report is  different from the  other  two in  that it gets
the report title from an injection data  file.  The  user is  asked for the ID
number of interest,  and  GC07 opens the appropriate  data file.   It finds the
report title and prints  it.  The program then gives the user a chance  to
examine another file.

    After any of these types of  reports,  the escape feature is disabled,  and
the program chains  back  to GCOO.
                                     65

-------
GCOO
      A-//-/E
             ENTER
            r~TYPEOF
                LIST
             FREAD ID'S
             FROM ID
             LIST FILE
               EXTANT
             INJECTIONS
               REPORT
                                        [MONTH AND
                                            DAY
    EXTANT
^INJECTIONS)
    REPORT,
                                        c
   CHAIN
                                                                    INJECTION ID
                                                                     READ TITLE
                                                                     ROM DATA)
                                                                      REPORT
                                                                       TITLE
                  GCOO
                 Figure 8. Flowchart of Program GC07.
                                          66

-------
                TABLE 6.  SYMBOL DEFINITIONS FOR PROGRAM 6C07
C$       the name of the ID  list file
D2$      an injection ID Number
D3$      a data file name
E        a counter for the number of ID Numbers which match the  specified
         date
F$       a report title
I        the control variable for loops
1$       the superstring of extant ID numbers
0        the data file useability flag
J$       the date of an injection, in the form MMDD
X        the user's answer to a multiple choice question
X$       a Y or N answer input by the user
X2       the instrument number input by the user
X3       the month and date numbers input by the user
                                      67

-------
      G-A-5  C4HMHHHHHJ-R-A-P4f-Y   A-U-HHHH-I-0-N  S-Y-S-T-E-H
      7/20/1979                                                      PAGE  1
                             PROGRAM LISTING FOR GC07

       123*567891123456789212345678931234567894123*56789512345678961234567897
               0         0         0         0         00         0
       0010 REH   +=+=t=+=f=+=*=+='i«+=t=t=*=+=4=+=f=*='iot=+=+s+=+=i«+=+=+=+=f
       0020 RED   +   GAS CHRONATOGRAPHY AUTONATION SYSTEM                 +
       0030 REH   *   PROGRAM GC07, DATA FILE LISTING                      f
       0040 REN   +   BY:  J. KOPKE (SHORCC), JANUARY 23,  1979             +
       0045 REH   +   HOST RECENT REVISION:  HAY 1, 1979                   *
       0050 REH   +sf=f=+=t=t=*«+=+=+=t=+=t=+=+=t=t=-|.=+=+=-H:t=+=+=+=f=+=+=+=t
       0060 REM
       0070 ESC
       0080 ON ESC THEN GOTO 1460
       0090 DIM C$[83,DM8],D3$nO],F$[30],IttlOOO],J$[4LX$[3]
       0120 REH	
       0130 REH          DEFINE SEARCH
       0140 PRINT
       0150 PRINT 'HERE ARE THE TYPES OF LISTS:"
       0160 PRINT
       0170 PRINT '     1.  ALL EXTANT ID NUMBERS FROM ONE INSTRUMENT11
       0180 PRINT "     2.  ID NUMBERS FOR A SPECIFIC DATE FROM ONE  INSTRUHEN
      t    T"
^     0190 PRINT '     3.  TITLE OF REPORT FOR ANY ID FROM ANY INSTRUMENT"
gj     0200 PRINT
       0205 ON ERR THEN GOTO 0215
       0210 INPUT 'WHICH TYPE DO YOU WANT TO USE?  (1. 2,  OR 3)  ",X
       0215 ON ERR THEN STOP
       0220 ON X THEN GOTO 0260, 0260, 0920
       0230 PRINT
       0240 PRINT "<7X7>";X5"IS NOT A VALID TYPE NUMBER."
       0250 GOTO 0140
       0255 REH   	
       0256 REH          COPY ID LIST FILE INTO SUPERSTRING
       0260 PRINT
       0265 ON ERR THEN GOTO 0271
       0270 INPUT 'WHAT INSTRUMENT NUMBER?  ",X2
       0271 ON ERR THEN STOP
       0272 IF X2=ABS(INT(X2J) THEN IF X2C=99 THEN GOTO 0280
       0273 PRINT
       0274 PRINT •<7X7>"JX2!'IS NOT A VALID INSTRUMENT NUMBER."
       0275 GOTO 0260
       0280 LET C*="GCOOQOOO"
       0290 LET C«9-iEN(STR$=-9 THEN GOTO 0400
 0370 PRINT
 0380 PRINT "THERE HAVE NOT BEEN ANY INJECTIONS INTO  INSTRUMENT '5CK7,
y     81** *
 0390 GOTO'1460
 0400 ON ERR THEN GOTO 0460
 0410 OPEN FILEC2.0LCM1
 0420 ON ESC THEN GOTO 0500
 0430 ON ERR THEN STOP
 0440 GOTO 0530
 0460 ON ERR THEN STOP
 0470 DELAY =1
 0480 GOTO 0400
 0500 CLOSE FILEC2J
 0510 GOTO 1460
 0530 FOR 1=1 TO 100
 0540   READ FILEC2, II, I«10*I~9,10*1]
 0550 NEXT I
 0560 CLOSE FILEC2]
 0570 ON ESC THEN GOTO 1460
 0580 IF X=2 THEN GOTO 0700
 0590 REM   	
 0600 REN          PRINT ALL ID NUMBERS
 0610 PRINT
 0611 PRINT
 0612 PRINT  TABU4>;*E-X-T-A-H-T   I-N-J-E-C-T-I-O-N-S   R-E-P-0-R-T"
 0613 PRINT "INSTRUMENT NUMBER:  ';C«7,8];  TAB(59);'ALL INJECTIONS"
 0614 PRINT
 0620 FOR 1=1 TO 100
 0630   IF I$tlO«I-9,10«n="GC99999?99" THEN GOTO 0670
 0640   PRINT I$tlO*I-7,10*n;
 0645   IF I/6OINTU/6) THEN PRINT "      ";
 0650   IF I/6=INT(I/6) THEN PRINT
 0660 NEXT I
 0670 GOTO 1460
 0680 REH   	
 0690 REM          PRINT ID NUMBERS MATCHING A  DATE
 0700 PRINT
 0705 ON ERR THEN GOTO 0711

 l2345678911234567892l23456789312345678941234Kv789512345678961234567897
          0000000

-------
to
      G-A-S   CHHMHHhHHH?-fl-P-H-Y   A-U-HHHK-I-fl-fl   S-V-S-T-£-N  &*•$   C4HMHHi-T-'!JC3{"IS NOT A VALID MONTH."
0715 GOTO 0700
0720 LET J$='0000"
0730 LET J$[3-LEN(STR$tX3)},2]=STRtCX3)
0740 PRINT
0745 ON ERR TO* GOTO 0751
0750 INPUT "WHAT DATE?  (1, 2, 3, .... OR 31)  ",X3
0751 ON ERR TIEN STOP
0752 IF X3=ABS(INT";X3;"IS NOT A VALID DATE.'
0755 GOTO 0740
0760 LET J*[5-LEN(STR$(X3)M}=STRt(X3)
0770 PRINT
0771 PRINT
0772 PRINT  TABU4)!'E-X-HHI-T   BKJ-E-C-MHHI-S
0773 PRINT "INSTRUMENT NUMBER:  "iCUT.Uf •
               R-E-P-0-R-T"
                 MONTH:  ";J
0820
0825
0830
'}
       0780 LET E=0
       0790 FOR 1=1 TO 100
       0800   IF W10fI-5,10*I-2JOJJ THEN GOTO 0840
       0810   PRINT mi0*l-7rl0tlli
              LET E=E+1
              IF E/6OINTCE/6) THEN PRINT •
              IF E/6=INT(E/6) THEN PRINT
       0640NEXTI
       0850 IF EOO THEN GOTO 1460
       0870 PRINT 'NONE'
       0890 GOTO 1460
       0900 REH   - - __
       0910 raj         PRINT VARIAN REPORT TITLE FOR A SPECIFIC ID
       0920 PRINT
       0925 ON ERR THEN GOTO 0935
       0930 INPUT THAT I??  ",D2J
       0935 ON ERR THEN STOP
       0940 IF LEN(D2*)O8 THEN GOTO 1030
       0945 IF D^'OOOOOOOO" THEN GOTO 1030
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0950 LET D3*=*GC",0»
 0960 ON ERR THEN GOTO 0980
 0970 RENAME D3*.D3$
 0980 ON ERR THEN STOP
 0990 IF SYS(7)O-48 THEN GOTO 1020
 1000 DELAY =1
 1010 GOTO 0960
 1020 IF SYS(7)=-9 THEN GOTO  1090
 1030 PRINT
 1040 PRINT "THERE IS NO EXISTING DATA FOR INJECTION ";D2*!".B
 1050 GOTO 1410
 1090 ON ERR THEN GOTO 1150
 1100 OPEN FILE[3,0]>D3*,31
 1110 ON ESC THEN GOTO 1190
 1120 ON ERR THEN STOP
 1130 GOTO 1220
 1150 ON ERR THEN STOP
 1160 DELAY =1
 1170 GOTO 1090
 1190 CLOSE FILEC3J
 1200 GOTO 1460
 1220 READ FILEC3.1LJ
 1230 IF J=l THEN GOTO 1300
 1240 PRINT
 1250 IF J=2 THEN PRINT 02$;" CANNOT BE USED BECAUSE THE REPORT DID NOT
*      fWVE A TOTAL AREA.*
 1260 IF J*3 THEN PRINT D2$f" CANNOT BE USED BECAUSE THE REPORT HAS IN
*     THE WRONG FORMAT.'
 1270 CLOSE FILEC3J
 1280 ON ESC THEN GOTO 1460
 1290 GOTO 1410
 1300 LET 1=2
 1310 READ FILEC3.ILF$
 1320 IF FHl^JO-NESSAGE" THEN GOTO 1350
 1330 LET 1=1+1
 1340 GOTO 1310
 1350 LET 1=1+1
 1360 READ FIL£[3,ILF*
 1370 CLOSE FILED]
 1380 ON ESC THEN GOTO 1460
 1390 PRINT
 1400 PRINT "FOR ID ";D2$i",  THE REPORT TITLE IS  '";F*;"."
       12345&7891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
               0000000            0000000

-------
D-ft-S   MHHHf*-HHHHHH*-Y   /HFHHHK-UHI   S-Y-S-T-E-J)
7/20/1979                                                      PAGE  5
                       PROGRAH LISTING FOR GC07
                                                                       G-A-5  C-fHMHHJ-T-KHJ-R-A-JMl-Y   A-U-HHHH-I-O-N   S-Y-S-T-E-H
                                                                       7/20/1979                                                       PflGE  6
                                                                                              SYMBOL TABLE FOR GC07
 1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
          0000000	
 1410 PRINT
 1415 ON ERR THEN GOTO 1425
 1420 INPUT -00 ¥W WANT TO PRINT THE TITLE FOR ANOTHER ID?  (Y OR N)
*     *»X$
 1425 ON ERR THEN STOP
  430 IF»[MJ="Y'  THEN GOTO 0920
 1440 REN
 450 REN
 460 PRINT
1461 PRINT
1462NOESC
1470 CHAIN
                   CHAIN BACK TO GCOO
             CCOO'
 123456789112345678921234567893l2345678941234567895l234567mi234567897
          0000000
0140  0250
0215  0205
0260  0220  0275
0271  0265
0280  0272
0300  0350
0320  0300
0360  0330
0400  0360  0480
0460  0400
0500  0420
0530  0440
0670  0630
0700  0580  0715
0711  0705
0720  0712
0740  0755
0751  0745
0760  0752
0840  0800
0920  0220  1430
0935  0925
0960  1010
0980  0960
1020  0990
1030  0940  0945
1090  1020  1170
1150  1090
1190  1110
1220  1130
1300  1230
1310  1340
1350  1320
1410  1050  1290
1425  1415
1460  0080  0390
C*    0090  0280
D2*   0090  0930
D3»   0090  0950
E     0780  0820
Ft    0090  1310
FLI2  0410  0500
ai3  1100  1190
I     0530  0540
      0800  0810
                                                                                         0510  0570  0670  0850  0890  1200  1280  1380
                                                                                         0290  0310  0380  0410  0613  0773
                                                                                         0940  0945  0950  1040  1250  1260  1400
                                                                                         0970  1100
                                                                                         0825  0830  0850
                                                                                         1320  1360  1400
                                                                                         0540  0560
                                                                                         1220  1270  1310  1360  1370
                                                                                         0550  0620  0630  0640  0645  0650  0660  0790
                                                                                         0840  1300  1310  1330  1350  1360

-------
G-A-S   C-WHMHf-A-T-0-GHHHHHT   
-------
                                  SECTION 10

         PROGRAM GC08 - INTERNAL STANDARDS CONCENTRATION CALCULATION
    The internal standards calibration method is a planned future
enhancement of the 6CAS, but it has not been implemented  in Version  I.
                                     72

-------
      G-A-S   C4HMHHHHHHHH>-H-Y   A-U-HMHK-I-O-N   S-Y-S-T-E-M G-A-S   C-H-R-0-H-A-WJ-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-fl
      7/20/1979               DOKD/U. , TOTTUT «» «™               PflGE   1  7/20/1979                                                       PAGE  2
                              PROGRAM LISTING FOR GC08                                                SYMBOL TABLE FOR GC08

       1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
                0000000		
       0010 REM   +=f=+=*=t=t=+=+=f=+=f=+s;t=+='f=t=4-=+=t=-Hs+=t=+=t=-f=+=+=+=+=+   oooo
       0020 REM   +   GAS CHROMATOGRAPHY  AUTOMATION SYSTEM                  +
       0030 REM   +   PROGRAM GC08,  INTERNAL CALIBRATION PROCESSING         +
       0040 REM   4   BY:   J.  KOPKE  (SWORCC),  JANUARY 10, 1979              +
       0045 REM   +   HOST RECENT REVISION:   MARCH 21,  1979                 t
       0050 REM
       0060 REM
       0070 ESC
       0080 ON ESC THEN GOTO 9998
       0090 PRINT
       0110 PRINT "<7X7>INTERNAL STANDARDS PROCESSING IS NOT OPERATIONAL AT
      *     THIS TIME.'
       9998NOESC
       9999 CHAIN 'GCOO"
co
       1234567891123456789212345A78931234567894123456789512345678961234567897
                0000000

-------
                                  SECTION 11

           PROGRAM GC09 - PURGE AND TRAP CONCENTRATION CALCULATION
    GC09 is the program which calculates concentrations of compounds  in
samples prepared by the purge and trap method.  It is entered by chaining
from the master control program, GCOO, and  it chains back to that program  if
the escape key is pressed.

    As the execution of GC09 begins, the method file is already open.  The
program asks the user for the injection ID  of the injection which is  to be
processed, and it opens the corresponding data file.  The program checks the
data file useability flag, and informs the  user if the data file is
unusable.  It then displays any error messages which were in the original
report.

    Next, the program reads the data for a  single peak from the data  file.
If the peak is an unexplained peak, a dummy concentration of -9999 is
written into the data file, and the program goes on to the next peak.

    For named peaks, the program searches the method file for a matching
identifier.  If there is no matching identifier, the user is informed  that
the concentration cannot be calculated, and a dummy concentration of  -9999
is written into the data file.

    If a matching identifier is found, the  program checks whether the
identifier has been calibrated.  If it has  not, the user is informed  that
the concentration cannot be calculated, and a dummy concentration of  -9999
is written into the data file.

    If the matching identifier has been calibrated, the program checks the
type of calibration and branches to the appropriate section of code.   If the
type of calibration is linear regression or quadratic regression, the
program uses the regression equations developed during calibration to
calculate the concentration, which is written into the data file.

    If the type of calibration is linear interpolation, the program finds
the two calibration standards whose peak areas bracket the peak area  of the
unknown.  If the peak area of the unknown is lower than that of the lowest
calibration standard, the program uses the  origin and the lowest calibration
standard as the basis for the interpolation.  If the peak area of the
unknown is higher than that of the highest  calibration standard, the  program
extrapolates through the two highest calibration standards.  In any case,
the concentration of the unknown is calculated by the formula


                                     74

-------
 Concg  -  Cone,
Area,, -
         Cone. =
and written into the  data file.
I
                                            Area  - Area
^
    When  all of the  peaks in the  data file have been processed, this  program
chains  to the retention time calculation program,  6C12,  leaving the method
file  and  the injection data file  open.
    C GCOO  \^/-{ENTER GCOS)
                INJECTION ID
               /READ PEAK/
               (FROM DATA!
             yes
                        yes
                (READ CAL. /
                INFO. FROM/
                 METHOD I
                  FILE  1
                           Figure 9.  Flowchart of Program GC09.
                                       75

-------
                TABLE 7.  SYMBOL DEFINITIONS FOR PROGRAM GC09
B        the absolute retention time of a peak
C        the area of a peak
D2$      an injection ID
D3$      the name of a data file
D4$      the date of calibration
F        the number of identifiers in the method file
F()      the array of flags used to record which identifiers are found  in
         the data file
G$       the identifier from the data file
G2()     the array of concentrations and areas of standards
H$       the peak type
I        a counter used in interpolation to locate the standards between
         which the unknown lies
1$       the superstring of ID's of standards
15       the number of standards used to calibrate an identifier
17       a counter used to locate an identifier in a method file
J        the data file useability flag
              J=l   the data is useable
              J=2   the report did not have a TOTAL AREA
              J=3   the report was in the wrong format
J3       the fitting error of the regression
K        the type of fit
              K=l   linear regression
              K=2   quadratic regression
              K=3   linear interpolation
              K=4   linear regression forced through the origin
                                      76

-------
                            TABLE 7.  (Continued)

L        the calculated relative retention time or capacity ratio
Ml       the concentration of the standard below the unknown
M2       the area of the standard below the unknown
M3       the concentration of the standard above the unknown
M4       the area of the standard above the unknown
P9       a counter for the position in the data file of the peak being
         processed
Rl       the constant term in the regression equation
R2       the linear term in the regression equation
R3       the quadratic term in the regression equation
T$       the name of the method file
V$       an identifier from the method file
V0$      a MESSAGE read from the data file
                                      77

-------
     G-A-S   MHHHHK-0-G-R-A-P-«-Y   A-U-T-0-H-A-T-I-O-N
      7/20/1979
                             PROGRAM LISTING FOR GC09
S-Y-S-T-E-M
    PAGE  1
       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
       0010 REN   +c+=+=+=+=+=+=+=+=+=+=*=+=+=4=t=+=+=*=+=+='i-=+=-i-=t=-i-=+=4=+=+
       0020 REN   +   GAS CHROHATOGRAPHY AUTONATION SYSTEM                  +
       0030 REN   +   PROGRAN GC09, PURGE AND TRAP PROCESSING               +
       0040 REN   +   BY:  J. KOPKE (SHORCC), FEBRUARY 13, 1979             +
       0045 REN   +   HOST RECENT REVISION:  APRIL 2. 1979                  +
       0050 REN   +c+=4.=+=f=+=t=+=+=+=+=*=+=+=+=t=+=+=+r4=+=f=*=*=+=+=*=+=t=+
       0060 REN
       0070 ESC
       0080 ON ESC THEN GOTO 0110
       0090 DIN D2«[8J.D3$[103.D4$[8].(]$C8].G2[30],H$[2],I«[1601,Ti[6]>V$[8],
      *    VO$C20]
       0095 DIN F£603
       0096 HAT F=ZER
       0100 GOTO 0160
       0110 ON ERR THEN GOTO 0112
       0111 CLOSE FILEC3J
       0112 ON ERR THEN STOP
       0120 NOESC
^     0130 CHAIN "GCOO"
oo     0140 REN	
       0150 REN          COUNT  IDENTIFIERS IN METHOD FILE
       0160 LET F=0
       0170 READ FILEC4.1LTS
       0175 CLOSE FILEUJ
       0176 OPEN FILE[4,OJ,T*,200
       0180 READ FILEC4,3*(F+l)-l],Vf
       0190 IF EOF(4)  THEN GOTO 0240
       0200 LET F=F+1
       0210 GOTO 0180
       0220 REN   	
       0230 REN          OPEN DATA FILE
       0240 PRINT
       0245 ON ERR THEN GOTO 0255
       0248 PRINT 'WHAT IS THE  ID FOR THE INJECTION TO BE PROCESSED BY METHOD
      0250  INPUT  '?   ',B»
      0255  ON ERR THEN STOP
      0260  IF LEN(D2$)=8 THEN GOTO 0300
      0270  PRINT
      0280  PRINT  '<7X7>"5D2i!' IS NOT A VALID INJECTION ID.'
      0290  GOTO 0240
      0300  LET D3$='GC',D2$

      1234567891123456789212345678931234567894123456789512345678961234567897
               OOOOOOO
G-A-S   C-H-R-0-fHK-O-G-R-A-P-H-Y   A-U-T-fl-H~A-T-I-0-N   S-Y-S-T-E-H
7/20/1979                                                       PAGE  2
                        PROGRAM LISTING FOR GC09

 1234567891123456789212345678931234567894123456789512345678961234567897
          OOOOOOO
 0310 ON ERR THEN GOTO 0330
 0320 RENAME D3S.D3*
 0330 ON ERR THEN STOP
 0340 IF SYS(7)O48 THEN GOTO 0370
 0350 DELAY =1
 0360 GOTO 0310
 0370 IF SYS(7)=-9 THEN GOTO 0410
 0380 PRINT
 0390 PRINT "<7X7>THERE IS NO EXISTING DATA FOR INJECTION ID ";D2*;V
 0400 GOTO 0240
 0410 ON ERR THEN GOTO 0450
 0420 OPEN FILEC3,0],D3$.31
 0430 ON ERR THEN STOP
 0440 GOTO 0500
 0450 ON ERR THEN STOP
 0460 DELAY =1
 0470 GOTO 0410
 0480 REM   	
 0490 REM          CHECK DATA FILE USABILITY FLAG
 0500 PRINT
 0510 PRINT 'PLEASE BE PATIENT.'
 0520 READ FILEtS.lLJ
 0530 IF J=l THEN GOTO 0610
 0540 PRINT
 0550 IF J=2 THEN PRINT •<7X7>"!D2*f' CANNOT BE USED BECAUSE THE REPOR
*     T DID NOT HAVE A TOTAL AREA."
 0560 IF J=3 THEN PRINT '<7X7>'JD2$;' CANNOT BE USED BECAUSE THE REPOR
*     T HAS IN THE WRONG FORMAT.'
 0570 CLOSE FILEE3]
 0580 GOTO 0240
 0590 REN   	
 0600 REM          DISPLAY ANY ERROR MESSAGES
 0610 LET P9=2
 0620 READ FILE£3,P93,VO»
 0630 IF VOS[1,7]0"NESSAGE* THEN GOTO 0710
 0640 PRINT
 0650 PRINT 'THE FOLLOWING MESSAGE HAS PART OF THE REPORT FOR"
 0660 PRINT'     INJECTION ' 5 D2*!":  ";VO$
 0670 LET P9=P9H
 0680 GOTO 0620
 0690 REM   	
 0700 REH          MATCH IDENTIFIER WITH CALIBRATION DATA

 1234567891123456789212345678931234567894123456789512345678961234567897
          OOOOOOO

-------
G-A-S   C4H?-0-fHK-^HHHHHf-Y  HJ-HHHH-HHI   S-Y-S-T-E-H
7/20/1979                                                      PAGE  3
                        PROGRAM LISTING FOR GC09

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0710 LET P9=P9+2
 0720 READ FILEt3,P91,G$,H$,B,C
 0730 IF EOF(3)  THEN GOTO 1430
 0740 REH   -
 0750 REN     SKIP UNEXPLAINED PEAKS
 0760 IF GIO'XXXXXXXX'  THEN GOTO 0820
 0770 WRITE FILEt3,P9],G$,H$,B,C,-9999
 0780 LET P9=P9+1
 0790 GOTO 0720
 0800 REH
 0810 REN     LOCATE HATCHING IDENTIFIER IN METHOD FILE
 0820 FOR 17=1 TO F
 0830   READ FILEE4, 3*17-1 LV*
 0840   IF G$=V$ THEN  GOTO  0960
 0850 NEXT 17
 0860 PRINT
 0870 PRINT "<7X7>THE REPORT FOR INJECTION 'JD2$!' CONTAINS A NAMED PE
f     AK KITH THE'
 0880 PRINT '     IDENTIFIER '";G*iV BUT HETHOD ";T$[3,6l;" DOES NOT
t     INCLUDE"
 0890 PRINT '     THAT IDENTIFIER."
 0900 PRINT 'THEREFORE, THE CONCENTRATION OF ";G$;' CANNOT BE CALCULATE
*     D."
 0910 WRITE FILEt3,P9L«,H*,B,C,-9999
 0920 LET P9=P9+1
 0930 GOTO 0720
 0940 REH   - -
 0950 REH     CHECK NHETHER IDENTIFIER HAS BEEN CALIBRATED
 0960 READ FILE[4,3*I7],D4*,I$,K,R1,R2,R3.J3
 0965 LET Ft 171=1
 0966 IF O-9999 THEN  GOTO  1410
 0970 IF D4$O"99/99/99' THEN GOTO 1080
 0980 PRINT
 0990 PRINT •<7X7>THE REPORT FOR INJECTION "JIGS!" CONTAINS A NAKED PE
«     AK WITH THE'
 1000 PRINT "     IDENTIFIER '"!»; V BUT THAT IDENTIFIER HAS NEVER BE
*     EN'
 1010 PRINT "     CALIBRATED IN ME1HOD ";T$C3,6];V
 1020 PRINT "THEREFORE,  THE CONCENTRATION OF ';G$;' CANNOT BE CALCULATE
*     D."
 1030 WRITE FILE[3,P9LG$,H*,B,C,-9999
 1040 LET P9=P9+1
G-A-S   C4HHHHK-0-G-R-A-P-H-Y  A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-fl
7/20/1979                                                      PAGE  4
                        PROGRAH LISTING FOR GC09

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1050 GOTO 0720
 1060 REH   	
 1070 REN          CALCULATE CONCENTRATION USING REGRESSION EQUATION
 1080 IF K=3 THEN GOTO 1160
 1090 LET L=R1+R2*C
 1100 IF K=2 THEN LET  L=L«fl3*C
 1110 WRITE FILE[3,P9LG$,H$,B,C,L
 1120 LET P9=P9+1
 1130 GOTO 0720
 1140 REH	
 1150 REH          CALCULATE CONCENTRATION USING INTERPOLATION
 1160 LET I5=LEN(I«>/8
 1170 HAT READ FILEE4,3*17+1],G2
 1180 IF 15=1 THEN GOTO 1200
 1190 IF OG2C2J THEN  GOTO 1250
 1200 LET Hl=0
 1210 LET H2=0
 1220 LET H3=G2C1]
 1230 LET H4=G2m
 1240 GOTO 1390
 1250 IF CC THEN GOTO 1350
 1330 LET 1=1+1
 1340 GOTO 1320
 1350 LET Hl=G2C2*(M)-n
 1360 LET H2=G2t2*(I-l)]
 1370 LET H3=C2C2*I-1]
 1380 LET H4=G2[2*H
 1390 LET L=((M3-H1)/(H4-H2»*(C-N2)+H1
 1400 WRITE FILE[3.P91,G$>H$,B,C,L
 1410 LET P9=P9+1
 1420 GOTO 0720
 1430 REH   	
 1440 REH          ADD UNDETECTED IMPOUNDS TO DATA FILE
 1450 FOR 1=1 TO F
 1460   IF F[IJ=1 THEN GOTO  1500
 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          00000000000000

-------
       G-A-S   C-fHHHHH-O-CrK-A-P-H-Y   A-U-HHf-A-T-HHf   S-Y-S-T-E-ff  G-A-S   C-fHMHHHHHHl-A-P-fl-Y   A-«-T-0-H-fl-T-HHi   S-Y-S-T-E-N
       7/20/1979                                                      PAGE  5  7/20/1979                                                      PAGE  6
                              PROGRAM LISTING FDR GC09                                               SYMBOL TABLE FOR GC09

        1234567891123456789212345678931234567894123456789512345678961234567897  SYHBOL    REFERENCES
                0  _      0         0         0        0         0         0
        1470   READ FILEI4,3*MJ,G*                                            0110  0080
        1475   IF C«='99999" THEN GOTO 1500                                     0112  0110
        1480   WRITE FILEt3,P9],<»," ',-9999,-J9999,-9999,-9999                   0160  0100
        1490   LETP9=P9+1                                                      0180  0210
        !^S US1 l                                                             0240  0190  0290  0400 0580
        1510 REN	—   0255  0245
        1520 REN          CONTINUE INTO PROGRAM GC18                             0300  0260
        1530 NOESC                                                              0310  0360
        1540 CittlN 'GC12'                                                       0330  0310
                                                                               0370  0340
                                                                               0410  0370  0470
                                                                               0450  0410
                                                                               0500  0440
                                                                               06(0  0530
                                                                               0620  0680
                                                                               0710  0630
                                                                               0720  0790  0930  1050 1130   1420
                                                                               0820  0760
oo                                                                             0960  0840
0                                                                             1080  0970
                                                                               1160  1080
                                                                               1200  1180
                                                                               1250  1190
                                                                               1310  1250
                                                                               1320  1340
                                                                               1350  1320
                                                                               1390  1240  1300
                                                                               1410  0966
                                                                               1430  0730
                                                                               1500  1460  1475
                                                                               B     0720  0770  0910 1030   1110  1400
                                                                               C     0720  0770  0910 0966   1030  1090  1100  1110  1190  1250
                                                                                     1320  1390  1400
                                                                               02*   0090  0250  0260 0280  0300  0390  0550  0560  0660  0870
                                                                                     0990
                                                                               03$   0090  0300  0320 0420
                                                                               04*   0090  0960  0970
                                                                               F     0096  0160  0180 0200  0820  1450
                                                                               FLI3  0111   0420  0520 0570  0620  0720  0770  0910  1030  1110
                                                                                     1400  1480
                                                                               R*4  0170  0175  0176 0180  0830  0960  1170  1470
                                                                               Ft     0095  0965  1460
                                                                               G$     0090  07?0  0760 0770  0840  0880  0900  0910  1000  1020
       1234567891123456789212345678931234567894123456789512345678961234567897         1030  1110  1400 1470   1475  1480
                0         0        0        0         0         0         0   G2     1170

-------
      G-fl-S   C4HHHHK-KHHHJ-P-H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-N
      7/20/1979                                                      PAGE  7
                              SYMBOL TABLE FOR GC09

      SYMBOL    REFERENCES

       G2C   0090  1190  1220  1230   1250 1260  1270  1280  1290  1320
             1350  1360  1370  1380
       H*    0090  0720  0770  0910   1030 1110  1400
       I     1310  1320  1330  1350   1360 1370  1380  1450  1460  1470

       If    0090  0960  1160
       15    1160  1180  1250  1260   1270 1280  1290
       17    0820  0830  0850  0960   0965 1170
       J     0520  0530  0550  0560
       J3    0960
       K     0960  1080  1100
       L     1090  1100  1110  1390   1400
       HI    1200  1260  1350  1390
       112    1210  1270  1360  1390
       K3    1220  1280  1370  1390
       H4    1230  1290  1380  1390
       P9    0610  0620  0670  0710   0720 0770  0780  0910  0920  1030
             1040  1110  1120  1400   1410  1480  1490
oo     Rl    0960  1090
-J     R2    0960  1090
       R3    0960  1100
       T*    0090  0170  0176  0248   0880  1010
       V$    0090  0180  0830  0840
             0090  0620  0630  0660

-------
                                  SECTION 12

                   PROGRAM 6C10 - LIQUID/LIQUID EXTRACTION
                          CONCENTRATION CALCULATION


    GC10 Is the program which calculates concentrations of samples prepared
by the liquid/liquid extraction method.  It is essentially the same as
program GC09.  The only difference is that this program asks the user for
the volume of the injection, the volume of the extract, and the volume of
the water extracted.  Using the calibration equations, this program
calculates the mass in nanograms of each compound.  It multiplies this mass
by the volume of the extract (in mi Hi liters) and divides by the product of
the volume of the injection (in microliters) and the volume of the water
extracted (in liters).   This produces the concentration in micrograms per
liter.

    There are three additional symbols used in GC10.  They are:

    Q    the volume of the injection
    R    the volume of the extract
    S    the volume of the water extracted
                                     82

-------
      G-d-S   C-H-R-';D2*5" IS NOT A  VALID INJECTION ID.'
 0290 GOTO 0240
 0300 LET D3*="GC%D2$
 1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
 0310 ON ERR THEN GOTO 0330
 0320 RENAHE D3*,D3$
 0330 ON ERR THEN STOP
 0340 IF SYS(7)0-48 THEN GOTO 0370
 0350 DELAY =1
 0360 GOTO 0310
 0370 IF SYS(7)=-9 THEN GOTO 0410
 0380 PRINT
 0390 PRINT "<7X7>THERE IS NO EXISTING DATA FOR INJECTION ID ';D2$;'."
 0400 GOTO 0240
 0410 ON ERR THEN GOTO 0450
 0420 OPEN FILE[3,OLD3$,31
 0430 ON ERR THEN STOP
 0440 GOTO 0520
 0450 ON ERR THEN STOP
 0460 DELAY =1
 0470 GOTO 0410
 0480 REH   	
 0490 REM          CHECK DATA FILE USABILITY FLAG
 0520 READ FILH3.1LJ
 0530 IF J=l THEN GOTO 0610
 0540 PRINT
 0550 IF J=2 THEN PRINT  "<7X7>";D2$5' CANNOT BE USED BECAUSE THE REPOR
ft     T DID NOT  HAVE A TOTAL AREA."
 0560 IF J=3 THEN PRINT  "<7X7>II;D2$?" CANNOT BE USED BECAUSE THE REPOR
ft     T HAS IN THE URONG FORMAT."
 0570 CLOSE FILEC31
 0580 GOTO 0240
 0590 REM	:	
 0600 REH          DISPLAY ANY ERROR MESSAGES
 0610 LET P9=2
 0620 READ FILE[3,P9J,VO$
 0630 IF VO«[1,7JO"«ESSAGE" THEN GOTO 0702
 0640 PRINT
 0650 PRINT  'THE FOLLOWING MESSAGE WAS PART OF THE REPORT FOR"
 0660 PRINT  '     INJECTION ";D2$5":  ";VO$
 0670 LET P9=P9+1
 0680 GOTO 0620
 0690 REM	
 0700 REH          NATCH IDENTIFIER WITH CALIBRATION DATA
 0702 INPUT "     VOLUME OF THE  INJECTION, IN MICROLITERS?  ',8
 0704 INPUT "     VOLUME OF THE  EXTRACT, IN HILLILITERS?  ",R
       1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
                0000000             0000000

-------
      G-A-S   C-4f*-0-M-A-T-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N
      7/20/1979
                              PROGRAM LISTING FOR GC10
S-Y-S-T-£-fl  0-A-S   C4HMHHH-0-G-R-d-P-H-Y  A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
    PAGE  3  7/20/1979                                                      PAGE  4
                                     PROGRAM LISTING FOR GC10
       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
       0706 INPUT '     VOLUME OF THE MATER EXTRACTED,  IN LITERS?  ",S
       0708 PRINT
       0709 PRINT 'PLEASE BE PATIENT. •
       0710 LET P9=P9+2
       0720 READ FILEE3,P9],G$,H$,B,C
       0730 IF EOF(3) THEN GOTO 1430
       0740 REN   	
       0750 REM     SKIP UNEXPLAINED PEAKS
       0760 IF GfO'XXXXXm" THEN GOTO 0820
       0770 WRITE FILEI3,P9I,Gf,H$,B,C,-9999
       0780 LET P9=P9+1
       0790 GOTO 0720
       0800 REN
       0810 REM     LOCATE MATCHING IDENTIFIER IN METHOD  FILE
       0820 FOR 17=1 TO F
       0830   READ FILEH, 3*17-1 ),V$
       0840   IF GS=V» THEN GOTO 0960
       0850 NEXT 17
       0860 PRINT
2     0870 PRINT '<7X7>THE REPORT FOR INJECTION ";D2*," CONTAINS A NAMED PE
      *     AK WITH THE'
       0880 PRINT '     IDENTIFIER ";Gi! V BUT METHOD ":TSt3,6]!' DOES NOT
      *     INCLUDE'
       0890 PRINT '     THAT IDENTIFIER.'
       0900 PRINT "THEREFORE, THE CONCENTRATION OF '56*!" CANNOT BE CALCULATE
      *     D."
       0910 WRITE FILE[3,P9J,G*,H*,B,C,-9999
       0920 LET P9=P9*1
       0930 GOTO 0720
       0940 REM	
       0950 REN     CHECK WHETHER IDENTIFIER HAS BEEN CALIBRATED
       0960 READ FILE[4,3»I7],04*,I<,K.R1,R2,R3,J3
       0965 LET FII7]=1
       0966 IF O-9999 THEN GOTO 1410
       0970 IF D4$O'99/99/99' THEN GOTO 1080
       0980 PRINT
       0990 PRINT '<7X7>THE REPORT FOR INJECTION ";D2$;' CONTAINS A NAMED PE
      *     AK WITH THE"
       1000 PRINT •     IDENTIFIER ";G*; V BUT THAT IDENTIFIER HAS NEVER BE
      *     EN'
       1010 PRINT •     CALIBRATED IN METHOD 'JT«3,6]5'.'
       1020 PRINT 'THEREFORE, THE CONCENTRATION OF ';(*;« CANNOT BE CALCULATE
      *     D."

       1234567891123456789212345678931234567894123456789512345678961234567897
                0000        000
              1234567891123456789212345673931234567894123456789512345678961234567897
                       0000000
              1030 WRITE FILE[3,P9J,G$,H*,B.C>-9999
              1040 LET P9=P9+1
              1050 GOTO 0720
              1060 REM   	
              1070 REM          CALCULATE  CONCENTRATION USING REGRESSION EQUATION
              1080 IF K=3 THEN GOTO 1160
              1090 LET L=R1+R2«C
              1100 IF K=2 THEN LET L=L+R3*C
              1105 LET L=(L*R)/(Q»S)
              1110 WRITE FILE[3tP9LG$,H$,B,C,L
              1120 LET P9=PS*1
              1130 GOTO 0720
              1140 HEM   	
              1150 REM          CALCULATE  CONCENTRATION USING INTERPOLATION
              1160 LET I5=LEN(I$)/8
              1170 MAT READ FILEC4,3*I74-1],G2
              1180 IF 15=1 THEN GOTO 1200
              1190 IF OG2m THEN GOTO 1250
              1200 LET Hl=0
              1210 LET M2=0
              1220 LET M3=G2[1]
              1230 LET M4=G2E2]
              1240 GOTO 1390
              1250 IF CC THEN GOTO  1350
              1330 LET I=M
              1340 GOTO 1320
              1350 LET M1=G2£2*(I-1M]
              1360 LET M2=G2E2MI-1)]
              1370 LET M3=G2[2*I-1I
              1380 LET M4=G2t2tIl
              1390 LET L=«M3-m>/(M4-H2))*(C-M2)+f11
              1395 LET L=(L*R)/(Q*S)
              1400 WRITE FILE[3,P9LG$,H$,B,C,L
              1410 LET P9=P9+i
              1420 GOTO 0720

              1234567891123456789212345678931234567894123456789512345673961234567897
                       0000000

-------
       G-A-S   C-H-R-0-*HK-0-G-R-A-P-H-Y   MMHHHK-I-O-N   S-Y-S-T-E-H  G-A-S   C-H-R-OH1-A-T-0-G-R-A-P-H-Y  A-U-T-0-M-A-T-I-O-N  S-Y-S-T-E-M
       7/20/197?                                                      p/JGE  5  7/20/1979                                                      PAGE  6
                              PROGRAM LISTING FOR GCIO                                                SYMBOL TABLE FOR GC10

       1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
                0         0         0         00         0         0
       1430 REM	0110  0080
       1440 REN          ADD UNDETECTED COMPOUNDS TO DATA FILE                 0112  0110
       1450 FOR 1=1 TO F                                                       0160  0100
       1460   IF Fm=l THEN GOTO 1500                                         0180  0210
       1470   READ FILE[4,3*I-H,G$                                            0240  0190  0290  0400  0580
       1475   IF G$='99999' THEN GOTO 1500                                     0255  0245
       1480   WRITE FILE[3,P9J,G$," ",-9999,-9999,-9999,-9999                  0300  0260
       1490   LETP9=P9+1                                                      0310  0360
       1500 NEXT I                                                             0330  0310
       1510 REM	0370  0340
       1520 REM          CONTINUE INTO PROGRAM GC18                            0410  0370  0470
       1530 NOESC                                                              0450  0410
       1540 CHAIN "GC12"                                                       0520  0440
                                                                               0610  0530
                                                                               0620  0680
                                                                               0702  0630
                                                                               0720  0790  0930   1050   1130   1420
                                                                               0820  0760
CD                                                                             0960  0840
                                                                                1080  0970
                                                                                1160   1080
                                                                                1200   1180
                                                                                1250   1190
                                                                                1310   1250
                                                                                1320   1340
                                                                                1350   1320
                                                                                1390   1240   1300
                                                                               1410  0966
                                                                                J430  0730
                                                                               1500  1460   1475
                                                                               B    0720  0770   0910   1030   1110  1400
                                                                               C    0720  0770   0910   0966   1030  1090   1100  1110  1190   1250
                                                                                     1320   1390   1400
                                                                               D2*  0090  0250   0260   0280   0300  0390   0550  0560  0660   0870
                                                                                     0990
                                                                               D3$  0090  0300   0320   0420
                                                                               04$  0090  0960   0970
                                                                               F    0096  0160   0180   0200   0820  1450
                                                                               FLI3  0111  0420   0520   0570   0620  0720   0770  0910  1030   1110
                                                                                     1400  1480
                                                                               FL#4  0170  0175   0176   0180   0830  0960   1170  1470
                                                                               FC    0095  0965   1460
                                                                               G$    0090  0720  0760  0770   0840  0880   0900  0910  1000   1020
       1234567891123456789212345678931234567894123456789512345678961234567897         1030  1110   1400   1470   1475  1480
                0         0         0         0         0         0         0   02    1170

-------
      0-A-S   C-IHHHHK-^MHHHMHr   ft-U-HHHl-T-I-O-N   S-Y-S-T-E-fl
      7/20/1979                                                      PAGE  7
                              SYMBOL TABLE FOR GC10

      SYWOL    REFERENCES

       G2C   0090  1190  1220  1230  1250  1260  1270   1280  1290  1320
             1350  1360  1370  1380
       H$    0090  0720  0770  0910  1030  1110  1400
       I     1310  1320  1330  1350  1360  1370  1380   1450  1460  1470
             1500
       II    0090  0960  1160
       15    1160  1180  1250  1260  1270  1280  1290
       17    0820  0830  0850  0960  0965  1170
       J     0520  0530  0550  0560
       J3    0960
       K     0960  1080  1100
       L     1090  1100  1105  1110  1390  1395  1400
       HI    1200  1260  1350  1390
       H2    1210  1270  1360  1390
       H3    1220  1280  1370  1390
       N4    1230  1290  1380  1390
       P9    0610  0620  0670  0710  0720  0770  0780   0910  0920  1030
             1040  1110  1120  1400  1410  1480  1490
oo     0     0702  1105  1395
°»     R     0704  1105  1395
       Rl    0960  1090
       R2    0960  1090
       R3    0960  1100
       S     0706  1105  1395
       T$    0090  0170  0176  0248  0880  1010
       V*    0090  0180  0830  0840
       V0$   0090  0620  0630  0660

-------
                                  SECTION 13

                   PROGRAM GC11 - DIRECT AQUEOUS INJECTION
                          CONCENTRATION CALCULATION


    GC11 is the program which calculates concentrations of samples prepared
by the direct aqueous injection method.  It is essentially the  same  as
program GC09.  The only difference is that this program asks the user for
the volume of the injection.  Using the calibration equations,  this  program
calculates the mass in nanograms of each compound.  It divides  this  mass by
the injection volume (in microliters) and then divides by 1000  to produce
the concentration in micrograms per liter.

    There is one additional symbol used in GC11.  It is Q, the  volume of the.
injection.
                                     87

-------
 G-A-S  C-fHHHHK-tHHHHMHf   A-0-HHHK-I-G-N  S-Y-S-T-£-H
 7/20/1979                                                      PACE  1
                        PROGRAM LISTING FOR GC11

  1234567891123456789212345678931234567894123456789512345678961234567897
          0         0         00        0        0         0
  0010 REH   -t=+=+=+=+=t=+=f=-»«*e+=+=4-sM-=+=+=+=+=+=+=+=+=+=frt=+r+=t=f=t
  &3?59!   +   GASCHR01ATOGRAPHY AUTOMATION SYSTEM                  +
  0030 REH   +   PROGRAM GC11,  DIRECT AQUEOUS INJECTION PROCESSING     +
  0040 REN   +   BY:  J. KOPKE 1I,T$
 0175 CLOSE FILEMJ
 0176 OPEN FILEt4,0],T*,200
 0180 READ FILEC4,3*(F+1)-1],V»
 0190 IF EOF(4) THEN GOTO 0240
 0200 LET F=F*1
 0210 GOTO 0180
 0220 REH   ——	
 0230 REN          OPEN DATA FILE
 0240 PRINT
 0245 ON ERR THEN GOTO 0255
 0248 PRINT "WHAT IS THE ID FOR THE INJECTION TO BE PROCESSED BY HETHOD
*      ";Ttt3,6J!
 0250 INPUT "?  ",D2$
 0255 ON ERR THEN STOP
 0260 IF LEN(D2$)=8 THEN GOTO  0300
 0270 PRINT
 0280 PRINT "<7X7>';D»!'  IS  NOT A WflLID INJECTION ID.'
 0290 GOTO 0240
 0300 LET D3$='GC',D2$
G-A-S   C-fHHHJ-A-T-0-G-R-A-P-H-Y   A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                       pftGE  2
                        PROGRAM LISTING FOR GC11

 1234567891123456789212345673931234567894123456789512345678961234567897
          0000000
 0310 ON ERR THEN GOTO 0330
 0320 RENAME D3$,D»
 0330 ON ERR THEN STOP
 0340 IF SYS(7)O-48 THEN GOTO 0370
 0350 DEWY =1
 0360 GOTO 0310
 0370 IF SYS<7)=-9 THEN GOTO 0410
 0380 PRINT
 0390 PRINT 'OX^THERE IS NO EXISTING DATA FOR INJECTION ID ";D2*;V
 0410 ON ERR THEN GOTO 0450
 0420 OPEN FIL£[3.0],D3«,31
 0430 ON ERR THEN STOP
 0440 GOTO 0520
 0450 ON ERR THEN STOP
 0460 DELAY =1
 0470 GOTO 0410
 0480 REM   -------
 0490 REH          CHECK DATA FILE USABILITY FLAG
 0520 READ FILEC3.1LJ
 0530 IF J=l THEN GOTO 0610
 0540 PRINT
 0550 IF J=2 THEN PRINT "C7X7>'JD2*;" CANNOT BE USED BECAUSE THE REPOR
*     T DID NOT HAVE A TOTAL AREA.'
 05M) IF J=3 THEN PRINT •<7X7>';D2*?" CANNOT BE USED BECAUSE THE REPOR
f     T HAS IN THE WRONG FORMAT."
 0570 CLOSE FILE[3J
 0580 GOTO 0240
 0590 REH
 06IOLETP9=2
 0620 READ FILE[3,P9LW$
 0630 IF Wtfl,7K>"HESSAG£' THEN GOTO 0702
 0640 PRINT
 0650 PRINT "THE FOLLOWING MESSAGE WAS PART OF THE REPORT FOR'
 0660 PRINT"      INJECTION ";D2$;":  H!VO$
 0670 LET P9=P9H
 0680 GOTO 0620
 0690 REH   --- -~
 0700 REH         HATCH IDENTIFIER WITH CALIBRATION DATA
 0702 INPUT "      VOLUME OF THE INJECTION, IN HICROLITERS?  ",Q
 0708 PRINT
 1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
          0000000             0000000

-------
00
       (HhS   C-H-R-(Hh*-T-(HH?-A-P-H-V   A-U-HHHhT-I-O-N   S-Y-S-T-E-fl
       7/20/J979                                                     PAGE  3
                              PROGRAM LISTING FOR GC11

        1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
        0709 PRINT 'PLEASE BE PATIENT.'
        0710 LET P9=P9+2
        0720 READ FILE[3,P9],C$,H$,B,C
        0730 IF  EOF(3) THEN GOTO 1430
        0740 REH  	
        0750 REH    SKIP UNEXPLAINED PEAKS
        0760 IF  G$0'XXXXXXXX' THEN GOTO 0820
        0770 WRITE FILEC3,P9],G*,H*,B,C,-9999
        0780 LET PfM>9+l
        0790 GOTO 0720
        0800 REN
 0810 REH     LOCATE HATCHING IDENTIFIER IN METHOD FILE
 0820 FOR 17=1 TO F
 0830   READ FILEC4,3*17-1],V4
 0840   IF G$=Vt THEN  GOTO 0960
 0850 NEXT 17
 0860 PRINT
 0870 PRINT 'OX7>THE REPORT FOR  INJECTION '?D2$?" CONTAINS A NANED PE
*     AK WITH THE'
 0880 PRINT '     IDENTIFIER "!G$!V BUT METHOD •;T»[3.63f' DOES NOT
*     INCLUDE'
 0890 PRINT '     THAT IDENTIFIER.'
 0900 PRINT 'THEREFORE, THE  CONCENTRATION OF ';&;' CANNOT BE CALCULATE
t     D."
 0910 WRITE FILE[3,P9],G*,H$,B,C,-9999
 0920 LET P9=P9+1
 0930 GOTO 0720
 0940 REH	
 0950 REH     CHECK WHETHER  IDENTIFIER HAS BEEN CALIBRATED
 0960 READ FILE[4,3*I73,D«,U,K,R1,R2,R3,J3
 0965 LET FII7M
 0966 IF C=-9999 THEN  GOTO 1410
 0970 IF D4$O"99/99/99' THEN GOTO 1080
 0980 PRINT
 0990 PRINT '<7X7>THE REPORT FOR  INJECTION ';D2*;» CONTAINS A NAMED PE
•     AK WITH THE'
 1000 PRINT '     IDENTIFIER "ft* V BUT THAT IDENTIFIER HAS NEVER BE
*     EN"
 1010 PRINT '     CALIBRATED IN HETHOD ";T*t3,6]?V
 1020 PRINT 'THEREFORE, THE  CONCENTRATION OF ';G$!' CANNOT BE CALCULATE
t     D."
 1030 WRITE FILEC3,P9I,G*,H*,B,C,-9999

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
G-A-S   C-H-R-0-N^-T-O-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  4
                       PROGRAM LISTING FOR GC11

 1234567891123456789212345678931234567894123456799512345678961234567897
          0000000
 1040 LET P9=P9*1
 1050 GOTO 0720
 1060 REH   	
 1070 REH         CALCULATE CONCENTRATION USING REGRESSION EQUATION
 1080 IF K=3 THEN GOTO 1160
 1090 LET L=R1+R2*C
 1100 IF K=2 THEN LET L=L+R3*C
 1105 LET L=L/Q/1000
 1110 WRITE FILE[3,P9],G$,H$,B,C,L
 1120 LET P9=P9+1
 1130 GOTO 0720
 1140 REH   	
 1150 REH         CALCULATE CONCENTRATION USING INTERPOLATION
 1160 LET I5=LEN(U)/8
 1170 HAT READ FILE[4,3*I7+13,G2
 1180 IF 15=1 THEN GOTO  1200
 1190 IF DG2I2J THEN GOTO 1250
 1200 LET M1=Q
 1210 LET H2=0
 1220 LET H3=G2[1]
 1230 LET H4=G2C2]
 1240 GOTO 1390
 1250 IF CC THEN GOTO 1350
 1330 LET 1=1+1
 1340 GOTO 1320
 1350 LET fUsG2C2*(M)-l]
 1360 LET H2=G2C2*(1-1)1
 1370 LET H3=G2C2*I-13
 1380 LET H4=G2C2*IJ
 1390 LET L=«H3-m)/(H4-H2MKC-M2)+Hl
 1395 LET L=L/Q/1000
 1400 WRITE FILE[3,P9],G*,H*,B,C,L
 1410 LET P9=P9+1
 1420 GOTO 0720
 1430 REH   	

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
G-A-S   C4f-R-(HHI-T-0-G-R-A-P-4f-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M  G-A-S   C-H-R-CHHK-0-G-R-A-P-H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  5  7/20/1979                                                       PAGE  6
                        PROGRAM LISTING FOR GC11                                                 SYMBOL TABLE FOR GC11

 1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
          0000000
 1440 REM          ADO UNDETECTED COMPOUNDS TO DATA FILE                  0110  0080
 1450 FOR 1=1 TO F                                                       0112  0110
 1460   IF FCIJ=1 THEN GOTO 1500                                          0160  0100
 1470   READ FILE[4,3*MLG$                                             0180  0210
 1475   IF G$="99999" THEN GOTO 1500                                     0240  0190  0290  0400  0580
 1480   WRITE FILE£3,P9],G$,«  ',-9999,-9999,-9999,-9999                   0255  0245
 1490   LETP9=P9+1                                                      0300  0260
 1500 NEXT I                                                             0310  0360
 1510 REN	0330  0310
 1520 REM          CONTINUE INTO  PROGRAM GC18                             0370  0340
 1530NOESC                                                              0410  0370  0470
 1540 CHAIN 'GC12"                                                       0450  0410
                                                                         0520  0440
                                                                         0610  0530
                                                                         0620  0680
                                                                         0702  0630
                                                                         0720  0790  0930  1050  1130  1420
                                                                         0820  0760
                                                                         0960  0840
                                                                         1080  0970
                                                                         1160  1080
                                                                         1200  1180
                                                                         1250  1190
                                                                         1310  1250
                                                                         1320  1340
                                                                         1350  1320
                                                                         1390  1240  1300
                                                                         1410  0966
                                                                         1430  0730
                                                                         1500  1460  1475
                                                                         B     0720  0770  0910  1030  1110  1400
                                                                         C     0720  0770  0910  0966  1030  1090  1100   1110   1190  1250
                                                                               1320  1390  1400
                                                                         D2$   0090  0250  0260  0280  0300  0390  0550   0560   0660  0870
                                                                               0990
                                                                         D3$   0090  0300  0320  0420
                                                                         D4$   0090  0960  0970
                                                                         F     0096  OlM  0180  0200  0820  1450
                                                                         ai3  0111  0420  0520  0570  0620  0720  0770   0910   1030  1110
                                                                               1400  1480
                                                                         at4  0170  0175  0176  0180  0830  0960  1170   1470
                                                                         F[    0095  0965  1460
                                                                         G*    0090  0720  0760  0770  0840  0880  0900   0910   1000  1020
 1234567891123456789212345678931234567894123456789512345678961234567897          1030  1110  1400  1470  1475  1480
          0        0         0         0         0         0        0    G2    1170

-------
       G-ft-S   C-^-fHf-fl-HHHHi-P-H-Y   fl-U-T-0-M-fl-T-I-O-M   S-Y-S-T-E-M
       7/20/1979                                                     p/ujc  7
                              SYMBOL TftBLE FOR GC11

       SYMBOL    REFERENCES
             88  i8  Isr250  126°  I27°
       H$    0090  0720  0770  0910  1030  1110  1400
       I     1310  1320  1330  1350  1360  1370  1380  1450  1460  1470

       1$    0090  0960  1160
       15    1160  1180  1250  1260  1270  1280  1290
       17    0820  0830  0850  0960  0965  1170
       J     0520  0530  0550  0560
       J3    0960
       K     0960  1080  1100
       L     1090  1100  1105  1110  1390  1395  1400
       HI    1200  1260  1350  1390
       H2    1210  1270  1360  1390
       H3    1220  1280  1370  1390
       H4    1230  1290  1380  1390
       P9    0610  0620  0670  0710  0720  0770  0780  0910  0920  1030
             1040  1110  1120  1400  1410  1480  1490
10     Q     0702  1105  1395
-*     Rl    0960  1090
       R2    0960  1090
       R3    0960  1100
       T*    0090  0170  0176  0248  0880  1010
       V$    0090  0180  0830  0840
       VO*   0090  0620  0630  0660

-------
                                  SECTION 14

                  PROGRAM GC12 - RETENTION TIME CALCULATION


    GC12 is the program which calculates relative retention times or
capacity ratios.  It is entered by chaining from any of the concentration
calculation programs (GC08, GC09, GC10, or GC11).

    As the program begins, the method file and the injection data file are
already open, although at several places in the program, the data file is
closed and reopened to set the EOF function for that file back to zero.

    The program reads from the method file the flag for the type of
retention time calculations and either the relative retention time reference
identifier or the capacity ratio dead time.  It then branches to the
appropriate section of code.

    To calculate relative retention times, this program first searches the
data file for the identifier of the relative retention time reference peak.
If that identifier does not appear in the data file, the program informs the
user that relative retention times cannot be calculated, and puts -9999 into
the injection data file as the relative retention time of every peak.
Conversely, if the program does ffnd the relative retention time reference
peak in the data file, it uses its retention time to calculate the relative
retention time of every peak in the data file and places those calculated
values into the data file.  The formula for relative retention time is:
         Rel. Retn. Time =    Ret                     ' 100

The formula for capacity ratio is:


         Capacity Ratio *                       - 1
                                    92

-------
("GcosToITN    fr
 10, OR n J~"~\j
ENTER GC12
                           yes
                   (READ  /
               REFERENCE/
                  FROM   I
               METHOD FILE
               fREAD PEAK/
                  FROM   /
                DATA FILE \
                         V
                (PLACE REL./
                RETN. T(MEf
                INTO DATA I
                  FILE	J
                             (READ PEAK/
                               FROM   |
                             DATA FILE I
                                               END
                                                FILE?
                               (PLACE  i
                             :AP. RATIO/
                               INTO   I
                             DATA FILE '
                                         CHAIN
                                                          GC13
           Figure 10. Flowchart of Program GC12.
                                93

-------
                TABLE 8.  SYMBOL DEFINITIONS FOR PROGRAM GC12
B        the absolute retention time of a peak
C        the area of a peak
D3$      the name of the data file
G$       an identifier from a data file
H$       the peak type
12       the data file record number of the peak being processed
J        the data file useability flag
L        the calculated concentration
L2       the calculated relative retention time or capacity ratio
N$       the relative retention time reference peak or the capacity ratio
         dead time as a string
Nl       the type of method
N2       the type of retention time calculations
              N2=l  relative retention time
              N2=2  capacity ratio
N3       retention time of a peak
N4       capacity ratio dead time
P9       the record number of the first peak in the data file
T$       the name of the method file
U$       the name of the user
V0$      a MESSAGE from the data file
                                     94

-------
G-A-S   MHHHHH-0-G-R-A-P-H-Y   A-U-HHHJ-T-I-O-N   S-Y-S-T-£-«
7/20/1979                                                     PAGE  i
                       PROGRAM LISTING FOR 6C12

 1234567891123456787212345678931234567894123456789512345678961234567897
         0000000
 0010 REH   +=+=+=+=+=H-a+=+=f =+=f=f=t=t=f =+=+=+=+=f=+=+=+=tr+=+=+=+=frf
 0020 REH   +   GAS CHROHATOGRAPHY AUTOflflTION SYSTEM                 +
 0030 REH   +   PROGRAH GC12, RETENTION TIHE CALCULATIONS            +
 0040 REH   +   BY:  J. KOPKE (SHORCC), FEBRUARY 14, 1979            +
 0045 REH   +   HOST RECENT REVISION:  HARCH 21, 1979                +
 0050 REH
 0060 REN
 0070 ESC
 0080 ON ESC THEN GOTO 0100
 0090 GOTO 0130
 0100 ON ERR THEN GOTO 0102
 0101 CLOSE FILER!
 0102 ON ERR THEN STOP
 0110NOESC
 0120 CHAIN 'GCOO'
 0130 DIH D3«10LG«83,H«2],N«8],T$[6],U«30],VO$[20J
 0140 REH  -    •
                                                                      G-fl-S   C-^-^HHK-0-G-R-A-P-H-Y   A-U-T-0-W-A-M-O-W   S-Y-S-T-E-M
                                                                      7/20/1979                                                     PAGE  2
                                                                                             PROGRAM LISTING FOR GC12

                                                                      1234567891123456789212345678931234567894123456789512345678961234567897
                                                                               0000000
                                                                      0390 PRINT '     RETENTION TIME IS ";N$5% BUT THE REPORT FOR INJECTIO

                                                                      0400 PRINT •     DOES NOT INCLUDE A PEAK WITH THAT IDENTIFIER,"
                                                                      0410 PRINT 'THEREFORE,  NO RELATIVE RETENTION TIMES CAN BE CALCULATED."
                                                                      0420 LET I2=P9
                                                                      0430 CLOSE FILER]
                                                                      0440 OPEN FILER,0],D3$,31
                                                                      0450 READ FILER, I2J,G$,H$,B,C,L
                                                                      0460 IF EOF(3) THEN GOTO 0760
                                                                      0470 WRITE FILER, I2LG$,H$,B,C,L,-9999
                                                                      0480 LET 12=12+1
                                                                      0490 GOTO 0450
                                                                      0500 REH	
                                                                      0510 REH     PUT RELATIVE RETENTION TIME  IN DATA FILE
                                                                      0520 LET N3=B
                                                                      0530 LET I2=P9
                                                                      0540 CLOSE FILER]
                                                                      0550 OPEN FILER,01,D3$,31
                                                                      0560 READ FILER, 123,G$,H*,B,C,L
                                                                      0570 IF EOF(3) THEN GOTO 0760
                                                                      0580 LET L2=(B/N3)>100
                                                                      0590 WRITE FILE£3,I2],G$,H$,BJC,L,L2
                                                                      0600 LET 12=12+1
                                                                      0610 GOTO 0560
                                                                      0620 REH	
                                                                      0630 REH         CAPACITY RATIO
                                                                      0640 LET N4=VAL
-------
      G-A-S   CMHMHHKHHr-R-A-P-H-Y   A-U-T-O-M-A-T-I-O-fl   S-Y-S-T-E-fl G-A-S   C-H-R-0-H-A-T-O-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-fl
      7/20/1979                                                       PAGE  3 7/20/1979                                                       PACE  4
                              PROGRAM LISTING FOR GC12                                                SYMBOL TABLE FOR 6C12

       1234567891123456789212345678931234567894123456789512345678961234567897 SYMBOL    REFERENCES
                0
       0800 NOESC                                                              0100  0080
       0810 CHAIN 'GC13"                                                       0102  0100
                                                                               0130  0090
                                                                               0190  0220
                                                                               0230  0200
                                                                               0300  0340
                                                                               0370  0310
                                                                               0450  0490
                                                                               0520  0320
                                                                               0560  0610
                                                                               0640  0240
                                                                               0680  0730
                                                                               0760  0460  0570  0690
                                                                               B     0300  0450  0470  0520  0560  0580  0590  0680  0700  0710
                                                                               C     0300  0450  0470  0560  0590  0680  0710
                                                                               P3$   0130  0160  0290  0390  0440  0550  0670  0760  0770
                                                                               FLI3  0101  0160  0190  0280  0290  0300  0430  0440  0450  0470
                                                                                     0540  0550  0560  0590  0660  0670  0680  0710  0760  0770
10                                                                             FLI4  0170
°»                                                                             G$    0130  0300  0320  0450  0470  0560  0590  0680  0710
                                                                               H*    0130  0300  0450  0470  0560  0590  0680  0710
                                                                               12    0270  0300  0330  0420  0450  0470  0480  0530  0560  0590
                                                                                     0600  0650  0680  0710  0720
                                                                               J     0160  0760  0770
                                                                               L     0300  0450  0470  0560  0590  0680  0710
                                                                               L2    0580  0590  0700  0710
                                                                               N$    0130  0170  0320  0390  0640
                                                                               Nl    0170
                                                                               N2    0170  0240
                                                                               N3    0520  0580
                                                                               N4    0640  0700
                                                                               P9    0180  0190  0210  0230  0270  0420  0530  0650
                                                                               T$    0130  0170  0380
                                                                               US    0130  0170
                                                                               VO*   0130  0190  0200
       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000

-------
                                   SECTION 15

       PROGRAM GC13 - COMPOUND IDENTIFICATION AND DATA PROCESSING REPORT


     GC13 is the program which prints the injection data processing report.
 In  doing so,  it must also locate the true chemical name and CAS Registry
 number for each of the named peaks.   This program is entered by chaining
 from the retention time calculation  program, GC12.  If the escape key is
 pressed during the execution of GC13, the program chains back to the master
 control program,  GCOO.

     As GC13 begins,  both the injection data file and the method file are
 already open,  although  in the program both  of these files are closed and
 promptly reopened to set the EOF functions  for them back to zero.  This
 program also  opens a temporary formatted output file where it places the
 lines of the  report  as  they are generated.   This avoids having the program
 monopolize the lineprinter while it  searches other files for data.

     The first  section of this program fills the temporary formatted output
 file.   A record of information is read from the data file,  and if that
 record represents an unexplained peak,  this program uses "UNEXPLAINED PEAK"
 as  the name of the compound and a null  string as the CAS number.   If the
 record from the data file is a named peak,  this program uses the  compound
 name(s)  and CAS number(s)  from the method file.   If there is no matching
 identifier in  the method file,  the program  uses the string "(identifier -
 NOT IN METHOD  XXXX)" as  the name of  the compound and a null  string  as the
 CAS number.  The  rest of the numeric items  are  also written  into  the
 temporary  file, although if the relative retention  time is  -9999  (indicating
 that the  item  could  not  be calculated),  the corresponding space is  left
 blank.

     After  all  of  the records of the  data file have been transformed into
 lines  in the temporary file,  the program copies  the  temporary file  to the
 lineprinter.   Headings are printed and  paging occurs.

     When the entire  temporary file has  been  transferred to the  lineprinter,
 all   files  except  the  method  file are  closed  and  the  temporary file  is
 deleted.   The  program then  asks  if the  user wants to process  another
 injection.  If the answer  is  no,  this program disables  the escape key and
 chains back to GCOO.  If the  answer  is yes, this program  disables the escape
key  and chains back  to the  appropriate  concentration calculation  program,  as
 determined by  the type of method  flag in  the method  file.
                                    97

-------
GC12
\"— (
            ENTER GCtn

                 '
               (READ
             HEADINGS
              FROM
             METHOD FILE

               READ   7
             HEADINGS /
            :ROM DATA
                FILE   V
             READ PEAK/
             =ROM DATA!
            /READ NAME/
            [ AND CAS  [
            1  FROM   I
            \METHOD FILE

             {PLACE LINE/
             DF REPORT/
             NTO TEMP.I
               FILE    \
                        Figure 11. Flowchart of Program GC13.
                                         98

-------
                 TABLE 9.  SYMBOL DEFINITIONS FOR PROGRAM GC13

          the  absolute retention time of a peak
          the  area of a peak
          the  name of the data file
 F$        the  report  title
 6$        an  identifier from a data file
 H$        the  peak type
 *         the  control variable for a loop
 15        the  number  of identifiers in the method file
 16        the  data file position of the peak  being processed
 I?        the  page number of the printed report
 J         the  data file useability flag
 ^         the  calculated  concentration
 L2        the  calculated  relative retention time  or  capacity  ratio
 Nl        the  type of method
              Nl=l   internal  standards
              Nl=2   purge and trap
              Nl=3   liquid/liquid  extraction
              Nl=4   direct aqueous  injection
 N2        the  type  of  retention  time  calculations
              N2=l   relative  retention time
              N2=2   capacity  ratio
p9        the  data  file record number for  the report title
Q$        the  name of  the  temporary formatted output file
Q5$       a format for  a  PRINT USING  statement
                                      99

-------
                            TABLE 9.  (Continued)
Q6$      a format for a PRINT USING statement
Q7$      the type of method
Q8$      a line being transferred from the temporary formatted output file
         to the lineprinter
Q9$      the carriage return for Q8$
T$       the name of the method file
U$       the name of the user
V$       an identifier from the method file
V0$      a MESSAGE from the data file
Vl$      the name of the first compound associated with an identifier
V2$      the CAS number for Vl$
V3$      the name of the second compound associated with an identifier
V4$      the CAS number for V3$
V5$      the name of the third compound associated with an identifier
V6$      the CAS number for V5$
X$       the user's answer to a Y or N question
                                     100

-------
G-fl-S   C-^-fHHH-^HHHHHf-y  A-U-HHf-A-T-I-O-N
7/20/1979
                       PROGRAM LISTING FOR GC13
                                                                S-Y-S-T-E-W
                                                                   PAGE  1
                                                                     G-fi-S   C-H-fl-0-M-A-T-0-£H?-fl-P-«-y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-H
                                                                     7/20/1979                                                      PAGE  2
                                                                                             PROGRAM LISTING FOR GC13

                                                                      1234567891123456789212345678931234567894123456789512345678961234567897
                                                                               0000000
                                                                      0390 REM          OPEN TEMPORARY FORMATTED OUTPUT FILE
                                                                      0400 LET 8$=*GCO*,T$[3,6]
                                                                      0410 OPEN FILEt5,l],8$
                                                                      0420 REH	
                                                                      0430 REM          SKIP OVER ANY MESSAGES
                                                                      0440 LET P9=2
                                                                      0450 READ FILE[3,P9J,VO$
                                                                      0460 IF VO$[1,710*MESSAGE" THEN GOTO 0510
                                                                      0470 LET P9=P9+1
                                                                      0480 GOTO 0450
                                                                      0490 REM	
                                                                      0500 REM          READ REPORT TITLE
                                                                      0510 LET P9=P9+1
                                                                      0520 READ FILE[3,P93,F$
                                                                      0530 REM   	
                                                                      0540 REM          HATCH IDENTIFIER WITH NAME AND CAS NUMBFR
                                                                      0550 LET  16=1
                                                                      0560 READ FILEC3,I6+P9],G$,H*,B,C,L,L2
                                                                      0570  IF EOF(3)  THEN GOTO 0960
                                                                       0580  IF G$=*XXXXXXXX* THEN GOTO 0670
                                                                       0590 FOR 1=1 TO 15
                                                                       0600   READ FILEC4,3*I-1],V$,V1$,V2$,V3$,V4$,V5$,V6$
                                                                       0610   IF V$=G$ THEN GOTO 0700

                                                                       0630 LET Vl$="(*,G$," - NOT IN METHOD ",T$t3,6],">"
                                                                       0640 LET V2$="
                                                                       0650 LET V3$=*99999*
                                                                       0660 GOTO 0700
                                                                       0670 LET Vl$=*    UNEXPLAINED PEAK*
                                                                       0680 LET V2$="
                                                                       0690 LET V3$=*99999"
                                                                       0700 LET 65$=**tt.   lftW«itttttl««t*it*tt*l»4f***«t*«t#  fttttttff
                                                                      *     Mf    It       MtMi       *
                                                                       0702  IF CO-9999 THEN GOTO 0710
                                                                       0704 LET Q5$=Q5$[1,60],11
                                                                       §                NOT DETECTED*
                                                                        0706 PRINT FILE[5],USING  85$,I6,V1$,V2$
                                                                        0708 GOTO 0870
                                                                        0710 IF L2=-9999 THEN GOTO 0740
                                                                        0720 LET Q5$=Q5$,*  ttttf.tf
                                                                        0730 GOTO 0750
                                                                        0740 LET 85$=85$,*

1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
         0000000             0000000
      1234567891123456789212345678931234567894123456789512345678961234567897
              0000000
      0010 REH   f=*-=t=f=+=+=+=*=f=+=*=+=t=+=t=+=f=+=+=t=+=-f=+=f=+=t=+=-»-=+=4-
      0020 REH   +   GAS CHROMATOGRAPHY AUTOMATION SYSTEM                 +
      0030 REM   +   PROWAM GT13, COMPOUND IDENTIFICATION AND REPORT      t
      0040 REM   4   BY:  J. KDPKE (SUORCC), FEBRUARY 15, 1979             +
      0045 REM   +   MOST RECENT REVISION:  APRIL 12, 1979                 +
      0050 REH
      0060 REH
      0070 ESC
      0080 ON ESC THEN GOTO 1640
      0090 DIM D3i[10],F$[30],G$[8],H$[2],e$[13],05$[132],Q6$[60],87$[30],68
     *    $[1331
      0100 DIM Q9$[2],T$[6],U$[30],V$[8],VO$[20],V1$[40],V2$[11],V3$[40],V4$
     *     [1H,V5$[40],V6$[1H,X$[3]
      0110 PAGE =132
      0120 LET 06$=*      IIIIIIIIIIIHHIIIIIIiillillttttttfHUH  IHttttt
     t     Ml"
      0130 REN   	
      0140 REH          DETERMINE TYPE OF PROCESSING
      0150 READ FILf [4,1],T$,U$,N1,M2
o    0160 ON Nl THEN GOTO 0170,  0190, 0210, 0230
->    0170 LET 67$=*INTERNAL STANDARDS*
      0180 GOTO 0260
      0190 LET Q7*="PURGE AND TRAP*
      0200 GOTO 0260
      0210 LET Q7*='LIQUID/LIQUIO EXTRACTION*
      0220 GOTO 0260
      0230 LET Q7$='DIRECT AQUEOUS INJECTION*
      0240 REH   	
      0250 REH          SET EOF(3) AND EOF(4) BACK TO ZERO
      0260 CLOSE FILE[4]
      0270 OPEN FILE[4,OLT$,200
      0280 RFJffi FILEC3,1],J,D3$
      0290 CLOSE FILEC3]
      0300 OPEN FILE[3,01,D3$,31
      0310 REH   	
      0320 REH         COUNT  IDENTIFIERS IN METHOD FILE
       0330 LET 15=0
      0340 READ FILE[4,3*(I5*1)-1LV$
      0350 IF EOF(4)  THIN GOTO 0400
      0360 LET 15=15+1
       0370 GOTO 0340
      0380 REH	

-------
     G-fi-S   C4f-R-0-H-fl-T-£MHl-A-P-H-Y   A-U-HHHH-I-O-N  S-Y-S-T-E-M   G-A-S   C-H-fl-0-«-A-T-0-G-R-A-P-H-Y   A-U-HH1-A-T-I-0-N   S-Y-S-T-E-M
     7/20/1979                                                      PAGE  3   7/20/1979                                                      PAGE  4
                             PROGRAM LISTING FOR GC13                                                PROGRAM LISTING FOR GC13
CD
ro
1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
0750 LET Q5$=Q5S,"t«mttt.l
0760 IF LO-9999 THEN GOTO 0765
0762 IF G$O"XXXXmX" THEN  LET Q5$=Q5$," NOT CALCULATED'
0763 GOTO 0770
0765 LET fl5$=Q5*,"  	Lit*"
0770 IF L=-9999 THEN IF L2=-9999  THEN GOTO 0820
0780 IF L=-9999 THEN GOTO 0840
0790 IF L2=-9999 THEN GOTO 0860
0800 PRINT FIIECS],USING B5*,I6,V1$.V2$,H$,B,L2,C,L
0810 GOTO 0870
0820 PRINT FILEC5],USING e5*,I6,Vl$,V»,H*,B,C
0830 GOTO 0870
()840 PRINT FILEC5LUSING G5$,I6,V1$,V2J,HJ,B,L2,C
0850 GOTO 0870
0860 PRINT FILEC5LUSING Q5*»I6,V1$»V2$,H*,B,C.L
0870 IF V3*='99999' THEN GOTO 0910
0880 PRINT FILEC5],USING Q6$,V3*,V4*
0390 IF V5$="99999- THEN GOTO 0910
0900 PRINT FILE[5LUSING 06«>V5$,V6$
0910 PRINT FILEC53," "
W20 LET 16=16+1
0930 GOTO 0560
0940 REN   	
0950 REH          PRINT HEADINGS ON LINEPRINTER
0960 ON ERR THEN GOTO 0962
0961 CLOSE FILEE3]
0962 ON ERR THEN GOTO 0964
0963 CLOSE FILEfSl
0964 ON ERR THEN GOTO 0966
0965 CLOSE FILEC6J
0966 ON ERR THEN STOP
0970 OPEN FILEI5,3],9$
0980 ON ERR THEN GOTO 1020
0990 OPEN FILEf6,lJ,"$LPT"
JOOO ON ERR THEN STOP
1010 GOTO 1050
1020 ON ERR THEN STOP
1030 DELAY =3
1040 GOTO 0980
1050 LET 17=1
1060 PRINT FILEC6L  TAB(49);"GAS CHROMATOGRAPHY AUTONATION SYSTEM"
1070 PRINT FILEfAJ
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1080 PRINT FILEI6],  TAB(34);"I-N-J-E-C-T-I-0-N   D-A-T-A  P-R-0-C-E-S
*     -S-I-N-G   R-E-P-G-R-T"
 1090 PRINT FILEI6]
 1100 PRINT FILEC6],  TAB(29);
 1110 PRINT FILEm.USING "ANALYST:
*     NJECTION ID NUHBER:   HHHtl",U»,D3$[3]
 1120 PRINT FILEI6],  TAB(29);
 1130 PRINT FILH61.USING "METHOD NUHBER:   MH                      R
*     EPORT TITLE:   ###f#l#f#f«HHHHMHflfi#it##l»«",T$[3)6],F$
 1140 PRINT FILEC63,  TflB(29)J
 1150 PRINT FILEE6LUSING "METHOD TYPE:  #itm*«*l«t»»i»»«iNii53 THEN IF LEN(Q8$K5 THEN GOTO 1280
 1270 GOTO 1210
 1280 LET 17=17+1
 1231 LREAD FILEr53,QS*,89*
 1282 IF EOF(5) THEN GOTO 1370
 1290 PRINT FILE[6],n<12>"!
 1295 PRINT FILEC6L  TABU26);
 1300 PRINT FILEL6LUSING "PAGE #",17
 1310 PRINT FILEC6]
 1320 GOSUB 1730
 1330 LET 16=5
 1340 GOTO 1230
                                                                               1360 REM
                                                                               1370 PRINT
                                                                               1380 PRINT
                                                                              *     EING*
                                                                               1390 PRINT
                                                                               1400 ON ERR THEN GOTO  1402
                   CONFIRM PROCESSING COMPLETION

             'INJECTION ";D3*[3J;"  HAS BEEN PROCESSED, AND A REPORT IS B

                  PRINTED BY THE LINEPRINTER."
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891J23456789212345678931Z34567894123456789512345678961234567897
               0000000            0000000

-------
      G-A-S   CHHHHHK-0-G-R-A-P-H-Y   A-U-T-0-fHK-I-O-N   S-Y-S-T-E-H  G-A-S   CHf*-
                             PROGRAM LISTING FOR GC13                                               PROGRAM LISTING FOR GC13

       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
                0000000            0000000
       1401 CLOSE FILEC3J                                                      1770 PRINT FILEf6J,'   CAPACITY     "J
       1402 ON ERR THEN GOTO 1404                                              1780 PRINT FILEm,"    AREA OF     CONCENTRATION IN"
       1403 CLOSE FILEKJ                                                      1790 PRINT FILEC63, TABt21);'CQHPOUND
-------
G-A-S   C4f-R-0-N-A-T-
-------
     G-fi-S   C-JHHHHK^MHHHHHf   A-U-HHHK-I-O-N   S-Y-S-T-E-fl
     7/20/1979                                                     PAGE  9
                             SYMBOL TABLE FOR GC13

     SYfBOL    REFERENCES	

            0100  0600  0640  0680  0706  0800  0320  0840  0860
            0100  0600  0650  0690  0870  0880
            0100  0600  0880
            0100  0600  0890  0900
            0100  0600  0900
            0100  1450  1460
o
01

-------
                                   SECTION  16

                 PROGRAM GC14 - CONTROL  STANDARDS  CALCULATION


    GC14  is the program which calculates percent recoveries  for  control
standards and prints the control standard  report.   It  is entered by  chaining
from the  master control program, GCOO, and it  returns  control  to that
program if the escape key is pressed.

    As GC14 begins, a method file  is  already open,  having  been opened  by
GCOO.  GC14 first counts the identifiers in the method file.   It then  asks
the user  for the injection ID of the  control standard  and  opens  the
corresponding injection data file.  It also asks the user  for  the  letter
name of the concentration pattern  and opens the concentration  pattern  file.

    Next, GC14 prints the headings for the control  standard  report.  It then
loops through the method file.  For each identifier in the method  file, GC14
reads the prepared concentration from the  concentration pattern  file and
searches  the data file for the calculated  concentration.   It then  prints  the
identifier,  the prepared concentration,  the calculated concentration,  and
the percent recovery on the control standard report.   Percent  recovery is
calculated by the formula:

         Percent Recovery = 100 •  Measured Concentration
         rercent Kecovery   luu    Prepared Concentration

    When all of the identifiers have been  covered,  the .program closes  the
concentration pattern file and the data  file,  and  it asks  if the user  wants
to examine another control standard.  It then  either branches  back to  the
beginning or chains back to GCOO.
                                    106

-------
                 TABLE  10.   SYMBOL DEFINITIONS FOR PROGRAM GC14
A5        the  prepared concentration
A6$       the  name  of the  concentration  pattern  file
A7        the  position of  A8$  in A9$
A8$       the  letter name  of the concentration pattern
A9$       the  alphabet
B         the  absolute retention time
C         the  peak  area
02$       the  injection  ID
D3$       the  name  of the  data file
F         the  number of  identifiers in.the method file
G$        the  identifier from the data file
H$        the  peak  type
I         the control variable for loops
12        the control variable for a loop
J         the data  file useability flag
              J=l   good  data
              J=2   no TOTAL AREA
              J=3   wrong format
J2       the data  file processing status flag
              J2=l  has been processed
              02=2  never processed
L        the calculated concentration
L2       the relative  retention time  or capacity ratio
                                    107

-------
                              TABLE  10.   (Continued)


P8        the record number of the  last record in  the data file

P9        the record number of the  first record  in the data file  which
          represents a  peak

Q5$       the format for  a PRINT USING  statement

T$        the name of the method file

V$        an identifier from the method file

V0$       an error message

X$        the user's answer to Y or N questions
GCOO
                                 XV/-/ENTER ccW)
                                     CONCENTRATION
                                      PATTERN |
                                       JONTROIA
                                     'STANDARD!
                                       REPORT
                                      ^HEADINGS/

                                      /S—I	'
                                      rFOR NO.'
                                        OF
                                     (IDENTIFIERS;
                                     /READ  /
                                     / CONC.  /
                                      FROM DATA!
                                     \  FILE   \
                          Figure 12. Flowchart of Program GC14.
                                        108

-------
G-A-S   C4HMHHK-OHHHH>-H-Y   A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  1
                        PROGRAM LISTING FOR GC14

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

 0020 REH   +" "GAS CHWWTOGRAPHY AufoHA?ION~SYSTEH " "  *"*" "*+
 0030 REH   i-   PROGRAM  GC14, CONTROL STANDARDS CALCULATIONS          +
 0040 REH   +   BY:  J.  KOPKE (SWORCC), APRIL 3, 1979                 +
 0050 REM   +   MOST RECENT REVISION:  APRIL 12, 1979                 +
 0060 REM   •f=4=+=+='f=4=+=-f--f=+=+=+=t=t=-i-=+=-f=-i-=+-+=-j-=i--'i-=+=t=+s+=+=t=+
 0070 REM
 0080 DIM A6$[9hA»m,A9$[26LD2$[8LD3ttlOL(»[8LH«2],Q5$[80],T$[6
*     J,V$[8LVO$C30LX*[3]
 0090 LET A9$="ABCDEFGHIJKLMNOPQRSTUVUXYZ"
 0100 ON ESC THEN GOTO 0130
 0110 ESC
 0120 GOTO 0220
 0130 ON ERR THEN GOTO 0150
 0140 CLOSE FILEC3J
 0150 ON ERR THEN GOTO 0170
 0160 CLOSE FILEm
 0170 ON ERR THEN STOP
 0180 NOESC
 0190 CHAIN "GCOO"
 0200 REM   	
 0210 REH          COUNT IDENTIFIERS IN METHOD FILE
 0220 READ FILEt4,lJ»T$
 0230 CLOSE FILER]
 0240 OPEN FILEI4I,T*,200
 0250 LET F=0
 0260 READ FILEC4,3*(F+1)-1],V*
 0270 IF EOF(4) THEN GOTO 0320
 0280 LET F=F*1
 0290 GOTO 0260
 0300 REM   	_____—.	
 0310 REH          OPEN DATA FILE
 0320 PRINT
 0330 ON ERR THEN GOTO 0350
 0340 INPUT "WHAT IS THE INJECTION ID FOR THE CONTROL STANDARD?  ",D2$
 0350 ON ERR THEN STOP
 0360 IF LEN(D2$)=8 THEN GOTO 0400
 0370 PRINT
 0380 PRINT "<7X7>";D2$!" IS NOT A  VALID INJECTION ID."
 0390 GOTO 0320
 0400 LET D3*="GC*,D2*
 0410 ON ERR THEN GOTO 0430
                                                                      G-A-S   C4HHHt-A-T-€-G-R-A-f-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-fl
                                                                      7/20/1979                                                      PAGE  2
                                                                                              PROGRAM LISTING FOR GC14

                                                                        1234567891123456789212345678931234567894123456789512345678961234567897
                                                                                0000000
                                                                        0420 RENAME D3$,D3$
                                                                        0430 ON ERR THEN STOP
                                                                        0440 IF SYS(7)=J9 THEN GOTO 0480
                                                                        0450 PRINT
                                                                        0460 PRINT "OX7>THERE IS NO EXISTING DATA FOR INJECTION ID  ";D2*;"."
                                                                        0470 GOTO 0320
                                                                        0480 ON ERR THEN GOTO 0520
                                                                        0490 OPEN FILE[3,0],D3*,31
                                                                        0500 ON ERR THEN STOP
                                                                        0510 GOTO 0570
                                                                        0520 ON ERR THEN STOP
                                                                        0530 DELAY =1
                                                                        0540 GOTO 0480
                                                                        0550 REM   	
                                                                        0560 REM          CHECK DATA FILE USABILITY AND PROCESSING FLAGS
                                                                        0570 READ FILE[3,1]>J,D3$,J2
                                                                        0580 IF J=l THEN GOTO 0630
                                                                        0590 PRINT
                                                                        0600 IF JO2 THEN GOTO 0610
                                                                        0602 PRINT "<7X7}"JD2*;" CANNOT BE USED BECAUSE THE REPORT DfD NOT"
                                                                        0604 PRINT *     HAVE A TOTAL AREA*
                                                                        0606 GOTO 1420
                                                                        0610 PRINT *OX7>"JD2$?" CANNOT BE USED BECAUSE THE REPORT WAS"
                                                                        0612 PRINT *     IN THE WRONG FORMAT.'
                                                                        0620 GOTO 1420
                                                                        0630 IF J2=l THEN GOTO 0690
                                                                        0640 PRINT
                                                                        0650 PRINT •<7X7>I1;D2$;' CANNOT BE USED FOR CONTROL STANDARD CALCULAT
                                                                      *    IONS UNTIL"
                                                                        0652 PRINT •     AFTER IT IS PROCESSED."
                                                                        0660 GOTO 0130
                                                                        0670 REM                --••_.		
                                                                        0680 REH          FIND FIRST AM) LAST ENTRIES IN DATA FILE
                                                                        0690 LET P9=2
                                                                        0700 READ FILE£3,P9J,VO$
                                                                        0710 IF VOtfl,7]O"«ESSAGE" THEN GOTO 0740
                                                                        0720 LET P9*P9+1
                                                                        0730 GOTO 0700
                                                                        0740 LET P9=P9+2
                                                                        0750 LET P8=P9
                                                                        0760 READ FILEr3»P8],0*
                                                                        0770 IF EOFC3)  THEN GOTO 0800
123456789I1234567892I2345678931234567894123456789512345678961234567897    1234567893123456789212345678931234567894123456789512345678961234567897
         0000000             0000000

-------
G-A-S   C4HMHHK-0-G-R-A-P-H-Y   A-U-T-0-H-A-T-I-O-fl   S-Y-S-T-E-fl  G-fr-S   C-H-R-0-H-A-T-O-G-R-A-P-H-Y   A-U-T-0-H-A-M-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  3  7/20/1979                                                      PAGE  4
                        PROGRAM LISTING FOR GC14                                                 PROGRAM LISTING FOR GC14
                                                                         1234567891123456789212345678931234567894123456789512345678961234567897
                                                                                  0000000
                                                                         1180 PRINT
                                                                         1190 LET Q5*="
                                                                         1195 REM   —
                                                                         1196 REM
                                                                         1200 FOR 1=1 TO F
                   FILL IN TABLE
                                                                                                        1360
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0780 LET P8=P8+1
 0790 GOTO 0760                                                          1190 LET Q5*=" iMiftf**	l.fttt     	ft.lt*       —f.#r
 0800 LET P8=P8-1
 0810 REN   	
 0820 REM          OPEN CONCENTRATION PATTERN FILE
 0830 PRINT
 0840 ON ERR THEN GOTO 0860
 0850 INPUT 'WHAT IS THE CONCENTRATION  PATTERN FOR THIS STANDARD?  ",A8
*     $
 0860 ON ERR THEN STOP
 OR70 LET A7=PGS(A9$,A8$,I)
 0880 IF A7OO THEN GOTO 0920
 0890 PRINT
 0900 PRINT "<7X7>'";A8*T"' IS NOT A VALID LETTER."
 0910 GOTO 0830
 0920 LET A6*=T$,"000"
 0930 LET A6«10-LEN(STR*(A7)>,9]=S7R$(A7»
 0940 ON ERR THEN GOTO 0960
 0950 RENAME A6$,A6$
 0960 ON ERR THEN STOP
 0970 IF SYS(7)=-9 THEN GOTO 1010
 0980 PRINT
 0990 PRINT "OX7>THERE IS NO EXISTING PATTERN NAMED ";AB$;"'."
 1000 GOTO 0830
 1010 ON ERR THEN GOTO 1050
 1020 OPEN FILE[7,0],A6M
 1030 ON ERR THEN STOP
 1040 GOTO 1100
 1050 ON ERR TIEN STOP
 1060 DELAY =1
 1070 GOTO 1010
 1080 REM   	
 1090 REM          PRINT HEADINGS                                        1450 INPUT "TO YOU WANT A REPORT ON ANOTHER CONTROL  STANDARD?   (Y OR N
 1100 PRINT
 1110 PRINT
 1120 PRINT  TAB(15);"C-0-N-T-R-0-L  S-T-A-N-D-A-R-D   R-E-P-0-R-T"
 1130 PRINT "INJECTION ID:  «;D2*5  TAB(53)J"METHOD NUMBER:  *;T»[3.6]
 1140 PRINT "CONCENTRATION PATTERN:  MASS; TAB(39);"CONCENTRATIONS IN
*     HICROGRAMS/LITER"
 1150 PRINT
 1160 PRINT "              PREPARED       MEASURED      PERCENT"
 1170 PRINT "IDENTIFIER  CONCENTRATION CONCENTRATION  RECOVERED"

 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931Z34567894123456789512345678961234567897
          0000000            0000000
 1210
 1215
 1220
 1230
 1240
 1250
 1260
 1265
 1266
 1270
 1280
 1290
 1300
 1310
 1320
 1330
 1340
 1350
 1360 NEXT I
 1370 PRINT
 1380 PRINT
 1390 REM   	
 1400 REM          WRAP-UP PROCEDURE
 1410 CLOSE FILEC7]
 1420 CLOSE FILEC31
 1430 PRINT
 1440 ON ERR THEN GOTO 1460
 1450 INPUT "PO YOU WANT A REPORT ON ANOTHER CONTROL STANDARD?
*     )  ",X*
 1460 ON ERR THEN STOP
 1470 IF X$[1,11="Y" THEN GOTO 0320
 1480NOESC
 1490 CHAIN "GCOO"
READ FILE[4,3fI-ll,V$
IF V*="99999" THEN GOTO
READ FILE[7,I],A5
FOR I2=P9 TO P8 STEP 1
  READ FILE[3,I2LG$,H$,B.C,L,L2
  IF G$=V$ THEN GOTO 1270
NEXT 12
LET C=-9999
LET L=-9999
IF CO-9999 THEN GOTO 1310
PRINT USING G5*[1,27LV«,A5;
PRINT "NOT DETECTED"
GOTO 1360
IF LO-9999 THEN GOTO 1350
PRINT USING e5ttl,27],V*,A5;
PRINT "NOT CALCULATED"
GOTO 1360
PRINT USING e5*,V$,A5,L,L/A5*100

-------
G-A-S   C4HMHHK-KHHHHH1-Y   A-tHHHHK-I-O-N
7/20/1979
                        SYMBOL TABLE FOR GC14
MffiOL REFERENCES
0130
0150
0170
0220
0260
0320
0350
0400
0430
0480
0520
0570
0610
0630
0690
0700
0740
0760
0800
0830
0860
0920
0960
1010
1050
1100
1270
1310
1350
1360
1420
1460
AS
A6f
A7
A8$
A9$
8
C
D2$
03$
F
Fl.13
FUM
FLI7
0100
0130
0150
0120
0290
0270
0330
0360
0410
0440
0480
0510
0600
0580
0630
0730
0710
0790
0770
0910
0840
0880
0940
0970
1010
1040
1250
1270
1310
1215
0606
1440
1220
0080
0870
0080
0080
1240
1240
0080
0080
0250
0140
0220
0160
0660




0390



0540









1000



1070





1300
0620

1280
0920
0880
0850
0090

1265
0340
0400
0260
0490
0230
1020





0470 1470























1340


1320 1350
0930 0950 1020
0930
0870 0900 0990 1140
0870

1270
0360 0380 0400 0460 0602 0610 0650 1130
0420 0490 0570
0280 1200
0570 0700 0760 1240 1420
0240 0260 1210
1220 1410
S-Y-S-T-E-H  G-A-S   C-H-R-0-H-A-T-O-G-R-A-P-H-Y  A-U-T-0-H-A-T-I-O-W
    PAGE  5  7/20/1979
                                     SYMBOL TABLE FOR GC14

             SYMBOL    REFERENCES

              6$    0080  0760  1240  1250
              H$    0080  1240
              I     1200  1210  1220  1360
              12    1230  1240  1260
              J     0570  0580  0600
              J2    0570  0630
              L     1240  1266  1310  1350
              L2    1240
              P8    0750  0760  0780  0800  1230
              P9    0690  0700  0720  0740  0750 1230
              05$   0080  1190  1280  1320  1350
              T$    0080  0220  0240  0920  1130
              V*    0080  0260  1210  1215  1250 1280   1320   1350
              VO*   0080  0700  0710
              »    0080  1450  1470
S-Y-S-T-E-M
    PAGE  6

-------
                                  SECTION 17

                  PROGRAM GC15 - SPIKED SAMPLES CALCULATION


    GC15 is the program which calculates the percent recovery of spiked
samples and prints a report on those statistics.  It is entered by chaining
from the master control program, GCOO, and it chains back to that program  if
the escape key is pressed.

    As GC15 begins, a method file is already open, having been opened by
GCOO.  GC15 first counts the identifiers in the method file.  Then it asks
the user for the injection ID of the spike original, the letter name of the
concentration pattern for the spike added value, and the injection ID of the
spike final, and it opens the three corresponding files.

    Next, the program prints the headings for the spiked sample report.  It
then loops through the method file.  It reads an identifier from the method
file and reads the spike added value from the concentration pattern file.
It loops through the first injection data file, finds the matching
identifier and reads its calculated concentration, and then loops through
the second injection data file, finds the matching identifier there, and
reads its calculated concentration.  The percent recovery is calculated as
the line of data is printed.  Percent recovery of spikes is calculated by
the formula:

         D     .  D „         Final Concentration - Original Concentration
         Percent Recovery =  	Added Concentration	

    When all of the identifiers in the method file have been handled, the
program either starts over or chains back to GCOO, at the option of the user.
                                      112

-------
C  GCOO  \/A-(ENTER GCIS)
              [CONCENTRATION
               PATTERN   I
                INJECTION
                ID NO. 2 .
                 READ   /
                 CONC.  /
              IFROM DATA
              \FILE NO. 1 \
              I'  READ

              VALUE FROM
7
/   ADDED
VALUE FRC
\  PAT. FILE  i
              /   READ  /
              /   CONC.  /
              FROM DATA!
              \ FILE NO. 2 \
                 NEXT
     1	1 IDENTIFIER J
                CHAIN
                                GC°°
Figure 13.  Flowchart of Program GC15.
                 113

-------
                TABLE 11.  SYMBOL DEFINITIONS FOR PROGRAM GC15
A5       the spike added concentration
A6$      the name of the concentration pattern file
A7       the position of A8$ in A9$
A8$      the letter name of the concentration pattern
A9$      the alphabet
B        the absolute retention time
C        the peak area of the spike original
C2       the peak area of the spike final
D2$      the injection ID
D3$      the name of the data file
F        the number of identifiers in the method file
G$       the identifier from the data file
H$       the peak type
I        the control  variable for loops
12       the control  variable for loops
J        the data file useability flag
              0=1   good data
              0=2   no TOTAL AREA
              0=3   wrong format
02       the data file processing status flag
              02=1  has been processed
              02=2  never processed
L        the relative retention time
                                    114

-------
                            TABLE 11.  (Continued)

12       the calculated concentration of the spike original
L3       the calculated concentration of the spike final
P6       the record number of the last record in the spike final data file
P7       the record number of the first record which describes a peak in the
         spike final data file
P8       the record number of the last record in the spike original data file
P9       the record number of the first record which describes a peak in the
         spike original data file
T$       the name of the method file
V$       the identifier from the method file
V0$      an error MESSAGE
X$       the user's response to Y or N questions
                                     115

-------
G-A-S   C-H-R-0-H-A-HHr-R-A-P-H-Y   A-U-HHt-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  1
                        PROGRAM LISTING FOR GC15

 1234567891123456739212345678931234567894123456789512345678961234567897
          0000000
 0010 REN   *=+=+=+=+=+=+=-f=+=+=fr*=+=f=t=t=+ct=f=t=+'=f=+=t=*-=t=*=+=f=f
 0020 REM   +   GAS CHROHATQGRAPHY AUTOHATION SYSTEM                  +
 0030 REH   +   PROGRAM GC15, SPIKED SAMPLE CALCULATIONS              *
 0040 REH   +   BY:  J.  KQPKE (SHORCC), APRIL 5, 1979                 +
 0050 REH   +   HOST RECENT REVISION:  HAY 2, 1979                    +
 0060 REH
 0070 REN
 0030 DIM A6$m,A8$tILA9*C26],I)2$C8],D3*[10LG*[8],ltt[2Lm6],V«8],
 0090 LET A9f=«ABCDEFGHIJlNNOPQRSTUVWXYZ'
 0100 ON ESC THEN GOTO 0130
 0110 ESC
 0120 GOTO 0240
 0130 ON ERR THEN GOTO 0150
 0140 CLOSE FILEE3J
 0150 ON ERR THEN GOTO 0170
 0160 CLOSE FILEI71
 0170 ON ERR THEN GOTO 0190
 0180 CLOSE FILEfOJ
 0190 ON ERR THEN STOP
 0200NOESC
 0210 CHAIN "GCOO'
 0220 REH
 0230 REH          COUNT IDENTIFIERS IN METHOD FILE
 0240 READ FILEM, 1LTS
 0250 CLOSE FILEI4]
 0260 OPEN FIL£[41,T*,200
 0270 LET F=0
 0280 READ FIL£[4,3*(F+iMLV$
 0290 IF EOF(4) THEN GOTO 0340
 0300 LET F=F+1
 0310 GOTO 0280
 0320 REH   --------
 0330 REH          OPEN SPIKE ORIGINAL DATA FILE
 0340 PRINT
 0350 ON ERR THEN GOTO 0370
 0360 INPUT "WHAT IS THE INJECTION  ID FOR THE UNSPIKED SAMPLE?  ",D2$
 0370 ON ERR THEN STOP
 0380 IF LEN(D2*)=8 THEN GOTO 0420
 0390 PRINT
 0400 PRINT •<7X7>";D2$I' IS NOT A VALID INJECTION ID."
 0410 GOTO 0340
G-A-S   C4HI-0-H-A-T-0-G-R-A-P-H-Y   A-U-THHt-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  2
                        PROGRAM LISTING FOR X15

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0420 LET D3*="GC',D2*
 0430 ON ERR THEN GOTO 0450
 0440RENAHE D3*,D3$
 0450 ON ERR THEN STOP
 0460 IF SYS(7)=-9 THEN GOTO 0500
 0470 PRINT
 0480 PRINT "<7X7>THERE IS NO EXISTING DATA FOR  INJECTION ID H;D2*;V
 0490 GOTO 0340
 0500 ON ERR THEN GOTO 0540
 0510 OPEN FILE[3,0],D3$,31
 0520 ON ERR THEN STOP
 0530 GOTO 0590
 0540 ON ERR THEN STOP
 0550 DELAY =1
 0560 GOTO 0500
 0570 REH   	
 0580 REH          CHECK DATA FILE USABILITY AND  PROCESSING FLAGS
 0590 READ FILE[3,1],J,D3$,J2
 0600 IF J=l THEN GOTO 0690
 0610 PRINT
 0620 IF JO2 THEN GOTO 0660
 0630 PRINT '<7X7>";D2$;' CANNOT BE USED BECAUSE THE REPORT DID NOT"
 0640 PRINT •     HAVE A TOTAL AREA"
 0650 GOTO 2250
 0660 PRINT 'C7>a>"5D2$;" CANNOT BE USED BECAUSE THE REPORT HAS"
 0670 PRINT •     IN THE WRONG FORMAT."
 0680 GOTO 2250
 0690 IF J2=l THEN GOTO 0760
 0700 PRINT
 0710 PRINT "<7X7>";D2*;» CANNOT BE USED FOR  SPIKED SAMPLE CALCULATION
*     S UNTIL"
 0720 PRINT •     AFTER IT IS PROCESSED."
 0730 GOTO 0130
 0740 REH	
 0750 REH          FIND FIRST AND LAST ENTRIES IN DATA FILE
 0760 LET P9=2
 0770 READ FILE[3,F9J,W$
 0780 IF VO*E1,7K>"HESSAGEB THEN GOTO 0810
 0790 LET P9=P9f1
 0800 GOTO 0770
 0810 LET P9=P9+2
 0820 LETP8=P9
 1234567891123456789212345678931234567894123456789512345678961234567897   12345678911234567892123456789312345678941Z3456789512345678961234567897
          0000000            0000000

-------
G-A-S   C4Hi-0-fHK--H-Y   A-U-HHHK-I-Q-N  S-Y-S-T-E-fl  G-A-S   C-4HMHHH-0-(HHH>-H-Y   A-U-HHHH-I-O-N   S-Y-S-T-E-M
7/20/1979                                                     PAGE  3  7/24/1979                                                      PAGE  4
                       PROGRAM LISTING FOR GC15                                                PROGRAM LISTING FOR GC15
 1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
 0830 READ  FILEC3,P8],G$
 0840 IF EOF(3) THEN GOTO 0870
 0850 LET P8=P8+1
 0860 GOTO  0830
 0870 LET P8=P8-1
 0880 REM   	
 0890 REH          OPEN CONCENTRATION PATTERN FILE
 0900 PRINT
 0910 ON ERR THEN  GOTO 0930
 0920 INPUT "WAT  IS THE CONCENTRATION PATTERN FOR THE SPIKE ADDED VALU
*     ES?  ",A8*
 0930 ON ERR THEN  STOP
 0940 LET A7=POS(A9$,A3$,1)
 0950 IF A7OO THEN GOTO 0990
 0960 PRINT
 0970 PRINT "<7X7y";A8*;1" IS NOT ft VALID LETTER."
 0980 GOTO  0900
 0990 LET A6«=H,"000"
 1000 LET A6*C10-LEN(STR$(A7)),9J=STR$(A7)
 1010 ON ERR THEN  GOTO 1030
 1020 RENAME A6$,A6$
 1030 ON ERR THEN  STOP
 1040 IF SYS(7)=r9 THEN GOTO 1080
 1050 PRINT     ;
 1060 PRINT "<7X7>THERF. IS NO EXISTING PATTERN NAMED "?A8$!"V
 1070 GOTO  0900
 1080 ON ERR THEN  GOTO 1120
 1090 OPEN  FILE(7,OLA6$.4
 1100 ON ERR THEN  STOP
 1110 GOTO  1170
 1120 ON ERR THEN  STOP
 1130 DELAY =1
 1140 GOTO  1080
 H50 REH	
 1160 REN          OPEN SPIKE FINAL DATA FILE
 1170 PRINT
 1180 ON ERR THEN  GOTO 1200
 1190 INPUT "WHAT  IS THE INJECTION ID FOR THE SPIKED SAMPLE?  «,D2*
 1200 ON ERR THEN  STOP
 1210 IF LEN(D2$S=8 THEN GOTO 1250
 1220 PRINT
 1230 PRINT "<7X7>';D2f;" IS NOT A VALID INJECTION ID."
                                                                        1234567891123456789212345678931234567894123456789512345678961234567897
                                                                                 0000000
                                                                        1240 GOTO 1170
                                                                        1250 LET D3$="GC",D»
                                                                        1260 ON ERR THEN GOTO 1280
                                                                        1270 RENAME D3$,D3»
                                                                        1280 ON ERR THEN STOP
                                                                        1290 IF SYS<7)=-9 THEN GOTO 1330
                                                                        1300 PRINT
                                                                        1310 PRINT "<7X7>THERE IS NO EXISTING DATA FOR  INJECTION ID ";D2*!V
                                                                        1320 GOTO 1170
                                                                        1330 ON ERR THEN GOTO 1370
                                                                        1340 OPEN FILECOiOJ,03$,31
                                                                        1350 ON ERR THEN STOP
                                                                        1360 GOTO 1420
                                                                        1370 ON ERR THEN STOP
                                                                        1380 DELAY =1
                                                                        1390 GOTO 1330
                                                                        1400 REH   	
                                                                        1410 REH          CHECK DATA FILE USABILITY AND  PROCESSING FLAGS
                                                                         1420 READ FILE[0,1LJ,D3$.J2
                                                                         1430  IF J=l THEN GOTO  1520
                                                                         1440 PRINT
                                                                        1450  IF JO2 THEN GOTO 1490
                                                                        1460 PRINT "<7X7>';D2J;" CANNOT BE USED BECAUSE THE REPORT DID NOT"
                                                                         1470 PRINT '     HAVE  A TOTAL AREA"
                                                                        1480 GOTO 2250
                                                                        1490 PRINT "<7X7>";D2t?" CANNOT BE USED BECAUSE THE REPORT WS"
                                                                         1500 PRINT  "     IN THE WRONG FORMAT.'
                                                                         1510 GOTO 2250
                                                                         1520  IF J2=l THEN GOTO 1590
                                                                         1530 PRINT
                                                                         1540 PRINT "<7X7>";D2l;" CANNOT BE USED FOR SPIKED SAMPLE CALCULATION
                                                                        *     S UNTIL"
                                                                         1550 PRINT •     AFTER IT IS PROCESSED."
                                                                         1560 GOTO  0130
                                                                         1570 REH    	
                                                                         1580 REH          FIND FIRST AND LAST ENTRIES IN DATA FILE
                                                                         1590 LET P7=2
                                                                         1600 READ FILHO>P7],VO*
                                                                         1610  IF VO*C1,71O'HESSAGE" THEN GOTO 1640
                                                                         1620 LET P7=P7+1
                                                                         1630 GOTO  1600
                                                                         1640 LET P7=P7+2
 1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
          0000000             0000000

-------
CD
      Cfr-S   C-H-S-0-M-A-T-O-Cr-R-fl-P-H-Y   A-U-T-Q-il-A-T -I-O-N   3-Y-S-T-E-H
      7/20/1979                                                      PAGE  5
                              PROGRAM LISTING FOR GC15

       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000
       1650 LET P6=P7
       1660 READ FILE[0,P6J,G$
       1670 IF EOF(O) THEN GOTO 1700
       1680 LET P6=P6+1
       1690 GOTO 1660
       1700 LET P6=P6-1
       1710 REH   	
1720 REH
1730 PRINT
1740 PRINT
1750 PRINT
                         PRINT HEADINGS
                                                       R-E-P-0-R-T"
                                                    ";B3*[3,10]5 TAB(53)i"ME
             TABU7)?"S-P-I-K-E-D   S-AHI-P-i-E
 1760 READ FILE[3,lLJ,D3t,J2
 1770 PRINT "INJECTION ID FOR SPIKE ORIGINAL:
*     THOD NUMBER:   ";T«3,6]
 1780 PRINT •CONCENTRATION  PATTERN FOR SPIKE ADDED VALUE:  ";A8*
 1790 READ FILE[0,1],J,D3*,J2
 1800 PRINT "INJECTION ID FOR SPIKE FINAL:  "!D3fC3,10]
 1810 PRINT "CONCENTRATIONS IN NICROGRAMS/LITER"
 1820 PRINT
 1830 PRINT *              ORIGINAL         ADDED          FINAL
*     PERCENT"
 1840 PRINT "IDENTIFIER  CONCENTRATION  CONCENTRATION  CONCENTRATION
*     ECOVERED"
 1850 PRINT " -----  -
       I860 REN
       1870 REN          FILL IN CHART
       1880 FOR 1=1 TO F
       1890   READ FILEC4,3«I-l],Vi
       1900   IF V*="99999"  THEN GOTO 2200
       1910   READ FILEC7,IJ,A5
       1920   FOR I2=P9 TO P8
       1930     READ FILEC3,I2],G*,H$,B,C,L,L2
       1940     IF G*=V$ THEN GOTO 1960
       1950   NEXT 12
       1955   LET C=-9999
       1956   LET L=-9999
       1960   FOR I2=P7 TO P6
       1970     READ FILE[O.I2].G$,H$,B,C2,L3,L2
       1980     IF G$=V$ THEN GOTO 2000
       1990   NEXT 12
       1995   LETC2=-9999
        C4HHH1-A-T-0-G-R-A-P-H-Y   A-U-T-0-fl-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  6
                        PROGRAM LISTING FOR GC15

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1996   LET L3=-9999
 2000   PRINT USING * «f*ttitft   ",V$;
 2010   IF CO-9999 THEN GOTO 2040
 2020   PRINT ' NOT DETECTED  "5
 2030   GOTO 2080
 2040   IF LO-9999 THEN GOTO 2070
 2050   PRINT "NOT CALCULATED "5
 2060   GOTO 2080
 2070   PRINT USING"	1. Ml     ",L5
 2080   PRINT USING "	1.HI     ",A55
 2090   IF C2O-9999 THEN GOTO 2120
 2100   PRINT " NOT DETECTED  "!
 2110   GOTO 2160
 2120   IF L30-9999 THEN GOTO 2150
 2130   PRINT "NOT CALCULATED "s
 2140   GOTO 2160
 2150   PRINT USING •	t.«t     ",L3!
 2160   IF CO-9999 THEN IF LO-9999 THEN  IF C2O^9999  THEN IF L3O-999
*     9 THEN GOTO 2190
 2170   PRINT
 2180   GOTO 2200
 2190   PRINT USING '—*.#XML3-L)/A5*100
 2200 NEXT I
 2210 PRINT
 2220 PRINT
 2230 REN   	
 2240 REH          NRAP-UP PROCEDURE
 2250 ON ERR THEN GOTO 2270
 2260 CLOSE FILECO]
 2270 ON ERR THEN GOTO 2290
 2280 CLOSE FILEI3]
 2290 ON ERR THEN GOTO 2310
 2300 CLOSE FILEE7]
 2310 ON ERR THEN STOP
 2320 PRINT
 2330 ON ERR THEN GOTO 2350
 2340 INPUT "DO YOU WANT A REPORT FOR ANOTHER SPIKED SAHPLE?   (Y OR N)

*2350 ON*ERR THEN STOP
 2360 IF X$[1,1]="Y" THEN GOTO 0340
 2370NOESC
 2380 CHAIN "GCOO"
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
                0000000           0000000

-------
G-ft-S C-H-RHJ-M-fr-T-O-G-fl-A-P-tf-Y A-U-HHHK-I-O-N S-Y-S-T-E-M G-A-S C-H-fi-O-fM-T-O-G-R-A-P-H-Y
7/20/1979 PflGE 7 7/20/1979
SYMBOL TABLE FOR GC15 SYMBOL TABLE
SYMBOL REFERENCES SYMBOL REFERENCES
0130
0150
0170
0190
0240
0280
0340
0370
0420
0450
0500
0540
0590
0660
0690
0760
0770
0810
0830
0870
0900
0930
0990
1030
1080
1120
1170
1200
1250
1280
1330
1370
1420
1490
1520
1590
1600
1640
1660
1700
1960
2000
2040
2070
2080
0100 0730 1560
0130
0150
0170
0120
0310
0290 0410 0490 2360
0350
0380
0430
0460 0560
0500
0530
0620
0600
0690
0800
0780
0860
0840
0980 1070
0910
0950
1010
1040 1140
1080
1110 1240 1320
1180
1210
1260
1290 1390
1330
1360
1450
1430
1520
1630
1610
1690
1670
1940
1980
2010
2040
2030 2060
2120
2150
2160
2190
2200
2250
2270
2290
2310
2350
AS
A6*
A7
A8$
A9$
B
C
C2
D2*

D3t

F
FLtO
FLI3
FL#4
FL*7
C$
m
I
12
J
J2
L
L2
L3
P6
P7
P8
P9
T*
V*
VO*
X*

2090
2120
2110
2160
1900
0650
2250
2270
2290
2330
1910
0080
0940
0080
0080
1930
1930
1970
0080
1210
0080
1770
0270
0180
0140
0240
01M)
0080
0080
1880
1920
0590
0590
1930
1930
1970
1650
1590
0820
07M)
0080
0080
0080
0080

2140
2180
0680




2080
0990
0950
0920
0090
1970
1955
1995
0360
1230
0420
1790
0280
1340
0510
0250
1090
0830
1930
1890
1930
0600
0690
1956
1970
1996
1660
1600
0830
0770
0240
0280
0770
2340



1480




2190
1000
1000
0940
0940

2010
2090
0380
1250
0440
1800
0300
1420
0590
0260
1910
1660
1970
1910
1950
0620
1420
2040

2120
1680
1620
0850
0790
0260
1890
0780
2360



1510





1020

0970


2160
2160
0400
1310
0510

1880
1600
0770
0280
2300
1930

2200
1960
1420
1520
2070

2150
1700
1640
0870
0810
0990
1900
1600










1090

1060




0420
1460
0590


1660
0830
1890

1940


1970
1430
1760
2160

2160
1960
1650
1920
0820
1770
1940
1610


A-U-HHHK-I-O-N S-Y-S-T-E-M
PAGE 8
FORGC15










1780




0480 0630 0660 0710 1190
1490 1540
1250 1270 1340 1420 1760


1790 1970 2260
1760 1930 2280


1970 1930


1990
1450 1760 1790
1790
2190

2190

1960

1920

1980 2000




-------
                                  SECTION 18

                 PROGRAM GC16 - DUPLICATE SAMPLES CALCULATION


    GC16 is the program which calculates the difference between  duplicate
samples and prints a report on those statistics.  It  is entered  by chaining
from the master control program, GCOO, and  it chains  back to that program  if
the escape key is pressed.

    When GC16 begins, the method file  is already open, and GC16  first  counts
the number of identifiers in that method file.  Then  the program asks  the
user for the injection ID numbers for  the two members of the duplicate pair,
and it opens the two corresponding injection data files.

    After the headings have been printed, the program begins to  loop through
the method file.   It reads an identifier from the method file and searches
the two data files for that identifier.  It reads the concentrations from
the data files, and prints them and their absolute difference.

    When all of the identifiers have been accounted for, the program asks
the user if it should start over.  It then either branches back  to the
beginning or chains back to GCOO.
                                     120

-------
                 TABLE 12.   SYMBOL DEFINITIONS FOR PROGRAM GC16
 B         the absolute retention time
 C         the peak  area of the first member
 C2        the peak  area of the second member
 D2$       the injection ID
 D3$       the name  of  the  data file
 F         the number of identifiers in the  method file
 G$        the identifier from the  data file
 H$        the peak  type
 I         the control  variable for loops
 12        the control  variable for loops
 0         the data  file useability flag
              0=1   good  data
              0=2   no TOTAL  AREA
              0=3   wrong format
 J2        the  data  file processing status flag
              02=1  has been  processed
              02=2  never processed
L        the  relative  retention time
L2       the  calculated concentration  of the first member
L3       the calculated concentration of the second member
                                    121

-------
                             TABLE 12.   (Continued)


P6       the  record  number of the last  record in the second member  data file

P7       the  record  number of the first record which describes  a peak in the
         second  member data file

P8       the  record  number of the last  record in the first member data file

P9       the  record  number of the first record which describes  a peak in the
         first member data file

T$       the  name of the method file

V$       the  identifier from the method file

V0$      an error MESSAGE

X$       the  user's  response to Y or  N  questions
                                          ENTER GC16)
                                            FOR
                                           NUMBER
                                            OF
                                          IDENTIFIERS
                                           (READ
                                           CONC. f
                                          :ROM DATA
                                          FILE NO. 1 \


                                           (READ /
                                           CONC. /
                                          :ROM DATAl
                                          FILE NO. 2 V
                                  L	
                             Figure 14. Flowchart of Program GC16.

                                       122

-------
no
G-A-S   C-H-R-tH1-A-T-0-G-R-fl-P4f-Y  A-U-T-0-H-A-T-I-04I   S-Y-S-T-E-M
7/20/1979                                                      PACE  1
                        PROGRAM LISTING FOR GC16

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0010 REH   +=*=t=+=*=+=+=*=4=+=f=4«t=-l-=+=+=-f=+=+=+=-H=+=+r4=+=+=+=+=+rf
 0020 REH   «•   GMOIWNflTOCRAPHY  AUTONftTION SYSTEM                  f
 0030 REN   *   PROGRAM GC16, DUPLICATE SAMPLES CALCULATIONS          *
 0040 REN   +   BY:   j.  KOPKE (SHORCC), APRIL 9, 1?79                 +
 0050 REH   +   HOST RECENT REVISION:  APRIL 12, 1979                 +
 0060 REN   t=*=+=+=f=t=+=+='f=+=+=+=+=+=+=+st=+=*rf=+=f=+=+=+=+=+=+=f=+
 0070 REH
 0080 DIH D2*C8I,D3tC10],G*[8],H$[2J,T*C6J,V$t8LVO«C303,)(*E3]
 0090 ON ESC THEN GOTO 0120
 0100 ESC
 0110 GOTO 0210
 0120 ON ERR THEN GOTO 0140
 0130 CLOSE FILEE3]
 0140 ON ERR THEN GOTO 0160
 0150 CLOSE FILEEO]
 0160 ON ERR THEN STOP
 0170 NOESC
 0180 CHAIN •GCOO"
 0190 REN   ----
 0200 REN         COUNT IDENTIFIERS  IN HFJHQD FILE
 0210 READ FILEC4,l],Tt
 0220 CLOSE FILEH]
 0230 OPEN FILEC4JiT$,200
 0240 LET F=0
 0250 READ FILEt4,3*'?D2$?'  IS NOT A VALID INJECTION ID.
 0380 GOTO 0310
 0390 LET D3$="GC',D2$
 0400 ON ERR THEN GOTO 0420
 0410 RENAME D3$,D3$
 0420 ON ERR THEN STOP
                                                                  "?D2*
5-A-S   MHHHHKHHHHHHH   A-U-T-0-n-A-T-I-O-N   S-Y-S-T-E-N
7/20/1979                                                      PAGE  2
                       PROGRAM LISTING FOR GC16

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0430 IF SYS(7)=-9 THEN GOTO 0470
 tWQ PRINT
 0450 PRINT "<7X7>THERE  IS NO EXISTING DATA FOR INJECTION ID "5D2$5V
 0460 GOTO 0310
 0470 ON ERR THEN GOTO 0510
 0480 OPEN FILEE3,0],D3$,31
 0490 ON ERR THEN STOP
 0500 GOTO 0560
 0510 ON ERR THEN STOP
 0520 DELAY =1
 0530 GOTO 0470
 0540 REM   ----------
 0550 REM         CHECK  DATA FILE USABILITY AND PROCESSING FLAGS
 0560 READ F!LH3,i],J,D3$,J2
 0570 IF J=l THEN GOTO 0660
 0580 PRINT
 0590 IF JO2 THEN GOTO 0630

 r ffiR :<7X7>mi|2S!
 0620 GOTO i960
 0630 PRINT •<7X7>"fD2t5" CANNOT BE USED BECAUSE THE REPORT WAS'
 0640 PRINT'     IN THE  WRONG FORMAT.'
 0650 GOTO 1960
 0660 IF J2=l THEN GOTO 0730
 0670. PRINT
 0680 PRINT «<7X7>';D2$;' CANNOT BE USED FOR SPIKED SAMPLE CALCULATION

 0690 PRINT •     AFTER  IT IS PROCESSED."
 0700 GOTO 0120
 07io REH   -------
 0720 REH         FIND FIRST AND LAST ENTRIES IN DATA FILE
 0730 LET P9=2
 0740 READ FILE[3,P91,VO*
 0750 IF VO*[1,71O'HESSAGE" THEN GOTO 0780
 0760 LET P9=P9+1
 0770 GOTO 0740
 0780 LET P9=P9+2
 0790 LET P8=P9
 0800 READ FILE[3,P8J,G$
 0810 IF EOF(3) THEN GOTO 0840
 0820 LET P8=P8+1
 0830 GOTO 0800
                                                                                                                                  REPORT D,D HOT-
      1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               "000000            0000000

-------
     3-A-S   C4H-0-fHK-";D2$;* IS NOT A VALID INJECTION ID."
      0940 GOTO 0870
      0950 LET D3$=*GC",D2$
      0960 ON ERR THEN GOTO 0980
      0970 RENAME D3$,D3*
      0980 ON ERR THEN STOP
      0990 IF SYS(7)=-9 THEN GOTO 1030
      1000 PRINT
      1010 PRINT "<7X7>THERE IS NO EXISTING DATA FOR INJECTION ID ";D2$?V
      1020 GOTO 0870
.P.    1030 ON ERR THEN GOTO 1070
      1040 OPEN FILE[0,01.03$,31
      1050 ON ERR THEN STOP
      1060 GOTO 1120
      1070 ON ERR THEN STOP
      1080 DELAY =1
      1090 GOTO 1030
      1100 REM	
      1110 REN         CHECK DATA FILE USABILITY AND PROCESSING FLAGS
      1120 READ FILECO,1J,J,D3$,J2
      1130 IF J=l THEN GOTO 1220
      1140 PRINT
      1150 IF JO2 THEN GOTO 1190
      1160 PRINT "<7Xr>",Jt2t',' CANNOT BE USED BECAUSE THE REPORT DID NOT"
      1170 PRINT '    HAVE A TOTAL AREA"
      1180 GOTO 1960
      1190 PRINT "<7X7>';D2$;» CAWWT BE USED BECAUSE THE REPORT HAS"
      1200 PRINT "    IN THE WRONG FORMAT.•
      1210 GOTO 1960
      1220 IF J2=l THEN GOTO 1290
      1230 PRINT
      1240 PRINT "C7X7>'SD2$!" CANNOT BE USED FOR SPIKED SAMPLE CALCULATION
     »     S  UNTIL"
ro
G-A-S   C4HMHHK-*HHHH>-H-Y  A-U-HHHK-I-O-fl   S-Y-S-T-E-fl

                       PROGRAM LISTING FOR GC16

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1250 PRINT •     AFTER IT  IS PROCESSED.•
 1260 GOTO 0120
 1270 REM   	
 1280 REH          FIND FIRST AND LAST ENTRIES IN DATA FILE
 1290 LET P7=2
 1300 READ FILE£0,P73,VO$
 1310 IF VOttl,7K>"MESSAGE" THEN GOTO 1340
 1320 LET P7*P7+1
 1330 GOTO 1300
 1340 LET P7=P7+2
 1350 LET P6=P7
 1360 READ FILECO,P61,G$
 1370 IF EOF(O) THEN GOTO 1400
 1380 LET P6=P6+1
 1390 GOTO 1360
 1400 LET P6=P6-1
 1410 REM   	—
 1420 REH          PRINT  HEADINGS
 1430 PRINT
 1440 PRINT
 1450 PRINT  TAB(13);"D-U-P-L-HHK-E   S-*-H-P-L-£-S   R-E-P-O-fi-T"
                                                                                                                         ;D3$t3,10J; TAB(53)!"HETH
             TAB(13);"D-U-P-L-HHK-E   S-*-H-P-L-£-S
 1460 READ FILEC3,1LJ,D3$,J2
 1470 PRINT "INJECTION  ID FOR FIRST MEMBER:
*     CD NUMBER:   ••,1*13,61
 1480 READ FlL£tO,lLJ,D3*,J2
 1490 PRINT 'INJECTION  ID FOR SECOND MEMBER:  >;D3$[3.10J
 1500 PRINT "CONCENTRATIONS IN HICROGRAMS/LITER"
 1510 PRINT
                            FIRST         SECOND       ABSOLUTE"
                        CONCENTRATION  CONCENTRATION  DIFFERENCE1
                                                                             1520 PRINT
                                                                             1530 PRINT
                                                                             1540 PRINT
                                                                             1550 REH
                                                                             1560 REM


                                                                             1590
                                                                             1600
                                                                             1610
                                                                             1620
                                                                             1630
                                                                             1640
            •IDENTIFIER
                                                                             1650
                   FILL  IN CHART
      FOR 1=1 TO F
        READ FIL£[4,3*I-1].V$
        IF V$="99999" THEN GOTO 1910
        FOR I2=P9TOP8
          READ FILE[3,I2],G*,H*,B,C,L,L2
          IF G*=V( THEN GOTO 1660
        NEXT 12
        LETC=-9999
        LETL=-9999
      1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               0000000            0000000

-------
      G-fl-S   C4HMHHK-
-------
     G-A-S   CHffl-0-H-A-T-O-G-R-A-P-H-Y   A-U-T-Q-M-A-T-I-O-N   S-Y-S-T-E-M
     7/20/1979                                                      PAGE  1
                             PROGRAM LISTING FOR GC17

      1234567891123456789212345678931234567894123456789512345678961234567897
               0000000
      0010 REM   +=t=+=t=t=f=f=+=+=t=t=t=-»-=4-=+=t=+=+=+=f=f=+=+=f=+=+=t=+=+=t
      0020 REM   +   GAS CHROMATOGRAPHY AUTOMATION SYSTEM                  +
      0030 REH   +   PROGRAM GC17, SURROGATE SPIKE CALCULATIONS            *
      0040 REN   +   BY:  J.  KOPKE (SHORCC), APRIL 12, 1979                +
      0050 REM   +   MOST RECENT REVISION:  APRIL 12, 1979                 +
      0060 REM   +=t=f=+=+=+=4=+=+=-f=+=f=+=+=t=-f=t=+=+=f=+=+=+=+=t=+=<-=+=+=+
      0070 REM
      0080 DIM D2$[8LD3$E10LG«8],H$[2M$[6],Vtt8],VOtt30],Vl«40],V7$[83
     *     ,X«3J
      0090 ON ESC THEN GOTO 0120
      0100 ESC
      0110 GOTO 0190
      0120 ON ERR THEN GOTO 0140
      0130 CLOSE FILEC3]
      0140 ON ERR THEN STOP
      0150 NOESC
      0160 CHAIN "GCOO"
      0170 REH   -------
_,    0180 REM          COUNT IDENTIFIERS  IN METHOD FILE
w    0190 READ FILEH,1J,T*
0    0200 CLOSE FILEM]
      0210 OPEN FILE[41,T$,200
      0220 LET F=0
      0230 READ FILEE4i3«F*lMJiV*
      0240 IF EOF(4) THEN GOTO 0290
      0250 LET F=F+1
      0260 GOTO 0230
      0270 REH   ------
      0280 REM          OPEN DATA FILE
      0290 PRINT
      0300 ON ERR THEN GOTO 0320
      0310 INPUT 'WHAT IS THE INJECTION ID FOR THE SURROGATE SPIKE?  ",D2*
      0320 ON ERR THEN STOP
      0330 IF LEN(D2*)=8 THEN GOTO 0370
      0340 PRINT
      0350 PRINT "OXT^JIB*;* IS NOT A VALID INJECTION ID."
      0360 GOTO 0290
      0370 LET D3*="GC",D2$
      0380 ON ERR THEN GOTO 0400
      0390 RENAMF D3»,D3I
      0400 ON ERR THEN STOP
      0410 IF SYS(7)=-9 THEN GOTO 0450
G-A-S   C-H-R-0-M-A-T-O-G-R-ft-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-EH1
7/20/1979                                                       PAGE  2
                        PROGRAM LISTING FOR GC17

 1234567891123456789212345678931234567894123456739512345678961234567897
          0000000
 0420 PRINT
 0430 PRINT "<7X7>THERE IS NO EXISTING DATA FOR INJECTION ID ';D2$;"."
 0440 GOTO 0290
 0450 ON ERR THEN GOTO 0490
 0460 OPEN FILE[3,0],D3$,31
 0470 ON ERR THEN STOP
 0480 GOTO 0540
 0490 ON ERR THEN STOP
 0500 DELAY =1
 0510 GOTO 0450
 0520 REM   	
 0530 REM          CHECK DATA FILE USABILITY AND PROCESSING FLAGS
 0540 READ FILE13,1],J,D3$,J2
 0550 IF J=l TICN GOTO 0640
 0560 PRINT
 0570 IF J02 THEN GOTO 0610
 0580 PRINT H<7X7>*;D2$?* CAMiOT BE USED BECAUSE THE REPORT DID NOT'
 0590 PRINT '     HAVE A TOTAL AREA'
 0600 GOTO 1210
 0610 PRINT "<7>O>"5D2*;e CANNOT BE USED BECAUSE THE REPORT HAS'
 0620 PRINT '     IN THE WRONG FORMAT."
 0630 GOTO 1210
 0640 IF J2=l THEN GOTO 0710
 0650 PRINT
 0660 PRINT 'C7X7>";D2$511 CANNOT BE USED FOR SURROGATE SPIKE CALCULAT!
*     ONS UNTIL'
 0670 PRINT '     AFTER IT IS PROCESSED.'
 0680 GOTO 0120
 0690 REM   	
 0700 REM          LOCATE DATA
 0710 PRINT
 0720 ON ERR THEN GOTO 0740
 0730 INPUT 'WHAT IS THE IDENTIFIER FOR THE SURROGATE SPIKE COMPOUND?
*     ',V7*
 0740 ON ERR THEN STOP
 0750 FOR 1=1 TO F
 0760   READ FILE[4,3*I-1],V*,V1*
 0770   IF V$=V7* THEN GOTO 0820
 0780 NEXT I
 0790 PRINT
 0800 PRINT "<7X7>THERE IS NO IDENTIFIER '5V7*;' IN METHOD ';T*[3,6];R
      1234567891123456789212345678931234567894123456789512345678961234567897
               0000000
  1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
G-A-S   C-4HMHHK-0-G-R-A-P-H-Y   A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-H  G-A-S   C-4H?-0-ff-A-T-0-G-R-A-P-H-V   A-U-HHf-A-T-I-O-N  S-Y-S-T-E-M
7/20/1979                                                      PAGE  3  7/20/1979                                                      PAGE  4
                       PROGRAM LISTING FOR CC17                                                PROGRAM LISTING FOR GC17

 1234567891123456789212345678931234567894123456789512345678961234567897  1234567891123*56789212345678931234567894123456789512345678961234567897
          0000000           0000000
 0810 GOTO 1210                                                         1210 ON ERR THEN GOTO 1230
 0820 LET P9=2                                                          \m &OSE FILET3]
 0830 READ FILEI3,P9],VO$                                                1230 ON ERR THEN STOP
 0840 IF VOttl,7K>'MESSAGE' THEN GOTO 0870                              1240 PRINT
 0350 LET P9=P9+1                                                       1250 ON ERR THEN GOTO 1270
 0660 GOTO 0830                                                         1260 INPUT 'DO YOU WANT A REPORT ON ANOTHER SURROGATE SPIKE?   (Y OR N)
 0870 LET P9=P9+2                                                       *       ">x*
 0880 READ FILE13,P9],G*,H*,B,C,L,L2                                    J2/0 ON ERR THEN STOP
 0890 IF EOFttlOl THEN GOTO 0930                                        }?80 £JS[M3  Y  THEH GOTO 029°
 0900 PRINT                                                             1290 N^SC
 0910 PRINT '<7X7>IDENTIFIER  -;V7*!" DAS NOT DETECTED IN INJECTION '3D  1300 CHAIN "GCM"
*     2$?".'
 0920 GOTO 1210
 0930 IF G$=V7$ THEN GOTO 0960
 0940 LET P9=P9tI
 0950 GOTO 0880
 0960 IF 0-9999 THEN GOTO 0900
 0970 IF LO-9999 THEN GOTO 1010
 0980 PRINT
 0990 PRINT "<7X7>THE CONCENTRATION OF MG*?' HAS NOT CALCULATED DURI
»     NG PROCESSING.1
 1000 GOTO 1210
 1010 PRINT  .
 1020 PRINT 'WHAT IS THE PREPARED CONCENTRATION OF -;V7$!" IN'5
 1030 ON ERR THEN GOTO 1050
 1040 INPUT ' HICROGRAHS/LITER?  ",A5
 1050 ON ERR THEN STOP
 1060 REH   	
 1070 RBI          PRINT REPORT
 1080 PRINT
 1090 PRINT
 1100 PRINT  TABUS) J'S-HJ-RHHHJ-A-T-E   S-P-HC-E   R-E-P-0-R-T"
 1110 PRINT 'INJECTION ID:  ";D2$; TAB(54);"METHOD NUMBER:  ";TS[3.6I
 1120 PRINT 'PREPARED CONCENTRATION OF ';V1$;':   '!
 1130 PRINT USING '	l.tff.AS
 1140 PRINT USING 'CALCULATED CONCENTRATION:  	I.W.L
 1150 PRINT USING 'PERCENT RECOVERED:  —t,tt',L/A5*100
 1160 PRINT 'COfCENTRATIONS IN HICROGRAHS/LITER*
 1170 PRINT
  1180 PRINT
 1190 REM
  1200 REM         URAP-UP PROCEDURE

  1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
           0000000            0000000

-------
     G-A-S   C4HMHI-A-T-(MHHHMt-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M  G-A-S   C4HMH1-A-T-(H3-fi-ft-P-H-Y   A-U-T-Q-M-A-T-I-O-N   S-Y-S-T-E-M
     7/20/1979                                                      PAGE  5  7/20/1979                                                      PAGE  6
                             SYMBOL TABLE FOR GC17                                                   SYMBOL TABLE FOR GC17

     SYMBOL    REFERENCES                                                    SYMBOL    REFERENCES
      2J20  0090  0680                                                        V$    0080  0230  0760  0770
      $$  0}20                                                              m   0080  0830  0840
      0190  0110                                                              Vl$   0080  0760  1120

      §|  8|  0360  W.  ,280                                            g'                    *"  W1»  <*•  '«

      0370  0330
      0400  0380
      0450  0410  0510
      0490  0450
      0540  0490
      0610  0570
      0640  0550
      0710  0640
      0740  0720
      0820  0770
      0830  0860
      0870  0840
rt    0880  0950
ro    0900  0960
      0930  0890
      0960  0930
      1010  0970
      1050  1030
      1210  0600  0630  0810  0920  1000
      1230  1210
      1270  1250
      AS    1040  1130  1150
      B     0880
      C     0880  0960
      02$   0080  0310  0330  0350  0370 0430  0580  OMO  0660  0910
            0990  1J10
      D»   0080  0370  0390  0460  0540
      F     0220  0230  0250  0750
      FLI3  0130  0460  0540  0830  0880 1220
      FLI4  0190  0200  0210  0230  0760
      G$    0080  0880  0930
      K$    0080  0880
      I     0750  0760  0780
      J     0540  0550  0570
      J2    0540  0640
      L     0880  0970  1140  1150
      L2    0880
      P9    0820  0830  0850  0870  0880 0940
      T$    0080  0190  0210  0800  1110

-------
                                   SECTION 20

                PROGRAM  6C18  -  REPLICATE  STATISTICS CALCULATION


    GC18  is  the  program which  calculates replicate statistics  and prints a
report.   It  is entered  by  chaining from  the  master control  program,  GCOO,
and it chains back to that program if  the escape  key is  pressed.

    When  GC18 begins, the  method file  is  already  open, and  the program
counts the number of identifiers in  that file.  The program then  asks  the
user for  the injection  ID  for  a sample,  and  opens  the corresponding
injection data file.  The  program then reads each  identifier from the  method
file and  locates the calculated concentration of each identifier  in  the  data
file.  It places the concentration in  array  0, and then  it  closes the  data
file and  goes back to ask  the  user for another injection  ID.

    When  the user types "END"  as an  injection ID  (or when ten  replicates
have been entered) the program begins to  print the report.   It prints  the
headings  first, and then fills in the  table.  It reads the  replicate
concentrations for each identifier from  array 0, calculates  the mean
concentration and standard deviation,  and  prints these statistics.

    When  all of the identifiers have been  dealt with, the program asks the
user if it should start over.  It then either branches back  to the beginning
or chains back to GCOO.
                                    133

-------
                TABLE 14.  SYMBOL DEFINITIONS FOR PROGRAM GC18
B        the absolute retention time
C        the peak area
D2$      the injection ID
D3$      the name of the data file
F        the number of identifiers in the method file
G$       the identifier from the data file
H$       the peak type
I        the control variable for loops
1$       the superstring of injection ID numbers for replicates
12       the control variable for loops
J        the data file useability flag
              J=l   good data
              J=2   no TOTAL AREA
              J=3   wrong format
J2       the data file processing status flag
              J2=l  never processed
              J2=2  processed
L        the calculated concentration
L2       the relative retention time or capacity ratio
0()      the array of calculated concentrations of replicates
P8       the record number for the last peak in the data file
P9       the record number for the first peak in the data file
R4       the standard deviation
                                    134

-------
                             TABLE 14.   (Continued)

R5       the  average concentration (arithmetic  mean)
R6       the  number of replicate injections
R7       the  number of replicates of an individual  compound
R8       the  sum  of the measured concentrations (used in calculating the
         average  and the standard deviation)
R9       the  sum  of the squares of the measured concentrations (used in
         calculating the standard deviation)
T$       the  name of the method file
V$       the  identifier from the method file
V0$      an error MESSAGE
X$       the  user's response to a Y or N question
                     GCOO
                                       yes
                              /  READ  I
                              /   CONC.  /
                              FROM DATA
                              \   FILE   \
                                                       MEAN
                                                       AND
                                                     STANDARD
                                                      EVIATIO
                                                      CHAIN
\-ll- (
                                                                   GCOO
                               Figure 16. Flowchart of Program GC18.
                                      135

-------
to
cn
      G-A-S   C-H-R-0-fl-A-T-O-G-fl-A-P-H-Y   A-U-T-D-14-A-T-I-O-N   S-Y-S-T-E-M
      7/20/1979                                                      PAGE  1
                             PROGRAM LISTING FOR GC18

       1234567891123456789212345678931234567894123456789512345678961234567897
                0000000

       0020 REM   +" 'GAS'CHROMATOGRAPHY «JTOMATION~SYSTEM   	  +
       0030 REH   4  PROGRAM GC18, REaiCATE STATISTICS CflLCUUnONS       +
       0040 REM   +  BY:   J. KOPKE (SHORCC), APRIL 16, 1979                +
       0050 REM   +  MOST RECENT REVISION:  APRIL 16, 1979                 *
       0060 REM   +=+=+=+=+a*=+=+='l-=f=+=+=f=ta+=t=+=t=+=+=+=t=+at=+=+=+=4-=+=+
       0070 REM
       0080 DIM D2$(8],D3»[10],G$[8],H«[2],I$[80],0[60,10],T$[6],Vi[8],VO$[30
      *     M«t3J
       0090 ON ESC THEN GOTO 0120
       0100 ESC
       0110 GOTO 0190
       0120 ON ERR THEN GOTO 0140
       0130 CLOSE FILEE3]
       0140 ON ERR THEN STOP
       0150NOESC
       0160 CHAIN "GCOO"
       0170 REM   —	
rf     0180 REM         COUNT IDENTIFIERS IN METHOD FILE
       0190 READ FILEE4,l],r$
       0200 CLOSE FILEI4J
       0210 OPEN FILEI4LT*, 200
       0220 LET F=0
       0230 READ FIL£[4,3»(F+1MJ.V»
       0240 IF EOF(4) THEN GOTO 0290
       0250 LET F=F+1
       0260 GOTO 0230
       0270 REH   —	
       0280 REN         OPEN DATA FILE
       0290 PRINT
       0300 PRINT "ENTER THE INJECTION ID NUMBERS FOR THE REPLICATE INJECTION
      *     S  "
       0310 PRINT "TYPE 'END' TO TERMINATE THE LIST."
       0320 LET R6=0
       0330 LET I$="
       0340 PRINT .
       0350 IF R6C10  THEN  GOTO 0390
       0360 PRINT '<7X7>YOU HAVE ENTERED TEN REPLICATES,  HHICN IS  THE LIMIT

       0370 PRINT •      FOR THIS PROGRAM."
       0380 GOTO 1140
       0390 ON ERR THEM GOTO 0410
G-A-S   C-tHHHHK-0-G-R-A-P-H-Y  A-U-HHHK-I-Q-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  2
                        PROGRAM LISTING FOR GC18

 1234567891123456789212345678931234567894123456789512345678961234567897
          0         00        0         0         0         0
 0400 INPUT "INJECTION ID FOR REPLICATE?  ",D2i
 0410 ON ERR THEN STOP
 0420 IF C2*='EMJ" THEN GOTO 1140
 0430 IF LEN(D2*)=8 THEN GOTO 0470
 0440 PRINT
 0450 PRINT •OX7>"?D2$;'  IS NOT A VALID INJECTION ID.'
 0460 GOTO 0340
 0470 LET D3$="GC",D2$
 0480 ON ERR THEN GOTO 0500
 0490 RENAME D3$,D3$
 0500 ON ERR THEN STOP
 0510 IF SYS(7)=-9 THEN GOTO 0550
 0520 PRINT
 0530 PRINT "<7X7>THERE IS NO  EXISTING DATA FOR INJECTION ID "ffl»,'V
 0540 GOTO 0340
 0550 ON ERR THEN GOTO 0590
 0560 OPEN F!L£[3,0],D3$,31
 0570 ON ERR THEN STOP
 0580 GOTO 0640
 0590 ON ERR THEN STOP
 0600 DELAY =1
 0610 GOTO 0550
 0620 REM	
                             FILE
                                                                                               GOTO 0760
                                                                              0670 IF JO2 THEN GOTO 0720

                                                                              ft HF •'";D2*J" CANNOT BE USED BECAUSE THE REPORT HAS"
                                                                              0730 PRINT "     IN THE URONG FORMAT."
                                                                              0740 CLOSE FILEC3]
                                                                              0750 GOTO 0340
                                                                              0760 IF J2=l THEN GOTO 0840
                                                                              0770 PRINT
                                                                              0780 PRINT "<7X7>";D»J- CANNOT BE USED FOR REPLICATE STATISTICS CALC
                                                                             »     ULATIONS UNTIL"
                                                                              0790 PRINT •     AFTER IT IS PROCESSED."
                                                                              0800 CLOSE FILEC3J
       1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               0000000            0000000

-------
G-A-S   C-H-R-O-M-fl-T-O-GHl-fl^^Y   AHHHHI-A-T-I-O-W   S-Y-S-T-E-M
7/20/1979                                                      PAGE  3
                        PROGRAM LISTING FOR GC18

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0810 GOTO 0340
 0820 REH	:	
 0830 REH          FIND FIRST AND LAST ENTRIES IN DATA FILE
 0840 LET P9=2
 0850 READ FILEt3,P93,VO*
 0860 IF VO$Cl,730'«ESSftGE*  THEN GOTO 0890
 0870 LET P9=P9+1
 0880 GOTO 0850
 0890 LET P9=P9+2
 0900LETP8=P9
 0910 READ FILEC3.P83.G*
 0920 IF EOF(3) THEN GOTO 0950
 0930 LET P8=P8+i
 0940 GOTO 0910
 0950 LET P8=P8-l
 0960 REH   	
 0970 REH          COPY DATA  TO ARRAY
 0980 LET R6=R6H
 0990 LET !*=!*,D2$
 1000 FOR 1=1 TO F
 1010   READ FILEC4,3*I-13,V*
 1020   FOR I2=P9 TO P8
 1030     READ F!LE[3>I2LG*,HVB,C,L,L2
 1040     IF G*=V$ THEN GOTO  1080
 1050   NEXT 12.
 1060   LET OtI,R63=-9999
 1070   GOTO 1090
 1080   LET OfI,R63=L
 1090 *EXT I
 1100 CLOSE FILE133
 1110 GOTO 0340
 1120 REH	
 1130 REH          PRINT HEADING
 1140 IF R6>1 THEN GOTO 1190
 1150 PRINT
 1160 PRINT *<7X7>REPLICATE  STATISTICS CANNOT BE CALCULATED WITH FEUER
*      THAN"
 1170 PRINT •     THO GOOD  INJECTIONS."
 1180 GOTO 1660
 1190 PRINT
 1200 PRINT
 1210 PRINT  TABUOJS'R-E-P-L-I-C-a-T-E  S-T-A-T-I-S-T-I-C-S   R-E-P-0
*     -R-T*

 1234567891123456789212345678931234567894123456789512345678961234567897
          0         00        0000
G-A-S   C-H-R-OHf-A-T-0-G-R-A-P-H-Y   A-U-THHf-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  4
                        PROGRAM LISTING FOR GC18

 1234567891123456789212345678931234567894123456789512345678961234567897

 1220 PRINT "METHOD NUHBER:   ";T«3,6]5 TAB(39);'CONCENTRATIONS IN HICR
*     OGRAKS/LITER"
 1230 PRINT 'REPLICATE INJECTION ID NUMBERS:  •;
 1240 FOR 1=1 TO R6
 1250   PRINT I«8*I-7,8*I3!
 1260   IF IOR6 THEN PRINT  ',  •;
 1270   IF 104 THEN GOTO 1300
 1280   PRINT
 1290   PRINT •     '?
 1300 NEXT I
 1310 PRINT
 1320 PRINT
 1330 PRINT "              AVERAGE    STANDARD   NUMBER OF"
 1340 PRINT 'IDENTIFIER  CONCENTRATION DEVIATION  REPLICATES"
 1350 PRINT "~	"
 1360 REM	
 1370 REH          FILL IN CHART
 1380 FOR 1=1 TO F
 1390   READ FILEC4,3*1-13,V*
 1400   IF V$="99999" THEN GOTO 1620
 1410   LET R8=0
 1420   LETR9=0
 1430   LETR7=0
 1440   FOR 12=1 TO R6
 1450     IF OCM23=-9999 THEN GOTO  1490
 1460     LET R7=R7+1
 1470     LET R8=R8+0[M23
 1480     LETR9=R9+On,I23A2
 1490   NEXT 12
 1500   PRINT USING " **#*!#*#  ",V$;
 1510   IF R7>0 THEN GOTO 1540
 1520   PRINT "                                0"
 1530   GOTO 1620
 1540   LET R5=R8/R7
 1550   PRINT USING "  	|.ttt  ",R5;
 1560   IF R7>1 THEN GOTO 1590
 1570   PRINT "          '"?
 1580   GOTO 1610
 1590   LET R4=SQR((R9-R8A2/R7)/(R7-1))
 1600   PRINT USING "	i.il SR4;
 1610   PRINT USING "     «I",R7
 1620 NEXT I

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
      G-A-S   C^HHHH-0-G-R-A-P-H-Y   A-U-T-0-fl-A-T-HBI   S-Y-S-T-E-H  G-A-S   CHHMHHK-0-G-R-A-P-H-Y   A-U-HHHK-I-O-N   S-Y-S-T-E-H
      7/20/1979                                                     PAGE  5  7/20/1979                                                     FACE 6
                             PROGRAM LISTING FOR GC18                                               SYMBOL TABLE FOR GC18

       1234567891123456789212345678931234567894123456789512345678961234567897  SYMBOL    REFERENCES
               0
       1630 REH   	—	0120  0090
       #$£9MT        HRAP-UP PROCEDURE                                     0140  0120
       1650 PRINT                                                              0190  0110
       1660 PRINT                                                              0230  0260
       1670 ON ERR THEN GOTO 1690                                              0290  0240  1700
       1680 INPUT 'DO YOU WANT A REPORT ON ANOTHER SET OF REPLICATES?  IY OR    0340  0460  0540  0710  0750  0810  1110
      *    N)   'x*                                                           0390  0350
       1690 ON ERR THEN STOP                                                   0410  0390
       1700 IF X«1,J]="Y" THEN GOTO 0290                                      0470  0430
       1710 NOESC                                                              0500  0480
       1720 CHAIN -GCOO"                                                       0550  0510  0610
                                                                              0590  0550
                                                                              0640  0580
                                                                              0720  0670
                                                                              0760  0650
                                                                              0840  0760
                                                                              0850  0880
                                                                              0890  0860
_                                                                            0910  0940
to                                                                            0950  0920
00                                                                            1080  1040
                                                                              1090  1070
                                                                              1140  0380  0420
                                                                              1190  1140
                                                                              1300  1270
                                                                              1490  1450
                                                                              1540  1510
                                                                              1590  1560
                                                                              1610  1580
                                                                              1620  1400  1530
                                                                              1660  1130
                                                                              1690  1670
                                                                              B     1030
                                                                              C     1030
                                                                              D2»   0080  0400  0420  0430  0450  0470  0530  0680  0720 0780
                                                                                    0990
                                                                              03$   0080  0470  0490  0560  0640
                                                                              F     0220  0230  0250  1000  1380
                                                                              FLI3  0130  0560  0640  0700  0740  0800  0850  0910  1030 1100
                                                                              FLI4  0190  0200  0210  0230  1010  1390
                                                                              G$    0080  0910  1030  1040
                                                                              H$    0080  1030
                                                                              I     1000  1010  1060  1080  1090  1240  1250  1260  1270 1300
      1234567891123456789212345678931234567894123456789512345678961234567897          1380  1390  1450  1470  1480  1620
               00        0         0         0         0        01*    0080  0330  0990  1250

-------
      G-A-S   C4HHHHK-(HHHH>-H-Y   A-U-HHf-A-T-I-O-N   S-Y-S-T-E-H
      7/20/1979                                                     PAGE  7
                             SYfflOL TABLE FOR 6C18

      SYMBOL    REFERENCES

       12    1020  1030   1050  1440  1450  1470  1480  1490
       J     0640  0650   0670
       J2    0640  0760
       L     1030  1080
       L2    1030
       0[    0080  1060   1080  1450  1470  1480
       P8    0900  0910   0930  0950  1020
       P9    0840  0850   0870  0890  0900  1020
       R4    1590  1600
       R5    1540  1550
       R6    0320  0350   0980  1060  1080  1140  1240  1260  1440
       R7    1430  1460   1510  1540  1560  1590  1610
       R8    1410  1470   1540  1590
       R9    1420  1480   1590
       Tt    0080  0190   0210  1220
       V$    0080  0230   1010  1040  1390  1400  1500
       V04   0080  0850   0860
       X$    0080  1680   1700
CO
vo

-------
                                  SECTION 21

               PROGRAM GC19 - DISSIMILAR ANALYSIS CONFIRMATION


    6C19 is the program which prints a dissimilar analysis confirmation
report.  It is entered by chaining from the master control program, GCOO,
and it chains back to that program if the escape key  is pressed.

    GC19 first asks the user for the method numbers and the  injection  ID
numbers to be used in the confirmation report.  The user  is  forced to  input
at least two but no more than four method numbers and at  least one but no
more than four injection ID numbers for each of the methods.  The method
numbers and injection ID numbers are checked as they are  input to ensure
that they are valid numbers and that the corresponding data  files exist.
The names of the method files are placed in superstring S5$, and the names
of the data files are placed in superstring S6$.

    The program then asks the user for the identifier for which the
confirmation report is to be compiled, and it checks to be sure that the
identifier does occur in all of the specified methods.

    Next, the program prints the headings for the report, and then begins to
fill in the report.  For each line of the report, the program opens a  data
file and locates the concentration for the specified  identifier.

    When the report is complete, the program asks the user whether it  should
start over.  If the user answers YES, the program branches back to the point
of asking for the identifier to be used.  Otherwise, control is returned to
GCOO.
                                     140

-------
                             IDENTIFIER
                              CHECK
                             METHODS
                               FOR
                             IDENTIFIER
                           /READ   y
                           /   CONC.   /
                           (FROM DATA
                           V    FILE   \
                           .CONCENTRATION

                              CHAIN
                                             GCOO
Figure 17. Flowchart of Program GC19.
                14]

-------
                TABLE 15.  SYMBOL DEFINITIONS FOR PROGRAM  6C19
B        the absolute retention time
C        the peak area
D2$      the injection ID
D3$      the name of a data file
G$       the identifier from the data file
H$       the peak type
I        the control variable for loops
12       the control variable for loops
0        the data file useability flag
              0=1   good data
              0=2   no TOTAL AREA
              0=3   wrong format
J2       the data file processing status flag
              02=1  processed
              02=2  never processed
L        the calculated concentration
P9       the record number being accessed in the data file
S5       the counter for the number of methods
S5$      the superstring of the names of the method files
S6$      the superstring of the names of the data files
S6()     the array of four counters which count the number of data files
         used with each method
S7       the record number being accessed in the method file
T        the method number
                                     142

-------
                            TABLE 15.  (Continued)

T$       the name of the method file
Tl$      the method number as a string
V$       the identifier from the method file
V0$      an error MESSAGE from the data file
V7$      the identifier for which the report is generated
X$       the user's response to a Y or N question
Z5       the character position of a slash in the identifier
                                     143

-------
G-A-S   C-IHMMHK-KHHHHMt-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE   1
                        PROGRAM LISTING FOR GC19

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0010 REH   *c;<«+=+=t=f=<«*=t=t=t=f=+s+=<-=+=+=t='f=t=f=+=+=+=+=+=+=+s+=t
 0020 REH   +   GAS CHRONATOGRAPHY AUTOMATION SYSTEM                  +
 0030 REH   +   PROGRAM GC19, DISSIMILAR ANALYSIS CONFIRMATION        +
 0040 REH   +   BY:  J. KOPKE (SHORCC), APRIL 19,  1979                +
 0050 REH   *   MOST RECENT REVISION:  APRIL 19, 1979                 *
 0060 REH   4»»-=^+=f=+=4e+='fa+=+=+='l=+='f=+=+=+=+=*=+=+=+=+=+=-f=4-=+=+=+
 0070 HEM
 0080 ON ESC THEN GOTO 2040
 0090 ESC
 0100 DIM D2$I8],D3$[10],G$C8],H«[2],S5«C24],S6$[160],S6[4],TS[6],T1$[6
t     LW8J,VO$[30],V7$t8J,X«3]
 0110 REM   	
 0120 REN          INPUT METHOD NUMBERS
 0130 LET S5*="
 0140 FOR 1=1 TO 16
 0150   LET S6$=S6$,'
 0160 NEXT I
 0170 LET S5=0
 0180 IF S5O4 TIEN GOTO 0190
 0182 PRINT                   	
 0184 PRINT '<7X7>YOU HAVE ENTERED FOUR METHODS WHICH IS THE LIMIT FOR
*      THIS PROGRAM.1
 0186 GOTO 0940
 0190 PRINT
 0200 PRINT 'WHAT  IS THE NUMBER OF THE "J
 0210 ON S5+1 THEN GOTO 0220. 0240, 0260, 0280
 0220 PRINT 'FIRST •;
 0230 GOTO 0290
 0240 PRINT "SECOND '!
 0250 GOTO 0290
 0260 PRINT 'THIRD "5
 0270 GOTO 0290
 0280 PRINT -FOURTH '!
 0290 PRINT -METHOD?'
 0300 ON ERR THEN GOTO 0320
 0310 INPUT '     (TYPE 'END' TO TERMINATE THE LIST OF METHODS)   ',T1$
 0320 ON ERR THEN STOP
 0330 IF T1$O*EMD- THEN GOTO 0380
 0340 IF S5>1 THEN GOTO 0940
 0350 PRINT
 0360 PRINT -<7X7>YOU MUST USE AT LEAST THO DIFFERENT METHODS.'
 0370 GOTO 0190

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
G-A-S   C-H-R-OH1-A-T-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                       PAGE  2
                        PROGRAM LISTING FOR GC19

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0380 ON ERR THEN GOTO 0420
 0390 LET T=VAL(W)
 0400 ON ERR THEN STOP
 0410 IF T=ABS(INT(T)) THEN IF T>0 THEN IF K10000 THEN GOTO 0460
 0420 ON ERR THFN STOP
 0430 PRINT
 0440 PRINT "<7X7>-;T1*;" IS NOT A VALID METHOD NUMBER.'
 0450 GOTO 0190
 0460 LET TJ=-GCOOOO'
 0470 LET T$[7-LEN(STR$(T)),6]=STR$(T)
 0480 ON ERR THEN GOTO 0500
 0490 RENAME T$,T$
 0500 ON ERR THEN STOP
 0510 IF SYS(7)O-10 THEN GOTO 0550
 0520 PRINT
 0530 PRINT '<7X7>THERE IS NO EXISTING METHOD WITH THE NUMBER ';T$£3,6
t     ]"* *
 0540 GOTO 0190
 0550 PRINT
 0560 LET S5=S5*1
 0570 LET S5«6*S5-5,6*S53=T$
 0590 REH   	
 0590 REM          INPUT INJECTION ID NUMBERS
 0600 LET S6ES5]=0
 0610 IF S6[S5]O4 THEN GOTO 0620
 0612 PRINT '<7X7>YOU HAVE ENTERED FOUR FRACTIONS WHICH IS THE LIMIT F
*     OR ONE METHOD,'
 0614 GOTO 0180
 0620 PRINT -HHAT IS THE INJECTION ID FOR THE "!
 0630 ON S6[S5]+1 THEN GOTO 0640,  0660,  0680,  0700
 0640 PRINT "FIRST ';
 0650 GOTO 0710
 0660 PRINT "SECOND *;
 0670 GOTO 0710
 0680 PRINT -THIRD •?
 0690 GOTO 0710
 0700 PRINT -FOURTH '!
 0710 PRINT -FRACTION FOR METHOD -;T$[3,6L"?-
 0720 ON ERR THEN GOTO 0740
 0730 INPUT "     (TYPE 'END' TO TERMINATE THE LIST OF FRACTIONS)   VD2
*     $
 0740 ON ERR THEN STOP

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
G-A-S   CHHMHl-fr-T-0-G-tf-A-f-H-Y   A-U-T-0-M-A-T-I-O-N
7/20/1979
                        PROGRAM LISTING FOR GC19
 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0750 IF D2*O"END" THEN GOTO 0790
 0760 IF S6[S5]X> THEN GOTO 0180
 0770 PRINT "<7X7>YOU MUST USE AT LEAST ONE FRACTION FOR A METHOD."
 0780 GOTO 0620
 0790 IF LEN(D2*)=8 THEN GOTO 0820
 0800 P51KTJ2X7>"5I)2*!"  IS HOT A VALID INJECTION ID NUMBER."

 0820 LET D3*=BGC",D2$
 0830 ON ERR THEN GOTO 0850
 0840 RENAME D3$,D3$
 0850 ON ERR THEN STOP
 0360 IF SYS<7JO-10 THEN GOTO 0390
 0870 PRINT "<7X7>THERE IS NO EXISTING DATA FOR INJECTION "5D2*;"."
S-Y-S-T-E-M 6-A-S   C4f-R-(HHJ-T-{H;-fl-A-P-H-Y   A-U-T-0-fl-A-T-I-O-N   S-Y-S-T-E-M
    PAGE  3 7/20/1979                                                      PAGE  4
                                   PROGRAM LISTING FOR GC19
 0890 LET S6C$fiJ=S6[S5M
 0900 LET S6«((S5-l)*40>+S6[S5]*10-9,«S5-l)*40)tS6CS5]*10]=D3*
 0910 GOTO 0610
 0920 REH   	
 0930 REM          CHECK METHOD FOR PRESENCE OF IDENTIFIER
 0940 PRINT
 0950 ON ERR THEN GOTO 0990
 0960 INPUT 'WHAT^IS THE IDENTIFIER FOR WHICH YOU WANT A CONFIRMATION R
*     EPQRT?   iV7*
 0970 ON ERR THEN STOP
 0980 GOTO 1030
 0990 ON ERR THEN STOP
 1000 PRINT
 1010 PRINT "<7X7)ySE A SLASH (/) WHERE  YOU WANT A COMMA."
 1020 GOTO 0940
 1030 LET Z5=POS(V7$,"/M)
 1040 IF Z5=0 THEN GOTO 1070
 1050 LET V7ttZ5,Z5!l=V
 1060 GOTO 1030
 1070 FOR 1=1 TO S5
 1080   ON ERR THEN GOTO 1120
 1090   OPEN FILE[4,OLS5«6*I-5,6*n,200
 1100   ON ERR THEN STOP
 1110   GOTO 1160
 1120   PRINT
 1130   PRINT "<7X7>HETHOD ";S5«6*I-3,6*IJ?" IS BEING USED BY ANOTHER
»      USER.*                                 *
 1140   PRINT "     THIS OPTION IS BEING TERMINATED."
             1234567891123456789212345678931234567894123456789512345678961234567897
                      0000000
             1150   GOTO 2040
             1160   LET S7=l
             1170   READ FILEC4,3*S7-13,V$
             1180   IF EOF(4)O1  THEN GOTO  1230
             1190   PRINT
             1200   PRINT "<7X7>IDENTIFIER "5V7*!" DOES NOT APPEAR IN METHOD ";S5$
            *     [6*1-3,6*1];"."
             1210   CLOSE
             1220   GOTO 1980
             1230   IF V*=V7* THEN GOTO  1260
             1240   LET S7=S7+1
             1250   GOTO 1170
             1260   CLOSE
             1270 NEXT I
             1280 REM   	
             1290 REM         PRINT HEADINGS
             1300 PRINT
             1310 PRINT
                              D-I-S-S-I-M-I-L-A-R  A-N-A-L-Y-S-I-S   C-0-N-F-I-R-M
                                             CALCULATED"
                                            CONCENTRATION"
 1320 PRINT
*     -A-T-I-O-N"
 1330 PRINT "IDENTIFIER:   "JV7*! TAB(39);"CONCENTRATIONS IN MICROGRAMS/
*     LITER"
 1340 PRINT
 1350 PRINT "METHOD  INJECTION
 1360 PRINT "NUMBER     ID
 1370 PRINT
 1380 REM   	
 1390 REM          FILL IN CHART
 1400 FOR 1=1 TO S5
 1410   FOR 12=1 TO S6m
 1420     LET D3*=S6«((I-1)*40HI2*10-9,((I-1>*40)+I2*10]
 1430     ON ERR THEN GOTO 1470
 1440     OPEN FILE[3,OLD3i,31
 1450     ON ERR THEN STOP
 1460     GOTO 1520
 1470     ON ERR THEN STOP
 1480     PRINT
 1490     PRINT "<7X7>THE DATA FOR  INJECTION ";D3$!" IS BEING USED BY
*     ANOTHER USER."
 1500     PRINT "     THIS OPTION  IS BEING TERMINATED."
 1510     GOTO 2040
 1520     REM	
 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
6-A-S   C-H-fMHHK-0-G-fl-frP-H-Y   A-IHHHHH-I-CBI   S-Y-S-T-E-M  6-A-S   C-4HHHHK-0-G-R-A-P-H-Y   A-U-T-0-M-fl-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                     PAGE  5  7/20/1979                                                     PftGE  6
                       PROGRAM LISTING FOR GC19                                               PROGRAM LISTING FOR GC19

 1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000
 1530     RBI    CtCCK DATA FILE FLAGS                                  1920   NEXT 12
 1540     READ FILE[3,i],J,D3$,J2                                        1930   PRINT
 1550     IF J=l  THDf GOTO 1640                                          1940 NEXT I
 1560     PRINT                                                         1950 REH   	
 1570     IF JO2 THEN GOTO 1610                                         J960 REH         HRAP-UP PROCEDURE
 1580     PRINT •OX7>"?D3$£3,10]{' CANNOT BE USED BECAUSE THE REPORT    1970 PRINT
*     DID NOT HAVE'                                                      1980 PRINT
 1590     PRINT "    A TOTAL AREA.  "!                                  1990 ON ERR THEN GOTO 2020
 1600     GOTO 1670                                                      2000 PRINT "DO  YOU  WANT A CONFIRMATION REPORT FOR ANOTHER COMPOUND USI
 1610     PRINT •<7X7>";B3$;* CANNOT BE USED BECAUSE THE  REPORT HAS IN  *     NG"
*      THE WRONG'                                                       2010 INPUT '     THE SANE METHODS AND FRACTIONS?  (V OR N)  ">X$
 1620     PRINT "    FORMAT.  '5                                        2020 ON ERR THEN STOP
 1630     GOTO 1670                                                      2030 IF XttI,l]="Y' THEN GOTO 0940
 1640     IF J2=l THEN GOTO 1710                                         2040 CLOSE
 1650     PRINT •<7X7>";D3«3,10J;1' CANNOT BE USED FOR DISSIMILAR ANAL   2050 NOESC
*     YSIS CONFIRMATION*                                                 2060 CHAIN 'CCOO" THEN GOTO 0100
 1660     PRINT •    UNTIL AFTER  IT IS PROCESSED.  ';
 1670     PRINT 'THIS OPTION IS BEING TERMIWTED."
 1680     GOTO 2040
 1690     REN   	
 1700     REN    FIND CONCENTRATION
 1710     LET P9=2
 1720     READ FJLEr3,P9LVO*
 1730     IF VO*n,7JO"MESSAGE' THEN GOTO 1760
 1740     LET P9=P9+1
 1750     GOTO 1720
 1760     LET P9=P9+2
 1770     READ FILEK.P9J,G*,H$,B,C.L
 1780     IF EOFI3JO1 THEN GOTO 1800
 1790     LETO-9999
 1800     IF G«=V7t  THEN GOTO 1830
 1810     LET P9=P9+1
 1820     GOTO 1770
 1830     CLOSE
 1840     PRINT USING " fMf    ltfilttl*,S5SC6»I-3,64n,D3$C3.10:i;
 1850     IF CO-9999 THEN GOTO 1880
 1860     PRINT -   NOT DETECTED"
 1870     GOTO 1920
 1880     IF LO^9999 THEN GOTO 1910
 1890     PRINT ' NOT CALCULATED'
 1900     GOTO 1920
 1910     PRINT USING "  	t,W,L

 12345*7891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
          0000000            0000000

-------
u-uro t/-n~n-u-n~H"i"tn>~n"H r 11 T H-u-i~u~n~H~i-i-irw O-T-O-I-CTI U-H-O i,-n-n-urr-H-i-u-u-n~H-i — n-i
7/20/1979 PAGE 7 7/20/1979
SYMBOL TABLE FOR GC19 SYMBOL TABLE
SYWOL REFERENCES SYMBOL REFERENCES
0100
0180
0190
0220
0240
0260
0280
0290
0320
0380
0420
0460
0500
0550
0610
0620
0640
0660
0680
0700
0710
0740
0790
0820
0850
0890
0940
0990
1030
1070
1120
1160
1170
1230
1260
1470
1520
1610
1640
1670
1710
1720
1760
1770
1800
2060
0614 0760
0180 0370 0450 0540
0210
0210
0210
0210
0230 0250 0270
0300
0330
0380
0410
0480
0510
0910
0610 0780 0810 0880
0630
0630
0630
0630
0650 0670 0690
0720
0750
0790
0830
0860
0186 0340 1020 2030
0950
0980 1060
1040
1080
1110
1250
1180
1230
1430
1460
1570
1550
1600 1630
1640
1750
1730
1820
1780
1830
1880
1910
1920
1980
2020
2040
B
C
D2*
D3$

FLI3
FUH
G$
H$
I

12
J
J2
L
P9
S5

S5«
S6t
S6C
S7
T
T*
Tl*
Vt
VOf
V7$
X$
Z5








1800
1850
1880
1870
1220
1990
0080
1770
1770
0100
0100
1650
1440
1090
0100
0100
0140
1840
1410
1540
1540
1770
1710
0170
0890
0100
0100
0100
1160
0390
0100
0100
0100
0100
0100
0100
1030








1900
1150
1790
0730
0820
1840
1540
1170
1770
1770
0160
1940
1420
1550
1640
1880
1720
0180
0900
0130
0150
0600
1170
0410
0460
0310
1170
1720
0960
2010
1040








1510
1850
0750
0840

1720

1800
1070

1920
1570

1910
1740
0210
1070
0570
0900
0610
1240
0470
0470
0330
1230
1730
1030
2030
1050








1680

0790
0900

1770


1090





1760
0340
1400
1090
1420
0630


0490
0390


1050












0800
1420




1130





1770
0560

1130

0760


0530
0440


1200










HTj-i-UTr-H-i-j-irn a i a I^TI
PAGE 8
FORGC19


0820 0870
1440 1490 1540 1580




1200 1270 1400 1410





1810
0570 0600 0610 0630

1200 1840

0890 0900 1410


0570 0710



1230 1330 1800













1610




1420






0760






















-------
                                  SECTION 22

                PROGRAM GC20 - SAMPLE FILE CONTROL INTERACTION
    GC20 is the module of the GCAS which creates run results files for
transmission to the Sample File Control (SFC) System.  The format of the run
results file is defined in the document "EPA Sample File Control Functional
Design."  The program is entered by chaining from the master control
program, GCOO,  and it chains back to that program if the escape key is
pressed.  Also, if the escape key is pressed, the run results file being
created is deleted.

    As GC20 begins, it gives the user the choice of creating a new run
results file, editing an existing run results file, or sending an existing
run results file to the SFC computer.  If the user chooses to edit a file,
control is passed to the SFC foreground BASIC program RUNEDIT.  Similarly,
if the user wants to send a run results file to the SFC computer, control  is
passed to the program SEND.

    If the user chooses to create a new run results file, GC20 asks for the
information necessary to name the file and generate its header record.

    Next, the program allows the user to report any laboratory control
standards.  The user must enter the injection ID and concentration pattern
letter for each control standard, and the program copies the appropriate
data from the injection data file and concentration pattern file into the
run results file.

    The user is then allowed to report the concentrations of samples to SFC,
along with any combination of spikes, duplicates, and surrogate spikes.  The
user enters the injection  ID for the sample, and the calculated
concentrations are copied from the injection data file into the run results
file.  The prepared concentration of any surrogate spike is also placed  in
the run results file.  For a spiked sample, the user enters the injection  ID
for the sample after spiking and the concentration pattern for the spike
added values, and the program copies the appropriate data from the injection
data file and concentration pattern file into the run results file.  Again,
the prepared concentration of any surrogate spike is also placed into the
run results file.  For a duplicate of a sample, the user enters the
injection ID for the duplicate, and the program copies the necessary data
from the  injection ID file into the run results file.  Once again, the
prepared concentration of any surrogate spike is also placed into the run
results file.
                                     148

-------
GCOO
                  GC20
                                                                0)
-fa.
VO
                           / CONTROL
                           / STANDARD
                            INTO RUN
                           \RESULTS FILE
                                               HEADER
                                               RECORD /
                                              INTO RUN |
                                             .RESULTS FILE
                             X\
                         yes .XANOTHER no
                        U*-  =z

                                                                                                  tn •
2

                                                                                                  cos:

                                                                                                  3
                                                                                                  Ql
                                                                                                  W
                                                                                                  c* fO
                                                                                                                                                   co o>
                                                                                                                                                   c 3
                                                                                                                                                   rt-
                                                                                                                                                   (/»
                                                                                                                                                     O>
                                       [CONCENTRATION
                                         PATTERN  I
                                                                                                              f DUPLICATE/
                                                                                                               INTO RUN /    t
                                                                                                                RESULTS     '
                                                                                                              i   FILE   \
                                                                                                           yes ANOTHER, no
                                                                                                               '  UPLICAT
                                                                                                  n
                                                                                                  o
                                                                                                  3
                                                                                                  ct O
                                                                                                  -5  -h
                                                                                                  o
                                                                                                                                             -5  
                                                                                                                                             O  CD
                                                                                                                                            (O
                                                                                                                                             -S T3
                                                                                                                                             01  -J
                                                                                                                                             30
                                                                                                                                            <• IQ
                                                                                                                                                -5
                                                                                                                                             o
                                                                                                                                             O
                                                                                                                                                     C
                                                                                                                                                  — i in
                                                                                                                                                  O> 0>
                                                                                                                                                     0»
                                                                                                                                                  n>
                                                                                                          •o
                                                                                                       -s —<
                                                                                                       O Ol
                                                                                                       IQ O
                                                                                                       -J CD
                                                                                                       Ol Q-

                                                                                                          O>
                                                                                                       -h —•
                                                                                                       O —•

                                                                                                       O O
                                                                                                       n> -h
                                                                                                     O
                                                                                                     O
                                                                                                     3
                                                                                                    •
                                                                                                                                                  n>
                                                                                                                                                     fD
                                                                                                                                                     Q.
                                                                                                                                                     Ol
o> o -s
Q.
•*co>
   CO
O o> 10
o    n>
3 fB c*
c-h -J.
-S (•*• O
03--*)
— i 0)
   -s w
— *•    0)
t/> 33 3

•.i^
fD m n>
                                                                                                                                               ft) O c*-
                                                                                                                                               Q. -S O

                                                                                                                                               r+    c-l-
                                                                                                                                               O    3-
                                                                                                                                                     n>
                                                      Figure 18. Flowchart of Program GC20.

-------
                TABLE 16.  SYMBOL DEFINITIONS FOR PROGRAM GC20
A5       the concentration from a concentration pattern file
A6$      the name of a concentration pattern file
A7       the position of A8$ in A9$
A8$      the letter name of a concentration pattern
A9$      the alphabet
B        the absolute retention time
C        the peak area
D2$      an injection ID number
D3$      the name of an injection data file
E9       a flag which is used by subroutines to report to the main program
         that the current process should be terminated
              E9=0  continue normally
              E9=l  terminate process
F        the number of identifiers in the method file
G$       an identifier from an injection data file
H$       the peak type
I        the control variable for loops
12       the control variable for loops
18$      the measurement instrument ID
19$      the initials of the analyst
J        the data file useability flag
              J=l   good data
              J=2   no TOTAL AREA
              J=3   wrong format
                                    150

-------
                             TABLE 16.   (Continued)
 J2        the  data  file  processing flag
               J2=l   has been processed
               J2=2   never  processed
 L         the  calculated concentration
 N7$       the  non-numeric result  code
 N8$       the  QC  type code
 N9$       the  QC  type code  for  duplicates
 P8        the  record  number of  the last peak  in  the  injection  data file
 P9        the  record  number of  the first peak  in the  injection data file
 Q5$       the  format  for PRINT  USING statements
 Q6$       the  format  for PRINT  USING statements
 R$        the  name of the run results file
 Rl$       the  parameter/method  code
 S9$       the  identifier for  the  surrogate  spike compound
 T$        the  name of the method  file
 T9$       the  SFC sample  ID number
 V$        an identifier  for the surrogate spike compound
 V0$       a MESSAGE read  from a data file
 Vl$       the  full name  of  the first compound associated with  an  identifier
 V2$       the  CAS number  for  VI$
 V3$       the  full name  of  the  second compound associated with  an  identifier
W3$       a CAS number with the hyphens  removed
X         the  user's  answer to multiple  choice questions
X$       the user's  answer to most Y OR N questions
                                    151.

-------
                            TABLE 16.  (Continued)
Xl$      the user's answer to a Y OR N question
X2$      the user's answer to a Y OR N question
X3$      the user's answer to a Y OR N question
X4       the prepared concentration of a surrogate spike
X4$      the user's answer to a Y OR N question
Z9       a counter for the number of spikes or duplicates of a sample
                                      152

-------
in
CO
G-A-S   C-tf-R-tHf-fl-HHHHHHHT  A-U-T-0-H-A-T-I-O-N   S-Y-S-T-E-M
7/20/1779                                                      PAGE  1
                        PROGRAM LISTING FOR GC20

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0010 REH   t=+=+=+=+=+=*=+=t=+=+=+=+=+=-»-=+=t=f=+=+=f=f=t=+=+=-«-=t=+=4-=f
 0020 REM   +   GAS CHROHATOGRAPHY  AUTOMATION SYSTEM                  +
 0030 REH   +   PROGRAM GC20, SAMPLE FILE CONTROL INTERACTION         <•
 0040 REH   *   BY:  J. KOPKE (SUORCC). HAY 25, 1979                  +
 0050 REH   +   HOST RECENT REVISION:  HAY 29, 1979                   +
 0060 REH   +=+=+=+=+=-f=+=+=+=+=+c+='i«f=+=+=+=f=+=+='i-=+=+=-»-=+=+=+=+=+=+
 0070 REH
 0080 OIH A6$t9],A8«n,A9«26LD2$[8],D3ttlO],G*[8],H*C2:],I8tt5],I9$r3
*     1,N7«3J
 0090 DIH N8«3LN9$[3],Q5$[80J,Q6$[80J,R$[in,Rl$m,S9$[8],T$[6LT9$[
*     81.VH81
 0100 OIH VO$[30],V1$[40],V2$[11],V3$[40},W3$[9],X$[1],X1$[1],X2$[1],X3
*     «U,X4$m
 0110 LET Q5f="2 HHfttf Hi C ffttftftttft l.lflT^ UC/L     HI
t                            •
 0120 LET A^'ABCDEFGtilJKLHNOPORSTUVUXYZ*
 0130 ON ESC THEN GOTO 0370
 0140 ESC
 0150 REH   	
 0160 REH          CHECK VALIDITY OF THE METHOD FOR SFC PURPOSES
 0170 READ FIL£C4,l],Ti
 0180 CLOSE FILE[4]
 0190 OPEN FILH4LT$,200
 0200 LET F=0
 0210 READ FILE[4.3*(F+1)-1],V$.V1$.V2$>V3$
 0220 IF EOF<4) THEN GOTO 0520
 0230 IF V3*='99999" THEN GOTO 0280
 0240 PRINT
 0250 PRINT '<7X7>HETHOD '5T«3,6l5'  CANNOT BE USED FOR SFC PURPOSES 8
*     ECAUSE  *
 0260 PRINT '      IT DEALS HITH CO-ELUTING COMPOUNDS. •
 0270 GOTO 0370
 0280 IF L£N(V2$)OO THEN GOTO 0330
 0290 PRINT
 0300 PRINT "OX7>HETHOD ";W3,63;"  CANNOT BE USED FOR SFC PURPOSES B
*     ECAUSE'
 0310 PRINT'      IT IS HISSING AT LEAST ONE CAS NUMBER.'
 0320 GOTO 0370
 0330 LET F=F+1
 0340 GOTO 0210
 0350 REH	
 0360 REH          ABNORMAL ENDING ROUTINE

 12345*7891123456789212345678931234567894123456789512345678961234567897
          0000000
G-A-S   C-H-R-0-H-A-T-O-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  2
                        PROGRAM LISTING FOR GC20

 1234567391123456789212345678931234567894123456789512345678961234567397
          0000000
 0370 ON ERR THEN GOTO 0390
 0380 CLOSE FILEIO]
 0390 ON ERR THEN GOTO 0410
 0400 CLOSE FILEE3J
 0410 ON ERR THEN GOTO 0430
 0420 CLOSE FILEC7]
 0430 ON ERR THEN GOTO 0470
 0440 DELETER*
 0450 PRINT
 0460 PRINT "<7X7>THE RUN RESULTS FILE HAS BEEN DELETED BECAUSE IT WAS
«      INCOMPLETE."
 0470 ON ERR THEN STOP
 0480 NOESC
 0490 CHAIN "GCOO"
 0500 REH   	
 0510 REM          INPUT TYPE OF INTERACTION
 0520 PRINT
 0530 PRINT "HERE ARE THE TYPES OF SAMPLE  FILE CONTROL INTERACTION:"
 0540 PRINT
 0550 PRINT '     1.   CREATE A NEW RUN RESULTS FILE"
 0560 PRINT '     2,   EDIT OR DELETE AN EXISTING RUN RESULTS FILE'
 0570 PRINT '     3.   SEND AN EXISTING RUN RESULTS FILE TO THE SFC COMP
*     UTER'
 0580 PRINT
 0590 ON ERR THEN GOTO 0610
 0600 INPUT 'WHICH TYPE DO YOU WANT TO USE?   (1. 2, OR 3)  ",X
 0610 ON ERR THEN STOP
 0620 IF X=INT(X) THEN IF X>0 THEN IF X<4  THEN GOTO 0660
 0630 PRINT
 0640 PRINT •<7X7>";X;"IS NOT A VALID TYPE NUMBER."
 0650 GOTO 0520
 0660 ON X THEN GOTO 0960, 0690,  0830
 0670 REH	
 0680 REM          EDIT A RUN RESULTS FILE
 0690 PRINT
 0700 PRINT 'YOU ARE BEING TRANSFERRED TO  THE SFC 'RUNEDIF PROGRAM UHI
*     CH"
 0710 PRINT '     HILL ALLOW YOU TO DELETE OR MODIFY YOUR RUN RESULTS F
*     ILE."
 0720 PRINT "AFTER YOU HAVE COMPLETED 'RUNEDIT' YOU HILL BE TRANSFERRED
*      BACK"
 0730 PRINT'     TO THIS SYSTEM.'

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
G-fl-S   C-H-R-0-«-A-T-0-G-R-A-P-H-y   A-U-T-O-tHK-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE  3
                        PROGRAM LISTING  FOR GC20

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0740 PRINT 'THEN,  REMEMBER TO  SEND THE  RUN RESULTS FILE TO THE SFC COM
«     PUTER."
 0750 FOR 1=1 TO 10
 0760   PRINT
 0770 NEXT I
 0780NOESC
 0790 aOSE
 0800 CHAIN 'RUNE0IT'
 0810 REH   	
 0820 REH          SEND A RUN RESULTS  FILE  TO THE PDP-11
 0830 PRINT
 0840 PRINT -YOU ARE BEING TRANSFERRED TO THE SFC 'SEND' PROGRAM WHICH
*     WILL"
 0850 PRINT '     ALLOW YOU TO  SEND YOUR RUN RESULTS FILE TO THE SFC CO
*     MPUTER."
 0860 PRINT "AFTER YOU HAVE FINISHED 'SEND' YOU HILL BE TRANSFERRED BAC
*     K TO'
 0870 PRINT'     THIS SYSTEM.'
 0880 FOR 1=1 TO 10
 0890   PRINT
 0900 NEXT I
 0910 NOESC
 0920 CLOSE
 0930 CHAIN "SEND-
 0940 REH   	
 0950 REM          OPEN RUN RESULTS FILE
 0960 PRINT
 0970 ON ERR THEN GOTO 0990
 0980 INPUT 'WHAT IS THE PARAMETER/METHOD CODE FOR THE RUN?  ",R1$
 0990 ON ERR THEN STOP
 1000 LET 12=1
 1010 LET R*=R1$,A9$[I2,I2L".BJ"
 1020 ON ERR THEN GOTO 1040
 1030 RENAME R$,R*
 1040 ON ERR THEN STOP
 1050 IF SYS(7)O-10 THEN GOTO  1120
 1060 LET R$=R1*,A9$[I2,I2L".RR"
 1070 ON ERR THEN GOTO 1090
 1030 RENAME R$,R$
 1090 ON ERR THEN STOP
 1100 IF SYSmO-10 THEN GOTO  1120
 1110 GOTO 1190

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
G-A-S   C4HMHHK-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE  4
                        PROGRAM LISTING FOR GC20

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1120 LET 12=12*1
 1130 IF I2<27 THEN GOTO 1010
 1140 PRINT
 1150 PRINT "<7X7>THERE ARE ALREADY 26 RUN RESULTS FILES FOR PARAMETER
*     /METHOD"
 1160 PRINT •     CODE "?R1*?8."
 1170 PRINT 'REPORT THIS PROBLEM TO THE NOW SYSTEM MANAGER."
 1180 GOTO 0370
 1190 OPEN FIL£tO,ll,R$
 1200 PRINT
 1210 ON ERR THEN GOTO 1230
 1220 INPUT 'WHAT IS THE MEASUREMENT INSTRUMENT ID?  M8*
 1230 ON ERR THEN GOTO 1260

      INPUT "WHAT ARE THE INITIALS OF  THE RESPONSIBLE ANALYST?  M9$
 1260 ON ERR THEN STOP
 1270 LET Q6$="l it ft it H if Httl  fHtttt l«

*1280 PRINT FILEtOl.USING Q6$,SYS(3)-1900,SYS(2),SYS(U,SYS(llJiSYS(12)
»     ,I3$»R*,I9$
 1290 REM   	
 1300 REM          PUT CONTROL STANDARDS INTO RUN RESULTS FILE
 1310 PRINT
 1320 ON ERR THEN GOTO 1340
 1330 INPUT "DO YOU WANT TO REPORT ANY CONTROL STANDARD(S) TO SFC?  (Y
*     ORN)  ">H
 1340 ON ERR THEN STOP
 1350 IF Xttl.nO'Y" THEN GOTO 1780
 1360 PRINT
 1370 ON ERR THEN GOTO 1390
 1380 INPUT "WHAT IS THE INJECTION ID  FOR THE CONTROL STANDARD?  ",D2$
 1390 ON ERR THEN STOP
 1400 GOSUB 3820
 1410 IF E9OO THEN GOTO 1710
 1420 PRINT
 1430 ON ERR THEN GOTO 1450
 1440 INPUT "WHAT IS THE CONCENTRATION PATTERN FOR THE CONTROL STANDARD
*     ?  ",A8*
 1450 ON ERR THEN STOP
 1460 GOSUB 4440
 1470 IF E9OO THEN GOTO 1710
 1480 FOR 1=1 TO F

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
                                                               S-Y-S-T-£-M
                                                                         5
en
        MHHHHKHHHM-P-tf-Y   A-U-T-0-M-A-T-I-O-N
7/20/1979
                       PROGRAM LISTING FOR GC20

 1234567891123456789212345678931234567894123456789512345673961234567897
          0000000
 1490   LETN7$="   •          •
 1500   READ FILEE4,3*I-l],V*,Vlf,V2*
 1510   IF V$="99999" THEN GOTO 1680
 1520   READ FIL£[7,ILA5
 1530   FOR  I2=P9 TO P8 STEP 1
 1540     READ FILEC3,I2],GJ,H$,B,C,L
 1550     IF G*=V$ THEN GOTO 1580
 1560   NEXT 12
 1570   LET  O-9999

 118   £/B7»» «""•«»
 1600   LET  N7f="BDL"
 1610   GOTO 1650
 1620   IF LO-9999 THEN GOTO 1650
 1630   LET  L=0
 1640   LET  N7$="NAR"
 1650   LET  H3*=V2iIl,6],V2$t8,9J,V»[ll]
 1660   PRINT FILEC03,USING 05*,' VLCH",H3$,L,N7*
 1670   PRINT FILEW1.USING 05$, " VLCT'.HSS.AS," •
 1680 NEXT I
 1690 CLOSE  FILEC3J
 1700 CLOSE  FILH7J
 1710 PRINT
 1720 ON ERR HEN GOTO 1740
^1730 INPUT  "DO  YOU WANT TO REPORT ANOTHER CONTROL STANDARD TO SFC?  ',

 1740 ON ERR THEN STOP
 1750 IF Xttl,l]="Y" THEN GOTO 1360
 1760 REH   - : - _______ —
 1770 REN         INPUT SURROGATE SPIKE IDENTIFIER
 1780 PRINT
 1790 ON ERR THEN GOTO 1810
 1800 INPUT  'DO  YOU HANT TO REPORT ANY SAHPLECS) BACK TO SFC?  (Y OR N)
*        »X$
 1810 ON ERR THEN STOP
 1820 IF X$[1,1JO'Y" THEN GOTO 3730
 1830 PRINT
 1840 ON ERR THEN GOTO 1860
 1850 INPUT  'HAVE YOU USED A SURROGATE SPIKE WITH ANY OF THE SAMPLES?
»     (YORN)   ",X1$
 1860 ON ERR THEN STOP
 1870 IF XlttltHO'V THEN GOTO 2010
G-A-S   C-H-R-0-H-A-T-O-G-R-A-f-H-Y   A-U-T-04HK-I-0-N   S-Y-S-T-E-M
7/20/1979                                                     RAGE  6
                       PROGRAM LISTING FOR GC20

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1830 PRINT
 1890 ON ERR THEN GOTO 1910
 1900 INPUT "WHAT IS THE IDENTIFIER FOR THE SURROGATE SPIKE COMPOUND?
*     ",S9$
 1910 ON ERR THEN STOP
 1920 FOR 1=1 TO F
 1930   READ FILE[4,3*I-1LV$
 1940   IF V$=S9$ THEN GOTO 2010
 1950 NEXT I
 1960 PRINT
 1970 PRINT "<7X7>THERE IS NO SUCH IDENTIFIER  IN METHOD ";T$[3,6J;"."
 1980 GOTO 1830
 1990 REH   	
 2000 RBI          INPUT INFORMATION FOR SAMPLE
 2010 PRINT
 2020 ON ERR THEN GOTO 2040
 2030 INPUT -WHAT IS THE SFC SAMPLE ID FOR THE  SAHPLE?  -,T9$
 2040 ON ERR THEN GOTO 2070
 2050 PRINT
 2060 INPUT "WHAT IS THE CORRESPONDING INJECTION ID NUMBER?  ",D2$
 2070 ON ERR THEN STOP
 2080 GOSUB 3820
 2090 IF E9OO THEN GOTO 3680
 2100 PRINT
 2110 ON ERR THEN GOTO 2130
 2120 INPUT/DO YOU HANT TO REPORT ANY SPIKE(S) FOR THIS SAMPLE?  (Y OR
*      N)  *>X2$
 2130 ON ERR THEN GOTO 2160
 2140 PRINT
 2150 INPUT "DO YOU HANT TO REPORT ANY DUPLICATE(S) FOR THIS SAMPLE?  (
*     YORN)  ",X3f
 2160 ON ERR THEN STOP
 2170 IF XWl,n="Y" THEN GOTO 2200
 2180 LET X4$=-N"
 2190 GOTO 2320
 2200 PRINT
 2210 PRINT 'DID YOU ADD THE SURROGATE SPIKE ";S9*;
 2220 ON ERR THEN GOTO 2240
 2230 INPUT " TO THIS SAMPLE?  (Y OR N)  ",X4$
 2240 ON ERR THEN STOP
 2250 IF X4ttl,l]O'Y' THEN GOTO 2320
 2260 PRINT
      1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
               0000000            0000000

-------
til
CTi
      G-A-S   C^-3*I-ll>V$iVl*,V2t
       IF V$="99999'  THEN GOTO 2650
       FDR I2=P9 TO P8 STEP 1
         READ FILE[3,I2J.G*,H*rB,C,L
         IF G*=V$ THEN GOTO 2510
       NEXT 12
       LETC=-9999
       IF CO-9999  THEN GOTO 2550
       LETL=0
       LET «7*=*BDL"
       GOTO 2580
       IF LO-9999  THEN GOTO 2580
       LETL=0
       LET N7$="HAR'
       LET H3*V2ttti6]iV2f[8f9]iV2*Cll]
       IF Mttl.UO'Y" THEN GOTO 2640
       IF V$OS9$ THEN GOTO 2640
       PRINT FILEtOJ.USING a5fiT».'LSlM0$.L.N7$
       PRINT FILEEOJ.USINE Q»,T9$,"LS2',H3«,X4," •
       GOTO 2650
       PRINT FILECOL USING 95$,T»,N8*,H3*,L,N7*
      2650 NEXT I
      2660 CLOSE FILER]
      2670 REH   	
      1234567891123456789212345678931234567894123456789512345678961234567897
               0000000
G-A-S   C4HHHHK-0-G-R-A-P-H-Y   AHJ-THHM-T-HHI   S-Y-S-T-E-H
7/20/1979                                                     PAGE  8
                       PROSIAH LISTIPB FOR K20

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 2680 REH          PUT SPIKE INTO RUN RESULTS FILE
 2690 IF I2$C1.1]O'Y' THEN GOTO 3200
 2700 LET 19=0
 2710 PRINT
 2720 ON ERR THEN GOTO 2740
 2730 INPUT "WHAT IS THE  INJECTION ID OF THE SAMPLE AFTER  SPIKING?  ",D
*     2*
 2740 ON ERR THEN STOP
 2750 GOSUB 3820
 2760 IF E9OO THEN GOTO 3120
 2770 PRINT
 2780 ON ERR THEN GOTO 2800
 2790 INPUT "WHAT IS THE CONCENTRATION PATTERN FOR THE SPIKE ADDED VALU
«     ES?  '•«$
 2800 ON ERR THEN STOP
 2810 GOSUB 4440
 2820 IF E9OO THEN GOTO 3120
 2830 FOR 1=1 TO F
 2840   LET N7$="   '
 2850   READ FILE[4,3»I-1LV*,V1*,V2*
 2860   IF V$='99999" THEN GOTO 3080
 2870   READ FILE[7,I],fr5
 2880   FOR I2=P9 TO P8 STEP 1
 2390     READ FILE£3,I2J,G$,W,B,C,L
 2900     IF G*=V$ THEN GOTO 2930
 2910   AEXT 12
 2920   LETO-9999
 2930   IF CO-9999 THEN GOTO 2970
 2940   LETL=0
 2950   LET N7$=W
 2760   GOTO 3000
 2970   IF LO-9999 THEN GOTO 3000
 2980   LETL=0
 2990   LET N7$="NAR"
 3000   LET H3f=V2$tl,6],V2$[8,9LV2$[ll]
 3010   IF X4$[1,1]O'Y" THEN GOTO 3060
 3020   IF VSOS9S THEN GOTO 3060
 3030   PRINT FILEIOJ.USING (B$.T9».'LSl',H3t,LtM7»
 3040   PRINT FILEC03.USING Q5$,T9*,'LS2",H3$,X4+A5,"    "
 3050   GOTO 3060
 3060   PRINT FILE[OJ,USING 05$>T9t,"LSF',W3f,L,N7$
 3070   PRINT FILEtOJ.USING Q5$,T9»,'LSA',H3*,A5,"   "

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
en
G-fl-S   C-4HMHf^HHHH»-P-«-Y   A-U~HHf-A-T-I-(HI   S-Y-S-T-E-H
7/20/197?                                                     PACE  9
                       PROGRAH LISTING FOR GC20

 1234567891123456789212345678931234567894123456789512345678961234567897
         0000000
 3080 NEXT  I
 3090 CLOSE FILEtt]
 3100 CLOSE FILEC7J
 3110 LET Z9=Z9*1
 3120 IF Z9C1  TON GOTO 2710
 3130 PRINT
 3140 ON ERR THEN GOTO 3160
 3150 INPUT 'DO YOU MflNT TO REPORT ANOTHER SPIKE OF THE SANE SAMPLE?  (
*     YORN)   ',X$
 3160 ON ERR THEN STOP
 3170 IF IfCif U'T  THEN GOTO 2710
 3180 REN  	
 3190 REN         PUT DUPLICATE INTO RUN RESULTS FILE
 3200 IF X3*E1,1K>'Y' THEN GOTO 3680
 3210 LET Z9=0
 3220 PRINT
 3230 ON ERR THEN GOTO 3250
 3240 INPUT 'UHAT IS  THE INJECTION 10 FOR THE DUPLICATE OF THE SAMPLE?
»      MJ2*
 3250 ON ERR THEN STOP
 3260 GOSUB 3820
 3270 IF E9OO THEN GOTO 3550
 3280 LET N9*='LD',STR$(Z9+2)
 3290 FOR 1=1  TO F
 3300   LET N7*="   •
 3310   READ FILE[4,3tI-U.V$.Vlt.V2$
 3320   IF V$="99999' THEN GOTO 3520
 3330   FOR I2=P9 TO P8 STEP 1
 3340     READ FILEC3,I2J,G$,H$,B,C,L
 3350     IF W=V* THEN GOTO 3380
 3360   NEXT 12
 3370   LET O-9999
 3380   IF CO-9999  THEN GOTO 3420
 3390   LET L=0
 3400   LET N7$='BDL"
 3410   GOTO 3450
 3420   IF LO-W9  THEN GOTO 3450
 3430   LET L=0
 3440   LET N7«='NAR'
 3450   LET U3*=V2ttl,&],V2f[8.9],V2*Ul]
 3460   IF X4$E1,11O'Y' THEN GOTO 3510
 3470   IF V*OS9$ THEN GOTO 3510
G-A-S   C4HHH!-A-T-0-G-R-A-f-H-Y   A-IH-0-H-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                     PAGE 10
                       PROGRAH LISTING FOR GC20

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 3480   PRINT FILEI01.USING Q5$,T9$,'LS1",H3$,L,N7$
 3490   PRINT FILER)].USING C5$,T9$,"LS2",H3J,X4,<   "
 3500   GOTO 3520
 3510   PRINT FIIH01,USING Q5$,T9$,N9$,H3$tL,N7$
 3520 NEXT I
 3530 CLOSE FILED]
 3540 LET Z9=Z9+1
 3550 IF Z9<1 THEN GOTO 3220
 3560 IF Z9<8 THEN GOTO 3610
 3570 PRINT
 3580 PRINT *YOU HAVE REPORTED EIGHT DUPLICATES FOR THIS SAMPLE, NHICH
*     IS'
 3590 PRINT •     THE MAXIMUM ALLOWED BY SFC."
 3600 GOTO 3680
 3610 PRINT
 3620 ON ERR THEN GOTO  3640
 3630 INPUT "DO YOU  WWT  TO REPORT ANOTHER DUPLICATE OF THE SAME SAMPLE
*     ?  (Y OR N) ",X*
 3640 ON ERR THEN STOP
 3650 IF X$£1,1]='Y' THEN GOTO 3220
 3^0 REH   	
 3670 RBI         URAP-4P PROCEDURE
 3680 PRINT
 3690 ON ERR THEN GOTO  3710
 3700 INPUT "DO YOU  WANT  TO REPORT ANOTHER SAMPLE TO SFC?  (Y OR N)  ",

 3710 ON ERR THEN STOP
 3720 IF X«l,n="Y" THEN GOTO 2010
 3730 CLOSE FILEtO]
 3740 PRINT
 3750 PRINT 'THE NAME OF  THE RUN RESULTS FILE IS ";R$[l,LEN(R$)-3];".
*     "
 3760 LET R$="
 3770 PRINT
 3780 PRINT 'YOU MUST NOW EITHER DELETE THIS FILE OR SEND IT TO THE SFC
*      COMPUTER."
 3790 GOTO 0520
 3800 REH   ninmiiiinnniniHMfmtm++fHMMHMiiiiHMMf+
 3810 REH         SUBROUTINE TO OPEN DATA FILE
 3820 IF LEN(D2f1=8  THEN  GOTO 3870
 3830 PRINT
 3840 PRINT •*\m;' IS NOT A VALID INJECTION ID.'
      1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
               0000000            0000000

-------
      G-A-S   C4HHHHHTHHHHH»-H-Y   A-U-T-0-H-A-T-I-O-N
      7/20/1979
                             PROGRAM LISTING FOR GC20
S-Y-S-T-E-H
    PAGE 11
G-A-S
7/20/1979
             A-U-T-0-H-A-T-I-O-N

PROGRAM LISTING FOR GC20
S-Y-S-T-E-M
    PAGE 12
       1234567891123456789212345678931234567894123456789512345678961234567897
               0000000
       3850 LET E9=l
       3860 RETURN
       3870 LET D3$="GCMB*
       3880 ON ERR TNFN GOTO 3900
       3890 RENAME D3*,D3«
       3900 ON ERR THEN STOP
       3910 IF SYS(7)=-9 THEN GOTO 3960
       3920 PRINT
       3930 PRINT "OX7>THERE IS NO EXISTING DATA FOR INJECTION ID "!B2»f. •
       3940 LET E9=l
       3950 RETURN
       3960 ON ERR THEN GOTO 4000
       3970 OPEN FILE£3,OLD3$,31
       3980 ON ERR THEN STOP
       3990 GOTO 4050
       4000 ON ERR THEN STOP
       4010 DELAY =1
       4020 GOTO 3960
£     4030 REH   	
oS     4040 REN          CHECK DATA FILE USABILITY AND PROCESSING FLAGS
       4050 READ FILEC3,1],J,D3$,J2
       4060 IF J=l THEN GOTO 4190
       4070 PRINT
       4080 IF JO2 THEN GOTO 4140
       4090 PRINT m<7XI>-,mim  CANNOT BE USED BECAUSE THE REPORT DID NOT'
       4100 PRINT •     HAVE A TOTAL AREA."
      4110 CLOSE FILEC3J
      4120 LET E9=l
      4130 RETURN
      4140 PRINT "C7X7>'JD2$;" CANNOT BE USED BECAUSE THE REPORT HAS'
      4150 PRINT '      IN THE WRONG FORMAT.*
      4160 CLOSE FILEC3J
      4170 LET E9=l
      4180 RETURN
      4190 IF J2=l THEN GOTO 4280
      4200 PRINT
      4210 PRINT •<7X7>'?D2«;1 CANNOT BE USED FOR SFC PU«5OSES UNTIL"
      4220 PRINT '     AFTER IT IS PROCESSED."
      4230 CLOSE FILEK1
      4240 LET E9=l
      4250 RETURN
      4260 REH   	
              1234567891123456789212345678931234567894123456789512345678961234567897
                       0000000
              4270 REN         FIND FIRST AND LAST ENTRIES IN DATA FILE
              4280 LET P9=2
              4290 READ FILEC3,P9LVO$
              4300 IF VOin,7]O'«ESSAGEB THEN GOTO 4330
              4310 LET P9=P9+1
              4320 GOTO 4290
              4330 LET P9=P9f2
              4340 LET P8=P9
              4350 READ FILET3,P8].G*
              4360 IF EOF(3) THEN GOTO 4390
              4370 LET P8=P8+1
              4380 GOTO 4350
              4390 LET P8=P8-1
              4400 LET E9=0
              4410 RETURN
              4420 REH  •HtHHmniMnnmn+'Hn Htm inHt-nn 1111 n HIM in
              4430 REN         SUBROUTIfC TO OPEN CONCENTRATION PATTERN FILE
              4440 LET A7=fOS(A9$.A8*,l>
              4450 IF A7OO THEN GOTO 4500
              4460 PRINT
              4470 PRINT •<7X7>/'5A8f;'/ IS NOT A VALID LETTER."
              4480 LET E9=l
              4490 RETURN
              4500 LET A6*=TI, "000"
             4510 LET A6«10-LENA6$
             4540 ON ERR THEN STOP
             4550  IF SYS(7)=-9 THEN GOTO 4610
             4560 PRINT
             4570 PRINT "<7X7>THERE  IS NO EXISTING CONCENTRATION PATTERN NAHED "s
            *     A8f;"."
             4580 CLOSE FILEI31
             4590 LET E9=l
             4600 RETURN
             4610 ON ERR THEN GOTO  4660
             4620 OPEN FILEC7,OLA6$,4
             4630 ON ERR THEN STOP
             4640 LET E9=0
             4650 RETURN
             4660 ON ERR THEN STOP
             4670 DELAY =1
      1234567891123456789212345678931234567894123456789512345678961234567897   1234567891123456789212345678931234567894123456789512345678961234567897
              0000000            0000000

-------
     G-A-S  C-H-R-
-------
G-A-S   C4HMHHJ-T-0-G-R-A-P-H-Y   MH-O-H-frT-HHI  S-Y-S-T-E-M  G-A-S   C-H-R-0-M-A-T-O-G-R-A-P-H-Y   A-U-T-O-fl-A-T-I-0-N
7/20/1979                                                      PAGE  15  7/20/1979
                        SYMBOL TABLE FOR GC20                                                   SYMBOL TABLE FOR GC20
                                                            S-Y-S-T-E-H
                                                                PAGE  16
SYMBOL    REFERENCES
 2320  2190  2250
 2360  2330
 2380  2320
 2410  2380
 2420  2350  2370  2400
 2510  2480
 2550  2510
 2580  2540  2550
 2640  2590  2600
 2650  2450  2630
 2710  3120  3170
 2740  2720
 2800  2780
 2930  2900
 2970  2930
 3000  2960  2970
 3060  3010  3020
 3080  2860  3050
 3120  2760  2820
 3160  3140
 3200  2690
 3220  3550  3650
 3250  3230
 3380  3350
 3420  3380
 3450  3410  3420
 3510  3460  3470
 3520  3320  3500
 3550  3270
 3610  3560
 3640  3620
 3680  2090  3200  3600
 3710  3690
 3730  1820
 3820  1400  2080  2750  3260
 3870  3820
 3900  3880
 3960  3910  4020
 4000  3960
 4050  3990
 4140  4080
 4190  4060
 4280  4190
 4290  4320
 4330  4300
SYMBOL    REFERENCES
 4350  4380
 4390  4360
 4440  1460  2810
 4500  4450
 4540  4520
 4610  4550  4680
 4660  4610
 A5    1520  1670  2870  3040  3070
 A6$   0080  4500  4510  4530  4620
 A7    4440  4450  4510
 A8$   0080  1440  2790  4440  4470  4570
 A9$   0080  0120  1010  1060  4440
 B     1540  2470  2890  3340
 C     1540  1570  1580  2470  2500  2510  2890  2920  2930  3340
       3370  3380
 D2$   0080  1380  2060  2730  3240  3820  3840  3870  3930  4090
       4140  4210
 03*   0080  3870  3890  3970  4050
 E9    1410  1470  2090  2760  2820  3270  3850  3940  4120  4170
       4240  4400  4480  4590  4640
 F     0200  0210  0330  1480  1920  2420  2830  3290
 FLIO  0380  1190  1280  1660  1670  2610  2620  2640  3030  3040
       3060  3070  3480  3490  3510  3730
 Ri3  0400  1540  1690  2470  2660  2890  3090  3340  3530  3970
       4050  4110  4160  4230  4290  4350  4580
 a§4  0170  0180  0190  0210  1500  1930  2440  2850  3310
 FLI7  0420  1520  1700  2870  3100  4620  -
 G$    0080  1540  1550  2470  2480  2890  2900  3340  3350  4350
 H*    0080  1540  2470  2890  3340
 I     0750  0770  0880  0900  1480  1500  1520  1680  1920  1930
       1950  2420  2440  2650  2830  2850  2870  3080  3290  3310
       3520
 12    1000  1010  1060  1120  1130  1530  1540  1560  2460  2470
       2490  2830  2890  2910  3330  3340  3360
 18$   0080  1220  1280
 19$   0080  1250  1280
 J     4050  4060  4080
 J2    4050  4190
 L     1540  1590  1620  1630  1660  2470  2520  2550  2560  2610
       2640  2890  2940  2970  2980  3030  3060  3340  3390  3420
       3430  3480  3510
 N7$   0080  1490  1600  1640  1660  2430  2530  2570  2610  2640
       2840  2950  2990  3030  3060  3300  3400  3440  3480  3510
 N8$   0090  2340  2360  2390  2410  2640
 N9$   0090  3280  3510

-------
     G-A-S   C^HHHHH-O-G-fl-A-f-H-Y   fl-U-HHf-A-T-I-O-W   S-Y-S-F-E-M
     7/20/1979                                                      PAGE 17
                             SYMBOL TABLE FOR GC20

     SYmOL    REFERENCES

      P8    1530  2460  2880  3330  4340 4350  4370  4390
      P9    1530  2460  2880  3330  4280 4290  4310  4330  4340
      05$   0090  0110  1660  1670  2610 2620  2640  3030  3040  3060
            3070  3480  3490  3510
      06$   0090  1270  1280
      R*    0090  0440  1010  1030  1060 1080  1190  1280  3750  3760
      RH   0090  0980  1010  1060  1160
      S9$   0090  1900  1940  2210  2600 3020  3470
      T$    0090  0170  0190  0250  0300 1970  4500
      T9$   0090  2030  2610  2620  2640 3030  3040  3060  3070  3480
            3490  3510
      V*    0090  0210  1500  1510  1550 1930  1940  2440  2450  2480
            2600  2850  2860  2900  3020 3310  3320  3350  3470
      V0$   0100  4290  4300
      VI*   0100  0210  1500  2440  2850 3310
      U2$   0100  0210  0280  1500  1650 2440  2580  2850  3000  3310
            3450
      V3$   0100  0210  0230
_    U3$   0100  1650  1660  1670  2580 2610  2620  2640  3000  3030
2          3040  3060  3070  3450  3480 3490  3510
      X     0600  0620  0640  0660
      X$    0100  1330  1350  1730  1750  1800   1820  3150  3170  363C
            3650  3700  3720
      XI*   0100  1850  1870  2170
      X2*   0100  2120  2320  2690
      X3*   0100  2150  2330  2380  3200
      14    2280  2620  3040  3490
      X4*   0100  2180  2230  2250  2590  3010  3460
      29    2700  3110  3120  3210  3280  3540  3550 3560

-------
                                  SECTION 23

                    PROGRAM 6C21 - MICROCOMPUTER INTERFACE


    6C21 is the program to receive data from the microcomputer and compact
it into an injection data file.  The microcomputer copies a report as it is
printed by the Varian.  It then sends an escape character to the Nova and
waits for the Nova to respond with "ACCOUNT ID."  The microcomputer then
sends the account ID to the Nova and waits for the Nova to respond with the
asterisk prompt.  The microcomputer then sends to the Nova the command RUN
"GC21".  When this program reaches the INPUT statement, it sends a question
mark prompt to the microcomputer.  The microcomputer then sends to the Nova
one line of the Varian report followed by a carriage return, and the program
places the line into the arrival file.  This continues until the entire
report has been transmitted.  Then, instead of sending a line of a report,
the microcomputer sends an escape character to the Nova.  GC21 then
generates the name of the data file, enters that name into the ID list file,
and compacts the report into the data file.  When GC21 terminates, the word
STOP is sent by the Nova to the microcomputer, which then sends a BYE
command back to the Nova, ending the session.  Details for the functions of
the microcomputer can be found in the EPA document "Intercomputer
Communications Using Microprocessors."

    All of the above would be a simple process, except for the fact that
Varian reports can vary considerably.  GC21 must be prepared to handle any
possibility, since the microcomputer is unable to react to Nova error
messages.  Consequently, GC21 contains a variety of complicated procedures
which may never be used.  For example, before GC21 opens any file, it always
sets the ON ERR THEN GOTO condition in case the file is in use or is being
dumped to tape for some reason.  If an error does occur in opening a file,
GC21 waits one second and tries again.

    GC21 is divided into three main sections:  1) a procedure to input the
report from the microcomputer and store it in an arrival file, 2) a
procedure to compact the report from the arrival file into an injection data
file and store that name in the ID list file, and 3) a subroutine to name an
injection data file.


FROM MICROCOMPUTER TO ARRIVAL FILE

    The first procedure is to input the report from the microcomputer and
store it in the arrival file.  GC20 simply inputs a line of the report as a
string variable.  An ON ERR THEN GOTO condition is established for this
INPUT statement in case an analyst uses la comma in the Varian report title.

                                     162

-------
If the line which is input has a  length of zero, GC21  immediately  returns  to
the INPUT statement.

    Beginning with the second line of the Varian report, GC21  checks  each
line to see if it begins with the letters GC.  Every Varian report  should
begin with the letters GC and end with the words TOTAL  AREA.   However,  if
for some reason a report does not end with TOTAL AREA,  the microcomputer
will not recognize the end of the report, and  it will continue to  transmit a
second report as if it were a part of the first.  For this reason,  GC21
checks every line for the letters GC.  If the  line does not begin  with  GC,
it is written into the arrival file, and the program branches  back  to the
INPUT statement.  However, if a line does begin with GC, the program
branches to the subroutine to generate the name of the  injection data file,
and then places into that data file a flag (a  "2") to  indicate that the
report is not useable.  GC21 then reopens the  arrival file and begins to
copy the second report into it.

    When an escape character is received instead of a  line of  a report, GC21
branches to the next routine.


FROM ARRIVAL FILE TO DATA FILE

    When the arrival file is complete, GC21 branches to the subroutine  to
generate the name of the injection data file.  Then the arrival file  is
scanned for the line.

    PEAK  NAME  TYPE  COMP  RETN  CORR  AREA   FACTOR.

If this line cannot be found, the Varian report is in the wrong format.   In
such a case, GC21 writes into the data file a  flag (a  "3") to  indicate  that
the report is not useable, and then GC21 stops.

    If the report is in the correct format, GC21 continues to  scan  the
arrival file for the TOTAL AREA line, and records the total area.   A  flag  (a
"1") is written into the injection data file to indicate that  the  report  is
useable.

    Next, GC21 begins to scan the arrival file a third  time.   It finds  the
method number and the report title, if any, and writes  them into the
injection data file.

    Continuing its scan through the arrival file, GC21  locates the  lines
referring to individual peaks.  It does this by attempting to  convert the
first six characters of each line to a number.  Lines,  in which this cannot
be done are error messages, second page headings, or total concentrations
which should be ignored.

    The peak identifier and peak  type are recorded from each line  of  data.
The retention time is converted to a number and recorded.  The percent  area
is converted to a number, multiplied by the total area,  and divided by  100


                                     163

-------
to find the actual area of the peak.  These four  items  are then written  into
the injection data file.

    When the entire arrival file has been scanned for the third time,  GC21
stops.


SUBROUTINE TO NAME AN INJECTION DATA FILE

    Generating the name of an injection data file really involves  generating
the injection ID number.  To do this, the subroutine first scans the  arrival
file for the instrument number, which it uses to create the  name of the
appropriate ID list file.  It then  attempts to RENAME the ID list  file with
the same name.  This always produces an error which is  trapped by  an ON  ERR
THEN GOTO statement.  If the error  number is -10, the ID list file already
exists and can be used.   If the error number is -9, the ID list file has not
been created for the instrument.  In this second case,  the subroutine
creates an ID list file and fills it with 100 dummy entries.

    The subroutine then determines  the date for the injection ID number.  If
the analyst has specified a date in the operator  identification field  of the
Varian report, that date is used.   (This feature  allows the  operator  of  an
auto-injector to keep the date from changing at midnight.)   Otherwise, the
date from the Nova system clock is  used.

    Next, the subroutine assigns the sequence number for the injection.   To
do this, it must use the date and sequence number of the previous  injection,
which it finds in the first injection ID number in the  ID list file.   If the
date of the current injection is the same as the  date of the previous
injection, the sequence number assigned is 1 greater than the previous
sequence number.  If the dates are  different, the sequence number  is  reset
to 01.

    Finally the subroutine deletes  the oldest data file in the  ID  list
file.  The ON ERR THEN GOTO condition is again set for  this  DELETE statement
because the oldest ID number in the file may be a dummy entry.  All of the
other ID numbers (data files names) are shifted down one position  in  the ID
list file, and the newest ID is placed at the top of the list.  Control  is
then returned to the invoking procedure.
                                     164

-------
             /READ INSTV
             (NO. FROM /




              (READ MOST/
              RECENT ID /
              FROM LIST
                 FILE   \
              [FLAG DATA/
                FILE AS  |
              UNUSABLE I


                  I

              'STOP
   FIND
   TOTAL
   AREA
    I
   (COPY
   ERROR  /
 MESSAGES
 TO DATA FILE


/COPY7
/  METHOD /
 NUMBER TO
\ DATA FILE \
Figure 19. Flowchart of Program  GC21.
                 165

-------
                TABLE 17.  SYMBOL DEFINITIONS FOR PROGRAM 6C21
A        the total area of all peaks In the report
A$       a line of the report
A2$      a holding variable for the value of A$
B        the retention time of a compound
B$       the instrument number
C        the area of a single peak
C$       the name of the ID list file
D$       the name of the data file created
D2$      the name of a previously created data file
E$       the method number
F$       the report title (or the word NONE)
G$       the identifier of a compound
H$       the peak type
I        the control variable for several loops
Tl       the record number of the last record used in the data file
W        the number of lines that have been input
Y        the sequence number
                                     166

-------
G-A-S   C-H-R-O-H-A-T-O-6-R-ft-P-H-Y   A-IFHHHK-I-O-W   S-Y-S-T-E-H
7/20/1979
                        PROGRAM LISTING FOR CC2!

 1234567891123456789212345678931234567894123456789512345678961234567397
          0000000
 0010 REH   t=t='H=+=+=+=+=t=+=t=+=t=+=t=t=+=+=+=i-=+=+=t=+s+=+=f=+=+=+=<-
 0020 REH   t   GftS CHRQKATOGRAPHY AUTOMATION SYSTEM                  +
 0030 REH   +   PROGRflH GC21,  MICROCOMPUTER INTERFACE                 *
 0040 R01   +   BY:  J. KQPKE (SHQRCC),  JANUARY 18, 1979              +
 0045 REH   +   HOST RECENT REVISION:   HAY I,  1979                    +
 0050 REH   +=+=+=+=+=-i-=+=t=+=4=+=M-=+=-i-=-i-=+s+=-f=f=-f=+=+s+=+=+=+=-f=-t-=t=+
 0060 REH
 0070 ESC
 0080 DIM AS[72],A2*[72],B$[23,C$t8J,D$[10],E«10]1F«30],6«8],W[2]
 0090 REH   	
 0100 REH          INPUT LINES FROK HICRO;  STORE  IN ARRIVAL FILE
 0110 ON ERR THEN GOTO 0150
 0120 OPEN FILE[l,n,'6COOOOOOOO'
 0130 ON ERR THEN STOP
 0140 GOTO 0180
 0150 ON ERR THEN STOP
 0160 DELAY =1
 0170 GOTO 0110
 0180 LET H=0
 0190 ON ESC THEN GOTO 0520
 0200 ON ERR THEN GOTO 0220
 0210 INPUT '?%ft$
 0220 ON ERR THEN STOP
 0230 ON ESC THEN STOP
 0240 IF A$=" THEN GOTO 0190
 0250 IFH=0 THEN GOTO 0480
 0260 IF Attl,63O'  GC  •  THEN GOTO 0480
 0270 REH	
 0230 REH     HANDLE FIRST  OF  TWO MERGED REPORTS
 0285 LET  A2$=A*
 0290 CLOSE FILEtl]
 0300 GQSUB 1620
 0305 ON ERR THEN GOTO 0310
 0306 DELETED*
 0310 ON ERR THEN GOTO 0350
 0320 OPEN FILEC3,OLD»,31
 0330 ON ERR THEN STOP
 0340 GOTO 0380
 0350 ON ERR THEN STOP
 0360 DELAY =1
 0370 GOTO 0310
 0380 WRITE FILEC3.U,2iD$,0
G-A-S   C-H-R-(H1-A-T-0-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-N
7/20/1979                                                      PAGE  2
                        PROGRAM LISTING FOR GC21

 1234567891123456789212345678931234567894123456789512345678961234567897
          00         0         0        0         0         0
 0390 CLOSE FILEI3]
 0400 ON ERR THEN GOTO 0440
 0410 OPEN FILEn.n.'GCOOOOOOOO"
 0420 ON ERR THEN STOP
 0430 GOTO 0470
 0440 ON ERR THEN STOP
 0450 DELAY =1
 0460 GOTO 0400
 0470 LET H=0
 0475 LET A*=A2*
 0480 LET «=»*!
 0490 PRINT FILEE1LA*
 0500 GOTO 0190
 OSiO REH   	
 0520 REH          COMPACT ARRIVAL FILE INTO DATA FILE
 0530 ON ESC THEN STOP
 0540 CLOSE FILEE1J
 055060SUB 1620
 0560 REH   	
 0570 REH     CHECK FOR VALID REPORT FORMAT
 0580 ON ERR THEN GOTO 0620
 0590 OPEN FILEll.SL'GCOOQOOOOO*
 0600 ON ERR THEN STOP
 0610 GOTO 0650
 0620 ON ERR THEN STOP
 0630 DELAY =1
 0640 GOTO 0580
 0650 LREAD FILEULA*
 0660 IF EOFmOl THEN GOTO 0770
 0665 ON ERR THEN GOTO 0670
 0668 DELETE D$
 0670 ON ERR THEN GOTO 0710
 0680 OPEN FILE£3,0].D$,31
 0690 ON-ERR THEN STOP
 0700 GOTO 0740
 0710 ON ERR THEN STOP
 0720 DELAY =1
 0730 GOTO 0670
 0740 WRITE FILE[3,1],3,D*,0
 0750 CLOSE FILEC3]
 0755 CLOSE FILECH
 0760 STOP
  1234567891123456789212345678931234567894123456789512345678961234567897    1234567891123456789212345678931234567894123456789512345678961234567897
           000         0         0         0        0             0         0        0         0         0         0         0

-------
cr>
00
G-A-S   C^HHHHK-0-G-fl-A-F-«-Y   A-tf-HHHK-I-O-N  S-Y-S-T-E-H
7/20/1979                                                     PAGE  3
                       PROGRAM LISTING FOR CC21

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 0770IFA$O'  PEAK    NAME   TYPE       COHP     RETN    CORR       A
*     REA   FACTOR* THEN GOTO 0650
 0780 REN	
 0790 REN    FIND TOTAL AREA OF ALL PEAKS
 0300 LREAD FILEflJ.A*
 0810 IF AHM2JO"  TOTAL AREA' THEN GOTO 0800
 0820 LET A=VALCA$ri3,233)
 0830 CLOSE FILEC11
 0835 ON ERR THEN GOTO 0840
 0838 DELETE D*
 0840 ON ERR THEN GOTO 0880
 0850 OPEN FIIEC3,0],D*,31
 0860 ON ERR THEN STOP
 0870 GOTO 0910
 0880 ON ERR THEN STOP
 0890 DELAY =1
 0900 GOTO 0840
 0910 WRITE FILEC3,1],1,D$,0
 0920 LET Tl=l
 0930 REH	
 0940 REN    SCAN REPORT FOR ERROR MESSAGES
 0950 ON ERR THEN GOTO 0990
 0960 OPEN FILE[1,3],'GCOOOOOOOO'
 0970 ON ERR THEN STOP
 0980 GOTO 1020
 0990 ON ERR THEN STOP
 1000 DELAY =1
 1010 GOTO 0950
 1020 LREAD FILEI1LA*
 1030 IF EOF(l) THEN GOTO 1060
 1040 IF A$n,7K>'ftSSAG£' THEN GOTO 1020
 1050 NRITE FILE[3,T1+1LAS
 1060 LET T1=TW
 1070 GOTO  1020
 1080 CLOSE FILEm
 1090 REH  	
 1100 REH    FIND VARIAN METHOD NUMBER
 1110 ON ERR THEN GOTO 1150
 1120 OPEN FJLE[1,3],'GCOOOOOOOO'
 1130 ON ERR THEN STOP
 1140 GOTO 1180
 1150 ON ERR THEN STOP

 1234567891123456789212345678931234»7894123456789512345678961234567897
         0000000
                                                                                                                       • THEN GOTO 1300
G-A-S   C-H-fl-0-H-^-T-O-G-R-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-fl
7/20/1979                                                     PAGE  4
                       PROGRAM LISTING FOR GC21

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1160 DELAY =1
 1170 GOTO 1110
 1180 LREAD FILEHL A$
 1190 IF Attl,6K>"  INST" THEN GOTO 1180
 1200 IF LEN(A*K=39 THEN LET E*=tf$f.31,LEN(A*>J
 1205 IF LEN(A$)>39 THEN LET E*=A$t31,39]
 1210 WRITE FILE[3,T1+1],E*
 1220 LET T1=T1+1
 1230 REH   	
 1240 REM    FIND REPORT TITLE,  IF ANY
 1250 LREAD FILEClliA*
 1260 IF A$n,7J="HESSAGEJ THEN GOTO 1250
 1270 IF A*C1,6J='  PEAK' THEN GOTO 1300
 1280 LET F$=A$[17,LEN(A$)]
 1285 IF F*="
 1290 GOTO 1310
 1300 LET F$="NONE"
 1310 IF F$tLEN(F*)3O' " THEN GOTO 1319
 1311 LET F$=F«1,LEN(F$M]
 1312 GOTO 1310
 1319 WRITE FILEC&TWLF*
 1320 LET T1=TH-1
 1330 Rffl	
 1340 REM    IGNORE LINES NOT DESCRIBING PEAKS
 1350 ON ERR THEN STOP
 1360 LREAD FILTH LA*
 1370 IF EOFlDOl THEN GOTO 1410
 1380 CLOSE FILEH]
 1390 CLOSE FILEC33
 1400 STOP
 1410 ON ERR THEN GOTO 1350
 1420 LET D=VAL(A$[1,6J)
 1430 ON ERR THEN STOP
 1500 REM   	
 1510 REM    COPY IDENTIFIER,  TYPE, RETENTION TINE,  AND AREA
 1520 LET G$=A*[9,16J
 1521  IF G$£LEN(G$)K>"  •  THEN GOTO 1530
 1522 LET G$=G$n,LEN(G*)-i]
 1523 GOTO 1521
 1530 IF G$="   UNEXP" THEN LET Gf^XXmXXX'
 1535 LET H*=A*[19,20]
 1540 LET B=VAL(A*C34,413)

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000

-------
1C
G-A-S   C-4HHHH^HHH*-A-P-H-Y   A-U-HHf-A-T-I-O-N   S-Y-S-T-E-M
7/20/1979                                                      PAGE 5
                        PROGRAM LISTING FOR GC21

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1550 LET C=A*VAL(A$[51,62])/100
 1560 HRITE FIL£f3,TH-l],G*,H*,B,C,0,0
 1570 LET T1=T1+1
 1580 GOTO 1350
 1590 REM
 1600 REM
 1610 REM   M H H H H H i n i m 1 1 i H 1 1 M 1 1 1 m 1 1 K 1 1 mn mt
                   SUBROUTINE TO CREATE DATA FILE NAME AND
                        PUSH IT  INTO THE LIST FILE GCOOOOw
                                                                      M it*
1620 REN
1630 REM
1640 REM   	
1650 REM     FIND INSTRUMENT NUMBER
1660 ON ERR THEN GOTO 1700
1670 OPEN FItEU,3L"GCOOOOOOOO'
1680 ON ERR THEN STOP
1690 GOTO 1730
1700 ON ERR THEN STOP
1710 DELAY =1
1720 GOTO 1660
1730 LREAD FILEHLAt
1740 IF EOF(1)O1 THEN GOTO 1750
1741 LET A*='  INST   99"
1750 IF A*£1,6K>"  INST" THEN GOTO  1730
1760 CLOSE FILEU1
1770 LET B$=Attll,12J
1780 REM   	
1790 REM     OPEN ID LIST FILE; FILL IT UITH
1800 REM          DUMMY ID'S  IF IT IS NEU
1810 IF B»[M]=- ' THEN LET  B«l,l]="0'
1820 LET C$="GCOOOO",B*
1830 ON ERR THEN GOTO 1850
1840 RENAME CfcW
1850 ON ERR THEN STOP
1860 IF SYS(7)O48 THEN GOTO 1890
       1870
       1880
       DELAY =1
       3QTO 1830
       1890 IF SYSt7)O-9 THEN GOTO 1990
       1900 ON ERR THEN GOTO 1940
       1910 OPEN FILE[2,OLC«, 11
       1920 ON ERR THEN STOP
       1930 GOTO 1970
       1940 ON ERR THEN STOP
       1950 DELAY =1
G-A-S   C-H-R-0-«-ft-T-0-G-fi-A-P-H-Y   A-U-T-0-M-A-T-I-O-N   S-Y-S-T-E-H
7/20/1979                                                      PAGE   6
                        PROGRAM LISTING FOR GC21

 1234567891123456789212345678931234567894123456789512345678961234567897
          0000000
 1960 GOTO 1900
 1970 GOTO 2105
 1980 ON ERR THEN GOTO 2020
 1990 OPEN FILEt2,0],Cf, 11
 2000 ON ERR THEN STOP
 2010 GOTO 2050
 2020 ON ERR THEN STOP
 2030 DELAY =1
 2040 GOTO 1980
 2050 FOR 1=1 TO 100
 2060   WRITEFILE[2,I],'GC99999999'
 2070 NEXT I
 2090 REM   	
 2100 REM     DETERMINE DATE OF INJECTION
 2105 IF A$[48,513O*DATE11 THEN GOTO 2130
 2110 LET D*="GC",B$[1,2],A«52,55]
 2120 GOTO 2180
 2130 LET D$="GC',B$tl,21,"0000"
 2140 LET M[7-LEN(STR»(SYS(2)»,6]=STR*(SYS(2))
 2150 LET D«9-LEN(STRf(SYS(l}»,8]=STR$(SYS
-------
G-ft-S   C^-0-H-A-T-CHrR-ft-f-H-Y   A-
-------
G-A-S   C-fHMhM-A-T-O-6-R-A-P-H-y   A-IK-O-H-A-T-MHI   S-Y-S-T-E-H
7/20/1979                                                      PAGE  9
                        SYMBOL TABLE FOR GC21

SYMBOL    REFERENCES

 1850  1830
 1890  1860
 1900  1960
 1940  1900
 1970  1930
 1980  2040
 1990  1890
 2020  1980
 2050  2010
 2105  1970
 2130  2105
 2180  2120
 2220  2190
 2270  2210
 2300  2280
 A     0820  1550
 A*    0080  0210  0240  0260  0285  0475  0490  0650  0770  0800
       0810  0820  1020  1040  1050  1180  1190  1200  1205  1250
       1260  1270  1280  1360  1420  1520  1535  1540  1550  1730
       1741  1750  1770  2105  2110
 A2$   0080  0285  0475
 B     1540  1560
 B$    0080  1770  1810  1820  2110  2130
 C     1550  1560
 C$    0080  1820  1840  1910  1990
 D     1420
 Dt    0080  0308  0320  0380  0668  0680  0740 0838 0850  0910
       2110  2130  2140  2150  2190  2200  2230 2240 2370
 D2»   2180  2190  2220  2270  2290  2340  2350
 E$    OOSO  1200  1205  1210
 F*    0080  1280  1285  1300  1310  1311  1319
 ail  0120  0290  0410  0490  0540  0590  0650 0755 0800  0830
       0960  1020  1080  1120  1180  1250  1360 1380 1670  1730
       1760
 FLI2  1910  1990  2060  2180  2270  2340  2350 2370 2380
 FLI3  0320  0380  0390  0680  0740  0750  0850 0910 1050  1210
       1319  1390  1560
 G«    0080  1520  1521  1522  1530  1560
 H$    0080  1535  1560
 I     2050  2060  2070  2330  2340  2350  2360
 Tl    0920  1050  1060  1210  1220  1319  1320 1560 1570
 U     0180  0250  0470  0480
 Y     2220  2225  2240

-------
                                  SECTION 24

                               FILE STRUCTURES
GCAS.
         The following tables detail the structure of the files used in the
       TABLE 18. STRUCTURE OF THE SAMPLE FILE CONTROL RUN RESULTS FILE
Name of file:  PPPPPPPA.RR
where PPPPPPP = parameter/method code
      A = a letter of the alphabet
File Number:
                                 Contents
              This is a sequential file consisting of eighty-byte strings.
              The format of the strings and their order are defined in the
              Sample File Control Foreground BASIC Functional Design.
                                      172

-------
                   TABLE 19.  STRUCTURE OF THE ARRIVAL FILE
Name of file:  GCOOOOOOOO
File Number:   1
                               Contents
         This is a sequential  file.  The report is placed in this file one
         line at a time as it  is received from the microcomputer.  Each line
         is a string of at most 70 characters.
                                    173

-------
                   TABLE 20.  STRUCTURE OF THE ID LIST FILE
Name of file:
                    GCOOOOII
where II = instrument number
File Number:
Record Length:
                    11 bytes
Record
  1
  2
  3
                                     Contents
                    most recent D$
                    second most recent D$
                    third most recent D$
100
                    hundredth most recent D$
                                          where D$ = the name of a data file
                                      174

-------
               TABLE  21.   STRUCTURE OF THE  INJECTION DATA FILE
Name of file: GCIIMMDDSS
where II =
MM =
DO =
SS =
instrument number
month
day
sequence number
File Number:        3

Record Length:      31 bytes

Record
  1
  2

n+2

n+3

n+4
J, D$, J2
V0$

E$

F$

G$,H$,B,C,L,L2
                    Contents
where J = data file useability flag
           1.  good data
           2.  no TOTAL AREA
           3.  wrong format
      D$ = name of the data file
      J2 = status flag
           1.  has been processed
           2.  never processed

where V0$ = MESSAGE (if any)

where E$ = method number

report title

where G$ = identifier
      H$ = peak type
      B  = absolute retention time
      C  * peak area
      L  = calculated concentration
      L2 = calculated relative
             retention time
n+5
G$,H$,B,C,L,L2
                                        where n = number of error messages
                                     175

-------
                   TABLE 22.  STRUCTURE OF THE METHOD FILE
Name of file:                GCMMMM                where MMMM = method number

File Number:                 4

Record Length:      200 bytes

Record                       Contents	
  IT5,U$,N1,N2,N$where T$ = name of method file
                                              U$ = name of user
                                              Nl = type of method
                                                   1.  internal standards
                                                   2..  purge and trap
                                                   3.  liquid/liquid
                                                   4.  direct aqueous
                                              N2 = type of retention time
                                                   1.  relative
                                                   2.  capacity ratio
                                              N$ = identifier for
                                                   relative retention time
                                                   reference compound, or
                                                   capacity ratio dead
                                                   volume time as a string

31-1        V$,V1$,V2$,V3$,V4$,V5$,V6$  where V$  = identifier
                                              VI$ = first compound name
                                              V2$ = first CAS number
                                              V3$ = second compound name
                                              V4$ = second CAS number
                                              V5$ = third compound name
                                              V6$ = third CAS number

31          D4$,I$,K,R1,R2,R3,J3        where D4$ = date of calibration
                                              1$ = superstring of injection
                                                     IDs of standards
                                              K = type of fit
                                                   1.  linear regression
                                                   2.  quadratic regression
                                                   3.  linear interpolation
                                                   4.  linear regression
                                                        forced through origin
                                              Rl = constant term of equation
                                              R2 = linear term of equation
                                              R3 = quadratic term of equation
                                              J3-= fitting error
                                     176

-------
                            TABLE 22.  (Continued)
Record                          Contents
31+1        G(i,l),G(i,2),G(i,3),....,G(i,30)
                                        where G(i,odd) = concentration
                                              G(i,even) = area

31-1        V$,V1$,V2$,V3$,V4$,V5$,V6$

31          D4$,I$,K,R1,R2,R3,J3

            6(i,l),G(i,2),6{1,3),	G{i,30)
                                        where  i  =  counter  for  identifiers
                                    177

-------
         TABLE 23.  STRUCTURE OF THE TEMPORARY FORMATTED OUTPUT FILE
Name of file:              GCOMMMM      where MMMM = method number
File Number:
                               Contents
         This is a sequential  file.   The formatted output report is placed
         into this file line by line as it is generated.   Each line is a
         string of at most 132 characters.
                                    178

-------
            TABLE 24.  STRUCTURE OF THE CONCENTRATION PATTERN FILE
Name of file:
File Number:
Record Length:
        GGMMMMOSS
        7
        4 byte:
where MMMM = method number
      SS = sequence number matching
            a letter of the alphabet
Record
  1
  2
                Contents
A5 for first Identifier
A5 for second identifier
A5 for third identifier
                           where A5 * the known concentration
                                    179

-------
                                    TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing)
1. REPORT NO.
  EPA-600/4-80-011
                                                            3. RECIPIENT'S ACCESSION NO.
4. TITLE AND SUBTITLE
  Program Documentation for  the  Gas Chromatography
  Automation System
                REPORT DATE
                 February 1980  issuing date
               6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)

  Jonathan E.  Kopke
                                                            8. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING ORGANIZATION NAME AND ADDRESS

  Southwestern Ohio Regional Computer Center
  University of Cincinnati
  Cincinnati, Ohio  45220
               10. PROGRAM ELEMENT NO.

                 A38BID
               11. CONTRACT/GRANT NO.
                 GS-05S-10458
                Task  No.  EPA-79-?19
12. SPONSORING AGENCY NAME AND ADDRESS
  Environmental Monitoring and  Support Laboratory
  Office of Research and Development
  U.S.  Environmental  Protection Agency
  Cincinnati, Ohio   45268
               13. TYPE OF REPORT AND PERIOD COVERED
                 Extramural
               14. SPONSORING AGENCY CODE
                   EPA/600/06
15. SUPPLEMENTARY NOTES
16. ABSTRACT
 This  documentation  contains the  program listings,  program flowcharts, symbols
 definitions, symbol  references and program descriptions of all  the Basic
 language programs which implement the functional  specifications for an advanced
 Chromatography automation system (EPA report  EPA  60014-79-038).  The programs
 are written in Data  General Extended Basic Revision 4.3.
17.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
 b.lDENTIFIERS/OPEN ENDED TERMS  C. COSATI Field/Group
 Gas  Chromatography
 Calibrating
 Quality Assurance
 Computers
                               091B
                               141B
                               071C
18. DISTRIBUTION STATEMENT

  Release to public
 19. SECURITY CLASS (ThisReportI
    Unclassified
                                                                           21. NO. OF PAGES
                                  186
                                               20. SECURITY CLASS (Thispage)
                                                  Unclassified
                             22. PRICE
EPA Form 2220-1 (9-73)
180
                                                                   U.S. GOVERNMENT ffllNTINGOFf ICE: 1980-657-146/5574

-------