CFPRIME TABDAT                                                          TABDAT      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 TABDAT                                                 TABDAT      3
CD                                                                      TABDAT      4
CD    THIS IS THE MAIN DRIVER FOR DYNAMIC DATA TABULATION.              TABDAT      5
CD                                                                      TABDAT      6
CD    THE PRINTING FEATURES ARE:                                        TABDAT      7
CD                                                                      TABDAT      8
CD     (1)  TABULATE GENERATOR DATA                                     TABDAT      9
CD     (2)  TABULATE EXCITER DATA                                       TABDAT     10
CD     (3)  TABULATE STABILIZER AND TORSIONAL FILTER DATA               TABDAT     11
CD     (4)  TABULATE GOVERNOR DATA                                      TABDAT     12
CD     (5)  TABULATE UNDER EXCITED LIMITER, MAX EXCITER CURRENT         TABDAT     13
CD          LIMITER AND TRANSIENT EXCITATION BOOSTER DATA               TABDAT     14
CD     (6)  ALL OF THE ABOVE                                            TABDAT     15
CD     (7)  PRINT INDIVIDUAL GENERATOR AND CONTROLLER                   TABDAT     16
CD     (8)  PRINT CHANNEL MAP OF OUTPUT ANALYSIS FILE                   TABDAT     17
CD     (9)  TABULATE NONLINEAR LOAD COMPONENTS                          TABDAT     18
CD     (10) TABULATE INDUCTION MOTOR DATA                               TABDAT     19
CD     (11) PRINT SVC DATA                                              TABDAT     20
CD     (12) PRINT STP MODELS DATA                                       TABDAT     21
CD     (13) PRINT RANI MODELS DATA                                      TABDAT     22
CD     (14) PRINT SDB MODELS DATA                                       TABDAT     23
CD     (15) TABULATE ULTC MODELS DATA                                   TABDAT     24
CD     (16) PRINT MTDC MODELS DATA                                      TABDAT     25
CD     (17) TABULATE MON. LINES AND RELAY DATA                          TABDAT     26
CD     (18) TABULATE TSC DATA                                           TABDAT     27
CD     (19) AUTO RELAY DATA                                             TABDAT     28
CD                                                                      TABDAT     29
CD                                                                      TABDAT     30
C---------------------------------------------------------------------- TABDAT     31
      INCLUDE 'CNLSTA.INS'                                              TABDAT     32
      INCLUDE 'PARX.INS'                                                TABDAT     33
      INCLUDE 'CNB0.INS'                                                TABDAT     34
      INCLUDE 'CNB1.INS'                                                TABDAT     35
      INCLUDE 'CNB4.INS'                                                TABDAT     36
      INCLUDE 'CNPT.INS'                                                TABDAT     37
      INCLUDE 'CNB19.INS'                                               TABDAT     38
      INCLUDE 'CNUNIT.INS'                                              TABDAT     39
      INCLUDE 'CNLUN.INS'                                               TABDAT     40
      INCLUDE 'CNIMPR.INS'                                              TABDAT     41
      INCLUDE 'CNIPTR.INS'                                              TABDAT     42
      INCLUDE 'CNNNEW.INS'                                              TABDAT     43
      INCLUDE 'CNFLAG.INS'                                              TABDAT     44
      INCLUDE 'CNSTP.INS'                                               TABDAT     45
      INCLUDE 'CNULTC.INS'                                              TABDAT     46
      INCLUDE 'UDCA.INS'                                                TABDAT     47
      INCLUDE 'CNMSG.INS'                                               TABDAT     48
      INCLUDE 'CNFRUN.INS'                                              TABDAT     49
C                                                                       TABDAT     50
      CHARACTER*80 PMSG,EMSG,STRING                                     TABDAT     51
      CHARACTER*12 BNAME1                                               TABDAT     52
      CHARACTER*50 FILENA                                               TABDAT     53
      CHARACTER*7 SUBPMT                                                TABDAT     54
      CHARACTER*2 ICKT,ICKT1                                            TABDAT     55
      CHARACTER*3 KYWRDS(19)                                            TABDAT     56
