CFPRIME TUBIN                                                           TUBIN       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  TUBIN(IUX,I)                                          TUBIN       3
CD                                                                      TUBIN       4
CD    TO TABULATE DATA OF UDC BLOCK IN MTDC. THE BLOCK IS BINNARY.      TUBIN       5
CD                                                                      TUBIN       6
C                                                                       TUBIN       7
      INCLUDE 'PARX.INS'                                                TUBIN       8
      INCLUDE 'UDCA.INS'                                                TUBIN       9
      INCLUDE 'UDCD.INS'                                                TUBIN      10
      INCLUDE 'UDCE.INS'                                                TUBIN      11
      INCLUDE 'UDCF.INS'                                                TUBIN      12
      INCLUDE 'UDCH.INS'                                                TUBIN      13
      INCLUDE 'GRDC01.INS'                                              TUBIN      14
      INCLUDE 'CNIPTR.INS'                                              TUBIN      15
      INCLUDE 'CNSTN.INS'                                               TUBIN      16
      INCLUDE 'CNFLAG.INS'                                              TUBIN      17
C                                                                       TUBIN      18
      CHARACTER*72  CDATA(100)                                          TUBIN      19
      CHARACTER*29  DCCONV                                              TUBIN      20
      CHARACTER*17  DCLINE                                              TUBIN      21
      CHARACTER*15  LOOK                                                TUBIN      22
      CHARACTER*25  NAME                                                TUBIN      23
      CHARACTER*17  BNAME                                               TUBIN      24
      CHARACTER*8   SNAME, TNAME                                        TUBIN      25
C                                                                       TUBIN      26
      LOGICAL   DONE                                                    TUBIN      27
C                                                                       TUBIN      28
      LDEB=.FALSE.                                                      TUBIN      29
C                                                                       TUBIN      30
      NUMSRC = 3                                                        TUBIN      31
      SEARCH(2) = 'INPUT 1:'                                            TUBIN      32
      SEARCH(3) = 'INPUT 2:'                                            TUBIN      33
C                                                                       TUBIN      34
      NEXTI=IUNIPT(I)                                                   TUBIN      35
      NEXTP=IUDPPT(I)                                                   TUBIN      36
      IF(NEXTI.NE.0) CDATA(2)=UIDENT(NEXTI)                             TUBIN      37
      IF(CDATA(2).EQ.' '.AND.NEXTP.NE.0)THEN                            TUBIN      38
         WRITE(CDATA(2),'(F15.6)') UDPARM(NEXTP)                        TUBIN      39
      ENDIF                                                             TUBIN      40
C                                                                       TUBIN      41
      NEXTI=IUDINX(NEXTI)                                               TUBIN      42
      NEXTP=IUDPNX(NEXTP)                                               TUBIN      43
      IF(NEXTI.NE.0) CDATA(3)=UIDENT(NEXTI)                             TUBIN      44
      IF(CDATA(3).EQ.' '.AND.NEXTP.NE.0)THEN                            TUBIN      45
         WRITE(CDATA(3),'(F15.6)') UDPARM(NEXTP)                        TUBIN      46
      ENDIF                                                             TUBIN      47
C                                                                       TUBIN      48
      SNAME = SBBIN(IUDSUB(I))                                          TUBIN      49
      GOTO 8000                                                         TUBIN      50
C                                                                       TUBIN      51
C  ------------------------------------------------------               TUBIN      52
C                                                                       TUBIN      53
      ENTRY TUBRKR(IUX,I)                                               TUBIN      54
CD                                                                      TUBIN      55
CD    THIS IS THE BREAKER BLOCK                                         TUBIN      56
CD                                                                      TUBIN      57
C                                                                       TUBIN      58
      ISUB=IUDSUB(I)                                                    TUBIN      59
      SNAME = SBBRKR(ISUB)                                              TUBIN      60
C                                                                       TUBIN      61
      IF (ISUB.EQ.1) THEN                                               TUBIN      62
         NUMSRC = 12                                                    TUBIN      63
         SEARCH(2) = 'BUS A:'                                           TUBIN      64
         SEARCH(3) = 'BUS B:'                                           TUBIN      65
         SEARCH(4) = 'CIRCUIT NO:'                                      TUBIN      66
         SEARCH(5) = 'OPEN REQUEST:'                                    TUBIN      67
         SEARCH(6) = 'OPEN DELAYTIME:'                                  TUBIN      68
         SEARCH(7) = 'VOLT RISE TIME:'                                  TUBIN      69
         SEARCH(8) = 'VOLTAGE MAX:'                                     TUBIN      70
         SEARCH(9) = 'OPEN CURNT MAX:'                                  TUBIN      71
         SEARCH(10) = 'OPEN CURRENT:'                                   TUBIN      72
         SEARCH(11) = 'CLOSE REQUEST:'                                  TUBIN      73
         SEARCH(12) = 'CLOSE DELAYTIM:'                                 TUBIN      74
      ELSE                                                              TUBIN      75
         NUMSRC = 7                                                     TUBIN      76
         SEARCH(2) = 'BUS A:'                                           TUBIN      77
         SEARCH(3) = 'BUS B:'                                           TUBIN      78
         SEARCH(4) = 'CIRCUIT NO:'                                      TUBIN      79
         SEARCH(5) = 'OPEN REQUEST:'                                    TUBIN      80
         SEARCH(6) = 'OPEN CURNT MAX:'                                  TUBIN      81
         SEARCH(7) = 'CLOSE REQUEST:'                                   TUBIN      82
      END IF                                                            TUBIN      83
C                                                                       TUBIN      84
      NEXTI=IUNIPT(I)                                                   TUBIN      85
      NEXTP=IUDPPT(I)                                                   TUBIN      86
C                                                                       TUBIN      87
      DO 20 J = 2, NUMSRC                                               TUBIN      88
C                                                                       TUBIN      89
         IF (SEARCH(J) .EQ. 'BUS A:') THEN                              TUBIN      90
C                                                                       TUBIN      91
            INDEX=IUDINT(NEXTI)                                         TUBIN      92
            NEXTI=IUDINX(NEXTI)                                         TUBIN      93
            NEXTP=IUDPNX(NEXTP)                                         TUBIN      94
            CDATA(J)=DCBNAM(INDEX)(1:8)                                 TUBIN      95
C                                                                       TUBIN      96
         ELSE IF (SEARCH(J) .EQ. 'BUS B:') THEN                         TUBIN      97
C                                                                       TUBIN      98
            CDATA(J)=DCBNAM(INDEX)(9:16)                                TUBIN      99
C                                                                       TUBIN     100
         ELSE IF (SEARCH(J) .EQ. 'CIRCUIT NO:') THEN                    TUBIN     101
C                                                                       TUBIN     102
            CDATA(J)=DCBNAM(INDEX)(17:17)                               TUBIN     103
C                                                                       TUBIN     104
         ELSE                                                           TUBIN     105
C                                                                       TUBIN     106
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN     107
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN     108
               WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                  TUBIN     109
            ENDIF                                                       TUBIN     110
C                                                                       TUBIN     111
            NEXTI=IUDINX(NEXTI)                                         TUBIN     112
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     113
C                                                                       TUBIN     114
         ENDIF                                                          TUBIN     115
20    CONTINUE                                                          TUBIN     116
C                                                                       TUBIN     117
      GOTO 8000                                                         TUBIN     118
C                                                                       TUBIN     119
C  ---------------------------------------------------                  TUBIN     120
C                                                                       TUBIN     121
      ENTRY TUFORT(IUX,I)                                               TUBIN     122
CD                                                                      TUBIN     123
CD     THIS IS THE FORTRAN BLOCK                                        TUBIN     124
CD                                                                      TUBIN     125
C                                                                       TUBIN     126
      ISUB=IUDSUB(I)                                                    TUBIN     127
      SNAME = SBFORT(ISUB)                                              TUBIN     128
C                                                                       TUBIN     129
      J=2                                                               TUBIN     130
      NEXTI=IUNIPT(I)                                                   TUBIN     131
      NEXTP=IUDPPT(I)                                                   TUBIN     132
C                                                                       TUBIN     133
 100  IF(NEXTI.EQ.0.OR.NEXTP.EQ.0) GOTO 120                             TUBIN     134
C                                                                       TUBIN     135
      J=J+1                                                             TUBIN     136
      CDATA(J)=UIDENT(NEXTI)                                            TUBIN     137
      IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                            TUBIN     138
         WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                        TUBIN     139
      ENDIF                                                             TUBIN     140
      WRITE(SEARCH(J),9010) 'INPUT',J                                   TUBIN     141
C                                                                       TUBIN     142
      NEXTI=IUDINX(NEXTI)                                               TUBIN     143
      NEXTP=IUDPNX(NEXTP)                                               TUBIN     144
      GOTO 100                                                          TUBIN     145
C                                                                       TUBIN     146
 120  CONTINUE                                                          TUBIN     147
C                                                                       TUBIN     148
      WRITE(CDATA(2),'(I2)') J-2                                        TUBIN     149
      SEARCH(2)='NO OF INPUTS:'                                         TUBIN     150
      J=J+1                                                             TUBIN     151
      NUM=ISBFNU(ISUB)                                                  TUBIN     152
      SEARCH(J)='NO OF OUTPUTS:'                                        TUBIN     153
      WRITE(CDATA(J),'(I2)') NUM                                        TUBIN     154
C                                                                       TUBIN     155
      DO 140 K=1,IFRTBK                                                 TUBIN     156
         IF(UDNAME(I).EQ.FRTNAM(K))THEN                                 TUBIN     157
            JPTR=IDUMPT(K)                                              TUBIN     158
         ENDIF                                                          TUBIN     159
 140  CONTINUE                                                          TUBIN     160
C                                                                       TUBIN     161
      DO 160 K=1,NUM                                                    TUBIN     162
         J=J+1                                                          TUBIN     163
         CDATA(J)=DUMNAM(JPTR)                                          TUBIN     164
         WRITE(SEARCH(J),9010) 'OUTPUT ',I                              TUBIN     165
         JPTR=JPTR+1                                                    TUBIN     166
 160   CONTINUE                                                         TUBIN     167
C                                                                       TUBIN     168
      GOTO 8000                                                         TUBIN     169
