CFPRIME IUDB1                                                           IUDB1       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 IUDB1(IORD,INDEX,NLF,KN,CID)                           IUDB1       3
CD                                                                      IUDB1       4
CD    TO PERFORM INITIALIZATION FOR USER DEFINED BLOCK TYPE 1 (GAIN     IUDB1       5
CD    BLOCK) IN ANY USER DEFINED MODEL.                                 IUDB1       6
CD                                                                      IUDB1       7
CD    EACH ENTRY POINT IN THIS SUBROUTINE HAS SIMILAR FUNCTION AND IS   IUDB1       8
CD    FOR A DIFFERENT TYPE OF GENERAL BLOCK APPLICABLE TO ANY USER      IUDB1       9
CD    DEFINED MODEL.                                                    IUDB1      10
CD                                                                      IUDB1      11
      INCLUDE 'PARX.INS'                                                IUDB1      12
      INCLUDE 'CNMDAT.INS'                                              IUDB1      13
      INCLUDE 'CNMSTA.INS'                                              IUDB1      14
      INCLUDE 'CNXSTA.INS'                                              IUDB1      15
      INCLUDE 'CNSTN.INS'                                               IUDB1      16
      INCLUDE 'CNYVAR.INS'                                              IUDB1      17
      INCLUDE 'CNUNIT.INS'                                              IUDB1      18
      INCLUDE 'CNFLAG.INS'                                              IUDB1      19
      INCLUDE 'CNUDM.INS'                                               IUDB1      20
      INCLUDE 'CNMSG.INS'                                               IUDB1      21
C                                                                       IUDB1      22
      CHARACTER*2 CID                                                   IUDB1      23
C                                                                       IUDB1      24
      LDEB=(JDEB(262).NE.0)                                             IUDB1      25
C                                                                       IUDB1      26
      NEXTB=0                                                           IUDB1      27
      VALI=0.0                                                          IUDB1      28
      LL=0                                                              IUDB1      29
      JORD=JUDE(IORD)                                                   IUDB1      30
      JEI=JEB+2                                                         IUDB1      31
      GAIN=DDAT(JEI+1)                                                  IUDB1      32
      IF(IDDAT(JEI+1).EQ.0) THEN                                        IUDB1      33
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1      34
      WRITE(MSG(2),1020) IORD,BLNAM1,BLNAM2                             IUDB1      35
      CALL PRTMSG(2)                                                    IUDB1      36
      MSG(1)='IUDB1: UD ERROR'                                          IUDB1      37
      CALL ASTOP(MSG(1),15)                                             IUDB1      38
      ENDIF                                                             IUDB1      39
      VMAX=DDAT(JEI+2)                                                  IUDB1      40
      VMIN=DDAT(JEI+3)                                                  IUDB1      41
      IF(IDDAT(JEI+2).EQ.0.AND.IDDAT(JEI+3).EQ.0) LL=1                  IUDB1      42
      IF(VMAX.LE.VMIN.AND.LL.EQ.0) THEN                                 IUDB1      43
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1      44
      WRITE(MSG(2),1040) IORD,BLNAM1,BLNAM2                             IUDB1      45
      WRITE(MSG(3),1041) VMAX,VMIN                                      IUDB1      46
      CALL PRTMSG(3)                                                    IUDB1      47
      MSG(1)='IUDB1: UD ERROR'                                          IUDB1      48
      CALL ASTOP(MSG(1),15)                                             IUDB1      49
      ENDIF                                                             IUDB1      50
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1      51
         J2=JE5-2                                                       IUDB1      52
         DO 110 J=1,INTUD                                               IUDB1      53
         J2=J2+2                                                        IUDB1      54
         IDD=IDDAT(J2+2)                                                IUDB1      55
         IDD=IABS(IDD)                                                  IUDB1      56
         IF(IDD.EQ.IORD) THEN                                           IUDB1      57
            XDAT=1.0                                                    IUDB1      58
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1      59
            IOUT=IDDAT(J2+1)                                            IUDB1      60
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1      61
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1      62
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1      63
               NEXTB=IOUT                                               IUDB1      64
               XDATN=XDAT                                               IUDB1      65
            ELSE                                                        IUDB1      66
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1      67
            ENDIF                                                       IUDB1      68
         ENDIF                                                          IUDB1      69
  110    CONTINUE                                                       IUDB1      70
      ENDIF                                                             IUDB1      71
      J3=JE6-3                                                          IUDB1      72
      DO 120 J=1,INPUD                                                  IUDB1      73
      J3=J3+3                                                           IUDB1      74
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1      75
         IIN=IDDAT(J3+2)                                                IUDB1      76
         IF(IIN.EQ.20) THEN                                             IUDB1      77
            XDATN=DDAT(J3+3)                                            IUDB1      78
         ELSE                                                           IUDB1      79
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1      80
         ENDIF                                                          IUDB1      81
      ENDIF                                                             IUDB1      82
  120 CONTINUE                                                          IUDB1      83
      IDDAT(JEI+8)=0                                                    IUDB1      84
      IF(INDEX.EQ.2) THEN                                               IUDB1      85
         VALO=VALOUT(IORD)                                              IUDB1      86
         IF(JORD.LT.NUDB) THEN                                          IUDB1      87
            IF(NEXTB.EQ.0)THEN                                          IUDB1      88
            MSG(1)='IUDB1: 1'                                           IUDB1      89
            CALL ASTOP(MSG(1),8)                                        IUDB1      90
            ENDIF                                                       IUDB1      91
            VALOUT(NEXTB)=(VALO/GAIN-VALI)/XDATN                        IUDB1      92
         ELSE                                                           IUDB1      93
            VALIN(20)=(VALO/GAIN-VALI)/XDATN                            IUDB1      94
         ENDIF                                                          IUDB1      95
         IF(LL.EQ.0) THEN                                               IUDB1      96
            IF(VALO.GT.VMAX.OR.VALO.LT.VMIN) THEN                       IUDB1      97
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1),INAME(KN)    IUDB1      98
     *                        ,CID                                      IUDB1      99
            WRITE(MSG(2),1010) IORD,BLNAM1,BLNAM2,VALO                  IUDB1     100
            WRITE(MSG(3),1011) VMAX,VMIN                                IUDB1     101
            CALL PRTMSG(3)                                              IUDB1     102
            ENDIF                                                       IUDB1     103
         ENDIF                                                          IUDB1     104
      ELSE                                                              IUDB1     105
         VALO=VALI*GAIN                                                 IUDB1     106
         IF (LL.EQ.0) THEN                                              IUDB1     107
            IF (VALO.GT.VMAX) THEN                                      IUDB1     108
               VALO=VMAX                                                IUDB1     109
               IDDAT(JEI+8)=1                                           IUDB1     110
            ELSE IF (VALO.LT.VMIN) THEN                                 IUDB1     111
               VALO=VMIN                                                IUDB1     112
               IDDAT(JEI+8)=-1                                          IUDB1     113
            END IF                                                      IUDB1     114
         ENDIF                                                          IUDB1     115
         VALOUT(IORD)=VALO                                              IUDB1     116
      ENDIF                                                             IUDB1     117
      IDDAT(JEI+6)=LL                                                   IUDB1     118
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1     119
C                                                                       IUDB1     120
      RETURN                                                            IUDB1     121
C                                                                       IUDB1     122
C-----------------------------------------------------------------------IUDB1     123
C                                                                       IUDB1     124
      ENTRY IUDB2(IORD,INDEX,NLF,KN,CID)                                IUDB1     125
CD                                                                      IUDB1     126
CD    FOR BLOCK TYPE 2 (INTEGRATION BLOCK).                             IUDB1     127
CD                                                                      IUDB1     128
      LDEB=(JDEB(262).NE.0)                                             IUDB1     129
C                                                                       IUDB1     130
      NEXTB=0                                                           IUDB1     131
      VALI=0.0                                                          IUDB1     132
      LL=0                                                              IUDB1     133
      JORD=JUDE(IORD)                                                   IUDB1     134
      KORD=JSTATE+KUDE(IORD)+1                                          IUDB1     135
      JEI=JEB+2                                                         IUDB1     136
      IF(IDDAT(JEI+1).EQ.0) THEN                                        IUDB1     137
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     138
      WRITE(MSG(2),1020) IORD,BLNAM1,BLNAM2                             IUDB1     139
      CALL PRTMSG(2)                                                    IUDB1     140
      MSG(1)='IUDB2: UD ERROR'                                          IUDB1     141
      CALL ASTOP(MSG(1),15)                                             IUDB1     142
      ENDIF                                                             IUDB1     143
      VMAX=DDAT(JEI+2)                                                  IUDB1     144
      VMIN=DDAT(JEI+3)                                                  IUDB1     145
      VINT=DDAT(JEI+4)                                                  IUDB1     146
      IF(IDDAT(JEI+2).EQ.0.AND.IDDAT(JEI+3).EQ.0)THEN                   IUDB1     147
         LL=1                                                           IUDB1     148
      ELSE                                                              IUDB1     149
         IF(VINT.GT.VMAX.OR.VINT.LT.VMIN)THEN                           IUDB1     150
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID   IUDB1     151
         WRITE(MSG(2),1160) IORD,BLNAM1,BLNAM2                          IUDB1     152
         CALL PRTMSG(2)                                                 IUDB1     153
         MSG(1)='IUDB2: UD ERROR'                                       IUDB1     154
         CALL ASTOP(MSG(1),15)                                          IUDB1     155
         ENDIF                                                          IUDB1     156
      ENDIF                                                             IUDB1     157
      IF(VMAX.LE.VMIN.AND.LL.EQ.0) THEN                                 IUDB1     158
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     159
      WRITE(MSG(2),1040) IORD,BLNAM1,BLNAM2                             IUDB1     160
      WRITE(MSG(3),1041) VMAX,VMIN                                      IUDB1     161
      CALL PRTMSG(3)                                                    IUDB1     162
      MSG(1)='IUDB2: UD ERROR'                                          IUDB1     163
      CALL ASTOP(MSG(1),15)                                             IUDB1     164
      ENDIF                                                             IUDB1     165
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1     166
         J2=JE5-2                                                       IUDB1     167
         DO 130 J=1,INTUD                                               IUDB1     168
         J2=J2+2                                                        IUDB1     169
         IDD=IDDAT(J2+2)                                                IUDB1     170
         IDD=IABS(IDD)                                                  IUDB1     171
         IF(IDD.EQ.IORD) THEN                                           IUDB1     172
            XDAT=1.0                                                    IUDB1     173
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     174
            IOUT=IDDAT(J2+1)                                            IUDB1     175
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1     176
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1     177
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1     178
               NEXTB=IOUT                                               IUDB1     179
               XDATN=XDAT                                               IUDB1     180
            ELSE                                                        IUDB1     181
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1     182
            ENDIF                                                       IUDB1     183
         ENDIF                                                          IUDB1     184
  130    CONTINUE                                                       IUDB1     185
      ENDIF                                                             IUDB1     186
      J3=JE6-3                                                          IUDB1     187
      DO 140 J=1,INPUD                                                  IUDB1     188
      J3=J3+3                                                           IUDB1     189
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     190
         IIN=IDDAT(J3+2)                                                IUDB1     191
         IF(IIN.EQ.20) THEN                                             IUDB1     192
            XDATN=DDAT(J3+3)                                            IUDB1     193
         ELSE                                                           IUDB1     194
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1     195
         ENDIF                                                          IUDB1     196
      ENDIF                                                             IUDB1     197
  140 CONTINUE                                                          IUDB1     198
      IDDAT(JEI+8)=0                                                    IUDB1     199
      IF(INDEX.EQ.2) THEN                                               IUDB1     200
         IF(JORD.LT.NUDB) THEN                                          IUDB1     201
            IF(NEXTB.EQ.0)THEN                                          IUDB1     202
            MSG(1)='IUDB2: 1'                                           IUDB1     203
            CALL ASTOP(MSG(1),8)                                        IUDB1     204
            ENDIF                                                       IUDB1     205
            VALOUT(NEXTB)=-VALI/XDATN                                   IUDB1     206
         ELSE                                                           IUDB1     207
            VALIN(20)=-VALI/XDATN                                       IUDB1     208
         ENDIF                                                          IUDB1     209
         VALO=VALOUT(IORD)                                              IUDB1     210
         XSTATE(KORD)=VALO                                              IUDB1     211
         IF(LL.EQ.0) THEN                                               IUDB1     212
            IF(VALO.GT.VMAX.OR.VALO.LT.VMIN) THEN                       IUDB1     213
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1),INAME(KN)    IUDB1     214
     *                        ,CID                                      IUDB1     215
            WRITE(MSG(2),1010) IORD,BLNAM1,BLNAM2,VALO                  IUDB1     216
            WRITE(MSG(3),1011) VMAX,VMIN                                IUDB1     217
            CALL PRTMSG(3)                                              IUDB1     218
            ENDIF                                                       IUDB1     219
         ENDIF                                                          IUDB1     220
      ELSE                                                              IUDB1     221
         IF(VALI.GT.0.00001) THEN                                       IUDB1     222
            VALOUT(IORD)=VMAX                                           IUDB1     223
            XSTATE(KORD)=VMAX                                           IUDB1     224
            IDDAT(JEI+8)=1                                              IUDB1     225
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)              IUDB1     226
     *                        ,INAME(KN),CID                            IUDB1     227
            WRITE(MSG(2),1110) IORD,BLNAM1,BLNAM2,VALI                  IUDB1     228
            WRITE(MSG(3),1111) VALOUT(IORD)                             IUDB1     229
            WRITE(MSG(4),1112) VMAX,VMIN                                IUDB1     230
            CALL PRTMSG(4)                                              IUDB1     231
         ELSEIF(VALI.LT.-0.00001) THEN                                  IUDB1     232
            VALOUT(IORD)=VMIN                                           IUDB1     233
            XSTATE(KORD)=VMIN                                           IUDB1     234
            IDDAT(JEI+8)=-1                                             IUDB1     235
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)              IUDB1     236
     *                        ,INAME(KN),CID                            IUDB1     237
            WRITE(MSG(2),1110) IORD,BLNAM1,BLNAM2,VALI                  IUDB1     238
            WRITE(MSG(3),1111) VALOUT(IORD)                             IUDB1     239
            WRITE(MSG(4),1112) VMAX,VMIN                                IUDB1     240
            CALL PRTMSG(4)                                              IUDB1     241
         ELSE                                                           IUDB1     242
            VALOUT(IORD)=VINT                                           IUDB1     243
            XSTATE(KORD)=VINT                                           IUDB1     244
         ENDIF                                                          IUDB1     245
      ENDIF                                                             IUDB1     246
      IDDAT(JEI+6)=LL                                                   IUDB1     247
      IF(LDEB)WRITE(IUD6,1440) KORD,JORD,XSTATE(KORD)                   IUDB1     248
C                                                                       IUDB1     249
      RETURN                                                            IUDB1     250
C                                                                       IUDB1     251
C-----------------------------------------------------------------------IUDB1     252
C                                                                       IUDB1     253
      ENTRY IUDB3(IORD,INDEX,NLF,KN,CID)                                IUDB1     254
CD                                                                      IUDB1     255
CD    FOR BLOCK TYPE 3 (PI BLOCK).                                      IUDB1     256
CD                                                                      IUDB1     257
      LDEB=(JDEB(262).NE.0)                                             IUDB1     258