C                                                                       TABDAT     57
      DATA KYWRDS / 'GEN', 'EXC', 'STB', 'GOV', 'MIS', 'ALL', 'IND',    TABDAT     58
     +              'MOT', 'SVC', 'RAN', 'STP', 'SDB', 'MTD', 'NON',    TABDAT     59
     +              'TCS', 'ULT', 'REL', 'MON', 'CHA' /                 TABDAT     60
C                                                                       TABDAT     61
      LDEB=.FALSE.                                                      TABDAT     62
C                                                                       TABDAT     63
      IF (CFLRUN) THEN                                                  TABDAT     64
        IREC = IFSPTR(ITABDA)                                           TABDAT     65
        GOTO 200                                                        TABDAT     66
      ENDIF                                                             TABDAT     67
C                                                                       TABDAT     68
      SUBPMT='TADATA '                                                  TABDAT     69
      FILENA(1:1)=' '                                                   TABDAT     70
C                                                                       TABDAT     71
C                                                                       TABDAT     72
      IF (.NOT.LUNITS(IU18)) THEN                                       TABDAT     73
         PMSG='ENTER THE DATA TABULATION FILE NAME:'                    TABDAT     74
         EMSG='ERROR IN OPENING THE DATA TABULATION FILE'               TABDAT     75
         IKEY=6                                                         TABDAT     76
         JLENG=133                                                      TABDAT     77
         LMSG=36                                                        TABDAT     78
         LEMSG=41                                                       TABDAT     79
C                                                                       TABDAT     80
         WRITE(LOUT,*)                                                  TABDAT     81
         CALL FILEMG(IU18,LMSG,PMSG,LEMSG,EMSG,SUBPMT,IKEY,JLENG,IEBK)  TABDAT     82
         IF (IEBK.NE.0)THEN                                             TABDAT     83
         IF(PLAYBA)CALL PSTOP                                           TABDAT     84
         RETURN                                                         TABDAT     85
         ENDIF                                                          TABDAT     86
         LUNITS(IU18)=.TRUE.                                            TABDAT     87
         PMSG='INPUT DATA AND INITIAL CONDITION REPORT'                 TABDAT     88
         CALL PHEAD(IU18,39,PMSG)                                       TABDAT     89
      END IF                                                            TABDAT     90
C                                                                       TABDAT     91
 110  IMORE=0                                                           TABDAT     92
      GOTO 100                                                          TABDAT     93
C                                                                       TABDAT     94
 120  IMORE=1                                                           TABDAT     95
C                                                                       TABDAT     96
 100  IF (CFLRUN) GOTO 200                                              TABDAT     97
C                                                                       TABDAT     98
      IF (IMORE.NE.0) THEN                                              TABDAT     99
         WRITE(LOUT,2040)                                               TABDAT    100
         PMSG='SELECT AN ITEM BY THE NUMBER '//                         TABDAT    101
     &        '(R TO RETURN TO MENU 1; Q TO QUIT):'                     TABDAT    102
         IPMSG=64                                                       TABDAT    103
      ELSE                                                              TABDAT    104
         WRITE(LOUT,2000)                                               TABDAT    105
         PMSG='SELECT AN ITEM BY THE NUMBER '//                         TABDAT    106
     &        '(G TO GO TO MENU 2; Q TO QUIT):'                         TABDAT    107
         IPMSG=60                                                       TABDAT    108
      END IF                                                            TABDAT    109
