CFPRIME CASE                                                            CASE        1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*        Extended Transient-Midterm Stability Program (ETMSP)         *RIGHTE      3
C*        ====================================================         *RIGHTE      4
C*                                                                     *RIGHTE      5
C*       Copyright (C) (1993) Electric Power Research Institute        *RIGHTE      6
C*                                                                     *RIGHTE      7
C* EPRI reserves all rights in the software and associated             *RIGHTE      8
C* documentation as delivered. The software and its associated         *RIGHTE      9
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     10
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     11
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     12
C* of any changes or modifications to the software within two (2)      *RIGHTE     13
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     14
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     15
C* new designation sufficiently different from its then current        *RIGHTE     16
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     17
C* the current software as changed or modified.                        *RIGHTE     18
C*                                                                     *RIGHTE     19
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     20
C* directly from EPRI.                                                 *RIGHTE     21
C*                                                                     *RIGHTE     22
C* This program and supporting materials may be independently available*RIGHTE     23
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     24
C* distribution fee. The EPSC is a service of                          *RIGHTE     25
C*                                                                     *RIGHTE     26
C*                    Power Computing Company                          *RIGHTE     27
C*                    1930 Hi Line                                     *RIGHTE     28
C*                    Dallas, Tx 75207                                 *RIGHTE     29
C*                                                                     *RIGHTE     30
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     31
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     32
C*                                                                     *RIGHTE     33
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     34
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     35
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     36
C*    DOCUMENTATION; OR                                                *RIGHTE     37
C*                                                                     *RIGHTE     38
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     39
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     40
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     41
C*                                                                     *RIGHTE     42
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     43
C* THEREOF.                                                            *RIGHTE     44
C*                                                                     *RIGHTE     45
C***********************************************************************RIGHTE     46
      SUBROUTINE CASE(PARAM,LENPAR,LDUMP,NCAS,KDEB,LFEPRI,KLAYER)       CASE        3
CD                                                                      CASE        4
CD    THIS IS THE MAIN DRIVER FOR THE "CASE" COMMAND THAT ALLOWS THE    CASE        5
CD    USER TO ALTER THE DEFAULT PROGRAM CONTROL PARAMETERS.             CASE        6
CD                                                                      CASE        7
C---------------------------------------------------------------------- CASE        8
      INCLUDE 'CNLSTA.INS'                                              CASE        9
C---------------------------------------------------------------------- CASE       10
C                                                                       CASE       11
      INCLUDE 'PARX.INS'                                                CASE       12
      INCLUDE 'CNB0.INS'                                                CASE       13
      INCLUDE 'CNB4.INS'                                                CASE       14
      INCLUDE 'CNPT.INS'                                                CASE       15
      INCLUDE 'CNB19.INS'                                               CASE       16
      INCLUDE 'CNUNIT.INS'                                              CASE       17
      INCLUDE 'CNIMPR.INS'                                              CASE       18
      INCLUDE 'CNPARX.INS'                                              CASE       19
      INCLUDE 'CNFLAG.INS'                                              CASE       20
      INCLUDE 'CNULTC.INS'                                              CASE       21
      INCLUDE 'CNMSG.INS'                                               CASE       22
C                                                                       CASE       23
      CHARACTER*15 AULTC(2)                                             CASE       24
      CHARACTER*43 ASYSPR(2)                                            CASE       25
      CHARACTER*50 PARAM                                                CASE       26
      CHARACTER*80 PMSG,STRING,TITLE(6)                                 CASE       27
      CHARACTER*7 SUBPMT                                                CASE       28
      CHARACTER*3 YESNO(2),HLPKEY,YESNO1,YESNO2                         CASE       29
C                                                                       CASE       30
      EQUIVALENCE (ITITLE(1,1),TITLE(1))                                CASE       31
C                                                                       CASE       32
      DATA AULTC/'      ITERATION','REFACTORIZATION'/                   CASE       33
      DATA ASYSPR/'PRINT WHENEVER THERE IS AUTOMATIC SWITCHING',        CASE       34
     *            '            PRINT AT END OF SIMULATION ONLY'/        CASE       35
C                                                                       CASE       36
      DATA YESNO/' NO','YES'/                                           CASE       37
C                                                                       CASE       38
      SUBPMT='  CASE '                                                  CASE       39
C                                                                       CASE       40
      LDEB=.FALSE.                                                      CASE       41
C                                                                       CASE       42
 15   CONTINUE                                                          CASE       43
      IF(IBGSTA.NE.0)THEN                                               CASE       44
        YESNO1=YESNO(1)                                                 CASE       45
      ELSE                                                              CASE       46
        YESNO1=YESNO(2)                                                 CASE       47
      ENDIF                                                             CASE       48
      IF(IHOOK.NE.0)THEN                                                CASE       49
        YESNO2=YESNO(1)                                                 CASE       50
      ELSE                                                              CASE       51
        YESNO2=YESNO(2)                                                 CASE       52
      ENDIF                                                             CASE       53
        WRITE(LOUT,1000) YESNO1,YESNO2                                  CASE       54
C    ..........................................................         CASE       55
C    :GET ACTIVITY TO BE PERFORMED                            :         CASE       56
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE       57
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'CAS',STRING,RECORD,     CASE       58
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE       59
      IF(JERR.LT.0)THEN                                                 CASE       60
      IF(PLAYBA)CALL PSTOP                                              CASE       61
      GOTO 15                                                           CASE       62
      ENDIF                                                             CASE       63
      IF(KLAYER.LT.0) RETURN                                            CASE       64
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 800             CASE       65
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE       66
      IF((NTYPE.LE.0).OR.(NTYPE.GT.7).OR.IOS.NE.0) THEN                 CASE       67
      IF(PLAYBA)CALL PSTOP                                              CASE       68
      GOTO 15                                                           CASE       69
      ENDIF                                                             CASE       70
C    :........................................................:         CASE       71
C                                                                       CASE       72
C        TITLE   BASE  ALGEB   DIFF  STABC  IBGSTA   HOOK   NOT USED    CASE       73
      GOTO(100,   200,   300,   600,   400,    700,   750,       500,   CASE       74
C                                                                       CASE       75
C     NOT USED                                                          CASE       76
     1     900) NTYPE                                                   CASE       77
C                                                                       CASE       78
C                                                                       CASE       79
C    ..........................................................         CASE       80
C    :TITLE                                                   :         CASE       81
                                                                        CASE       82
 100  CONTINUE                                                          CASE       83
C                                                                       CASE       84
      WRITE(LOUT,1020) (I,TITLE(I),I=1,6)                               CASE       85
