CFPRIME ACHAN                                                           ACHAN       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 ACHAN                                                  ACHAN       3
CD                                                                      ACHAN       4
CD    TO PROCESS THE USER SPECIFIED OUTPUT ANALYSIS DATA, SET UP        ACHAN       5
CD    POINTER ARRAYS, AND COUNT THE NUMBER OF ITEMS BEING MONITORED     ACHAN       6
CD    IN EACH MONITORING ACTIVITY.                                      ACHAN       7
CD                                                                      ACHAN       8
      INCLUDE 'PARX.INS'                                                ACHAN       9
      INCLUDE 'CNB0.INS'                                                ACHAN      10
      INCLUDE 'CNB1.INS'                                                ACHAN      11
      INCLUDE 'CNB6.INS'                                                ACHAN      12
      INCLUDE 'CNB8.INS'                                                ACHAN      13
      INCLUDE 'CNB10.INS'                                               ACHAN      14
      INCLUDE 'CNB19.INS'                                               ACHAN      15
      INCLUDE 'CNREC1.INS'                                              ACHAN      16
      INCLUDE 'CNNNEW.INS'                                              ACHAN      17
      INCLUDE 'CNMNEW.INS'                                              ACHAN      18
      INCLUDE 'CNSTN.INS'                                               ACHAN      19
      INCLUDE 'CNIPTR.INS'                                              ACHAN      20
      INCLUDE 'CNPT.INS'                                                ACHAN      21
      INCLUDE 'CNMDAT.INS'                                              ACHAN      22
      INCLUDE 'CNSDB.INS'                                               ACHAN      23
      INCLUDE 'CNRAN.INS'                                               ACHAN      24
      INCLUDE 'CNSTP.INS'                                               ACHAN      25
      INCLUDE 'CNIOUT.INS'                                              ACHAN      26
      INCLUDE 'CNFLAG.INS'                                              ACHAN      27
      INCLUDE 'CNUNIT.INS'                                              ACHAN      28
      INCLUDE 'CNMON.INS'                                               ACHAN      29
      INCLUDE 'CNQSTA.INS'                                              ACHAN      30
      INCLUDE 'EQQSTA.INS'                                              ACHAN      31
      INCLUDE 'GRDC01.INS'                                              ACHAN      32
      INCLUDE 'UDCA.INS'                                                ACHAN      33
      INCLUDE 'CNMSG.INS'                                               ACHAN      34
      INCLUDE 'CNPARX.INS'                                              ACHAN      35
C                                                                       ACHAN      36
      CHARACTER*2 CID,UID,MCID                                          ACHAN      37
      INTEGER*4 IUID                                                    ACHAN      38
      DIMENSION NCHAN(35)                                               ACHAN      39
      CHARACTER*4 ISIDAT(35)                                            ACHAN      40
C                                                                       ACHAN      41
      LOGICAL MXCHNL,LCHECK                                             ACHAN      42
C                                                                       ACHAN      43
      CHARACTER*29 CONAME                                               ACHAN      44
      CHARACTER*17 BLNAME                                               ACHAN      45
      CHARACTER*8  DCNAME                                               ACHAN      46
      CHARACTER*4  CNAME(8)                                             ACHAN      47
      INTEGER*4    KNAME(8)                                             ACHAN      48
      EQUIVALENCE (CONAME,BLNAME,DCNAME,CNAME(1),KNAME(1))              ACHAN      49
C                                                                       ACHAN      50
C                                                                       ACHAN      51
      DATA ISIDAT/'AGEO','BGEO','CGEO','GCOS','GOVV','GENS'             ACHAN      52
     &,'GYVA','AMOT','BMOT','ASVO','CONV','UDCO'                        ACHAN      53
     &,'ALOA','LINE','SLIN','MVBS','DVOL'                               ACHAN      54
     &,'UEXC','UPSS','UUEL','UGOV','USVC','URAN','USTC','USPS','USDB'   ACHAN      55
     &,'AFBO','BFBO','CFBO','FFBO','PWRA','PWRB','CANA','CANB','BWRA' / ACHAN      56
C                                                                       ACHAN      57
C               'AGEO','BGEO','CGEO','GCOS','GOVV','GENS','GYVA'        ACHAN      58
      DATA NCHAN/   4 ,    7 ,   12 ,    4 ,    5 ,    0 ,    0         ACHAN      59
C              ,'AMOT','BMOT','ASVO','CONV','UDCO','ALOA'               ACHAN      60
     &         ,    4 ,    6 ,    3 ,    7 ,    1 ,    5                ACHAN      61
C              ,'LINE','SLIN','MVBS','DVOL','UEXC'                      ACHAN      62
     &         ,    6 ,    2 ,    2 ,    1 ,    0                       ACHAN      63
C              ,'UPSS','UEXL','UGOV','USVC','URAN','USTC','USPS','USDB'/ACHAN      64
     &         ,    0 ,    0 ,    0 ,    0 ,    0 ,    0 ,    0 ,    0  ACHAN      65
C               'AFBO','BFBO','CFBO','FFBO','PWRA','PWRB','CANA','CANB' ACHAN      66
     &         ,   10 ,   20 ,   27 ,    9,     8,    17,     8,    17  ACHAN      67
C               'BWRA'                                                  ACHAN      68
     &         ,   22/                                                  ACHAN      69
C                                                                       ACHAN      70
      LDEB=(JDEB(31).NE.0)                                              ACHAN      71
CD                                                                      ACHAN      72
CD    NOTE:                                                             ACHAN      73
CD                                                                      ACHAN      74
CD    ICHAN  = STARTING CHANNEL NUMBER                                  ACHAN      75
CD    JSEM   = VARIABLE NUMBER                                          ACHAN      76
CD    ICHPOS = POSITION COUNTER OF KOPDAT ARRAY                         ACHAN      77
CD    NCHAN  = ARRAY STORING THE NUMBER OF CHANNELS FOR EACH VARIABLE   ACHAN      78
CD    IACHN  = NUMBER OF CHANNELS NEEDED FOR THE REQUIRED VARIABLE      ACHAN      79
CD                                                                      ACHAN      80
C                                                                       ACHAN      81
      IF(LDEB)WRITE(IUD6,5120) (NOPDAT(KK),KK=1,100)                    ACHAN      82
      MNBUF=NBUF                                                        ACHAN      83
      MXCHNL=.FALSE.                                                    ACHAN      84
      LCHECK=.FALSE.                                                    ACHAN      85
      NGENO=0                                                           ACHAN      86
      NGCOSO=0                                                          ACHAN      87
      NEXCO=0                                                           ACHAN      88
      NGOVVO=0                                                          ACHAN      89
      NGENSO=0                                                          ACHAN      90
      NGENYO=0                                                          ACHAN      91
      NMOTRO=0                                                          ACHAN      92
      NSVCO=0                                                           ACHAN      93
      NCONVO=0                                                          ACHAN      94
      NUDCO=0                                                           ACHAN      95
      NDVOLO=0                                                          ACHAN      96
      NLOADO=0                                                          ACHAN      97
      NLINEO=0                                                          ACHAN      98
      NINTEO=0                                                          ACHAN      99
C                                                                       ACHAN     100
      NUEXCO=0                                                          ACHAN     101
      NUPSSO=0                                                          ACHAN     102
      NUUELO=0                                                          ACHAN     103
      NUGOVO=0                                                          ACHAN     104
      NUSVCO=0                                                          ACHAN     105
      NURANO=0                                                          ACHAN     106
      NUSTCO=0                                                          ACHAN     107
      NUSPSO=0                                                          ACHAN     108
      NUSDBO=0                                                          ACHAN     109
      NFFBCO=0                                                          ACHAN     110
      NFBOUT=0                                                          ACHAN     111
      NPWRO =0                                                          ACHAN     112
      NCANO =0                                                          ACHAN     113
      NBWROT=0                                                          ACHAN     114
C                                                                       ACHAN     115
      ICHAN=10                                                          ACHAN     116
      ICHPOS=0                                                          ACHAN     117
      IPOS=0                                                            ACHAN     118
      NOPTR=0                                                           ACHAN     119
 100  CONTINUE                                                          ACHAN     120
      IPOSH=IPOS+1                                                      ACHAN     121
      IPOS=IPOS+2                                                       ACHAN     122
      JSEM=NOPDAT(IPOSH)                                                ACHAN     123
      NOPTR=NOPTR+1                                                     ACHAN     124
      KOPTR(NOPTR)=ICHPOS                                               ACHAN     125
      ICHPOS=ICHPOS+2                                                   ACHAN     126
      JCHPOS=ICHPOS                                                     ACHAN     127
      KOPDAT(JCHPOS-1)=JSEM                                             ACHAN     128
      IF(LDEB)WRITE(IUD6,5010) IPOSH,IPOS,NOPDAT(IPOSH),NOPDAT(IPOSH+1) ACHAN     129
      IF(JSEM.EQ.0)GOTO 1950                                            ACHAN     130
      ICOUNX=NOPDAT(IPOSH+1)                                            ACHAN     131
      KOPDAT(JCHPOS)=ICOUNX                                             ACHAN     132
      IF(ICOUNX.EQ.0)GOTO 100                                           ACHAN     133
      ICOUNT=0                                                          ACHAN     134
      IACHN=NCHAN(JSEM)                                                 ACHAN     135
      IF(IACHN.EQ.0)THEN                                                ACHAN     136
       IXX=5                                                            ACHAN     137
      ELSE                                                              ACHAN     138
       IXX=IACHN                                                        ACHAN     139
      ENDIF                                                             ACHAN     140
      MX=ICOUNX*IXX+50                                                  ACHAN     141
      IF(ICHAN.GT.(MNBUF-MX)) LCHECK=.TRUE.                             ACHAN     142
C                                                                       ACHAN     143
C          'AGEO','BGEO','CGEO','GCOS','GOVV','GENS','GYVA','AMOT','BMOTACHAN     144
      GOTO(  150 ,  150 ,  150 ,  250 ,  250 ,  350 ,  370 ,  470 ,  470ACHAN     145
C          'ASVO','CONV','UDCO','ALOA','LINE','SLIN','MVBS','DVOL','UEXCACHAN     146
     &    ,  500 ,  850 ,  950 ,  650 , 1000 , 1050 , 1100 , 1150 ,  390ACHAN     147
C         ,'UPSS','UEXL','UGOV','USVC','URAN','USTC','USPS','USDB'      ACHAN     148
     &    ,  410 ,  430 ,  450 ,  530 , 1200 , 1250 , 1270 , 1300       ACHAN     149
C          'AFBO','BFBO','CFBO','FFBO','PWRA','PWRB','CANA','CANB'      ACHAN     150
     &    ,  250 ,  250 ,  250 ,  250 ,  250 ,  250 ,  250 , 250        ACHAN     151
C          'BWRA'                                                       ACHAN     152
     &    ,  250),JSEM                                                  ACHAN     153
