CFPRIME CDYNDA                                                          CDYNDA      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 CDYNDA(FILENA,LENPAR,IUY,KLAYER)                       CDYNDA      3
CD                                                                      CDYNDA      4
CD    THIS IS THE ROUTINE THAT COVERTS THE DYNAMIC MODEL DAT OF PREVIOUSCDYNDA      5
CD    PROGRAM VERSION TO THE FORMAT OF THE CURRENT PROGRAM VERSION.     CDYNDA      6
CD                                                                      CDYNDA      7
CD    IT READS THE DYNAMIC DATA FROM A USER REPARED DATA FILE.          CDYNDA      8
CD    THE READING OF DIFFERENT TYPES OF DYNAMIC                         CDYNDA      9
CD    DEVICE DATA IS CONTROLLED BY THE FOLLOWING KEY WORDS:             CDYNDA     10
CD                                                                      CDYNDA     11
CD    KEY                                                               CDYNDA     12
CD    WORD   FUNCTION                                                   CDYNDA     13
CD    -----  -----------------------------------------                  CDYNDA     14
CD    BPAW - DYNAMIC DATA IN BPA/WSCC FORMAT                            CDYNDA     15
CD    EPGE - DYNAMIC DATA IN EPRI(OLD) FORMAT                           CDYNDA     16
CD    PECO - DYNAMIC DATA IN PECO FORMAT                                CDYNDA     17
CD    IEEE - DYNANIC DATA IN IEEE FORMAT                                CDYNDA     18
CD    PTID - DYNAMIC DATA IN PTI FORMAT                                 CDYNDA     19
CD    DGEN - DETAILED GENERATOR DATA IN EPRI FORMAT                     CDYNDA     20
CD    CGEN - CLASSICAL GENERATOR DATA IN EPRI FORMAT                    CDYNDA     21
CD    IBUS - INFINITE BUS DATA IN EPRI FORMAT                           CDYNDA     22
CD    MOTO - INDUCTION MOTOR DATA IN EPRI FORMAT                        CDYNDA     23
CD    NSVC - SVC DATA IN EPRI FORMAT                                    CDYNDA     24
CD    ULTC - ULTC DATA IN EPRI FORMAT                                   CDYNDA     25
CD    NSTP - STP DATA IN EPRI FORMAT                                    CDYNDA     26
CD    NSDB - DYNAMIC BRAKING DATA IN EPRI FORMAT                        CDYNDA     27
CD    NLBS - NONLINEAR LOAD DATA IN EPRI FORMAT                         CDYNDA     28
CD    NDCL - UDC DATA IN EPRI FORMAT                                    CDYNDA     29
CD   EDATA - TERMINATOR OF DATA BLOCK                                   CDYNDA     30
CD                                                                      CDYNDA     31
      INCLUDE 'PARX.INS'                                                CDYNDA     32
      INCLUDE 'CNPARX.INS'                                              CDYNDA     33
      INCLUDE 'CNPT.INS'                                                CDYNDA     34
      INCLUDE 'CNREN.INS'                                               CDYNDA     35
      INCLUDE 'CNMNEW.INS'                                              CDYNDA     36
      INCLUDE 'CNB19.INS'                                               CDYNDA     37
      INCLUDE 'CNFLAG.INS'                                              CDYNDA     38
      INCLUDE 'UDCA.INS'                                                CDYNDA     39
      INCLUDE 'UDCB.INS'                                                CDYNDA     40
      INCLUDE 'UDCF.INS'                                                CDYNDA     41
      INCLUDE 'UDCG.INS'                                                CDYNDA     42
      INCLUDE 'UDCH.INS'                                                CDYNDA     43
      INCLUDE 'CNLSTA.INS'                                              CDYNDA     44
      INCLUDE 'CNJPT.INS'                                               CDYNDA     45
      INCLUDE 'CNJDAT.INS'                                              CDYNDA     46
      INCLUDE 'CNTGED.INS'                                              CDYNDA     47
      INCLUDE 'CNLUN.INS'                                               CDYNDA     48
      INCLUDE 'CNUNIT.INS'                                              CDYNDA     49
      INCLUDE 'CNMSG.INS'                                               CDYNDA     50