C                                                                       TUBIN     170
C  -----------------------------------------------                      TUBIN     171
C                                                                       TUBIN     172
      ENTRY TUFRAC(IUX,I)                                               TUBIN     173
CD                                                                      TUBIN     174
CD     THIS IS THE FROM AC BLOCK                                        TUBIN     175
CD                                                                      TUBIN     176
C                                                                       TUBIN     177
      ISUB=IUDSUB(I)                                                    TUBIN     178
      SNAME = SBFRAC(ISUB)                                              TUBIN     179
C                                                                       TUBIN     180
      IF (ISUB.GE.3.AND.ISUB.LE.5) THEN                                 TUBIN     181
         SEARCH(2)='BUS 1:'                                             TUBIN     182
         SEARCH(3)='KV 1:'                                              TUBIN     183
         SEARCH(4)='BUS 2:'                                             TUBIN     184
         SEARCH(5)='KV 2:'                                              TUBIN     185
         SEARCH(6)='CIRCUIT NUMBER:'                                    TUBIN     186
         NEXTI=IUNIPT(I)                                                TUBIN     187
         NEXTI=IUDINX(NEXTI)                                            TUBIN     188
         NEXTI=IUDINX(NEXTI)                                            TUBIN     189
         LOCN=IUDINT(NEXTI)                                             TUBIN     190
         NAME=LNNAME(LOCN)                                              TUBIN     191
         CDATA(2)=NAME(1:8)                                             TUBIN     192
         CDATA(3)=NAME(9:12)                                            TUBIN     193
         CDATA(4)=NAME(13:20)                                           TUBIN     194
         CDATA(5)=NAME(21:24)                                           TUBIN     195
         CDATA(6)=NAME(25:25)                                           TUBIN     196
         NUMSRC=6                                                       TUBIN     197
      ELSE                                                              TUBIN     198
         SEARCH(2)='AC BUS:'                                            TUBIN     199
         SEARCH(3)='KV:'                                                TUBIN     200
         NEXTI=IUNIPT(I)                                                TUBIN     201
         LOCN=IUDINT(NEXTI)                                             TUBIN     202
         NP=IUQABU(LOCN)                                                TUBIN     203
         IF(KLFO.EQ.0) THEN                                             TUBIN     204
            NPO=NOLD(NP)                                                TUBIN     205
            IF(NPO.LT.10) THEN                                          TUBIN     206
               WRITE(CDATA(2),'(I1)') NPO                               TUBIN     207
            ELSEIF(NPO.LT.100) THEN                                     TUBIN     208
               WRITE(CDATA(2),'(I2)') NPO                               TUBIN     209
            ELSEIF(NPO.LT.1000) THEN                                    TUBIN     210
               WRITE(CDATA(2),'(I3)') NPO                               TUBIN     211
            ELSEIF(NPO.LT.10000) THEN                                   TUBIN     212
               WRITE(CDATA(2),'(I4)') NPO                               TUBIN     213
            ELSE                                                        TUBIN     214
               WRITE(CDATA(2),'(I5)') NPO                               TUBIN     215
            ENDIF                                                       TUBIN     216
            WRITE(CDATA(3),'(F2.0)') 0.                                 TUBIN     217
         ELSE                                                           TUBIN     218
            NP3=3*NP                                                    TUBIN     219
            WRITE(CDATA(2),'(2A4)') INAME(NP3-2),INAME(NP3-1)           TUBIN     220
            WRITE(CDATA(3),'(A4)') INAME(NP3)                           TUBIN     221
         ENDIF                                                          TUBIN     222
         NUMSRC=3                                                       TUBIN     223
      ENDIF                                                             TUBIN     224
C                                                                       TUBIN     225
      GOTO 8000                                                         TUBIN     226
C                                                                       TUBIN     227
C  ---------------------------------------------------                  TUBIN     228
C                                                                       TUBIN     229
      ENTRY TUFRDC(IUX,I)                                               TUBIN     230
CD                                                                      TUBIN     231
CD     THIS IS THE FROM DC BLOCK                                        TUBIN     232
CD                                                                      TUBIN     233
C                                                                       TUBIN     234
      ISUB=IUDSUB(I)                                                    TUBIN     235
      SNAME = SBFRDC(ISUB)                                              TUBIN     236
      NEXTI=IUNIPT(I)                                                   TUBIN     237
      JSTORE=IUDINT(NEXTI)                                              TUBIN     238
C                                                                       TUBIN     239
C           VCONV ICONV VNODE INODE ALPHA GAMMA  PAC                    TUBIN     240
      GOTO ( 200,  200,  210,  210,  200,  200,  200,                   TUBIN     241
C                                                                       TUBIN     242
C            QAC  ILINE PLINE BRIDGE VCOMM  XC   TAP                    TUBIN     243
     *       200,  220,  220,  200,   200,  200, 200,                   TUBIN     244
C                                                                       TUBIN     245
C          COMFAIL BLOCK  CL1   CL2   LL   RL   RMODE                   TUBIN     246
     *       200,   200,  220,  220,  220, 220,  200,                   TUBIN     247
C                                                                       TUBIN     248
C           IMODE VDIFF IBRKR SBRKR  ICAPS                              TUBIN     249
     *       200,  230,  240,  240,   220 ) ISUB                        TUBIN     250
C                                                                       TUBIN     251
 200  NUMSRC = 6                                                        TUBIN     252
      SEARCH(2) = 'DC NODE NAME 1:'                                     TUBIN     253
      SEARCH(3) = 'DC NODE NAME 2:'                                     TUBIN     254
      SEARCH(4) = 'AC NAME:'                                            TUBIN     255
      SEARCH(5) = 'KV:'                                                 TUBIN     256
      SEARCH(6) = 'CIRCUIT NUMBER:'                                     TUBIN     257
      CDATA(2)=DCCNAM(JSTORE)(1:8)                                      TUBIN     258
      CDATA(3)=DCCNAM(JSTORE)(9:16)                                     TUBIN     259
      CDATA(4)=DCCNAM(JSTORE)(17:24)                                    TUBIN     260
      CDATA(5)=DCCNAM(JSTORE)(25:28)                                    TUBIN     261
      CDATA(6)=DCCNAM(JSTORE)(29:29)                                    TUBIN     262
      GOTO 8000                                                         TUBIN     263
C                                                                       TUBIN     264
 210  NUMSRC = 2                                                        TUBIN     265
      SEARCH(2) = 'DC NODE NAME:'                                       TUBIN     266
      IF(JSTORE.EQ.0)THEN                                               TUBIN     267
         CDATA(2)='GROUND'                                              TUBIN     268
      ELSE                                                              TUBIN     269
         CDATA(2)=IDCNOD(JSTORE)                                        TUBIN     270
      ENDIF                                                             TUBIN     271
      GOTO 8000                                                         TUBIN     272
C                                                                       TUBIN     273
 220  NUMSRC = 4                                                        TUBIN     274
      SEARCH(2) = 'DC NODE NAME 1:'                                     TUBIN     275
      SEARCH(3) = 'DC NODE NAME 2:'                                     TUBIN     276
      SEARCH(4) = 'CIRCUIT NUMBER:'                                     TUBIN     277
      IF(JSTORE.GT.0)THEN                                               TUBIN     278
         CDATA(2)=DCLNAM(JSTORE)(1:8)                                   TUBIN     279
         CDATA(3)=DCLNAM(JSTORE)(9:16)                                  TUBIN     280
         CDATA(4)=DCLNAM(JSTORE)(17:17)                                 TUBIN     281
      ELSE                                                              TUBIN     282
         CDATA(2)=DCLNAM(-JSTORE)(9:16)                                 TUBIN     283
         CDATA(3)=DCLNAM(-JSTORE)(1:8)                                  TUBIN     284
         CDATA(4)=DCLNAM(-JSTORE)(17:17)                                TUBIN     285
      ENDIF                                                             TUBIN     286
      GOTO 8000                                                         TUBIN     287
C                                                                       TUBIN     288
 230  NUMSRC = 3                                                        TUBIN     289
      SEARCH(2) = 'DC NODE NAME 1:'                                     TUBIN     290
      SEARCH(3) = 'DC NODE NAME 2:'                                     TUBIN     291
      IF(JSTORE.EQ.0)THEN                                               TUBIN     292
         CDATA(2)='GROUND'                                              TUBIN     293
      ELSE                                                              TUBIN     294
         CDATA(2)=IDCNOD(JSTORE)                                        TUBIN     295
      ENDIF                                                             TUBIN     296
      NEXTI=IUDINX(NEXTI)                                               TUBIN     297
      JSTORE=IUDINT(NEXTI)                                              TUBIN     298
      IF(JSTORE.EQ.0)THEN                                               TUBIN     299
         CDATA(3)='GROUND'                                              TUBIN     300
      ELSE                                                              TUBIN     301
         CDATA(3)=IDCNOD(JSTORE)                                        TUBIN     302
      ENDIF                                                             TUBIN     303
      GOTO 8000                                                         TUBIN     304
C                                                                       TUBIN     305
 240  NUMSRC = 4                                                        TUBIN     306
      SEARCH(2) = 'DC NODE NAME 1:'                                     TUBIN     307
      SEARCH(3) = 'DC NODE NAME 2:'                                     TUBIN     308
      SEARCH(4) = 'CIRCUIT NUMBER:'                                     TUBIN     309
      IF(JSTORE.GT.0)THEN                                               TUBIN     310
         CDATA(2)=DCBNAM(JSTORE)(1:8)                                   TUBIN     311
         CDATA(3)=DCBNAM(JSTORE)(9:16)                                  TUBIN     312
         CDATA(4)=DCBNAM(JSTORE)(17:17)                                 TUBIN     313
      ELSE                                                              TUBIN     314
         CDATA(2)=DCBNAM(-JSTORE)(9:16)                                 TUBIN     315
         CDATA(3)=DCBNAM(-JSTORE)(1:8)                                  TUBIN     316
         CDATA(4)=DCBNAM(-JSTORE)(17:17)                                TUBIN     317
      ENDIF                                                             TUBIN     318
      GOTO 8000                                                         TUBIN     319
C                                                                       TUBIN     320
C  -----------------------------------------------------------          TUBIN     321
C                                                                       TUBIN     322
      ENTRY TUINTF(IUX,I)                                               TUBIN     323
