CFPRIME GOTOS                                                           GOTOS       1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*               Output Analysis Program for ETMSP (OAP)               *RIGHTE      4
C*               =======================================               *RIGHTE      5
C*                                                                     *RIGHTE     11
C*        copyright @(1993) Electric Power Research Institute          *RIGHTE     12
C*                                                                     *RIGHTE     13
C* EPRI reserves all rights in the software and associated             *RIGHTE     14
C* documentation as delivered. The software and its associated         *RIGHTE     15
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     16
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     17
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     18
C* of any changes or modifications to the software within two (2)      *RIGHTE     19
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     20
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     21
C* new designation sufficiently different from its then current        *RIGHTE     22
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     23
C* the current software as changed or modified.                        *RIGHTE     24
C*                                                                     *RIGHTE     25
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     26
C* directly from EPRI.                                                 *RIGHTE     27
C*                                                                     *RIGHTE     28
C* This program and supporting materials may be independently available*RIGHTE     29
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     30
C* distribution fee. The EPSC is a service of                          *RIGHTE     31
C*                                                                     *RIGHTE     32
C*                    Power Computing Company                          *RIGHTE     33
C*                    1930 Hi Line                                     *RIGHTE     34
C*                    Dallas, Tx 75207                                 *RIGHTE     35
C*                                                                     *RIGHTE     36
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     37
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     38
C*                                                                     *RIGHTE     39
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     40
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     41
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     42
C*    DOCUMENTATION; OR                                                *RIGHTE     43
C*                                                                     *RIGHTE     44
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     45
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     46
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     47
C*                                                                     *RIGHTE     48
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     49
C* THEREOF.                                                            *RIGHTE     50
C*                                                                     *RIGHTE     51
C***********************************************************************RIGHTE     52
C                                                                       GOTOS       3
      SUBROUTINE GOTOS(IWHERE,COMMD,PARAM,LENPAR,IGOTO)                 GOTOS       4
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCGOTOS       5
CD                                                                      GOTOS       6
CD                THIS ROUTINE DIRECTS CONTROL TO VARIOUS PROGRAM       GOTOS       7
CD                FUNCTIONS BASED ON THE COMMANDS FROM THE USER.        GOTOS       8
CD                THE COMMANDS FROM THE USERS CAN BE                    GOTOS       9
CD                                                                      GOTOS      10
CD   1) ALRELAY   2) DELCHNL    3) DPCLEAR    4) DPDEVICE   5) DPPLOT   GOTOS      11
CD   6) FILRUN    7) FUNCTION   8) G3D        9) GMC3D     10) GETCHNL  GOTOS      12
CD  11) GP3D     12) GPCLOSE   13) GPDEVICE  14) GPNEXT    15) GPPLOT   GOTOS      13
CD  16)          17) HELP      18) LISTDATA  19) MENU      20) MSAVE    GOTOS      14
CD  21) NAME     22) NUMBER    23) OPASCII   24) OPENCASE  25) PLAYBACK GOTOS      15
CD  26) QUIT     27) RDASCII   28) RECORD    29) RELATIVE  30) RESTORE  GOTOS      16
CD  31) SAVE     32) SPECTRUM  33) STOPREC   34) TITLE     35) LIMITS   GOTOS      17
CD  36) VMSDCL   37) BSAVE     38) ABSOLUTE                             GOTOS      18
CD                                                                      GOTOS      19
CD               CALLING PARAMETERS :                                   GOTOS      20
CD                                                                      GOTOS      21
CD                           IWHERE - INTEGER CODE FOR THE COMMAND      GOTOS      22
CD                           COMMD  - COMMAND LINE                      GOTOS      23
CD                           PARAM  - CHARACTER STRING STORING FILE NAMEGOTOS      24
CD                           LENPAR - NO. OF CHARACTER IN PARAM         GOTOS      25
CD                           IGOTO  - STATUS FLAG                       GOTOS      26
CD                                                                      GOTOS      27
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCGOTOS      28
      CHARACTER*80 COMMD,STRING,MSG,FILENA                              GOTOS      29
      CHARACTER*50 PARAM                                                GOTOS      30
      INCLUDE 'PARAM.INS'                                               GOTOS      31
      INCLUDE 'XYARAY.INS'                                              GOTOS      32
      INCLUDE 'DPPLOT.INS'                                              GOTOS      33
      INCLUDE 'SOAPC1.INS'                                              GOTOS      34
      INCLUDE 'DBFLG.INS'                                               GOTOS      35
      INCLUDE 'CHDISP.INS'                                              GOTOS      36