C                                                                       IUDB1     259
      NEXTB=0                                                           IUDB1     260
      VALI=0.0                                                          IUDB1     261
      LL=0                                                              IUDB1     262
      JORD=JUDE(IORD)                                                   IUDB1     263
      KORD=JSTATE+KUDE(IORD)+1                                          IUDB1     264
      JEI=JEB+2                                                         IUDB1     265
      IF(IDDAT(JEI+1).EQ.0) THEN                                        IUDB1     266
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     267
      WRITE(MSG(2),1020) IORD,BLNAM1,BLNAM2                             IUDB1     268
      CALL PRTMSG(2)                                                    IUDB1     269
      MSG(1)='IUDB3: UD ERROR'                                          IUDB1     270
      CALL ASTOP(MSG(1),15)                                             IUDB1     271
      ENDIF                                                             IUDB1     272
      VMAX=DDAT(JEI+3)                                                  IUDB1     273
      VMIN=DDAT(JEI+4)                                                  IUDB1     274
      VINT=DDAT(JEI+5)                                                  IUDB1     275
      IF(IDDAT(JEI+4).EQ.0.AND.IDDAT(JEI+3).EQ.0)THEN                   IUDB1     276
         LL=1                                                           IUDB1     277
      ELSE                                                              IUDB1     278
         IF(VINT.GT.VMAX.OR.VINT.LT.VMIN) THEN                          IUDB1     279
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID   IUDB1     280
         WRITE(MSG(2),1160) IORD,BLNAM1,BLNAM2                          IUDB1     281
         CALL PRTMSG(2)                                                 IUDB1     282
         MSG(1)='IUDB3: UD ERROR'                                       IUDB1     283
         CALL ASTOP(MSG(1),15)                                          IUDB1     284
         ENDIF                                                          IUDB1     285
      ENDIF                                                             IUDB1     286
      IF(VMAX.LE.VMIN.AND.LL.EQ.0) THEN                                 IUDB1     287
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     288
      WRITE(MSG(2),1040) IORD,BLNAM1,BLNAM2                             IUDB1     289
      WRITE(MSG(3),1041) DDAT(JEI+3),DDAT(JEI+4)                        IUDB1     290
      CALL PRTMSG(3)                                                    IUDB1     291
      MSG(1)='IUDB3: UD ERROR'                                          IUDB1     292
      CALL ASTOP(MSG(1),15)                                             IUDB1     293
      ENDIF                                                             IUDB1     294
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1     295
         J2=JE5-2                                                       IUDB1     296
         DO 150 J=1,INTUD                                               IUDB1     297
         J2=J2+2                                                        IUDB1     298
         IDD=IDDAT(J2+2)                                                IUDB1     299
         IDD=IABS(IDD)                                                  IUDB1     300
         IF(IDD.EQ.IORD) THEN                                           IUDB1     301
            XDAT=1.0                                                    IUDB1     302
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     303
            IOUT=IDDAT(J2+1)                                            IUDB1     304
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1     305
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1     306
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1     307
               NEXTB=IOUT                                               IUDB1     308
               XDATN=XDAT                                               IUDB1     309
            ELSE                                                        IUDB1     310
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1     311
            ENDIF                                                       IUDB1     312
         ENDIF                                                          IUDB1     313
  150    CONTINUE                                                       IUDB1     314
      ENDIF                                                             IUDB1     315
      J3=JE6-3                                                          IUDB1     316
      DO 160 J=1,INPUD                                                  IUDB1     317
      J3=J3+3                                                           IUDB1     318
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     319
         IIN=IDDAT(J3+2)                                                IUDB1     320
         IF(IIN.EQ.20) THEN                                             IUDB1     321
            XDATN=DDAT(J3+3)                                            IUDB1     322
         ELSE                                                           IUDB1     323
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1     324
         ENDIF                                                          IUDB1     325
      ENDIF                                                             IUDB1     326
  160 CONTINUE                                                          IUDB1     327
      IDDAT(JEI+8)=0                                                    IUDB1     328
      IF(INDEX.EQ.2) THEN                                               IUDB1     329
         IF(JORD.LT.NUDB) THEN                                          IUDB1     330
            IF(NEXTB.EQ.0)THEN                                          IUDB1     331
            MSG(1)='IUDB3: 1'                                           IUDB1     332
            CALL ASTOP(MSG(1),8)                                        IUDB1     333
            ENDIF                                                       IUDB1     334
            VALOUT(NEXTB)=-VALI/XDATN                                   IUDB1     335
         ELSE                                                           IUDB1     336
            VALIN(20)=-VALI/XDATN                                       IUDB1     337
         ENDIF                                                          IUDB1     338
         VALO=VALOUT(IORD)                                              IUDB1     339
         XSTATE(KORD)=VALO                                              IUDB1     340
         IF(LL.EQ.0) THEN                                               IUDB1     341
            IF(VALO.GT.VMAX.OR.VALO.LT.VMIN) THEN                       IUDB1     342
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1),INAME(KN)    IUDB1     343
     *                        ,CID                                      IUDB1     344
            WRITE(MSG(2),1010) IORD,BLNAM1,BLNAM2,VALO                  IUDB1     345
            WRITE(MSG(3),1011) VMAX,VMIN                                IUDB1     346
            CALL PRTMSG(3)                                              IUDB1     347
            ENDIF                                                       IUDB1     348
         ENDIF                                                          IUDB1     349
      ELSE                                                              IUDB1     350
         VALI1=VALI*DDAT(JEI+1)                                         IUDB1     351
         IF(VALI1.GT.0.0001) THEN                                       IUDB1     352
            VALOUT(IORD)=VMAX+VALI1*DDAT(JEI+2)                         IUDB1     353
            XSTATE(KORD)=VMAX                                           IUDB1     354
            IDDAT(JEI+8)=1                                              IUDB1     355
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)              IUDB1     356
     *                        ,INAME(KN),CID                            IUDB1     357
            WRITE(MSG(2),1210) IORD,BLNAM1,BLNAM2,VALI                  IUDB1     358
            WRITE(MSG(3),1111) VALOUT(IORD)                             IUDB1     359
            WRITE(MSG(4),1112) VMAX,VMIN                                IUDB1     360
            CALL PRTMSG(4)                                              IUDB1     361
         ELSEIF(VALI1.LT.-0.00001) THEN                                 IUDB1     362
            VALOUT(IORD)=VMIN+VALI1*DDAT(JEI+2)                         IUDB1     363
            XSTATE(KORD)=VMIN                                           IUDB1     364
            IDDAT(JEI+8)=-1                                             IUDB1     365
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)              IUDB1     366
     *                        ,INAME(KN),CID                            IUDB1     367
            WRITE(MSG(2),1210) IORD,BLNAM1,BLNAM2,VALI                  IUDB1     368
            WRITE(MSG(3),1111) VALOUT(IORD)                             IUDB1     369
            WRITE(MSG(4),1112) VMAX,VMIN                                IUDB1     370
            CALL PRTMSG(4)                                              IUDB1     371
         ELSE                                                           IUDB1     372
            VALOUT(IORD)=VINT                                           IUDB1     373
            XSTATE(KORD)=VINT                                           IUDB1     374
         ENDIF                                                          IUDB1     375
      ENDIF                                                             IUDB1     376
      IDDAT(JEI+6)=LL                                                   IUDB1     377
      IF(LDEB)WRITE(IUD6,1440) KORD,JORD,XSTATE(KORD)                   IUDB1     378
C                                                                       IUDB1     379
      RETURN                                                            IUDB1     380
C                                                                       IUDB1     381
C-----------------------------------------------------------------------IUDB1     382
C                                                                       IUDB1     383
      ENTRY IUDB4(IORD,INDEX,NLF,KN,CID)                                IUDB1     384
CD                                                                      IUDB1     385
CD    FOR BLOCK TYPE 4 (WASHOUT BLOCK).                                 IUDB1     386
CD                                                                      IUDB1     387
      LDEB=(JDEB(262).NE.0)                                             IUDB1     388
C                                                                       IUDB1     389
      VALI=0.0                                                          IUDB1     390
      JORD=JUDE(IORD)                                                   IUDB1     391
      KORD=JSTATE+KUDE(IORD)+1                                          IUDB1     392
      JEI=JEB+2                                                         IUDB1     393
      IF(IDDAT(JEI+1).EQ.0) THEN                                        IUDB1     394
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     395
      WRITE(MSG(2),1020) IORD,BLNAM1,BLNAM2                             IUDB1     396
      CALL PRTMSG(2)                                                    IUDB1     397
      MSG(1)='IUDB4: UD ERROR'                                          IUDB1     398
      CALL ASTOP(MSG(1),15)                                             IUDB1     399
      ENDIF                                                             IUDB1     400
      IF(IDDAT(JEI+2).EQ.0) THEN                                        IUDB1     401
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     402
      WRITE(MSG(2),1320) IORD,BLNAM1,BLNAM2                             IUDB1     403
      CALL PRTMSG(2)                                                    IUDB1     404
      MSG(1)='IUDB4: UD ERROR'                                          IUDB1     405
      CALL ASTOP(MSG(1),15)                                             IUDB1     406
      ENDIF                                                             IUDB1     407
      IF(INDEX.EQ.1) THEN                                               IUDB1     408
         J2=JE5-2                                                       IUDB1     409
         DO 170 J=1,INTUD                                               IUDB1     410
         J2=J2+2                                                        IUDB1     411
         IDD=IDDAT(J2+2)                                                IUDB1     412
         IDD=IABS(IDD)                                                  IUDB1     413
         IF(IDD.EQ.IORD) THEN                                           IUDB1     414
            XDAT=1.0                                                    IUDB1     415
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     416
            IOUT=IDDAT(J2+1)                                            IUDB1     417
            VALI=VALI+VALOUT(IOUT)*XDAT                                 IUDB1     418
         ENDIF                                                          IUDB1     419
  170    CONTINUE                                                       IUDB1     420
      ENDIF                                                             IUDB1     421
      J3=JE6-3                                                          IUDB1     422
      DO 180 J=1,INPUD                                                  IUDB1     423
      J3=J3+3                                                           IUDB1     424
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     425
         IIN=IDDAT(J3+2)                                                IUDB1     426
         VALI=VALI+VALIN(IIN)*DDAT(J3+3)                                IUDB1     427
      ENDIF                                                             IUDB1     428
  180 CONTINUE                                                          IUDB1     429
      XSTATE(KORD)=VALI                                                 IUDB1     430
      IF(LDEB)WRITE(IUD6,1440) KORD,JORD,XSTATE(KORD)                   IUDB1     431
C                                                                       IUDB1     432
      RETURN                                                            IUDB1     433
C                                                                       IUDB1     434
C-----------------------------------------------------------------------IUDB1     435
C                                                                       IUDB1     436
      ENTRY IUDB5(IORD,INDEX,NLF,KN,CID)                                IUDB1     437
CD                                                                      IUDB1     438
CD    FOR BLOCK TYPE 5 (LEAD/LAG BLOCK).                                IUDB1     439
CD                                                                      IUDB1     440
      LDEB=(JDEB(262).NE.0)                                             IUDB1     441
C                                                                       IUDB1     442
      LL=0                                                              IUDB1     443
      NEXTB=0                                                           IUDB1     444
      VALI=0.0                                                          IUDB1     445
      JORD=JUDE(IORD)                                                   IUDB1     446
      KORD=JSTATE+KUDE(IORD)+1                                          IUDB1     447
      JEI=JEB+2                                                         IUDB1     448
      GAIN=DDAT(JEI+1)                                                  IUDB1     449
      IF(IDDAT(JEI+1).EQ.0) THEN                                        IUDB1     450
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     451
      WRITE(MSG(2),1020) IORD,BLNAM1,BLNAM2                             IUDB1     452
      CALL PRTMSG(2)                                                    IUDB1     453
      MSG(1)='IUDB5: UD ERROR'                                          IUDB1     454
      CALL ASTOP(MSG(1),15)                                             IUDB1     455
      ENDIF                                                             IUDB1     456
      IF(IDDAT(JEI+3).EQ.0) THEN                                        IUDB1     457
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     458
      WRITE(MSG(2),1320) IORD,BLNAM1,BLNAM2                             IUDB1     459
      CALL PRTMSG(2)                                                    IUDB1     460
      MSG(1)='IUDB5: UD ERROR'                                          IUDB1     461
      CALL ASTOP(MSG(1),15)                                             IUDB1     462
      ENDIF                                                             IUDB1     463
      TRATIO=DDAT(JEI+2)/DDAT(JEI+3)                                    IUDB1     464
      IF(IDDAT(JEI+2).EQ.IDDAT(JEI+3))THEN                              IUDB1     465
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     466
      WRITE(MSG(2),1460) IORD,BLNAM1,BLNAM2                             IUDB1     467
      CALL PRTMSG(2)                                                    IUDB1     468
      MSG(1)='IUDB5: UD ERROR'                                          IUDB1     469
      CALL ASTOP(MSG(1),15)                                             IUDB1     470
      ENDIF                                                             IUDB1     471
      VMAX=DDAT(JEI+4)                                                  IUDB1     472
      VMIN=DDAT(JEI+5)                                                  IUDB1     473
      IF(IDDAT(JEI+4).EQ.0.AND.IDDAT(JEI+5).EQ.0) LL=1                  IUDB1     474
      IF(VMAX.LE.VMIN.AND.LL.EQ.0) THEN                                 IUDB1     475
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1     476
      WRITE(MSG(2),1040) IORD,BLNAM1,BLNAM2                             IUDB1     477
      WRITE(MSG(3),1041) VMAX,VMIN                                      IUDB1     478
      CALL PRTMSG(3)                                                    IUDB1     479
      MSG(1)='IUDB5: UD ERROR'                                          IUDB1     480
      CALL ASTOP(MSG(1),15)                                             IUDB1     481
      ENDIF                                                             IUDB1     482
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1     483
         J2=JE5-2                                                       IUDB1     484
         DO 190 J=1,INTUD                                               IUDB1     485
         J2=J2+2                                                        IUDB1     486
         IDD=IDDAT(J2+2)                                                IUDB1     487
         IDD=IABS(IDD)                                                  IUDB1     488
         IF(IDD.EQ.IORD) THEN                                           IUDB1     489
            XDAT=1.0                                                    IUDB1     490
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     491
            IOUT=IDDAT(J2+1)                                            IUDB1     492
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1     493
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1     494
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1     495
               NEXTB=IOUT                                               IUDB1     496
               XDATN=XDAT                                               IUDB1     497
            ELSE                                                        IUDB1     498
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1     499
            ENDIF                                                       IUDB1     500
         ENDIF                                                          IUDB1     501
  190    CONTINUE                                                       IUDB1     502
      ENDIF                                                             IUDB1     503
      J3=JE6-3                                                          IUDB1     504
      DO 200 J=1,INPUD                                                  IUDB1     505
      J3=J3+3                                                           IUDB1     506
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     507
         IIN=IDDAT(J3+2)                                                IUDB1     508
         IF(IIN.EQ.20) THEN                                             IUDB1     509
            XDATN=DDAT(J3+3)                                            IUDB1     510
         ELSE                                                           IUDB1     511
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1     512
         ENDIF                                                          IUDB1     513
      ENDIF                                                             IUDB1     514
  200 CONTINUE                                                          IUDB1     515
      IDDAT(JEI+8)=0                                                    IUDB1     516
      IF (INDEX.EQ.2) THEN                                              IUDB1     517
         VALO=VALOUT(IORD)                                              IUDB1     518
         IF(JORD.LT.NUDB) THEN                                          IUDB1     519
            IF(NEXTB.EQ.0)THEN                                          IUDB1     520
            MSG(1)='IUDB5: 1'                                           IUDB1     521
            CALL ASTOP(MSG(1),8)                                        IUDB1     522
            ENDIF                                                       IUDB1     523
            VALOUT(NEXTB)=(VALO/GAIN-VALI)/XDATN                        IUDB1     524
         ELSE                                                           IUDB1     525
            VALIN(20)=(VALO/GAIN-VALI)/XDATN                            IUDB1     526
         ENDIF                                                          IUDB1     527
         XSTATE(KORD)=VALO*(1.0-TRATIO)                                 IUDB1     528
         IF(LL.EQ.0)THEN                                                IUDB1     529
            IF(VALO.GT.VMAX.OR.VALO.LT.VMIN) THEN                       IUDB1     530
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1),INAME(KN)    IUDB1     531
     *                        ,CID                                      IUDB1     532
            WRITE(MSG(2),1010) IORD,BLNAM1,BLNAM2,VALO                  IUDB1     533
            WRITE(MSG(3),1011) VMAX,VMIN                                IUDB1     534
            CALL PRTMSG(3)                                              IUDB1     535
            ENDIF                                                       IUDB1     536
         ENDIF                                                          IUDB1     537
      ELSE                                                              IUDB1     538
         VALO=VALI*GAIN                                                 IUDB1     539
         IF (LL.EQ.0) THEN                                              IUDB1     540
            IF (VALO.GT.VMAX) THEN                                      IUDB1     541
               VALO=VMAX                                                IUDB1     542
               IDDAT(JEI+8)=1                                           IUDB1     543
            ELSE IF (VALO.LT.VMIN) THEN                                 IUDB1     544
               VALO=VMIN                                                IUDB1     545
               IDDAT(JEI+8)=-1                                          IUDB1     546
            END IF                                                      IUDB1     547
         END IF                                                         IUDB1     548
         VALOUT(IORD)=VALO                                              IUDB1     549
         XSTATE(KORD)=VALO*(1.0-TRATIO)                                 IUDB1     550
      ENDIF                                                             IUDB1     551
      IDDAT(JEI+6)=LL                                                   IUDB1     552
      IF(LDEB)WRITE(IUD6,1440) KORD,JORD,XSTATE(KORD)                   IUDB1     553
C                                                                       IUDB1     554
      RETURN                                                            IUDB1     555
C                                                                       IUDB1     556
C-----------------------------------------------------------------------IUDB1     557
C                                                                       IUDB1     558
      ENTRY IUDB6(IORD,INDEX,NLF,KN,CID)                                IUDB1     559
CD                                                                      IUDB1     560
CD    FOR BLOCK TYPE 6 (SWITCH BLOCK).                                  IUDB1     561
CD                                                                      IUDB1     562
      LDEB=(JDEB(262).NE.0)                                             IUDB1     563
C                                                                       IUDB1     564
      JORD=JUDE(IORD)                                                   IUDB1     565
      JEI=JEB+2                                                         IUDB1     566
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1     567
C                                                                       IUDB1     568
      RETURN                                                            IUDB1     569
C                                                                       IUDB1     570
C-----------------------------------------------------------------------IUDB1     571
C                                                                       IUDB1     572
      ENTRY IUDB7(IORD,INDEX,NLF,KN,CID)                                IUDB1     573
CD                                                                      IUDB1     574
CD    FOR BLOCK TYPE 7 (HIGH VALUE BLOCK).                              IUDB1     575
CD                                                                      IUDB1     576
      LDEB=(JDEB(262).NE.0)                                             IUDB1     577