CD                                                                      TUBIN     324
CD     THIS IS THE INTERFACE BLOCK                                      TUBIN     325
CD                                                                      TUBIN     326
C                                                                       TUBIN     327
      DONE=.FALSE.                                                      TUBIN     328
      TNAME = TPNAME(IUDTYP(I))                                         TUBIN     329
      BNAME = UDNAME(I)                                                 TUBIN     330
      LEN = IUDLEN(I)                                                   TUBIN     331
C                                                                       TUBIN     332
      NUMSRC = 6                                                        TUBIN     333
      SEARCH(1) = 'PRINT FLAG:'                                         TUBIN     334
      SEARCH(2) = 'DC BUS 1:'                                           TUBIN     335
      SEARCH(3) = 'DC BUS 2:'                                           TUBIN     336
      SEARCH(4) = 'AC BUS:'                                             TUBIN     337
      SEARCH(5) = 'KV:'                                                 TUBIN     338
      SEARCH(6) = 'CIRCUIT NUMBER:'                                     TUBIN     339
C                                                                       TUBIN     340
      CDATA(1)='N'                                                      TUBIN     341
      IF(UDPRNT(I)) CDATA(1)='P'                                        TUBIN     342
C                                                                       TUBIN     343
      NEXTI=IUNIPT(I)                                                   TUBIN     344
      NEXTP=IUDPPT(I)                                                   TUBIN     345
      NEXTR=IUDRPT(I)                                                   TUBIN     346
      LOCN=IUDINT(NEXTI)                                                TUBIN     347
      NEXTI=IUDINX(NEXTI)                                               TUBIN     348
C                                                                       TUBIN     349
      CDATA(2)=DCCNAM(LOCN)(1:8)                                        TUBIN     350
      CDATA(3)=DCCNAM(LOCN)(9:16)                                       TUBIN     351
      CDATA(4)=DCCNAM(LOCN)(17:24)                                      TUBIN     352
      CDATA(5)=DCCNAM(LOCN)(25:28)                                      TUBIN     353
      CDATA(6)=DCCNAM(LOCN)(29:29)                                      TUBIN     354
C                                                                       TUBIN     355
      IDONE = 0                                                         TUBIN     356
300   IF(NEXTR.EQ.0.OR.NEXTI.EQ.0.OR.NEXTP.EQ.0.                        TUBIN     357
     *         OR.DONE) GOTO 340                                        TUBIN     358
C                                                                       TUBIN     359
      IF(UDRKW(NEXTR).EQ.'ALPHA'.OR.                                    TUBIN     360
     *   UDRKW(NEXTR).EQ.'GAMMA'.OR.                                    TUBIN     361
     *   UDRKW(NEXTR).EQ.'VOLTAGE'.OR.                                  TUBIN     362
     *   UDRKW(NEXTR).EQ.'CURRENT'.OR.                                  TUBIN     363
     *   UDRKW(NEXTR).EQ.'BLOCK'.OR.                                    TUBIN     364
     *   UDRKW(NEXTR).EQ.'BYPASS'.OR.                                   TUBIN     365
     *   UDRKW(NEXTR).EQ.'COMFAIL')THEN                                 TUBIN     366
         NUMSRC=NUMSRC+1                                                TUBIN     367
         SEARCH(NUMSRC) = 'KEYWORD:'                                    TUBIN     368
         CDATA(NUMSRC)=UDRKW(NEXTR)                                     TUBIN     369
C                                                                       TUBIN     370
         WRITE(CDATA(NUMSRC+1),'(F15.6)') UDPARM(NEXTP)                 TUBIN     371
         IF(UIDENT(NEXTI).NE.' ')THEN                                   TUBIN     372
            CDATA(NUMSRC+1)=UIDENT(NEXTI)                               TUBIN     373
         ELSEIF(UDRKW(NEXTR).NE.'BLOCK'.AND.                            TUBIN     374
     *          UDRKW(NEXTR).NE.'BYPASS'.AND.                           TUBIN     375
     *          UDRKW(NEXTR).NE.'COMFAIL'.AND.                          TUBIN     376
     *          UDPARM(NEXTP).EQ.0.)THEN                                TUBIN     377
            GOTO 320                                                    TUBIN     378
         ENDIF                                                          TUBIN     379
         NUMSRC=NUMSRC+1                                                TUBIN     380
         SEARCH(NUMSRC)='INPUT BLOCK:'                                  TUBIN     381
         IF(UDRELA(NEXTR).NE.' ')THEN                                   TUBIN     382
            NUMSRC=NUMSRC+1                                             TUBIN     383
            SEARCH(NUMSRC)='INPUT 1:'                                   TUBIN     384
            WRITE(CDATA(NUMSRC),'(F15.6)')UDPRM1(NEXTR)                 TUBIN     385
            IF(UDBLK1(NEXTR).NE.' ') CDATA(NUMSRC)=UDBLK1(NEXTR)        TUBIN     386
            NUMSRC=NUMSRC+1                                             TUBIN     387
            SEARCH(NUMSRC)='OPERATOR:'                                  TUBIN     388
            CDATA(NUMSRC)=UDRELA(NEXTR)                                 TUBIN     389
            NUMSRC=NUMSRC+1                                             TUBIN     390
            SEARCH(NUMSRC)='INPUT 2:'                                   TUBIN     391
            WRITE(CDATA(NUMSRC),'(F15.6)')UDPRM2(NEXTR)                 TUBIN     392
            IF(UDBLK2(NEXTR).NE.' ') CDATA(NUMSRC)=UDBLK2(NEXTR)        TUBIN     393
         ENDIF                                                          TUBIN     394
      ELSEIF(UDRKW(NEXTR).EQ.'INITIAL')THEN                             TUBIN     395
         IDONE=IDONE+1                                                  TUBIN     396
         IF(IABS(ICTYPE(LOCN)).EQ.1) IDONE=IDONE+1                      TUBIN     397
         IF(IDONE.EQ.2) DONE=.TRUE.                                     TUBIN     398
         NUMSRC=NUMSRC+1                                                TUBIN     399
         SEARCH(NUMSRC)='KEYWORD:'                                      TUBIN     400
         CDATA(NUMSRC)=UDRKW(NEXTR)                                     TUBIN     401
         NUMSRC=NUMSRC+1                                                TUBIN     402
         SEARCH(NUMSRC)='SUB KEYWORD:'                                  TUBIN     403
         CDATA(NUMSRC)=UDRELA(NEXTR)                                    TUBIN     404
         WRITE(CDATA(NUMSRC+1),'(F15.6)')UDPRM2(NEXTR)                  TUBIN     405
         IF(UDBLK2(NEXTR).NE.' ')THEN                                   TUBIN     406
            CDATA(NUMSRC+1)=UDBLK2(NEXTR)                               TUBIN     407
         ELSEIF(JUDBNM(NEXTR).NE.-99)THEN                               TUBIN     408
            GOTO 320                                                    TUBIN     409
         ENDIF                                                          TUBIN     410
      ENDIF                                                             TUBIN     411
320   NEXTI=IUDINX(NEXTI)                                               TUBIN     412
      NEXTP=IUDPNX(NEXTP)                                               TUBIN     413
      NEXTR=IUDRNX(NEXTR)                                               TUBIN     414
      GOTO 300                                                          TUBIN     415
C                                                                       TUBIN     416
340   WRITE (IUX,9020) I,BNAME(1:LEN),TNAME                             TUBIN     417
      GOTO 8050                                                         TUBIN     418
C                                                                       TUBIN     419
C  -----------------------------------------------------                TUBIN     420
C                                                                       TUBIN     421
      ENTRY TULIMT(IUX,I)                                               TUBIN     422
CD                                                                      TUBIN     423
CD     THIS IS THE LIMIT BLOCK                                          TUBIN     424
CD                                                                      TUBIN     425
C                                                                       TUBIN     426
      ISUB=IUDSUB(I)                                                    TUBIN     427
      SNAME = SBLIMT(ISUB)                                              TUBIN     428
C                                                                       TUBIN     429
C           STATIC DYNAMIC RATE VRATE                                   TUBIN     430
      GOTO ( 400,   410,   420,  430 ) ISUB                             TUBIN     431
C                                                                       TUBIN     432
 400  NUMSRC = 5                                                        TUBIN     433
      SEARCH(2) = 'INPUT BLOCK:'                                        TUBIN     434
      SEARCH(3) = 'GAIN:'                                               TUBIN     435
      SEARCH(4) = 'MINIMUM:'                                            TUBIN     436
      SEARCH(5) = 'MAXIMUM:'                                            TUBIN     437
      GOTO 450                                                          TUBIN     438
C                                                                       TUBIN     439
 410  NUMSRC = 8                                                        TUBIN     440
      SEARCH(2) = 'INPUT BLOCK:'                                        TUBIN     441
      SEARCH(3) = 'A:'                                                  TUBIN     442
      SEARCH(4) = 'B:'                                                  TUBIN     443
      SEARCH(5) = 'D:'                                                  TUBIN     444
      SEARCH(6) = 'E:'                                                  TUBIN     445
      SEARCH(7) = 'MINIMUM:'                                            TUBIN     446
      SEARCH(8) = 'MAXIMUM:'                                            TUBIN     447
      GOTO 450                                                          TUBIN     448
C                                                                       TUBIN     449
 420  NUMSRC = 6                                                        TUBIN     450
      SEARCH(2) = 'INPUT BLOCK:'                                        TUBIN     451
      SEARCH(3) = 'DOWN RATE:'                                          TUBIN     452
      SEARCH(4) = 'UP RATE:'                                            TUBIN     453
      SEARCH(5) = 'MINIMUM:'                                            TUBIN     454
      SEARCH(6) = 'MAXIMUM:'                                            TUBIN     455
      GOTO 450                                                          TUBIN     456
C                                                                       TUBIN     457
 430  NUMSRC = 7                                                        TUBIN     458
      SEARCH(2) = 'INPUT BLOCK:'                                        TUBIN     459
      SEARCH(3) = 'TC:'                                                 TUBIN     460
      SEARCH(4) = 'DOWN RATE:'                                          TUBIN     461
      SEARCH(5) = 'UP RATE:'                                            TUBIN     462
      SEARCH(6) = 'MINIMUM:'                                            TUBIN     463
      SEARCH(7) = 'MAXIMUM:'                                            TUBIN     464