C                                                                       CDYNDA     51
      INTEGER INVBS(NM)                                                 CDYNDA     52
C                                                                       CDYNDA     53
      CHARACTER*80 SIMBUF,EMSG,STRING                                   CDYNDA     54
      CHARACTER*12 BUSNAM,BUSR1(5),IBLK12                               CDYNDA     55
      CHARACTER*4 ISEM,IEND,ISIDAT(16)                                  CDYNDA     56
      CHARACTER*5 EDATA                                                 CDYNDA     57
C                                                                       CDYNDA     58
      CHARACTER*7 SUBPMT                                                CDYNDA     59
      CHARACTER*50 FILENA                                               CDYNDA     60
C                                                                       CDYNDA     61
      DATA ISIDAT/'BPAW','EPGE','PECO','IEEE','PTID','DGEN','CGEN',     CDYNDA     62
     +            'IBUS','MOTO','NSVC','ULTC','NRAN','NSTP','NSDB',     CDYNDA     63
     +            'NLBS','NDCL'/                                        CDYNDA     64
      DATA IEND/' END'/,EDATA/'EDATA'/,IBLK12/'            '/           CDYNDA     65
C                                                                       CDYNDA     66
      LDEB=(JDEB(4).NE.0)                                               CDYNDA     67
C                                                                       CDYNDA     68
      SUBPMT='CDYNDA '                                                  CDYNDA     69
      IEBK=0                                                            CDYNDA     70
C                                                                       CDYNDA     71
C                                                                       CDYNDA     72
       STRING='ENTER THE NAME OF THE EXISTING DYNAMIC DATA '//          CDYNDA     73
     *        'FILE IN VERSION 3.0 FORMAT:'                             CDYNDA     74
       EMSG='ERROR IN OPENING THE EXISTING DYNAMIC DATA FILE'           CDYNDA     75
C                                                                       CDYNDA     76
      IKEY=1                                                            CDYNDA     77
      JLENG=0                                                           CDYNDA     78
C                                                                       CDYNDA     79
      WRITE(LOUT,*)                                                     CDYNDA     80
C                                                                       CDYNDA     81
      CALL FILEMG(IU50,71,STRING,47,EMSG,SUBPMT,IKEY,JLENG,IEBK)        CDYNDA     82
      IF(IEBK.NE.0)RETURN                                               CDYNDA     83
C                                                                       CDYNDA     84
      WRITE(LOUT,'(/A/)') '  READING DYNAMIC DATA FILE.  WAIT ...'      CDYNDA     85
C                                                                       CDYNDA     86
      IUX=IU50                                                          CDYNDA     87
C                                                                       CDYNDA     88
  100 CONTINUE                                                          CDYNDA     89
      JSEM=0                                                            CDYNDA     90
      CALL GETLIN(IUX,SIMBUF)                                           CDYNDA     91
      READ(SIMBUF,1010) ISEM                                            CDYNDA     92
      IF(LDEB)WRITE(LOUT,1230) ISEM                                     CDYNDA     93
      IF(ISEM.EQ.IEND) GOTO 500                                         CDYNDA     94
  110 JSEM=JSEM+1                                                       CDYNDA     95
      IF(JSEM.GT.16)GOTO 490                                            CDYNDA     96
      IF(ISEM.EQ.ISIDAT(JSEM)) GOTO 120                                 CDYNDA     97
      GOTO 110                                                          CDYNDA     98
C           'BPAW','EPGE','PECO','IEEE','PTID','DGEN','CGEN','IBUS',    CDYNDA     99
  120 GOTO ( 130,   135,   140,   150 ,  160,   170,   180,   190,      CDYNDA    100
C           'MOTO','NSVC','ULTC','NRAN','NSTP','NSDB','NLBS','NDCL'     CDYNDA    101
     +       260,   290,   300,   310,   320,   330,   340,   400)JSEM  CDYNDA    102
C                                                                       CDYNDA    103
C --------------------------------------------------                    CDYNDA    104
C !  GENERATOR AND CONTROL DATA IN BPA/WSCC FORMAT !                    CDYNDA    105
C --------------------------------------------------                    CDYNDA    106
C                                                                       CDYNDA    107
  130 CONTINUE                                                          CDYNDA    108