C                                                                       ACHAN     154
C                                                                       ACHAN     155
  150 CONTINUE                                                          ACHAN     156
      NLF=NOPDAT(IPOS+1)                                                ACHAN     157
      IUID=NOPDAT(IPOS+2)                                               ACHAN     158
      CALL UNPACK(UID,JJJ,IUID)                                         ACHAN     159
      IF(LDEB)WRITE(IUD6,5020) IPOS,NOPDAT(IPOS+1),NOPDAT(IPOS+2)       ACHAN     160
      IF(NLF.EQ.-1)THEN                                                 ACHAN     161
      ASSIGN 180 TO I180                                                ACHAN     162
      GOTO 2000                                                         ACHAN     163
      ELSE                                                              ACHAN     164
      IF (NLF.EQ.0) THEN                                                ACHAN     165
         IPBNO=0                                                        ACHAN     166
         IMAC=0                                                         ACHAN     167
         IPOS=IPOS+2                                                    ACHAN     168
         GOTO 170                                                       ACHAN     169
      END IF                                                            ACHAN     170
      IF(NLF.GT.N99999)THEN                                             ACHAN     171
      WRITE(MSG(1),6020) NLF                                            ACHAN     172
      WRITE(MSG(2),6030) N99999                                         ACHAN     173
      CALL PRTMSG(2)                                                    ACHAN     174
      IMAC=0                                                            ACHAN     175
      IPOS=IPOS+2                                                       ACHAN     176
      IPBNO=0                                                           ACHAN     177
      GOTO 170                                                          ACHAN     178
      ELSE                                                              ACHAN     179
      IPBNO=NNEW(NLF)                                                   ACHAN     180
      ENDIF                                                             ACHAN     181
      IPOS=IPOS+2                                                       ACHAN     182
      IF(IPBNO.GT.IPNODE)THEN                                           ACHAN     183
C                                                                       ACHAN     184
C                                                                       ACHAN     185
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN     186
C                                                                       ACHAN     187
        IPBNO3=3*IPBNO                                                  ACHAN     188
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN     189
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN     190
        WRITE(MSG(2),5001)                                              ACHAN     191
        CALL PRTMSG(2)                                                  ACHAN     192
        IPBNO=0                                                         ACHAN     193
        IMAC=0                                                          ACHAN     194
C                                                                       ACHAN     195
        ELSE                                                            ACHAN     196
C                                                                       ACHAN     197
C     GENERATOR                                                         ACHAN     198
C                                                                       ACHAN     199
        IF(IPBNO.NE.0)THEN                                              ACHAN     200
        IFIN=NTHG(IPBNO+1)-1                                            ACHAN     201
        IMAC=NTHG(IPBNO)-1                                              ACHAN     202
  160   IMAC=IMAC+1                                                     ACHAN     203
        IF(LDEB)WRITE(IUD6,5040) UID,NDGC(IMAC)                         ACHAN     204
        MCID=NDGC(IMAC)(3:4)                                            ACHAN     205
        CALL LOGEN(UID,MCID,JFOUND)                                     ACHAN     206
        IF(JFOUND.EQ.1)THEN                                             ACHAN     207
        IGENS=ICONTA(1,IMAC)                                            ACHAN     208
        IF(IGENS.EQ.3.OR.IGENS.EQ.7.OR.IGENS.EQ.11)THEN                 ACHAN     209
        IGENS=1                                                         ACHAN     210
        ELSE                                                            ACHAN     211
        IGENS=2                                                         ACHAN     212
        ENDIF                                                           ACHAN     213
        GOTO 170                                                        ACHAN     214
        ENDIF                                                           ACHAN     215
        IF(IMAC.LT.IFIN)GOTO 160                                        ACHAN     216
C                                                                       ACHAN     217
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN     218
C                                                                       ACHAN     219
        IPBNO3=3*IPBNO                                                  ACHAN     220
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN     221
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN     222
        WRITE(MSG(2),5001)                                              ACHAN     223
        CALL PRTMSG(2)                                                  ACHAN     224
        IPBNO=0                                                         ACHAN     225
        IMAC=0                                                          ACHAN     226
        ELSE                                                            ACHAN     227
C                                                                       ACHAN     228
C   WRITE ERROR MESSAGE NO SUCH BUS IN THE NETWORK                      ACHAN     229
C                                                                       ACHAN     230
        WRITE(MSG(1),5002)ISIDAT(JSEM),NLF                              ACHAN     231
        WRITE(MSG(2),5003)                                              ACHAN     232
        CALL PRTMSG(2)                                                  ACHAN     233
        IPBNO=0                                                         ACHAN     234
        IMAC=0                                                          ACHAN     235
        ENDIF                                                           ACHAN     236
        ENDIF                                                           ACHAN     237
C                                                                       ACHAN     238
  170   CONTINUE                                                        ACHAN     239
        KOPDAT(ICHPOS+1)=IPBNO                                          ACHAN     240
        KOPDAT(ICHPOS+2)=IMAC                                           ACHAN     241
        KOPDAT(ICHPOS+3)=ICHAN                                          ACHAN     242
        KOPDAT(ICHPOS+4)=IGENS                                          ACHAN     243
        ICHPOS=ICHPOS+4                                                 ACHAN     244
        ICHAN=ICHAN+IACHN                                               ACHAN     245
        IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                       ACHAN     246
        IF(MXCHNL)THEN                                                  ACHAN     247
           IPBNO3=3*IPBNO                                               ACHAN     248
           WRITE(MSG(1),5200) MNBUF                                     ACHAN     249
           WRITE(MSG(2),5210) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)          ACHAN     250
     *                       ,INAME(IPBNO3-1),INAME(IPBNO3),UID         ACHAN     251
           WRITE(MSG(3),5220)                                           ACHAN     252
           CALL PRTMSG(3)                                               ACHAN     253
           IF(ICOUNT.EQ.0) GOTO 1950                                    ACHAN     254
           KOPDAT(JCHPOS)=ICOUNT                                        ACHAN     255
           NOPTR=NOPTR+1                                                ACHAN     256
           GOTO 1950                                                    ACHAN     257
        ENDIF                                                           ACHAN     258
C                                                                       ACHAN     259
      ENDIF                                                             ACHAN     260
C                                                                       ACHAN     261
 180  CONTINUE                                                          ACHAN     262
C                                                                       ACHAN     263
      ICOUNT=ICOUNT+1                                                   ACHAN     264
      IF(ICOUNT.LT.ICOUNX) GOTO 150                                     ACHAN     265
      GOTO 100                                                          ACHAN     266
C                                                                       ACHAN     267
  250 CONTINUE                                                          ACHAN     268
      NLF=NOPDAT(IPOS+1)                                                ACHAN     269
      IF(LDEB)WRITE(IUD6,5020) IPOS,NOPDAT(IPOS+1),NOPDAT(IPOS+2)       ACHAN     270
      IUID=NOPDAT(IPOS+2)                                               ACHAN     271
      CALL UNPACK(UID,JJJ,IUID)                                         ACHAN     272
      IF(NLF.GT.N99999)THEN                                             ACHAN     273
      WRITE(MSG(1),6020) NLF                                            ACHAN     274
      WRITE(MSG(2),6030) N99999                                         ACHAN     275
      CALL PRTMSG(2)                                                    ACHAN     276
      IMAC=0                                                            ACHAN     277
      IPOS=IPOS+2                                                       ACHAN     278
      IPBNO=0                                                           ACHAN     279
      GOTO 270                                                          ACHAN     280
      ELSE                                                              ACHAN     281
      IPBNO=NNEW(NLF)                                                   ACHAN     282
      ENDIF                                                             ACHAN     283
      IPOS=IPOS+2                                                       ACHAN     284
        IF(IPBNO.GT.IPNODE)THEN                                         ACHAN     285
C                                                                       ACHAN     286
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN     287
C                                                                       ACHAN     288
        IPBNO3=3*IPBNO                                                  ACHAN     289
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN     290
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN     291
        WRITE(MSG(2),5001)                                              ACHAN     292
        CALL PRTMSG(2)                                                  ACHAN     293
        IPBNO=0                                                         ACHAN     294
        IMAC=0                                                          ACHAN     295
C                                                                       ACHAN     296
        ELSE                                                            ACHAN     297
C                                                                       ACHAN     298
C       GENERATOR                                                       ACHAN     299
C                                                                       ACHAN     300
        IF(IPBNO.NE.0)THEN                                              ACHAN     301
        IFIN=NTHG(IPBNO+1)-1                                            ACHAN     302
        IMAC=NTHG(IPBNO)-1                                              ACHAN     303
  260   IMAC=IMAC+1                                                     ACHAN     304
        IF(LDEB)WRITE(IUD6,5040) UID,NDGC(IMAC)                         ACHAN     305
        MCID=NDGC(IMAC)(3:4)                                            ACHAN     306
        CALL LOGEN(UID,MCID,JFOUND)                                     ACHAN     307
        IF(JFOUND.EQ.1)THEN                                             ACHAN     308
          IGENS=ICONTA(1,IMAC)                                          ACHAN     309
          IGVN=ICONTA(2,IMAC)                                           ACHAN     310
        IF(IGENS.EQ.3.OR.IGENS.EQ.7.OR.IGENS.EQ.11)THEN                 ACHAN     311
        IGENS=1                                                         ACHAN     312
        ELSE                                                            ACHAN     313
        IGENS=2                                                         ACHAN     314
        ENDIF                                                           ACHAN     315
             IF(JSEM.EQ.4)THEN                                          ACHAN     316
               IF(IGENS.EQ.2)THEN                                       ACHAN     317
               NGCOSO=NGCOSO+1                                          ACHAN     318
C                                                                       ACHAN     319
               ELSE                                                     ACHAN     320