C                                                                       GOTOS      37
      COMMON /BSAVEM/ ISLAST                                            GOTOS      38
      COMMON /KEYWOD/ INSTAL,KEYW                                       GOTOS      39
      CHARACTER*8 KEYW(40)                                              GOTOS      40
C ..  (in GOTOS,ALLDAT,BUSNUM)                                          GOTOS      41
      COMMON /LABFLG/ NUMFLG                                            GOTOS      42
C ..                                                                    GOTOS      43
                                                                        GOTOS      44
      LDEBUG=DEBUG(7)                                                   GOTOS      45
C   .......................................................             GOTOS      46
C   : ECHO TO THE TERMINAL THE FULL COMMAND AS INTEPRETED :             GOTOS      47
C   :                                                     :             GOTOS      48
      IF(LDEBUG) THEN                                                   GOTOS      49
         WRITE(LOUT,5020) KEYW(IWHERE),PARAM                            GOTOS      50
 5020    FORMAT(/,1X,'** DEBUG (GOTOS) ** ',A8,2X,A)                    GOTOS      51
      ENDIF                                                             GOTOS      52
C   :.....................................................:             GOTOS      53
                                                                        GOTOS      54
C   ..............................................................      GOTOS      55
C   : RECORD USER INPUTS TO A RESPONSE FILE                      :      GOTOS      56
C   :                                                            :      GOTOS      57
      IF(RECORD) THEN                                                   GOTOS      58
C        :DON'T WRITE 'RECORD' OR 'STOPREC' KEYWORDS:                   GOTOS      59
C         IF( (.NOT.(IWHERE.EQ.28)).AND.(.NOT.(IWHERE.EQ.33)) )THEN     GOTOS      60
         IF(IWHERE.NE.28 .AND. IWHERE.NE.33) WRITE(IREC,5005) COMMD     GOTOS      61
 5005    FORMAT(A80)                                                    GOTOS      62
      ENDIF                                                             GOTOS      63
C   :.............................................................:     GOTOS      64
                                                                        GOTOS      65
C   ....................................................................GOTOS      66
C   : SEND PROGRAM  CONTROL TO THE PROPER ROUTINE                      :GOTOS      67
C   :                                                                  :GOTOS      68
      IF((IWHERE.LT.1).OR.(IWHERE.GT.INSTAL)) GOTO 9998                 GOTOS      69
      GOTO ( 90, 290, 100, 140, 110,  70, 230, 150, 150,  80,           GOTOS      70
     1      150, 150, 150, 150, 150,  80,  60, 130, 250, 350,           GOTOS      71
     2      320, 310, 370,  30,  20, 150, 340,  50, 300, 260,           GOTOS      72
     3      240, 330,  40, 200, 360, 150, 500, 300), IWHERE             GOTOS      73
C   :..................................................................:GOTOS      74
                                                                        GOTOS      75
C   ....................................                                GOTOS      76
C   : PLAYBACK                         :                                GOTOS      77
C   :                                  :                                GOTOS      78
 20   CONTINUE                                                          GOTOS      79
           CALL SWTERM(IS,PARAM,LENPAR)                                 GOTOS      80
           IGOTO=0                                                      GOTOS      81
           GOTO 9999                                                    GOTOS      82
C   :..................................:                                GOTOS      83
C   .............................................                       GOTOS      84
C   : OPENCASE                                  :                       GOTOS      85
C   :                                           :                       GOTOS      86
 30   CONTINUE                                                          GOTOS      87
