CFPRIME LSVCDA                                                          LSVCDA      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 LSVCDA(IU16,IEBK)                                      LSVCDA      3
CD                                                                      LSVCDA      4
CD    TO LOAD SVC DATA.                                                 LSVCDA      5
CD                                                                      LSVCDA      6
CD    INPUT OF THE ROUTINE:                                             LSVCDA      7
CD                                                                      LSVCDA      8
CD    1. IU16 IS THE UNIT TO PRINT ERROR OR WARNING MESSAGES            LSVCDA      9
CD    2. IEBK IS THE ERROR INDICATOR = 1 IF ERROR IS FOUND              LSVCDA     10
CD                                                                      LSVCDA     11
      INCLUDE 'PARX.INS'                                                LSVCDA     12
      INCLUDE 'CNPT.INS'                                                LSVCDA     13
      INCLUDE 'CNMDAT.INS'                                              LSVCDA     14
      INCLUDE 'CNB1.INS'                                                LSVCDA     15
      INCLUDE 'CNB19.INS'                                               LSVCDA     16
      INCLUDE 'CNSVS.INS'                                               LSVCDA     17
      INCLUDE 'CNFLAG.INS'                                              LSVCDA     18
      INCLUDE 'CNPARX.INS'                                              LSVCDA     19
      INCLUDE 'CNREN.INS'                                               LSVCDA     20
      INCLUDE 'CNMNEW.INS'                                              LSVCDA     21
      INCLUDE 'CNUDM.INS'                                               LSVCDA     22
      INCLUDE 'CNLFDA.INS'                                              LSVCDA     23
      INCLUDE 'CNJPT.INS'                                               LSVCDA     24
      INCLUDE 'CNTGED.INS'                                              LSVCDA     25
      INCLUDE 'CNJDAT.INS'                                              LSVCDA     26
      INCLUDE 'CNTMDA.INS'                                              LSVCDA     27
      INCLUDE 'CNMSG.INS'                                               LSVCDA     28
C                                                                       LSVCDA     29
      CHARACTER*4 UID,CKID                                              LSVCDA     30
      CHARACTER*2 LCKT                                                  LSVCDA     31
      INTEGER*4 IUID                                                    LSVCDA     32
      INTEGER   MCKT(10)                                                LSVCDA     33
C                                                                       LSVCDA     34
      EQUIVALENCE (IUID,UID)                                            LSVCDA     35
C                                                                       LSVCDA     36
C     LOADING SVC DATA                                                  LSVCDA     37
C                                                                       LSVCDA     38
      LDEB=(JDEB(8).NE.0)                                               LSVCDA     39
C                                                                       LSVCDA     40
      DO 150 J=1,JSVC                                                   LSVCDA     41
C                                                                       LSVCDA     42
      NLF=JSAB(J)                                                       LSVCDA     43
      IF(JDSSAB(J).GT.2)GOTO 150                                        LSVCDA     44
      CKID=SVCID(J)                                                     LSVCDA     45
      IF(NLF.EQ.0)GOTO 150                                              LSVCDA     46
      LTN=JJSDAT(J)                                                     LSVCDA     47
      NRTYPX=ITDDAT(LTN+9)                                              LSVCDA     48
      IQFARX=ITDDAT(LTN+11)                                             LSVCDA     49
      IDIVX=ITDDAT(LTN+12)                                              LSVCDA     50
      IF(IDIVX.LT.1) IDIVX=1                                            LSVCDA     51
C                                                                       LSVCDA     52
      NSVC=NSVC+1                                                       LSVCDA     53
      IF(NSVC.GT.NXSR)GOTO 140                                          LSVCDA     54
      NSAB(NSVC)=NLF                                                    LSVCDA     55
      NSVCID(NSVC)=CKID                                                 LSVCDA     56
      JTHGSR=JSTHGS(J)                                                  LSVCDA     57
      IF(JTHGSR.EQ.0)THEN                                               LSVCDA     58
      SVCQ(NSVC)=0.0                                                    LSVCDA     59
      ELSE                                                              LSVCDA     60
      SVCQ(NSVC)=TDDAT(LTN+11)                                          LSVCDA     61
      IQFAX=0                                                           LSVCDA     62
      ENDIF                                                             LSVCDA     63
      JSDAT(NSVC)=JLN                                                   LSVCDA     64
      IDDAT(JLN+9)=NRTYPX                                               LSVCDA     65
      IDDAT(JLN+10)=0                                                   LSVCDA     66
      IDDAT(JLN+11)=IQFARX                                              LSVCDA     67
      IDDAT(JLN+12)=IDIVX                                               LSVCDA     68
      IF(NRTYPX.EQ.50) GO TO 130                                        LSVCDA     69