C                                                                       TUBIN     465
 450  NEXTI=IUNIPT(I)                                                   TUBIN     466
      NEXTP=IUDPPT(I)                                                   TUBIN     467
C                                                                       TUBIN     468
      DO 480 J = 2, NUMSRC                                              TUBIN     469
C                                                                       TUBIN     470
         IF(SEARCH(J).EQ.'INPUT BLOCK:')THEN                            TUBIN     471
C                                                                       TUBIN     472
            CDATA(J)=UIDENT(NEXTI)                                      TUBIN     473
            NEXTI=IUDINX(NEXTI)                                         TUBIN     474
C                                                                       TUBIN     475
         ELSEIF(SEARCH(J).EQ.'MINIMUM:' .OR.                            TUBIN     476
     1          SEARCH(J).EQ.'MAXIMUM:' .OR.                            TUBIN     477
     2          SEARCH(J).EQ.'UP RATE:' .OR.                            TUBIN     478
     3          SEARCH(J).EQ.'DOWN RATE:' .OR.                          TUBIN     479
     4          SEARCH(J).EQ.'TC:')THEN                                 TUBIN     480
C                                                                       TUBIN     481
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN     482
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN     483
                WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                 TUBIN     484
            END IF                                                      TUBIN     485
C                                                                       TUBIN     486
            NEXTI=IUDINX(NEXTI)                                         TUBIN     487
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     488
C                                                                       TUBIN     489
         ELSEIF(SEARCH(J).EQ.'GAIN:' .OR.                               TUBIN     490
     1          SEARCH(J).EQ.'A:' .OR.                                  TUBIN     491
     2          SEARCH(J).EQ.'B:' .OR.                                  TUBIN     492
     3          SEARCH(J).EQ.'D:' .OR.                                  TUBIN     493
     4          SEARCH(J).EQ.'E:')THEN                                  TUBIN     494
C                                                                       TUBIN     495
            WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                     TUBIN     496
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     497
C                                                                       TUBIN     498
         END IF                                                         TUBIN     499
C                                                                       TUBIN     500
480   CONTINUE                                                          TUBIN     501
C                                                                       TUBIN     502
      GOTO 8000                                                         TUBIN     503
C                                                                       TUBIN     504
C  ----------------------------------------------                       TUBIN     505
C                                                                       TUBIN     506
      ENTRY TULOGC(IUX,I)                                               TUBIN     507
CD                                                                      TUBIN     508
CD     THIS IS THE LOGIC BLOCK                                          TUBIN     509
CD                                                                      TUBIN     510
C                                                                       TUBIN     511
      ISUB=IUDSUB(I)                                                    TUBIN     512
      SNAME = SBLOGC(ISUB)                                              TUBIN     513
      NEXTI=IUNIPT(I)                                                   TUBIN     514
      NEXTP=IUDPPT(I)                                                   TUBIN     515
C                                                                       TUBIN     516
C          EXPRESS AND   OR  FLIPFLOP NOT  XOR SWITCH                   TUBIN     517
      GOTO ( 500,  510, 510,   530,   510, 510, 540,                    TUBIN     518
C                                                                       TUBIN     519
C           TIMER COUNTER ZERO                                          TUBIN     520
     *       530,   500,  550 ) ISUB                                    TUBIN     521
C                                                                       TUBIN     522
 500  NUMSRC = 4                                                        TUBIN     523
      SEARCH(2) = 'LOGIC1 INPUT1:'                                      TUBIN     524
      SEARCH(3) = 'OPERATOR 1:'                                         TUBIN     525
      SEARCH(4) = 'LOGIC1 INPUT2:'                                      TUBIN     526
      GOTO 580                                                          TUBIN     527
C                                                                       TUBIN     528
 510  NUMSRC = 1                                                        TUBIN     529
      SEARCH(2) = 'INPUT:'                                              TUBIN     530
C                                                                       TUBIN     531
 520  IF(NEXTI.EQ.0.AND.NEXTP.EQ.0) GOTO 8000                           TUBIN     532
C                                                                       TUBIN     533
      NUMSRC=NUMSRC+1                                                   TUBIN     534
      SEARCH(NUMSRC)=SEARCH(2)                                          TUBIN     535
      CDATA(J)=UIDENT(NEXTI)                                            TUBIN     536
      IF(UIDENT(NEXTI).EQ.' ')THEN                                      TUBIN     537
         WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                        TUBIN     538
      END IF                                                            TUBIN     539
      NEXTI=IUDINX(NEXTI)                                               TUBIN     540
      NEXTP=IUDPNX(NEXTP)                                               TUBIN     541
C                                                                       TUBIN     542
      GOTO 520                                                          TUBIN     543
C                                                                       TUBIN     544
 530  NUMSRC = 7                                                        TUBIN     545
      SEARCH(2) = 'LOGIC1 INPUT1:'                                      TUBIN     546
      SEARCH(3) = 'OPERATOR 1:'                                         TUBIN     547
      SEARCH(4) = 'LOGIC1 INPUT2:'                                      TUBIN     548
      SEARCH(5) = 'LOGIC2 INPUT1:'                                      TUBIN     549
      SEARCH(6) = 'OPERATOR 2:'                                         TUBIN     550
      SEARCH(7) = 'LOGIC2 INPUT2:'                                      TUBIN     551
      GOTO 580                                                          TUBIN     552
C                                                                       TUBIN     553
 540  NUMSRC = 9                                                        TUBIN     554
      SEARCH(2) = 'INPUT 1:'                                            TUBIN     555
      SEARCH(3) = 'LOGIC1 INPUT1:'                                      TUBIN     556
      SEARCH(4) = 'OPERATOR 1:'                                         TUBIN     557
      SEARCH(5) = 'LOGIC1 INPUT2:'                                      TUBIN     558
      SEARCH(6) = 'INPUT 2:'                                            TUBIN     559
      SEARCH(7) = 'LOGIC2 INPUT1:'                                      TUBIN     560
      SEARCH(8) = 'OPERATOR 2:'                                         TUBIN     561
      SEARCH(9) = 'LOGIC2 INPUT2:'                                      TUBIN     562
      GOTO 580                                                          TUBIN     563
C                                                                       TUBIN     564
 550  NUMSRC = 4                                                        TUBIN     565
      SEARCH(2) = 'INPUT BLOCK:'                                        TUBIN     566
      SEARCH(3) = 'DESIRED TIME:'                                       TUBIN     567
      SEARCH(4) = 'TIME STEP:'                                          TUBIN     568
C                                                                       TUBIN     569
 580  NEXTR=IUDRPT(I)                                                   TUBIN     570
C                                                                       TUBIN     571
      DO 590 J = 2, NUMSRC                                              TUBIN     572
C                                                                       TUBIN     573
         IF(SEARCH(J).EQ.'LOGIC1 INPUT1:' .OR.                          TUBIN     574
     1      SEARCH(J).EQ.'LOGIC2 INPUT1:')THEN                          TUBIN     575
C                                                                       TUBIN     576
            IF(UDBLK1(NEXTR).EQ.' ')THEN                                TUBIN     577
               WRITE(CDATA(J),'(F15.6)')UDPRM1(NEXTR)                   TUBIN     578
            ELSE                                                        TUBIN     579
               CDATA(J)=UDBLK1(NEXTR)                                   TUBIN     580
            END IF                                                      TUBIN     581
C                                                                       TUBIN     582
         ELSEIF(SEARCH(J).EQ.'LOGIC1 INPUT2:' .OR.                      TUBIN     583
     1          SEARCH(J).EQ.'LOGIC2 INPUT2:')THEN                      TUBIN     584
C                                                                       TUBIN     585
            IF(UDBLK2(NEXTR).EQ.' ')THEN                                TUBIN     586
               WRITE(CDATA(J),'(F15.6)')UDPRM2(NEXTR)                   TUBIN     587
            ELSE                                                        TUBIN     588
               CDATA(J)=UDBLK2(NEXTR)                                   TUBIN     589
            END IF                                                      TUBIN     590
            NEXTR=IUDRNX(NEXTR)                                         TUBIN     591
C                                                                       TUBIN     592
         ELSEIF(SEARCH(J).EQ.'OPERATOR 1:' .OR.                         TUBIN     593
     1          SEARCH(J).EQ.'OPERATOR 2:' .OR.                         TUBIN     594
     2          SEARCH(J).EQ.'OPERATOR:')THEN                           TUBIN     595
C                                                                       TUBIN     596
            CDATA(J)=UDRELA(NEXTR)                                      TUBIN     597
C                                                                       TUBIN     598
         ELSEIF(SEARCH(J).EQ.'INPUT 1:' .OR.                            TUBIN     599
     2          SEARCH(J).EQ.'INPUT 2:')THEN                            TUBIN     600
C                                                                       TUBIN     601
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN     602
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN     603
               WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                  TUBIN     604
            END IF                                                      TUBIN     605
            NEXTI=IUDINX(NEXTI)                                         TUBIN     606
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     607
C                                                                       TUBIN     608
         ELSEIF(SEARCH(J).EQ.'INPUT BLOCK:')THEN                        TUBIN     609
C                                                                       TUBIN     610
            CDATA(J)=UIDENT(NEXTI)                                      TUBIN     611
            NEXTI=IUDINX(NEXTI)                                         TUBIN     612
C                                                                       TUBIN     613
         ELSEIF(SEARCH(J).EQ.'DESIRED TIME:' .OR.                       TUBIN     614
     1          SEARCH(J).EQ.'TIME STEP:')THEN                          TUBIN     615
C                                                                       TUBIN     616
            WRITE(CDATA(J),'(F15.6)')UDPARM(NEXTP)                      TUBIN     617
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     618
C                                                                       TUBIN     619
         END IF                                                         TUBIN     620
590   CONTINUE                                                          TUBIN     621
C                                                                       TUBIN     622
      GOTO 8000                                                         TUBIN     623
C                                                                       TUBIN     624
C  --------------------------------------------------                   TUBIN     625
C                                                                       TUBIN     626
      ENTRY TUMLTP(IUX,I)                                               TUBIN     627