C          (OPENED FLAG SET IN SUBROUTINE OPCHNL)                       GOTOS      88
           IF(OPENED)OPEN1=.TRUE.                                       GOTOS      89
           CALL OPCHNL(PARAM,LENPAR)                                    GOTOS      90
           SCALX=.TRUE.                                                 GOTOS      91
           RELATE=.FALSE.                                               GOTOS      92
           DO 32 I=1,6                                                  GOTOS      93
             IF(I.LE.KCH(1))THEN                                        GOTOS      94
               IF(ICHTYP(I).EQ.0)ICHTYP(I)=1                            GOTOS      95
             ELSE                                                       GOTOS      96
               ICHTYP(I)=0                                              GOTOS      97
             ENDIF                                                      GOTOS      98
32         CONTINUE                                                     GOTOS      99
           IGOTO=0                                                      GOTOS     100
           GOTO 9999                                                    GOTOS     101
C   :...........................................:                       GOTOS     102
C   .............................                                       GOTOS     103
C   : STOPREC                   :                                       GOTOS     104
C   :                           :                                       GOTOS     105
 40   CONTINUE                                                          GOTOS     106
         CALL ENDREC                                                    GOTOS     107
         IGOTO=-1                                                       GOTOS     108
         GOTO 9999                                                      GOTOS     109
C   :...........................:                                       GOTOS     110
C   .............................                                       GOTOS     111
C   : RECORD                    :                                       GOTOS     112
C   :                           :                                       GOTOS     113
 50   CONTINUE                                                          GOTOS     114
         CALL BEGREC(PARAM,LENPAR)                                      GOTOS     115
         IGOTO=-1                                                       GOTOS     116
         GOTO 9999                                                      GOTOS     117
C   :...........................:                                       GOTOS     118
C   .............................................                       GOTOS     119
C   : HELP                                      :                       GOTOS     120
C   :                                           :                       GOTOS     121
 60   CONTINUE                                                          GOTOS     122
           CALL HELPSC(PARAM,LENPAR)                                    GOTOS     123
           IGOTO=0                                                      GOTOS     124
           GOTO 9999                                                    GOTOS     125
C   :............................................:                      GOTOS     126
C   .............................                                       GOTOS     127
C   : SCALE                     :                                       GOTOS     128
C   :                           :                                       GOTOS     129
C 70   CONTINUE                                                         GOTOS     130
C         CALL SCALES(1,KCH(1))                                         GOTOS     131
C         IGOTO=-1                                                      GOTOS     132
C         GOTO 9999                                                     GOTOS     133
C   :...........................:                                       GOTOS     134
C   .............................                                       GOTOS     135
C   : STATUS                    :                                       GOTOS     136
C   :                           :                                       GOTOS     137
C 70   CONTINUE                                                         GOTOS     138
C         CALL STATU(PARAM,LENPAR)                                      GOTOS     139
C         IGOTO=-1                                                      GOTOS     140
C         GOTO 9999                                                     GOTOS     141
C   :...........................:                                       GOTOS     142
C   .............................                                       GOTOS     143
C   : GETCHNL                   :                                       GOTOS     144
C   :                           :                                       GOTOS     145
 70   CONTINUE                                                          GOTOS     146
      CALL FILRUN                                                       GOTOS     147
      IGOTO=-1                                                          GOTOS     148
      GOTO 9999                                                         GOTOS     149
C                                                                       GOTOS     150
 90   CONTINUE                                                          GOTOS     151
      CALL ALRLY                                                        GOTOS     152
      IGOTO=-1                                                          GOTOS     153
      GOTO 9999                                                         GOTOS     154
C                                                                       GOTOS     155
 80   CONTINUE                                                          GOTOS     156
         IF(OPENED) THEN                                                GOTOS     157
           IF(PARAM(1:3).EQ.'LIS'.OR.PARAM(1:3).EQ.'lis') CALL LISTCH   GOTOS     158
           CALL GPPAGE                                                  GOTOS     159
           CALL GETCHN(COMMD)                                           GOTOS     160
         ELSE                                                           GOTOS     161
            WRITE(LOUT,1026)                                            GOTOS     162
 1026       FORMAT(/,                                                   GOTOS     163
     1      10X,'*********************************',/,                  GOTOS     164
     1      10X,'*  CHANNEL FILE NOT AVAILABLE   *',/,                  GOTOS     165
     1      10X,'*  USE OPENCASE FIRST           *',/,                  GOTOS     166
     1      10X,'*********************************')                    GOTOS     167
         ENDIF                                                          GOTOS     168
         IGOTO=-1                                                       GOTOS     169
         GOTO 9999                                                      GOTOS     170