C                                                                       ACHAN     321
C   WRITE ERROR MESSAGE GENERATOR HAS NO SUCH NO CONTROL SIGNALS        ACHAN     322
C                                                                       ACHAN     323
               IPBNO3=3*IPBNO                                           ACHAN     324
               WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)       ACHAN     325
     *                     ,INAME(IPBNO3-1),INAME(IPBNO3),UID           ACHAN     326
               WRITE(MSG(2),5005)                                       ACHAN     327
               CALL PRTMSG(2)                                           ACHAN     328
               IMAC=0                                                   ACHAN     329
               IPBNO=0                                                  ACHAN     330
               ENDIF                                                    ACHAN     331
               ELSEIF(JSEM.EQ.5)THEN                                    ACHAN     332
                 NGOVVO=NGOVVO+1                                        ACHAN     333
               ELSEIF(JSEM.EQ.30)THEN                                   ACHAN     334
                 NFFBCO=NFFBCO+1                                        ACHAN     335
                 IF (IGVN .LT. 41 .OR. IGVN .GT. 43) THEN               ACHAN     336
                   IPBNO3=3*IPBNO                                       ACHAN     337
                   WRITE(MSG(1),6040)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)   ACHAN     338
     *                              ,INAME(IPBNO3-1),INAME(IPBNO3),UID  ACHAN     339
                   WRITE(MSG(2),6050)                                   ACHAN     340
                   CALL PRTMSG(2)                                       ACHAN     341
                   IPBNO=0                                              ACHAN     342
                   IMAC=0                                               ACHAN     343
                 ELSE                                                   ACHAN     344
                   GOTO 270                                             ACHAN     345
                 END IF                                                 ACHAN     346
               ELSEIF(JSEM.GE.27.AND.JSEM.LE.29)THEN                    ACHAN     347
                 NFBOUT=NFBOUT+1                                        ACHAN     348
                 IF (IGVN .LT. 41 .OR. IGVN .GT. 43) THEN               ACHAN     349
                   IPBNO3=3*IPBNO                                       ACHAN     350
                   WRITE(MSG(1),6040)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)   ACHAN     351
     *                              ,INAME(IPBNO3-1),INAME(IPBNO3),UID  ACHAN     352
                   WRITE(MSG(2),6050)                                   ACHAN     353
                   CALL PRTMSG(2)                                       ACHAN     354
                   IPBNO=0                                              ACHAN     355
                   IMAC=0                                               ACHAN     356
                 ELSE                                                   ACHAN     357
                   GOTO 270                                             ACHAN     358
                 END IF                                                 ACHAN     359
               ELSEIF(JSEM.EQ.31.OR.JSEM.EQ.32)THEN                     ACHAN     360
                 NPWRO=NPWRO+1                                          ACHAN     361
                 IF (IGVN .NE. 45) THEN                                 ACHAN     362
                   IPBNO3=3*IPBNO                                       ACHAN     363
                   WRITE(MSG(1),6040)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)   ACHAN     364
     *                              ,INAME(IPBNO3-1),INAME(IPBNO3),UID  ACHAN     365
                   WRITE(MSG(2),6060)                                   ACHAN     366
                   CALL PRTMSG(2)                                       ACHAN     367
                   IPBNO=0                                              ACHAN     368
                   IMAC=0                                               ACHAN     369
                 ELSE                                                   ACHAN     370
                   GOTO 270                                             ACHAN     371
                 END IF                                                 ACHAN     372
               ELSEIF(JSEM.EQ.33.OR.JSEM.EQ.34)THEN                     ACHAN     373
                 NCANO=NCANO+1                                          ACHAN     374
                 IF (IGVN .NE. 44) THEN                                 ACHAN     375
                   IPBNO3=3*IPBNO                                       ACHAN     376
                   WRITE(MSG(1),6040)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)   ACHAN     377
     *                              ,INAME(IPBNO3-1),INAME(IPBNO3),UID  ACHAN     378
                   WRITE(MSG(2),6070)                                   ACHAN     379
                   CALL PRTMSG(2)                                       ACHAN     380
                   IPBNO=0                                              ACHAN     381
                   IMAC=0                                               ACHAN     382
                 ELSE                                                   ACHAN     383
                   GOTO 270                                             ACHAN     384
                 END IF                                                 ACHAN     385
               ELSEIF(JSEM.EQ.35)THEN                                   ACHAN     386
                 NBWROT=NBWROT+1                                        ACHAN     387
                 IF (IGVN .NE. 46) THEN                                 ACHAN     388
                   IPBNO3=3*IPBNO                                       ACHAN     389
                   WRITE(MSG(1),6040)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)   ACHAN     390
     *                              ,INAME(IPBNO3-1),INAME(IPBNO3),UID  ACHAN     391
                   WRITE(MSG(2),6080)                                   ACHAN     392
                   CALL PRTMSG(2)                                       ACHAN     393
                   IPBNO=0                                              ACHAN     394
                   IMAC=0                                               ACHAN     395
                 ELSE                                                   ACHAN     396
                   GOTO 270                                             ACHAN     397
                 END IF                                                 ACHAN     398
             ENDIF                                                      ACHAN     399
        GOTO 270                                                        ACHAN     400
        ENDIF                                                           ACHAN     401
        IF(IMAC.LT.IFIN)GOTO 260                                        ACHAN     402
C                                                                       ACHAN     403
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN     404
C                                                                       ACHAN     405
        IPBNO3=3*IPBNO                                                  ACHAN     406
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN     407
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN     408
        WRITE(MSG(2),5001)                                              ACHAN     409
        CALL PRTMSG(2)                                                  ACHAN     410
        IPBNO=0                                                         ACHAN     411
        IMAC=0                                                          ACHAN     412
        ELSE                                                            ACHAN     413
C                                                                       ACHAN     414
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN     415
C                                                                       ACHAN     416
        IPBNO3=3*IPBNO                                                  ACHAN     417
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN     418
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN     419
        WRITE(MSG(2),5001)                                              ACHAN     420
        CALL PRTMSG(2)                                                  ACHAN     421
        IPBNO=0                                                         ACHAN     422
        IMAC=0                                                          ACHAN     423
        ENDIF                                                           ACHAN     424
        ENDIF                                                           ACHAN     425
C                                                                       ACHAN     426
  270   CONTINUE                                                        ACHAN     427
        KOPDAT(ICHPOS+1)=IPBNO                                          ACHAN     428
        KOPDAT(ICHPOS+2)=IMAC                                           ACHAN     429
        KOPDAT(ICHPOS+3)=ICHAN                                          ACHAN     430
        ICHPOS=ICHPOS+3                                                 ACHAN     431
        ICHAN=ICHAN+IACHN                                               ACHAN     432
C                                                                       ACHAN     433
        IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                       ACHAN     434
        IF(MXCHNL)THEN                                                  ACHAN     435
           IPBNO3=3*IPBNO                                               ACHAN     436
           WRITE(MSG(1),5200) MNBUF                                     ACHAN     437
           WRITE(MSG(2),5210) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)          ACHAN     438
     *                       ,INAME(IPBNO3-1),INAME(IPBNO3),UID         ACHAN     439
           WRITE(MSG(3),5220)                                           ACHAN     440
           CALL PRTMSG(3)                                               ACHAN     441
           IF(ICOUNT.EQ.0) GOTO 1950                                    ACHAN     442
           KOPDAT(JCHPOS)=ICOUNT                                        ACHAN     443
           NOPTR=NOPTR+1                                                ACHAN     444
           GOTO 1950                                                    ACHAN     445
        ENDIF                                                           ACHAN     446
C                                                                       ACHAN     447
      ICOUNT=ICOUNT+1                                                   ACHAN     448
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     449
      GOTO 250                                                          ACHAN     450
      ELSE                                                              ACHAN     451
      GOTO 100                                                          ACHAN     452
      ENDIF                                                             ACHAN     453
C                                                                       ACHAN     454
 350  CONTINUE                                                          ACHAN     455
      ASSIGN 360 TO I2200                                               ACHAN     456
      GOTO 2200                                                         ACHAN     457
 360  CONTINUE                                                          ACHAN     458
      NGENSO=NGENSO+KO                                                  ACHAN     459
      GOTO 100                                                          ACHAN     460
 370  CONTINUE                                                          ACHAN     461
      ASSIGN 380 TO I2200                                               ACHAN     462
      GOTO 2200                                                         ACHAN     463
 380  CONTINUE                                                          ACHAN     464
      NGENYO=NGENYO+KO                                                  ACHAN     465
      GOTO 100                                                          ACHAN     466
 390  CONTINUE                                                          ACHAN     467
      ASSIGN 400 TO I2200                                               ACHAN     468
      GOTO 2200                                                         ACHAN     469
 400  CONTINUE                                                          ACHAN     470
      NUEXCO=NUEXCO+KO                                                  ACHAN     471
      GOTO 100                                                          ACHAN     472
 410  CONTINUE                                                          ACHAN     473
      ASSIGN 420 TO I2200                                               ACHAN     474
      GOTO 2200                                                         ACHAN     475
 420  CONTINUE                                                          ACHAN     476
      NUPSSO=NUPSSO+KO                                                  ACHAN     477
      GOTO 100                                                          ACHAN     478
 430  CONTINUE                                                          ACHAN     479
      ASSIGN 440 TO I2200                                               ACHAN     480
      GOTO 2200                                                         ACHAN     481
 440  CONTINUE                                                          ACHAN     482
      NUUELO=NUUELO+KO                                                  ACHAN     483
      GOTO 100                                                          ACHAN     484
 450  CONTINUE                                                          ACHAN     485
      ASSIGN 460 TO I2200                                               ACHAN     486
      GOTO 2200                                                         ACHAN     487
 460  CONTINUE                                                          ACHAN     488
      NUGOVO=NUGOVO+KO                                                  ACHAN     489
      GOTO 100                                                          ACHAN     490
C                                                                       ACHAN     491
 470  CONTINUE                                                          ACHAN     492
C                                                                       ACHAN     493
C   MOTOR BUS DATA                                                      ACHAN     494
C                                                                       ACHAN     495
      NLF=NOPDAT(IPOS+1)                                                ACHAN     496
      IUID=NOPDAT(IPOS+2)                                               ACHAN     497
      CALL UNPACK(UID,JJJ,IUID)                                         ACHAN     498
      IF(NLF.GT.N99999)THEN                                             ACHAN     499
      WRITE(MSG(1),6020) NLF                                            ACHAN     500
      WRITE(MSG(2),6030) N99999                                         ACHAN     501
      CALL PRTMSG(2)                                                    ACHAN     502
      KTHM=0                                                            ACHAN     503
      IPBNO=0                                                           ACHAN     504
      KOPDAT(ICHPOS+1)=IPBNO                                            ACHAN     505
      GOTO 495                                                          ACHAN     506
      ELSE                                                              ACHAN     507
      IPBNO=NNEW(NLF)                                                   ACHAN     508
      ENDIF                                                             ACHAN     509
      KOPDAT(ICHPOS+1)=IPBNO                                            ACHAN     510
      KTHM=0                                                            ACHAN     511
      IF(IPBNO.NE.0)THEN                                                ACHAN     512
         IMAC=NTHM(2,IPBNO)                                             ACHAN     513
 480     IF(IMAC.EQ.0)GOTO 490                                          ACHAN     514
         IF(UID.EQ.NDMC(IMAC)(3:4))THEN                                 ACHAN     515
            KTHM=IMAC                                                   ACHAN     516
            NMOTRO=NMOTRO+1                                             ACHAN     517
         ELSE                                                           ACHAN     518
            IMAC=NEXTIM(IMAC)                                           ACHAN     519
            GOTO 480                                                    ACHAN     520
         ENDIF                                                          ACHAN     521
      ENDIF                                                             ACHAN     522
 490  CONTINUE                                                          ACHAN     523
      IF (KTHM.EQ.0.AND.IPBNO.NE.0) THEN                                ACHAN     524
         IPBNO3=3*IPBNO                                                 ACHAN     525
         WRITE(MSG(1),6000) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)            ACHAN     526
     *                   ,INAME(IPBNO3-1),INAME(IPBNO3),UID             ACHAN     527
         WRITE(MSG(2),6010)                                             ACHAN     528
         CALL PRTMSG(2)                                                 ACHAN     529
      END IF                                                            ACHAN     530
 495  CONTINUE                                                          ACHAN     531
      KOPDAT(ICHPOS+2)=KTHM                                             ACHAN     532
      KOPDAT(ICHPOS+3)=ICHAN                                            ACHAN     533
      ICHPOS=ICHPOS+3                                                   ACHAN     534
      ICHAN=ICHAN+IACHN                                                 ACHAN     535
C                                                                       ACHAN     536
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     537
      IF(MXCHNL)THEN                                                    ACHAN     538
         IPBNO3=3*IPBNO                                                 ACHAN     539
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     540
         WRITE(MSG(2),5230) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)            ACHAN     541
     *                     ,INAME(IPBNO3-1),INAME(IPBNO3),UID           ACHAN     542
         WRITE(MSG(3),5220)                                             ACHAN     543
         CALL PRTMSG(3)                                                 ACHAN     544
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     545
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     546
         NOPTR=NOPTR+1                                                  ACHAN     547
         GOTO 1950                                                      ACHAN     548
      ENDIF                                                             ACHAN     549
C                                                                       ACHAN     550
      ICOUNT=ICOUNT+1                                                   ACHAN     551
      IPOS=IPOS+2                                                       ACHAN     552
      IF(ICOUNT.LT.ICOUNX) GOTO 470                                     ACHAN     553
      GOTO 100                                                          ACHAN     554