C                                                                       IUDB1     578
      NEXTB=0                                                           IUDB1     579
      VALI1=0.0                                                         IUDB1     580
      VALI2=0.0                                                         IUDB1     581
      NINP=0                                                            IUDB1     582
      II=0                                                              IUDB1     583
      JORD=JUDE(IORD)                                                   IUDB1     584
      VALO=VALOUT(IORD)                                                 IUDB1     585
      JEI=JEB+2                                                         IUDB1     586
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1     587
         J2=JE5-2                                                       IUDB1     588
         DO 210 J=1,INTUD                                               IUDB1     589
         J2=J2+2                                                        IUDB1     590
         IDD=IDDAT(J2+2)                                                IUDB1     591
         IDD=IABS(IDD)                                                  IUDB1     592
         IF(IDD.EQ.IORD) THEN                                           IUDB1     593
            XDAT=1.0                                                    IUDB1     594
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     595
            IOUT=IDDAT(J2+1)                                            IUDB1     596
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1     597
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1     598
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1     599
               NEXTB=IOUT                                               IUDB1     600
               XDATN=XDAT                                               IUDB1     601
               NINP=NINP+1                                              IUDB1     602
               IF(NINP.EQ.1) THEN                                       IUDB1     603
                  II=1                                                  IUDB1     604
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1     605
                  II=2                                                  IUDB1     606
               ELSE                                                     IUDB1     607
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     608
     *                            ,INAME(KN),CID                        IUDB1     609
                WRITE(MSG(2),1600) IORD,BLNAM1,BLNAM2                   IUDB1     610
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     611
                CALL PRTMSG(3)                                          IUDB1     612
                MSG(1)='IUDB7: UD ERROR'                                IUDB1     613
                CALL ASTOP(MSG(1),15)                                   IUDB1     614
                ENDIF                                                   IUDB1     615
            ELSE                                                        IUDB1     616
               NINP=NINP+1                                              IUDB1     617
               IF(NINP.EQ.1) THEN                                       IUDB1     618
                  VALI1=VALOUT(IOUT)*XDAT                               IUDB1     619
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1     620
                  VALI2=VALOUT(IOUT)*XDAT                               IUDB1     621
               ELSE                                                     IUDB1     622
               WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)           IUDB1     623
     *                           ,INAME(KN),CID                         IUDB1     624
               WRITE(MSG(2),1600) IORD,BLNAM1,BLNAM2                    IUDB1     625
               MSG(3)='           CHECK THE CONNECTIONS.'               IUDB1     626
               CALL PRTMSG(3)                                           IUDB1     627
               MSG(1)='IUDB7: UD ERROR'                                 IUDB1     628
               CALL ASTOP(MSG(1),15)                                    IUDB1     629
               ENDIF                                                    IUDB1     630
            ENDIF                                                       IUDB1     631
         ENDIF                                                          IUDB1     632
  210    CONTINUE                                                       IUDB1     633
      ENDIF                                                             IUDB1     634
      J3=JE6-3                                                          IUDB1     635
      DO 220 J=1,INPUD                                                  IUDB1     636
      J3=J3+3                                                           IUDB1     637
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     638
         IIN=IDDAT(J3+2)                                                IUDB1     639
         IF(IIN.EQ.20) THEN                                             IUDB1     640
            XDATN=DDAT(J3+3)                                            IUDB1     641
            NINP=NINP+1                                                 IUDB1     642
            IF(NINP.EQ.1) THEN                                          IUDB1     643
               II=1                                                     IUDB1     644
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1     645
               II=2                                                     IUDB1     646
            ELSE                                                        IUDB1     647
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     648
     *                            ,INAME(KN),CID                        IUDB1     649
                WRITE(MSG(2),1600) IORD,BLNAM1,BLNAM2                   IUDB1     650
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     651
                CALL PRTMSG(3)                                          IUDB1     652
                MSG(1)='IUDB7: UD ERROR'                                IUDB1     653
                CALL ASTOP(MSG(1),15)                                   IUDB1     654
            ENDIF                                                       IUDB1     655
         ELSE                                                           IUDB1     656
            NINP=NINP+1                                                 IUDB1     657
            IF(NINP.EQ.1) THEN                                          IUDB1     658
               VALI1=VALIN(IIN)*DDAT(J3+3)                              IUDB1     659
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1     660
               VALI2=VALIN(IIN)*DDAT(J3+3)                              IUDB1     661
            ELSE                                                        IUDB1     662
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     663
     *                            ,INAME(KN),CID                        IUDB1     664
                WRITE(MSG(2),1600) IORD,BLNAM1,BLNAM2                   IUDB1     665
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     666
                CALL PRTMSG(3)                                          IUDB1     667
                MSG(1)='IUDB7: UD ERROR'                                IUDB1     668
                CALL ASTOP(MSG(1),15)                                   IUDB1     669
            ENDIF                                                       IUDB1     670
         ENDIF                                                          IUDB1     671
      ENDIF                                                             IUDB1     672
  220 CONTINUE                                                          IUDB1     673
      IF(INDEX.EQ.2) THEN                                               IUDB1     674
         IF(II.EQ.0)THEN                                                IUDB1     675
         MSG(1)='IUDB7: 1'                                              IUDB1     676
         CALL ASTOP(MSG(1),8)                                           IUDB1     677
         ENDIF                                                          IUDB1     678
         IF(JORD.LT.NUDB) THEN                                          IUDB1     679
            IF(NEXTB.EQ.0)THEN                                          IUDB1     680
            MSG(1)='IUDB7: 2'                                           IUDB1     681
            CALL ASTOP(MSG(1),8)                                        IUDB1     682
            ENDIF                                                       IUDB1     683
            VALOUT(NEXTB)=VALO/XDATN                                    IUDB1     684
         ELSE                                                           IUDB1     685
            VALIN(20)=VALO/XDATN                                        IUDB1     686
         ENDIF                                                          IUDB1     687
         IF(II.EQ.1.AND.VALO.LT.VALI2) THEN                             IUDB1     688
             WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)             IUDB1     689
     *                         ,INAME(KN),CID                           IUDB1     690
             WRITE(MSG(2),1610) IORD,BLNAM1,BLNAM2                      IUDB1     691
             WRITE(MSG(3),1611)                                         IUDB1     692
             WRITE(MSG(4),1612)                                         IUDB1     693
             WRITE(MSG(5),1613) VALO,VALI2                              IUDB1     694
             CALL PRTMSG(5)                                             IUDB1     695
         ENDIF                                                          IUDB1     696
         IF(II.EQ.2.AND.VALO.LT.VALI1) THEN                             IUDB1     697
             WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)             IUDB1     698
     *                         ,INAME(KN),CID                           IUDB1     699
             WRITE(MSG(2),1610) IORD,BLNAM1,BLNAM2                      IUDB1     700
             WRITE(MSG(3),1611)                                         IUDB1     701
             WRITE(MSG(4),1612)                                         IUDB1     702
             WRITE(MSG(5),1613) VALO,VALI2                              IUDB1     703
             CALL PRTMSG(5)                                             IUDB1     704
         ENDIF                                                          IUDB1     705
      ELSE                                                              IUDB1     706
         VALO=VALI1                                                     IUDB1     707
         IF(VALO.LT.VALI2) VALO=VALI2                                   IUDB1     708
         VALOUT(IORD)=VALO                                              IUDB1     709
      ENDIF                                                             IUDB1     710
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1     711
C                                                                       IUDB1     712
      RETURN                                                            IUDB1     713
C                                                                       IUDB1     714
C-----------------------------------------------------------------------IUDB1     715
C                                                                       IUDB1     716
      ENTRY IUDB8(IORD,INDEX,NLF,KN,CID)                                IUDB1     717
CD                                                                      IUDB1     718
CD    FOR BLOCK TYPE 8 (LOW VALUE BLOCK).                               IUDB1     719
CD                                                                      IUDB1     720
      LDEB=(JDEB(262).NE.0)                                             IUDB1     721
C                                                                       IUDB1     722
      NEXTB=0                                                           IUDB1     723
      VALI1=0.0                                                         IUDB1     724
      VALI2=0.0                                                         IUDB1     725
      NINP=0                                                            IUDB1     726
      II=0                                                              IUDB1     727
      JORD=JUDE(IORD)                                                   IUDB1     728
      VALO=VALOUT(IORD)                                                 IUDB1     729
      JEI=JEB+2                                                         IUDB1     730
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1     731
         J2=JE5-2                                                       IUDB1     732
         DO 230 J=1,INTUD                                               IUDB1     733
         J2=J2+2                                                        IUDB1     734
         IDD=IDDAT(J2+2)                                                IUDB1     735
         IDD=IABS(IDD)                                                  IUDB1     736
         IF(IDD.EQ.IORD) THEN                                           IUDB1     737
            XDAT=1.0                                                    IUDB1     738
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     739
            IOUT=IDDAT(J2+1)                                            IUDB1     740
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1     741
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1     742
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1     743
               NEXTB=IOUT                                               IUDB1     744
               XDATN=XDAT                                               IUDB1     745
               NINP=NINP+1                                              IUDB1     746
               IF(NINP.EQ.1) THEN                                       IUDB1     747
                  II=1                                                  IUDB1     748
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1     749
                  II=2                                                  IUDB1     750
               ELSE                                                     IUDB1     751
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     752
     *                            ,INAME(KN),CID                        IUDB1     753
                WRITE(MSG(2),1700) IORD,BLNAM1,BLNAM2                   IUDB1     754
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     755
                CALL PRTMSG(3)                                          IUDB1     756
                MSG(1)='IUDB8: UD ERROR'                                IUDB1     757
                CALL ASTOP(MSG(1),15)                                   IUDB1     758
               ENDIF                                                    IUDB1     759
            ELSE                                                        IUDB1     760
               NINP=NINP+1                                              IUDB1     761
               IF(NINP.EQ.1) THEN                                       IUDB1     762
                  VALI1=VALOUT(IOUT)*XDAT                               IUDB1     763
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1     764
                  VALI2=VALOUT(IOUT)*XDAT                               IUDB1     765
               ELSE                                                     IUDB1     766
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     767
     *                            ,INAME(KN),CID                        IUDB1     768
                WRITE(MSG(2),1700) IORD,BLNAM1,BLNAM2                   IUDB1     769
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     770
                CALL PRTMSG(3)                                          IUDB1     771
                MSG(1)='IUDB8: UD ERROR'                                IUDB1     772
                CALL ASTOP(MSG(1),15)                                   IUDB1     773
               ENDIF                                                    IUDB1     774
            ENDIF                                                       IUDB1     775
         ENDIF                                                          IUDB1     776
  230    CONTINUE                                                       IUDB1     777
      ENDIF                                                             IUDB1     778
      J3=JE6-3                                                          IUDB1     779
      DO 240 J=1,INPUD                                                  IUDB1     780
      J3=J3+3                                                           IUDB1     781
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     782
         IIN=IDDAT(J3+2)                                                IUDB1     783
         IF(IIN.EQ.20) THEN                                             IUDB1     784
            XDATN=DDAT(J3+3)                                            IUDB1     785
            NINP=NINP+1                                                 IUDB1     786
            IF(NINP.EQ.1) THEN                                          IUDB1     787
               II=1                                                     IUDB1     788
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1     789
               II=2                                                     IUDB1     790
            ELSE                                                        IUDB1     791
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     792
     *                            ,INAME(KN),CID                        IUDB1     793
                WRITE(MSG(2),1700) IORD,BLNAM1,BLNAM2                   IUDB1     794
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     795
                CALL PRTMSG(3)                                          IUDB1     796
                MSG(1)='IUDB8: UD ERROR'                                IUDB1     797
                CALL ASTOP(MSG(1),15)                                   IUDB1     798
            ENDIF                                                       IUDB1     799
         ELSE                                                           IUDB1     800
            NINP=NINP+1                                                 IUDB1     801
            IF(NINP.EQ.1) THEN                                          IUDB1     802
               VALI1=VALIN(IIN)*DDAT(J3+3)                              IUDB1     803
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1     804
               VALI2=VALIN(IIN)*DDAT(J3+3)                              IUDB1     805
            ELSE                                                        IUDB1     806
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     807
     *                            ,INAME(KN),CID                        IUDB1     808
                WRITE(MSG(2),1700) IORD,BLNAM1,BLNAM2                   IUDB1     809
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     810
                CALL PRTMSG(3)                                          IUDB1     811
                MSG(1)='IUDB8: UD ERROR'                                IUDB1     812
                CALL ASTOP(MSG(1),15)                                   IUDB1     813
            ENDIF                                                       IUDB1     814
         ENDIF                                                          IUDB1     815
      ENDIF                                                             IUDB1     816
  240 CONTINUE                                                          IUDB1     817
      IF(INDEX.EQ.2) THEN                                               IUDB1     818
         IF(II.EQ.0)THEN                                                IUDB1     819
         MSG(1)='IUDB8: 1'                                              IUDB1     820
         CALL ASTOP(MSG(1),8)                                           IUDB1     821
         ENDIF                                                          IUDB1     822
         IF(JORD.LT.NUDB) THEN                                          IUDB1     823
            IF(NEXTB.EQ.0)THEN                                          IUDB1     824
            MSG(1)='IUDB8: 2'                                           IUDB1     825
            CALL ASTOP(MSG(1),8)                                        IUDB1     826
            ENDIF                                                       IUDB1     827
            VALOUT(NEXTB)=VALO/XDATN                                    IUDB1     828
         ELSE                                                           IUDB1     829
            VALIN(20)=VALO/XDATN                                        IUDB1     830
         ENDIF                                                          IUDB1     831
         IF(II.EQ.1.AND.VALO.GT.VALI2) THEN                             IUDB1     832
             WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)             IUDB1     833
     *                         ,INAME(KN),CID                           IUDB1     834
             WRITE(MSG(2),1710) IORD,BLNAM1,BLNAM2                      IUDB1     835
             WRITE(MSG(3),1611)                                         IUDB1     836
             WRITE(MSG(4),1612)                                         IUDB1     837
             WRITE(MSG(5),1613) VALO,VALI2                              IUDB1     838
             CALL PRTMSG(5)                                             IUDB1     839
         ENDIF                                                          IUDB1     840
         IF(II.EQ.2.AND.VALO.GT.VALI1) THEN                             IUDB1     841
             WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)             IUDB1     842
     *                         ,INAME(KN),CID                           IUDB1     843
             WRITE(MSG(2),1710) IORD,BLNAM1,BLNAM2                      IUDB1     844
             WRITE(MSG(3),1611)                                         IUDB1     845
             WRITE(MSG(4),1612)                                         IUDB1     846
             WRITE(MSG(5),1613) VALO,VALI2                              IUDB1     847
             CALL PRTMSG(5)                                             IUDB1     848
         ENDIF                                                          IUDB1     849
      ELSE                                                              IUDB1     850
         VALO=VALI1                                                     IUDB1     851
         IF(VALO.GT.VALI2) VALO=VALI2                                   IUDB1     852
         VALOUT(IORD)=VALO                                              IUDB1     853
      ENDIF                                                             IUDB1     854
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1     855
C                                                                       IUDB1     856
      RETURN                                                            IUDB1     857
C                                                                       IUDB1     858
C-----------------------------------------------------------------------IUDB1     859
C                                                                       IUDB1     860
      ENTRY IUDB9(IORD,INDEX,NLF,KN,CID)                                IUDB1     861
CD                                                                      IUDB1     862
CD    FOR BLOCK TYPE 9 (MULTIPLICATION BLOCK).                          IUDB1     863
CD                                                                      IUDB1     864
      LDEB=(JDEB(262).NE.0)                                             IUDB1     865
C                                                                       IUDB1     866
      NEXTB=0                                                           IUDB1     867
      VALI1=0.0                                                         IUDB1     868
      VALI2=0.0                                                         IUDB1     869
      NINP=0                                                            IUDB1     870
      II=0                                                              IUDB1     871
      JORD=JUDE(IORD)                                                   IUDB1     872
      VALO=VALOUT(IORD)                                                 IUDB1     873
      JEI=JEB+2                                                         IUDB1     874
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1     875
         J2=JE5-2                                                       IUDB1     876
         DO 250 J=1,INTUD                                               IUDB1     877
         J2=J2+2                                                        IUDB1     878
         IDD=IDDAT(J2+2)                                                IUDB1     879
         IDD=IABS(IDD)                                                  IUDB1     880
         IF(IDD.EQ.IORD) THEN                                           IUDB1     881
            XDAT=1.0                                                    IUDB1     882
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1     883
            IOUT=IDDAT(J2+1)                                            IUDB1     884
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1     885
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1     886
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1     887
               NEXTB=IOUT                                               IUDB1     888
               XDATN=XDAT                                               IUDB1     889
               NINP=NINP+1                                              IUDB1     890
               IF(NINP.EQ.1) THEN                                       IUDB1     891
                  II=1                                                  IUDB1     892
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1     893
                  II=2                                                  IUDB1     894
               ELSE                                                     IUDB1     895
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     896
     *                            ,INAME(KN),CID                        IUDB1     897
                WRITE(MSG(2),1800) IORD,BLNAM1,BLNAM2                   IUDB1     898
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     899
                CALL PRTMSG(3)                                          IUDB1     900
                  MSG(1)='IUDB9: UD ERROR'                              IUDB1     901
                  CALL ASTOP(MSG(1),15)                                 IUDB1     902
               ENDIF                                                    IUDB1     903
            ELSE                                                        IUDB1     904
               NINP=NINP+1                                              IUDB1     905
               IF(NINP.EQ.1) THEN                                       IUDB1     906
                  VALI1=VALOUT(IOUT)*XDAT                               IUDB1     907
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1     908
                  VALI2=VALOUT(IOUT)*XDAT                               IUDB1     909
               ELSE                                                     IUDB1     910
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     911
     *                            ,INAME(KN),CID                        IUDB1     912
                WRITE(MSG(2),1800) IORD,BLNAM1,BLNAM2                   IUDB1     913
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     914
                CALL PRTMSG(3)                                          IUDB1     915
                  MSG(1)='IUDB9: UD ERROR'                              IUDB1     916
                  CALL ASTOP(MSG(1),15)                                 IUDB1     917
               ENDIF                                                    IUDB1     918
            ENDIF                                                       IUDB1     919
         ENDIF                                                          IUDB1     920
  250    CONTINUE                                                       IUDB1     921
      ENDIF                                                             IUDB1     922
      J3=JE6-3                                                          IUDB1     923
      DO 260 J=1,INPUD                                                  IUDB1     924
      J3=J3+3                                                           IUDB1     925
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1     926
         IIN=IDDAT(J3+2)                                                IUDB1     927
         IF(IIN.EQ.20) THEN                                             IUDB1     928
            XDATN=DDAT(J3+3)                                            IUDB1     929
            NINP=NINP+1                                                 IUDB1     930
            IF(NINP.EQ.1) THEN                                          IUDB1     931
               II=1                                                     IUDB1     932
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1     933
               II=2                                                     IUDB1     934
            ELSE                                                        IUDB1     935
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     936
     *                            ,INAME(KN),CID                        IUDB1     937
                WRITE(MSG(2),1800) IORD,BLNAM1,BLNAM2                   IUDB1     938
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     939
                CALL PRTMSG(3)                                          IUDB1     940
                   MSG(1)='IUDB9: UD ERROR'                             IUDB1     941
                   CALL ASTOP(MSG(1),15)                                IUDB1     942
            ENDIF                                                       IUDB1     943
         ELSE                                                           IUDB1     944
            NINP=NINP+1                                                 IUDB1     945
            IF(NINP.EQ.1) THEN                                          IUDB1     946
               VALI1=VALIN(IIN)*DDAT(J3+3)                              IUDB1     947
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1     948
               VALI2=VALIN(IIN)*DDAT(J3+3)                              IUDB1     949
            ELSE                                                        IUDB1     950
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1     951
     *                            ,INAME(KN),CID                        IUDB1     952
                WRITE(MSG(2),1800) IORD,BLNAM1,BLNAM2                   IUDB1     953
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1     954
                CALL PRTMSG(3)                                          IUDB1     955
                  MSG(1)='IUDB9: UD ERROR'                              IUDB1     956
                  CALL ASTOP(MSG(1),15)                                 IUDB1     957
            ENDIF                                                       IUDB1     958
         ENDIF                                                          IUDB1     959
      ENDIF                                                             IUDB1     960
  260 CONTINUE                                                          IUDB1     961
      IF(INDEX.EQ.2) THEN                                               IUDB1     962
         IF(II.EQ.0) THEN                                               IUDB1     963
         MSG(1)='IUDB9: 1'                                              IUDB1     964
         CALL ASTOP(MSG(1),8)                                           IUDB1     965
         ENDIF                                                          IUDB1     966
         IF(II.EQ.1.AND.VALI2.LE.0.0.AND.VALI2.GE.0.0) THEN             IUDB1     967
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1     968
     *                        ,INAME(KN),CID                            IUDB1     969
            WRITE(MSG(2),1820) IORD,BLNAM1,BLNAM2                       IUDB1     970
            MSG(3)=                                                     IUDB1     971
     *'           IN THE OTHER INPUT TO BE UNDETERMINED.'               IUDB1     972
            CALL PRTMSG(3)                                              IUDB1     973
            MSG(1)='IUDB9: UD ERROR'                                    IUDB1     974
            CALL ASTOP(MSG(1),15)                                       IUDB1     975
         ENDIF                                                          IUDB1     976
         IF(II.EQ.2.AND.VALI1.LE.0.0.AND.VALI1.GE.0.0) THEN             IUDB1     977
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1     978
     *                        ,INAME(KN),CID                            IUDB1     979
            WRITE(MSG(2),1820) IORD,BLNAM1,BLNAM2                       IUDB1     980
            MSG(3)=                                                     IUDB1     981
     *'           IN THE OTHER INPUT TO BE UNDETERMINED.'               IUDB1     982
            CALL PRTMSG(3)                                              IUDB1     983
            MSG(1)='IUDB9: UD ERROR'                                    IUDB1     984
            CALL ASTOP(MSG(1),15)                                       IUDB1     985
         ENDIF                                                          IUDB1     986
         IF(JORD.LT.NUDB) THEN                                          IUDB1     987
            IF(NEXTB.EQ.0)THEN                                          IUDB1     988
            MSG(1)='IUDB9: 2'                                           IUDB1     989
            CALL ASTOP(MSG(1),8)                                        IUDB1     990
            ENDIF                                                       IUDB1     991
            IF(II.EQ.1)VALOUT(NEXTB)=VALO/VALI2/XDATN                   IUDB1     992
            IF(II.EQ.2)VALOUT(NEXTB)=VALO/VALI1/XDATN                   IUDB1     993
         ELSE                                                           IUDB1     994
            IF(II.EQ.1)VALIN(20)=VALO/VALI2/XDATN                       IUDB1     995
            IF(II.EQ.2)VALIN(20)=VALO/VALI1/XDATN                       IUDB1     996
         ENDIF                                                          IUDB1     997
      ELSE                                                              IUDB1     998
         VALOUT(IORD)=VALI1*VALI2                                       IUDB1     999
      ENDIF                                                             IUDB1    1000
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1001
C                                                                       IUDB1    1002
      RETURN                                                            IUDB1    1003