C   :...........................:                                       GOTOS     171
C   .............................                                       GOTOS     172
C   : DPCLEARP                  :                                       GOTOS     173
C   :                           :                                       GOTOS     174
 100  CONTINUE                                                          GOTOS     175
         CALL DPSOAP('CLEARPAG',0,0)                                    GOTOS     176
         IGOTO=-1                                                       GOTOS     177
         IP2=0                                                          GOTOS     178
       KCH(1)=0                                                         GOTOS     179
       SCALX=.TRUE.                                                     GOTOS     180
         GOTO 9999                                                      GOTOS     181
C   :...........................:                                       GOTOS     182
C   .............................                                       GOTOS     183
C   : DPPLOT                    :                                       GOTOS     184
C   :                           :                                       GOTOS     185
 110  CONTINUE                                                          GOTOS     186
         IF(FILLED.AND.(.NOT.DPINIT))THEN                               GOTOS     187
           DPINIT=.TRUE.                                                GOTOS     188
           SCALX=.TRUE.                                                 GOTOS     189
           IF(PARAM(1:2).EQ.'PR'.OR.PARAM(1:2).EQ.'pr'.OR.              GOTOS     190
     *        PARAM(1:3).EQ.'132')THEN                                  GOTOS     191
C            :IPR=0 - PLOT  80 COLUMNS :                                GOTOS     192
C            :IPR=1 - PLOT 132 COLUMNS :                                GOTOS     193
             IPR=1                                                      GOTOS     194
             IDPR=IPPLOT                                                GOTOS     195
             FILENA=' '                                                 GOTOS     196
             CALL OPOUTF(FILENA,1,IDPDEV,IERR)                          GOTOS     197
             IF(IERR.GE.0) THEN                                         GOTOS     198
               CALL DPSOAP('SETOUT  ',IPR,IDPDEV)                       GOTOS     199
             ENDIF                                                      GOTOS     200
                                                                        GOTOS     201
           ELSE                                                         GOTOS     202
             IPR=0                                                      GOTOS     203
             IDPR=LOUT                                                  GOTOS     204
           ENDIF                                                        GOTOS     205
           CALL DPSOAP('SETPAGE ',IPR,IDPR)                             GOTOS     206
           CALL DPSOAP('CLEARPAG',0,0)                                  GOTOS     207
           IP2=0                                                        GOTOS     208
C           DPPLOT=.FALSE.                                              GOTOS     209
         ENDIF                                                          GOTOS     210
C                                                                       GOTOS     211
         IF(FILLED) THEN                                                GOTOS     212
            PARAM=' '                                                   GOTOS     213
            CALL DPSOAP('PLOT1   ',IPR,0)                               GOTOS     214
            IF(USCALE) USCALE=.FALSE.                                   GOTOS     215
            DPPLOT=.TRUE.                                               GOTOS     216
            CALL DPSOAP('SHOWPLOT',IPR,0)                               GOTOS     217
         ELSE                                                           GOTOS     218
            WRITE(LOUT,1027)                                            GOTOS     219
 1027       FORMAT(/,                                                   GOTOS     220
     *      10X,'*******************************',/,                    GOTOS     221
     *      10X,'*  PLOTTING DATA NOT READ IN  *',/,                    GOTOS     222
     *      10X,'*  USE GETCHNL FIRST          *',/,                    GOTOS     223
     *      10X,'*******************************')                      GOTOS     224
         ENDIF                                                          GOTOS     225
         IGOTO=-1                                                       GOTOS     226
         GOTO 9999                                                      GOTOS     227