C                                                                       CASE       86
C    :GET ITEM TO BE CHANGED                                   :        CASE       87
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE       88
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'C01',STRING,RECORD,     CASE       89
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE       90
      IF(JERR.LT.0)THEN                                                 CASE       91
      IF(PLAYBA)CALL PSTOP                                              CASE       92
      GOTO 100                                                          CASE       93
      ENDIF                                                             CASE       94
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE       95
      IF(KLAYER.EQ.-2) THEN                                             CASE       96
      KLAYER=0                                                          CASE       97
      RETURN                                                            CASE       98
      ENDIF                                                             CASE       99
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      100
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      101
      IF ((NTYPE.LE.0).OR.(NTYPE.GT.6).OR.IOS.NE.0) THEN                CASE      102
      IF(PLAYBA)CALL PSTOP                                              CASE      103
      GOTO 100                                                          CASE      104
      ENDIF                                                             CASE      105
C                                                                       CASE      106
 110  CONTINUE                                                          CASE      107
      WRITE(LOUT,*)                                                     CASE      108
      PMSG='ENTER THE NEW TITLE:'                                       CASE      109
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C01',STRING,RECORD,     CASE      110
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      111
      IF(JERR.LT.0)THEN                                                 CASE      112
      IF(PLAYBA)CALL PSTOP                                              CASE      113
      GOTO 110                                                          CASE      114
      ENDIF                                                             CASE      115
      IF(KLAYER.EQ.-1) GOTO 100                                         CASE      116
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      117
C                                                                       CASE      118
      READ(STRING,'(A80)') TITLE(NTYPE)                                 CASE      119
C                                                                       CASE      120
      GOTO 100                                                          CASE      121
C    :........................................................:         CASE      122
C                                                                       CASE      123
C                                                                       CASE      124
 200  CONTINUE                                                          CASE      125
      WRITE(LOUT,1030) BASPC,FQBASE,XCMMX                               CASE      126
C                                                                       CASE      127
C    ..........................................................         CASE      128
C    :GET ITEM TO BE CHANGED                                   :        CASE      129
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE      130
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'C99',STRING,RECORD,     CASE      131
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      132
      IF(JERR.LT.0)THEN                                                 CASE      133
      IF(PLAYBA)CALL PSTOP                                              CASE      134
      GOTO 200                                                          CASE      135
      ENDIF                                                             CASE      136
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE      137
      IF(KLAYER.EQ.-2) THEN                                             CASE      138
       KLAYER=0                                                         CASE      139
       RETURN                                                           CASE      140
      ENDIF                                                             CASE      141
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      142
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      143
      IF ((NTYPE.LE.0).OR.(NTYPE.GT.3).OR.IOS.NE.0) THEN                CASE      144
      IF(PLAYBA)CALL PSTOP                                              CASE      145
      GOTO 200                                                          CASE      146
      ELSE                                                              CASE      147
        IF (NTYPE.EQ.1) THEN                                            CASE      148
           HLPKEY='C02'                                                 CASE      149
        ELSE IF (NTYPE.EQ.2) THEN                                       CASE      150
           HLPKEY='C03'                                                 CASE      151
        ELSE                                                            CASE      152
           HLPKEY='C04'                                                 CASE      153
        END IF                                                          CASE      154
      END IF                                                            CASE      155
C                                                                       CASE      156
      IF(NTYPE.EQ.1)THEN                                                CASE      157
        IF(LFREAD)THEN                                                  CASE      158
          WRITE(MSG(1),2100)                                            CASE      159
          CALL PRTMSG(1)                                                CASE      160
          GOTO 200                                                      CASE      161
        ENDIF                                                           CASE      162
      ENDIF                                                             CASE      163
C                                                                       CASE      164
      IF(DYREAD)THEN                                                    CASE      165
        WRITE(MSG(1),2200)                                              CASE      166
        CALL PRTMSG(1)                                                  CASE      167
        GOTO 200                                                        CASE      168
      ENDIF                                                             CASE      169
C                                                                       CASE      170
 210  CONTINUE                                                          CASE      171
      WRITE(LOUT,*)                                                     CASE      172
      PMSG='ENTER THE NEW VALUE:'                                       CASE      173
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,HLPKEY,STRING,RECORD,    CASE      174
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      175
      IF(JERR.LT.0)THEN                                                 CASE      176
      IF(PLAYBA)CALL PSTOP                                              CASE      177
      GOTO 210                                                          CASE      178
      ENDIF                                                             CASE      179
      IF(KLAYER.EQ.-1) GOTO 200                                         CASE      180
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      181
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 200             CASE      182
C    :........................................................:         CASE      183
C                                                                       CASE      184
      GOTO (220,230,240)NTYPE                                           CASE      185
C    ..........................................................         CASE      186
C    : MVA BASE                                               :         CASE      187
 220  CONTINUE                                                          CASE      188
      READ(STRING,*,IOSTAT=IOS) BASPC                                   CASE      189
      IF((BASPC.LE.0.0).OR.(BASPC.GT.9999.0).OR.IOS.NE.0) THEN          CASE      190
         WRITE(LOUT,1050)                                               CASE      191
         IF(PLAYBA)CALL PSTOP                                           CASE      192
         GOTO 210                                                       CASE      193
      ENDIF                                                             CASE      194
      GOTO 200                                                          CASE      195
C    :........................................................:         CASE      196
C    ..........................................................         CASE      197
C    : FREQUENCY BASE                                         :         CASE      198
 230  CONTINUE                                                          CASE      199
      READ(STRING,*,IOSTAT=IOS) FQBASE                                  CASE      200
      IF((FQBASE.LE.0.0).OR.(FQBASE.GT.9999.0).OR.IOS.NE.0) THEN        CASE      201
         WRITE(LOUT,1051)                                               CASE      202
         IF(PLAYBA)CALL PSTOP                                           CASE      203
         GOTO 210                                                       CASE      204
      ENDIF                                                             CASE      205
      WOBASE=FQBASE*4.0/PI                                              CASE      206
      GOTO 200                                                          CASE      207
C    :........................................................:         CASE      208
C    ..........................................................         CASE      209
C    : GENERATION NETTING                                     :         CASE      210
 240  CONTINUE                                                          CASE      211
      READ(STRING,*,IOSTAT=IOS)XCMMX                                    CASE      212
      IF(IOS.NE.0)THEN                                                  CASE      213
      IF(PLAYBA)CALL PSTOP                                              CASE      214
      GOTO 210                                                          CASE      215
      ENDIF                                                             CASE      216
      GOTO 200                                                          CASE      217
C    :........................................................:         CASE      218
C                                                                       CASE      219
 300  CONTINUE                                                          CASE      220
      WRITE(LOUT,1060) MPRITE,MAXIT,ERTOL,VTHZL,VTHZH,ZILTOL            CASE      221
     *                ,AULTC(NREFUC+1),MULTSW,NIMLVT                    CASE      222