C                                                                       LSVCDA     70
      IF(NRTYPX.GT.5) THEN                                              LSVCDA     71
         DDAT(JLN+1)=TDDAT(LTN+1)                                       LSVCDA     72
         DDAT(JLN+2)=TDDAT(LTN+2)                                       LSVCDA     73
         DDAT(JLN+3)=TDDAT(LTN+3)                                       LSVCDA     74
         DDAT(JLN+4)=TDDAT(LTN+4)                                       LSVCDA     75
         JLN=JLN+12                                                     LSVCDA     76
         CALL MCHECK (NLF,14,JLN,'LSVCDA')                              LSVCDA     77
         GOTO 150                                                       LSVCDA     78
      ELSE                                                              LSVCDA     79
         NVSENX=ITDDAT(LTN+10)                                          LSVCDA     80
         IDDAT(JLN+10)=NVSENX                                           LSVCDA     81
         IF(NRTYPX.EQ.1) THEN                                           LSVCDA     82
         DDAT(JLN+1)=TDDAT(LTN+1)                                       LSVCDA     83
         DDAT(JLN+2)=TDDAT(LTN+2)                                       LSVCDA     84
         DDAT(JLN+3)=TDDAT(LTN+3)                                       LSVCDA     85
         DDAT(JLN+4)=TDDAT(LTN+4)                                       LSVCDA     86
         DDAT(JLN+5)=TDDAT(LTN+5)                                       LSVCDA     87
         DDAT(JLN+6)=TDDAT(LTN+6)                                       LSVCDA     88
         DDAT(JLN+7)=TDDAT(LTN+7)                                       LSVCDA     89
         DDAT(JLN+8)=TDDAT(LTN+8)                                       LSVCDA     90
         IF(DDAT(JLN+1).LE.0.0) THEN                                    LSVCDA     91
            IF(KLFO.EQ.0)THEN                                           LSVCDA     92
               WRITE(MSG(1),1150) NLF,CKID,DDAT(JLN+1)                  LSVCDA     93
            ELSE                                                        LSVCDA     94
            K=MNEW(NLF)                                                 LSVCDA     95
            KK=K*8                                                      LSVCDA     96
            WRITE(MSG(1),1160)                                          LSVCDA     97
     &      NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID,DDAT(JLN+1)          LSVCDA     98
            ENDIF                                                       LSVCDA     99
            CALL PRTMSG(1)                                              LSVCDA    100
            MSG(1)='LSVCDA: SVC DATA ERROR'                             LSVCDA    101
            CALL ASTOP(MSG(1),22)                                       LSVCDA    102
         ENDIF                                                          LSVCDA    103
         IF(DDAT(JLN+2).LE.0.0.OR.DDAT(JLN+3).LT.0.0) THEN              LSVCDA    104
            IF(KLFO.EQ.0)THEN                                           LSVCDA    105
               WRITE(MSG(1),1030) NLF,CKID                              LSVCDA    106
            ELSE                                                        LSVCDA    107
            K=MNEW(NLF)                                                 LSVCDA    108
            KK=K*8                                                      LSVCDA    109
            WRITE(MSG(1),1180) NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID   LSVCDA    110
            ENDIF                                                       LSVCDA    111
            WRITE(MSG(2),1031)                                          LSVCDA    112
            WRITE(MSG(3),1032) DDAT(JLN+2),DDAT(JLN+3)                  LSVCDA    113
            CALL PRTMSG(3)                                              LSVCDA    114
            MSG(1)='LSVCDA: SVC DATA ERROR'                             LSVCDA    115
            CALL ASTOP(MSG(1),22)                                       LSVCDA    116
         ENDIF                                                          LSVCDA    117
C                                                                       LSVCDA    118
            JLN=JLN+13                                                  LSVCDA    119
            CALL MCHECK (NLF,14,JLN,'LSVCDA')                           LSVCDA    120
            GOTO 150                                                    LSVCDA    121