C                                                                       TABDAT    110
      CALL REDLIN(LOUT,LIN,JERR,IPMSG,PMSG,SUBPMT,'TB1',STRING,RECORD,  TABDAT    111
     &IREC,KLAYER,KEND,KREAD,PLAYBA)                                    TABDAT    112
      IF (JERR.LT.0)THEN                                                TABDAT    113
      IF(PLAYBA)CALL PSTOP                                              TABDAT    114
      GOTO 100                                                          TABDAT    115
      ENDIF                                                             TABDAT    116
      IF (KLAYER.LT.0) RETURN                                           TABDAT    117
      IF (STRING(1:1).EQ.'G'.OR.STRING(1:1).EQ.'g') GOTO 120            TABDAT    118
      IF (STRING(1:1).EQ.'R'.OR.STRING(1:1).EQ.'r') GOTO 110            TABDAT    119
      IF (STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') GOTO 900            TABDAT    120
      READ(STRING,*,IOSTAT=IOS) NTYPE                                   TABDAT    121
      IF (IOS.NE.0.OR.(IMORE.EQ.0.AND.(NTYPE.LE.0.OR.NTYPE.GT.9))       TABDAT    122
     &            .OR.(IMORE.EQ.1.AND.(NTYPE.LE.9.OR.NTYPE.GT.19))) THENTABDAT    123
         IF(PLAYBA)CALL PSTOP                                           TABDAT    124
         KREAD=.TRUE.                                                   TABDAT    125
         GOTO 100                                                       TABDAT    126
      END IF                                                            TABDAT    127
      GOTO 280                                                          TABDAT    128
C                                                                       TABDAT    129
C                                                     Control file run  TABDAT    130
C                                                                       TABDAT    131
 200  IF (IREC .EQ. 0) GOTO 900                                         TABDAT    132
      READ (IU56, REC = IREC) STRING                                    TABDAT    133
      IREC = INXPTR(IREC)                                               TABDAT    134
C                                                                       TABDAT    135
      DO 210 II = 1, 19                                                 TABDAT    136
        IF (STRING(1:3) .EQ. KYWRDS(II)) THEN                           TABDAT    137
          NTYPE = II                                                    TABDAT    138
          GOTO 280                                                      TABDAT    139
        ENDIF                                                           TABDAT    140
 210  CONTINUE                                                          TABDAT    141
C                                                                       TABDAT    142
      MSG(1) = ' *** ERROR - INVALID KEYWORD IN DATA '//                TABDAT    143
     +         'TABULATION SPECIFICATION.'                              TABDAT    144
      MSG(2) = STRING                                                   TABDAT    145
      CALL PRTMSG (2)                                                   TABDAT    146
      IF(PLAYBA)CALL PSTOP                                              TABDAT    147
      GOTO 200                                                          TABDAT    148
C    :........................................................:         TABDAT    149
C                                                                       TABDAT    150
 280  CONTINUE                                                          TABDAT    151
C            TGEDAT TEXDAT TSTDAT TGODAT TUEDAT ALL    TIGEDA           TABDAT    152
      GOTO (  300,   310,   320,   330,   340,   800,   810,            TABDAT    153
C     TMOTDA TSVCDA TRANDA TSTPDA TSDBDA TDCLDA TNETDA TTSCDA           TABDAT    154
     * 350,   360,   380,   370,   390,   410,   440,   460,            TABDAT    155
C     TULTDA TRELAY TMONDA PCHMAP                                       TABDAT    156
     * 400,   450,   420,   430  ) NTYPE                                TABDAT    157
C                                                                       TABDAT    158
C    ..........................................................         TABDAT    159
C    :TGEDAT                                                  :         TABDAT    160
 300  CONTINUE                                                          TABDAT    161
      CALL TGEDAT(IU18)                                                 TABDAT    162
      GOTO 100                                                          TABDAT    163
C    :........................................................:         TABDAT    164
C                                                                       TABDAT    165
 310  CONTINUE                                                          TABDAT    166
      CALL TEXDAT(IU18)                                                 TABDAT    167
      GOTO 100                                                          TABDAT    168
C    ..........................................................         TABDAT    169
C                                                                       TABDAT    170
 320  CONTINUE                                                          TABDAT    171
      CALL TSTDAT(IU18)                                                 TABDAT    172
      GOTO 100                                                          TABDAT    173
C    :........................................................:         TABDAT    174
C                                                                       TABDAT    175
 330  CONTINUE                                                          TABDAT    176
      CALL TGODAT(IU18)                                                 TABDAT    177
      GOTO 100                                                          TABDAT    178
C    :........................................................:         TABDAT    179
C                                                                       TABDAT    180
 340  CONTINUE                                                          TABDAT    181
      CALL TUEDAT(IU18)                                                 TABDAT    182
      GOTO 100                                                          TABDAT    183
C                                                                       TABDAT    184
C    :........................................................:         TABDAT    185
C                                                                       TABDAT    186
 350  CONTINUE                                                          TABDAT    187
      IF(NMOTL.EQ.0)THEN                                                TABDAT    188
         WRITE(LOUT,'(A)')                                              TABDAT    189
     *'      * * * THERE IS NO INDUCTION MOTOR IN THIS CASE * * *'      TABDAT    190
      ELSE                                                              TABDAT    191
         CALL TMOTDA(IU18)                                              TABDAT    192
      ENDIF                                                             TABDAT    193
      GOTO 100                                                          TABDAT    194
C                                                                       TABDAT    195
C    :........................................................:         TABDAT    196
C                                                                       TABDAT    197
 360  CONTINUE                                                          TABDAT    198
      IF(NSVC.EQ.0)THEN                                                 TABDAT    199
         WRITE(LOUT,'(A)')                                              TABDAT    200
     *'      * * * THERE IS NO SVC IN THIS CASE * * *'                  TABDAT    201
      ELSE                                                              TABDAT    202
         CALL TSVCDA(IU18)                                              TABDAT    203
      ENDIF                                                             TABDAT    204
      GOTO 100                                                          TABDAT    205
C                                                                       TABDAT    206
C    :........................................................:         TABDAT    207
C                                                                       TABDAT    208
 370  CONTINUE                                                          TABDAT    209
      IF(NTCPS.EQ.0)THEN                                                TABDAT    210
         WRITE(LOUT,'(A)')                                              TABDAT    211
     *'      * * * THERE IS NO TCTC/TCPR IN THIS CASE * * *'            TABDAT    212
      ELSE                                                              TABDAT    213
         CALL TSTPDA(IU18)                                              TABDAT    214
      ENDIF                                                             TABDAT    215
      GOTO 100                                                          TABDAT    216
C                                                                       TABDAT    217
C    :........................................................:         TABDAT    218
C                                                                       TABDAT    219
 380  CONTINUE                                                          TABDAT    220
      IF(NRANI.EQ.0)THEN                                                TABDAT    221
         WRITE(LOUT,'(A)')                                              TABDAT    222
     *'      * * * THERE IS NO TCSC IN THIS CASE * * *'                 TABDAT    223
      ELSE                                                              TABDAT    224
         CALL TRANDA(IU18)                                              TABDAT    225
      ENDIF                                                             TABDAT    226
      GOTO 100                                                          TABDAT    227
C                                                                       TABDAT    228
C    :........................................................:         TABDAT    229
C                                                                       TABDAT    230
 390  CONTINUE                                                          TABDAT    231
      IF(NSDB.EQ.0)THEN                                                 TABDAT    232
         WRITE(LOUT,'(A)')                                              TABDAT    233
     *'      * * * THERE IS NO TCBR/TCBC IN THIS CASE * * *'            TABDAT    234
      ELSE                                                              TABDAT    235
         CALL TSDBDA(IU18)                                              TABDAT    236
      ENDIF                                                             TABDAT    237
      GOTO 100                                                          TABDAT    238
C                                                                       TABDAT    239
C    :........................................................:         TABDAT    240
C                                                                       TABDAT    241
 400  CONTINUE                                                          TABDAT    242
      IF(NULTC.EQ.0)THEN                                                TABDAT    243
         WRITE(LOUT,'(A)')                                              TABDAT    244
     *'      * * * THERE IS NO ULTC IN THIS CASE * * *'                 TABDAT    245
      ELSE                                                              TABDAT    246
         CALL TULTDA(IU18)                                              TABDAT    247
      ENDIF                                                             TABDAT    248
      GOTO 100                                                          TABDAT    249
C                                                                       TABDAT    250
C    :........................................................:         TABDAT    251
C                                                                       TABDAT    252
 410  CONTINUE                                                          TABDAT    253
      IF(IUDC.EQ.0)THEN                                                 TABDAT    254
         WRITE(LOUT,'(A)')                                              TABDAT    255
     *'      * * * THERE IS NO MTDC IN THIS CASE * * *'                 TABDAT    256
      ELSE                                                              TABDAT    257
         CALL TDCLDA(IU18)                                              TABDAT    258
      ENDIF                                                             TABDAT    259
      GOTO 100                                                          TABDAT    260
C                                                                       TABDAT    261
C    :........................................................:         TABDAT    262
C                                                                       TABDAT    263
C                                                                       TABDAT    264
 420  CONTINUE                                                          TABDAT    265
      CALL TMONDA(IU18)                                                 TABDAT    266
      GOTO 100                                                          TABDAT    267
C                                                                       TABDAT    268
C    :........................................................:         TABDAT    269
C                                                                       TABDAT    270
C                                                                       TABDAT    271
 430  CONTINUE                                                          TABDAT    272
      CALL PCHMAP(IU18)                                                 TABDAT    273
      GOTO 100                                                          TABDAT    274
C                                                                       TABDAT    275
C    :........................................................:         TABDAT    276
C                                                                       TABDAT    277
C                                                                       TABDAT    278
 440  CONTINUE                                                          TABDAT    279
      CALL TNETDA(IU18)                                                 TABDAT    280
      GOTO 100                                                          TABDAT    281
C                                                                       TABDAT    282
C    :........................................................:         TABDAT    283
C                                                                       TABDAT    284
C                                                                       TABDAT    285
 450  CONTINUE                                                          TABDAT    286
      CALL TRELAY(IU18)                                                 TABDAT    287
      GOTO 100                                                          TABDAT    288
C                                                                       TABDAT    289
C    :........................................................:         TABDAT    290
C                                                                       TABDAT    291
C                                                                       TABDAT    292
 460  CONTINUE                                                          TABDAT    293
      CALL TTSCDA(IU18)                                                 TABDAT    294
      GOTO 100                                                          TABDAT    295
C                                                                       TABDAT    296
C    :........................................................:         TABDAT    297
C                                                                       TABDAT    298
 800  CONTINUE                                                          TABDAT    299
      CALL TGEDAT(IU18)                                                 TABDAT    300
      CALL TEXDAT(IU18)                                                 TABDAT    301
      CALL TSTDAT(IU18)                                                 TABDAT    302
      CALL TGODAT(IU18)                                                 TABDAT    303
      CALL TUEDAT(IU18)                                                 TABDAT    304
      GOTO 100                                                          TABDAT    305
C                                                                       TABDAT    306
C                                                                       TABDAT    307
C     SPECIFIED GENERATOR                                               TABDAT    308
C                                                                       TABDAT    309
 810  CONTINUE                                                          TABDAT    310
C                                                                       TABDAT    311
      IF (CFLRUN) THEN                                                  TABDAT    312
        I1 = INDEX (STRING, ';') + 1                                    TABDAT    313
        I2 = I1 + INDEX (STRING(I1:80), ';')                            TABDAT    314
        IF (I1 .EQ. I2) THEN                                            TABDAT    315
          WRITE (MSG(1), 2060)                                          TABDAT    316
          MSG(2) = STRING                                               TABDAT    317
          CALL PRTMSG (2)                                               TABDAT    318
          IF(PLAYBA)CALL PSTOP                                          TABDAT    319
          GOTO 200                                                      TABDAT    320
        ENDIF                                                           TABDAT    321
        IF (KLFO .EQ. 0) THEN                                           TABDAT    322
          READ (STRING(I1:I2-1), *) NLF                                 TABDAT    323
        ELSE                                                            TABDAT    324
          I3 = MIN (I2-2, I1+11)                                        TABDAT    325
          BNAME1 = STRING(I1:I3)                                        TABDAT    326
          CALL CHKBUS (BNAME1, NLF)                                     TABDAT    327
          IF (NLF .EQ. 0) THEN                                          TABDAT    328
            WRITE (MSG(1), 2070)                                        TABDAT    329
            MSG(2) = STRING                                             TABDAT    330
            CALL PRTMSG (2)                                             TABDAT    331
            IF(PLAYBA)CALL PSTOP                                        TABDAT    332
            GOTO 200                                                    TABDAT    333
          ENDIF                                                         TABDAT    334
          ICKT = STRING(I2:I2+1)                                        TABDAT    335
        ENDIF                                                           TABDAT    336
      ELSE                                                              TABDAT    337
        ICODE=0                                                         TABDAT    338
        CALL BUSCID(ICODE,NLF,BNAME1,ICKT,KLFO)                         TABDAT    339
        IF(ICODE.LT.0)THEN                                              TABDAT    340
        IF(PLAYBA)CALL PSTOP                                            TABDAT    341
        GOTO 810                                                        TABDAT    342
        ENDIF                                                           TABDAT    343
        IF(ICODE.GT.0) GOTO 100                                         TABDAT    344
      ENDIF                                                             TABDAT    345
C                                                                       TABDAT    346
      IF(NLF.NE.0)THEN                                                  TABDAT    347
        NPBNOI=NNEW(NLF)                                                TABDAT    348
      ELSE                                                              TABDAT    349
        NPBNOI=0                                                        TABDAT    350
      ENDIF                                                             TABDAT    351
C                                                                       TABDAT    352
C   CHECK IF SUCH GENERATOR DOES EXIST                                  TABDAT    353
C                                                                       TABDAT    354
      IF (NPBNOI .EQ. 0 .OR. NPBNOI .GT. IPNODX) THEN                   TABDAT    355
        IF (CFLRUN) THEN                                                TABDAT    356
          WRITE (MSG(1), 2050)                                          TABDAT    357
          MSG(2) = STRING                                               TABDAT    358
          CALL PRTMSG (2)                                               TABDAT    359
          GOTO 200                                                      TABDAT    360
        ELSE                                                            TABDAT    361
          WRITE (LOUT, 2030)                                            TABDAT    362
          KREAD = .TRUE.                                                TABDAT    363
          IF(PLAYBA)CALL PSTOP                                          TABDAT    364
          GOTO 810                                                      TABDAT    365
        ENDIF                                                           TABDAT    366
      ENDIF                                                             TABDAT    367
C                                                                       TABDAT    368
C   DETAILED GENERATOR MATCH GENERATOR ID                               TABDAT    369
C                                                                       TABDAT    370
      IFIN=NTHG(NPBNOI+1)-1                                             TABDAT    371
      IMACH=NTHG(NPBNOI)-1                                              TABDAT    372
 820  IMACH=IMACH+1                                                     TABDAT    373
      ICKT1=NDGC(IMACH)(3:4)                                            TABDAT    374
      CALL LOGEN(ICKT,ICKT1,JFOUND)                                     TABDAT    375
      IF(JFOUND.EQ.1)GOTO 830                                           TABDAT    376
      IF(IMACH.LT.IFIN)GOTO 820                                         TABDAT    377
C                                                                       TABDAT    378
C   WRITE ERROR MESSAGE NO SUCH GENERATOR ID                            TABDAT    379
C                                                                       TABDAT    380
      IF (CFLRUN) THEN                                                  TABDAT    381
        WRITE (MSG(1), 2050)                                            TABDAT    382
        MSG(2) = STRING                                                 TABDAT    383
        CALL PRTMSG (2)                                                 TABDAT    384
        GOTO 200                                                        TABDAT    385
      ELSE                                                              TABDAT    386
        WRITE(LOUT,2030)                                                TABDAT    387
        IF(PLAYBA)CALL PSTOP                                            TABDAT    388
        KREAD=.TRUE.                                                    TABDAT    389
        GOTO 810                                                        TABDAT    390
      ENDIF                                                             TABDAT    391
C                                                                       TABDAT    392
 830  CONTINUE                                                          TABDAT    393
C                                                                       TABDAT    394
       KN=NPBNOI*3                                                      TABDAT    395
       CALL TIGEDA(IU18,NLF,KN,IMACH)                                   TABDAT    396
       IF(CFLRUN)GOTO 100                                               TABDAT    397
       GOTO 810                                                         TABDAT    398
C                                                                       TABDAT    399
C    :........................................................:         TABDAT    400
C    ..........................................................         TABDAT    401
C    :GET ITEM TO BE CHANGE                                   :         TABDAT    402
C                                                                       TABDAT    403
C                                                                       TABDAT    404
 900  CONTINUE                                                          TABDAT    405
C    ..........................................................         TABDAT    406
C                                                                       TABDAT    407
      RETURN                                                            TABDAT    408
C                                                                       TABDAT    409
 2000 FORMAT(//,                                                        TABDAT    410
     17X,'DATA TABULATION OPTIONS (MENU 1)',/,                          TABDAT    411
     27X,'--------------------------------',//,                         TABDAT    412
     32X,' (1) TABULATION OF GENERATOR DATA',/,                         TABDAT    413
     42X,' (2) TABULATION OF EXCITER DATA',/,                           TABDAT    414
     52X,' (3) TABULATION OF STABILIZER AND TORSIONAL FILTER DATA',/,   TABDAT    415
     62X,' (4) TABULATION OF GOVERNOR DATA',/,                          TABDAT    416
     72X,' (5) TABULATION OF UNDER EXCITATION CURRENT LIMITER,',/,      TABDAT    417
     82X,'                   OVER EXCITATION CURRENT LIMITER,',/,       TABDAT    418
     92X,'                   AND TRANSIENT EXCITATION BOOSTER DATA',/,  TABDAT    419
     *2X,' (6) ALL OF THE ABOVE',/,                                     TABDAT    420
     12X,' (7) TABULATION OF INDIVIDUAL GENERATOR AND THE ASSOCIATED',/,TABDAT    421
     22X,'                   CONTROL SYSTEM DATA',/,                    TABDAT    422
     32X,' (8) TABULATION OF INDUCTION MOTOR DATA',/,                   TABDAT    423
     42X,' (9) TABULATION OF SVC DATA',/)                               TABDAT    424
 2020 FORMAT(1X,'ENTER BUS NUMBER: GENERATOR ID OR (Q TO QUIT) ')       TABDAT    425
 2030 FORMAT(/,1X,'*** ERROR: SPECIFIED GENERATOR'                      TABDAT    426
     &,' IS NOT IN THE SYSTEM PLEASE RE ENTER YOUR DATA')               TABDAT    427
 2040 FORMAT(//,                                                        TABDAT    428
     17X,'DATA TABULATION OPTIONS (MENU 2)',/,                          TABDAT    429
     27X,'--------------------------------',//,                         TABDAT    430
     62X,'(10) TABULATION OF TCSC DATA',/,                              TABDAT    431
     52X,'(11) TABULATION OF TCTC/TCPR DATA',/,                         TABDAT    432
     72X,'(12) TABULATION OF TCBR/TCBC DATA',/,                         TABDAT    433
     92X,'(13) TABULATION OF MTDC DATA',/,                              TABDAT    434
     52X,'(14) TABULATION OF NONLINEAR LOAD DATA',/,                    TABDAT    435
     12X,'(15) TABULATION OF TSC LOAD DATA',/,                          TABDAT    436
     82X,'(16) TABULATION OF ULTC DATA',/,                              TABDAT    437
     22X,'(17) TABULATION OF AUTOMATIC RELAY DATA',/,                   TABDAT    438
     *2X,'(18) TABULATION OF MONITORING LINES AND RELAY DATA',/,        TABDAT    439
     32X,'(19) TABULATION OF DATA CHANNELS FOR OUTPUT ANALYSIS',        TABDAT    440
     4' PROGRAM',/)                                                     TABDAT    441
C                                                                       TABDAT    442
 2050 FORMAT (' *** ERROR - SPECIFIED GENERATOR FOR DATA ',             TABDAT    443
     +        'TABULATION DOES NOT EXIST')                              TABDAT    444
 2060 FORMAT (' *** ERROR - INVALID SYNTAX FOR DYNAMIC DATA ',          TABDAT    445
     +        'TABULATION')                                             TABDAT    446
 2070 FORMAT (' *** ERROR - SPECIFIED BUS FOR DATA ',                   TABDAT    447
     +        'TABULATION IS NOT IN THE LOADFLOW')                      TABDAT    448
C                                                                       TABDAT    449
      END                                                               TABDAT    450