C    ..........................................................         CASE      223
C    :GET ITEM TO BE CHANGE                                   :         CASE      224
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE      225
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'C99',STRING,RECORD,     CASE      226
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      227
      IF(JERR.LT.0)THEN                                                 CASE      228
      IF(PLAYBA)CALL PSTOP                                              CASE      229
      GOTO 300                                                          CASE      230
      ENDIF                                                             CASE      231
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE      232
      IF(KLAYER.EQ.-2) THEN                                             CASE      233
       KLAYER=0                                                         CASE      234
       RETURN                                                           CASE      235
      ENDIF                                                             CASE      236
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      237
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      238
      IF ((NTYPE.LE.0).OR.(NTYPE.GT.9).OR.IOS.NE.0)THEN                 CASE      239
      IF(PLAYBA)CALL PSTOP                                              CASE      240
      GOTO 300                                                          CASE      241
      ENDIF                                                             CASE      242
C                                                                       CASE      243
      IF (NTYPE.LE.3) THEN                                              CASE      244
         IF (LINIT) THEN                                                CASE      245
            WRITE(MSG(1),2310)                                          CASE      246
            CALL PRTMSG(1)                                              CASE      247
            GOTO 300                                                    CASE      248
        END IF                                                          CASE      249
      ELSE IF (NTYPE.LE.6) THEN                                         CASE      250
        IF (LRRESD) THEN                                                CASE      251
           WRITE(MSG(1),2360)                                           CASE      252
           CALL PRTMSG(1)                                               CASE      253
           GOTO 300                                                     CASE      254
        END IF                                                          CASE      255
      END IF                                                            CASE      256
C    :........................................................:         CASE      257
C                                                                       CASE      258
      GOTO (320,330,350,360,370,380,390,395,397) NTYPE                  CASE      259
C    ..........................................................         CASE      260
C    :MPRITE                                                  :         CASE      261
 320  CONTINUE                                                          CASE      262
      WRITE(LOUT,*)                                                     CASE      263
      PMSG='ENTER THE NEW VALUE:'                                       CASE      264
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C05',STRING,RECORD,     CASE      265
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      266
      IF(JERR.LT.0)THEN                                                 CASE      267
      IF(PLAYBA)CALL PSTOP                                              CASE      268
      GOTO 320                                                          CASE      269
      ENDIF                                                             CASE      270
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      271
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      272
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      273
      READ(STRING,*,IOSTAT=IOS) MPRITE                                  CASE      274
      IF(IOS.NE.0)THEN                                                  CASE      275
      IF(PLAYBA)CALL PSTOP                                              CASE      276
      GOTO 320                                                          CASE      277
      ENDIF                                                             CASE      278
      GOTO 300                                                          CASE      279
C    :........................................................:         CASE      280
C    ..........................................................         CASE      281
C    :MAXIT                                                  :          CASE      282
 330  CONTINUE                                                          CASE      283
      WRITE(LOUT,*)                                                     CASE      284
      PMSG='ENTER THE NEW VALUE:'                                       CASE      285
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C06',STRING,RECORD,     CASE      286
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      287
      IF(JERR.LT.0)THEN                                                 CASE      288
      IF(PLAYBA)CALL PSTOP                                              CASE      289
      GOTO 330                                                          CASE      290
      ENDIF                                                             CASE      291
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      292
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      293
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      294
      READ(STRING,*,IOSTAT=IOS) MAXIT                                   CASE      295
      IF(IOS.NE.0)THEN                                                  CASE      296
      IF(PLAYBA)CALL PSTOP                                              CASE      297
      GOTO 330                                                          CASE      298
      ENDIF                                                             CASE      299
      GOTO 300                                                          CASE      300
C    :........................................................:         CASE      301
C    ..........................................................         CASE      302
C    :VCTOLE                                                  :         CASE      303
 350  CONTINUE                                                          CASE      304
      WRITE(LOUT,*)                                                     CASE      305
      PMSG='ENTER THE NEW VALUE:'                                       CASE      306
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C07',STRING,RECORD,     CASE      307
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      308
      IF(JERR.LT.0)THEN                                                 CASE      309
      IF(PLAYBA)CALL PSTOP                                              CASE      310
      GOTO 350                                                          CASE      311
      ENDIF                                                             CASE      312
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      313
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      314
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      315
      READ(STRING,*,IOSTAT=IOS) ERTOL                                   CASE      316
      IF(IOS.NE.0)THEN                                                  CASE      317
      IF(PLAYBA)CALL PSTOP                                              CASE      318
      GOTO 350                                                          CASE      319
      ENDIF                                                             CASE      320
      GOTO 300                                                          CASE      321
C    :........................................................:         CASE      322
C    ..........................................................         CASE      323
C    :LTHVOL                                                  :         CASE      324
 360  CONTINUE                                                          CASE      325
      WRITE(LOUT,*)                                                     CASE      326
      PMSG='ENTER THE NEW VALUE:'                                       CASE      327
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C08',STRING,RECORD,     CASE      328
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      329
      IF(JERR.LT.0)THEN                                                 CASE      330
      IF(PLAYBA)CALL PSTOP                                              CASE      331
      GOTO 360                                                          CASE      332
      ENDIF                                                             CASE      333
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      334
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      335
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      336
      READ(STRING,*,IOSTAT=IOS) VTHZL                                   CASE      337
      IF(IOS.NE.0)THEN                                                  CASE      338
      IF(PLAYBA)CALL PSTOP                                              CASE      339
      GOTO 360                                                          CASE      340
      ENDIF                                                             CASE      341
      GOTO 300                                                          CASE      342
C    :........................................................:         CASE      343
C    ..........................................................         CASE      344
C    : HTHVOL                                                  :        CASE      345
 370  CONTINUE                                                          CASE      346
      WRITE(LOUT,*)                                                     CASE      347
      PMSG='ENTER THE NEW VALUE:'                                       CASE      348
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C09',STRING,RECORD,     CASE      349
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      350
      IF(JERR.LT.0)THEN                                                 CASE      351
      IF(PLAYBA)CALL PSTOP                                              CASE      352
      GOTO 370                                                          CASE      353
      ENDIF                                                             CASE      354
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      355
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      356
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      357
      READ(STRING,*,IOSTAT=IOS) VTHZH                                   CASE      358
      IF(IOS.NE.0)THEN                                                  CASE      359
      IF(PLAYBA)CALL PSTOP                                              CASE      360
      GOTO 370                                                          CASE      361
      ENDIF                                                             CASE      362
      GOTO 300                                                          CASE      363