C                                                                       CDYNDA    109
        MSG(1)=' *** WARNING IMPROPER USE OF CONVERSION ACTIVITY'       CDYNDA    110
        MSG(2)='     WITH BPAW DATA BLOCK'                              CDYNDA    111
        CALL PRTMSG(2)                                                  CDYNDA    112
        IEBK=99                                                         CDYNDA    113
        GOTO 500                                                        CDYNDA    114
C                                                                       CDYNDA    115
C --------------------------------------------------                    CDYNDA    116
C !  GENERATOR AND CONTROL DATA IN EPRI/OLD FORMAT !                    CDYNDA    117
C --------------------------------------------------                    CDYNDA    118
C                                                                       CDYNDA    119
  135 CONTINUE                                                          CDYNDA    120
C                                                                       CDYNDA    121
        MSG(1)=' *** WARNING IMPROPER USE OF CONVERSION ACTIVITY'       CDYNDA    122
        MSG(2)='     WITH EPGE DATA BLOCK'                              CDYNDA    123
        CALL PRTMSG(2)                                                  CDYNDA    124
        IEBK=99                                                         CDYNDA    125
        GOTO 500                                                        CDYNDA    126
C                                                                       CDYNDA    127
C ----------------------------------------------                        CDYNDA    128
C !  GENERATOR AND CONTROL DATA IN PECO FORMAT !                        CDYNDA    129
C ----------------------------------------------                        CDYNDA    130
C                                                                       CDYNDA    131
  140 CONTINUE                                                          CDYNDA    132
C                                                                       CDYNDA    133
      IF(KLFO.NE.0)THEN                                                 CDYNDA    134
        MSG(1)=' *** WARNING IMPROPER USE OF PECO DATA BLOCK WITH BUS'  CDYNDA    135
        MSG(2)='     NAME BASED LOAD FLOW FORMAT'                       CDYNDA    136
        CALL PRTMSG(2)                                                  CDYNDA    137
        IEBK=99                                                         CDYNDA    138
        GOTO 500                                                        CDYNDA    139
      ELSE                                                              CDYNDA    140
C                                                                       CDYNDA    141
        MSG(1)=' *** WARNING IMPROPER USE OF CONVERSION ACTIVITY'       CDYNDA    142
        MSG(2)='     WITH PECO DATA BLOCK'                              CDYNDA    143
        CALL PRTMSG(2)                                                  CDYNDA    144
        IEBK=99                                                         CDYNDA    145
        GOTO 500                                                        CDYNDA    146
C                                                                       CDYNDA    147
      ENDIF                                                             CDYNDA    148
C ----------------------------------------------                        CDYNDA    149
C !  GENERATOR AND CONTROL DATA IN IEEE FORMAT !                        CDYNDA    150
C ----------------------------------------------                        CDYNDA    151
C                                                                       CDYNDA    152
  150 CONTINUE                                                          CDYNDA    153
C                                                                       CDYNDA    154
        MSG(1)=' *** WARNING IMPROPER USE OF CONVERSION ACTIVITY'       CDYNDA    155
        MSG(2)='     WITH IEEE DATA BLOCK'                              CDYNDA    156
        CALL PRTMSG(2)                                                  CDYNDA    157
        IEBK=99                                                         CDYNDA    158
        GOTO 500                                                        CDYNDA    159
C                                                                       CDYNDA    160
C ........................................................              CDYNDA    161
C ---------------------------------------------                         CDYNDA    162
C !  GENERATOR AND CONTROL DATA IN PTI FORMAT !                         CDYNDA    163
C ---------------------------------------------                         CDYNDA    164
C                                                                       CDYNDA    165
  160 CONTINUE                                                          CDYNDA    166
      IF(KLFO.NE.0)THEN                                                 CDYNDA    167
        MSG(1)=' *** WARNING IMPROPER USE OF PTID DATA BLOCK WITH BUS'  CDYNDA    168
        MSG(2)='     NAME BASED LOAD FLOW FORMAT'                       CDYNDA    169
        CALL PRTMSG(2)                                                  CDYNDA    170
        IEBK=99                                                         CDYNDA    171
        GOTO 500                                                        CDYNDA    172
      ELSE                                                              CDYNDA    173