C                                                                       LSVCDA    122
C     WSCC SVC'S                                                        LSVCDA    123
C                                                                       LSVCDA    124
         ELSEIF(NRTYPX.EQ.2.OR.NRTYPX.EQ.3)THEN                         LSVCDA    125
                                                                        LSVCDA    126
         DDAT(JLN+1)=TDDAT(LTN+1)                                       LSVCDA    127
         DDAT(JLN+2)=TDDAT(LTN+2)                                       LSVCDA    128
         DDAT(JLN+3)=TDDAT(LTN+3)                                       LSVCDA    129
         DDAT(JLN+4)=TDDAT(LTN+4)                                       LSVCDA    130
         DDAT(JLN+5)=TDDAT(LTN+5)                                       LSVCDA    131
         DDAT(JLN+6)=TDDAT(LTN+6)                                       LSVCDA    132
         DDAT(JLN+7)=TDDAT(LTN+7)                                       LSVCDA    133
         DDAT(JLN+13)=TDDAT(LTN+13)                                     LSVCDA    134
         DDAT(JLN+14)=TDDAT(LTN+14)                                     LSVCDA    135
         DDAT(JLN+15)=TDDAT(LTN+15)                                     LSVCDA    136
         DDAT(JLN+16)=TDDAT(LTN+16)                                     LSVCDA    137
         DDAT(JLN+17)=TDDAT(LTN+17)                                     LSVCDA    138
         DDAT(JLN+18)=TDDAT(LTN+18)                                     LSVCDA    139
         DDAT(JLN+19)=TDDAT(LTN+19)                                     LSVCDA    140
         DDAT(JLN+21)=TDDAT(LTN+21)                                     LSVCDA    141
         DDAT(JLN+22)=TDDAT(LTN+22)                                     LSVCDA    142
         DDAT(JLN+23)=TDDAT(LTN+23)                                     LSVCDA    143
         DDAT(JLN+24)=TDDAT(LTN+24)                                     LSVCDA    144
         DDAT(JLN+25)=TDDAT(LTN+25)                                     LSVCDA    145
         DDAT(JLN+26)=TDDAT(LTN+26)                                     LSVCDA    146
         DDAT(JLN+27)=TDDAT(LTN+27)                                     LSVCDA    147
C                                                                       LSVCDA    148
            IF(DDAT(JLN+7).LE.0.0) THEN                                 LSVCDA    149
               IF(KLFO.EQ.0)THEN                                        LSVCDA    150
               WRITE(MSG(1),1150) NLF,CKID,DDAT(JLN+7)                  LSVCDA    151
               ELSE                                                     LSVCDA    152
               K=MNEW(NLF)                                              LSVCDA    153
               KK=K*8                                                   LSVCDA    154
               WRITE(MSG(1),1190)                                       LSVCDA    155
     &         NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID,DDAT(JLN+7)       LSVCDA    156
               ENDIF                                                    LSVCDA    157
               CALL PRTMSG(1)                                           LSVCDA    158
               MSG(1)='LSVCDA: SVC DATA ERROR'                          LSVCDA    159
               CALL ASTOP(MSG(1),22)                                    LSVCDA    160
            ENDIF                                                       LSVCDA    161