C    :........................................................:         CASE      364
C    ..........................................................         CASE      365
C    :ZILTOL                                                  :         CASE      366
 380  CONTINUE                                                          CASE      367
      WRITE(LOUT,*)                                                     CASE      368
      PMSG='ENTER THE NEW VALUE:'                                       CASE      369
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C10',STRING,RECORD,     CASE      370
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      371
      IF(JERR.LT.0)THEN                                                 CASE      372
      IF(PLAYBA)CALL PSTOP                                              CASE      373
      GOTO 380                                                          CASE      374
      ENDIF                                                             CASE      375
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      376
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      377
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      378
      READ(STRING,*,IOSTAT=IOS) ZILTOL                                  CASE      379
      IF(IOS.NE.0)THEN                                                  CASE      380
      IF(PLAYBA)CALL PSTOP                                              CASE      381
      GOTO 380                                                          CASE      382
      ENDIF                                                             CASE      383
      GOTO 300                                                          CASE      384
C    :........................................................:         CASE      385
C    ..........................................................         CASE      386
C    :NREFUC                                                  :         CASE      387
 390  CONTINUE                                                          CASE      388
      NREFUC=MOD(NREFUC+1,2)                                            CASE      389
      GOTO 300                                                          CASE      390
C    ..........................................................         CASE      391
C    :MULTSW                                                  :         CASE      392
 395  CONTINUE                                                          CASE      393
      WRITE(LOUT,*)                                                     CASE      394
      PMSG='ENTER THE NEW VALUE:'                                       CASE      395
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'XXX',STRING,RECORD,     CASE      396
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      397
      IF(JERR.LT.0)THEN                                                 CASE      398
      IF(PLAYBA)CALL PSTOP                                              CASE      399
      GOTO 395                                                          CASE      400
      ENDIF                                                             CASE      401
      IF(KLAYER.EQ.-1) GOTO 300                                         CASE      402
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      403
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300             CASE      404
      READ(STRING,*,IOSTAT=IOS) MULTSW                                  CASE      405
      IF(IOS.NE.0)THEN                                                  CASE      406
      IF(PLAYBA)CALL PSTOP                                              CASE      407
      GOTO 395                                                          CASE      408
      ENDIF                                                             CASE      409
      GOTO 300                                                          CASE      410