CD                                                                      TUBIN     628
CD     THIS IS THE MULTIPLE BLOCK                                       TUBIN     629
CD                                                                      TUBIN     630
C                                                                       TUBIN     631
      ISUB=IUDSUB(I)                                                    TUBIN     632
      SNAME = SBMLTP(ISUB)                                              TUBIN     633
C                                                                       TUBIN     634
      JREPEA = 1                                                        TUBIN     635
      SEARCH(2) = 'INPUT:'                                              TUBIN     636
C                                                                       TUBIN     637
      IF(ISUB.EQ.4)THEN                                                 TUBIN     638
         JREPEA = 2                                                     TUBIN     639
         SEARCH(3) = 'GAIN:'                                            TUBIN     640
      END IF                                                            TUBIN     641
C                                                                       TUBIN     642
      NUMSRC=1                                                          TUBIN     643
      NEXTI=IUNIPT(I)                                                   TUBIN     644
      NEXTP=IUDPPT(I)                                                   TUBIN     645
C                                                                       TUBIN     646
 600  IF(NEXTI.EQ.0.AND.NEXTP.EQ.0) GOTO 8000                           TUBIN     647
C                                                                       TUBIN     648
      NUMSRC=NUMSRC+1                                                   TUBIN     649
      K=NUMSRC-JREPEA*(NUMSRC/JREPEA)+2                                 TUBIN     650
      SEARCH(NUMSRC)=SEARCH(K)                                          TUBIN     651
C                                                                       TUBIN     652
      WRITE(CDATA(NUMSRC),'(F15.6)')UDPARM(NEXTP)                       TUBIN     653
      NEXTP=IUDPNX(NEXTP)                                               TUBIN     654
      IF(SEARCH(NUMSRC).EQ.'INPUT:')THEN                                TUBIN     655
C                                                                       TUBIN     656
         IF(UIDENT(NEXTI).NE.' ') CDATA(NUMSRC)=UIDENT(NEXTI)           TUBIN     657
         NEXTI=IUDINX(NEXTI)                                            TUBIN     658
C                                                                       TUBIN     659
      ENDIF                                                             TUBIN     660
C                                                                       TUBIN     661
      GOTO 600                                                          TUBIN     662
C                                                                       TUBIN     663
C  ----------------------------------------------------------           TUBIN     664
C                                                                       TUBIN     665
      ENTRY TUOTHR(IUX,I)                                               TUBIN     666
CD                                                                      TUBIN     667
CD     THIS IS THE OTHER BLOCK                                          TUBIN     668
CD                                                                      TUBIN     669
C                                                                       TUBIN     670
      ISUB=IUDSUB(I)                                                    TUBIN     671
      SNAME = SBOTHR(ISUB)                                              TUBIN     672
C                                                                       TUBIN     673
C           DIGIT DELAY LINEDC  TAP  BRIGE  RLC  LEVEL                  TUBIN     674
      GOTO ( 700,  710,  720,   730,  740,  750,  760,                  TUBIN     675
C                                                                       TUBIN     676
C           HYSTER DEADB1 DEADB2 SAMPLE RAMPER                          TUBIN     677
     *       770,   780,   790,   800,   810  ) ISUB                    TUBIN     678
C                                                                       TUBIN     679
 700  NUMSRC = 3                                                        TUBIN     680
      SEARCH(2) = 'INPUT:'                                              TUBIN     681
      SEARCH(3) = 'QUANTUM:'                                            TUBIN     682
      GOTO 880                                                          TUBIN     683
C                                                                       TUBIN     684
 710  NUMSRC = 3                                                        TUBIN     685
      SEARCH(2) = 'INPUT:'                                              TUBIN     686
      SEARCH(3) = 'DELAY TIME:'                                         TUBIN     687
      GOTO 880                                                          TUBIN     688
C                                                                       TUBIN     689
 720  NUMSRC = 11                                                       TUBIN     690
      LOOK = 'DC LINE'                                                  TUBIN     691
      SEARCH(2) = 'LOGIC1 INPUT1:'                                      TUBIN     692
      SEARCH(3) = 'OPERATOR 1:'                                         TUBIN     693
      SEARCH(4) = 'LOGIC1 INPUT2:'                                      TUBIN     694
      SEARCH(5) = 'DC NODE NAME 1:'                                     TUBIN     695
      SEARCH(6) = 'DC NODE NAME 2:'                                     TUBIN     696
      SEARCH(7) = 'CIRCUIT NUMBER:'                                     TUBIN     697
      SEARCH(8) = 'R1:'                                                 TUBIN     698
      SEARCH(9) = 'L1:'                                                 TUBIN     699
      SEARCH(10) = 'CA1:'                                               TUBIN     700
      SEARCH(11) = 'CB1:'                                               TUBIN     701
      GOTO 880                                                          TUBIN     702
C                                                                       TUBIN     703
 730  NUMSRC = 12                                                       TUBIN     704
      LOOK = 'DC CONVERTER:'                                            TUBIN     705
      SEARCH(2) = 'INPUT:'                                              TUBIN     706
      SEARCH(3) = 'DC NODE NAME 1:'                                     TUBIN     707
      SEARCH(4) = 'DC NODE NAME 2:'                                     TUBIN     708
      SEARCH(5) = 'AC BUS:'                                             TUBIN     709
      SEARCH(6) = 'KV:'                                                 TUBIN     710
      SEARCH(7) = 'CIRCUIT NUMBER:'                                     TUBIN     711
      SEARCH(8) = 'LOW LIMIT:'                                          TUBIN     712
      SEARCH(9) = 'TIME 1:'                                             TUBIN     713
      SEARCH(10) = 'HIGH LIMIT:'                                        TUBIN     714
      SEARCH(11) = 'TIME 2:'                                            TUBIN     715
      SEARCH(12) = 'TAP STEP:'                                          TUBIN     716
      GOTO 880                                                          TUBIN     717
C                                                                       TUBIN     718
 740  NUMSRC = 10                                                       TUBIN     719
      LOOK = 'DC CONVERTER'                                             TUBIN     720
      SEARCH(2) = 'LOGIC1 INPUT1:'                                      TUBIN     721
      SEARCH(3) = 'OPERATOR 1:'                                         TUBIN     722
      SEARCH(4) = 'LOGIC1 INPUT2:'                                      TUBIN     723
      SEARCH(5) = 'DC NODE NAME 1:'                                     TUBIN     724
      SEARCH(6) = 'DC NODE NAME 2:'                                     TUBIN     725
      SEARCH(7) = 'AC BUS:'                                             TUBIN     726
      SEARCH(8) = 'KV:'                                                 TUBIN     727
      SEARCH(9) = 'CIRCUIT NUMBER:'                                     TUBIN     728
      SEARCH(10) = 'BRIDGE:'                                            TUBIN     729
      GOTO 880                                                          TUBIN     730
C                                                                       TUBIN     731
 750  NUMSRC = 8                                                        TUBIN     732
      LOOK = 'DC LINE'                                                  TUBIN     733
      SEARCH(2) = 'DC NODE NAME 1:'                                     TUBIN     734
      SEARCH(3) = 'DC NODE NAME 2:'                                     TUBIN     735
      SEARCH(4) = 'CIRCUIT NUMBER:'                                     TUBIN     736
      SEARCH(5) = 'R1:'                                                 TUBIN     737
      SEARCH(6) = 'L1:'                                                 TUBIN     738
      SEARCH(7) = 'CA1:'                                                TUBIN     739
      SEARCH(8) = 'CB1:'                                                TUBIN     740
      GOTO 880                                                          TUBIN     741
C                                                                       TUBIN     742
 760  NUMSRC = 8                                                        TUBIN     743
      SEARCH(2) = 'LOGIC1 INPUT1:'                                      TUBIN     744
      SEARCH(3) = 'OPERATOR 1:'                                         TUBIN     745
      SEARCH(4) = 'LOGIC1 INPUT2:'                                      TUBIN     746
      SEARCH(5) = 'START VALUE:'                                        TUBIN     747
      SEARCH(6) = 'FINISH VALUE:'                                       TUBIN     748
      SEARCH(7) = 'DURATION:'                                           TUBIN     749
      SEARCH(8) = 'RESET TIME:'                                         TUBIN     750
      GOTO 880                                                          TUBIN     751
C                                                                       TUBIN     752
 770  NUMSRC = 9                                                        TUBIN     753
      SEARCH(2) = 'INPUT:'                                              TUBIN     754
      SEARCH(3) = 'LEVEL A:'                                            TUBIN     755
      SEARCH(4) = 'LEVEL B:'                                            TUBIN     756
      SEARCH(5) = 'P1:'                                                 TUBIN     757
      SEARCH(6) = 'P2:'                                                 TUBIN     758
      SEARCH(7) = 'P3:'                                                 TUBIN     759
      SEARCH(8) = 'P4:'                                                 TUBIN     760
      SEARCH(9) = 'INITIAL PATH:'                                       TUBIN     761
      GOTO 880                                                          TUBIN     762
C                                                                       TUBIN     763
 780  NUMSRC = 6                                                        TUBIN     764
      SEARCH(2) = 'INPUT:'                                              TUBIN     765
      SEARCH(3) = 'DBP:'                                                TUBIN     766
      SEARCH(4) = 'OUTP:'                                               TUBIN     767
      SEARCH(5) = 'DBN:'                                                TUBIN     768
      SEARCH(6) = 'OUTN:'                                               TUBIN     769
      GOTO 880                                                          TUBIN     770
C                                                                       TUBIN     771
 790  NUMSRC = 6                                                        TUBIN     772
      SEARCH(2) = 'INPUT:'                                              TUBIN     773
      SEARCH(3) = 'DBP:'                                                TUBIN     774
      SEARCH(4) = 'SLOPE P:'                                            TUBIN     775
      SEARCH(5) = 'DBN:'                                                TUBIN     776
      SEARCH(6) = 'SLOPE N:'                                            TUBIN     777
      GOTO 880                                                          TUBIN     778