C                                                                       IUDB1    1004
C-----------------------------------------------------------------------IUDB1    1005
C                                                                       IUDB1    1006
      ENTRY IUDB10(IORD,INDEX,NLF,KN,CID)                               IUDB1    1007
CD                                                                      IUDB1    1008
CD    FOR BLOCK TYPE 10 (DIVISION BLOCK).                               IUDB1    1009
CD                                                                      IUDB1    1010
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1011
C                                                                       IUDB1    1012
      NEXTB=0                                                           IUDB1    1013
      VALI1=0                                                           IUDB1    1014
      VALI2=0                                                           IUDB1    1015
      NINP=0                                                            IUDB1    1016
      II=0                                                              IUDB1    1017
      JORD=JUDE(IORD)                                                   IUDB1    1018
      VALO=VALOUT(IORD)                                                 IUDB1    1019
      JEI=JEB+2                                                         IUDB1    1020
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1021
         J2=JE5-2                                                       IUDB1    1022
         DO 270 J=1,INTUD                                               IUDB1    1023
         J2=J2+2                                                        IUDB1    1024
         IDD=IDDAT(J2+2)                                                IUDB1    1025
         IDD=IABS(IDD)                                                  IUDB1    1026
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1027
            XDAT=1.0                                                    IUDB1    1028
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1029
            IOUT=IDDAT(J2+1)                                            IUDB1    1030
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1031
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1032
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1033
               NEXTB=IOUT                                               IUDB1    1034
               XDATN=XDAT                                               IUDB1    1035
               NINP=NINP+1                                              IUDB1    1036
               IF(NINP.EQ.1) THEN                                       IUDB1    1037
                  II=1                                                  IUDB1    1038
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1    1039
                  II=2                                                  IUDB1    1040
               ELSE                                                     IUDB1    1041
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    1042
     *                            ,INAME(KN),CID                        IUDB1    1043
                WRITE(MSG(2),1900) IORD,BLNAM1,BLNAM2                   IUDB1    1044
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    1045
                CALL PRTMSG(3)                                          IUDB1    1046
                 MSG(1)='IUDB10: UD ERROR'                              IUDB1    1047
                 CALL ASTOP(MSG(1),16)                                  IUDB1    1048
               ENDIF                                                    IUDB1    1049
            ELSE                                                        IUDB1    1050
               NINP=NINP+1                                              IUDB1    1051
               IF(NINP.EQ.1) THEN                                       IUDB1    1052
                  VALI1=VALOUT(IOUT)*XDAT                               IUDB1    1053
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1    1054
                  VALI2=VALOUT(IOUT)*XDAT                               IUDB1    1055
               ELSE                                                     IUDB1    1056
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    1057
     *                            ,INAME(KN),CID                        IUDB1    1058
                WRITE(MSG(2),1900) IORD,BLNAM1,BLNAM2                   IUDB1    1059
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    1060
                CALL PRTMSG(3)                                          IUDB1    1061
                 MSG(1)='IUDB10: UD ERROR'                              IUDB1    1062
                 CALL ASTOP(MSG(1),16)                                  IUDB1    1063
               ENDIF                                                    IUDB1    1064
            ENDIF                                                       IUDB1    1065
         ENDIF                                                          IUDB1    1066
  270    CONTINUE                                                       IUDB1    1067
      ENDIF                                                             IUDB1    1068
      J3=JE6-3                                                          IUDB1    1069
      DO 280 J=1,INPUD                                                  IUDB1    1070
      J3=J3+3                                                           IUDB1    1071
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1072
         IIN=IDDAT(J3+2)                                                IUDB1    1073
         IF(IIN.EQ.20) THEN                                             IUDB1    1074
            XDATN=DDAT(J3+3)                                            IUDB1    1075
            NINP=NINP+1                                                 IUDB1    1076
            IF(NINP.EQ.1) THEN                                          IUDB1    1077
               II=1                                                     IUDB1    1078
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1    1079
               II=2                                                     IUDB1    1080
            ELSE                                                        IUDB1    1081
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    1082
     *                            ,INAME(KN),CID                        IUDB1    1083
                WRITE(MSG(2),1900) IORD,BLNAM1,BLNAM2                   IUDB1    1084
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    1085
                CALL PRTMSG(3)                                          IUDB1    1086
               MSG(1)='IUDB10: UD ERROR'                                IUDB1    1087
               CALL ASTOP(MSG(1),16)                                    IUDB1    1088
            ENDIF                                                       IUDB1    1089
         ELSE                                                           IUDB1    1090
            NINP=NINP+1                                                 IUDB1    1091
            IF(NINP.EQ.1) THEN                                          IUDB1    1092
               VALI1=VALIN(IIN)*DDAT(J3+3)                              IUDB1    1093
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1    1094
               VALI2=VALIN(IIN)*DDAT(J3+3)                              IUDB1    1095
            ELSE                                                        IUDB1    1096
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    1097
     *                            ,INAME(KN),CID                        IUDB1    1098
                WRITE(MSG(2),1900) IORD,BLNAM1,BLNAM2                   IUDB1    1099
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    1100
                CALL PRTMSG(3)                                          IUDB1    1101
               MSG(1)='IUDB10: UD ERROR'                                IUDB1    1102
               CALL ASTOP(MSG(1),16)                                    IUDB1    1103
            ENDIF                                                       IUDB1    1104
         ENDIF                                                          IUDB1    1105
      ENDIF                                                             IUDB1    1106
  280 CONTINUE                                                          IUDB1    1107
      IF(INDEX.EQ.2) THEN                                               IUDB1    1108
         IF(II.EQ.0)THEN                                                IUDB1    1109
         MSG(1)='IUDB10: 1'                                             IUDB1    1110
         CALL ASTOP(MSG(1),9)                                           IUDB1    1111
         ENDIF                                                          IUDB1    1112
         IF(II.EQ.1.AND.VALI2.LE.0.0.AND.VALI2.GE.0.0) THEN             IUDB1    1113
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1114
     *                        ,INAME(KN),CID                            IUDB1    1115
            WRITE(MSG(2),1910) IORD,BLNAM1,BLNAM2                       IUDB1    1116
            CALL PRTMSG(2)                                              IUDB1    1117
            MSG(1)='IUDB10: UD ERROR'                                   IUDB1    1118
            CALL ASTOP(MSG(1),16)                                       IUDB1    1119
         ENDIF                                                          IUDB1    1120
         IF(II.EQ.2.AND.VALO.LE.0.0.AND.VALO.GE.0.0) THEN               IUDB1    1121
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1122
     *                        ,INAME(KN),CID                            IUDB1    1123
            WRITE(MSG(2),1920) IORD,BLNAM1,BLNAM2                       IUDB1    1124
            MSG(3)=                                                     IUDB1    1125
     *'           IN UNDETERMINED DENOMINATOR'                          IUDB1    1126
            CALL PRTMSG(3)                                              IUDB1    1127
            MSG(1)='IUDB10: UD ERROR'                                   IUDB1    1128
            CALL ASTOP(MSG(1),16)                                       IUDB1    1129
         ENDIF                                                          IUDB1    1130
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1131
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1132
            MSG(1)='IUDB10: 2'                                          IUDB1    1133
            CALL ASTOP(MSG(1),9)                                        IUDB1    1134
            ENDIF                                                       IUDB1    1135
            IF(II.EQ.1)VALOUT(NEXTB)=VALO*VALI2/XDATN                   IUDB1    1136
            IF(II.EQ.2)VALOUT(NEXTB)=VALI1/VALO/XDATN                   IUDB1    1137
         ELSE                                                           IUDB1    1138
            IF(II.EQ.1)VALIN(20)=VALO*VALI2/XDATN                       IUDB1    1139
            IF(II.EQ.2)VALIN(20)=VALI1/VALO/XDATN                       IUDB1    1140
         ENDIF                                                          IUDB1    1141
      ELSE                                                              IUDB1    1142
         IF(VALI2.LE.0.0.AND.VALI2.GE.0.0) THEN                         IUDB1    1143
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1144
     *                        ,INAME(KN),CID                            IUDB1    1145
            WRITE(MSG(2),1910) IORD,BLNAM1,BLNAM2                       IUDB1    1146
            CALL PRTMSG(2)                                              IUDB1    1147
            MSG(1)='IUDB10: UD ERROR'                                   IUDB1    1148
            CALL ASTOP(MSG(1),16)                                       IUDB1    1149
         ENDIF                                                          IUDB1    1150
         VALOUT(IORD)=VALI1/VALI2                                       IUDB1    1151
      ENDIF                                                             IUDB1    1152
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1153
C                                                                       IUDB1    1154
      RETURN                                                            IUDB1    1155
C                                                                       IUDB1    1156
C-----------------------------------------------------------------------IUDB1    1157
C                                                                       IUDB1    1158
      ENTRY IUDB11(IORD,INDEX,NLF,KN,CID)                               IUDB1    1159
CD                                                                      IUDB1    1160
CD    FOR BLOCK TYPE 11 (INITIAL VALUE BLOCK).                          IUDB1    1161
CD                                                                      IUDB1    1162
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1163
C                                                                       IUDB1    1164
      VALI=0.0                                                          IUDB1    1165
      JORD=JUDE(IORD)                                                   IUDB1    1166
      JEI=JEB+2                                                         IUDB1    1167
      IF(INDEX.EQ.1) THEN                                               IUDB1    1168
         J2=JE5-2                                                       IUDB1    1169
         DO 290 J=1,INTUD                                               IUDB1    1170
         J2=J2+2                                                        IUDB1    1171
         IDD=IDDAT(J2+2)                                                IUDB1    1172
         IDD=IABS(IDD)                                                  IUDB1    1173
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1174
            XDAT=1.0                                                    IUDB1    1175
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1176
            IOUT=IDDAT(J2+1)                                            IUDB1    1177
            VALI=VALI+VALOUT(IOUT)*XDAT                                 IUDB1    1178
         ENDIF                                                          IUDB1    1179
  290    CONTINUE                                                       IUDB1    1180
      ENDIF                                                             IUDB1    1181
      J3=JE6-3                                                          IUDB1    1182
      DO 300 J=1,INPUD                                                  IUDB1    1183
      J3=J3+3                                                           IUDB1    1184
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1185
         IIN=IDDAT(J3+2)                                                IUDB1    1186
         VALI=VALI+VALIN(IIN)*DDAT(J3+3)                                IUDB1    1187
      ENDIF                                                             IUDB1    1188
  300 CONTINUE                                                          IUDB1    1189
      DDAT(JEI+1)=VALI                                                  IUDB1    1190
      VALOUT(IORD)=VALI                                                 IUDB1    1191
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1192
C                                                                       IUDB1    1193
      RETURN                                                            IUDB1    1194
C                                                                       IUDB1    1195
C-----------------------------------------------------------------------IUDB1    1196
C                                                                       IUDB1    1197
      ENTRY IUDB12(IORD,INDEX,NLF,KN,CID)                               IUDB1    1198
CD                                                                      IUDB1    1199
CD    FOR BLOCK TYPE 12 (DELAY BLOCK).                                  IUDB1    1200
CD                                                                      IUDB1    1201
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1202
C                                                                       IUDB1    1203
      NEXTB=0                                                           IUDB1    1204
      VALI=0.0                                                          IUDB1    1205
      JORD=JUDE(IORD)                                                   IUDB1    1206
      KORD=JSTATE+KUDE(IORD)+1                                          IUDB1    1207
      JEI=JEB+2                                                         IUDB1    1208
      GAIN=DDAT(JEI+1)                                                  IUDB1    1209
      TDEL=DDAT(JEI+2)                                                  IUDB1    1210
      IF(IDDAT(JEI+1).EQ.0) THEN                                        IUDB1    1211
      WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID      IUDB1    1212
      WRITE(MSG(2),1020) IORD,BLNAM1,BLNAM2                             IUDB1    1213
      CALL PRTMSG(2)                                                    IUDB1    1214
         MSG(1)='IUDB12: UD ERROR'                                      IUDB1    1215
         CALL ASTOP(MSG(1),16)                                          IUDB1    1216
      ENDIF                                                             IUDB1    1217
      IF(TDEL.LT.0.0) THEN                                              IUDB1    1218
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1219
     *                        ,INAME(KN),CID                            IUDB1    1220
            WRITE(MSG(2),2110) IORD,BLNAM1,BLNAM2                       IUDB1    1221
            CALL PRTMSG(2)                                              IUDB1    1222
         MSG(1)='IUDB12: UD ERROR'                                      IUDB1    1223
         CALL ASTOP(MSG(1),16)                                          IUDB1    1224
      ENDIF                                                             IUDB1    1225
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1226
         J2=JE5-2                                                       IUDB1    1227
         DO 310 J=1,INTUD                                               IUDB1    1228
         J2=J2+2                                                        IUDB1    1229
         IDD=IDDAT(J2+2)                                                IUDB1    1230
         IDD=IABS(IDD)                                                  IUDB1    1231
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1232
            XDAT=1.0                                                    IUDB1    1233
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1234
            IOUT=IDDAT(J2+1)                                            IUDB1    1235
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1236
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1237
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1238
               NEXTB=IOUT                                               IUDB1    1239
               XDATN=XDAT                                               IUDB1    1240
            ELSE                                                        IUDB1    1241
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1242
            ENDIF                                                       IUDB1    1243
         ENDIF                                                          IUDB1    1244
  310    CONTINUE                                                       IUDB1    1245
      ENDIF                                                             IUDB1    1246
      J3=JE6-3                                                          IUDB1    1247
      DO 320 J=1,INPUD                                                  IUDB1    1248
      J3=J3+3                                                           IUDB1    1249
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1250
         IIN=IDDAT(J3+2)                                                IUDB1    1251
         IF(IIN.EQ.20) THEN                                             IUDB1    1252
            XDATN=DDAT(J3+3)                                            IUDB1    1253
         ELSE                                                           IUDB1    1254
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1255
         ENDIF                                                          IUDB1    1256
      ENDIF                                                             IUDB1    1257
  320 CONTINUE                                                          IUDB1    1258
      IF(INDEX.EQ.2) THEN                                               IUDB1    1259
         VALO=VALOUT(IORD)                                              IUDB1    1260
         IF(IDDAT(JEI+2).NE.0)XSTATE(KORD)=VALO                         IUDB1    1261
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1262
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1263
            MSG(1)='IUDB12: 1'                                          IUDB1    1264
            CALL ASTOP(MSG(1),9)                                        IUDB1    1265
            ENDIF                                                       IUDB1    1266
            VALOUT(NEXTB)=(VALO/GAIN-VALI)/XDATN                        IUDB1    1267
         ELSE                                                           IUDB1    1268
            VALIN(20)=(VALO/GAIN-VALI)/XDATN                            IUDB1    1269
         ENDIF                                                          IUDB1    1270
      ELSE                                                              IUDB1    1271
         VALOUT(IORD)=VALI*GAIN                                         IUDB1    1272
         IF(IDDAT(JEI+2).NE.0)XSTATE(KORD)=VALI*GAIN                    IUDB1    1273
      ENDIF                                                             IUDB1    1274
      IDEL=IDDAT(JEI+3)                                                 IUDB1    1275
      IDDAT(JEI+4)=1                                                    IUDB1    1276
      IDDAT(JEI+5)=1                                                    IUDB1    1277
      DELH(IDEL,1)=VALOUT(IORD)                                         IUDB1    1278
      DELT(1)=0.0                                                       IUDB1    1279
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1280
C                                                                       IUDB1    1281
      RETURN                                                            IUDB1    1282
C                                                                       IUDB1    1283
C-----------------------------------------------------------------------IUDB1    1284
C                                                                       IUDB1    1285
      ENTRY IUDB13(IORD,INDEX,NLF,KN,CID)                               IUDB1    1286