C                                                                       ACHAN     555
C   SVC BLOCK                                                           ACHAN     556
C                                                                       ACHAN     557
 500  CONTINUE                                                          ACHAN     558
      NLF=NOPDAT(IPOS+1)                                                ACHAN     559
      IF(NLF.GT.N99999)THEN                                             ACHAN     560
      WRITE(MSG(1),6020) NLF                                            ACHAN     561
      WRITE(MSG(2),6030) N99999                                         ACHAN     562
      CALL PRTMSG(2)                                                    ACHAN     563
      GOTO 520                                                          ACHAN     564
      ENDIF                                                             ACHAN     565
      IPBNO=NNEW(NLF)                                                   ACHAN     566
      ASSIGN 510 TO I2300                                               ACHAN     567
      GOTO 2300                                                         ACHAN     568
 510  CONTINUE                                                          ACHAN     569
      IF(KTHM.NE.0)NSVCO=NSVCO+1                                        ACHAN     570
      KOPDAT(ICHPOS+2)=NOPDAT(IPOS+2)                                   ACHAN     571
      KOPDAT(ICHPOS+3)=KTHM                                             ACHAN     572
      KOPDAT(ICHPOS+4)=ICHAN                                            ACHAN     573
      ICHPOS=ICHPOS+4                                                   ACHAN     574
      ICHAN=ICHAN+IACHN                                                 ACHAN     575
C                                                                       ACHAN     576
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     577
      IF(MXCHNL)THEN                                                    ACHAN     578
         IPBNO3=3*IPBNO                                                 ACHAN     579
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     580
         WRITE(MSG(2),5240) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)            ACHAN     581
     *                     ,INAME(IPBNO3-1),INAME(IPBNO3)               ACHAN     582
         WRITE(MSG(3),5220)                                             ACHAN     583
         CALL PRTMSG(3)                                                 ACHAN     584
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     585
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     586
         NOPTR=NOPTR+1                                                  ACHAN     587
         GOTO 1950                                                      ACHAN     588
      ENDIF                                                             ACHAN     589
C                                                                       ACHAN     590
 520  CONTINUE                                                          ACHAN     591
      IPOS=IPOS+2                                                       ACHAN     592
      ICOUNT=ICOUNT+1                                                   ACHAN     593
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     594
      GOTO 500                                                          ACHAN     595
      ELSE                                                              ACHAN     596
      GOTO 100                                                          ACHAN     597
      ENDIF                                                             ACHAN     598
C                                                                       ACHAN     599
 530  CONTINUE                                                          ACHAN     600
C                                                                       ACHAN     601
C    USVCO BLOCK OUTPUT                                                 ACHAN     602
C                                                                       ACHAN     603
      NLF=NOPDAT(IPOS+1)                                                ACHAN     604
      ITFK=NOPDAT(IPOS+2)                                               ACHAN     605
      CALL UNPACK(UID,KITEM,ITFK)                                       ACHAN     606
      IF(NLF.GT.N99999)THEN                                             ACHAN     607
      WRITE(MSG(1),6020) NLF                                            ACHAN     608
      WRITE(MSG(2),6030) N99999                                         ACHAN     609
      CALL PRTMSG(2)                                                    ACHAN     610
      IPOS=IPOS+2+KITEM                                                 ACHAN     611
      GOTO 560                                                          ACHAN     612
      ENDIF                                                             ACHAN     613
      IPBNO=NNEW(NLF)                                                   ACHAN     614
      ASSIGN 540 TO I2300                                               ACHAN     615
      GOTO 2300                                                         ACHAN     616
 540  CONTINUE                                                          ACHAN     617
      IF(KTHM.NE.0)NUSVCO=NUSVCO+1                                      ACHAN     618
      KOPDAT(ICHPOS+2)=NOPDAT(IPOS+2)                                   ACHAN     619
      KOPDAT(ICHPOS+3)=KTHM                                             ACHAN     620
      KOPDAT(ICHPOS+4)=ICHAN                                            ACHAN     621
      ICHPOS=ICHPOS+4                                                   ACHAN     622
      IPOS=IPOS+2                                                       ACHAN     623
C                                                                       ACHAN     624
      DO 550 KO=1,KITEM                                                 ACHAN     625
      ICHPOS=ICHPOS+1                                                   ACHAN     626
      IPOS=IPOS+1                                                       ACHAN     627
      ICHAN=ICHAN+1                                                     ACHAN     628
      KOPDAT(ICHPOS)=NOPDAT(IPOS)                                       ACHAN     629
 550  CONTINUE                                                          ACHAN     630
C                                                                       ACHAN     631
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     632
      IF(MXCHNL)THEN                                                    ACHAN     633
         IPBNO3=3*IPBNO                                                 ACHAN     634
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     635
         WRITE(MSG(2),5310) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)            ACHAN     636
     *                     ,INAME(IPBNO3-1),INAME(IPBNO3)               ACHAN     637
         WRITE(MSG(3),5220)                                             ACHAN     638
         CALL PRTMSG(3)                                                 ACHAN     639
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     640
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     641
         NOPTR=NOPTR+1                                                  ACHAN     642
         GOTO 1950                                                      ACHAN     643
      ENDIF                                                             ACHAN     644
C                                                                       ACHAN     645
 560  CONTINUE                                                          ACHAN     646
      ICOUNT=ICOUNT+1                                                   ACHAN     647
      IF(ICOUNT.LT.ICOUNX) GOTO 530                                     ACHAN     648
      GOTO 100                                                          ACHAN     649
C                                                                       ACHAN     650
 650  CONTINUE                                                          ACHAN     651
C                                                                       ACHAN     652
C   LOAD BUS DATA                                                       ACHAN     653
C                                                                       ACHAN     654
      NLF=NOPDAT(IPOS+1)                                                ACHAN     655
      NCOMP=0                                                           ACHAN     656
      IF(NLF.GT.N99999)THEN                                             ACHAN     657
         WRITE(MSG(1),6020) NLF                                         ACHAN     658
         WRITE(MSG(2),6030) N99999                                      ACHAN     659
         CALL PRTMSG(2)                                                 ACHAN     660
         KTHM=0                                                         ACHAN     661
         IPBNO=0                                                        ACHAN     662
         KOPDAT(ICHPOS+1)=IPBNO                                         ACHAN     663
         GOTO 680                                                       ACHAN     664
      ENDIF                                                             ACHAN     665
      IPBNO=NNEW(NLF)                                                   ACHAN     666
      KOPDAT(ICHPOS+1)=IPBNO                                            ACHAN     667
      IF(IPBNO.NE.0)THEN                                                ACHAN     668
         DO 660 II=1,NLOD                                               ACHAN     669
         IF(NLDOLD(II).EQ.IPBNO) GOTO 670                               ACHAN     670
 660     CONTINUE                                                       ACHAN     671
         IPBNO3=IPBNO*3                                                 ACHAN     672
         WRITE(MSG(1),5140)                                             ACHAN     673
         WRITE(MSG(2),5160) NLF,INAME(IPBNO3-2),INAME(IPBNO3-1)         ACHAN     674
     *                     ,INAME(IPBNO3)                               ACHAN     675
         MSG(3)='     NO POWER CALCULATION WILL BE PERFORMED'           ACHAN     676
         CALL PRTMSG(3)                                                 ACHAN     677
      ELSE                                                              ACHAN     678
         WRITE(MSG(1),5150) NLF                                         ACHAN     679
         MSG(2)='     NO POWER CALCULATION WILL BE PERFORMED'           ACHAN     680
         CALL PRTMSG(2)                                                 ACHAN     681
      ENDIF                                                             ACHAN     682
      KTHM=0                                                            ACHAN     683
      GOTO 680                                                          ACHAN     684
C                                                                       ACHAN     685
 670  NCOMP=NLCOMP(1,II)                                                ACHAN     686
      KTHM=NTHL(1,IPBNO)                                                ACHAN     687
      NLOADO=NLOADO+1                                                   ACHAN     688
 680  CONTINUE                                                          ACHAN     689
      KOPDAT(ICHPOS+2)=KTHM                                             ACHAN     690
      KOPDAT(ICHPOS+3)=ICHAN                                            ACHAN     691
      KOPDAT(ICHPOS+4)=NCOMP                                            ACHAN     692
      ICHPOS=ICHPOS+4                                                   ACHAN     693
      ICHAN=ICHAN+IACHN                                                 ACHAN     694
C                                                                       ACHAN     695
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     696
      IF(MXCHNL)THEN                                                    ACHAN     697
         IPBNO3=3*IPBNO                                                 ACHAN     698
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     699
         WRITE(MSG(2),5250) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)            ACHAN     700
     *                     ,INAME(IPBNO3-1),INAME(IPBNO3)               ACHAN     701
         WRITE(MSG(3),5220)                                             ACHAN     702
         CALL PRTMSG(3)                                                 ACHAN     703
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     704
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     705
         NOPTR=NOPTR+1                                                  ACHAN     706
         GOTO 1950                                                      ACHAN     707
      ENDIF                                                             ACHAN     708
C                                                                       ACHAN     709
      ICOUNT=ICOUNT+1                                                   ACHAN     710
      IPOS=IPOS+1                                                       ACHAN     711
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     712
      GOTO 650                                                          ACHAN     713
      ELSE                                                              ACHAN     714
      GOTO 100                                                          ACHAN     715
      ENDIF                                                             ACHAN     716
C                                                                       ACHAN     717
 850  CONTINUE                                                          ACHAN     718
C                                                                       ACHAN     719
C   CONVERTER BUS DATA                                                  ACHAN     720
C                                                                       ACHAN     721
      KNAME(1)=NOPDAT(IPOS+1)                                           ACHAN     722
      KNAME(2)=NOPDAT(IPOS+2)                                           ACHAN     723
      KNAME(3)=NOPDAT(IPOS+3)                                           ACHAN     724
      KNAME(4)=NOPDAT(IPOS+4)                                           ACHAN     725
      KNAME(5)=NOPDAT(IPOS+5)                                           ACHAN     726
      KNAME(6)=NOPDAT(IPOS+6)                                           ACHAN     727
      KNAME(7)=NOPDAT(IPOS+7)                                           ACHAN     728
      KNAME(8)=NOPDAT(IPOS+8)                                           ACHAN     729
C                                                                       ACHAN     730
C     MATCH CONVERTER                                                   ACHAN     731
C                                                                       ACHAN     732
      DO 860 KK=1,KCDC                                                  ACHAN     733
      JPOSN=IDC(KK)                                                     ACHAN     734
      IF(CONAME.EQ.DCCNAM(JPOSN)) GOTO 870                              ACHAN     735
 860  CONTINUE                                                          ACHAN     736
      JPOSN=0                                                           ACHAN     737
      WRITE(MSG(1),5090) CONAME                                         ACHAN     738
      CALL PRTMSG(1)                                                    ACHAN     739
 870  CONTINUE                                                          ACHAN     740
      NCONVO=NCONVO+1                                                   ACHAN     741
      KOPDAT(ICHPOS+1)=JPOSN                                            ACHAN     742
      KOPDAT(ICHPOS+2)=ICHAN                                            ACHAN     743
      ICHPOS=ICHPOS+2                                                   ACHAN     744
      ICHAN=ICHAN+IACHN                                                 ACHAN     745
C                                                                       ACHAN     746
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     747
      IF(MXCHNL)THEN                                                    ACHAN     748
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     749
         WRITE(MSG(2),5260) ISIDAT(JSEM),CONAME                         ACHAN     750
         WRITE(MSG(3),5220)                                             ACHAN     751
         CALL PRTMSG(3)                                                 ACHAN     752
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     753
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     754
         NOPTR=NOPTR+1                                                  ACHAN     755
         GOTO 1950                                                      ACHAN     756
      ENDIF                                                             ACHAN     757