C                                                                       TUBIN     779
 800  NUMSRC = 9                                                        TUBIN     780
      SEARCH(2) = 'INPUT 1:'                                            TUBIN     781
      SEARCH(3) = 'INPUT 2:'                                            TUBIN     782
      SEARCH(4) = 'LOGIC1 INPUT1:'                                      TUBIN     783
      SEARCH(5) = 'OPERATOR 1:'                                         TUBIN     784
      SEARCH(6) = 'LOGIC1 INPUT2:'                                      TUBIN     785
      SEARCH(7) = 'LOGIC2 INPUT1:'                                      TUBIN     786
      SEARCH(8) = 'OPERATOR 2:'                                         TUBIN     787
      SEARCH(9) = 'LOGIC2 INPUT2:'                                      TUBIN     788
      GOTO 880                                                          TUBIN     789
C                                                                       TUBIN     790
 810  NUMSRC = 17                                                       TUBIN     791
      SEARCH(2) = 'LOGIC1 INPUT1:'                                      TUBIN     792
      SEARCH(3) = 'OPERATOR 1:'                                         TUBIN     793
      SEARCH(4) = 'LOGIC1 INPUT2:'                                      TUBIN     794
      SEARCH(5) = 'LOGIC2 INPUT1:'                                      TUBIN     795
      SEARCH(6) = 'OPERATOR 2:'                                         TUBIN     796
      SEARCH(7) = 'LOGIC2 INPUT2:'                                      TUBIN     797
      SEARCH(8) = 'LEVEL 0:'                                            TUBIN     798
      SEARCH(9) = 'LEVEL 1:'                                            TUBIN     799
      SEARCH(10) = 'TIMER1:'                                            TUBIN     800
      SEARCH(11) = 'LEVEL 2:'                                           TUBIN     801
      SEARCH(12) = 'TIMER2:'                                            TUBIN     802
      SEARCH(13) = 'LEVEL 3:'                                           TUBIN     803
      SEARCH(14) = 'LEVEL 4:'                                           TUBIN     804
      SEARCH(15) = 'TIMER4:'                                            TUBIN     805
      SEARCH(16) = 'LEVEL 5:'                                           TUBIN     806
      SEARCH(17) = 'TIMER5:'                                            TUBIN     807
C                                                                       TUBIN     808
 880  NEXTR=IUDRPT(I)                                                   TUBIN     809
      NEXTI=IUNIPT(I)                                                   TUBIN     810
      NEXTP=IUDPPT(I)                                                   TUBIN     811
C                                                                       TUBIN     812
      DO 890 J = 2, NUMSRC                                              TUBIN     813
C                                                                       TUBIN     814
         IF(SEARCH(J).EQ.'LOGIC1 INPUT1:'.OR.                           TUBIN     815
     1      SEARCH(J).EQ.'LOGIC2 INPUT1:')THEN                          TUBIN     816
C                                                                       TUBIN     817
            CDATA(J)=UDBLK1(NEXTR)                                      TUBIN     818
            IF(UDBLK1(NEXTR).EQ.' ')THEN                                TUBIN     819
               WRITE (CDATA(J),'(F15.6)') UDPRM1(NEXTR)                 TUBIN     820
            END IF                                                      TUBIN     821
C                                                                       TUBIN     822
         ELSEIF(SEARCH(J).EQ.'LOGIC1 INPUT2:'.OR.                       TUBIN     823
     1          SEARCH(J).EQ.'LOGIC2 INPUT2:')THEN                      TUBIN     824
C                                                                       TUBIN     825
            CDATA(J)=UDBLK2(NEXTR)                                      TUBIN     826
            IF(UDBLK2(NEXTR).EQ.' ')THEN                                TUBIN     827
               WRITE (CDATA(J),'(F15.6)') UDPRM2(NEXTR)                 TUBIN     828
            END IF                                                      TUBIN     829
            NEXTR=IUDRNX(NEXTR)                                         TUBIN     830
C                                                                       TUBIN     831
         ELSEIF(SEARCH(J).EQ.'OPERATOR 1:'.OR.                          TUBIN     832
     1          SEARCH(J).EQ.'OPERATOR 2:')THEN                         TUBIN     833
C                                                                       TUBIN     834
            CDATA(J)=UDRELA(NEXTR)                                      TUBIN     835
C                                                                       TUBIN     836
         ELSEIF(SEARCH(J).EQ.'DC NODE NAME 1:')THEN                     TUBIN     837
            JSTORE=IUDINT(NEXTI)                                        TUBIN     838
            IF(LOOK.EQ.'DC CONVERTER')THEN                              TUBIN     839
               DCCONV=DCCNAM(JSTORE)                                    TUBIN     840
               CDATA(J)=DCCONV(1:8)                                     TUBIN     841
            ELSE                                                        TUBIN     842
               DCLINE=DCLNAM(JSTORE)                                    TUBIN     843
               CDATA(J)=DCLINE(1:8)                                     TUBIN     844
            END IF                                                      TUBIN     845
            NEXTI=IUDINX(NEXTI)                                         TUBIN     846
C                                                                       TUBIN     847
         ELSEIF(SEARCH(J).EQ.'DC NODE NAME 2:')THEN                     TUBIN     848
            IF(LOOK.EQ.'DC CONVERTER')THEN                              TUBIN     849
               CDATA(J)=DCCONV(9:16)                                    TUBIN     850
            ELSE                                                        TUBIN     851
               CDATA(J)=DCLINE(9:16)                                    TUBIN     852
            END IF                                                      TUBIN     853
C                                                                       TUBIN     854
         ELSEIF(SEARCH(J).EQ.'AC BUS:')THEN                             TUBIN     855
            CDATA(J)=DCCONV(17:24)                                      TUBIN     856
C                                                                       TUBIN     857
         ELSEIF(SEARCH(J).EQ.'KV:')THEN                                 TUBIN     858
            CDATA(J)=DCCONV(25:28)                                      TUBIN     859
C                                                                       TUBIN     860
         ELSEIF(SEARCH(J).EQ.'CIRCUIT NUMBER:')THEN                     TUBIN     861
            IF(LOOK.EQ.'DC CONVERTER')THEN                              TUBIN     862
               CDATA(J)=DCCONV(29:29)                                   TUBIN     863
            ELSE                                                        TUBIN     864
               CDATA(J)=DCLINE(17:17)                                   TUBIN     865
            ENDIF                                                       TUBIN     866
C                                                                       TUBIN     867
         ELSEIF(SEARCH(J).EQ.'LEVEL 0:'.OR.                             TUBIN     868
     *          SEARCH(J).EQ.'LEVEL 1:'.OR.                             TUBIN     869
     *          SEARCH(J).EQ.'LEVEL 2:'.OR.                             TUBIN     870
     *          SEARCH(J).EQ.'LEVEL 3:'.OR.                             TUBIN     871
     *          SEARCH(J).EQ.'LEVEL 4:'.OR.                             TUBIN     872
     *          SEARCH(J).EQ.'LEVEL 5:'.OR.                             TUBIN     873
     *          SEARCH(J).EQ.'TIMER1:'.OR.                              TUBIN     874
     *          SEARCH(J).EQ.'TIMER2:'.OR.                              TUBIN     875
     *          SEARCH(J).EQ.'TIMER4:'.OR.                              TUBIN     876
     *          SEARCH(J).EQ.'TIMER5:'.OR.                              TUBIN     877
     *          SEARCH(J).EQ.'INPUT:'.OR.                               TUBIN     878
     *          SEARCH(J).EQ.'INPUT 1:'.OR.                             TUBIN     879
     *          SEARCH(J).EQ.'INPUT 2:'.OR.                             TUBIN     880
     *          SEARCH(J).EQ.'R1:'.OR.                                  TUBIN     881
     *          SEARCH(J).EQ.'DELAY TIME:')THEN                         TUBIN     882
C                                                                       TUBIN     883
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN     884
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN     885
                WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                 TUBIN     886
            END IF                                                      TUBIN     887
            NEXTI=IUDINX(NEXTI)                                         TUBIN     888
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     889
C                                                                       TUBIN     890
         ELSE                                                           TUBIN     891
C                                                                       TUBIN     892
            WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                     TUBIN     893
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     894
C                                                                       TUBIN     895
         END IF                                                         TUBIN     896
C                                                                       TUBIN     897
890   CONTINUE                                                          TUBIN     898
C                                                                       TUBIN     899
      GOTO 8000                                                         TUBIN     900
C                                                                       TUBIN     901
C  ------------------------------------------------------               TUBIN     902
C                                                                       TUBIN     903
      ENTRY TUSBLK(IUX,I)                                               TUBIN     904
CD                                                                      TUBIN     905
CD     THIS IS THE S-BLOCK                                              TUBIN     906
CD                                                                      TUBIN     907
C                                                                       TUBIN     908
      ISUB=IUDSUB(I)                                                    TUBIN     909
      SNAME = SBSBLK(ISUB)                                              TUBIN     910
      NEXTI=IUNIPT(I)                                                   TUBIN     911
      NEXTP=IUDPPT(I)                                                   TUBIN     912
C                                                                       TUBIN     913
      NUMSRC = 3                                                        TUBIN     914
      SEARCH(2) = 'INPUT BLOCK:'                                        TUBIN     915
      IF(ISUB.EQ.1)THEN                                                 TUBIN     916
         NUMSRC = 5                                                     TUBIN     917
         SEARCH(3) = 'LOW LIMIT:'                                       TUBIN     918
         SEARCH(4) = 'HIGH LIMIT:'                                      TUBIN     919
      ENDIF                                                             TUBIN     920
      SEARCH(NUMSRC) = 'NUMBER:'                                        TUBIN     921
      SEARCH(NUMSRC+1) = 'PARAMETER:'                                   TUBIN     922
C                                                                       TUBIN     923
      DO 900 J = 2, NUMSRC                                              TUBIN     924
C                                                                       TUBIN     925
         IF(SEARCH(J).EQ.'INPUT BLOCK:')THEN                            TUBIN     926
C                                                                       TUBIN     927
            CDATA(J)=UIDENT(NEXTI)                                      TUBIN     928
            NEXTI=IUDINX(NEXTI)                                         TUBIN     929
C                                                                       TUBIN     930
         ELSEIF(SEARCH(J).EQ.'NUMBER:')THEN                             TUBIN     931
C                                                                       TUBIN     932
            WRITE(CDATA(J),'(I10)') IUDINT(NEXTI)                       TUBIN     933
            NEXTI=IUDINX(NEXTI)                                         TUBIN     934