CD                                                                      IUDB1    1287
CD    FOR BLOCK TYPE 13 (SINE BLOCK).                                   IUDB1    1288
CD                                                                      IUDB1    1289
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1290
C                                                                       IUDB1    1291
      NEXTB=0                                                           IUDB1    1292
      VALI=0.0                                                          IUDB1    1293
      JORD=JUDE(IORD)                                                   IUDB1    1294
      JEI=JEB+2                                                         IUDB1    1295
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1296
         J2=JE5-2                                                       IUDB1    1297
         DO 330 J=1,INTUD                                               IUDB1    1298
         J2=J2+2                                                        IUDB1    1299
         IDD=IDDAT(J2+2)                                                IUDB1    1300
         IDD=IABS(IDD)                                                  IUDB1    1301
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1302
            XDAT=1.0                                                    IUDB1    1303
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1304
            IOUT=IDDAT(J2+1)                                            IUDB1    1305
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1306
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1307
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1308
               NEXTB=IOUT                                               IUDB1    1309
               XDATN=XDAT                                               IUDB1    1310
            ELSE                                                        IUDB1    1311
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1312
            ENDIF                                                       IUDB1    1313
         ENDIF                                                          IUDB1    1314
  330    CONTINUE                                                       IUDB1    1315
      ENDIF                                                             IUDB1    1316
      J3=JE6-3                                                          IUDB1    1317
      DO 340 J=1,INPUD                                                  IUDB1    1318
      J3=J3+3                                                           IUDB1    1319
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1320
         IIN=IDDAT(J3+2)                                                IUDB1    1321
         IF(IIN.EQ.20) THEN                                             IUDB1    1322
            XDATN=DDAT(J3+3)                                            IUDB1    1323
         ELSE                                                           IUDB1    1324
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1325
         ENDIF                                                          IUDB1    1326
      ENDIF                                                             IUDB1    1327
  340 CONTINUE                                                          IUDB1    1328
      FACT=45.0/ATAN(1.0)                                               IUDB1    1329
      IF(INDEX.EQ.2) THEN                                               IUDB1    1330
         VALO=VALOUT(IORD)                                              IUDB1    1331
         IF(VALO.GT.1.0.OR.VALO.LT.-1.0) THEN                           IUDB1    1332
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1333
     *                        ,INAME(KN),CID                            IUDB1    1334
            WRITE(MSG(2),2220) IORD,BLNAM1,BLNAM2,VALO                  IUDB1    1335
            CALL PRTMSG(2)                                              IUDB1    1336
            MSG(1)='IUDB13: UD ERROR'                                   IUDB1    1337
            CALL ASTOP(MSG(1),16)                                       IUDB1    1338
         ENDIF                                                          IUDB1    1339
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1340
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1341
            MSG(1)='IUDB13: 1'                                          IUDB1    1342
            CALL ASTOP(MSG(1),9)                                        IUDB1    1343
            ENDIF                                                       IUDB1    1344
            VALOUT(NEXTB)=(FACT*ASIN(VALO)-VALI)/XDATN                  IUDB1    1345
         ELSE                                                           IUDB1    1346
            VALIN(20)=(FACT*ASIN(VALO)-VALI)/XDATN                      IUDB1    1347
         ENDIF                                                          IUDB1    1348
      ELSE                                                              IUDB1    1349
         VALOUT(IORD)=SIN(VALI/FACT)                                    IUDB1    1350
      ENDIF                                                             IUDB1    1351
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1352
C                                                                       IUDB1    1353
      RETURN                                                            IUDB1    1354
C                                                                       IUDB1    1355
C-----------------------------------------------------------------------IUDB1    1356
C                                                                       IUDB1    1357
      ENTRY IUDB14(IORD,INDEX,NLF,KN,CID)                               IUDB1    1358
CD                                                                      IUDB1    1359
CD    FOR BLOCK TYPE 14 (COSINE BLOCK).                                 IUDB1    1360
CD                                                                      IUDB1    1361
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1362
C                                                                       IUDB1    1363
      NEXTB=0                                                           IUDB1    1364
      VALI=0.0                                                          IUDB1    1365
      JORD=JUDE(IORD)                                                   IUDB1    1366
      JEI=JEB+2                                                         IUDB1    1367
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1368
         J2=JE5-2                                                       IUDB1    1369
         DO 350 J=1,INTUD                                               IUDB1    1370
         J2=J2+2                                                        IUDB1    1371
         IDD=IDDAT(J2+2)                                                IUDB1    1372
         IDD=IABS(IDD)                                                  IUDB1    1373
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1374
            XDAT=1.0                                                    IUDB1    1375
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1376
            IOUT=IDDAT(J2+1)                                            IUDB1    1377
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1378
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1379
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1380
               NEXTB=IOUT                                               IUDB1    1381
               XDATN=XDAT                                               IUDB1    1382
            ELSE                                                        IUDB1    1383
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1384
            ENDIF                                                       IUDB1    1385
         ENDIF                                                          IUDB1    1386
  350    CONTINUE                                                       IUDB1    1387
      ENDIF                                                             IUDB1    1388
      J3=JE6-3                                                          IUDB1    1389
      DO 360 J=1,INPUD                                                  IUDB1    1390
      J3=J3+3                                                           IUDB1    1391
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1392
         IIN=IDDAT(J3+2)                                                IUDB1    1393
         IF(IIN.EQ.20) THEN                                             IUDB1    1394
            XDATN=DDAT(J3+3)                                            IUDB1    1395
         ELSE                                                           IUDB1    1396
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1397
         ENDIF                                                          IUDB1    1398
      ENDIF                                                             IUDB1    1399
  360 CONTINUE                                                          IUDB1    1400
      FACT=45.0/ATAN(1.0)                                               IUDB1    1401
      IF(INDEX.EQ.2) THEN                                               IUDB1    1402
         VALO=VALOUT(IORD)                                              IUDB1    1403
         IF(VALO.GT.1.0.OR.VALO.LT.-1.0) THEN                           IUDB1    1404
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1405
     *                        ,INAME(KN),CID                            IUDB1    1406
            WRITE(MSG(2),2320) IORD,BLNAM1,BLNAM2,VALO                  IUDB1    1407
            CALL PRTMSG(2)                                              IUDB1    1408
            MSG(1)='IUDB14: UD ERROR'                                   IUDB1    1409
            CALL ASTOP(MSG(1),16)                                       IUDB1    1410
         ENDIF                                                          IUDB1    1411
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1412
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1413
            MSG(1)='IUDB14: 1'                                          IUDB1    1414
            CALL ASTOP(MSG(1),9)                                        IUDB1    1415
            ENDIF                                                       IUDB1    1416
            VALOUT(NEXTB)=(FACT*ACOS(VALO)-VALI)/XDATN                  IUDB1    1417
         ELSE                                                           IUDB1    1418
            VALIN(20)=(FACT*ACOS(VALO)-VALI)/XDATN                      IUDB1    1419
         ENDIF                                                          IUDB1    1420
      ELSE                                                              IUDB1    1421
         VALOUT(IORD)=COS(VALI/FACT)                                    IUDB1    1422
      ENDIF                                                             IUDB1    1423
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1424
C                                                                       IUDB1    1425
      RETURN                                                            IUDB1    1426
C                                                                       IUDB1    1427
C-----------------------------------------------------------------------IUDB1    1428
C                                                                       IUDB1    1429
      ENTRY IUDB15(IORD,INDEX,NLF,KN,CID)                               IUDB1    1430
CD                                                                      IUDB1    1431
CD    FOR BLOCK TYPE 15 (TANGENT BLOCK).                                IUDB1    1432
CD                                                                      IUDB1    1433
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1434
C                                                                       IUDB1    1435
      NEXTB=0                                                           IUDB1    1436
      VALI=0.0                                                          IUDB1    1437
      JORD=JUDE(IORD)                                                   IUDB1    1438
      JEI=JEB+2                                                         IUDB1    1439
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1440
         J2=JE5-2                                                       IUDB1    1441
         DO 370 J=1,INTUD                                               IUDB1    1442
         J2=J2+2                                                        IUDB1    1443
         IDD=IDDAT(J2+2)                                                IUDB1    1444
         IDD=IABS(IDD)                                                  IUDB1    1445
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1446
            XDAT=1.0                                                    IUDB1    1447
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1448
            IOUT=IDDAT(J2+1)                                            IUDB1    1449
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1450
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1451
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1452
               NEXTB=IOUT                                               IUDB1    1453
               XDATN=XDAT                                               IUDB1    1454
            ELSE                                                        IUDB1    1455
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1456
            ENDIF                                                       IUDB1    1457
         ENDIF                                                          IUDB1    1458
  370    CONTINUE                                                       IUDB1    1459
      ENDIF                                                             IUDB1    1460
      J3=JE6-3                                                          IUDB1    1461
      DO 380 J=1,INPUD                                                  IUDB1    1462
      J3=J3+3                                                           IUDB1    1463
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1464
         IIN=IDDAT(J3+2)                                                IUDB1    1465
         IF(IIN.EQ.20) THEN                                             IUDB1    1466
            XDATN=DDAT(J3+3)                                            IUDB1    1467
         ELSE                                                           IUDB1    1468
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1469
         ENDIF                                                          IUDB1    1470
      ENDIF                                                             IUDB1    1471
  380 CONTINUE                                                          IUDB1    1472
      FACT=45.0/ATAN(1.0)                                               IUDB1    1473
      IF(INDEX.EQ.2) THEN                                               IUDB1    1474
         VALO=VALOUT(IORD)                                              IUDB1    1475
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1476
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1477
            MSG(1)='IUDB15: 1'                                          IUDB1    1478
            CALL ASTOP(MSG(1),9)                                        IUDB1    1479
            ENDIF                                                       IUDB1    1480
            VALOUT(NEXTB)=(FACT*ATAN(VALO)-VALI)/XDATN                  IUDB1    1481
         ELSE                                                           IUDB1    1482
            VALIN(20)=(FACT*ATAN(VALO)-VALI)/XDATN                      IUDB1    1483
         ENDIF                                                          IUDB1    1484
      ELSE                                                              IUDB1    1485
         VALOUT(IORD)=TAN(VALI/FACT)                                    IUDB1    1486
      ENDIF                                                             IUDB1    1487
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1488
C                                                                       IUDB1    1489
      RETURN                                                            IUDB1    1490
C                                                                       IUDB1    1491
C-----------------------------------------------------------------------IUDB1    1492
C                                                                       IUDB1    1493
      ENTRY IUDB16(IORD,INDEX,NLF,KN,CID)                               IUDB1    1494
CD                                                                      IUDB1    1495
CD    FOR BLOCK TYPE 16 (ARC SINE BLOCK).                               IUDB1    1496
CD                                                                      IUDB1    1497
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1498
C                                                                       IUDB1    1499
      NEXTB=0                                                           IUDB1    1500
      VALI=0.0                                                          IUDB1    1501
      JORD=JUDE(IORD)                                                   IUDB1    1502
      JEI=JEB+2                                                         IUDB1    1503
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1504
         J2=JE5-2                                                       IUDB1    1505
         DO 390 J=1,INTUD                                               IUDB1    1506
         J2=J2+2                                                        IUDB1    1507
         IDD=IDDAT(J2+2)                                                IUDB1    1508
         IDD=IABS(IDD)                                                  IUDB1    1509
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1510
            XDAT=1.0                                                    IUDB1    1511
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1512
            IOUT=IDDAT(J2+1)                                            IUDB1    1513
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1514
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1515
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1516
               NEXTB=IOUT                                               IUDB1    1517
               XDATN=XDAT                                               IUDB1    1518
            ELSE                                                        IUDB1    1519
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1520
            ENDIF                                                       IUDB1    1521
         ENDIF                                                          IUDB1    1522
  390    CONTINUE                                                       IUDB1    1523
      ENDIF                                                             IUDB1    1524
      J3=JE6-3                                                          IUDB1    1525
      DO 400 J=1,INPUD                                                  IUDB1    1526
      J3=J3+3                                                           IUDB1    1527
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1528
         IIN=IDDAT(J3+2)                                                IUDB1    1529
         IF(IIN.EQ.20) THEN                                             IUDB1    1530
            XDATN=DDAT(J3+3)                                            IUDB1    1531
         ELSE                                                           IUDB1    1532
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1533
         ENDIF                                                          IUDB1    1534
      ENDIF                                                             IUDB1    1535
  400 CONTINUE                                                          IUDB1    1536
      FACT=45.0/ATAN(1.0)                                               IUDB1    1537
      IF(INDEX.EQ.2) THEN                                               IUDB1    1538
         VALO=VALOUT(IORD)                                              IUDB1    1539
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1540
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1541
            MSG(1)='IUDB16: 1'                                          IUDB1    1542
            CALL ASTOP(MSG(1),9)                                        IUDB1    1543
            ENDIF                                                       IUDB1    1544
            VALOUT(NEXTB)=(SIN(VALO/FACT)-VALI)/XDATN                   IUDB1    1545
         ELSE                                                           IUDB1    1546
            VALIN(20)=(SIN(VALO/FACT)-VALI)/XDATN                       IUDB1    1547
         ENDIF                                                          IUDB1    1548
      ELSE                                                              IUDB1    1549
         IF(VALI.GT.1.0.OR.VALI.LT.-1.0) THEN                           IUDB1    1550
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1551
     *                        ,INAME(KN),CID                            IUDB1    1552
            WRITE(MSG(2),2520) IORD,BLNAM1,BLNAM2,VALI                  IUDB1    1553
            CALL PRTMSG(2)                                              IUDB1    1554
            MSG(1)='IUDB16: UD ERROR'                                   IUDB1    1555
            CALL ASTOP(MSG(1),16)                                       IUDB1    1556
         ENDIF                                                          IUDB1    1557
         VALOUT(IORD)=FACT*ASIN(VALI)                                   IUDB1    1558
      ENDIF                                                             IUDB1    1559
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1560
C                                                                       IUDB1    1561
      RETURN                                                            IUDB1    1562
C                                                                       IUDB1    1563
C-----------------------------------------------------------------------IUDB1    1564
C                                                                       IUDB1    1565
      ENTRY IUDB17(IORD,INDEX,NLF,KN,CID)                               IUDB1    1566
CD                                                                      IUDB1    1567
CD    FOR BLOCK TYPE 17 (ARC COSINE BLOCK).                             IUDB1    1568
CD                                                                      IUDB1    1569
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1570
C                                                                       IUDB1    1571
      NEXTB=0                                                           IUDB1    1572
      VALI=0.0                                                          IUDB1    1573
      JORD=JUDE(IORD)                                                   IUDB1    1574
      JEI=JEB+2                                                         IUDB1    1575
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1576
         J2=JE5-2                                                       IUDB1    1577
         DO 410 J=1,INTUD                                               IUDB1    1578
         J2=J2+2                                                        IUDB1    1579
         IDD=IDDAT(J2+2)                                                IUDB1    1580
         IDD=IABS(IDD)                                                  IUDB1    1581
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1582
            XDAT=1.0                                                    IUDB1    1583
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1584
            IOUT=IDDAT(J2+1)                                            IUDB1    1585
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1586
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1587
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1588
               NEXTB=IOUT                                               IUDB1    1589
               XDATN=XDAT                                               IUDB1    1590
            ELSE                                                        IUDB1    1591
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1592
            ENDIF                                                       IUDB1    1593
         ENDIF                                                          IUDB1    1594
  410    CONTINUE                                                       IUDB1    1595
      ENDIF                                                             IUDB1    1596
      J3=JE6-3                                                          IUDB1    1597
      DO 420 J=1,INPUD                                                  IUDB1    1598
      J3=J3+3                                                           IUDB1    1599
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1600
         IIN=IDDAT(J3+2)                                                IUDB1    1601
         IF(IIN.EQ.20) THEN                                             IUDB1    1602
            XDATN=DDAT(J3+3)                                            IUDB1    1603
         ELSE                                                           IUDB1    1604
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1605
         ENDIF                                                          IUDB1    1606
      ENDIF                                                             IUDB1    1607
  420 CONTINUE                                                          IUDB1    1608
      FACT=45.0/ATAN(1.0)                                               IUDB1    1609
      IF(INDEX.EQ.2) THEN                                               IUDB1    1610
         VALO=VALOUT(IORD)                                              IUDB1    1611
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1612
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1613
            MSG(1)='IUDB17: 1'                                          IUDB1    1614
            CALL ASTOP(MSG(1),9)                                        IUDB1    1615
            ENDIF                                                       IUDB1    1616
            VALOUT(NEXTB)=(COS(VALO/FACT)-VALI)/XDATN                   IUDB1    1617
         ELSE                                                           IUDB1    1618
            VALIN(20)=(COS(VALO/FACT)-VALI)/XDATN                       IUDB1    1619
         ENDIF                                                          IUDB1    1620
      ELSE                                                              IUDB1    1621
         IF(VALI.GT.1.0.OR.VALI.LT.-1.0) THEN                           IUDB1    1622
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1623
     *                        ,INAME(KN),CID                            IUDB1    1624
            WRITE(MSG(2),2220) IORD,BLNAM1,BLNAM2,VALI                  IUDB1    1625
            CALL PRTMSG(2)                                              IUDB1    1626
            MSG(1)='IUDB17: UD ERROR'                                   IUDB1    1627
            CALL ASTOP(MSG(1),16)                                       IUDB1    1628
         ENDIF                                                          IUDB1    1629
         VALOUT(IORD)=FACT*ACOS(VALI)                                   IUDB1    1630
      ENDIF                                                             IUDB1    1631
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1632
C                                                                       IUDB1    1633
      RETURN                                                            IUDB1    1634
C                                                                       IUDB1    1635
C-----------------------------------------------------------------------IUDB1    1636
C                                                                       IUDB1    1637
      ENTRY IUDB18(IORD,INDEX,NLF,KN,CID)                               IUDB1    1638