C                                                                       ACHAN     758
      ICOUNT=ICOUNT+1                                                   ACHAN     759
      IPOS=IPOS+8                                                       ACHAN     760
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     761
      GOTO 850                                                          ACHAN     762
      ELSE                                                              ACHAN     763
      GOTO 100                                                          ACHAN     764
      ENDIF                                                             ACHAN     765
C                                                                       ACHAN     766
 950  CONTINUE                                                          ACHAN     767
C                                                                       ACHAN     768
C   UDC BLOCK DATA                                                      ACHAN     769
C                                                                       ACHAN     770
      KNAME(1)=NOPDAT(IPOS+1)                                           ACHAN     771
      KNAME(2)=NOPDAT(IPOS+2)                                           ACHAN     772
      KNAME(3)=NOPDAT(IPOS+3)                                           ACHAN     773
      KNAME(4)=NOPDAT(IPOS+4)                                           ACHAN     774
      KNAME(5)=NOPDAT(IPOS+5)                                           ACHAN     775
C                                                                       ACHAN     776
C     MATCH BLOCK NAME                                                  ACHAN     777
C                                                                       ACHAN     778
      DO 960 KK=1,IUDC                                                  ACHAN     779
      IF(BLNAME.EQ.UDNAME(KK))THEN                                      ACHAN     780
      NUDCO=NUDCO+1                                                     ACHAN     781
      GOTO 970                                                          ACHAN     782
      ENDIF                                                             ACHAN     783
 960  CONTINUE                                                          ACHAN     784
      KK=0                                                              ACHAN     785
      WRITE(MSG(1),5100) BLNAME                                         ACHAN     786
      CALL PRTMSG(1)                                                    ACHAN     787
 970  CONTINUE                                                          ACHAN     788
C                                                                       ACHAN     789
      KOPDAT(ICHPOS+1)=KK                                               ACHAN     790
      KOPDAT(ICHPOS+2)=ICHAN                                            ACHAN     791
      ICHPOS=ICHPOS+2                                                   ACHAN     792
      ICHAN=ICHAN+IACHN                                                 ACHAN     793
C                                                                       ACHAN     794
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     795
      IF(MXCHNL)THEN                                                    ACHAN     796
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     797
         WRITE(MSG(2),5270) ISIDAT(JSEM),BLNAME                         ACHAN     798
         WRITE(MSG(3),5220)                                             ACHAN     799
         CALL PRTMSG(3)                                                 ACHAN     800
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     801
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     802
         NOPTR=NOPTR+1                                                  ACHAN     803
         GOTO 1950                                                      ACHAN     804
      ENDIF                                                             ACHAN     805
C                                                                       ACHAN     806
      ICOUNT=ICOUNT+1                                                   ACHAN     807
      IPOS=IPOS+5                                                       ACHAN     808
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     809
      GOTO 950                                                          ACHAN     810
      ELSE                                                              ACHAN     811
      GOTO 100                                                          ACHAN     812
      ENDIF                                                             ACHAN     813
C                                                                       ACHAN     814
 1000 CONTINUE                                                          ACHAN     815
C                                                                       ACHAN     816
C   LINE DATA                                                           ACHAN     817
C                                                                       ACHAN     818
      NLINEO=NLINEO+1                                                   ACHAN     819
      LINENO=NOPDAT(IPOS+1)                                             ACHAN     820
      KOPDAT(ICHPOS+1)=LINENO                                           ACHAN     821
      KOPDAT(ICHPOS+2)=ICHAN                                            ACHAN     822
      ICHPOS=ICHPOS+2                                                   ACHAN     823
      ICHAN=ICHAN+IACHN                                                 ACHAN     824
C                                                                       ACHAN     825
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     826
      IF(MXCHNL)THEN                                                    ACHAN     827
         ILIN12=LINENO*12                                               ACHAN     828
         ITFK=MLFTB(ILIN12-10)                                          ACHAN     829
         CALL UPACKI(IPBNOF,IPBNOT,ITFK)                                ACHAN     830
         NLFF=NOLD(IPBNOF)                                              ACHAN     831
         NLFT=NOLD(IPBNOT)                                              ACHAN     832
         K3=IPBNOF*3                                                    ACHAN     833
         J3=IPBNOT*3                                                    ACHAN     834
         IUID=MACKT(ILIN12-9)                                           ACHAN     835
         CALL UNPACK(CID,JJJ,IUID)                                      ACHAN     836
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     837
         WRITE(MSG(2),5350) ISIDAT(JSEM),NLFF,INAME(K3-2),INAME(K3-1)   ACHAN     838
     *                     ,INAME(K3)                                   ACHAN     839
         WRITE(MSG(3),5360) NLFT,INAME(J3-2),INAME(J3-1),INAME(J3)      ACHAN     840
     *                          ,CID                                    ACHAN     841
         CALL PRTMSG(3)                                                 ACHAN     842
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     843
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     844
         NOPTR=NOPTR+1                                                  ACHAN     845
         GOTO 1950                                                      ACHAN     846
      ENDIF                                                             ACHAN     847
C                                                                       ACHAN     848
      ICOUNT=ICOUNT+1                                                   ACHAN     849
      IPOS=IPOS+1                                                       ACHAN     850
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     851
      GOTO 1000                                                         ACHAN     852
      ELSE                                                              ACHAN     853
      GOTO 100                                                          ACHAN     854
      ENDIF                                                             ACHAN     855
C                                                                       ACHAN     856
C   SUMING LINE FLOWS                                                   ACHAN     857
C                                                                       ACHAN     858
 1050 CONTINUE                                                          ACHAN     859
      NINTEO=NINTEO+1                                                   ACHAN     860
      KOPDAT(ICHPOS+1)=ICHAN                                            ACHAN     861
      JINTER=NOPDAT(IPOS+1)                                             ACHAN     862
      KOPDAT(ICHPOS+2)=JINTER                                           ACHAN     863
      JCOUNX=NOPDAT(IPOS+2)                                             ACHAN     864
      KOPDAT(ICHPOS+3)=JCOUNX                                           ACHAN     865
      ICHPOS=ICHPOS+3                                                   ACHAN     866
      IF(LDEB)WRITE(IUD6,5070) ICOUNT,JCOUNX,JINTER,IPOS                ACHAN     867
      IPOS=IPOS+2                                                       ACHAN     868
      ICHAN=ICHAN+IACHN                                                 ACHAN     869
C                                                                       ACHAN     870
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     871
      IF(MXCHNL)THEN                                                    ACHAN     872
         ILINE=NOPDAT(IPOS+1)                                           ACHAN     873
         ILIN12=ILINE*12                                                ACHAN     874
         ITFK=MLFTB(ILIN12-10)                                          ACHAN     875
         CALL UPACKI(IPBNOF,IPBNOT,ITFK)                                ACHAN     876
         NLFF=NOLD(IPBNOF)                                              ACHAN     877
         NLFT=NOLD(IPBNOT)                                              ACHAN     878
         K3=IPBNOF*3                                                    ACHAN     879
         J3=IPBNOT*3                                                    ACHAN     880
         IUID=MACKT(ILIN12-9)                                           ACHAN     881
         CALL UNPACK(CID,JJJ,IUID)                                      ACHAN     882
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     883
         WRITE(MSG(2),5370) ISIDAT(JSEM),NLFF,INAME(K3-2),INAME(K3-1)   ACHAN     884
     *                     ,INAME(K3)                                   ACHAN     885
         WRITE(MSG(3),5360) NLFT,INAME(J3-2),INAME(J3-1),INAME(J3)      ACHAN     886
     *                          ,CID                                    ACHAN     887
         CALL PRTMSG(3)                                                 ACHAN     888
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     889
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     890
         NOPTR=NOPTR+1                                                  ACHAN     891
         GOTO 1950                                                      ACHAN     892
      ENDIF                                                             ACHAN     893
C                                                                       ACHAN     894
      JCOUNT=0                                                          ACHAN     895
 1060 JCOUNT=JCOUNT+1                                                   ACHAN     896
C                                                                       ACHAN     897
C   LINE CONNECTION DATA                                                ACHAN     898
C                                                                       ACHAN     899
      LINENO=NOPDAT(IPOS+1)                                             ACHAN     900
      KOPDAT(ICHPOS+1)=LINENO                                           ACHAN     901
      ICHPOS=ICHPOS+1                                                   ACHAN     902
      IPOS=IPOS+1                                                       ACHAN     903
      IF(LDEB)WRITE(IUD6,5080) LINENO,IPOS,ICHPOS                       ACHAN     904
      IF(JCOUNT.LT.JCOUNX)GOTO 1060                                     ACHAN     905
      ICOUNT=ICOUNT+1                                                   ACHAN     906
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     907
      GOTO 1050                                                         ACHAN     908
      ELSE                                                              ACHAN     909
      GOTO 100                                                          ACHAN     910
      ENDIF                                                             ACHAN     911
C                                                                       ACHAN     912
 1100 CONTINUE                                                          ACHAN     913
C                                                                       ACHAN     914
C   BUS DATA                                                            ACHAN     915
C                                                                       ACHAN     916
      NLF=NOPDAT(IPOS+1)                                                ACHAN     917
      IF(NLF.GT.N99999)THEN                                             ACHAN     918
      WRITE(MSG(1),6020) NLF                                            ACHAN     919
      WRITE(MSG(2),6030) N99999                                         ACHAN     920
      CALL PRTMSG(2)                                                    ACHAN     921
      GOTO 1110                                                         ACHAN     922
      ELSE                                                              ACHAN     923
      IPBNO=NNEW(NLF)                                                   ACHAN     924
      KOPDAT(ICHPOS+1)=IPBNO                                            ACHAN     925
      KOPDAT(ICHPOS+2)=ICHAN                                            ACHAN     926
      ICHPOS=ICHPOS+2                                                   ACHAN     927
      ICHAN=ICHAN+IACHN                                                 ACHAN     928
C                                                                       ACHAN     929
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     930
      IF(MXCHNL)THEN                                                    ACHAN     931
         K3=NNEW(NLF)*3                                                 ACHAN     932
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     933
         WRITE(MSG(2),5280) ISIDAT(JSEM),NLF,INAME(K3-2),INAME(K3-1)    ACHAN     934
     *                     ,INAME(K3)                                   ACHAN     935
         WRITE(MSG(3),5220)                                             ACHAN     936
         CALL PRTMSG(3)                                                 ACHAN     937
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     938
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     939
         NOPTR=NOPTR+1                                                  ACHAN     940
         GOTO 1950                                                      ACHAN     941
      ENDIF                                                             ACHAN     942
      ENDIF                                                             ACHAN     943
C                                                                       ACHAN     944
 1110 CONTINUE                                                          ACHAN     945
      ICOUNT=ICOUNT+1                                                   ACHAN     946
      IPOS=IPOS+1                                                       ACHAN     947
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     948
      GOTO 1100                                                         ACHAN     949
      ELSE                                                              ACHAN     950
      GOTO 100                                                          ACHAN     951
      ENDIF                                                             ACHAN     952
C                                                                       ACHAN     953
 1150 CONTINUE                                                          ACHAN     954
C                                                                       ACHAN     955
C   DC BUS DATA                                                         ACHAN     956
C                                                                       ACHAN     957
      KNAME(1)=NOPDAT(IPOS+1)                                           ACHAN     958
      KNAME(2)=NOPDAT(IPOS+2)                                           ACHAN     959