C                                                                       CDYNDA    174
        MSG(1)=' *** WARNING IMPROPER USE OF CONVERSION ACTIVITY'       CDYNDA    175
        MSG(2)='     WITH PTID DATA BLOCK'                              CDYNDA    176
        CALL PRTMSG(2)                                                  CDYNDA    177
        IEBK=99                                                         CDYNDA    178
        GOTO 500                                                        CDYNDA    179
C                                                                       CDYNDA    180
      ENDIF                                                             CDYNDA    181
C ........................................................              CDYNDA    182
C                                                                       CDYNDA    183
  170 CONTINUE                                                          CDYNDA    184
C                                                                       CDYNDA    185
C  READING DETAILED GENERATOR DATA                                      CDYNDA    186
C                                                                       CDYNDA    187
      CALL ORDGED(ICODE,IUX,IUY,IEBK)                                   CDYNDA    188
      IF(IEBK.NE.0)THEN                                                 CDYNDA    189
         MSG(1)=' *** WARNING PROBLEM READING DETAILED GENERATOR DATA'  CDYNDA    190
         CALL PRTMSG(1)                                                 CDYNDA    191
         GOTO 600                                                       CDYNDA    192
      ENDIF                                                             CDYNDA    193
      GOTO 100                                                          CDYNDA    194
C                                                                       CDYNDA    195
  180 CONTINUE                                                          CDYNDA    196
C                                                                       CDYNDA    197
C  READING CLASSICAL GENERATOR DATA                                     CDYNDA    198
C                                                                       CDYNDA    199
      CALL ORCGED(ICODE,IUX,IUY,IEBK)                                   CDYNDA    200
      IF(IEBK.NE.0)THEN                                                 CDYNDA    201
        MSG(1)=' *** WARNING PROBLEM READING CLASSICAL GENERATOR DATA'  CDYNDA    202
        CALL PRTMSG(1)                                                  CDYNDA    203
        GOTO 600                                                        CDYNDA    204
      ENDIF                                                             CDYNDA    205
      GOTO 100                                                          CDYNDA    206
C                                                                       CDYNDA    207
  190 CONTINUE                                                          CDYNDA    208
C                                                                       CDYNDA    209
C  READING INFINITE BUS DATA                                            CDYNDA    210
C                                                                       CDYNDA    211
      CALL GETLIN(IUX,SIMBUF)                                           CDYNDA    212
      IF(SIMBUF(1:5).EQ.EDATA) GOTO 250                                 CDYNDA    213
      IF(KLFO.NE.0)THEN                                                 CDYNDA    214
C        ..........................................                     CDYNDA    215
C        :INFINITE BUS DATA IN ALFA-NUMERIC FORMAT:                     CDYNDA    216
C        :........................................:                     CDYNDA    217
         READ(SIMBUF,1160) (BUSR1(J),J=1,5)                             CDYNDA    218
         DO 210 J=1,5                                                   CDYNDA    219
         BUSNAM=BUSR1(J)                                                CDYNDA    220
         IF(BUSNAM.EQ.IBLK12)GOTO 210                                   CDYNDA    221
         CALL CHKBUS(BUSNAM,NLF)                                        CDYNDA    222
            IF(NLF.LE.0)THEN                                            CDYNDA    223
            WRITE(MSG(1),1035) BUSNAM                                   CDYNDA    224
            CALL PRTMSG(1)                                              CDYNDA    225
            GOTO 210                                                    CDYNDA    226
            ENDIF                                                       CDYNDA    227
         JIFBUS=JIFBUS+1                                                CDYNDA    228
            IF(JIFBUS.GT.NXM)THEN                                       CDYNDA    229
            WRITE(MSG(1),1045) BUSNAM                                   CDYNDA    230
            CALL PRTMSG(1)                                              CDYNDA    231
            IEBK=1                                                      CDYNDA    232
            GOTO 190                                                    CDYNDA    233
            ENDIF                                                       CDYNDA    234
         NIFBUS(JIFBUS)=NLF                                             CDYNDA    235
  210    CONTINUE                                                       CDYNDA    236