CD                                                                      IUDB1    1639
CD    FOR BLOCK TYPE 18 (ARC TANGENT BLOCK).                            IUDB1    1640
CD                                                                      IUDB1    1641
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1642
C                                                                       IUDB1    1643
      NEXTB=0                                                           IUDB1    1644
      VALI=0.0                                                          IUDB1    1645
      JORD=JUDE(IORD)                                                   IUDB1    1646
      JEI=JEB+2                                                         IUDB1    1647
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1648
         J2=JE5-2                                                       IUDB1    1649
         DO 430 J=1,INTUD                                               IUDB1    1650
         J2=J2+2                                                        IUDB1    1651
         IDD=IDDAT(J2+2)                                                IUDB1    1652
         IDD=IABS(IDD)                                                  IUDB1    1653
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1654
            XDAT=1.0                                                    IUDB1    1655
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1656
            IOUT=IDDAT(J2+1)                                            IUDB1    1657
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1658
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1659
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1660
               NEXTB=IOUT                                               IUDB1    1661
               XDATN=XDAT                                               IUDB1    1662
            ELSE                                                        IUDB1    1663
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1664
            ENDIF                                                       IUDB1    1665
         ENDIF                                                          IUDB1    1666
  430    CONTINUE                                                       IUDB1    1667
      ENDIF                                                             IUDB1    1668
      J3=JE6-3                                                          IUDB1    1669
      DO 440 J=1,INPUD                                                  IUDB1    1670
      J3=J3+3                                                           IUDB1    1671
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1672
         IIN=IDDAT(J3+2)                                                IUDB1    1673
         IF(IIN.EQ.20) THEN                                             IUDB1    1674
            XDATN=DDAT(J3+3)                                            IUDB1    1675
         ELSE                                                           IUDB1    1676
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1677
         ENDIF                                                          IUDB1    1678
      ENDIF                                                             IUDB1    1679
  440 CONTINUE                                                          IUDB1    1680
      FACT=45.0/ATAN(1.0)                                               IUDB1    1681
      IF(INDEX.EQ.2) THEN                                               IUDB1    1682
         VALO=VALOUT(IORD)                                              IUDB1    1683
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1684
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1685
            MSG(1)='IUDB18: 1'                                          IUDB1    1686
            CALL ASTOP(MSG(1),9)                                        IUDB1    1687
            ENDIF                                                       IUDB1    1688
            VALOUT(NEXTB)=(TAN(VALO/FACT)-VALI)/XDATN                   IUDB1    1689
         ELSE                                                           IUDB1    1690
            VALIN(20)=(TAN(VALO/FACT)-VALI)/XDATN                       IUDB1    1691
         ENDIF                                                          IUDB1    1692
      ELSE                                                              IUDB1    1693
         VALOUT(IORD)=FACT*ATAN(VALI)                                   IUDB1    1694
      ENDIF                                                             IUDB1    1695
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1696
C                                                                       IUDB1    1697
      RETURN                                                            IUDB1    1698
C                                                                       IUDB1    1699
C-----------------------------------------------------------------------IUDB1    1700
C                                                                       IUDB1    1701
      ENTRY IUDB19(IORD,INDEX,NLF,KN,CID)                               IUDB1    1702
CD                                                                      IUDB1    1703
CD    FOR BLOCK TYPE 19 (EXPONENTIAL BLOCK).                            IUDB1    1704
CD                                                                      IUDB1    1705
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1706
C                                                                       IUDB1    1707
      NEXTB=0                                                           IUDB1    1708
      VALI=0.0                                                          IUDB1    1709
      JORD=JUDE(IORD)                                                   IUDB1    1710
      JEI=JEB+2                                                         IUDB1    1711
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1712
         J2=JE5-2                                                       IUDB1    1713
         DO 450 J=1,INTUD                                               IUDB1    1714
         J2=J2+2                                                        IUDB1    1715
         IDD=IDDAT(J2+2)                                                IUDB1    1716
         IDD=IABS(IDD)                                                  IUDB1    1717
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1718
            XDAT=1.0                                                    IUDB1    1719
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1720
            IOUT=IDDAT(J2+1)                                            IUDB1    1721
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1722
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1723
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1724
               NEXTB=IOUT                                               IUDB1    1725
               XDATN=XDAT                                               IUDB1    1726
            ELSE                                                        IUDB1    1727
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1728
            ENDIF                                                       IUDB1    1729
         ENDIF                                                          IUDB1    1730
  450    CONTINUE                                                       IUDB1    1731
      ENDIF                                                             IUDB1    1732
      J3=JE6-3                                                          IUDB1    1733
      DO 460 J=1,INPUD                                                  IUDB1    1734
      J3=J3+3                                                           IUDB1    1735
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1736
         IIN=IDDAT(J3+2)                                                IUDB1    1737
         IF(IIN.EQ.20) THEN                                             IUDB1    1738
            XDATN=DDAT(J3+3)                                            IUDB1    1739
         ELSE                                                           IUDB1    1740
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1741
         ENDIF                                                          IUDB1    1742
      ENDIF                                                             IUDB1    1743
  460 CONTINUE                                                          IUDB1    1744
      IF(INDEX.EQ.2) THEN                                               IUDB1    1745
         VALO=VALOUT(IORD)                                              IUDB1    1746
         IF(VALO.LE.0.0) THEN                                           IUDB1    1747
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1748
     *                        ,INAME(KN),CID                            IUDB1    1749
            WRITE(MSG(2),2820) IORD,BLNAM1,BLNAM2,VALO                  IUDB1    1750
            CALL PRTMSG(2)                                              IUDB1    1751
            MSG(1)='IUDB19: UD ERROR'                                   IUDB1    1752
            CALL ASTOP(MSG(1),16)                                       IUDB1    1753
         ENDIF                                                          IUDB1    1754
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1755
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1756
            MSG(1)='IUDB19: 1'                                          IUDB1    1757
            CALL ASTOP(MSG(1),9)                                        IUDB1    1758
            ENDIF                                                       IUDB1    1759
            VALOUT(NEXTB)=(LOG(VALO)-VALI)/XDATN                        IUDB1    1760
         ELSE                                                           IUDB1    1761
            VALIN(20)=(LOG(VALO)-VALI)/XDATN                            IUDB1    1762
         ENDIF                                                          IUDB1    1763
      ELSE                                                              IUDB1    1764
         VALOUT(IORD)=EXP(VALI)                                         IUDB1    1765
      ENDIF                                                             IUDB1    1766
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1767
C                                                                       IUDB1    1768
      RETURN                                                            IUDB1    1769
C                                                                       IUDB1    1770
C-----------------------------------------------------------------------IUDB1    1771
C                                                                       IUDB1    1772
      ENTRY IUDB20(IORD,INDEX,NLF,KN,CID)                               IUDB1    1773
CD                                                                      IUDB1    1774
CD    FOR BLOCK TYPE 20 (NATURAL LOG BLOCK).                            IUDB1    1775
CD                                                                      IUDB1    1776
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1777
C                                                                       IUDB1    1778
      NEXTB=0                                                           IUDB1    1779
      VALI=0.0                                                          IUDB1    1780
      JORD=JUDE(IORD)                                                   IUDB1    1781
      JEI=JEB+2                                                         IUDB1    1782
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1783
         J2=JE5-2                                                       IUDB1    1784
         DO 470 J=1,INTUD                                               IUDB1    1785
         J2=J2+2                                                        IUDB1    1786
         IDD=IDDAT(J2+2)                                                IUDB1    1787
         IDD=IABS(IDD)                                                  IUDB1    1788
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1789
            XDAT=1.0                                                    IUDB1    1790
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1791
            IOUT=IDDAT(J2+1)                                            IUDB1    1792
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1793
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1794
     &         (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                        IUDB1    1795
               NEXTB=IOUT                                               IUDB1    1796
               XDATN=XDAT                                               IUDB1    1797
            ELSE                                                        IUDB1    1798
               VALI=VALI+VALOUT(IOUT)*XDAT                              IUDB1    1799
            ENDIF                                                       IUDB1    1800
         ENDIF                                                          IUDB1    1801
  470    CONTINUE                                                       IUDB1    1802
      ENDIF                                                             IUDB1    1803
      J3=JE6-3                                                          IUDB1    1804
      DO 480 J=1,INPUD                                                  IUDB1    1805
      J3=J3+3                                                           IUDB1    1806
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1807
         IIN=IDDAT(J3+2)                                                IUDB1    1808
         IF(IIN.EQ.20) THEN                                             IUDB1    1809
            XDATN=DDAT(J3+3)                                            IUDB1    1810
         ELSE                                                           IUDB1    1811
            VALI=VALI+VALIN(IIN)*DDAT(J3+3)                             IUDB1    1812
         ENDIF                                                          IUDB1    1813
      ENDIF                                                             IUDB1    1814
  480 CONTINUE                                                          IUDB1    1815
      IF(INDEX.EQ.2) THEN                                               IUDB1    1816
         VALO=VALOUT(IORD)                                              IUDB1    1817
         IF(JORD.LT.NUDB) THEN                                          IUDB1    1818
            IF(NEXTB.EQ.0)THEN                                          IUDB1    1819
            MSG(1)='IUDB20: 1'                                          IUDB1    1820
            CALL ASTOP(MSG(1),9)                                        IUDB1    1821
            ENDIF                                                       IUDB1    1822
            VALOUT(NEXTB)=(EXP(VALO)-VALI)/XDATN                        IUDB1    1823
         ELSE                                                           IUDB1    1824
            VALIN(20)=(EXP(VALO)-VALI)/XDATN                            IUDB1    1825
         ENDIF                                                          IUDB1    1826
      ELSE                                                              IUDB1    1827
         IF(VALI.LE.0.0) THEN                                           IUDB1    1828
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    1829
     *                        ,INAME(KN),CID                            IUDB1    1830
            WRITE(MSG(2),2920) IORD,BLNAM1,BLNAM2,VALO                  IUDB1    1831
            CALL PRTMSG(2)                                              IUDB1    1832
            MSG(1)='IUDB20: UD ERROR'                                   IUDB1    1833
            CALL ASTOP(MSG(1),16)                                       IUDB1    1834
         ENDIF                                                          IUDB1    1835
         VALOUT(IORD)=LOG(VALI)                                         IUDB1    1836
      ENDIF                                                             IUDB1    1837
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1838
C                                                                       IUDB1    1839
      RETURN                                                            IUDB1    1840
C                                                                       IUDB1    1841
C-----------------------------------------------------------------------IUDB1    1842
C                                                                       IUDB1    1843
      ENTRY IUDB21(IORD,INDEX,NLF,KN,CID)                               IUDB1    1844
CD                                                                      IUDB1    1845
CD    FOR BLOCK TYPE 21 (ABSOLUTE VALUE BLOCK).                         IUDB1    1846
CD                                                                      IUDB1    1847
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1848
C                                                                       IUDB1    1849
      VALI=0.0                                                          IUDB1    1850
      JORD=JUDE(IORD)                                                   IUDB1    1851
      JEI=JEB+2                                                         IUDB1    1852
      IF(INDEX.EQ.1) THEN                                               IUDB1    1853
         J2=JE5-2                                                       IUDB1    1854
         DO 490 J=1,INTUD                                               IUDB1    1855
         J2=J2+2                                                        IUDB1    1856
         IDD=IDDAT(J2+2)                                                IUDB1    1857
         IDD=IABS(IDD)                                                  IUDB1    1858
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1859
            XDAT=1.0                                                    IUDB1    1860
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1861
            IOUT=IDDAT(J2+1)                                            IUDB1    1862
            VALI=VALI+VALOUT(IOUT)*XDAT                                 IUDB1    1863
         ENDIF                                                          IUDB1    1864
  490    CONTINUE                                                       IUDB1    1865
      ENDIF                                                             IUDB1    1866
      J3=JE6-3                                                          IUDB1    1867
      DO 500 J=1,INPUD                                                  IUDB1    1868
      J3=J3+3                                                           IUDB1    1869
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1870
         IIN=IDDAT(J3+2)                                                IUDB1    1871
         VALI=VALI+VALIN(IIN)*DDAT(J3+3)                                IUDB1    1872
      ENDIF                                                             IUDB1    1873
  500 CONTINUE                                                          IUDB1    1874
      VALOUT(IORD)=ABS(VALI)                                            IUDB1    1875
      DDAT(JEI+1)=1.0                                                   IUDB1    1876
      IF(VALI.LT.0.0) DDAT(JEI+1)=-1.0                                  IUDB1    1877
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    1878
C                                                                       IUDB1    1879
      RETURN                                                            IUDB1    1880
C                                                                       IUDB1    1881
C-----------------------------------------------------------------------IUDB1    1882
C                                                                       IUDB1    1883
      ENTRY IUDB27(IORD,INDEX,NLF,KN,CID)                               IUDB1    1884
CD                                                                      IUDB1    1885
CD    FOR BLOCK TYPE 27 (LOGIC SWITCH BLOCK).                           IUDB1    1886
CD                                                                      IUDB1    1887
      LDEB=(JDEB(262).NE.0)                                             IUDB1    1888
C                                                                       IUDB1    1889
      NEXTB=0                                                           IUDB1    1890
      NINP=0                                                            IUDB1    1891
      II=0                                                              IUDB1    1892
      JORD=JUDE(IORD)                                                   IUDB1    1893
      VALO=VALOUT(IORD)                                                 IUDB1    1894
      JEI=JEB+2                                                         IUDB1    1895
      THR=DDAT(JEI+1)                                                   IUDB1    1896
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    1897
         J2=JE5-2                                                       IUDB1    1898
         DO 510 J=1,INTUD                                               IUDB1    1899
         J2=J2+2                                                        IUDB1    1900
         IDD=IDDAT(J2+2)                                                IUDB1    1901
         IDD=IABS(IDD)                                                  IUDB1    1902
         IF(IDD.EQ.IORD) THEN                                           IUDB1    1903
            XDAT=1.0                                                    IUDB1    1904
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    1905
            IOUT=IDDAT(J2+1)                                            IUDB1    1906
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    1907
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    1908
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    1909
               NEXTB=IOUT                                               IUDB1    1910
               XDATN=XDAT                                               IUDB1    1911
               NINP=NINP+1                                              IUDB1    1912
               IF(NINP.EQ.1) THEN                                       IUDB1    1913
                  II=1                                                  IUDB1    1914
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1    1915
                  II=2                                                  IUDB1    1916
               ELSE                                                     IUDB1    1917
                  WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)        IUDB1    1918
     *                              ,INAME(KN),CID                      IUDB1    1919
                  WRITE(MSG(2),3100) IORD,BLNAM1,BLNAM2                 IUDB1    1920
                  WRITE(MSG(3),3101)                                    IUDB1    1921
                  CALL PRTMSG(3)                                        IUDB1    1922
                  MSG(1)='IUDB27: UD ERROR'                             IUDB1    1923
                  CALL ASTOP(MSG(1),16)                                 IUDB1    1924
               ENDIF                                                    IUDB1    1925
            ELSE                                                        IUDB1    1926
               NINP=NINP+1                                              IUDB1    1927
               IF(NINP.EQ.1) THEN                                       IUDB1    1928
                  VALI1=VALOUT(IOUT)*XDAT                               IUDB1    1929
               ELSEIF(NINP.EQ.2) THEN                                   IUDB1    1930
                  VALI2=VALOUT(IOUT)*XDAT                               IUDB1    1931
               ELSEIF(NINP.EQ.3) THEN                                   IUDB1    1932
                  VALI3=VALOUT(IOUT)*XDAT                               IUDB1    1933
               ELSE                                                     IUDB1    1934
                  WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)        IUDB1    1935
     *                              ,INAME(KN),CID                      IUDB1    1936
                  WRITE(MSG(2),3100) IORD,BLNAM1,BLNAM2                 IUDB1    1937
                  WRITE(MSG(3),3101)                                    IUDB1    1938
                  CALL PRTMSG(3)                                        IUDB1    1939
                  MSG(1)='IUDB27: UD ERROR'                             IUDB1    1940
                  CALL ASTOP(MSG(1),16)                                 IUDB1    1941
               ENDIF                                                    IUDB1    1942
            ENDIF                                                       IUDB1    1943
         ENDIF                                                          IUDB1    1944
  510    CONTINUE                                                       IUDB1    1945
      ENDIF                                                             IUDB1    1946
      J3=JE6-3                                                          IUDB1    1947
      DO 520 J=1,INPUD                                                  IUDB1    1948
      J3=J3+3                                                           IUDB1    1949
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    1950
         IIN=IDDAT(J3+2)                                                IUDB1    1951
         IF(IIN.EQ.20) THEN                                             IUDB1    1952
            XDATN=DDAT(J3+3)                                            IUDB1    1953
            NINP=NINP+1                                                 IUDB1    1954
            IF(NINP.EQ.1) THEN                                          IUDB1    1955
               II=1                                                     IUDB1    1956
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1    1957
               II=2                                                     IUDB1    1958
            ELSE                                                        IUDB1    1959
                  WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)        IUDB1    1960
     *                              ,INAME(KN),CID                      IUDB1    1961
                  WRITE(MSG(2),3100) IORD,BLNAM1,BLNAM2                 IUDB1    1962
                  WRITE(MSG(3),3101)                                    IUDB1    1963
                  CALL PRTMSG(3)                                        IUDB1    1964
               MSG(1)='IUDB27: UD ERROR'                                IUDB1    1965
               CALL ASTOP(MSG(1),16)                                    IUDB1    1966
            ENDIF                                                       IUDB1    1967
         ELSE                                                           IUDB1    1968
            NINP=NINP+1                                                 IUDB1    1969
            IF(NINP.EQ.1) THEN                                          IUDB1    1970
               VALI1=VALIN(IIN)*DDAT(J3+3)                              IUDB1    1971
            ELSEIF(NINP.EQ.2) THEN                                      IUDB1    1972
               VALI2=VALIN(IIN)*DDAT(J3+3)                              IUDB1    1973
            ELSEIF(NINP.EQ.3) THEN                                      IUDB1    1974
               VALI3=VALIN(IIN)*DDAT(J3+3)                              IUDB1    1975
            ELSE                                                        IUDB1    1976
                  WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)        IUDB1    1977
     *                              ,INAME(KN),CID                      IUDB1    1978
                  WRITE(MSG(2),3100) IORD,BLNAM1,BLNAM2                 IUDB1    1979
                  WRITE(MSG(3),3101)                                    IUDB1    1980
                  CALL PRTMSG(3)                                        IUDB1    1981
                  MSG(1)='IUDB27: UD ERROR'                             IUDB1    1982
                  CALL ASTOP(MSG(1),16)                                 IUDB1    1983
            ENDIF                                                       IUDB1    1984
         ENDIF                                                          IUDB1    1985
      ENDIF                                                             IUDB1    1986
  520 CONTINUE                                                          IUDB1    1987
      IF(NINP.LT.3) THEN                                                IUDB1    1988
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)                 IUDB1    1989
     *                     ,INAME(KN),CID                               IUDB1    1990
         WRITE(MSG(2),3140) IORD,BLNAM1,BLNAM2                          IUDB1    1991
         WRITE(MSG(3),3141)                                             IUDB1    1992
         CALL PRTMSG(3)                                                 IUDB1    1993
         MSG(1)='IUDB27: UD ERROR'                                      IUDB1    1994
         CALL ASTOP(MSG(1),16)                                          IUDB1    1995
      ENDIF                                                             IUDB1    1996
      IF(INDEX.EQ.2) THEN                                               IUDB1    1997
         IF(II.EQ.0)THEN                                                IUDB1    1998
         MSG(1)='IUDB27: 1'                                             IUDB1    1999
         CALL ASTOP(MSG(1),9)                                           IUDB1    2000
         ENDIF                                                          IUDB1    2001
         IF(JORD.LT.NUDB) THEN                                          IUDB1    2002
            IF(NEXTB.EQ.0)THEN                                          IUDB1    2003
            MSG(1)='IUDB27: 2'                                          IUDB1    2004
            CALL ASTOP(MSG(1),9)                                        IUDB1    2005
            ENDIF                                                       IUDB1    2006
            VALOUT(NEXTB)=VALO/XDATN                                    IUDB1    2007
         ELSE                                                           IUDB1    2008
            VALIN(20)=VALO/XDATN                                        IUDB1    2009
         ENDIF                                                          IUDB1    2010
         IF(II.EQ.1.AND.VALI3.GT.THR) THEN                              IUDB1    2011
             WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)             IUDB1    2012
     *                         ,INAME(KN),CID                           IUDB1    2013
             WRITE(MSG(2),3110) IORD,BLNAM1,BLNAM2                      IUDB1    2014
             WRITE(MSG(3),3111)                                         IUDB1    2015
             WRITE(MSG(4),3112)                                         IUDB1    2016
             WRITE(MSG(5),3113) VALO                                    IUDB1    2017
             WRITE(MSG(6),3114) VALI2,VALI3                             IUDB1    2018
             CALL PRTMSG(6)                                             IUDB1    2019
         ENDIF                                                          IUDB1    2020
         IF(II.EQ.2.AND.VALI3.LE.THR) THEN                              IUDB1    2021
             WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)             IUDB1    2022
     *                         ,INAME(KN),CID                           IUDB1    2023
             WRITE(MSG(2),3110) IORD,BLNAM1,BLNAM2                      IUDB1    2024
             WRITE(MSG(3),3111)                                         IUDB1    2025
             WRITE(MSG(4),3112)                                         IUDB1    2026
             WRITE(MSG(5),3113) VALO                                    IUDB1    2027
             WRITE(MSG(6),3114) VALI2,VALI3                             IUDB1    2028
             CALL PRTMSG(6)                                             IUDB1    2029
         ENDIF                                                          IUDB1    2030
      ELSE                                                              IUDB1    2031
         VALO=VALI1                                                     IUDB1    2032
         IF(VALI3.GT.THR) VALO=VALI2                                    IUDB1    2033
         VALOUT(IORD)=VALO                                              IUDB1    2034
      ENDIF                                                             IUDB1    2035
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    2036
C                                                                       IUDB1    2037
      RETURN                                                            IUDB1    2038