C                                                                       ACHAN     960
C     MATCH DC BUS NAME                                                 ACHAN     961
C                                                                       ACHAN     962
      DO 1160 KK=1,NUMNOD                                               ACHAN     963
      IF(DCNAME.EQ.IDCNOD(KK))THEN                                      ACHAN     964
      NDVOLO=NDVOLO+1                                                   ACHAN     965
      GOTO 1170                                                         ACHAN     966
      ENDIF                                                             ACHAN     967
 1160 CONTINUE                                                          ACHAN     968
      KK=0                                                              ACHAN     969
      WRITE(MSG(1),5110) DCNAME                                         ACHAN     970
      CALL PRTMSG(1)                                                    ACHAN     971
 1170 CONTINUE                                                          ACHAN     972
C                                                                       ACHAN     973
      KOPDAT(ICHPOS+1)=KK                                               ACHAN     974
      KOPDAT(ICHPOS+2)=ICHAN                                            ACHAN     975
      ICHPOS=ICHPOS+2                                                   ACHAN     976
      ICHAN=ICHAN+IACHN                                                 ACHAN     977
C                                                                       ACHAN     978
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN     979
      IF(MXCHNL)THEN                                                    ACHAN     980
         WRITE(MSG(1),5200) MNBUF                                       ACHAN     981
         WRITE(MSG(2),5290) ISIDAT(JSEM),DCNAME                         ACHAN     982
         WRITE(MSG(3),5220)                                             ACHAN     983
         CALL PRTMSG(3)                                                 ACHAN     984
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN     985
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN     986
         NOPTR=NOPTR+1                                                  ACHAN     987
         GOTO 1950                                                      ACHAN     988
      ENDIF                                                             ACHAN     989
C                                                                       ACHAN     990
      ICOUNT=ICOUNT+1                                                   ACHAN     991
      IPOS=IPOS+2                                                       ACHAN     992
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN     993
      GOTO 1150                                                         ACHAN     994
      ELSE                                                              ACHAN     995
      GOTO 100                                                          ACHAN     996
      ENDIF                                                             ACHAN     997
C                                                                       ACHAN     998
 1200 CONTINUE                                                          ACHAN     999
C                                                                       ACHAN    1000
C   URAN BLOCK OUTPUTS DATA                                             ACHAN    1001
C                                                                       ACHAN    1002
      IMAC=NOPDAT(IPOS+1)                                               ACHAN    1003
      IF(IMAC.NE.0)NURANO=NURANO+1                                      ACHAN    1004
      ASSIGN 1200 TO I2350                                              ACHAN    1005
      GOTO 2350                                                         ACHAN    1006
C                                                                       ACHAN    1007
 1250 CONTINUE                                                          ACHAN    1008
C                                                                       ACHAN    1009
C   USTC BLOCK OUTPUTS DATA                                             ACHAN    1010
C                                                                       ACHAN    1011
      IMAC=NOPDAT(IPOS+1)                                               ACHAN    1012
      IF(IMAC.NE.0)NUSTCO=NUSTCO+1                                      ACHAN    1013
      ASSIGN 1250 TO I2350                                              ACHAN    1014
      GOTO 2350                                                         ACHAN    1015
C                                                                       ACHAN    1016
 1270 CONTINUE                                                          ACHAN    1017
C                                                                       ACHAN    1018
C   USPS BLOCK OUTPUTS DATA                                             ACHAN    1019
C                                                                       ACHAN    1020
      IMAC=NOPDAT(IPOS+1)                                               ACHAN    1021
      IF(IMAC.NE.0)NUSPSO=NUSPSO+1                                      ACHAN    1022
      ASSIGN 1270 TO I2350                                              ACHAN    1023
      GOTO 2350                                                         ACHAN    1024
C                                                                       ACHAN    1025
 1300 CONTINUE                                                          ACHAN    1026
C                                                                       ACHAN    1027
C   USDB BUS DATA                                                       ACHAN    1028
C                                                                       ACHAN    1029
      NLF=NOPDAT(IPOS+1)                                                ACHAN    1030
      IF(NLF.GT.N99999)THEN                                             ACHAN    1031
      WRITE(MSG(1),6020) NLF                                            ACHAN    1032
      WRITE(MSG(2),6030) N99999                                         ACHAN    1033
      CALL PRTMSG(2)                                                    ACHAN    1034
      KITEM=NOPDAT(IPOS+2)                                              ACHAN    1035
      IPOS=IPOS+2+KITEM                                                 ACHAN    1036
      KO=0                                                              ACHAN    1037
      GOTO 1340                                                         ACHAN    1038
      ENDIF                                                             ACHAN    1039
      IPBNO=NNEW(NLF)                                                   ACHAN    1040
      KOPDAT(ICHPOS+1)=IPBNO                                            ACHAN    1041
      KTHM=0                                                            ACHAN    1042
      DO 1310 I=1,NSDB                                                  ACHAN    1043
      JD=JDDAT(I)                                                       ACHAN    1044
      K=IDDAT(JD+1)                                                     ACHAN    1045
      IF(IPBNO.EQ.K)THEN                                                ACHAN    1046
      KTHM=I                                                            ACHAN    1047
      NUSDBO=NUSDBO+1                                                   ACHAN    1048
      GOTO 1320                                                         ACHAN    1049
      ENDIF                                                             ACHAN    1050
 1310 CONTINUE                                                          ACHAN    1051
 1320 CONTINUE                                                          ACHAN    1052
      KITEM=NOPDAT(IPOS+2)                                              ACHAN    1053
      KO=0                                                              ACHAN    1054
      KOPDAT(ICHPOS+2)=KTHM                                             ACHAN    1055
      KOPDAT(ICHPOS+3)=KITEM                                            ACHAN    1056
      KOPDAT(ICHPOS+4)=ICHAN                                            ACHAN    1057
      ICHPOS=ICHPOS+4                                                   ACHAN    1058
      IPOS=IPOS+2                                                       ACHAN    1059
 1330 KO=KO+1                                                           ACHAN    1060
      ICHPOS=ICHPOS+1                                                   ACHAN    1061
      IPOS=IPOS+1                                                       ACHAN    1062
      ICHAN=ICHAN+1                                                     ACHAN    1063
      KOPDAT(ICHPOS)=NOPDAT(IPOS)                                       ACHAN    1064
      IF(KO.LT.KITEM)GOTO 1330                                          ACHAN    1065
C                                                                       ACHAN    1066
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN    1067
      IF(MXCHNL)THEN                                                    ACHAN    1068
         K3=IPBNO*3                                                     ACHAN    1069
         WRITE(MSG(1),5200) MNBUF                                       ACHAN    1070
         WRITE(MSG(2),5300) ISIDAT(JSEM),NLF,INAME(K3-2),INAME(K3-1)    ACHAN    1071
     *                     ,INAME(K3)                                   ACHAN    1072
         WRITE(MSG(3),5220)                                             ACHAN    1073
         CALL PRTMSG(3)                                                 ACHAN    1074
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN    1075
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN    1076
         NOPTR=NOPTR+1                                                  ACHAN    1077
         GOTO 1950                                                      ACHAN    1078
      ENDIF                                                             ACHAN    1079
C                                                                       ACHAN    1080
 1340 CONTINUE                                                          ACHAN    1081
      ICOUNT=ICOUNT+1                                                   ACHAN    1082
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN    1083
      GOTO 1300                                                         ACHAN    1084
      ELSE                                                              ACHAN    1085
      GOTO 100                                                          ACHAN    1086
      ENDIF                                                             ACHAN    1087
C                                                                       ACHAN    1088
 1950 CONTINUE                                                          ACHAN    1089
C                                                                       ACHAN    1090
      NOPTR=NOPTR-1                                                     ACHAN    1091
      IF(LDEB)THEN                                                      ACHAN    1092
      WRITE(IUD6,5050) (KOPDAT(KK),KK=1,200)                            ACHAN    1093
      WRITE(IUD6,5060) (KOPTR(KK),KK=1,NOPTR)                           ACHAN    1094
      ENDIF                                                             ACHAN    1095
      RETURN                                                            ACHAN    1096
C                                                                       ACHAN    1097
 2000 CONTINUE                                                          ACHAN    1098
C                                                                       ACHAN    1099
C  PROCESS THE RANGED BUS DATA                                          ACHAN    1100
C                                                                       ACHAN    1101
      IAF=NOPDAT(IPOS+3)                                                ACHAN    1102
      IAT=NOPDAT(IPOS+4)                                                ACHAN    1103
      IZF=NOPDAT(IPOS+5)                                                ACHAN    1104
      IZT=NOPDAT(IPOS+6)                                                ACHAN    1105
      ILFBF=NOPDAT(IPOS+7)                                              ACHAN    1106
      ILFBT=NOPDAT(IPOS+8)                                              ACHAN    1107
      IGMVAF=NOPDAT(IPOS+9)                                             ACHAN    1108
      IGMVAT=NOPDAT(IPOS+10)                                            ACHAN    1109
      IPOS=IPOS+10                                                      ACHAN    1110
C                                                                       ACHAN    1111
C   SET BUS NUMBER RANGE                                                ACHAN    1112
C                                                                       ACHAN    1113
      IF(ILFBT.LT.ILFBF)THEN                                            ACHAN    1114
      I=ILFBF                                                           ACHAN    1115
      ILFBF=ILFBT                                                       ACHAN    1116
      ILFBT=I                                                           ACHAN    1117
      ENDIF                                                             ACHAN    1118
      IF(ILFBF.EQ.0)THEN                                                ACHAN    1119
      ILFBF=1                                                           ACHAN    1120
      ILFBT=LBUSNO                                                      ACHAN    1121
      ENDIF                                                             ACHAN    1122
C                                                                       ACHAN    1123
C   SET AREA GRID                                                       ACHAN    1124
C                                                                       ACHAN    1125
      IF(IAT.LT.IAF)THEN                                                ACHAN    1126
      I=IAF                                                             ACHAN    1127
      IAF=IAT                                                           ACHAN    1128
      IAT=I                                                             ACHAN    1129
      ENDIF                                                             ACHAN    1130
      IF(IAF.EQ.0)THEN                                                  ACHAN    1131
      IAF=1                                                             ACHAN    1132
      IAT=100                                                           ACHAN    1133
      ENDIF                                                             ACHAN    1134
C                                                                       ACHAN    1135
      CALL LMOVE(0,IRAREA,100)                                          ACHAN    1136
C                                                                       ACHAN    1137
C MULTI AREA                                                            ACHAN    1138
C                                                                       ACHAN    1139
      IF(IAT.NE.0)THEN                                                  ACHAN    1140
      DO 2010 I=IAF,IAT                                                 ACHAN    1141
      IRAREA(I)=.TRUE.                                                  ACHAN    1142
 2010 CONTINUE                                                          ACHAN    1143
C                                                                       ACHAN    1144
C SINGLE AREA                                                           ACHAN    1145
C                                                                       ACHAN    1146
      ELSE                                                              ACHAN    1147
      IRAREA(IAF)=.TRUE.                                                ACHAN    1148
      ENDIF                                                             ACHAN    1149
C                                                                       ACHAN    1150
C SET ZONE GRID                                                         ACHAN    1151
C                                                                       ACHAN    1152
      IF(IZT.LT.IZF)THEN                                                ACHAN    1153
      I=IZF                                                             ACHAN    1154
      IZF=IZT                                                           ACHAN    1155
      IZT=I                                                             ACHAN    1156
      ENDIF                                                             ACHAN    1157
      IZF=IZF+1                                                         ACHAN    1158
      IZT=IZT+1                                                         ACHAN    1159