C                                                                       TUBIN     935
         ELSEIF(SEARCH(J).EQ.'LOW LIMIT:' .OR.                          TUBIN     936
     1          SEARCH(J).EQ.'HIGH LIMIT:')THEN                         TUBIN     937
C                                                                       TUBIN     938
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN     939
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN     940
                WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                 TUBIN     941
            END IF                                                      TUBIN     942
            NEXTI=IUDINX(NEXTI)                                         TUBIN     943
            NEXTP=IUDPNX(NEXTP)                                         TUBIN     944
C                                                                       TUBIN     945
         ENDIF                                                          TUBIN     946
900   CONTINUE                                                          TUBIN     947
C                                                                       TUBIN     948
 950  IF(NEXTP.EQ.0) GOTO 8000                                          TUBIN     949
C                                                                       TUBIN     950
      NUMSRC=NUMSRC+1                                                   TUBIN     951
      SEARCH(NUMSRC+1)=SEARCH(NUMSRC)                                   TUBIN     952
      WRITE(CDATA(NUMSRC),'(F15.6)')UDPARM(NEXTP)                       TUBIN     953
      NEXTP=IUDPNX(NEXTP)                                               TUBIN     954
C                                                                       TUBIN     955
      GOTO 950                                                          TUBIN     956
C                                                                       TUBIN     957
C  ----------------------------------------------------                 TUBIN     958
C                                                                       TUBIN     959
      ENTRY TUSETP(IUX,I)                                               TUBIN     960
CD                                                                      TUBIN     961
CD     THIS IS THE SETUP BLOCK                                          TUBIN     962
CD                                                                      TUBIN     963
C                                                                       TUBIN     964
      ISUB=IUDSUB(I)                                                    TUBIN     965
      SNAME = SBSETP(ISUB)                                              TUBIN     966
C                                                                       TUBIN     967
C           START VALUE OFFSET INTEG LINTEG                             TUBIN     968
      GOTO ( 1000, 1010,  1020, 1030,  1040 ) ISUB                      TUBIN     969
C                                                                       TUBIN     970
1000  NUMSRC = 3                                                        TUBIN     971
      SEARCH(2) = 'DESTINATION:'                                        TUBIN     972
      SEARCH(3) = 'VALUE:'                                              TUBIN     973
      GOTO 1080                                                         TUBIN     974
C                                                                       TUBIN     975
1010  NUMSRC = 2                                                        TUBIN     976
      SEARCH(2) = 'INITIAL:'                                            TUBIN     977
      GOTO 1080                                                         TUBIN     978
C                                                                       TUBIN     979
1020  NUMSRC = 3                                                        TUBIN     980
      SEARCH(2) = 'INITIAL:'                                            TUBIN     981
      SEARCH(3) = 'INPUT:'                                              TUBIN     982
      GOTO 1080                                                         TUBIN     983
C                                                                       TUBIN     984
1030  NUMSRC = 4                                                        TUBIN     985
      SEARCH(2) = 'INITIAL:'                                            TUBIN     986
      SEARCH(3) = 'INPUT:'                                              TUBIN     987
      SEARCH(4) = 'GAIN:'                                               TUBIN     988
      GOTO 1080                                                         TUBIN     989
C                                                                       TUBIN     990
1040  NUMSRC = 6                                                        TUBIN     991
      SEARCH(2) = 'INITIAL:'                                            TUBIN     992
      SEARCH(3) = 'INPUT:'                                              TUBIN     993
      SEARCH(4) = 'GAIN:'                                               TUBIN     994
      SEARCH(5) = 'LOW LIMIT:'                                          TUBIN     995
      SEARCH(6) = 'HIGH LIMIT:'                                         TUBIN     996
C                                                                       TUBIN     997
1080  NEXTI=IUNIPT(I)                                                   TUBIN     998
      NEXTP=IUDPPT(I)                                                   TUBIN     999
C                                                                       TUBIN    1000
      DO 1090 J = 2, NUMSRC                                             TUBIN    1001
C                                                                       TUBIN    1002
         IF(SEARCH(J).EQ.'INITIAL:' .OR.                                TUBIN    1003
     1         SEARCH(J).EQ.'LOW LIMIT:' .OR.                           TUBIN    1004
     2         SEARCH(J).EQ.'HIGH LIMIT:')THEN                          TUBIN    1005
C                                                                       TUBIN    1006
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN    1007
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN    1008
                WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                 TUBIN    1009
            END IF                                                      TUBIN    1010
            NEXTI=IUDINX(NEXTI)                                         TUBIN    1011
            NEXTP=IUDPNX(NEXTP)                                         TUBIN    1012
C                                                                       TUBIN    1013
         ELSEIF(SEARCH(J).EQ.'INPUT:' .OR.                              TUBIN    1014
     1               SEARCH(J).EQ.'DESTINATION:')THEN                   TUBIN    1015
C                                                                       TUBIN    1016
            CDATA(J)=UIDENT(NEXTI)                                      TUBIN    1017
            NEXTI=IUDINX(NEXTI)                                         TUBIN    1018
C                                                                       TUBIN    1019
         ELSEIF(SEARCH(J).EQ.'GAIN:')THEN                               TUBIN    1020
C                                                                       TUBIN    1021
            WRITE(CDATA(J),'(F15.6)')UDPARM(NEXTP)                      TUBIN    1022
            NEXTP=IUDPNX(NEXTP)                                         TUBIN    1023
C                                                                       TUBIN    1024
         END IF                                                         TUBIN    1025
1090  CONTINUE                                                          TUBIN    1026
C                                                                       TUBIN    1027
      GOTO 8000                                                         TUBIN    1028
C                                                                       TUBIN    1029
C  -----------------------------------------------------                TUBIN    1030
C                                                                       TUBIN    1031
      ENTRY TUSRCE(IUX,I)                                               TUBIN    1032
CD                                                                      TUBIN    1033
CD     THIS IS THE SOURCE BLOCK                                         TUBIN    1034
CD                                                                      TUBIN    1035
C                                                                       TUBIN    1036
      ISUB=IUDSUB(I)                                                    TUBIN    1037
      SNAME = SBSRCE(ISUB)                                              TUBIN    1038
      NEXTP=IUDPPT(I)                                                   TUBIN    1039
      NUMSRC = 0                                                        TUBIN    1040
      J=2                                                               TUBIN    1041
C                                                                       TUBIN    1042
C             DC  SIN  RAMP                                             TUBIN    1043
      GOTO ( 1100, 1110,  1120 ) ISUB                                   TUBIN    1044
C                                                                       TUBIN    1045
      GOTO 8000                                                         TUBIN    1046
C                                                                       TUBIN    1047
1100  NUMSRC = 3                                                        TUBIN    1048
      SEARCH(2) = 'AMPLITUDE:'                                          TUBIN    1049
      SEARCH(3) = 'START TIME:'                                         TUBIN    1050
      GOTO 1140                                                         TUBIN    1051
C                                                                       TUBIN    1052
1110  NUMSRC = 5                                                        TUBIN    1053
      SEARCH(2) = 'AMPLITUDE:'                                          TUBIN    1054
      SEARCH(3) = 'FREQUENCY:'                                          TUBIN    1055
      SEARCH(4) = 'PHASE:'                                              TUBIN    1056
      SEARCH(5) = 'START TIME:'                                         TUBIN    1057
      GOTO 1140                                                         TUBIN    1058
C                                                                       TUBIN    1059
1120  NUMSRC = 3                                                        TUBIN    1060
      SEARCH(2) = 'RAMP RATE:'                                          TUBIN    1061
      SEARCH(3) = 'START TIME:'                                         TUBIN    1062
C                                                                       TUBIN    1063
1140  IF(J.GT.NUMSRC) GOTO 8000                                         TUBIN    1064
C                                                                       TUBIN    1065
      WRITE(CDATA(J),'(F15.6)')UDPARM(NEXTP)                            TUBIN    1066
      NEXTP=IUDPNX(NEXTP)                                               TUBIN    1067
      J=J+1                                                             TUBIN    1068
      GOTO 1140                                                         TUBIN    1069
C                                                                       TUBIN    1070
C  ----------------------------------------------------                 TUBIN    1071
C                                                                       TUBIN    1072
      ENTRY TUSUBS(IUX,I)                                               TUBIN    1073
CD                                                                      TUBIN    1074
CD     THIS IS THE SUBSYSTEM BLOCK                                      TUBIN    1075
CD                                                                      TUBIN    1076
C                                                                       TUBIN    1077
      ISUB=IUDSUB(I)                                                    TUBIN    1078
      SNAME = SBSUBS(ISUB)                                              TUBIN    1079
      NEXTI=IUNIPT(I)                                                   TUBIN    1080
      NEXTP=IUDPPT(I)                                                   TUBIN    1081
C                                                                       TUBIN    1082
C          VALUE OFFSET BREAK INTEG LINTEG                              TUBIN    1083
      GOTO (1210, 1220, 1230, 1240,  1250 ) ISUB                        TUBIN    1084
C                                                                       TUBIN    1085
1210  NUMSRC = 8                                                        TUBIN    1086
      SEARCH(2) = 'INITIAL:'                                            TUBIN    1087
      SEARCH(3) = 'INCREMENT:'                                          TUBIN    1088
      SEARCH(4) = 'TOLERANCE:'                                          TUBIN    1089
      SEARCH(5) = 'EBLOCK:'                                             TUBIN    1090
      SEARCH(6) = 'OUT NUMBER:'                                         TUBIN    1091
      SEARCH(7) = 'LOW LIMIT:'                                          TUBIN    1092
      SEARCH(8) = 'HIGH LIMIT:'                                         TUBIN    1093
      GOTO 1260                                                         TUBIN    1094
C                                                                       TUBIN    1095
1220  NUMSRC = 9                                                        TUBIN    1096
      SEARCH(2) = 'INITIAL:'                                            TUBIN    1097
      SEARCH(3) = 'INPUT:'                                              TUBIN    1098
      SEARCH(4) = 'INCREMENT:'                                          TUBIN    1099
      SEARCH(5) = 'TOLERANCE:'                                          TUBIN    1100
      SEARCH(6) = 'EBLOCK:'                                             TUBIN    1101
      SEARCH(7) = 'OUT NUMBER:'                                         TUBIN    1102
      SEARCH(8) = 'LOW LIMIT:'                                          TUBIN    1103
      SEARCH(9) = 'HIGH LIMIT:'                                         TUBIN    1104
      GOTO 1260                                                         TUBIN    1105