C                                                                       IUDB1    2039
C-----------------------------------------------------------------------IUDB1    2040
C                                                                       IUDB1    2041
      ENTRY IUDB28(IORD,INDEX,NLF,KN,CID)                               IUDB1    2042
CD                                                                      IUDB1    2043
CD    FOR BLOCK TYPE 28 (TIMER BLOCK).                                  IUDB1    2044
CD                                                                      IUDB1    2045
      LDEB=(JDEB(262).NE.0)                                             IUDB1    2046
C                                                                       IUDB1    2047
      VALI=0.0                                                          IUDB1    2048
      NINP=0                                                            IUDB1    2049
      JORD=JUDE(IORD)                                                   IUDB1    2050
      JEI=JEB+2                                                         IUDB1    2051
      IF(INDEX.EQ.1) THEN                                               IUDB1    2052
         J2=JE5-2                                                       IUDB1    2053
         DO 530 J=1,INTUD                                               IUDB1    2054
         J2=J2+2                                                        IUDB1    2055
         IDD=IDDAT(J2+2)                                                IUDB1    2056
         IDD=IABS(IDD)                                                  IUDB1    2057
         IF(IDD.EQ.IORD) THEN                                           IUDB1    2058
            XDAT=1.0                                                    IUDB1    2059
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    2060
            IOUT=IDDAT(J2+1)                                            IUDB1    2061
            NINP=NINP+1                                                 IUDB1    2062
            IF(NINP.EQ.1) THEN                                          IUDB1    2063
               VALI=VALOUT(IOUT)*XDAT                                   IUDB1    2064
            ELSE                                                        IUDB1    2065
               WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)           IUDB1    2066
     *                           ,INAME(KN),CID                         IUDB1    2067
               WRITE(MSG(2),3200) IORD,BLNAM1,BLNAM2                    IUDB1    2068
               MSG(3)='           CHECK THE CONNECTIONS.'               IUDB1    2069
               CALL PRTMSG(3)                                           IUDB1    2070
               MSG(1)='IUDB28: UD ERROR'                                IUDB1    2071
               CALL ASTOP(MSG(1),16)                                    IUDB1    2072
            ENDIF                                                       IUDB1    2073
         ENDIF                                                          IUDB1    2074
  530    CONTINUE                                                       IUDB1    2075
      ENDIF                                                             IUDB1    2076
      J3=JE6-3                                                          IUDB1    2077
      DO 540 J=1,INPUD                                                  IUDB1    2078
      J3=J3+3                                                           IUDB1    2079
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    2080
         IIN=IDDAT(J3+2)                                                IUDB1    2081
         NINP=NINP+1                                                    IUDB1    2082
         IF(NINP.EQ.1) THEN                                             IUDB1    2083
            VALI=VALIN(IIN)*DDAT(J3+3)                                  IUDB1    2084
         ELSE                                                           IUDB1    2085
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    2086
     *                        ,INAME(KN),CID                            IUDB1    2087
            WRITE(MSG(2),3200) IORD,BLNAM1,BLNAM2                       IUDB1    2088
            MSG(3)='           CHECK THE CONNECTIONS.'                  IUDB1    2089
            CALL PRTMSG(3)                                              IUDB1    2090
            MSG(1)='IUDB28: UD ERROR'                                   IUDB1    2091
            CALL ASTOP(MSG(1),16)                                       IUDB1    2092
         ENDIF                                                          IUDB1    2093
      ENDIF                                                             IUDB1    2094
  540 CONTINUE                                                          IUDB1    2095
      THR=DDAT(JEI+1)                                                   IUDB1    2096
      DDAT(JEI+2)=0.0                                                   IUDB1    2097
      IF(VALI.LE.THR) THEN                                              IUDB1    2098
         WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)                 IUDB1    2099
     *                     ,INAME(KN),CID                               IUDB1    2100
         WRITE(MSG(2),3210) IORD,BLNAM1,BLNAM2                          IUDB1    2101
         WRITE(MSG(3),3211) VALI                                        IUDB1    2102
         CALL PRTMSG(3)                                                 IUDB1    2103
      ENDIF                                                             IUDB1    2104
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    2105
C                                                                       IUDB1    2106
      RETURN                                                            IUDB1    2107
C                                                                       IUDB1    2108
C-----------------------------------------------------------------------IUDB1    2109
C                                                                       IUDB1    2110
      ENTRY IUDB30(IORD,INDEX,NLF,KN,CID)                               IUDB1    2111
CD                                                                      IUDB1    2112
CD    FOR BLOCK TYPE 30 (COUNTER BLOCK).                                IUDB1    2113
CD                                                                      IUDB1    2114
      LDEB=(JDEB(262).NE.0)                                             IUDB1    2115
C                                                                       IUDB1    2116
      VALI=0.0                                                          IUDB1    2117
      NINP=0                                                            IUDB1    2118
      JORD=JUDE(IORD)                                                   IUDB1    2119
      JEI=JEB+2                                                         IUDB1    2120
      IF(DDAT(JEI+2).LE.DDAT(JEI+3)) THEN                               IUDB1    2121
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID   IUDB1    2122
         WRITE(MSG(2),3310) IORD,BLNAM1,BLNAM2                          IUDB1    2123
         WRITE(MSG(3),3312) DDAT(JEI+2),DDAT(JEI+3)                     IUDB1    2124
         CALL PRTMSG(3)                                                 IUDB1    2125
         MSG(1)='IUDB30: UD ERROR'                                      IUDB1    2126
         CALL ASTOP(MSG(1),16)                                          IUDB1    2127
      ENDIF                                                             IUDB1    2128
      IF(IDDAT(JEI+6).LE.IDDAT(JEI+7)) THEN                             IUDB1    2129
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID   IUDB1    2130
         WRITE(MSG(2),3310) IORD,BLNAM1,BLNAM2                          IUDB1    2131
         WRITE(MSG(3),3313) IDDAT(JEI+6),IDDAT(JEI+7)                   IUDB1    2132
         CALL PRTMSG(3)                                                 IUDB1    2133
         MSG(1)='IUDB30: UD ERROR'                                      IUDB1    2134
         CALL ASTOP(MSG(1),16)                                          IUDB1    2135
      ENDIF                                                             IUDB1    2136
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    2137
         J2=JE5-2                                                       IUDB1    2138
         DO 550 J=1,INTUD                                               IUDB1    2139
         J2=J2+2                                                        IUDB1    2140
         IDD=IDDAT(J2+2)                                                IUDB1    2141
         IDD=IABS(IDD)                                                  IUDB1    2142
         IF(IDD.EQ.IORD) THEN                                           IUDB1    2143
            XDAT=1.0                                                    IUDB1    2144
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    2145
            IOUT=IDDAT(J2+1)                                            IUDB1    2146
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    2147
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    2148
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    2149
               NEXTB=IOUT                                               IUDB1    2150
               XDATN=XDAT                                               IUDB1    2151
               NINP=NINP+1                                              IUDB1    2152
               IF(NINP.NE.1) THEN                                       IUDB1    2153
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    2154
     *                            ,INAME(KN),CID                        IUDB1    2155
                WRITE(MSG(2),3300) IORD,BLNAM1,BLNAM2                   IUDB1    2156
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    2157
                CALL PRTMSG(3)                                          IUDB1    2158
                  MSG(1)='IUDB30: UD ERROR'                             IUDB1    2159
                  CALL ASTOP(MSG(1),16)                                 IUDB1    2160
               ENDIF                                                    IUDB1    2161
            ELSE                                                        IUDB1    2162
               NINP=NINP+1                                              IUDB1    2163
               IF(NINP.EQ.1) THEN                                       IUDB1    2164
                  VALI=VALOUT(IOUT)*XDAT                                IUDB1    2165
               ELSE                                                     IUDB1    2166
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    2167
     *                            ,INAME(KN),CID                        IUDB1    2168
                WRITE(MSG(2),3300) IORD,BLNAM1,BLNAM2                   IUDB1    2169
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    2170
                CALL PRTMSG(3)                                          IUDB1    2171
                  MSG(1)='IUDB30: UD ERROR'                             IUDB1    2172
                  CALL ASTOP(MSG(1),16)                                 IUDB1    2173
               ENDIF                                                    IUDB1    2174
            ENDIF                                                       IUDB1    2175
         ENDIF                                                          IUDB1    2176
  550    CONTINUE                                                       IUDB1    2177
      ENDIF                                                             IUDB1    2178
      J3=JE6-3                                                          IUDB1    2179
      DO 560 J=1,INPUD                                                  IUDB1    2180
      J3=J3+3                                                           IUDB1    2181
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    2182
         IIN=IDDAT(J3+2)                                                IUDB1    2183
         IF(IIN.EQ.20) THEN                                             IUDB1    2184
            XDATN=DDAT(J3+3)                                            IUDB1    2185
            NINP=NINP+1                                                 IUDB1    2186
            IF(NINP.NE.1) THEN                                          IUDB1    2187
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    2188
     *                            ,INAME(KN),CID                        IUDB1    2189
                WRITE(MSG(2),3300) IORD,BLNAM1,BLNAM2                   IUDB1    2190
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    2191
                CALL PRTMSG(3)                                          IUDB1    2192
                      MSG(1)='IUDB30: UD ERROR'                         IUDB1    2193
                      CALL ASTOP(MSG(1),16)                             IUDB1    2194
            ENDIF                                                       IUDB1    2195
         ELSE                                                           IUDB1    2196
            NINP=NINP+1                                                 IUDB1    2197
            IF(NINP.EQ.1) THEN                                          IUDB1    2198
               VALI=VALIN(IIN)*DDAT(J3+3)                               IUDB1    2199
            ELSE                                                        IUDB1    2200
                WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)          IUDB1    2201
     *                            ,INAME(KN),CID                        IUDB1    2202
                WRITE(MSG(2),3300) IORD,BLNAM1,BLNAM2                   IUDB1    2203
                MSG(3)='           CHECK THE CONNECTIONS.'              IUDB1    2204
                CALL PRTMSG(3)                                          IUDB1    2205
               MSG(1)='IUDB30: UD ERROR'                                IUDB1    2206
               CALL ASTOP(MSG(1),16)                                    IUDB1    2207
            ENDIF                                                       IUDB1    2208
         ENDIF                                                          IUDB1    2209
      ENDIF                                                             IUDB1    2210
  560 CONTINUE                                                          IUDB1    2211
      IF(INDEX.EQ.2) THEN                                               IUDB1    2212
         VALI=DDAT(JEI+4)                                               IUDB1    2213
         IF(VALI.GT.DDAT(JEI+2)) VALI=DDAT(JEI+2)                       IUDB1    2214
         IF(VALI.LT.DDAT(JEI+3)) VALI=DDAT(JEI+3)                       IUDB1    2215
         IF(JORD.LT.NUDB) THEN                                          IUDB1    2216
            IF(NEXTB.EQ.0)THEN                                          IUDB1    2217
            MSG(1)='IUDB30: 1'                                          IUDB1    2218
            CALL ASTOP(MSG(1),9)                                        IUDB1    2219
            ENDIF                                                       IUDB1    2220
            VALOUT(NEXTB)=VALI/XDATN                                    IUDB1    2221
         ELSE                                                           IUDB1    2222
            VALIN(20)=VALI/XDATN                                        IUDB1    2223
         ENDIF                                                          IUDB1    2224
         DDAT(JEI+10)=0.0                                               IUDB1    2225
         DDAT(JEI+11)=0.0                                               IUDB1    2226
      ELSE                                                              IUDB1    2227
         IF(VALI.GT.DDAT(JEI+2).OR.VALI.LT.DDAT(JEI+3)) THEN            IUDB1    2228
            WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)              IUDB1    2229
     *                        ,INAME(KN),CID                            IUDB1    2230
            WRITE(MSG(2),3310) IORD,BLNAM1,BLNAM2                       IUDB1    2231
            WRITE(MSG(3),3311) VALI                                     IUDB1    2232
            CALL PRTMSG(3)                                              IUDB1    2233
            IF(VALI.GT.DDAT(JEI+2)) THEN                                IUDB1    2234
               DDAT(JEI+10)=DDAT(JEI+1)                                 IUDB1    2235
               DDAT(JEI+11)=0.0                                         IUDB1    2236
            ELSE                                                        IUDB1    2237
               DDAT(JEI+10)=0.0                                         IUDB1    2238
               DDAT(JEI+11)=DDAT(JEI+1)                                 IUDB1    2239
            ENDIF                                                       IUDB1    2240
         ENDIF                                                          IUDB1    2241
         N0=IDDAT(JEI+5)                                                IUDB1    2242
         IF(N0.GT.IDDAT(JEI+6)) N0=IDDAT(JEI+6)                         IUDB1    2243
         IF(N0.LT.IDDAT(JEI+7)) N0=IDDAT(JEI+7)                         IUDB1    2244
         VALOUT(IORD)=N0                                                IUDB1    2245
      ENDIF                                                             IUDB1    2246
      DDAT(JEI+9)=0.0                                                   IUDB1    2247
      IF(VALOUT(IORD).GE.0.0) THEN                                      IUDB1    2248
         VALO=VALOUT(IORD)+0.001                                        IUDB1    2249
         NSIGN=1                                                        IUDB1    2250
      ELSE                                                              IUDB1    2251
         VALO=-VALOUT(IORD)+0.001                                       IUDB1    2252
         NSIGN=-1                                                       IUDB1    2253
      ENDIF                                                             IUDB1    2254
                                                                        IUDB1    2255
      IDDAT(JEI+12)=INT(VALO)*NSIGN                                     IUDB1    2256
      VDIF=IDDAT(JEI+12)                                                IUDB1    2257
      VDIF=ABS(VALOUT(IORD)-VDIF)                                       IUDB1    2258
      IF(IDDAT(JEI+12).GT.IDDAT(JEI+6).OR.IDDAT(JEI+12).LT.IDDAT(JEI+7) IUDB1    2259
     *   .OR.VDIF.GT.0.001) THEN                                        IUDB1    2260
         WRITE(MSG(1),1001) NLF,INAME(KN-2),INAME(KN-1)                 IUDB1    2261
     *                  ,INAME(KN),CID                                  IUDB1    2262
         WRITE(MSG(2),3310) IORD,BLNAM1,BLNAM2                          IUDB1    2263
         WRITE(MSG(3),3314) VALOUT(IORD),IDDAT(JEI+12)                  IUDB1    2264
         CALL PRTMSG(3)                                                 IUDB1    2265
      ENDIF                                                             IUDB1    2266
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    2267
C                                                                       IUDB1    2268
      RETURN                                                            IUDB1    2269
C                                                                       IUDB1    2270
C-----------------------------------------------------------------------IUDB1    2271
C                                                                       IUDB1    2272
      ENTRY IUDB69(IORD,INDEX,NLF,KN,CID)                               IUDB1    2273
CD                                                                      IUDB1    2274
CD    FOR BLOCK TYPE 69 (POWER BLOCK).                                  IUDB1    2275
CD                                                                      IUDB1    2276
      LDEB=(JDEB(262).NE.0)                                             IUDB1    2277