C                                                                       CDYNDA    237
       ELSE                                                             CDYNDA    238
C     .....................                                             CDYNDA    239
C     : BUS NUMBER FORMAT :                                             CDYNDA    240
C     :...................:                                             CDYNDA    241
         IF(SIMBUF(1:5).EQ.EDATA) GOTO 250                              CDYNDA    242
         READ(SIMBUF,1020) (INVBS(N),N=1,16)                            CDYNDA    243
         DO 240 N=1,16                                                  CDYNDA    244
           IF(INVBS(N).EQ.0) GOTO 240                                   CDYNDA    245
           NLF=INVBS(N)                                                 CDYNDA    246
           IF(MNEW(NLF).NE.0) GOTO 220                                  CDYNDA    247
           IEBK=1                                                       CDYNDA    248
           WRITE(MSG(1),1030) NLF                                       CDYNDA    249
           CALL PRTMSG(1)                                               CDYNDA    250
           GOTO 240                                                     CDYNDA    251
  220      CONTINUE                                                     CDYNDA    252
           JIFBUS=JIFBUS+1                                              CDYNDA    253
           IF(JIFBUS.GT.NXM)THEN                                        CDYNDA    254
           WRITE(MSG(1),1040) NLF                                       CDYNDA    255
           CALL PRTMSG(1)                                               CDYNDA    256
           IEBK=1                                                       CDYNDA    257
           GOTO 190                                                     CDYNDA    258
           ENDIF                                                        CDYNDA    259
           NIFBUS(JIFBUS)=NLF                                           CDYNDA    260
  240   CONTINUE                                                        CDYNDA    261
      ENDIF                                                             CDYNDA    262
C                                                                       CDYNDA    263
      GOTO 190                                                          CDYNDA    264
C                                                                       CDYNDA    265
  250 CONTINUE                                                          CDYNDA    266
      GOTO 100                                                          CDYNDA    267
  260 CONTINUE                                                          CDYNDA    268
C                                                                       CDYNDA    269
C  READING INDUCTION MOTOR DATA                                         CDYNDA    270
C                                                                       CDYNDA    271
      CALL ORIMOD(IUX,IUY,IEBK)                                         CDYNDA    272
C                                                                       CDYNDA    273
      GOTO 100                                                          CDYNDA    274
C                                                                       CDYNDA    275
  290 CONTINUE                                                          CDYNDA    276
C                                                                       CDYNDA    277
C  READING SVC DATA                                                     CDYNDA    278
C                                                                       CDYNDA    279
      CALL ORSVCD(IUX,IUY,IEBK)                                         CDYNDA    280
      GOTO 100                                                          CDYNDA    281
C                                                                       CDYNDA    282
  300 CONTINUE                                                          CDYNDA    283
C                                                                       CDYNDA    284
C  READING ULTC DATA                                                    CDYNDA    285
C                                                                       CDYNDA    286
      CALL RULTCD(IUX,IUY,IEBK)                                         CDYNDA    287
      GOTO 100                                                          CDYNDA    288
C                                                                       CDYNDA    289
  310 CONTINUE                                                          CDYNDA    290
C                                                                       CDYNDA    291
C  READING RANI DATA                                                    CDYNDA    292
C                                                                       CDYNDA    293
      CALL ORRAND(IUX,IUY,IEBK)                                         CDYNDA    294
      GOTO 100                                                          CDYNDA    295
C                                                                       CDYNDA    296
  320 CONTINUE                                                          CDYNDA    297
C                                                                       CDYNDA    298
C  READING STP DATA                                                     CDYNDA    299
C                                                                       CDYNDA    300
      CALL ORSTPD(IUX,IUY,IEBK)                                         CDYNDA    301
      GOTO 100                                                          CDYNDA    302
C                                                                       CDYNDA    303
  330 CONTINUE                                                          CDYNDA    304
C                                                                       CDYNDA    305
C  READING SDB DATA                                                     CDYNDA    306
C                                                                       CDYNDA    307
      CALL ORSDBD(IUX,IUY,IEBK)                                         CDYNDA    308
      GOTO 100                                                          CDYNDA    309