C                                                                       LSVCDA    162
            IF(DDAT(JLN+14).LE.0.0.OR.DDAT(JLN+17).LT.0.0) THEN         LSVCDA    163
               IF(KLFO.EQ.0)THEN                                        LSVCDA    164
                  WRITE(MSG(1),1030) NLF,CKID                           LSVCDA    165
               ELSE                                                     LSVCDA    166
                  K=MNEW(NLF)                                           LSVCDA    167
                  KK=K*8                                                LSVCDA    168
                  WRITE(MSG(1),1180) NAMES(KK-2),NAMES(KK-1),NAMES(KK)  LSVCDA    169
     &                               ,CKID                              LSVCDA    170
                  ENDIF                                                 LSVCDA    171
                  WRITE(MSG(2),1031)                                    LSVCDA    172
                  WRITE(MSG(3),1032) DDAT(JLN+14),DDAT(JLN+17)          LSVCDA    173
                  CALL PRTMSG(3)                                        LSVCDA    174
                  MSG(1)='LSVCDA: SVC DATA ERROR'                       LSVCDA    175
                  CALL ASTOP(MSG(1),22)                                 LSVCDA    176
            ENDIF                                                       LSVCDA    177
            IDDAT(JLN+8)=0                                              LSVCDA    178
            JLN=JLN+27                                                  LSVCDA    179
            LTN=LTN+27                                                  LSVCDA    180
            IF(NRTYPX.EQ.3) THEN                                        LSVCDA    181
               MT1=ITDDAT(LTN+1)                                        LSVCDA    182
                  IF(MT1.EQ.0)THEN                                      LSVCDA    183
                  IDDAT(JLN+1)=ITDDAT(LTN+1)                            LSVCDA    184
                  IDDAT(JLN+2)=ITDDAT(LTN+2)                            LSVCDA    185
                  NVSEN1=ITDDAT(LTN+3)                                  LSVCDA    186
                  NVSEN2=ITDDAT(LTN+4)                                  LSVCDA    187
                  IUID=ITDDAT(LTN+5)                                    LSVCDA    188
                  CALL UNPACK(LCKT,JJJ,IUID)                            LSVCDA    189
                     IF(NVSEN1.GT.0)THEN                                LSVCDA    190
                        IF(MNEW(NVSEN1).EQ.0)THEN                       LSVCDA    191
                           IF(KLFO.EQ.0)THEN                            LSVCDA    192
                           WRITE(MSG(1),1050) NLF,CKID,NVSEN1           LSVCDA    193
                           ELSE                                         LSVCDA    194
                           K=MNEW(NLF)                                  LSVCDA    195
                           KK=K*8                                       LSVCDA    196
                           WRITE(MSG(1),1200)                           LSVCDA    197
     &                     NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID       LSVCDA    198
                           ENDIF                                        LSVCDA    199
                           MSG(2)='           NOT IN THE LOADFLOW'      LSVCDA    200
                           CALL PRTMSG(2)                               LSVCDA    201
                           MSG(1)='LSVCDA: SVC REMOTE BUS NAME ERROR'   LSVCDA    202
                           CALL ASTOP(MSG(1),33)                        LSVCDA    203
                        ENDIF                                           LSVCDA    204
                     ELSE                                               LSVCDA    205
                        NVSEN1=NLF                                      LSVCDA    206
                     ENDIF                                              LSVCDA    207
                     IF(NVSEN2.GT.0)THEN                                LSVCDA    208
                        IF(MNEW(NVSEN2).EQ.0)THEN                       LSVCDA    209
                            IF(KLFO.EQ.0)THEN                           LSVCDA    210
                           WRITE(MSG(1),1050) NLF,CKID,NVSEN2           LSVCDA    211
                           ELSE                                         LSVCDA    212
                           K=MNEW(NLF)                                  LSVCDA    213
                           KK=K*8                                       LSVCDA    214
                           WRITE(MSG(1),1200)                           LSVCDA    215
     &               NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID             LSVCDA    216
                           ENDIF                                        LSVCDA    217
                           MSG(2)='           NOT IN THE LOADFLOW'      LSVCDA    218
                           CALL PRTMSG(2)                               LSVCDA    219
                           MSG(1)='LSVCDA: SVC REMOTE BUS NAME ERROR'   LSVCDA    220
                           CALL ASTOP(MSG(1),33)                        LSVCDA    221
                        ENDIF                                           LSVCDA    222
                     ELSE                                               LSVCDA    223
                        NVSEN2=NLF                                      LSVCDA    224
                     ENDIF                                              LSVCDA    225
                     IDDAT(JLN+3)=NVSEN1                                LSVCDA    226
                     IDDAT(JLN+4)=NVSEN2                                LSVCDA    227
                     CALL PACK(LCKT,0,IUID)                             LSVCDA    228
                     IDDAT(JLN+5)=IUID                                  LSVCDA    229
                     IF(LCKT.EQ.' *') THEN                              LSVCDA    230
                        CALL LINID(NVSEN1,NVSEN2,MLIN,MCKT)             LSVCDA    231
                        IDDAT(JLN-11)=MLIN                              LSVCDA    232
                        IF(MLIN.GT.0) THEN                              LSVCDA    233
                           DO 110 LL=1,MLIN                             LSVCDA    234
                           IDDAT(JLN+18+2*LL-1)=MCKT(LL)                LSVCDA    235
  110                      CONTINUE                                     LSVCDA    236
                        ENDIF                                           LSVCDA    237
                     ELSE                                               LSVCDA    238
                        IDDAT(JLN-11)=1                                 LSVCDA    239
                        IDDAT(JLN+19)=IUID                              LSVCDA    240
                     ENDIF                                              LSVCDA    241