C   :...........................:                                       GOTOS     228
C   .............................                                       GOTOS     229
C   : DPSHOW                    :                                       GOTOS     230
C   :                           :                                       GOTOS     231
C 120  CONTINUE                                                         GOTOS     232
C         CALL DPSOAP('SHOWPLOT',0,0)                                   GOTOS     233
C         IGOTO=-1                                                      GOTOS     234
C         GOTO 9999                                                     GOTOS     235
C   :...........................:                                       GOTOS     236
C   .............................                                       GOTOS     237
C   : LISTDATA                  :                                       GOTOS     238
C   :                           :                                       GOTOS     239
 130  CONTINUE                                                          GOTOS     240
         IF(FILLED) THEN                                                GOTOS     241
            CALL DPSOAP('LISTDATA',0,0)                                 GOTOS     242
         ELSE                                                           GOTOS     243
            WRITE(LOUT,1027)                                            GOTOS     244
         ENDIF                                                          GOTOS     245
         IGOTO=-1                                                       GOTOS     246
         GOTO 9999                                                      GOTOS     247
C   :...........................:                                       GOTOS     248
C   .............................                                       GOTOS     249
C   : DPDEVICE                  :                                       GOTOS     250
C   :                           :                                       GOTOS     251
 140  CONTINUE                                                          GOTOS     252
        IF(DPPLOT) THEN                                                 GOTOS     253
           IF(PARAM(1:2).EQ.'PR'.OR.PARAM(1:2).EQ.'pr'.OR.              GOTOS     254
     *        PARAM(1:3).EQ.'132')THEN                                  GOTOS     255
C           :IPR=0 - PLOT  80 COLUMNS :                                 GOTOS     256
C           :IPR=1 - PLOT 132 COLUMNS :                                 GOTOS     257
            IPR=1                                                       GOTOS     258
            IDPR=IPPLOT                                                 GOTOS     259
            FILENA=' '                                                  GOTOS     260
            CALL OPOUTF(FILENA,1,IDPDEV,IERR)                           GOTOS     261
            IF(IERR.GE.0) THEN                                          GOTOS     262
              CALL DPSOAP('SETOUT  ',IPR,IDPDEV)                        GOTOS     263
            ENDIF                                                       GOTOS     264
          ELSE IF(PARAM(1:2).EQ.'80')THEN                               GOTOS     265
            IPR=0                                                       GOTOS     266
            IDPR=LOUT                                                   GOTOS     267
          ELSE                                                          GOTOS     268