C                                                                       CDYNDA    310
  340 CONTINUE                                                          CDYNDA    311
C                                                                       CDYNDA    312
C  READING NON-LINEAR LOAD DATA                                         CDYNDA    313
C                                                                       CDYNDA    314
      CALL RNLBDA(IUX,IUY,IEBK)                                         CDYNDA    315
      GOTO 100                                                          CDYNDA    316
C                                                                       CDYNDA    317
C 350  CONTINUE                                                         CDYNDA    318
C                                                                       CDYNDA    319
C  READING NON-LINEAR LOAD DATA IN WSCC FORMAT                          CDYNDA    320
C                                                                       CDYNDA    321
C      CALL EPLDAT(IUX,IUY,IEBK)                                        CDYNDA    322
C      GOTO 100                                                         CDYNDA    323
  400 CONTINUE                                                          CDYNDA    324
C                                                                       CDYNDA    325
        MSG(1)=' *** WARNING MTDC DATA BLOCK EXISTS IN THE '//          CDYNDA    326
     *         'CURRENT DATA FILE.'                                     CDYNDA    327
        MSG(2)='     IT HAS TO BE SEPARATELY INCLUDED INTO THE '//      CDYNDA    328
     *         'NEW DATA FILE.'                                         CDYNDA    329
        MSG(3)='     IF ANY SUBSYSTEM BLOCKS ARE PRESENT IN '//         CDYNDA    330
     *         'MTDC DATA,'                                             CDYNDA    331
        MSG(4)='     SOME CHANGES MAY BE REQUIRED - '//                 CDYNDA    332
     *         'PLEASE REFER TO THE USER MANUAL'                        CDYNDA    333
        CALL PRTMSG(4)                                                  CDYNDA    334
        IEBK=0                                                          CDYNDA    335
        GOTO 500                                                        CDYNDA    336
C                                                                       CDYNDA    337
  490 CONTINUE                                                          CDYNDA    338
C                                                                       CDYNDA    339
        WRITE(MSG(1),1240) ISEM                                         CDYNDA    340
        CALL PRTMSG(1)                                                  CDYNDA    341
        IEBK=99                                                         CDYNDA    342
        GOTO 500                                                        CDYNDA    343
C                                                                       CDYNDA    344
  500 CONTINUE                                                          CDYNDA    345
C                                                                       CDYNDA    346
      IF(IEBK.NE.0) THEN                                                CDYNDA    347
        MSG(1)=' *** WARNING PROBLEM READING DYNAMIC DATA FILE'         CDYNDA    348
        CALL PRTMSG(1)                                                  CDYNDA    349
      ENDIF                                                             CDYNDA    350
C                                                                       CDYNDA    351
 600  CONTINUE                                                          CDYNDA    352
C                                                                       CDYNDA    353
      CALL CLOSEF(IUX)                                                  CDYNDA    354
C                                                                       CDYNDA    355
      RETURN                                                            CDYNDA    356
                                                                        CDYNDA    357
C                                                                       CDYNDA    358
 1010 FORMAT(1X,A4)                                                     CDYNDA    359
 1020 FORMAT(16I5)                                                      CDYNDA    360
 1030 FORMAT(' *** ERROR INFINITE BUS ',I5,' NOT IN BASED LOADFLOW')    CDYNDA    361
 1035 FORMAT(' *** ERROR INFINITE BUS ',A12,' NOT IN BASED LOADFLOW')   CDYNDA    362
 1040 FORMAT(' *** ERROR INFINITE BUS ',I5,' EXCEEDS THE LIMIT OF',I6)  CDYNDA    363
 1045 FORMAT(' *** ERROR INFINITE BUS ',A12,' EXCEEDS THE LIMIT OF',I6) CDYNDA    364
 1160 FORMAT(5A12)                                                      CDYNDA    365
 1220 FORMAT(6F9.5, 2I2)                                                CDYNDA    366
 1230 FORMAT(1X,'ISEM= #',A4,'#')                                       CDYNDA    367
 1240 FORMAT(' *** ERROR INVALID DATA BLOCK KEYWORD: ',A4)              CDYNDA    368
       END                                                              CDYNDA    369