C                                                                       LSVCDA    242
C                 MT1=1 CASE                                            LSVCDA    243
C                                                                       LSVCDA    244
                  ELSEIF(MT1.EQ.1) THEN                                 LSVCDA    245
                     IDDAT(JLN+1)=ITDDAT(LTN+1)                         LSVCDA    246
                     IDDAT(JLN+2)=ITDDAT(LTN+2)                         LSVCDA    247
                     DDAT(JLN+3)=TDDAT(LTN+3)                           LSVCDA    248
                     NVSEN1=ITDDAT(LTN+4)                               LSVCDA    249
                     IF(DDAT(JLN+3).GE.0.0.AND.DDAT(JLN+3).LE.0.0)      LSVCDA    250
     *                  DDAT(JLN+3)=0.02                                LSVCDA    251
                     IF(NVSEN1.GT.0)THEN                                LSVCDA    252
                        IF(MNEW(NVSEN1).EQ.0)THEN                       LSVCDA    253
                           IF(KLFO.EQ.0)THEN                            LSVCDA    254
                           WRITE(MSG(1),1050) NLF,CKID,NVSEN1           LSVCDA    255
                           ELSE                                         LSVCDA    256
                           K=MNEW(NLF)                                  LSVCDA    257
                           KK=K*8                                       LSVCDA    258
                           WRITE(MSG(1),1200)                           LSVCDA    259
     &                     NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID       LSVCDA    260
                           ENDIF                                        LSVCDA    261
                           MSG(2)='           NOT IN THE LOADFLOW'      LSVCDA    262
                           CALL PRTMSG(2)                               LSVCDA    263
                           MSG(1)='LSVCDA: SVC REMOTE BUS NAME ERROR'   LSVCDA    264
                           CALL ASTOP(MSG(1),33)                        LSVCDA    265
                        ENDIF                                           LSVCDA    266
                     ELSE                                               LSVCDA    267
                        NVSEN1=NLF                                      LSVCDA    268
                     ENDIF                                              LSVCDA    269
                     IDDAT(JLN+4)=NVSEN1                                LSVCDA    270
C                                                                       LSVCDA    271
C                 MT1=2 CASE                                            LSVCDA    272
C                                                                       LSVCDA    273
                  ELSE                                                  LSVCDA    274
                  IDDAT(JLN+1)=ITDDAT(LTN+1)                            LSVCDA    275
                  IDDAT(JLN+2)=ITDDAT(LTN+2)                            LSVCDA    276
                  NVSEN1=ITDDAT(LTN+3)                                  LSVCDA    277
                     IDDAT(JLN+4)=ITDDAT(LTN+4)                         LSVCDA    278
                     IF(NVSEN1.GT.0)THEN                                LSVCDA    279
                        IF(MNEW(NVSEN1).EQ.0)THEN                       LSVCDA    280
                           IF(KLFO.EQ.0)THEN                            LSVCDA    281
                           WRITE(MSG(1),1050) NLF,CKID,NVSEN1           LSVCDA    282
                           ELSE                                         LSVCDA    283
                           K=MNEW(NLF)                                  LSVCDA    284
                           KK=K*8                                       LSVCDA    285
                           WRITE(MSG(1),1200)                           LSVCDA    286
     &                     NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID       LSVCDA    287
                           ENDIF                                        LSVCDA    288
                           MSG(2)='           NOT IN THE LOADFLOW'      LSVCDA    289
                           CALL PRTMSG(2)                               LSVCDA    290
                           MSG(1)='LSVCDA: SVC REMOTE BUS NAME ERROR'   LSVCDA    291
                           CALL ASTOP(MSG(1),33)                        LSVCDA    292
                        ENDIF                                           LSVCDA    293
                     ELSE                                               LSVCDA    294
                        NVSEN1=NLF                                      LSVCDA    295
                     ENDIF                                              LSVCDA    296
                     IDDAT(JLN+3)=NVSEN1                                LSVCDA    297
                  ENDIF                                                 LSVCDA    298