C           SELECT PLOTTING DEVICE                                      GOTOS     269
  11        CONTINUE                                                    GOTOS     270
            WRITE(LOUT,1220)                                            GOTOS     271
 1220       FORMAT(//,10X,'Select output form :',/,                     GOTOS     272
     *          10X,'    1. 80 columns on screen.',/,                   GOTOS     273
     *          10X,'    2. 80 columns on file.',/,                     GOTOS     274
     *          10X,'    3. 132 columns on screen.',/,                  GOTOS     275
     *          10X,'    4. 132 columns on file.',//)                   GOTOS     276
            MSG=' Enter(1,2,3,or 4)'                                    GOTOS     277
            CALL PMTRED(LOUT,LIN,JERR,18,MSG,'PTI',STRING)              GOTOS     278
            READ(STRING,*,IOSTAT=IOS) I1                                GOTOS     279
            IF((I1.GT.4).OR.(I1.LT.1).OR.IOS.NE.0) GOTO 11              GOTOS     280
            IF(RECORD) WRITE(IREC,1221)I1                               GOTOS     281
 1221       FORMAT(I1)                                                  GOTOS     282
            IF (I1.EQ.1)THEN                                            GOTOS     283
              IPR=0                                                     GOTOS     284
              IDPR=LOUT                                                 GOTOS     285
              FILENA='CON:'                                             GOTOS     286
              CALL OPOUTF(FILENA,1,IDPDEV,IERR)                         GOTOS     287
            ELSE IF(I1.EQ.2)THEN                                        GOTOS     288
              IPR=0                                                     GOTOS     289
              IDPR=IPPLOT                                               GOTOS     290
              FILENA=' '                                                GOTOS     291
              CALL OPOUTF(FILENA,1,IDPDEV,IERR)                         GOTOS     292
            ELSE IF(I1.EQ.3)THEN                                        GOTOS     293
              IPR=1                                                     GOTOS     294
             IDPR=LOUT                                                  GOTOS     295
              FILENA='CON:'                                             GOTOS     296
              CALL OPOUTF(FILENA,1,IDPDEV,IERR)                         GOTOS     297
            ELSE                                                        GOTOS     298
              IPR=1                                                     GOTOS     299
              IDPR=IPPLOT                                               GOTOS     300
              FILENA=' '                                                GOTOS     301
              CALL OPOUTF(FILENA,1,IDPDEV,IERR)                         GOTOS     302
            ENDIF                                                       GOTOS     303
            IF(IERR.GE.0) THEN                                          GOTOS     304
              CALL DPSOAP('SETOUT  ',IPR,IDPDEV)                        GOTOS     305
            ENDIF                                                       GOTOS     306
          ENDIF                                                         GOTOS     307
          CALL DPSOAP('SETPAGE ',IPR,IDPR)                              GOTOS     308
          CALL DPSOAP('CLEARPAG',0,0)                                   GOTOS     309
          IP2=0                                                         GOTOS     310
          CALL DPSOAP('PLOT1   ',IPR,0)                                 GOTOS     311
          CALL DPSOAP('SHOWPLOT',IPR,0)                                 GOTOS     312
        ELSE                                                            GOTOS     313
          WRITE(LOUT,1030)                                              GOTOS     314
 1030     FORMAT(/,                                                     GOTOS     315
     *    10X,'******************************',/,                       GOTOS     316
     *    10X,'*  NOTHING HAS BEEN PLOTTED  *',/,                       GOTOS     317
     *    10X,'*  USE DPPLOT FIRST          *',/,                       GOTOS     318
     *    10X,'******************************')                         GOTOS     319
        ENDIF                                                           GOTOS     320
        IGOTO=-1                                                        GOTOS     321
        GOTO 9999                                                       GOTOS     322
C   :...........................:                                       GOTOS     323
C                                                                       GOTOS     324
C $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$4$        GOTOS     325
C $ SUBROUTINES CALLED BY GOTOS1 ARE VAX/INDEPLOT SPECIFIC.    $        GOTOS     326
C $ COMMENT OUT THIS BLOCK OF CODE IF COMPILE FOR OTHER SYSTEM.$        GOTOS     327
C $                                                            $        GOTOS     328
C $                                                            $        GOTOS     329
C $ ................................................           $        GOTOS     330
C $ : VERSA PLOT COMMANDS                          :           $        GOTOS     331
C $ :                                              :           $        GOTOS     332
 150  CONTINUE                                                          GOTOS     333
         IGOTO=-1                                                       GOTOS     334
         CALL GOTOS1(IWHERE,PARAM,LENPAR,IOK,IGOTO)                     GOTOS     335
         IF(IOK.EQ.0) THEN                                              GOTOS     336
            GOTO 9999                                                   GOTOS     337
         ELSE                                                           GOTOS     338
            GOTO 9998                                                   GOTOS     339
         ENDIF                                                          GOTOS     340
C $ :...............................................:          $        GOTOS     341
C $                                                            $        GOTOS     342
C $                                                            $        GOTOS     343
C $                                                            $        GOTOS     344
C $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$        GOTOS     345
C   .............................                                       GOTOS     346
C   : FUNCTION                  :                                       GOTOS     347
C   :                           :                                       GOTOS     348
 200  CONTINUE                                                          GOTOS     349
         CALL CHNTIT(PARAM,LENPAR)                                      GOTOS     350
         IGOTO=-1                                                       GOTOS     351
         GOTO 9999                                                      GOTOS     352
C   :...........................:                                       GOTOS     353
C   .............................                                       GOTOS     354
C   : FUNCTION                  :                                       GOTOS     355
C   :                           :                                       GOTOS     356
 230  CONTINUE                                                          GOTOS     357
         CALL FUNCTN(PARAM,LENPAR)                                      GOTOS     358
         IGOTO=-1                                                       GOTOS     359
         GOTO 9999                                                      GOTOS     360
C   :...........................:                                       GOTOS     361
C   .............................                                       GOTOS     362
C   : SAVE BUFFER TO ASCII FILE :                                       GOTOS     363
C   :                           :                                       GOTOS     364
240   CONTINUE                                                          GOTOS     365
         CALL SAVEIT(PARAM,LENPAR)                                      GOTOS     366
         IGOTO=-1                                                       GOTOS     367
         GOTO 9999                                                      GOTOS     368
C   :...........................:                                       GOTOS     369
C   .............................                                       GOTOS     370
C   : MENU SWITCH               :                                       GOTOS     371
C   :                           :                                       GOTOS     372
250   CONTINUE                                                          GOTOS     373
         IF(MENUM) THEN                                                 GOTOS     374
           MENUM=.FALSE.                                                GOTOS     375
         ELSE                                                           GOTOS     376
           MENUM=.TRUE.                                                 GOTOS     377
         ENDIF                                                          GOTOS     378
         IGOTO=-1                                                       GOTOS     379
         GOTO 9999                                                      GOTOS     380
C   :...........................:                                       GOTOS     381
C   .............................                                       GOTOS     382
C   : RESTORE FROM ASCII FILE   :                                       GOTOS     383
C   :                           :                                       GOTOS     384
260   CONTINUE                                                          GOTOS     385
         HTIME=.FALSE.                                                  GOTOS     386
         CALL RESTOR(PARAM,LENPAR)                                      GOTOS     387
         IGOTO=-1                                                       GOTOS     388
         GOTO 9999                                                      GOTOS     389
C   :...........................:                                       GOTOS     390
C   .............................                                       GOTOS     391
C   : BUSNUM. Set bus name/number for label:                            GOTOS     392
C   :                           :                                       GOTOS     393
C280   CONTINUE                                                         GOTOS     394
C         IF(NUMFLG.LT.0)THEN                                           GOTOS     395
C           NUMFLG=0                                                    GOTOS     396
C           WRITE(LOUT,2810)                                            GOTOS     397
C 2810      FORMAT(//,10X,'Bus NAMES will be used to label plots',//)   GOTOS     398
C         ELSE                                                          GOTOS     399
C           NUMFLG=-1                                                   GOTOS     400
C           WRITE(LOUT,2820)                                            GOTOS     401
C 2820      FORMAT(//,10X,'CHANNEL #s will be used to label plots',//)  GOTOS     402
C         ENDIF                                                         GOTOS     403
C         FILLED=.TRUE.                                                 GOTOS     404
C         IGOTO=-1                                                      GOTOS     405
C         GOTO 9999                                                     GOTOS     406
C   :...........................:                                       GOTOS     407
C   .............................                                       GOTOS     408
C   : DEL                       :                                       GOTOS     409
C   :                           :                                       GOTOS     410
 290   CONTINUE                                                         GOTOS     411
         IF(KCH(1).EQ.0)THEN                                            GOTOS     412
            WRITE(LOUT,2830)                                            GOTOS     413
 2830       FORMAT(/,                                                   GOTOS     414
     1      10X,'***********************************',/,                GOTOS     415
     1      10X,'*  CHANNEL HAS NOT BEEN SELECTED  *',/,                GOTOS     416
     1      10X,'*  USE GETCHNL FIRST              *',/,                GOTOS     417
     1      10X,'***********************************')                  GOTOS     418
         ELSE                                                           GOTOS     419
           IF(PARAM(1:3).EQ.'ALL'.OR.PARAM(1:3).EQ.'all')THEN           GOTOS     420
             KCH(1)=0                                                   GOTOS     421
             ISLAST=0                                                   GOTOS     422
             WRITE(LOUT,2835)                                           GOTOS     423
 2835        FORMAT(/,10X,                                              GOTOS     424
     *          '**  ALL CHANNEL DATA HAVE BEEN DELETED  **',/)         GOTOS     425
           ELSE                                                         GOTOS     426
             KCH(1)=KCH(1)-1                                            GOTOS     427
             IF(ISLAST.GT.0)ISLAST=ISLAST-1                             GOTOS     428
           ENDIF                                                        GOTOS     429
           IF(KCH(1).EQ.0)THEN                                          GOTOS     430
             FILLED=.FALSE.                                             GOTOS     431
             IPLTYP=0                                                   GOTOS     432
             SCALX=.TRUE.                                               GOTOS     433
           ENDIF                                                        GOTOS     434
           KRECFD(1,1)=KCH(1)                                           GOTOS     435
         ENDIF                                                          GOTOS     436
         IGOTO=-1                                                       GOTOS     437
         GOTO 9999                                                      GOTOS     438
C   :...........................:                                       GOTOS     439
C   .............................                                       GOTOS     440
C   : RELATIVE ANGLE            :                                       GOTOS     441
C   :                           :                                       GOTOS     442
 300   CONTINUE                                                         GOTOS     443
         IF(OPENED)THEN                                                 GOTOS     444
            IF(IWHERE.EQ.38)THEN                                        GOTOS     445
              ICMMD=0                                                   GOTOS     446
            ELSE                                                        GOTOS     447
              ICMMD=1                                                   GOTOS     448
            ENDIF                                                       GOTOS     449
            CALL REFCHN(ICMMD)                                          GOTOS     450
         ELSE                                                           GOTOS     451
           WRITE(LOUT,1026)                                             GOTOS     452
         ENDIF                                                          GOTOS     453
         IGOTO=-1                                                       GOTOS     454
         GOTO 9999                                                      GOTOS     455
C   :...........................:                                       GOTOS     456
  310 CONTINUE                                                          GOTOS     457
      KLFO=-100                                                         GOTOS     458
      IGOTO=-1                                                          GOTOS     459
      WRITE(LOUT,1050) 'NUMBER'                                         GOTOS     460
 1050 FORMAT(/,3X,'** Bus ',A6,                                         GOTOS     461
     * ' has been selected to be the Channel Identifier **',/)          GOTOS     462
      RETURN                                                            GOTOS     463
C                                                                       GOTOS     464
  320 CONTINUE                                                          GOTOS     465
      KLFO=100                                                          GOTOS     466
      IGOTO=-1                                                          GOTOS     467
      WRITE(LOUT,1050) ' NAME '                                         GOTOS     468
      RETURN                                                            GOTOS     469
C                                                                       GOTOS     470
  330 CONTINUE                                                          GOTOS     471
      CALL SPECT2                                                       GOTOS     472
      IGOTO=-1                                                          GOTOS     473
      RETURN                                                            GOTOS     474
C                                                                       GOTOS     475
  340 CONTINUE                                                          GOTOS     476
      HTIME=.FALSE.                                                     GOTOS     477
      CALL RDASCI                                                       GOTOS     478
      IGOTO=-1                                                          GOTOS     479
      RETURN                                                            GOTOS     480
C                                                                       GOTOS     481
  350 CONTINUE                                                          GOTOS     482
      IF(OPENED)THEN                                                    GOTOS     483
       CALL MSAVE                                                       GOTOS     484
      ELSE                                                              GOTOS     485
       WRITE(LOUT,1026)                                                 GOTOS     486
      ENDIF                                                             GOTOS     487
      IGOTO=-1                                                          GOTOS     488
      RETURN                                                            GOTOS     489
C                                                                       GOTOS     490
  360 CONTINUE                                                          GOTOS     491
      IF(OPENED)THEN                                                    GOTOS     492
        CALL TYPSUM                                                     GOTOS     493
      ELSE                                                              GOTOS     494
        WRITE(LOUT,1026)                                                GOTOS     495
      ENDIF                                                             GOTOS     496
      IGOTO=-1                                                          GOTOS     497
      RETURN                                                            GOTOS     498
C                                                                       GOTOS     499
  370 CONTINUE                                                          GOTOS     500
      CALL OPASCI                                                       GOTOS     501
      IGOTO=-1                                                          GOTOS     502
      RETURN                                                            GOTOS     503
C                                                                       GOTOS     504
  500 CONTINUE                                                          GOTOS     505
      CALL BSAVE                                                        GOTOS     506
      IGOTO=-1                                                          GOTOS     507
      RETURN                                                            GOTOS     508
C   ...................................................                 GOTOS     509
C   :                                                 :                 GOTOS     510
 9998 CONTINUE                                                          GOTOS     511
C      WRITE(LOUT,5000)                                                 GOTOS     512
C 5000 FORMAT(/,1X,'** COMMAND NOT YET INSTALLED **',/)                 GOTOS     513
C   :.................................................:                 GOTOS     514
 9999 CONTINUE                                                          GOTOS     515
      RETURN                                                            GOTOS     516
      END                                                               GOTOS     517