C                                                                       ACHAN    1160
      CALL LMOVE(0,IRZONE,100)                                          ACHAN    1161
C                                                                       ACHAN    1162
      DO 2020 I=IZF,IZT                                                 ACHAN    1163
      IRZONE(I)=.TRUE.                                                  ACHAN    1164
 2020 CONTINUE                                                          ACHAN    1165
C                                                                       ACHAN    1166
C   SET MVA BASE RANGE                                                  ACHAN    1167
C                                                                       ACHAN    1168
      IF(IGMVAT.LT.IGMVAF)THEN                                          ACHAN    1169
      I=IGMVAF                                                          ACHAN    1170
      IGMVAF=IGMVAT                                                     ACHAN    1171
      IGMVAT=I                                                          ACHAN    1172
      ENDIF                                                             ACHAN    1173
      IF(IGMVAT.EQ.0)THEN                                               ACHAN    1174
      IGMVAF=-1                                                         ACHAN    1175
      IGMVAT=10000                                                      ACHAN    1176
      ENDIF                                                             ACHAN    1177
      GMVAF=REAL(IGMVAF)                                                ACHAN    1178
      GMVAF=GMVAF/BASPC                                                 ACHAN    1179
      GMVAF=GMVAF**2                                                    ACHAN    1180
      GMVAT=FLOAT(IGMVAT)                                               ACHAN    1181
      GMVAT=GMVAT/BASPC                                                 ACHAN    1182
      GMVAT=GMVAT**2                                                    ACHAN    1183
C                                                                       ACHAN    1184
      IREQBU=0                                                          ACHAN    1185
      NPBNOT=ICNODX-1                                                   ACHAN    1186
C                                                                       ACHAN    1187
      IF(NPBNOT.LE.0)GOTO 2070                                          ACHAN    1188
      IPBNO=0                                                           ACHAN    1189
 2060 IPBNO=IPBNO+1                                                     ACHAN    1190
C                                                                       ACHAN    1191
      IL=NBARZO(IPBNO)                                                  ACHAN    1192
      CALL UPACKI(IZONE,IBARK,IL)                                       ACHAN    1193
      IZONE1=IZONE+1                                                    ACHAN    1194
C                                                                       ACHAN    1195
C   WITHIN AREA ZONE AND MVA RANGE                                      ACHAN    1196
C                                                                       ACHAN    1197
      IF(IRZONE(IZONE1).AND.IRAREA(IBARK))THEN                          ACHAN    1198
      NLF=NOLD(IPBNO)                                                   ACHAN    1199
        IF(ILFBF.LE.NLF.AND.NLF.LE.ILFBT)THEN                           ACHAN    1200
           IF(IPBNO.GT.IPNODE)THEN                                      ACHAN    1201
C                                                                       ACHAN    1202
           GOTO 2060                                                    ACHAN    1203
C                                                                       ACHAN    1204
           ELSE                                                         ACHAN    1205
C                                                                       ACHAN    1206
C          GENERATOR                                                    ACHAN    1207
C                                                                       ACHAN    1208
           IFIN=NTHG(IPBNO+1)-1                                         ACHAN    1209
           IMAC=NTHG(IPBNO)-1                                           ACHAN    1210
 2030      IMAC=IMAC+1                                                  ACHAN    1211
           XGMVA=PDGT(1,IMAC)**2+PDGT(2,IMAC)**2                        ACHAN    1212
           IF(XGMVA.GE.GMVAF.AND.XGMVA.LE.GMVAT)THEN                    ACHAN    1213
           KOPDAT(ICHPOS+1)=IPBNO                                       ACHAN    1214
           KOPDAT(ICHPOS+2)=IMAC                                        ACHAN    1215
           KOPDAT(ICHPOS+3)=ICHAN                                       ACHAN    1216
           ICHPOS=ICHPOS+4                                              ACHAN    1217
           IGENS=ICONTA(1,IMAC)                                         ACHAN    1218
           IF(IGENS.EQ.3.OR.IGENS.EQ.7.OR.IGENS.EQ.11)THEN              ACHAN    1219
           IGENS=1                                                      ACHAN    1220
           ICHAN=ICHAN+MIN0(6,IACHN)                                    ACHAN    1221
           NGENO=NGENO+1                                                ACHAN    1222
           ELSE                                                         ACHAN    1223
           IGENS=2                                                      ACHAN    1224
           ICHAN=ICHAN+IACHN                                            ACHAN    1225
           ENDIF                                                        ACHAN    1226
           KOPDAT(ICHPOS+4)=IGENS                                       ACHAN    1227
           ENDIF                                                        ACHAN    1228
 2040      IF(IMAC.LT.IFIN)GOTO 2030                                    ACHAN    1229
           ENDIF                                                        ACHAN    1230
        ENDIF                                                           ACHAN    1231
      ENDIF                                                             ACHAN    1232
      IF(IPBNO.LT.NPBNOT)GOTO 2060                                      ACHAN    1233
 2070 CONTINUE                                                          ACHAN    1234
C                                                                       ACHAN    1235
      GOTO I180                                                         ACHAN    1236
C                                                                       ACHAN    1237
 2200 CONTINUE                                                          ACHAN    1238
      NLF=NOPDAT(IPOS+1)                                                ACHAN    1239
      IF(LDEB)WRITE(IUD6,5020) IPOS,NOPDAT(IPOS+1),NOPDAT(IPOS+2)       ACHAN    1240
      IUID=NOPDAT(IPOS+2)                                               ACHAN    1241
      CALL UNPACK(UID,JJJ,IUID)                                         ACHAN    1242
      IF(NLF.GT.N99999)THEN                                             ACHAN    1243
      WRITE(MSG(1),6020) NLF                                            ACHAN    1244
      WRITE(MSG(2),6030) N99999                                         ACHAN    1245
      CALL PRTMSG(2)                                                    ACHAN    1246
      NSTAT=NOPDAT(IPOS+3)                                              ACHAN    1247
      IPOS=IPOS+3+NSTAT                                                 ACHAN    1248
      GOTO 2240                                                         ACHAN    1249
      ENDIF                                                             ACHAN    1250
      IPBNO=NNEW(NLF)                                                   ACHAN    1251
      NSTAT=NOPDAT(IPOS+3)                                              ACHAN    1252
      IPOS=IPOS+3                                                       ACHAN    1253
        IF(IPBNO.GT.IPNODE)THEN                                         ACHAN    1254
C                                                                       ACHAN    1255
           IPBNO3=3*IPBNO                                               ACHAN    1256
           WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)           ACHAN    1257
     *                   ,INAME(IPBNO3-1),INAME(IPBNO3),UID             ACHAN    1258
           WRITE(MSG(2),5001)                                           ACHAN    1259
           CALL PRTMSG(2)                                               ACHAN    1260
           IPBNO=0                                                      ACHAN    1261
           IMAC=0                                                       ACHAN    1262
           IF(LDEB)WRITE(IUD6,5020) IMAC,IPNODE,NT,IPBNO                ACHAN    1263
           GOTO 2220                                                    ACHAN    1264
C                                                                       ACHAN    1265
C                                                                       ACHAN    1266
        ELSE                                                            ACHAN    1267
C                                                                       ACHAN    1268
C       GENERATOR                                                       ACHAN    1269
C                                                                       ACHAN    1270
        IF(IPBNO.NE.0)THEN                                              ACHAN    1271
        IFIN=NTHG(IPBNO+1)-1                                            ACHAN    1272
        IMAC=NTHG(IPBNO)-1                                              ACHAN    1273
 2210   IMAC=IMAC+1                                                     ACHAN    1274
        IF(LDEB)WRITE(IUD6,5040) UID,NDGC(IMAC)                         ACHAN    1275
        MCID=NDGC(IMAC)(3:4)                                            ACHAN    1276
        CALL LOGEN(UID,MCID,JFOUND)                                     ACHAN    1277
        IF(JFOUND.EQ.1)THEN                                             ACHAN    1278
        KO=KO+1                                                         ACHAN    1279
        GOTO 2220                                                       ACHAN    1280
        ENDIF                                                           ACHAN    1281
        IF(IMAC.LT.IFIN)GOTO 2210                                       ACHAN    1282
C                                                                       ACHAN    1283
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN    1284
C                                                                       ACHAN    1285
        IPBNO3=3*IPBNO                                                  ACHAN    1286
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN    1287
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN    1288
        WRITE(MSG(2),5001)                                              ACHAN    1289
        CALL PRTMSG(2)                                                  ACHAN    1290
        IPBNO=0                                                         ACHAN    1291
        IMAC=0                                                          ACHAN    1292
C                                                                       ACHAN    1293
        ELSE                                                            ACHAN    1294
C                                                                       ACHAN    1295
C   WRITE ERROR MESSAGE NO SUCH GENERATOR                               ACHAN    1296
C                                                                       ACHAN    1297
        IPBNO3=3*IPBNO                                                  ACHAN    1298
        WRITE(MSG(1),5000)ISIDAT(JSEM),NLF,INAME(IPBNO3-2)              ACHAN    1299
     *                ,INAME(IPBNO3-1),INAME(IPBNO3),UID                ACHAN    1300
        WRITE(MSG(2),5001)                                              ACHAN    1301
        CALL PRTMSG(2)                                                  ACHAN    1302
        IPBNO=0                                                         ACHAN    1303
        IMAC=0                                                          ACHAN    1304
C                                                                       ACHAN    1305
        ENDIF                                                           ACHAN    1306
        ENDIF                                                           ACHAN    1307
C                                                                       ACHAN    1308
 2220   CONTINUE                                                        ACHAN    1309
        KOPDAT(ICHPOS+1)=IPBNO                                          ACHAN    1310
        KOPDAT(ICHPOS+2)=IMAC                                           ACHAN    1311
        KOPDAT(ICHPOS+3)=NSTAT                                          ACHAN    1312
        KOPDAT(ICHPOS+4)=ICHAN                                          ACHAN    1313
        ICHPOS=ICHPOS+4                                                 ACHAN    1314
        DO 2230 LK=1,NSTAT                                              ACHAN    1315
        KOPDAT(ICHPOS+LK)=NOPDAT(IPOS+LK)                               ACHAN    1316
        ICHAN=ICHAN+1                                                   ACHAN    1317
 2230   CONTINUE                                                        ACHAN    1318
        ICHPOS=ICHPOS+NSTAT                                             ACHAN    1319
        IPOS=IPOS+NSTAT                                                 ACHAN    1320
C                                                                       ACHAN    1321
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN    1322
      IF(MXCHNL)THEN                                                    ACHAN    1323
         IPBNO3=3*IPBNO                                                 ACHAN    1324
         WRITE(MSG(1),5200) MNBUF                                       ACHAN    1325
         WRITE(MSG(1),5210) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)            ACHAN    1326
     *                     ,INAME(IPBNO3-1),INAME(IPBNO3),UID           ACHAN    1327
         WRITE(MSG(3),5220)                                             ACHAN    1328
         CALL PRTMSG(3)                                                 ACHAN    1329
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN    1330
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN    1331
         NOPTR=NOPTR+1                                                  ACHAN    1332
         GOTO 1950                                                      ACHAN    1333
      ENDIF                                                             ACHAN    1334