C                                                                       IUDB1    2278
      NEXTB=0                                                           IUDB1    2279
      VALI=0.0                                                          IUDB1    2280
      JORD=JUDE(IORD)                                                   IUDB1    2281
      JEI=JEB+2                                                         IUDB1    2282
      APO=DDAT(JEI+1)                                                   IUDB1    2283
      BPO=DDAT(JEI+2)                                                   IUDB1    2284
      IF(IDDAT(JEI+1).EQ.0.OR.IDDAT(JEI+2).EQ.0) THEN                   IUDB1    2285
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CID   IUDB1    2286
         WRITE(MSG(2),3340) IORD,BLNAM1,BLNAM2                          IUDB1    2287
         CALL PRTMSG(2)                                                 IUDB1    2288
         MSG(1)='IUDB69: UD ERROR'                                      IUDB1    2289
         CALL ASTOP(MSG(1),16)                                          IUDB1    2290
      ENDIF                                                             IUDB1    2291
      IF(INDEX.EQ.1.OR.INDEX.EQ.2) THEN                                 IUDB1    2292
         J2=JE5-2                                                       IUDB1    2293
         DO 570 J=1,INTUD                                               IUDB1    2294
         J2=J2+2                                                        IUDB1    2295
         IDD=IDDAT(J2+2)                                                IUDB1    2296
         IDD=IABS(IDD)                                                  IUDB1    2297
         IF(IDD.EQ.IORD) THEN                                           IUDB1    2298
            XDAT=1.0                                                    IUDB1    2299
            IF(IDDAT(J2+2).LT.0) XDAT=-1.0                              IUDB1    2300
            IOUT=IDDAT(J2+1)                                            IUDB1    2301
            LTYP1=IDDAT(JE3+17*IOUT-15)                                 IUDB1    2302
            IF(JUDE(IOUT).EQ.0.AND.                                     IUDB1    2303
     &      (LTYP1.NE.4.AND.LTYP1.NE.6)) THEN                           IUDB1    2304
               NEXTB=IOUT                                               IUDB1    2305
               XDATN=XDAT                                               IUDB1    2306
            ELSE                                                        IUDB1    2307
               VALI=VALI+(ABS(XDAT*VALOUT(IOUT)))**APO                  IUDB1    2308
            ENDIF                                                       IUDB1    2309
         ENDIF                                                          IUDB1    2310
  570    CONTINUE                                                       IUDB1    2311
      ENDIF                                                             IUDB1    2312
      J3=JE6-3                                                          IUDB1    2313
      DO 580 J=1,INPUD                                                  IUDB1    2314
      J3=J3+3                                                           IUDB1    2315
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    2316
         IIN=IDDAT(J3+2)                                                IUDB1    2317
         IF(IIN.EQ.20) THEN                                             IUDB1    2318
            XDATN=DDAT(J3+3)                                            IUDB1    2319
         ELSE                                                           IUDB1    2320
            VALI=VALI+(ABS(DDAT(J3+3)*VALIN(IIN)))**APO                 IUDB1    2321
         ENDIF                                                          IUDB1    2322
      ENDIF                                                             IUDB1    2323
  580 CONTINUE                                                          IUDB1    2324
      IDDAT(JEI+8)=0                                                    IUDB1    2325
      IF(INDEX.EQ.2) THEN                                               IUDB1    2326
         VALO=VALOUT(IORD)                                              IUDB1    2327
         IF(VALO.LT.0.0) THEN                                           IUDB1    2328
            WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN),CIDIUDB1    2329
            WRITE(MSG(2),3350) IORD,BLNAM1,BLNAM2                       IUDB1    2330
            CALL PRTMSG(2)                                              IUDB1    2331
            MSG(1)='IUDB69: UD ERROR'                                   IUDB1    2332
            CALL ASTOP(MSG(1),16)                                       IUDB1    2333
         ENDIF                                                          IUDB1    2334
         APOI=1.0/APO                                                   IUDB1    2335
         BPOI=1.0/BPO                                                   IUDB1    2336
         IF(JORD.LT.NUDB) THEN                                          IUDB1    2337
            IF(NEXTB.EQ.0)THEN                                          IUDB1    2338
            MSG(1)='IUDB69: 1'                                          IUDB1    2339
            CALL ASTOP(MSG(1),9)                                        IUDB1    2340
            ENDIF                                                       IUDB1    2341
            VALOUT(NEXTB)=((ABS(VALO**BPOI-VALI))**APOI)/XDATN          IUDB1    2342
         ELSE                                                           IUDB1    2343
            VALIN(20)=((ABS(VALO**BPOI-VALI))**APOI)/XDATN              IUDB1    2344
         ENDIF                                                          IUDB1    2345
      ELSE                                                              IUDB1    2346
         VALOUT(IORD)=VALI**BPO                                         IUDB1    2347
      ENDIF                                                             IUDB1    2348
      BP1=(BPO-1.0)/BPO                                                 IUDB1    2349
      DDAT(JEI+3)=APO*BPO*((VALOUT(IORD))**BP1)                         IUDB1    2350
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    2351
C                                                                       IUDB1    2352
      RETURN                                                            IUDB1    2353
C                                                                       IUDB1    2354
C-----------------------------------------------------------------------IUDB1    2355
C                                                                       IUDB1    2356
      ENTRY IUDB70(IORD,NLF,KN,CID)                                     IUDB1    2357
CD                                                                      IUDB1    2358
CD    FOR BLOCK TYPE 70 (COMPENSATION BLOCK).                           IUDB1    2359
CD                                                                      IUDB1    2360
      LDEB=(JDEB(262).NE.0)                                             IUDB1    2361
C                                                                       IUDB1    2362
      NINP=0                                                            IUDB1    2363
      II=0                                                              IUDB1    2364
      JORD=JUDE(IORD)                                                   IUDB1    2365
      VALO=VALOUT(IORD)                                                 IUDB1    2366
      JEI=JEB+2                                                         IUDB1    2367
      J3=JE6-3                                                          IUDB1    2368
      DO 590 J=1,INPUD                                                  IUDB1    2369
      J3=J3+3                                                           IUDB1    2370
      IF(IDDAT(J3+1).EQ.IORD) THEN                                      IUDB1    2371
         WRITE(MSG(1),1000) NLF,INAME(KN-2),INAME(KN-1)                 IUDB1    2372
     *   ,INAME(KN),CID                                                 IUDB1    2373
         WRITE(MSG(2),3330) IORD,BLNAM1,BLNAM2                          IUDB1    2374
         MSG(3)='      CHECK THE INPUT CONNECTIONS.'                    IUDB1    2375
         CALL PRTMSG(3)                                                 IUDB1    2376
         MSG(1)='IUDB70: UD ERROR'                                      IUDB1    2377
         CALL ASTOP(MSG(1),16)                                          IUDB1    2378
      ENDIF                                                             IUDB1    2379
  590 CONTINUE                                                          IUDB1    2380
      RBL=DDAT(JEI+1)                                                   IUDB1    2381
      XBL=DDAT(JEI+2)                                                   IUDB1    2382
      NBX=IDDAT(JEI+3)                                                  IUDB1    2383
      IF(NBX.GT.0.AND.NBX.LE.NRBUS) THEN                                IUDB1    2384
         VNB=VALIN(20+NBX)                                              IUDB1    2385
         ANB=VALIN(30+NBX)                                              IUDB1    2386
         VNBR=VNB*COS(ANB)                                              IUDB1    2387
         VNBI=VNB*SIN(ANB)                                              IUDB1    2388
      ELSE                                                              IUDB1    2389
         VNBR=0.0                                                       IUDB1    2390
         VNBI=0.0                                                       IUDB1    2391
      ENDIF                                                             IUDB1    2392
      NLX=IDDAT(JEI+4)                                                  IUDB1    2393
      IF(NLX.GT.0.AND.NLX.LE.NRLIN) THEN                                IUDB1    2394
         LOC=IDDAT(JE2+4*NLX)                                           IUDB1    2395
         CALL GETCUR(CURR,CURI,LOC)                                     IUDB1    2396
      ELSE                                                              IUDB1    2397
         CURR=0.0                                                       IUDB1    2398
         CURI=0.0                                                       IUDB1    2399
      ENDIF                                                             IUDB1    2400
      VALOR=VNBR+RBL*CURR-XBL*CURI                                      IUDB1    2401
      VALOI=VNBI+RBL*CURI+XBL*CURR                                      IUDB1    2402
      MODE=IDDAT(JEI+5)                                                 IUDB1    2403
      IF(MODE.EQ.0) THEN                                                IUDB1    2404
         VALOUT(IORD)=SQRT(VALOR**2+VALOI**2)                           IUDB1    2405
      ELSEIF(MODE.EQ.1) THEN                                            IUDB1    2406
         VMG2=VALOR**2+VALOI**2                                         IUDB1    2407
         IF(VMG2.GT.0.000001) THEN                                      IUDB1    2408
            VALOUT(IORD)=ATAN2(VALOI,VALOR)                             IUDB1    2409
         ELSE                                                           IUDB1    2410
            VALOUT(IORD)=0.0                                            IUDB1    2411
         ENDIF                                                          IUDB1    2412
         IDDAT(JEI+6)=0                                                 IUDB1    2413
         DDAT(JEI+7)=VALOUT(IORD)                                       IUDB1    2414
      ELSEIF(MODE.EQ.2) THEN                                            IUDB1    2415
         VALOUT(IORD)=VALOR                                             IUDB1    2416
      ELSEIF(MODE.EQ.3) THEN                                            IUDB1    2417
         VALOUT(IORD)=VALOI                                             IUDB1    2418
      ELSE                                                              IUDB1    2419
         VALOUT(IORD)=0.0                                               IUDB1    2420
      ENDIF                                                             IUDB1    2421
      IF(LDEB)WRITE(IUD6,3320) JORD                                     IUDB1    2422
C                                                                       IUDB1    2423
      RETURN                                                            IUDB1    2424
C                                                                       IUDB1    2425
C-----------------------------------------------------------------------IUDB1    2426
C                                                                       IUDB1    2427
 1000 FORMAT(' *** ERROR USER DEFINED MODEL AT BUS:',I6,' STATION: '    IUDB1    2428
     *,3A4,' ID:',A4)                                                   IUDB1    2429
 1001 FORMAT(' *** WARNING USER DEFINED MODEL AT BUS:',I6,' STATION: '  IUDB1    2430
     *,3A4,' ID:',A4)                                                   IUDB1    2431
 1010 FORMAT(11X,'BLOCK# ',I3,'(',2A4,') HAS INITIAL OUTPUT=',F8.3)     IUDB1    2432
 1011 FORMAT(11X,'WHICH IS OUTSIDE LIMITS (MAX=',F8.3,' MIN=',F8.3,     IUDB1    2433
     &').')                                                             IUDB1    2434
 1020 FORMAT(11X,'BLOCK# ',I2,'(',2A4,') HAS ZERO GAIN.')               IUDB1    2435
 1040 FORMAT(11X,'BLOCK# ',I2,'(',2A4,') HAS XCROSSING LIMITS.')        IUDB1    2436
 1041 FORMAT(11X,'MAX= ',F10.5,' MIN= ',F10.5)                          IUDB1    2437
 1110 FORMAT(11X,'INTEGRATOR BLOCK#',I3,'(',2A4,') HAS INITIAL INPUT='  IUDB1    2438
     *,F8.3)                                                            IUDB1    2439
 1111 FORMAT(11X,'WHICH HAS FORCED THE OUTPUT TO A LIMIT. OUTPUT='      IUDB1    2440
     *,F8.3)                                                            IUDB1    2441
 1112 FORMAT(11X,'(MAX=',F8.3,' MIN=',F8.3,').')                        IUDB1    2442
 1160 FORMAT(11X,'IN BLOCK#',I3,'(',2A4                                 IUDB1    2443
     *,') THE SPECIFIED INITIAL VALUE EXCEEDS LIMITS.')                 IUDB1    2444
 1210 FORMAT(11X,'PI BLOCK#',I3,'(',2A4,') HAS INITIAL INPUT=',F8.3)    IUDB1    2445
 1320 FORMAT(11X,'BLOCK#',I3,'(',2A4,') HAS ZERO TIME CONSTANT.')       IUDB1    2446
 1440 FORMAT(1X,'KORD,JORD,XSTATE(KORD): ',2I5,F10.3)                   IUDB1    2447
 1460 FORMAT(11X,'BLOCK#',I3,'(',2A4,') HAS EQUAL ZERO AND POLE.')      IUDB1    2448
 1600 FORMAT(11X,'HV BLOCK#',I3,'(',2A4,') HAS MORE THAN TWO INPUTS.')  IUDB1    2449
 1610 FORMAT(11X,'HV BLOCK#',I3,'(',2A4                                 IUDB1    2450
     *,') HAS INITIAL OUTPUT SMALLER THAN THE KNOWN INPUT.')            IUDB1    2451
 1611 FORMAT(11X                                                        IUDB1    2452
     *,'NEVERTHELESS THE UNKNOWN INPUT IS SET TO THE OUTPUT.')          IUDB1    2453
 1612 FORMAT(11X                                                        IUDB1    2454
     *,'IF YOU WISH OTHERWISE RELOCATE "VREF" CONNECTION.')             IUDB1    2455
 1613 FORMAT(11X,'OUTPUT=',F8.3,' KNOWN INPUT=',F8.3)                   IUDB1    2456
 1700 FORMAT(11X,'LV BLOCK#',I3,'(',2A4,') HAS MORE THAN TWO INPUTS.')  IUDB1    2457
 1710 FORMAT(11X,'LV BLOCK#',I3,'(',2A4                                 IUDB1    2458
     *,') INITIAL OUTPUT IS LARGER THAN THE KNOWN INPUT.')              IUDB1    2459
 1800 FORMAT(11X,'MUL BLOCK#',I3,'(',2A4,') HAS MORE THAN TWO INPUTS.') IUDB1    2460
 1820 FORMAT(11X,'MUL BLOCK#',I3,'(',2A4                                IUDB1    2461
     *,') ONE INPUT IS INITIALLY ZERO RESULTING')                       IUDB1    2462
 1900 FORMAT(11X,'DIV BLOCK#',I3,'(',2A4,') HAS MORE THAN TWO INPUTS.') IUDB1    2463
 1910 FORMAT(11X,'DIV BLOCK#',I3,'(',2A4                                IUDB1    2464
     *,') DENOMINATOR IS INITIALLY ZERO')                               IUDB1    2465
 1920 FORMAT(11X,'DI BLOCK#',I3,'(',2A4                                 IUDB1    2466
     *,') THE OUTPUT IS INITIALLY ZERO RESULTING')                      IUDB1    2467
 2110 FORMAT(11X,'BLOCK#',I3,'(',2A4,') HAS A NEGATIVE DELAY TIME')     IUDB1    2468
 2220 FORMAT(11X,'SIN BLOCK#',I3,'(',2A4                                IUDB1    2469
     *,') HAS UNACCEPTABLE OUTPUT =',F10.5)                             IUDB1    2470
 2320 FORMAT(11X,'COS BLOCK#',I3,'(',2A4                                IUDB1    2471
     *,') HAS UNACCEPTABLE OUTPUT =',F10.5)                             IUDB1    2472
 2520 FORMAT(11X,'ARCSIN BLOCK#',I3,'(',2A4                             IUDB1    2473
     *,') HAS UNACCEPTABLE INPUT =',F10.5)                              IUDB1    2474
 2820 FORMAT(11X,'EXP BLOCK#',I3,'(',2A4                                IUDB1    2475
     *,') HAS UNACCEPTABLE OUTPUT =',F10.5)                             IUDB1    2476
 2920 FORMAT(11X,'LOG BLOCK#',I3,'(',2A4                                IUDB1    2477
     *,') HAS UNACCEPTABLE INPUT =',F10.5)                              IUDB1    2478
 3100 FORMAT(11X,'LSW BLOCK#',I3,'(',2A4                                IUDB1    2479
     *,') HAS EITHER MORE THAN 3 INPUTS OR 3RD')                        IUDB1    2480
 3101 FORMAT(11X                                                        IUDB1    2481
     *,'INPUT IS USED IN REG INITIAL PATH. CHECK THE CONNECTIONS.')     IUDB1    2482
 3110 FORMAT(11X,'LSW BLOCK#',I3,'(',2A4                                IUDB1    2483
     *,') CONDITION IS SATISFIED FOR OUTPUT')                           IUDB1    2484
 3111 FORMAT(11X                                                        IUDB1    2485
     *,'EQUAL TO THE KNOWN MAIN INPUT. NEVERTHELESS THE UNKNOWN')       IUDB1    2486
 3112 FORMAT(11X                                                        IUDB1    2487
     *,'MAIN INPUT IS SET TO THE OUTPUT. IF YOU WISH OTHERWISE')        IUDB1    2488
 3113 FORMAT(11X,'RELOCATE "VREF" CONNECTION. OUTPUT=',F8.3)            IUDB1    2489
 3114 FORMAT(11X,' KNOWN MAIN INPUT=',F8.3,' LOGIC INPUT=',F8.3)        IUDB1    2490
 3140 FORMAT(11X,'LSW BLOCK#',I3,'(',2A4,') HAS LESS THAN 3 INPUTS.')   IUDB1    2491
 3141 FORMAT(11X                                                        IUDB1    2492
     *,'ALL INPUTS HAVE TO BE SPECIFIED. CHECK THE CONNECTIONS.')       IUDB1    2493
 3200 FORMAT(11X,'TIMER BLOCK#',I3,'(',2A4                              IUDB1    2494
     *,') HAS MORE THAN ONE INPUT.')                                    IUDB1    2495
 3210 FORMAT(11X,'TIMER BLOCK#',I3,'(',2A4                              IUDB1    2496
     *,') ISN''T INITIALLY IN RESET CONDITION.')                        IUDB1    2497
 3211 FORMAT(11X,'NEVERTHELESS THE OUTPUT IS ASSUMED ZERO. INPUT='      IUDB1    2498
     *,F10.5)                                                           IUDB1    2499
 3300 FORMAT(11X,'COUNTER BLOCK#',I3,'(',2A4                            IUDB1    2500
     *,') HAS MORE THAN ONE INPUTS.')                                   IUDB1    2501
 3310 FORMAT(11X,'COUNTER BLOCK#',I3,'(',2A4,') HAS')                   IUDB1    2502
 3311 FORMAT(11X,'INITIAL INPUT BEYOND THRESHOLDS. INPUT=',F10.5)       IUDB1    2503
 3312 FORMAT(11X,'UUP NOT LARGER THAN UDN. UUP=',F10.5,'  UDN=',F10.5)  IUDB1    2504
 3313 FORMAT(11X,'NMAX NOT LARGER THAN NMIN. NMAX=',I5,'  NMIN=',I5)    IUDB1    2505
 3314 FORMAT(11X,'OUTPUT OUTSIDE LIMITS OR NON-INTEGER. Y=',F10.5,      IUDB1    2506
     *' N=',I5)                                                         IUDB1    2507
 3320 FORMAT(1X,'JORD: ',I5)                                            IUDB1    2508
 3330 FORMAT(11X,'COM BLOCK#',I3,'(',2A4,') SHOULD NOT HAVE ANY INPUT.')IUDB1    2509
 3340 FORMAT(11X,'BLOCK# ',I2,'(',2A4,') HAS ZERO POWER.')              IUDB1    2510
 3350 FORMAT(11X,'BLOCK# ',I2,'(',2A4,') HAS NEGATIVE OUTPUT.')         IUDB1    2511
      END                                                               IUDB1    2512