C                                                                       LSVCDA    299
C      LOAD THE REMAINING DATA                                          LSVCDA    300
C                                                                       LSVCDA    301
                  DO 120 LL=6,16                                        LSVCDA    302
 120              DDAT(JLN+LL)=TDDAT(LTN+LL)                            LSVCDA    303
               JLN=JLN+18+2*IDDAT(JLN-11)                               LSVCDA    304
               CALL MCHECK (NLF,14,JLN,'LSVCDA')                        LSVCDA    305
            ENDIF                                                       LSVCDA    306
         ENDIF                                                          LSVCDA    307
      ENDIF                                                             LSVCDA    308
      GOTO 150                                                          LSVCDA    309
C                                                                       LSVCDA    310
  130 CONTINUE                                                          LSVCDA    311
C                                                                       LSVCDA    312
C     USER DEFINED SVC DATA                                             LSVCDA    313
C                                                                       LSVCDA    314
      JLN=JLN+12                                                        LSVCDA    315
      LTN=LTN+12                                                        LSVCDA    316
      JLN1=0                                                            LSVCDA    317
      NUF=5                                                             LSVCDA    318
      CALL LUDMDA(NUF,JLN1,LTN)                                         LSVCDA    319
      IF(NUF.EQ.900) GOTO 160                                           LSVCDA    320
      CALL MCHECK (NLF,14,JLN,'LSVCDA')                                 LSVCDA    321
      GOTO 150                                                          LSVCDA    322
C                                                                       LSVCDA    323
  140 CONTINUE                                                          LSVCDA    324
      IF(KLFO.EQ.0)THEN                                                 LSVCDA    325
      WRITE (MSG(1),1040) NLF,CKID                                      LSVCDA    326
      ELSE                                                              LSVCDA    327
      K=MNEW(NLF)                                                       LSVCDA    328
      KK=K*8                                                            LSVCDA    329
      WRITE(MSG(1),1190) NAMES(KK-2),NAMES(KK-1),NAMES(KK),CKID         LSVCDA    330
      ENDIF                                                             LSVCDA    331
      WRITE(MSG(2),1041) NXSR                                           LSVCDA    332
      CALL PRTMSG(2)                                                    LSVCDA    333
C                                                                       LSVCDA    334
      IEBK=1                                                            LSVCDA    335
C                                                                       LSVCDA    336
  150 CONTINUE                                                          LSVCDA    337
C                                                                       LSVCDA    338
  160 CONTINUE                                                          LSVCDA    339
C                                                                       LSVCDA    340
      RETURN                                                            LSVCDA    341
C                                                                       LSVCDA    342
 1030 FORMAT(' *** ERROR SVC AT BUS ',I5,1X,A4)                         LSVCDA    343
 1180 FORMAT(' *** ERROR SVC AT BUS ',3A4,1X,A4)                        LSVCDA    344
 1031 FORMAT(5X,'QL MUST BE LARGER THAN ZERO AND QC NON-NEGATIVE.')     LSVCDA    345
 1032 FORMAT(5X,'QL=',F10.5,' MVA  QC=',F10.5,' MVA')                   LSVCDA    346
 1040 FORMAT(' *** ERROR SVC/SATURABLE REACTOR ON BUS ',I5,1X,A4)       LSVCDA    347
 1190 FORMAT(' *** ERROR SVC/SATURABLE REACTOR ON BUS ',3A4,1X,A4)      LSVCDA    348
 1041 FORMAT(5X,'EXCEEDS THE LIMIT OF ',I5,1X,A4                        LSVCDA    349
     *,' INCREASE NSR IN PARX.INS')                                     LSVCDA    350
 1050 FORMAT(' *** ERROR SVC BUS ',I5,1X,A4,' REMOTE SENSING BUS ',I5)  LSVCDA    351
 1200 FORMAT(' *** ERROR SVC BUS ',3A4,1X,A4,' REMOTE SENSING BUS ',A12)LSVCDA    352
 1150 FORMAT(' *** ERROR SVC AT BUS ',I5,1X,A4,' KSVC=',F10.5           LSVCDA    353
     *,' MUST BE LARGER THAN 0.')                                       LSVCDA    354
 1160 FORMAT(' *** ERROR SVC AT BUS ',3A4,1X,A4,' KSVC=',F8.3           LSVCDA    355
     &,' MUST BE LARGER THAN 0.')                                       LSVCDA    356
      END                                                               LSVCDA    357