C                                                                       ACHAN    1335
 2240 CONTINUE                                                          ACHAN    1336
      ICOUNT=ICOUNT+1                                                   ACHAN    1337
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN    1338
      GOTO 2200                                                         ACHAN    1339
      ELSE                                                              ACHAN    1340
      GOTO I2200                                                        ACHAN    1341
      ENDIF                                                             ACHAN    1342
C                                                                       ACHAN    1343
C   SVC BUS DATA                                                        ACHAN    1344
C                                                                       ACHAN    1345
 2300 CONTINUE                                                          ACHAN    1346
      KOPDAT(ICHPOS+1)=IPBNO                                            ACHAN    1347
      IF(IPBNO.NE.0)THEN                                                ACHAN    1348
      KTHM=NTHSR(3,IPBNO)                                               ACHAN    1349
      ELSE                                                              ACHAN    1350
      KTHM=0                                                            ACHAN    1351
      ENDIF                                                             ACHAN    1352
      GOTO I2300                                                        ACHAN    1353
C                                                                       ACHAN    1354
C   URAN USTC AND USPS BLOCK OUTPUTS                                    ACHAN    1355
C                                                                       ACHAN    1356
 2350 CONTINUE                                                          ACHAN    1357
      KITEM=NOPDAT(IPOS+2)                                              ACHAN    1358
      KOPDAT(ICHPOS+1)=IMAC                                             ACHAN    1359
      KOPDAT(ICHPOS+2)=KITEM                                            ACHAN    1360
      KOPDAT(ICHPOS+3)=ICHAN                                            ACHAN    1361
      ICHPOS=ICHPOS+3                                                   ACHAN    1362
      IPOS=IPOS+2                                                       ACHAN    1363
      KO=0                                                              ACHAN    1364
 2360 KO=KO+1                                                           ACHAN    1365
      ICHPOS=ICHPOS+1                                                   ACHAN    1366
      IPOS=IPOS+1                                                       ACHAN    1367
      ICHAN=ICHAN+1                                                     ACHAN    1368
      KOPDAT(ICHPOS)=NOPDAT(IPOS)                                       ACHAN    1369
      IF(KO.LT.KITEM)GOTO 2360                                          ACHAN    1370
C                                                                       ACHAN    1371
      IF(LCHECK) CALL MCHNL(ICHAN,MXCHNL,MNBUF)                         ACHAN    1372
      IF(MXCHNL)THEN                                                    ACHAN    1373
         IF(JSEM.EQ.23)THEN                                             ACHAN    1374
            NLF=JRDAT(IMAC)                                             ACHAN    1375
         ELSE                                                           ACHAN    1376
            NLF=JTPDAT(IMAC)                                            ACHAN    1377
         ENDIF                                                          ACHAN    1378
         IPBNO=NNEW(NLF)                                                ACHAN    1379
         IPBNO3=3*IPBNO                                                 ACHAN    1380
         WRITE(MSG(1),5200) MNBUF                                       ACHAN    1381
         IF(JSEM.EQ.23)THEN                                             ACHAN    1382
            WRITE(MSG(1),5320) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)         ACHAN    1383
     *                        ,INAME(IPBNO3-1),INAME(IPBNO3)            ACHAN    1384
         ELSEIF(JSEM.EQ.24)THEN                                         ACHAN    1385
            WRITE(MSG(1),5330) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)         ACHAN    1386
     *                        ,INAME(IPBNO3-1),INAME(IPBNO3)            ACHAN    1387
         ELSE                                                           ACHAN    1388
            WRITE(MSG(1),5340) ISIDAT(JSEM),NLF,INAME(IPBNO3-2)         ACHAN    1389
     *                        ,INAME(IPBNO3-1),INAME(IPBNO3)            ACHAN    1390
         ENDIF                                                          ACHAN    1391
         WRITE(MSG(3),5220)                                             ACHAN    1392
         CALL PRTMSG(3)                                                 ACHAN    1393
         IF(ICOUNT.EQ.0) GOTO 1950                                      ACHAN    1394
         KOPDAT(JCHPOS)=ICOUNT                                          ACHAN    1395
         NOPTR=NOPTR+1                                                  ACHAN    1396
         GOTO 1950                                                      ACHAN    1397
      ENDIF                                                             ACHAN    1398
C                                                                       ACHAN    1399
      ICOUNT=ICOUNT+1                                                   ACHAN    1400
      IF(ICOUNT.LT.ICOUNX)THEN                                          ACHAN    1401
      GOTO I2350                                                        ACHAN    1402
      ELSE                                                              ACHAN    1403
      GOTO 100                                                          ACHAN    1404
      ENDIF                                                             ACHAN    1405
C                                                                       ACHAN    1406
 5000 FORMAT(' *** WARNING ',A4,' GENERATOR AT BUS: ',I5,' STATION: '   ACHAN    1407
     *,3A4,:,' GID: ',A2)                                               ACHAN    1408
 5001 FORMAT(5X,'IS NOT FOUND.')                                        ACHAN    1409
 5002 FORMAT(' *** WARNING ',A4,'BUS NUMBER  ',I5,' FOR GENERATOR ',    ACHAN    1410
     *'MONITORING' )                                                    ACHAN    1411
 5003 FORMAT(5X,'DOES NOT EXIST IN THE LOADFLOW NETWORK. ')             ACHAN    1412
 5005 FORMAT(5X,'IS A CLASSICAL GENERATOR WITH NO EXCITATION CONTROL'   ACHAN    1413
     &,' SIGNAL ')                                                      ACHAN    1414
 5010 FORMAT(5X,'IPOSH=',I4,' IPOS=',I4,'NOPDAT1&2=',2I4)               ACHAN    1415
 5020 FORMAT(5X,'IPOS=',I4,' NLF=',I4,' UID=',A2)                       ACHAN    1416
 5040 FORMAT(5X,'UID=',A4,' NDGC(IMAC)=',A4)                            ACHAN    1417
 5050 FORMAT(5X,'ROUTINE ACHAN KOPDAT ARRAY',/,(25I4))                  ACHAN    1418
 5060 FORMAT(5X,'ROUTINE ACHAN KOPTR ARRAY',/,(25I4))                   ACHAN    1419
 5070 FORMAT(5X,'ICOUNT=',I3,' JCOUNX=',I3,' JINTER=',I3,' IPOS=',I3)   ACHAN    1420
 5080 FORMAT(5X,'LINENO=',I3,' IPOS=',I3,' ICHPOS=',I3)                 ACHAN    1421
 5090 FORMAT(' *** WARNING CONVERTER ',A29,' BUS IS NOT FOUND.')        ACHAN    1422
 5100 FORMAT(' *** WARNING UDC BLOCK ',A17,' IS NOT FOUND.')            ACHAN    1423
 5110 FORMAT(' *** WARNING DC ',A8,' BUS IS NOT FOUND.')                ACHAN    1424
 5120 FORMAT(5X,'ROUTINE ACHAN ARRAY NOPDAT',/,(21I6))                  ACHAN    1425
 5140 FORMAT(' *** WARNING CHECK YOUR OUTPUT ANALYSIS DATA IN BLOCK'    ACHAN    1426
     *,' ALOA.')                                                        ACHAN    1427
 5160 FORMAT(5X,'BUS ',I6,1X,3A4,' IS NOT A NONLINEAR LOAD BUS.')       ACHAN    1428
 5150 FORMAT(' *** WARNING BUS#',I6,' IS NOT IN LOAD FLOW')             ACHAN    1429
 5200 FORMAT(' *** WARNING THE OUTPUT CHANNEL NUMBER EXCEEDS THE'       ACHAN    1430
     *,' LIMIT OF',I6,'.')                                              ACHAN    1431
 5210 FORMAT(5X,'CHANNELS FOR ',A,' GENERATOR AT BUS',I6,1X,3A4         ACHAN    1432
     *,' GID ',A2)                                                      ACHAN    1433
 5220 FORMAT(5X,'AND THE SUBSEQUENCE ARE IGNORED.')                     ACHAN    1434
 5230 FORMAT(5X,'CHANNELS FOR ',A,' MOTOR AT BUS ',I5,' NAME ',3A4      ACHAN    1435
     *,' MID',A4)                                                       ACHAN    1436
 5240 FORMAT(5X,'CHANNELS FOR ',A,' SVC AT BUS',I6,1X,3A4)              ACHAN    1437
 5250 FORMAT(5X,'CHANNELS FOR ',A,' NONLINEAR LOAD AT BUS',I6,1X,3A4)   ACHAN    1438
 5260 FORMAT(5X,'CHANNELS FOR ',A,' CONVERTER ',A29)                    ACHAN    1439
 5270 FORMAT(5X,'CHANNELS FOR ',A,' UDC BLOCK ',A17)                    ACHAN    1440
 5280 FORMAT(5X,'CHANNELS FOR ',A,' MONITORED BUS',I6,1X,3A4)           ACHAN    1441
 5290 FORMAT(5X,'CHANNELS FOR ',A,' DC ',A,' BUS')                      ACHAN    1442
 5300 FORMAT(5X,'CHANNELS FOR ',A,' USER DEFINED SDB AT BUS',I6,1X,3A4) ACHAN    1443
 5310 FORMAT(5X,'CHANNELS FOR ',A,' USER DEFINED SVC AT BUS',I6,1X,3A4) ACHAN    1444
 5320 FORMAT(5X,'CHANNELS FOR ',A,' USER DEFINED RAN AT BUS',I6,1X,3A4) ACHAN    1445
 5330 FORMAT(5X,'CHANNELS FOR ',A,' USER DEFINED STC AT BUS',I6,1X,3A4) ACHAN    1446
 5340 FORMAT(5X,'CHANNELS FOR ',A,' USER DEFINED SPS AT BUS',I6,1X,3A4) ACHAN    1447
 5350 FORMAT(5X,'CHANNELS FOR ',A,' MONITORED LINE OF FROM BUS',I6,1X   ACHAN    1448
     *,3A4)                                                             ACHAN    1449
 5360 FORMAT(5X,'TO BUS',I6,1X,3A4,' ID',A4                             ACHAN    1450
     *,' AND THE SUBSEQUENCE ARE IGNORED.')                             ACHAN    1451
 5370 FORMAT(5X,'CHANNELS FOR ',A,' MONITORED INTERFACE OF FROM BUS',I6 ACHAN    1452
     *,1X,3A4)                                                          ACHAN    1453
 6000 FORMAT(' *** WARNING ',A4,' INDUCTION MOTOR AT BUS ',I5,' NAME '  ACHAN    1454
     *,3A4,:,' MID',A4)                                                 ACHAN    1455
 6010 FORMAT(5X,'IS NOT FOUND.')                                        ACHAN    1456
 6020 FORMAT(' *** WARNING OUTPUT ANALYSIS BUS: ',I6)                   ACHAN    1457
 6030 FORMAT(1X,'BUS NUMBER EXCEEDED THE LIMIT OF ',I5)                 ACHAN    1458
 6040 FORMAT(' *** WARNING ',A4,' GENERATOR AT BUS: ',I5,' STATION: '   ACHAN    1459
     *,3A4,:,' GID: ',A2)                                               ACHAN    1460
 6050 FORMAT(5X,'IS NOT A FOSSIL FIRED UNIT.')                          ACHAN    1461
 6060 FORMAT(5X,'IS NOT A PWR UNIT.')                                   ACHAN    1462
 6070 FORMAT(5X,'IS NOT A CANDU UNIT.')                                 ACHAN    1463
 6080 FORMAT(5X,'IS NOT A BWR UNIT.')                                   ACHAN    1464
C                                                                       ACHAN    1465
      END                                                               ACHAN    1466