C                                                                       TUBIN    1106
1230  NUMSRC = 3                                                        TUBIN    1107
      SEARCH(2) = 'INPUT:'                                              TUBIN    1108
      SEARCH(3) = 'EXPECTED:'                                           TUBIN    1109
      GOTO 1260                                                         TUBIN    1110
C                                                                       TUBIN    1111
1240  NUMSRC = 10                                                       TUBIN    1112
      SEARCH(2) = 'INITIAL:'                                            TUBIN    1113
      SEARCH(3) = 'INPUT:'                                              TUBIN    1114
      SEARCH(4) = 'GAIN:'                                               TUBIN    1115
      SEARCH(5) = 'INCREMENT:'                                          TUBIN    1116
      SEARCH(6) = 'TOLERANCE:'                                          TUBIN    1117
      SEARCH(7) = 'EBLOCK:'                                             TUBIN    1118
      SEARCH(8) = 'OUT NUMBER:'                                         TUBIN    1119
      SEARCH(9) = 'LOW LIMIT:'                                          TUBIN    1120
      SEARCH(10) = 'HIGH LIMIT:'                                        TUBIN    1121
      GOTO 1260                                                         TUBIN    1122
C                                                                       TUBIN    1123
1250  NUMSRC = 12                                                       TUBIN    1124
      SEARCH(2) = 'INITIAL:'                                            TUBIN    1125
      SEARCH(3) = 'INPUT:'                                              TUBIN    1126
      SEARCH(4) = 'GAIN:'                                               TUBIN    1127
      SEARCH(5) = 'LIMITED LOW:'                                        TUBIN    1128
      SEARCH(6) = 'LIMITED HIGH:'                                       TUBIN    1129
      SEARCH(7) = 'INCREMENT:'                                          TUBIN    1130
      SEARCH(8) = 'TOLERANCE:'                                          TUBIN    1131
      SEARCH(9) = 'EBLOCK:'                                             TUBIN    1132
      SEARCH(10) = 'OUT NUMBER:'                                        TUBIN    1133
      SEARCH(11) = 'LOW LIMIT:'                                         TUBIN    1134
      SEARCH(12) = 'HIGH LIMIT:'                                        TUBIN    1135
C                                                                       TUBIN    1136
1260  CONTINUE                                                          TUBIN    1137
C                                                                       TUBIN    1138
      DO 1270 J = 2, NUMSRC                                             TUBIN    1139
C                                                                       TUBIN    1140
         IF(SEARCH(J).EQ.'INITIAL:' .OR.                                TUBIN    1141
     1         SEARCH(J).EQ.'EXPECTED:' .OR.                            TUBIN    1142
     2         SEARCH(J).EQ.'LIMITED LOW:' .OR.                         TUBIN    1143
     3         SEARCH(J).EQ.'LIMITED HIGH:')THEN                        TUBIN    1144
C                                                                       TUBIN    1145
            IF(NEXTI.NE.0) CDATA(J)=UIDENT(NEXTI)                       TUBIN    1146
            IF(CDATA(J).EQ.' '.AND.NEXTP.NE.0)THEN                      TUBIN    1147
                WRITE(CDATA(J),'(F15.6)') UDPARM(NEXTP)                 TUBIN    1148
            END IF                                                      TUBIN    1149
            NEXTI=IUDINX(NEXTI)                                         TUBIN    1150
            NEXTP=IUDPNX(NEXTP)                                         TUBIN    1151
C                                                                       TUBIN    1152
         ELSEIF(SEARCH(J).EQ.'INPUT:')THEN                              TUBIN    1153
C                                                                       TUBIN    1154
            CDATA(J)=UIDENT(NEXTI)                                      TUBIN    1155
            NEXTI=IUDINX(NEXTI)                                         TUBIN    1156
C                                                                       TUBIN    1157
         ELSEIF(SEARCH(J).EQ.'GAIN:')THEN                               TUBIN    1158
            WRITE(CDATA(J),'(F15.6)')UDPARM(NEXTP)                      TUBIN    1159
            NEXTP=IUDPNX(NEXTP)                                         TUBIN    1160
         ENDIF                                                          TUBIN    1161
C                                                                       TUBIN    1162
1270  CONTINUE                                                          TUBIN    1163
C                                                                       TUBIN    1164
      IF(ISUB.EQ.3) GOTO 8000                                           TUBIN    1165
C                                                                       TUBIN    1166
      DO 1280 K=1,IFXFRE                                                TUBIN    1167
         IF(FXNAM1(K).EQ.UDNAME(I))THEN                                 TUBIN    1168
            NEW=K                                                       TUBIN    1169
            GOTO 1290                                                   TUBIN    1170
         ENDIF                                                          TUBIN    1171
1280  CONTINUE                                                          TUBIN    1172
C                                                                       TUBIN    1173
1290  CDATA(NUMSRC-3)=FXNAM2(NEW)                                       TUBIN    1174
      WRITE(CDATA(NUMSRC-5),'(F15.6)')FXINCR(NEW)                       TUBIN    1175
      WRITE(CDATA(NUMSRC-4),'(F15.6)')FXTOL(NEW)                        TUBIN    1176
      WRITE(CDATA(NUMSRC-2),'(I10)')IFXOUT(NEW)                         TUBIN    1177
      WRITE(CDATA(NUMSRC-1),'(F15.6)')FXLOW(NEW)                        TUBIN    1178
      WRITE(CDATA(NUMSRC),'(F15.6)')FXHIGH(NEW)                         TUBIN    1179
C                                                                       TUBIN    1180
      GOTO 8000                                                         TUBIN    1181
C                                                                       TUBIN    1182
C  ---------------------------------------------------------            TUBIN    1183
C                                                                       TUBIN    1184
      ENTRY TUUNA(IUX,I)                                                TUBIN    1185
CD                                                                      TUBIN    1186
CD     THIS IS THE UNITARY BLOCK                                        TUBIN    1187
CD                                                                      TUBIN    1188
C                                                                       TUBIN    1189
      ISUB=IUDSUB(I)                                                    TUBIN    1190
      SNAME = SBUNA(ISUB)                                               TUBIN    1191
      NEXTI=IUNIPT(I)                                                   TUBIN    1192
      NEXTP=IUDPPT(I)                                                   TUBIN    1193
C                                                                       TUBIN    1194
      IF(ISUB.GE.1.AND.ISUB.LE.12)THEN                                  TUBIN    1195
         NUMSRC = 2                                                     TUBIN    1196
         SEARCH(2) = 'INPUT 1:'                                         TUBIN    1197
         IF(NEXTI.NE.0) CDATA(2)=UIDENT(NEXTI)                          TUBIN    1198
         IF(CDATA(2).EQ.' '.AND.NEXTP.NE.0)THEN                         TUBIN    1199
             WRITE(CDATA(2),'(F15.6)') UDPARM(NEXTP)                    TUBIN    1200
         END IF                                                         TUBIN    1201
      ELSE                                                              TUBIN    1202
C                                                                       TUBIN    1203
         NUMSRC = 2                                                     TUBIN    1204
         SEARCH(2) = 'INPUT BLOCK:'                                     TUBIN    1205
         CDATA(2)=UIDENT(NEXTI)                                         TUBIN    1206
C                                                                       TUBIN    1207
         SEARCH(3) = 'X:'                                               TUBIN    1208
         SEARCH(4) = 'Y:'                                               TUBIN    1209
C                                                                       TUBIN    1210
1410     IF (NEXTP.EQ.0) GOTO 8000                                      TUBIN    1211
C                                                                       TUBIN    1212
C        REPEAT PRINT X AND Y                                           TUBIN    1213
C                                                                       TUBIN    1214
         NUMSRC=NUMSRC+1                                                TUBIN    1215
         K=4-NUMSRC+2*(NUMSRC/2)                                        TUBIN    1216
         SEARCH(NUMSRC)=SEARCH(K)                                       TUBIN    1217
C                                                                       TUBIN    1218
         WRITE(CDATA(NUMSRC),'(F15.6)')UDPARM(NEXTP)                    TUBIN    1219
         NEXTP=IUDPNX(NEXTP)                                            TUBIN    1220
         GOTO 1410                                                      TUBIN    1221
C                                                                       TUBIN    1222
      END IF                                                            TUBIN    1223
C                                                                       TUBIN    1224
8000  CONTINUE                                                          TUBIN    1225
C                                                                       TUBIN    1226
      SEARCH(1)='PRINT FLAG:'                                           TUBIN    1227
      CDATA(1)='N'                                                      TUBIN    1228
      IF (UDPRNT(I)) CDATA(1)='P'                                       TUBIN    1229
C                                                                       TUBIN    1230
      TNAME = TPNAME(IUDTYP(I))                                         TUBIN    1231
      BNAME = UDNAME(I)                                                 TUBIN    1232
      LEN = IUDLEN(I)                                                   TUBIN    1233
      WRITE (IUX,9006) I,BNAME(1:LEN),TNAME,SNAME                       TUBIN    1234
C                                                                       TUBIN    1235
8050  DO 8600 J = 1, NUMSRC                                             TUBIN    1236
         WRITE (IUX,9016) SEARCH(J), CDATA(J)                           TUBIN    1237
         CDATA(J)=' '                                                   TUBIN    1238
8600  CONTINUE                                                          TUBIN    1239
C                                                                       TUBIN    1240
      RETURN                                                            TUBIN    1241
C                                                                       TUBIN    1242
9006  FORMAT (/, 1X, 'BLOCK #',I4,' NAME: ', A,                         TUBIN    1243
     1           10X, 'TYPE:     ', A, 10X, 'SUBTYPE:  ', A)            TUBIN    1244
9010  FORMAT (A,I2,':')                                                 TUBIN    1245
9016  FORMAT (5X, A, 5X, A)                                             TUBIN    1246
9020  FORMAT (/, 1X, 'BLOCK #',I4,' NAME: ', A,                         TUBIN    1247
     1          10X, 'TYPE:     ', A)                                   TUBIN    1248
C                                                                       TUBIN    1249
      END                                                               TUBIN    1250