C    :........................................................:         CASE      411
C    ..........................................................         CASE      412
C    :NIMLVT                                                  :         CASE      413
 397  CONTINUE                                                          CASE      414
      WRITE(LOUT,*)                                                     CASE      415
      PMSG='ENTER THE NEW VALUE:'                                       CASE      416
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,'C25',STRING,RECORD,     CASE      417
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      418
      IF (JERR.LT.0)THEN                                                CASE      419
      IF(PLAYBA)CALL PSTOP                                              CASE      420
      GOTO 397                                                          CASE      421
      ENDIF                                                             CASE      422
      IF (KLAYER.EQ.-1) GOTO 300                                        CASE      423
      IF (KLAYER.EQ.-2) GOTO 15                                         CASE      424
      IF (STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 300            CASE      425
      READ(STRING,*,IOSTAT=IOS) NIMLVT                                  CASE      426
      IF (IOS.NE.0.OR.NIMLVT.LT.1) THEN                                 CASE      427
         WRITE(LOUT,*)                                                  CASE      428
         WRITE(LOUT,*)                                                  CASE      429
     *   ' *** ERROR THE VALUE MUST BE AN INTEGER GREATER THAN ZERO'    CASE      430
         WRITE(LOUT,*)                                                  CASE      431
         IF(PLAYBA)CALL PSTOP                                           CASE      432
         GOTO 397                                                       CASE      433
      END IF                                                            CASE      434
      GOTO 300                                                          CASE      435
C    :........................................................:         CASE      436
C                                                                       CASE      437
 400  CONTINUE                                                          CASE      438
C                                                                       CASE      439
      WRITE(LOUT,1070) ZDTOL,GVTMIN,GVTMAX,BUVMIN,BUVMAX,XMAXSD,TMIN    CASE      440
     & ,YESNO(MTFLAG+1)                                                 CASE      441
C    ..........................................................         CASE      442
C    :GET ITEM TO BE CHANGE                                   :         CASE      443
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE      444
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'C99',STRING,RECORD,     CASE      445
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      446
      IF(JERR.LT.0)THEN                                                 CASE      447
      IF(PLAYBA)CALL PSTOP                                              CASE      448
      GOTO 400                                                          CASE      449
      ENDIF                                                             CASE      450
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE      451
      IF(KLAYER.EQ.-2) THEN                                             CASE      452
       KLAYER=0                                                         CASE      453
       RETURN                                                           CASE      454
      ENDIF                                                             CASE      455
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      456
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      457
      IF (NTYPE.LE.0.OR.NTYPE.GT.8.OR.IOS.NE.0)THEN                     CASE      458
      IF(PLAYBA)CALL PSTOP                                              CASE      459
      GOTO 400                                                          CASE      460
      ENDIF                                                             CASE      461
C                                                                       CASE      462
      IF (NTYPE.LE.7) THEN                                              CASE      463
         IF (LINIT) THEN                                                CASE      464
            WRITE(MSG(1),2310)                                          CASE      465
            CALL PRTMSG(1)                                              CASE      466
            GOTO 400                                                    CASE      467
         END IF                                                         CASE      468
         IF (NTYPE.EQ.1) THEN                                           CASE      469
            HLPKEY='C17'                                                CASE      470
         ELSE IF (NTYPE.EQ.2) THEN                                      CASE      471
            HLPKEY='C18'                                                CASE      472
         ELSE IF (NTYPE.EQ.3) THEN                                      CASE      473
            HLPKEY='C19'                                                CASE      474
         ELSE IF (NTYPE.EQ.4) THEN                                      CASE      475
            HLPKEY='C20'                                                CASE      476
         ELSE IF (NTYPE.EQ.5) THEN                                      CASE      477
            HLPKEY='C21'                                                CASE      478
         ELSE IF (NTYPE.EQ.6) THEN                                      CASE      479
            HLPKEY='C22'                                                CASE      480
         ELSE IF (NTYPE.EQ.7) THEN                                      CASE      481
            HLPKEY='C23'                                                CASE      482
         END IF                                                         CASE      483
      ELSE IF (NTYPE.EQ.8) THEN                                         CASE      484
         IF (DYREAD) THEN                                               CASE      485
            WRITE(MSG(1),2200)                                          CASE      486
            CALL PRTMSG(1)                                              CASE      487
            GOTO 400                                                    CASE      488
         ELSE                                                           CASE      489
            GOTO 490                                                    CASE      490
         END IF                                                         CASE      491
      END IF                                                            CASE      492
C                                                                       CASE      493
C                                                                       CASE      494
 410  CONTINUE                                                          CASE      495
      WRITE(LOUT,*)                                                     CASE      496
      PMSG='ENTER THE NEW VALUE:'                                       CASE      497
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,HLPKEY,STRING,RECORD,    CASE      498
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      499
      IF(JERR.LT.0)THEN                                                 CASE      500
      IF(PLAYBA)CALL PSTOP                                              CASE      501
       GOTO 410                                                         CASE      502
      ENDIF                                                             CASE      503
      IF(KLAYER.EQ.-1) GOTO 400                                         CASE      504
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      505
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 400             CASE      506
C    :........................................................:         CASE      507
C                                                                       CASE      508
      GOTO (420,430,440,450,460,470,480)NTYPE                           CASE      509
C    ..........................................................         CASE      510
C    :ZDTOL                                                   :         CASE      511
 420  CONTINUE                                                          CASE      512
      READ(STRING,*,IOSTAT=IOS) ZDTOL                                   CASE      513
      IF(IOS.NE.0)THEN                                                  CASE      514
      IF(PLAYBA)CALL PSTOP                                              CASE      515
      GOTO 410                                                          CASE      516
      ENDIF                                                             CASE      517
      GOTO 400                                                          CASE      518
C    :........................................................:         CASE      519
                                                                        CASE      520
C    ..........................................................         CASE      521
C    :GVTMIN                                                  :         CASE      522
 430  CONTINUE                                                          CASE      523
      READ(STRING,*,IOSTAT=IOS) GVTMIN                                  CASE      524
      IF(IOS.NE.0)THEN                                                  CASE      525
      IF(PLAYBA)CALL PSTOP                                              CASE      526
      GOTO 410                                                          CASE      527
      ENDIF                                                             CASE      528
      GOTO 400                                                          CASE      529
C    :........................................................:         CASE      530
                                                                        CASE      531
C    ..........................................................         CASE      532
C    :GVTMAX                                                  :         CASE      533
 440  CONTINUE                                                          CASE      534
      READ(STRING,*,IOSTAT=IOS) GVTMAX                                  CASE      535
      IF(IOS.NE.0)THEN                                                  CASE      536
      IF(PLAYBA)CALL PSTOP                                              CASE      537
      GOTO 410                                                          CASE      538
      ENDIF                                                             CASE      539
      GOTO 400                                                          CASE      540
C    :........................................................:         CASE      541
                                                                        CASE      542
C    ..........................................................         CASE      543
C    :BUVMIN                                                  :         CASE      544
 450  CONTINUE                                                          CASE      545
      READ(STRING,*,IOSTAT=IOS) BUVMIN                                  CASE      546
      IF(IOS.NE.0)THEN                                                  CASE      547
      IF(PLAYBA)CALL PSTOP                                              CASE      548
      GOTO 410                                                          CASE      549
      ENDIF                                                             CASE      550
      GOTO 400                                                          CASE      551
C    :........................................................:         CASE      552
                                                                        CASE      553
C    ..........................................................         CASE      554
C    :BUVMAX                                                  :         CASE      555
 460  CONTINUE                                                          CASE      556
      READ(STRING,*,IOSTAT=IOS) BUVMAX                                  CASE      557
      IF(IOS.NE.0)THEN                                                  CASE      558
      IF(PLAYBA)CALL PSTOP                                              CASE      559
      GOTO 410                                                          CASE      560
      ENDIF                                                             CASE      561
      GOTO 400                                                          CASE      562
C    :........................................................:         CASE      563
                                                                        CASE      564
C    ..........................................................         CASE      565
C    :XMAXSD                                                  :         CASE      566
 470  CONTINUE                                                          CASE      567
      READ(STRING,*,IOSTAT=IOS) XMAXSD                                  CASE      568
      IF(IOS.NE.0)THEN                                                  CASE      569
      IF(PLAYBA)CALL PSTOP                                              CASE      570
      GOTO 410                                                          CASE      571
      ENDIF                                                             CASE      572
      GOTO 400                                                          CASE      573
C    :........................................................:         CASE      574
C                                                                       CASE      575
C    ..........................................................         CASE      576
C    :TMIN                                                    :         CASE      577
 480  CONTINUE                                                          CASE      578
      READ(STRING,*,IOSTAT=IOS) TMIN                                    CASE      579
      IF(IOS.NE.0)THEN                                                  CASE      580
      IF(PLAYBA)CALL PSTOP                                              CASE      581
      GOTO 410                                                          CASE      582
      ENDIF                                                             CASE      583
      GOTO 400                                                          CASE      584
 490  CONTINUE                                                          CASE      585
      MTFLAG=MOD(MTFLAG+1,2)                                            CASE      586
      GOTO 400                                                          CASE      587
C    :........................................................:         CASE      588
C                                                                       CASE      589
 500  CONTINUE                                                          CASE      590
      WRITE(LOUT,1090) ISPEED,KSALI,ISKIP                               CASE      591
C                                                                       CASE      592
C    ..........................................................         CASE      593
C    :GET ITEM TO BE CHANGE                                   :         CASE      594
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE      595
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'XXX',STRING,RECORD,     CASE      596
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      597
      IF(JERR.LT.0)THEN                                                 CASE      598
      IF(PLAYBA)CALL PSTOP                                              CASE      599
      GOTO 500                                                          CASE      600
      ENDIF                                                             CASE      601
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE      602
      IF(KLAYER.EQ.-2) THEN                                             CASE      603
       KLAYER=0                                                         CASE      604
       RETURN                                                           CASE      605
      ENDIF                                                             CASE      606
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      607
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      608
      IF((NTYPE.LE.0).OR.(NTYPE.GT.3).OR.IOS.NE.0) THEN                 CASE      609
         IF(PLAYBA)CALL PSTOP                                           CASE      610
         GOTO 500                                                       CASE      611
      ENDIF                                                             CASE      612
C    :........................................................:         CASE      613
      GOTO(520,530,540) NTYPE                                           CASE      614
C    ..........................................................         CASE      615
C    :ISPEED                                                  :         CASE      616
 520  CONTINUE                                                          CASE      617
      PMSG(1:34)='Enter the new value of ISPEED:'                       CASE      618
      CALL REDLIN(LOUT,LIN,JERR,34,PMSG,SUBPMT,'XXX',STRING,RECORD,     CASE      619
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      620
      IF(JERR.LT.0)THEN                                                 CASE      621
      IF(PLAYBA)CALL PSTOP                                              CASE      622
      GOTO 520                                                          CASE      623
      ENDIF                                                             CASE      624
      IF(KLAYER.EQ.-1) GOTO 500                                         CASE      625
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      626
      READ(STRING,*,IOSTAT=IOS) ISPEED                                  CASE      627
      IF(IOS.NE.0)THEN                                                  CASE      628
      IF(PLAYBA)CALL PSTOP                                              CASE      629
      GOTO 520                                                          CASE      630
      ENDIF                                                             CASE      631
      GOTO 500                                                          CASE      632
C    :........................................................:         CASE      633
                                                                        CASE      634
C    ..........................................................         CASE      635
C    :KSALI                                                  :          CASE      636
 530  CONTINUE                                                          CASE      637
      PMSG(1:34)='Enter the new value of KSALI:'                        CASE      638
      CALL REDLIN(LOUT,LIN,JERR,34,PMSG,SUBPMT,'XXX',STRING,RECORD,     CASE      639
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      640
      IF(JERR.LT.0)THEN                                                 CASE      641
      IF(PLAYBA)CALL PSTOP                                              CASE      642
      GOTO 530                                                          CASE      643
      ENDIF                                                             CASE      644
      IF(KLAYER.EQ.-1) GOTO 500                                         CASE      645
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      646
      READ(STRING,*,IOSTAT=IOS) KSALI                                   CASE      647
      IF(IOS.NE.0)THEN                                                  CASE      648
      IF(PLAYBA)CALL PSTOP                                              CASE      649
      GOTO 530                                                          CASE      650
      ENDIF                                                             CASE      651
      GOTO 500                                                          CASE      652
C    :........................................................:         CASE      653
                                                                        CASE      654
C    ..........................................................         CASE      655
C    :ISKIP                                                  :          CASE      656
 540  CONTINUE                                                          CASE      657
      PMSG(1:33)='Enter the new value of ISKIP:'                        CASE      658
      CALL REDLIN(LOUT,LIN,JERR,33,PMSG,SUBPMT,'XXX',STRING,RECORD,     CASE      659
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      660
      IF(JERR.LT.0)THEN                                                 CASE      661
      IF(PLAYBA)CALL PSTOP                                              CASE      662
      GOTO 540                                                          CASE      663
      ENDIF                                                             CASE      664
      IF(KLAYER.EQ.-1) GOTO 500                                         CASE      665
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      666
      READ(STRING,*,IOSTAT=IOS) ISKIP                                   CASE      667
      IF(IOS.NE.0)THEN                                                  CASE      668
      IF(PLAYBA)CALL PSTOP                                              CASE      669
      GOTO 540                                                          CASE      670
      ENDIF                                                             CASE      671
      GOTO 500                                                          CASE      672
C    :........................................................:         CASE      673
C                                                                       CASE      674
C                                                                       CASE      675
 600  CONTINUE                                                          CASE      676
      WRITE(LOUT,2010) MAXNIT,IJMCT,RESTOL,TVAPDC,DTMIN                 CASE      677
C    ..........................................................         CASE      678
C    :GET ITEM TO BE CHANGE                                   :         CASE      679
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE      680
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'C99',STRING,RECORD,     CASE      681
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      682
      IF(JERR.LT.0)THEN                                                 CASE      683
      IF(PLAYBA)CALL PSTOP                                              CASE      684
      GOTO 600                                                          CASE      685
      ENDIF                                                             CASE      686
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE      687
      IF(KLAYER.EQ.-2) THEN                                             CASE      688
       KLAYER=0                                                         CASE      689
       RETURN                                                           CASE      690
      ENDIF                                                             CASE      691
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      692
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      693
      IF (NTYPE.LE.0.OR.NTYPE.GT.5.OR.IOS.NE.0)THEN                     CASE      694
      IF(PLAYBA)CALL PSTOP                                              CASE      695
      GOTO 600                                                          CASE      696
      ENDIF                                                             CASE      697
C                                                                       CASE      698
      IF (NTYPE.EQ.1) THEN                                              CASE      699
         HLPKEY='C12'                                                   CASE      700
      ELSE IF (NTYPE.EQ.2) THEN                                         CASE      701
         HLPKEY='C13'                                                   CASE      702
      ELSE IF (NTYPE.EQ.3) THEN                                         CASE      703
         HLPKEY='C14'                                                   CASE      704
      ELSE IF (NTYPE.EQ.4) THEN                                         CASE      705
         HLPKEY='C15'                                                   CASE      706
      ELSE IF (NTYPE.EQ.5) THEN                                         CASE      707
         IF (DYREAD) THEN                                               CASE      708
            WRITE(MSG(1),2200)                                          CASE      709
            CALL PRTMSG(1)                                              CASE      710
            GOTO 600                                                    CASE      711
         END IF                                                         CASE      712
         HLPKEY='C16'                                                   CASE      713
      END IF                                                            CASE      714
C                                                                       CASE      715
 610  CONTINUE                                                          CASE      716
      WRITE(LOUT,*)                                                     CASE      717
      PMSG='ENTER THE NEW VALUE:'                                       CASE      718
      CALL REDLIN(LOUT,LIN,JERR,20,PMSG,SUBPMT,HLPKEY,STRING,RECORD,    CASE      719
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      720
      IF(JERR.LT.0)THEN                                                 CASE      721
      IF(PLAYBA)CALL PSTOP                                              CASE      722
      GOTO 610                                                          CASE      723
      ENDIF                                                             CASE      724
      IF(KLAYER.EQ.-1) GOTO 600                                         CASE      725
      IF(KLAYER.EQ.-2) GOTO 15                                          CASE      726
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 600             CASE      727
C    :........................................................:         CASE      728
C                                                                       CASE      729
      GOTO (620,630,640,650,660) NTYPE                                  CASE      730
C    ..........................................................         CASE      731
C    :MAXNIT                                                  :         CASE      732
 620  CONTINUE                                                          CASE      733
      READ(STRING,*,IOSTAT=IOS) MAXNIT                                  CASE      734
      IF(IOS.NE.0)THEN                                                  CASE      735
      IF(PLAYBA)CALL PSTOP                                              CASE      736
      GOTO 610                                                          CASE      737
      ENDIF                                                             CASE      738
      GOTO 600                                                          CASE      739
C    :........................................................:         CASE      740
C                                                                       CASE      741
C    ..........................................................         CASE      742
C    :IJMCT                                                   :         CASE      743
 630  CONTINUE                                                          CASE      744
      READ(STRING,*,IOSTAT=IOS) IJMCT                                   CASE      745
      IF(IOS.NE.0)THEN                                                  CASE      746
      IF(PLAYBA)CALL PSTOP                                              CASE      747
      GOTO 610                                                          CASE      748
      ENDIF                                                             CASE      749
      GOTO 600                                                          CASE      750
C    :........................................................:         CASE      751
C                                                                       CASE      752
C    ..........................................................         CASE      753
C    :RESTOL                                                  :         CASE      754
 640  CONTINUE                                                          CASE      755
      READ(STRING,*,IOSTAT=IOS) RESTOL                                  CASE      756
      IF(IOS.NE.0)THEN                                                  CASE      757
      IF(PLAYBA)CALL PSTOP                                              CASE      758
      GOTO 610                                                          CASE      759
      ENDIF                                                             CASE      760
      GOTO 600                                                          CASE      761
C    :........................................................:         CASE      762
C                                                                       CASE      763
C    ..........................................................         CASE      764
C    :TVAPDC                                                  :         CASE      765
 650  CONTINUE                                                          CASE      766
      READ(STRING,*,IOSTAT=IOS) TVAPDC                                  CASE      767
      IF(IOS.NE.0)THEN                                                  CASE      768
      IF(PLAYBA)CALL PSTOP                                              CASE      769
      GOTO 610                                                          CASE      770
      ENDIF                                                             CASE      771
      GOTO 600                                                          CASE      772
C    :........................................................:         CASE      773
C                                                                       CASE      774
C    ..........................................................         CASE      775
C    :DTMIN                                                   :         CASE      776
 660  CONTINUE                                                          CASE      777
      READ(STRING,*,IOSTAT=IOS) DTMIN                                   CASE      778
      IF(IOS.NE.0)THEN                                                  CASE      779
      IF(PLAYBA)CALL PSTOP                                              CASE      780
      GOTO 610                                                          CASE      781
      ENDIF                                                             CASE      782
      GOTO 600                                                          CASE      783
C    :........................................................:         CASE      784
 700  IF(IBGSTA.NE.0)THEN                                               CASE      785
        NGSREC=-IBGSTA                                                  CASE      786
        IF(NGSREC.LT.0)NGSREC=0                                         CASE      787
        IBGSTA=0                                                        CASE      788
      ELSE                                                              CASE      789
        IBGSTA=-NGSREC                                                  CASE      790
        IF(IBGSTA.EQ.0)IBGSTA=1                                         CASE      791
        NGSREC=0                                                        CASE      792
      ENDIF                                                             CASE      793
      GOTO 15                                                           CASE      794
 750  IF(IHOOK.EQ.0)THEN                                                CASE      795
      IHOOK=99                                                          CASE      796
      ELSE                                                              CASE      797
      IHOOK=0                                                           CASE      798
      ENDIF                                                             CASE      799
      GOTO 15                                                           CASE      800
C                                                                       CASE      801
 900  CONTINUE                                                          CASE      802
      WRITE(LOUT,2030) ASYSPR(NSMTCL+1),ASYSPR(NSMULC+1)                CASE      803
C    ..........................................................         CASE      804
C    :GET ITEM TO BE CHANGE                                   :         CASE      805
      PMSG='SELECT AN ITEM BY THE NUMBER (Q TO QUIT):'                  CASE      806
      CALL REDLIN(LOUT,LIN,JERR,41,PMSG,SUBPMT,'XXX',STRING,RECORD,     CASE      807
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    CASE      808
      IF(JERR.LT.0)THEN                                                 CASE      809
      IF(PLAYBA)CALL PSTOP                                              CASE      810
      GOTO 900                                                          CASE      811
      ENDIF                                                             CASE      812
      IF(KLAYER.EQ.-1) GOTO 15                                          CASE      813
      IF(KLAYER.EQ.-2) THEN                                             CASE      814
       KLAYER=0                                                         CASE      815
       RETURN                                                           CASE      816
      ENDIF                                                             CASE      817
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 15              CASE      818
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   CASE      819
      IF((NTYPE.LE.0).OR.(NTYPE.GT.2).OR.IOS.NE.0) THEN                 CASE      820
         IF(PLAYBA)CALL PSTOP                                           CASE      821
         GOTO 900                                                       CASE      822
      ENDIF                                                             CASE      823
C    :........................................................:         CASE      824
C                                                                       CASE      825
      GOTO (920,930) NTYPE                                              CASE      826
C    ..........................................................         CASE      827
C    :NSMTCL                                                  :         CASE      828
 920  CONTINUE                                                          CASE      829
      NSMTCL=MOD(NSMTCL+1,2)                                            CASE      830
      GOTO 900                                                          CASE      831
C    :........................................................:         CASE      832
C                                                                       CASE      833
C    ..........................................................         CASE      834
C    :NSMULC                                                  :         CASE      835
 930  CONTINUE                                                          CASE      836
      NSMULC=MOD(NSMULC+1,2)                                            CASE      837
      GOTO 900                                                          CASE      838
C    :........................................................:         CASE      839
C                                                                       CASE      840
 800  CONTINUE                                                          CASE      841
C    ..........................................................         CASE      842
C                                                                       CASE      843
      RETURN                                                            CASE      844
C                                                                       CASE      845
 1000 FORMAT(//,                                                        CASE      846
     17X,'SIMULATION CONTROL AND PARAMETER SETUP',/,                    CASE      847
     27X,'--------------------------------------',//,                   CASE      848
     33X,'(1) STUDY TITLES'/,                                           CASE      849
     43X,'(2) SYSTEM BASE QUANTITIES',/,                                CASE      850
     53X,'(3) PARAMETERS FOR SOLUTION OF ALGEBRAIC EQUATIONS',/,        CASE      851
     63X,'(4) PARAMETERS FOR SOLUTION OF DIFFERENTIAL EQUATIONS',/,     CASE      852
     73X,'(5) PARAMETERS FOR DATA AND STABILITY SANITY CHECKS',/,       CASE      853
     83X,'(6) CHECK GEN UNIT ID AND ASSIGN GENERATION FROM ',           CASE      854
     9    'LOAD FLOW - ',A3,/,                                          CASE      855
     A3X,'(7) ACTIVATE HOOK ROUTINE - ',A3,/)                           CASE      856
 1020 FORMAT(//,                                                        CASE      857
     1 7X,'THE CURRENT STUDY TITLES ARE:',/,                            CASE      858
     2 7X,'----------------------------',//,                            CASE      859
     3(3X,'(',I1,') ',A80),/)                                           CASE      860
 1030 FORMAT(//,                                                        CASE      861
     17X,'SYSTEM BASE QUANTITIES',/,                                    CASE      862
     27X,'----------------------',//,                                   CASE      863
     33X,'(1) COMMON MVA BASE',T60,F8.2,' MVA',/,                       CASE      864
     43X,'(2) COMMON FREQUENCY BASE',T60,F8.2,' HZ',/,                  CASE      865
     53X,'(3) MAXIMUM NETTING OF INDIVIDUAL GENERATION',T60,            CASE      866
     6F8.2,' MVA',/)                                                    CASE      867
 1050 FORMAT(/,' *** ERROR COMMON MVA BASE OUT OF NORMAL RANGE',/)      CASE      868
 1051 FORMAT(/,' *** ERROR COMMON FREQUENCY BASE OUT OF NORMAL RANGE',/)CASE      869
 1060 FORMAT(//,                                                        CASE      870
     17X,'PARAMETERS FOR SOLUTION OF ALGEBRAIC EQUATIONS',/,            CASE      871
     27X,'----------------------------------------------',//,           CASE      872
     33X,'(1) MAX. NO. OF ITERATIONS FOR PRE-FAULT NETWORK SOLUTION',   CASE      873
     4T65,I10,/,                                                        CASE      874
     53X,'(2) MAX. NO. OF ITERATIONS FOR NETWORK SOLUTION IN SIMULATION'CASE      875
     6,T65,I10,/,                                                       CASE      876
     73X,'(3) VOLTAGE CONVERGENCE TOLERANCE FOR NETWORK SOLUTION',T65,  CASE      877
     8F10.6,' PU',/,                                                    CASE      878
     93X,'(4) LOWER THRESHOLD VOLTAGE OF NONLINEAR LOAD (VTHZL)',T65,   CASE      879
     *F10.6,' PU',/,                                                    CASE      880
     13X,'(5) UPPER THRESHOLD VOLTAGE OF NONLINEAR LOAD (VTHZH)',T65,   CASE      881
     2F10.6,' PU',/,                                                    CASE      882
     33X,'(6) THRESHOLD VALUE OF ZERO IMPEDANCE LINE',T65,F10.6,' PU',/,CASE      883
     43X,'(7) NETWORK SOLUTION ALGORITHM AFTER ULTC OPERATION',T60,     CASE      884
     5A15,/,                                                            CASE      885
     63X,'(8) NO. OF TIME STEPS FOR CHECKING ULTC OPERATION',T65,I10,/, CASE      886
     73X,'    (NEGATIVE VALUE TO DISABLE ULTC OPERATION)',/,            CASE      887
     83X,'(9) NETWORK UPDATE INTERVAL FOR INDUCTION MOTOR TRIPPING',    CASE      888
     9T65,I10,/)                                                        CASE      889
 1070 FORMAT(//,                                                        CASE      890
     17X,'PARAMETERS FOR DATA AND STABILITY SANITY CHECKS',/,           CASE      891
     27X,'-----------------------------------------------',//,          CASE      892
     33X,'(1) PRE-FAULT STATE DERIVATIVE TOLERANCE',T65,F10.6,/,        CASE      893
     43X,'(2) LOWER LIMIT OF GENERATOR TERMINAL VOLTAGE',T65,F10.6,     CASE      894
     5' PU',/,                                                          CASE      895
     63X,'(3) UPPER LIMIT OF GENERATOR TERMINAL VOLTAGE',T65,F10.6,     CASE      896
     7' PU',/,                                                          CASE      897
     83X,'(4) LOWER LIMIT OF BUS VOLTAGE',T65,F10.6,' PU',/,            CASE      898
     93X,'(5) UPPER LIMIT OF BUS VOLTAGE',T65,F10.6,' PU',/,            CASE      899
     *3X,'(6) MAX. GENERATOR SPEED DEVIATION ALLOWED',T65,F10.6,' PU',/,CASE      900
     13X,'(7) MIN. TIME CONSTANT FOR DYNAMIC DATA CHECK',T65,F10.4,     CASE      901
     2' SEC',/                                                          CASE      902
     13X,'(8) AUTOMATIC DYNAMIC DATA CORRECTION',T69,A3,/)              CASE      903
 1090 FORMAT(5X,'OPTIONS RELATED TO PROGRAM CONTROL (DO NOT USE) :',/,  CASE      904
     1       5X,'--------------------------------------------------',/, CASE      905
     &10X,'(1) ISPEED= ',I8,                                            CASE      906
     1             T35, ' - internally set '                            CASE      907
     &,/,10X,'(2) KSALI = ',I8,                                         CASE      908
     1             T35, ' - internally set '                            CASE      909
     &,/,10X,'(3) ISKIP = ',I8,                                         CASE      910
     1             T35, ' - internally set ',/)                         CASE      911
 2010 FORMAT(//,                                                        CASE      912
     17X,'PARAMETERS FOR SOLUTION OF DIFFERENTIAL EQUATIONS',/,         CASE      913
     27X,'-------------------------------------------------',//,        CASE      914
     33X,'(1) MAX. NUMBER OF ITERATIONS PER TIME STEP',T65,I10,/,       CASE      915
     43X,'(2) JACOBIAN UPDATING INTERVAL WITHIN A TIME STEP',T65,I10,/, CASE      916
     53X,'(3) CONVERGENCE TOLERANCE FOR CURRENT INJECTION MISMATCHES',  CASE      917
     6T65,F10.6,' PU',/,                                                CASE      918
     73X,'(4) THRESHOLD TO DETECT AC-DC INTERFACE DISCONTINUITY',       CASE      919
     8T65,F10.2,' MVA',/,                                               CASE      920
     93X,'(5) MINIMUM SUBSTEP LENGTH',T65,F10.6,' SEC'/)                CASE      921
 2030 FORMAT(//,                                                        CASE      922
     17X,'PARAMETERS FOR SYSTEM CONDITION PRINTING',/,                  CASE      923
     27X,'----------------------------------------',//,                 CASE      924
     33X,'(1) SUMMARY OF TCL CONDITIONS',T37,A43,/,                     CASE      925
     43X,'(2) SUMMARY OF ULTC CONDITIONS',T37,A43,/)                    CASE      926
C                                                                       CASE      927
 2100 FORMAT(' *** WARNING THIS ITEM CANNOT BE CHANGED AFTER',          CASE      928
     +       ' READING THE LOAD FLOW DATA')                             CASE      929
 2200 FORMAT(' *** WARNING THIS ITEM CANNOT BE CHANGED AFTER',          CASE      930
     +       ' READING THE DYNAMIC DATA')                               CASE      931
 2310 FORMAT(' *** WARNING THIS ITEM CANNOT BE CHANGED AFTER',          CASE      932
     +       ' INITIALIZATION')                                         CASE      933
 2360 FORMAT(' *** WARNING THIS ITEM CANNOT BE CHANGED AFTER',          CASE      934
     +       ' READING THE OUTPUT ANALYSIS DATA')                       CASE      935
C                                                                       CASE      936
      END                                                               CASE      937
