CFPRIME URBIN                                                           URBIN       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  URBIN                                                 URBIN       3
CD -------------------------------------------------------------------  URBIN       4
CD                                                                      URBIN       5
CD              *****     URBIN   ROUTINE   *****                       URBIN       6
CD                                                                      URBIN       7
CD -------------------------------------------------------------------  URBIN       8
CD                                                                      URBIN       9
CD       PURPOSE:  Controls the reading of the udc type BINARY data     URBIN      10
CD                 from the input file.  Does limited error checking.   URBIN      11
CD                 Stores valid data in the udc storage arrays.         URBIN      12
CD                                                                      URBIN      13
CD                                                                      URBIN      14
CD       DEFINITION OF LOCAL VARIABLES:                                 URBIN      15
CD                 BNAME  -  current udc block name.                    URBIN      16
CD                 CDATA  -  character input data.                      URBIN      17
CD                 DCOUNT -  checks if this block contains an error.    URBIN      18
CD                 DPRINT -  prints debug dump if block has an error.   URBIN      19
CD                 FOUND  -  search for data was successful.            URBIN      20
CD                 I      - 'do' loop index.                            URBIN      21
CD                 IDATA  -  integer input data.                        URBIN      22
CD                 LEN    -  length of current udc block name.          URBIN      23
CD                 N      - 'do' loop index.                            URBIN      24
CD                 RDATA  -  real input data.                           URBIN      25
CD                 REPEAT -  indicates number of inputs that may be     URBIN      26
CD                           repeated.                                  URBIN      27
CD                 SNAME  -  udc subtype name.                          URBIN      28
CD                 SUBNAM -  subroutine name.                           URBIN      29
CD                 TNAME  -  udc type name.                             URBIN      30
CD                                                                      URBIN      31
CD                                                                      URBIN      32
CD       SUBROUTINES REQUIRED:  ADDINT, ADDPRM, ADDSTR, URGETC, URREAD  URBIN      33
CD                                                                      URBIN      34
CD -------------------------------------------------------------------  URBIN      35
C                                                                       URBIN      36
      INCLUDE 'PARX.INS'                                                URBIN      37
      INCLUDE 'CNUNIT.INS'                                              URBIN      38
      INCLUDE 'UDCA.INS'                                                URBIN      39
      INCLUDE 'UDCD.INS'                                                URBIN      40
      INCLUDE 'UDCE.INS'                                                URBIN      41
      INCLUDE 'UDCH.INS'                                                URBIN      42
      INCLUDE 'UDCI.INS'                                                URBIN      43
      INCLUDE 'GRDC01.INS'                                              URBIN      44
      INCLUDE 'CNFLAG.INS'                                              URBIN      45
      INCLUDE 'CNMSG.INS'                                               URBIN      46
C                                                                       URBIN      47
      CHARACTER*72  CDATA(100), STRING, WORD                            URBIN      48
      CHARACTER*29  CONVDC, NAME                                        URBIN      49
      CHARACTER*25  NAME2                                               URBIN      50
      CHARACTER*20  SUBNAM                                              URBIN      51
      CHARACTER*17  BNAME, BRKRDC, LINEDC, LINEAC                       URBIN      52
      CHARACTER*15  LOOK(100)                                           URBIN      53
      CHARACTER*12  NAME1                                               URBIN      54
      CHARACTER*8   NODEDC, NODE1, NODE2, SNAME, TNAME, NODEAC          URBIN      55
      CHARACTER*4   CKV, CKV1, CKV2                                     URBIN      56
C                                                                       URBIN      57
      DIMENSION     RDATA(100),IDATA(100)                               URBIN      58
C                                                                       URBIN      59
      LOGICAL       DPRINT, FOUND, FOUND1, FOUND2, PRINT ,EXIST         URBIN      60
      LOGICAL       ABLK, CBLK, CHKSTR, FDINIT, FDPURP,                 URBIN      61
     1              GBLK, INDENT, INIT, KWORD, OPTNAL, PURPOS,          URBIN      62
     2              VBLK, FDPUR1,FDINI1                                 URBIN      63
C                                                                       URBIN      64
      INCLUDE 'GRBIN.INS'                                               URBIN      65
      INCLUDE 'GRFRAC.INS'                                              URBIN      66
      INCLUDE 'GRFRDC.INS'                                              URBIN      67
      INCLUDE 'GRMLTP.INS'                                              URBIN      68
      INCLUDE 'GRSBLK.INS'                                              URBIN      69
      INCLUDE 'GRSRCE.INS'                                              URBIN      70
C                                                                       URBIN      71
C---------------------------------------------------------------------  URBIN      72
C                                                                       URBIN      73
C     Define subroutine name.                                           URBIN      74
C                                                                       URBIN      75
      LDEB=(JDEB(301).NE.0)                                             URBIN      76
C                                                                       URBIN      77
      IF(SDBG)THEN                                                      URBIN      78
         SUBNAM = 'URBIN ROUTINE.'                                      URBIN      79
      ELSE                                                              URBIN      80
         SUBNAM = ' '                                                   URBIN      81
      ENDIF                                                             URBIN      82
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN      83
      BNAME = UDNAME(IUDC)                                              URBIN      84
      LEN = IUDLEN(IUDC)                                                URBIN      85
C                                                                       URBIN      86
C     Forces an interrupted card image if an error is found.            URBIN      87
C                                                                       URBIN      88
      JDCOUN = IERCNT                                                   URBIN      89
      DPRINT = .FALSE.                                                  URBIN      90
C                                                                       URBIN      91
      IF(EXPAND)THEN                                                    URBIN      92
C                                                                       URBIN      93
C        Obtain the subtype name from the saved information for this    URBIN      94
C        structure.                                                     URBIN      95
C                                                                       URBIN      96
         SNAME = SBBIN(IUDSUB(IUDC))                                    URBIN      97
C                                                                       URBIN      98
      ELSE                                                              URBIN      99
C                                                                       URBIN     100
C        Read the subtype name.                                         URBIN     101
C                                                                       URBIN     102
         ENDBLK = .FALSE.                                               URBIN     103
         CALL URGETC (CDATA(1), FOUND)                                  URBIN     104
         IF(.NOT. FOUND)THEN                                            URBIN     105
            SNAME = STARS                                               URBIN     106
         ELSE                                                           URBIN     107
            SNAME = CDATA(1)                                            URBIN     108
            IF(SNAME .NE. CDATA(1))THEN                                 URBIN     109
               WRITE(MSG(1),9000) SUBNAM                                URBIN     110
               WRITE(MSG(2),9001) TNAME                                 URBIN     111
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN     112
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN     113
               WRITE(MSG(5),9004) SNAME                                 URBIN     114
               WRITE(MSG(6),9005)                                       URBIN     115
               CALL PRTMSG(6)                                           URBIN     116
               IERCNT = IERCNT + 1                                      URBIN     117
            ENDIF                                                       URBIN     118
         ENDIF                                                          URBIN     119
      ENDIF                                                             URBIN     120
C                                                                       URBIN     121
C                                                                       URBIN     122
C---------------------------------------------------------------------  URBIN     123
C                                                                       URBIN     124
C     Determine the required data names and the number of searches      URBIN     125
C     required.                                                         URBIN     126
C                                                                       URBIN     127
C     Addition binary function.                                         URBIN     128
C                                                                       URBIN     129
      IF(SNAME.EQ.SBBIN(IPLUSS))THEN                                    URBIN     130
         IUDSUB(IUDC) = IPLUSS                                          URBIN     131
         NUMSRC = 3                                                     URBIN     132
         SEARCH(1) = 'PRINT FLAG'                                       URBIN     133
         SEARCH(2) = 'INPUT 1'                                          URBIN     134
         SEARCH(3) = 'INPUT 2'                                          URBIN     135
C                                                                       URBIN     136
C     Subtraction binary function.                                      URBIN     137
C                                                                       URBIN     138
      ELSEIF(SNAME.EQ.SBBIN(MINUSS))THEN                                URBIN     139
         IUDSUB(IUDC) = MINUSS                                          URBIN     140
         NUMSRC = 3                                                     URBIN     141
         SEARCH(1) = 'PRINT FLAG'                                       URBIN     142
         SEARCH(2) = 'INPUT 1'                                          URBIN     143
         SEARCH(3) = 'INPUT 2'                                          URBIN     144
C                                                                       URBIN     145
C     Multiplication binary function.                                   URBIN     146
C                                                                       URBIN     147
      ELSEIF(SNAME.EQ.SBBIN(MULTS))THEN                                 URBIN     148
         IUDSUB(IUDC) = MULTS                                           URBIN     149
         NUMSRC = 3                                                     URBIN     150
         SEARCH(1) = 'PRINT FLAG'                                       URBIN     151
         SEARCH(2) = 'INPUT 1'                                          URBIN     152
         SEARCH(3) = 'INPUT 2'                                          URBIN     153
C                                                                       URBIN     154
C     Division binary function.                                         URBIN     155
C                                                                       URBIN     156
      ELSEIF(SNAME.EQ.SBBIN(IDIVS))THEN                                 URBIN     157
         IUDSUB(IUDC) = IDIVS                                           URBIN     158
         NUMSRC = 3                                                     URBIN     159
         SEARCH(1) = 'PRINT FLAG'                                       URBIN     160
         SEARCH(2) = 'INPUT 1'                                          URBIN     161
         SEARCH(3) = 'INPUT 2'                                          URBIN     162
C                                                                       URBIN     163
C     Power function.                                                   URBIN     164
C                                                                       URBIN     165
      ELSEIF(SNAME.EQ.SBBIN(IPOWER))THEN                                URBIN     166
         IUDSUB(IUDC) = IPOWER                                          URBIN     167
         NUMSRC = 3                                                     URBIN     168
         SEARCH(1) = 'PRINT FLAG'                                       URBIN     169
         SEARCH(2) = 'INPUT 1'                                          URBIN     170
         SEARCH(3) = 'INPUT 2'                                          URBIN     171
C                                                                       URBIN     172
C     Invalid subtype.                                                  URBIN     173
C                                                                       URBIN     174
      ELSE                                                              URBIN     175
         IUDSUB(IUDC) = 0                                               URBIN     176
         NUMSRC = 0                                                     URBIN     177
               WRITE(MSG(1),9000) SUBNAM                                URBIN     178
               WRITE(MSG(2),9001) TNAME                                 URBIN     179
               WRITE(MSG(3),9006) BNAME(1:LEN),SNAME                    URBIN     180
               WRITE(MSG(4),9007)                                       URBIN     181
               WRITE(MSG(5),9005)                                       URBIN     182
               CALL PRTMSG(5)                                           URBIN     183
         IERCNT = IERCNT + 1                                            URBIN     184
      ENDIF                                                             URBIN     185
C                                                                       URBIN     186
C---------------------------------------------------------------------  URBIN     187
C                                                                       URBIN     188
C     Based on the data names required, determine the type of searches, URBIN     189
C     and length of data names.                                         URBIN     190
C                                                                       URBIN     191
      DO 20 I = 1, NUMSRC                                               URBIN     192
         IF(SEARCH(I).EQ.'PRINT FLAG')THEN                              URBIN     193
            TYPE(I) = 'CHAR'                                            URBIN     194
            LENGTH(I) = 10                                              URBIN     195
         ELSEIF(SEARCH(I).EQ.'INPUT 1')THEN                             URBIN     196
            TYPE(I) = 'RECH'                                            URBIN     197
            LENGTH(I) = 7                                               URBIN     198
         ELSEIF(SEARCH(I).EQ.'INPUT 2')THEN                             URBIN     199
            TYPE(I) = 'RECH'                                            URBIN     200
            LENGTH(I) = 7                                               URBIN     201
         ENDIF                                                          URBIN     202
20    CONTINUE                                                          URBIN     203
C                                                                       URBIN     204
C---------------------------------------------------------------------  URBIN     205
C                                                                       URBIN     206
C     Retrieve the necessary data from the input file.                  URBIN     207
C                                                                       URBIN     208
      JREPEA = 0                                                        URBIN     209
      CALL URREAD (CDATA, RDATA, IDATA, JREPEA)                         URBIN     210
C                                                                       URBIN     211
C---------------------------------------------------------------------  URBIN     212
C                                                                       URBIN     213
C     For debugging purposes:  dump block name, type name and           URBIN     214
C     number, and subtype name and number.                              URBIN     215
C                                                                       URBIN     216
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN     217
         DPRINT = .TRUE.                                                URBIN     218
      ENDIF                                                             URBIN     219
C                                                                       URBIN     220
      IF(LDEB .OR. DPRINT)THEN                                          URBIN     221
         IF(LDEB) THEN                                                  URBIN     222
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN     223
     1                      IUDSUB(IUDC)                                URBIN     224
         ELSE                                                           URBIN     225
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN     226
     1                      IUDSUB(IUDC)                                URBIN     227
         ENDIF                                                          URBIN     228
      ENDIF                                                             URBIN     229
C                                                                       URBIN     230
C---------------------------------------------------------------------  URBIN     231
C                                                                       URBIN     232
      IF(DEFINE)THEN                                                    URBIN     233
C                                                                       URBIN     234
C        Save information in the structure linked list.                 URBIN     235
C                                                                       URBIN     236
         CALL ADDSTR (CDATA, RDATA, IDATA)                              URBIN     237
C                                                                       URBIN     238
C                                                                       URBIN     239
      ELSE                                                              URBIN     240
C                                                                       URBIN     241
C        Store valid data.                                              URBIN     242
C                                                                       URBIN     243
         IUNIPT(IUDC) = 0                                               URBIN     244
         IUDPPT(IUDC) = 0                                               URBIN     245
         IUDRPT(IUDC) = 0                                               URBIN     246
C                                                                       URBIN     247
         DO 40 I = 1, NUMSRC                                            URBIN     248
C                                                                       URBIN     249
C                                                                       URBIN     250
C           a)   Store print flag.                                      URBIN     251
C                                                                       URBIN     252
            IF(SEARCH(I).EQ.'PRINT FLAG')THEN                           URBIN     253
C                                                                       URBIN     254
C              Invalid print flag is assumed to be false.               URBIN     255
C                                                                       URBIN     256
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN     257
                  IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.          URBIN     258
     1                CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN         URBIN     259
                     UDPRNT(IUDC) = .TRUE.                              URBIN     260
                  ELSE                                                  URBIN     261
                     UDPRNT(IUDC) = .FALSE.                             URBIN     262
                  ENDIF                                                 URBIN     263
                  IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                   URBIN     264
                     WRITE(MSG(1),9008) SUBNAM                          URBIN     265
                     WRITE(MSG(2),9009) TNAME                           URBIN     266
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN     267
                     WRITE(MSG(4),9901)                                 URBIN     268
                     CALL PRTMSG(4)                                     URBIN     269
                  ENDIF                                                 URBIN     270
               ELSE                                                     URBIN     271
                  CDATA(I) = STARS                                      URBIN     272
                  UDPRNT(IUDC) = .FALSE.                                URBIN     273
               ENDIF                                                    URBIN     274
C                                                                       URBIN     275
C                                                                       URBIN     276
C                                                                       URBIN     277
C           b)   Store input 1, or input 2.                             URBIN     278
C                                                                       URBIN     279
            ELSEIF(SEARCH(I).EQ.'INPUT 1' .OR.                          URBIN     280
     1               SEARCH(I).EQ.'INPUT 2')THEN                        URBIN     281
C                                                                       URBIN     282
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN     283
C                                                                       URBIN     284
               CALL ADDPRM (IUDC, IADDP, LASTP)                         URBIN     285
C                                                                       URBIN     286
C              Store valid or undefined input 1 or input 2 values.      URBIN     287
C                                                                       URBIN     288
               IF(TYPE(I).EQ.' ')THEN                                   URBIN     289
                  UIDENT(IADDI) = STARS                                 URBIN     290
               ELSEIF(TYPE(I).EQ.'CHAR')THEN                            URBIN     291
                  IF(EXPAND.AND.CDATA(I)(1:1).EQ.'.')THEN               URBIN     292
C                                                                       URBIN     293
C                    Expand the block name if it begins with "."        URBIN     294
C                                                                       URBIN     295
                     UIDENT(IADDI) = SRNAME(1:ISRLEN)                   URBIN     296
                     UIDENT(IADDI)(ISRLEN+1:17) = CDATA(I)              URBIN     297
                     CDATA(I) = UIDENT(IADDI)                           URBIN     298
                  ELSE                                                  URBIN     299
                     UIDENT(IADDI) = CDATA(I)                           URBIN     300
                     IF(UIDENT(IADDI) .NE. CDATA(I))THEN                URBIN     301
               WRITE(MSG(1),9000) SUBNAM                                URBIN     302
               WRITE(MSG(2),9001) TNAME                                 URBIN     303
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN     304
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN     305
               WRITE(MSG(5),9004) UIDENT(IADDI)                         URBIN     306
               WRITE(MSG(6),9005)                                       URBIN     307
               CALL PRTMSG(6)                                           URBIN     308
                        IERCNT = IERCNT + 1                             URBIN     309
                     ENDIF                                              URBIN     310
                  ENDIF                                                 URBIN     311
               ELSEIF(TYPE(I).EQ.'REAL')THEN                            URBIN     312
                  UDPARM(IADDP) = RDATA(I)                              URBIN     313
               ENDIF                                                    URBIN     314
C                                                                       URBIN     315
            ENDIF                                                       URBIN     316
C                                                                       URBIN     317
40       CONTINUE                                                       URBIN     318
      ENDIF                                                             URBIN     319
C                                                                       URBIN     320
C---------------------------------------------------------------------  URBIN     321
C                                                                       URBIN     322
C     For debugging purposes:  dump all valid data.  For invalid        URBIN     323
C     data a not defined message will be printed.                       URBIN     324
C                                                                       URBIN     325
      IF(LDEB .OR. DPRINT)THEN                                          URBIN     326
         DO 60 I = 1, NUMSRC                                            URBIN     327
C                                                                       URBIN     328
            N = LENGTH(I) + 1                                           URBIN     329
            SEARCH(I)(N:N) = ':'                                        URBIN     330
            IF(DEFINE)THEN                                              URBIN     331
               IF(CDATA(I).EQ.'%')THEN                                  URBIN     332
                  IF(LDEB) THEN                                         URBIN     333
                     WRITE (IUD6,9010) SEARCH(I), '% INPUT %'           URBIN     334
                  ELSE                                                  URBIN     335
                     WRITE (IU16,9010) SEARCH(I), '% INPUT %'           URBIN     336
                  ENDIF                                                 URBIN     337
               ELSEIF(TYPE(I).EQ.'CHAR')THEN                            URBIN     338
                  IF(LDEB) THEN                                         URBIN     339
                     WRITE (IUD6,9010) SEARCH(I), CDATA(I)              URBIN     340
                  ELSE                                                  URBIN     341
                     WRITE (IU16,9010) SEARCH(I), CDATA(I)              URBIN     342
                  ENDIF                                                 URBIN     343
               ELSEIF(TYPE(I).EQ.'REAL')THEN                            URBIN     344
                  IF(LDEB) THEN                                         URBIN     345
                     WRITE (IUD6,9012) SEARCH(I), RDATA(I)              URBIN     346
                  ELSE                                                  URBIN     347
                     WRITE (IU16,9012) SEARCH(I), RDATA(I)              URBIN     348
                  ENDIF                                                 URBIN     349
               ELSEIF(TYPE(I).EQ.'INTE')THEN                            URBIN     350
                  IF(LDEB) THEN                                         URBIN     351
                     WRITE (IUD6,9014) SEARCH(I), IDATA(I)              URBIN     352
                  ELSE                                                  URBIN     353
                     WRITE (IU16,9014) SEARCH(I), IDATA(I)              URBIN     354
                  ENDIF                                                 URBIN     355
               ELSEIF(TYPE(I).EQ.' ')THEN                               URBIN     356
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN     357
                  CALL PRTMSG(1)                                        URBIN     358
               ENDIF                                                    URBIN     359
            ELSE                                                        URBIN     360
               IF(TYPE(I).EQ.'CHAR')THEN                                URBIN     361
                  IF(LDEB) THEN                                         URBIN     362
                     WRITE (IUD6,9010) SEARCH(I), CDATA(I)              URBIN     363
                  ELSE                                                  URBIN     364
                     WRITE (IU16,9010) SEARCH(I), CDATA(I)              URBIN     365
                  ENDIF                                                 URBIN     366
               ELSEIF(TYPE(I).EQ.'REAL')THEN                            URBIN     367
                  IF(LDEB) THEN                                         URBIN     368
                     WRITE (IUD6,9012) SEARCH(I), RDATA(I)              URBIN     369
                  ELSE                                                  URBIN     370
                     WRITE (IU16,9012) SEARCH(I), RDATA(I)              URBIN     371
                  ENDIF                                                 URBIN     372
               ELSEIF(TYPE(I).EQ.'INTE')THEN                            URBIN     373
                  IF(LDEB) THEN                                         URBIN     374
                     WRITE (IUD6,9014) SEARCH(I), IDATA(I)              URBIN     375
                  ELSE                                                  URBIN     376
                     WRITE (IU16,9014) SEARCH(I), IDATA(I)              URBIN     377
                  ENDIF                                                 URBIN     378
               ELSEIF(TYPE(I).EQ.' ')THEN                               URBIN     379
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN     380
                  CALL PRTMSG(1)                                        URBIN     381
               ENDIF                                                    URBIN     382
            ENDIF                                                       URBIN     383
60       CONTINUE                                                       URBIN     384
      ENDIF                                                             URBIN     385
C                                                                       URBIN     386
      IF(DEFINE)THEN                                                    URBIN     387
         IUDC = IUDC - 1                                                URBIN     388
      ENDIF                                                             URBIN     389
C                                                                       URBIN     390
      RETURN                                                            URBIN     391
C                                                                       URBIN     392
C                                                                       URBIN     393
C---------------------------------------------------------------------  URBIN     394
C                                                                       URBIN     395
      ENTRY URFORT                                                      URBIN     396
CD -------------------------------------------------------------------  URBIN     397
CD                                                                      URBIN     398
CD              *****     URFORT  ROUTINE   *****                       URBIN     399
CD                                                                      URBIN     400
CD -------------------------------------------------------------------  URBIN     401
CD                                                                      URBIN     402
CD        PURPOSE:  Controls the reading of the udc type FORTRN data    URBIN     403
CD                  from the input file. Does limited error checking.   URBIN     404
CD                  Stores valid data in the udc storage arrays.        URBIN     405
CD                                                                      URBIN     406
CD -------------------------------------------------------------------  URBIN     407
C                                                                       URBIN     408
C     Define subroutine name                                            URBIN     409
C                                                                       URBIN     410
      LDEB=(JDEB(301).NE.0)                                             URBIN     411
C                                                                       URBIN     412
      IF(SDBG)THEN                                                      URBIN     413
         SUBNAM = 'URFORT ROUTINE.'                                     URBIN     414
      ELSE                                                              URBIN     415
         SUBNAM = ' '                                                   URBIN     416
      END IF                                                            URBIN     417
C                                                                       URBIN     418
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN     419
      BNAME = UDNAME(IUDC)                                              URBIN     420
      LEN = IUDLEN(IUDC)                                                URBIN     421
C                                                                       URBIN     422
      ENDBLK = .FALSE.                                                  URBIN     423
C                                                                       URBIN     424
C     Get the subtype name.                                             URBIN     425
C                                                                       URBIN     426
      CALL URGETC(CDATA(1),FOUND)                                       URBIN     427
C                                                                       URBIN     428
      IF(ENDBLK) GOTO 255                                               URBIN     429
C                                                                       URBIN     430
      IF(.NOT. FOUND)THEN                                               URBIN     431
         SNAME = STARS                                                  URBIN     432
         IERCNT = IERCNT + 1                                            URBIN     433
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     434
                     WRITE(MSG(2),9001) TNAME                           URBIN     435
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN     436
                     WRITE(MSG(4),9105) 'SUBTYPE'                       URBIN     437
                     WRITE(MSG(5),9005)                                 URBIN     438
                     CALL PRTMSG(5)                                     URBIN     439
      ELSE                                                              URBIN     440
         SNAME = CDATA(1)                                               URBIN     441
         IF(SNAME .NE. CDATA(1))THEN                                    URBIN     442
               WRITE(MSG(1),9000) SUBNAM                                URBIN     443
               WRITE(MSG(2),9001) TNAME                                 URBIN     444
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN     445
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN     446
               WRITE(MSG(5),9004) SNAME                                 URBIN     447
               WRITE(MSG(6),9005)                                       URBIN     448
               CALL PRTMSG(6)                                           URBIN     449
            IERCNT = IERCNT + 1                                         URBIN     450
         END IF                                                         URBIN     451
      END IF                                                            URBIN     452
C                                                                       URBIN     453
C     Compare the subtype name with the list of existing subtypes       URBIN     454
C     to find a match.                                                  URBIN     455
C                                                                       URBIN     456
      EXIST = .FALSE.                                                   URBIN     457
      DO 110 JSBIDX=1,NMFORT                                            URBIN     458
         IF(SBFORT(JSBIDX).EQ.SNAME)THEN                                URBIN     459
            EXIST = .TRUE.                                              URBIN     460
            GOTO 115                                                    URBIN     461
         END IF                                                         URBIN     462
110   CONTINUE                                                          URBIN     463
C                                                                       URBIN     464
115   CONTINUE                                                          URBIN     465
      IF(.NOT. EXIST)THEN                                               URBIN     466
         NMFORT = NMFORT + 1                                            URBIN     467
         JSBIDX = NMFORT                                                URBIN     468
         IF(NMFORT .GT. MXFORT)THEN                                     URBIN     469
            IERCNT = IERCNT + 1                                         URBIN     470
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     471
                     WRITE(MSG(2),9124) TNAME                           URBIN     472
                     WRITE(MSG(3),9125) 'ROUTINES',MXFORT               URBIN     473
                     WRITE(MSG(4),9902)                                 URBIN     474
                     CALL PRTMSG(4)                                     URBIN     475
         ELSE                                                           URBIN     476
            SBFORT(NMFORT) = SNAME                                      URBIN     477
         END IF                                                         URBIN     478
      END IF                                                            URBIN     479
      IUDSUB(IUDC) = JSBIDX                                             URBIN     480
C                                                                       URBIN     481
C     Get the print flag.                                               URBIN     482
C                                                                       URBIN     483
      UDPRNT(IUDC) = .FALSE.                                            URBIN     484
      CALL URGETC(CDATA(1),FOUND)                                       URBIN     485
C                                                                       URBIN     486
      IF(ENDBLK) GOTO 255                                               URBIN     487
C                                                                       URBIN     488
      IF(.NOT. FOUND)THEN                                               URBIN     489
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     490
                     WRITE(MSG(2),9001) TNAME                           URBIN     491
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN     492
                     WRITE(MSG(4),9105) 'PRINT FLAG'                    URBIN     493
                     WRITE(MSG(5),9005)                                 URBIN     494
                     CALL PRTMSG(5)                                     URBIN     495
         IERCNT = IERCNT + 1                                            URBIN     496
      ELSE                                                              URBIN     497
C                                                                       URBIN     498
C        store the print flag                                           URBIN     499
C                                                                       URBIN     500
         IF(TYPE(1) .NE. ' ')THEN                                       URBIN     501
            IF(CDATA(1).EQ.'1' .OR. CDATA(1).EQ.'T' .OR.                URBIN     502
     1          CDATA(1).EQ.'P' .OR. CDATA(1).EQ.'Y')THEN               URBIN     503
               UDPRNT(IUDC) = .TRUE.                                    URBIN     504
            END IF                                                      URBIN     505
            IF(CDATA(1)(1:1) .NE. CDATA(1))THEN                         URBIN     506
                     WRITE(MSG(1),9008) SUBNAM                          URBIN     507
                     WRITE(MSG(2),9009) TNAME                           URBIN     508
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(1)(1:32)     URBIN     509
                     WRITE(MSG(4),9901)                                 URBIN     510
                     CALL PRTMSG(4)                                     URBIN     511
            END IF                                                      URBIN     512
         ELSE                                                           URBIN     513
            CDATA(1) = STARS                                            URBIN     514
         END IF                                                         URBIN     515
      END IF                                                            URBIN     516
C                                                                       URBIN     517
      PRINT = UDPRNT(IUDC)                                              URBIN     518
C                                                                       URBIN     519
      IF(LDEB)THEN                                                      URBIN     520
         IF(LDEB) THEN                                                  URBIN     521
            WRITE(IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC),         URBIN     522
     1         SNAME, IUDSUB(IUDC), CDATA(1)                            URBIN     523
         ELSE                                                           URBIN     524
            WRITE(IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC),         URBIN     525
     1         SNAME, IUDSUB(IUDC), CDATA(1)                            URBIN     526
         END IF                                                         URBIN     527
      END IF                                                            URBIN     528
C                                                                       URBIN     529
C     Get the number of inputs.                                         URBIN     530
C                                                                       URBIN     531
      CALL URGETI(IDATA(1),CDATA(1),FOUND)                              URBIN     532
C                                                                       URBIN     533
      IF(ENDBLK) GOTO 255                                               URBIN     534
C                                                                       URBIN     535
      IF(.NOT. FOUND)THEN                                               URBIN     536
C                                                                       URBIN     537
C        Invalid data was found.                                        URBIN     538
C                                                                       URBIN     539
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     540
                     WRITE(MSG(2),9001) TNAME                           URBIN     541
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN     542
                     WRITE(MSG(4),9105) 'NO. OF INPUTS'                 URBIN     543
                     WRITE(MSG(5),9005)                                 URBIN     544
                     CALL PRTMSG(5)                                     URBIN     545
         IERCNT = IERCNT + 1                                            URBIN     546
      ELSE                                                              URBIN     547
         NUMSRC = IDATA(1)                                              URBIN     548
C                                                                       URBIN     549
         IF(LDEB)THEN                                                   URBIN     550
            WRITE(IUD6,9118) 'NO OF INPUTS: ',NUMSRC                    URBIN     551
         END IF                                                         URBIN     552
C                                                                       URBIN     553
C        Retrieve the input parameters.                                 URBIN     554
C                                                                       URBIN     555
         DO 120 I=1,NUMSRC                                              URBIN     556
            TYPE(I) = 'RECH'                                            URBIN     557
            CALL URGETX(RDATA(I),CDATA(I),TYPE(I),FOUND)                URBIN     558
            IF(ENDBLK) GOTO 255                                         URBIN     559
            IF(.NOT. FOUND)THEN                                         URBIN     560
               IERCNT = IERCNT + 1                                      URBIN     561
               TYPE(I) = ' '                                            URBIN     562
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     563
                     WRITE(MSG(2),9001) TNAME                           URBIN     564
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN     565
                     WRITE(MSG(4),9105) 'INPUT PARMS'                   URBIN     566
                     WRITE(MSG(5),9005)                                 URBIN     567
                     CALL PRTMSG(5)                                     URBIN     568
            ELSE                                                        URBIN     569
               IF(LDEB)THEN                                             URBIN     570
                  WRITE(IUD6,9120) 'INPUT ',I, CDATA(I)                 URBIN     571
               END IF                                                   URBIN     572
            END IF                                                      URBIN     573
120      CONTINUE                                                       URBIN     574
C                                                                       URBIN     575
C        Fortran udc types cannot be used within a structure definition.URBIN     576
C        If this is attempted signal an error.                          URBIN     577
C                                                                       URBIN     578
         IF(DEFINE)THEN                                                 URBIN     579
            IERCNT = IERCNT + 1                                         URBIN     580
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     581
                     WRITE(MSG(2),9126)                                 URBIN     582
                     WRITE(MSG(3),9127) BNAME(1:LEN)                    URBIN     583
                     WRITE(MSG(4),9128)                                 URBIN     584
                     CALL PRTMSG(4)                                     URBIN     585
         END IF                                                         URBIN     586
C                                                                       URBIN     587
C        Store the valid data                                           URBIN     588
C                                                                       URBIN     589
         IUNIPT(IUDC) = 0                                               URBIN     590
         IUDPPT(IUDC) = 0                                               URBIN     591
         IUDRPT(IUDC) = 0                                               URBIN     592
C                                                                       URBIN     593
         DO 140 I=1,NUMSRC                                              URBIN     594
            CALL ADDINT(IUDC,IADDI,LASTI)                               URBIN     595
            CALL ADDPRM(IUDC,IADDP,LASTP)                               URBIN     596
C                                                                       URBIN     597
C           Add input to linked list.                                   URBIN     598
C                                                                       URBIN     599
            IF(TYPE(I).EQ.' ')THEN                                      URBIN     600
               UIDENT(IADDI) = STARS                                    URBIN     601
            ELSEIF(TYPE(I).EQ.'CHAR')THEN                               URBIN     602
               UIDENT(IADDI) = CDATA(I)                                 URBIN     603
               IF(UIDENT(IADDI) .NE. CDATA(I))THEN                      URBIN     604
               WRITE(MSG(1),9000) SUBNAM                                URBIN     605
               WRITE(MSG(2),9001) TNAME                                 URBIN     606
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN     607
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN     608
               WRITE(MSG(5),9004) UIDENT(IADDI)                         URBIN     609
               WRITE(MSG(6),9005)                                       URBIN     610
               CALL PRTMSG(6)                                           URBIN     611
                  IERCNT = IERCNT + 1                                   URBIN     612
               END IF                                                   URBIN     613
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN     614
               UDPARM(IADDP) = RDATA(I)                                 URBIN     615
            END IF                                                      URBIN     616
C                                                                       URBIN     617
140      CONTINUE                                                       URBIN     618
      END IF                                                            URBIN     619
C                                                                       URBIN     620
C     Get the number of outputs                                         URBIN     621
C                                                                       URBIN     622
      CALL URGETI(IDATA(1),CDATA(1),FOUND)                              URBIN     623
C                                                                       URBIN     624
      IF(ENDBLK) GOTO 255                                               URBIN     625
C                                                                       URBIN     626
      IF(.NOT. FOUND)THEN                                               URBIN     627
C                                                                       URBIN     628
C        Invalid data was found.                                        URBIN     629
C                                                                       URBIN     630
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     631
                     WRITE(MSG(2),9001) TNAME                           URBIN     632
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN     633
                     WRITE(MSG(4),9105) 'NO. OF OUTPUTS'                URBIN     634
                     WRITE(MSG(5),9005)                                 URBIN     635
                     CALL PRTMSG(5)                                     URBIN     636
         IERCNT = IERCNT + 1                                            URBIN     637
      ELSE                                                              URBIN     638
         NUMSRC = IDATA(1)                                              URBIN     639
         IF(LDEB)THEN                                                   URBIN     640
            WRITE(IUD6,9118) 'NO OF OUTPUTS: ',NUMSRC                   URBIN     641
         END IF                                                         URBIN     642
C                                                                       URBIN     643
C        Retrieve the output parameters.                                URBIN     644
C                                                                       URBIN     645
         DO 160 I=1,NUMSRC                                              URBIN     646
            TYPE(I) = 'CHAR'                                            URBIN     647
            CALL URGETC(CDATA(I),FOUND)                                 URBIN     648
            IF(I .NE. NUMSRC.AND.ENDBLK)THEN                            URBIN     649
               IERCNT = IERCNT + 1                                      URBIN     650
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     651
                     WRITE(MSG(2),9001) TNAME                           URBIN     652
                     WRITE(MSG(3),9108) BNAME(1:LEN)                    URBIN     653
                     WRITE(MSG(4),9105) 'OUTPUT PARMS'                  URBIN     654
                     WRITE(MSG(5),9005)                                 URBIN     655
                     CALL PRTMSG(5)                                     URBIN     656
               NUMSRC = I                                               URBIN     657
               GOTO 170                                                 URBIN     658
            END IF                                                      URBIN     659
            IF(.NOT. FOUND)THEN                                         URBIN     660
               IERCNT = IERCNT + 1                                      URBIN     661
               TYPE(I) = ' '                                            URBIN     662
C                                                                       URBIN     663
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     664
                     WRITE(MSG(2),9001) TNAME                           URBIN     665
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN     666
                     WRITE(MSG(4),9105) 'OUTPUT PARMS'                  URBIN     667
                     WRITE(MSG(5),9005)                                 URBIN     668
                     CALL PRTMSG(5)                                     URBIN     669
            ELSE                                                        URBIN     670
               IF(LDEB)THEN                                             URBIN     671
                  WRITE(IUD6,9120) 'OUTPUT ',I, CDATA(I)                URBIN     672
               END IF                                                   URBIN     673
            END IF                                                      URBIN     674
160      CONTINUE                                                       URBIN     675
C                                                                       URBIN     676
C        Create an equivalence link between the fortran routine and the URBIN     677
C        associated outputs.                                            URBIN     678
C                                                                       URBIN     679
170      CONTINUE                                                       URBIN     680
C                                                                       URBIN     681
C        If this subtype has been previously defined then check that    URBIN     682
C        the expected number of outputs matches the current definition. URBIN     683
C        If it's a new subtype then add the expected number of outputs  URBIN     684
C        to the subtype definition.                                     URBIN     685
C                                                                       URBIN     686
         IF(.NOT. EXIST)THEN                                            URBIN     687
            IF(NMFORT .LE. MXFORT)THEN                                  URBIN     688
               ISBFNU(NMFORT) = NUMSRC                                  URBIN     689
            END IF                                                      URBIN     690
         ELSE                                                           URBIN     691
            IF(ISBFNU(JSBIDX) .NE. NUMSRC)THEN                          URBIN     692
               IERCNT = IERCNT + 1                                      URBIN     693
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     694
                     WRITE(MSG(2),9001) TNAME                           URBIN     695
                     WRITE(MSG(3),9122) BNAME(1:LEN),SNAME,NUMSRC       URBIN     696
                     WRITE(MSG(4),9123) ISBFNU(JSBIDX)                  URBIN     697
                     WRITE(MSG(5),9005)                                 URBIN     698
                     CALL PRTMSG(5)                                     URBIN     699
            END IF                                                      URBIN     700
         END IF                                                         URBIN     701
C                                                                       URBIN     702
C        Add the output block names to the equivalence link.            URBIN     703
C                                                                       URBIN     704
         IFRTBK = IFRTBK + 1                                            URBIN     705
         IF(IFRTBK .GT. IFRTMX)THEN                                     URBIN     706
            IERCNT = IERCNT + 1                                         URBIN     707
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     708
                     WRITE(MSG(2),9124) TNAME                           URBIN     709
                     WRITE(MSG(3),9125) 'BLOCKS',IFRTMX                 URBIN     710
                     WRITE(MSG(4),9902)                                 URBIN     711
                     CALL PRTMSG(4)                                     URBIN     712
         ELSE                                                           URBIN     713
           FRTNAM(IFRTBK) = UDNAME(IUDC)                                URBIN     714
           IDUMPT(IFRTBK) = IDUMNX                                      URBIN     715
         END IF                                                         URBIN     716
C                                                                       URBIN     717
         DO 200 I=1,NUMSRC                                              URBIN     718
            IF(IDUMNX .GT. IDUMAX)THEN                                  URBIN     719
               IERCNT = IERCNT + 1                                      URBIN     720
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     721
                     WRITE(MSG(2),9124) TNAME                           URBIN     722
                     WRITE(MSG(3),9125) 'DUMMY BLOCKS',IDUMAX           URBIN     723
                     WRITE(MSG(4),9902)                                 URBIN     724
                     CALL PRTMSG(4)                                     URBIN     725
            ELSE                                                        URBIN     726
               DUMNAM(IDUMNX) = CDATA(I)                                URBIN     727
               IDUMBK(IDUMNX) = 0                                       URBIN     728
            END IF                                                      URBIN     729
            IDUMNX = IDUMNX + 1                                         URBIN     730
200      CONTINUE                                                       URBIN     731
C                                                                       URBIN     732
C        Create the new dummy UDC blocks for the output parameters.     URBIN     733
C                                                                       URBIN     734
         DO 220 I=1,NUMSRC                                              URBIN     735
            CALL UDDBLK(CDATA(I),PRINT,BNAME)                           URBIN     736
220      CONTINUE                                                       URBIN     737
      END IF                                                            URBIN     738
C                                                                       URBIN     739
C     Get the end of block mark (:).                                    URBIN     740
C                                                                       URBIN     741
240   CONTINUE                                                          URBIN     742
C                                                                       URBIN     743
      IF(.NOT. ENDBLK)THEN                                              URBIN     744
                     WRITE(MSG(1),9008) SUBNAM                          URBIN     745
                     WRITE(MSG(2),9009) TNAME                           URBIN     746
                     WRITE(MSG(3),9112) BNAME(1:LEN)                    URBIN     747
                     WRITE(MSG(4),9005)                                 URBIN     748
                     CALL PRTMSG(4)                                     URBIN     749
         IERCNT = IERCNT + 1                                            URBIN     750
         CALL URGETC(WORD,FOUND)                                        URBIN     751
         GOTO 240                                                       URBIN     752
      END IF                                                            URBIN     753
      GOTO 260                                                          URBIN     754
C                                                                       URBIN     755
255   CONTINUE                                                          URBIN     756
      IERCNT = IERCNT + 1                                               URBIN     757
                     WRITE(MSG(1),9000) SUBNAM                          URBIN     758
                     WRITE(MSG(2),9001) TNAME                           URBIN     759
                     WRITE(MSG(3),9108) BNAME(1:LEN)                    URBIN     760
                     WRITE(MSG(4),9105) 'PARAMETERS'                    URBIN     761
                     WRITE(MSG(5),9005)                                 URBIN     762
                     CALL PRTMSG(5)                                     URBIN     763
C                                                                       URBIN     764
260   CONTINUE                                                          URBIN     765
C                                                                       URBIN     766
      RETURN                                                            URBIN     767
C                                                                       URBIN     768
C                                                                       URBIN     769
C---------------------------------------------------------------------  URBIN     770
C                                                                       URBIN     771
      ENTRY URFRAC                                                      URBIN     772
CD -------------------------------------------------------------------  URBIN     773
CD                                                                      URBIN     774
CD              *****     URFRACD ROUTINE   *****                       URBIN     775
CD                                                                      URBIN     776
CD -------------------------------------------------------------------  URBIN     777
CD                                                                      URBIN     778
CD       PURPOSE:  Controls the reading of the udc type FROMAC data     URBIN     779
CD                 from the input file.  Does limited error checking.   URBIN     780
CD                 Stores valid data in the udc storage arrays.         URBIN     781
CD                                                                      URBIN     782
CD -------------------------------------------------------------------  URBIN     783
C                                                                       URBIN     784
C     Define subroutine name.                                           URBIN     785
C                                                                       URBIN     786
      LDEB=(JDEB(301).NE.0)                                             URBIN     787
C                                                                       URBIN     788
      IF(SDBG)THEN                                                      URBIN     789
         SUBNAM = 'URFRAC ROUTINE.'                                     URBIN     790
      ELSE                                                              URBIN     791
         SUBNAM = ' '                                                   URBIN     792
      ENDIF                                                             URBIN     793
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN     794
      BNAME = UDNAME(IUDC)                                              URBIN     795
      LEN = IUDLEN(IUDC)                                                URBIN     796
C                                                                       URBIN     797
C     Forces an interrupted card image if an error is found.            URBIN     798
C                                                                       URBIN     799
      JDCOUN = IERCNT                                                   URBIN     800
      DPRINT = .FALSE.                                                  URBIN     801
C                                                                       URBIN     802
      IF(EXPAND)THEN                                                    URBIN     803
C                                                                       URBIN     804
C        Obtain the subtype name from the saved information for this    URBIN     805
C        structure.                                                     URBIN     806
C                                                                       URBIN     807
         SNAME = SBFRAC(IUDSUB(IUDC))                                   URBIN     808
C                                                                       URBIN     809
      ELSE                                                              URBIN     810
C                                                                       URBIN     811
C        Read the subtype name.                                         URBIN     812
C                                                                       URBIN     813
         ENDBLK = .FALSE.                                               URBIN     814
         CALL URGETC (CDATA(1), FOUND)                                  URBIN     815
         IF(.NOT. FOUND)THEN                                            URBIN     816
            SNAME = STARS                                               URBIN     817
         ELSE                                                           URBIN     818
            SNAME = CDATA(1)(1:8)                                       URBIN     819
            IF(SNAME .NE. CDATA(1))THEN                                 URBIN     820
               WRITE(MSG(1),9000) SUBNAM                                URBIN     821
               WRITE(MSG(2),9001) TNAME                                 URBIN     822
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN     823
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN     824
               WRITE(MSG(5),9004) SNAME                                 URBIN     825
               WRITE(MSG(6),9005)                                       URBIN     826
               CALL PRTMSG(6)                                           URBIN     827
               IERCNT = IERCNT + 1                                      URBIN     828
            ENDIF                                                       URBIN     829
         ENDIF                                                          URBIN     830
      ENDIF                                                             URBIN     831
C                                                                       URBIN     832
C---------------------------------------------------------------------  URBIN     833
C                                                                       URBIN     834
C     Determine what variables and how many are required for the        URBIN     835
C     specified subtype.                                                URBIN     836
C                                                                       URBIN     837
C     VMAG subtype.                                                     URBIN     838
C                                                                       URBIN     839
      IF(SNAME.EQ.SBFRAC(IVMAGS))THEN                                   URBIN     840
         IUDSUB(IUDC) = IVMAGS                                          URBIN     841
         JCOUNT = 2                                                     URBIN     842
         LOOK(1) = 'PRINT FLAG'                                         URBIN     843
         LOOK(2) = 'AC BUS NAME'                                        URBIN     844
C                                                                       URBIN     845
C     VANG subtype.                                                     URBIN     846
C                                                                       URBIN     847
      ELSEIF(SNAME.EQ.SBFRAC(IVANGS))THEN                               URBIN     848
         IUDSUB(IUDC) = IVANGS                                          URBIN     849
         JCOUNT = 2                                                     URBIN     850
         LOOK(1) = 'PRINT FLAG'                                         URBIN     851
         LOOK(2) = 'AC BUS NAME'                                        URBIN     852
C                                                                       URBIN     853
C     IMAG subtype.                                                     URBIN     854
C                                                                       URBIN     855
      ELSEIF(SNAME.EQ.SBFRAC(IMAGS))THEN                                URBIN     856
         IUDSUB(IUDC) = IMAGS                                           URBIN     857
         JCOUNT = 2                                                     URBIN     858
         LOOK(1) = 'PRINT FLAG'                                         URBIN     859
         LOOK(2) = 'AC LINE'                                            URBIN     860
C                                                                       URBIN     861
C     P subtype.                                                        URBIN     862
C                                                                       URBIN     863
      ELSEIF(SNAME.EQ.SBFRAC(IPS))THEN                                  URBIN     864
         IUDSUB(IUDC) = IPS                                             URBIN     865
         JCOUNT = 2                                                     URBIN     866
         LOOK(1) = 'PRINT FLAG'                                         URBIN     867
         LOOK(2) = 'AC LINE'                                            URBIN     868
C                                                                       URBIN     869
C     Q subtype.                                                        URBIN     870
C                                                                       URBIN     871
      ELSEIF(SNAME.EQ.SBFRAC(IQS))THEN                                  URBIN     872
         IUDSUB(IUDC) = IQS                                             URBIN     873
         JCOUNT = 2                                                     URBIN     874
         LOOK(1) = 'PRINT FLAG'                                         URBIN     875
         LOOK(2) = 'AC LINE'                                            URBIN     876
C                                                                       URBIN     877
C     FREQ subtype.                                                     URBIN     878
C                                                                       URBIN     879
      ELSEIF(SNAME.EQ.SBFRAC(IFREQS))THEN                               URBIN     880
         IUDSUB(IUDC) = IFREQS                                          URBIN     881
         JCOUNT = 2                                                     URBIN     882
         LOOK(1) = 'PRINT FLAG'                                         URBIN     883
         LOOK(2) = 'AC BUS NAME'                                        URBIN     884
C                                                                       URBIN     885
C     Invalid subtype.                                                  URBIN     886
C                                                                       URBIN     887
      ELSE                                                              URBIN     888
         IUDSUB(IUDC) = 0                                               URBIN     889
         JCOUNT = 0                                                     URBIN     890
               WRITE(MSG(1),9000) SUBNAM                                URBIN     891
               WRITE(MSG(2),9001) TNAME                                 URBIN     892
               WRITE(MSG(3),9006) BNAME(1:LEN),SNAME                    URBIN     893
               WRITE(MSG(4),9007)                                       URBIN     894
               WRITE(MSG(5),9005)                                       URBIN     895
               CALL PRTMSG(5)                                           URBIN     896
         IERCNT = IERCNT + 1                                            URBIN     897
      ENDIF                                                             URBIN     898
C                                                                       URBIN     899
C---------------------------------------------------------------------  URBIN     900
C                                                                       URBIN     901
C     Based on the variables required, determine the required data      URBIN     902
C     names, the number of searches, and the length of the data         URBIN     903
C     names.                                                            URBIN     904
C                                                                       URBIN     905
      NUMSRC = 0                                                        URBIN     906
      DO 320 I = 1, JCOUNT                                              URBIN     907
C                                                                       URBIN     908
C                                                                       URBIN     909
         IF(LOOK(I).EQ.'PRINT FLAG')THEN                                URBIN     910
            NUMSRC = NUMSRC + 1                                         URBIN     911
            SEARCH(NUMSRC) = LOOK(I)                                    URBIN     912
            LENGTH(NUMSRC) = 10                                         URBIN     913
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     914
C                                                                       URBIN     915
C                                                                       URBIN     916
         ELSEIF(LOOK(I).EQ.'AC BUS NAME')THEN                           URBIN     917
            NUMSRC = NUMSRC + 1                                         URBIN     918
            SEARCH(NUMSRC) = LOOK(I)                                    URBIN     919
            LENGTH(NUMSRC) = 11                                         URBIN     920
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     921
            NUMSRC = NUMSRC + 1                                         URBIN     922
            SEARCH(NUMSRC) = 'KV'                                       URBIN     923
            LENGTH(NUMSRC) = 2                                          URBIN     924
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     925
C                                                                       URBIN     926
C                                                                       URBIN     927
         ELSEIF(LOOK(I).EQ.'AC LINE')THEN                               URBIN     928
            NUMSRC = NUMSRC + 1                                         URBIN     929
            SEARCH(NUMSRC) = 'BUS NAME 1'                               URBIN     930
            LENGTH(NUMSRC) = 10                                         URBIN     931
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     932
C                                                                       URBIN     933
            NUMSRC = NUMSRC + 1                                         URBIN     934
            SEARCH(NUMSRC) = 'KV 1'                                     URBIN     935
            LENGTH(NUMSRC) = 4                                          URBIN     936
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     937
C                                                                       URBIN     938
            NUMSRC = NUMSRC + 1                                         URBIN     939
            SEARCH(NUMSRC) = 'BUS NAME 2'                               URBIN     940
            LENGTH(NUMSRC) = 10                                         URBIN     941
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     942
C                                                                       URBIN     943
            NUMSRC = NUMSRC + 1                                         URBIN     944
            SEARCH(NUMSRC) = 'KV 2'                                     URBIN     945
            LENGTH(NUMSRC) = 4                                          URBIN     946
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     947
C                                                                       URBIN     948
            NUMSRC = NUMSRC + 1                                         URBIN     949
            SEARCH(NUMSRC) = 'CIRCUIT NUMBER'                           URBIN     950
            LENGTH(NUMSRC) = 14                                         URBIN     951
            TYPE(NUMSRC) = 'CHAR'                                       URBIN     952
C                                                                       URBIN     953
         ENDIF                                                          URBIN     954
320   CONTINUE                                                          URBIN     955
C                                                                       URBIN     956
C---------------------------------------------------------------------  URBIN     957
C                                                                       URBIN     958
C     Retrieve the necessary data from the input file.                  URBIN     959
C                                                                       URBIN     960
      JREPEA = 0                                                        URBIN     961
      CALL URREAD (CDATA, RDATA, IDATA, JREPEA)                         URBIN     962
C                                                                       URBIN     963
C---------------------------------------------------------------------  URBIN     964
C                                                                       URBIN     965
C     For debugging purposes:  dump block name, type name and           URBIN     966
C     number, and subtype name and number.                              URBIN     967
C                                                                       URBIN     968
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN     969
         DPRINT = .TRUE.                                                URBIN     970
      ENDIF                                                             URBIN     971
C                                                                       URBIN     972
      IF(LDEB .OR. DPRINT)THEN                                          URBIN     973
         IF(LDEB) THEN                                                  URBIN     974
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN     975
     1                      IUDSUB(IUDC)                                URBIN     976
         ELSE                                                           URBIN     977
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN     978
     1                      IUDSUB(IUDC)                                URBIN     979
         ENDIF                                                          URBIN     980
      ENDIF                                                             URBIN     981
C                                                                       URBIN     982
C---------------------------------------------------------------------  URBIN     983
C                                                                       URBIN     984
      IF(DEFINE)THEN                                                    URBIN     985
C                                                                       URBIN     986
C        Save information in the structure linked list.                 URBIN     987
C                                                                       URBIN     988
         CALL ADDSTR (CDATA, RDATA, IDATA)                              URBIN     989
C                                                                       URBIN     990
C                                                                       URBIN     991
      ELSE                                                              URBIN     992
C                                                                       URBIN     993
C        Group data into the variables that are needed for storage.     URBIN     994
C                                                                       URBIN     995
         J = 1                                                          URBIN     996
         DO 340 I = 1, NUMSRC                                           URBIN     997
C                                                                       URBIN     998
C                                                                       URBIN     999
            IF(SEARCH(I).EQ.'PRINT FLAG')THEN                           URBIN    1000
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1001
                  PRINT = .FALSE.                                       URBIN    1002
               ELSE                                                     URBIN    1003
                  IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.          URBIN    1004
     1                CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN         URBIN    1005
                     PRINT = .TRUE.                                     URBIN    1006
                  ELSE                                                  URBIN    1007
                     PRINT = .FALSE.                                    URBIN    1008
                  ENDIF                                                 URBIN    1009
                  IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                   URBIN    1010
                     WRITE(MSG(1),9008) SUBNAM                          URBIN    1011
                     WRITE(MSG(2),9009) TNAME                           URBIN    1012
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN    1013
                     WRITE(MSG(4),9901)                                 URBIN    1014
                     CALL PRTMSG(4)                                     URBIN    1015
                  ENDIF                                                 URBIN    1016
               ENDIF                                                    URBIN    1017
               J = J + 1                                                URBIN    1018
C                                                                       URBIN    1019
C                                                                       URBIN    1020
            ELSEIF(SEARCH(I).EQ.'AC BUS NAME')THEN                      URBIN    1021
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1022
                  NODEAC = STARS                                        URBIN    1023
               ELSE                                                     URBIN    1024
                  NODEAC = CDATA(I)                                     URBIN    1025
                  IF(NODEAC .NE. CDATA(I))THEN                          URBIN    1026
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1027
               WRITE(MSG(2),9001) TNAME                                 URBIN    1028
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1029
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1030
               WRITE(MSG(5),9004) NODEAC                                URBIN    1031
               WRITE(MSG(6),9005)                                       URBIN    1032
               CALL PRTMSG(6)                                           URBIN    1033
                     IERCNT = IERCNT + 1                                URBIN    1034
                  ENDIF                                                 URBIN    1035
               ENDIF                                                    URBIN    1036
C                                                                       URBIN    1037
C                                                                       URBIN    1038
            ELSEIF(SEARCH(I).EQ.'KV')THEN                               URBIN    1039
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN    1040
                  CKV = CDATA(I)                                        URBIN    1041
                ENDIF                                                   URBIN    1042
               J = J + 1                                                URBIN    1043
C                                                                       URBIN    1044
C                                                                       URBIN    1045
            ELSEIF(SEARCH(I).EQ.'BUS NAME 1')THEN                       URBIN    1046
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1047
                  LINEAC(1:8) = STARS                                   URBIN    1048
               ELSE                                                     URBIN    1049
                  LINEAC(1:8) = CDATA(I)                                URBIN    1050
                  IF(LINEAC(1:8) .NE. CDATA(I))THEN                     URBIN    1051
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1052
               WRITE(MSG(2),9001) TNAME                                 URBIN    1053
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1054
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1055
               WRITE(MSG(5),9004) LINEAC(1:8)                           URBIN    1056
               WRITE(MSG(6),9005)                                       URBIN    1057
               CALL PRTMSG(6)                                           URBIN    1058
                     IERCNT = IERCNT + 1                                URBIN    1059
                  ENDIF                                                 URBIN    1060
               ENDIF                                                    URBIN    1061
C                                                                       URBIN    1062
C                                                                       URBIN    1063
            ELSEIF(SEARCH(I).EQ.'KV 1')THEN                             URBIN    1064
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1065
                  CKV1 = STARS                                          URBIN    1066
               ELSE                                                     URBIN    1067
                  CKV1 = CDATA(I)                                       URBIN    1068
                  IF(CKV1 .NE. CDATA(I))THEN                            URBIN    1069
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1070
               WRITE(MSG(2),9001) TNAME                                 URBIN    1071
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1072
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1073
               WRITE(MSG(5),9004) CKV1                                  URBIN    1074
               WRITE(MSG(6),9005)                                       URBIN    1075
               CALL PRTMSG(6)                                           URBIN    1076
                     IERCNT = IERCNT + 1                                URBIN    1077
                  ENDIF                                                 URBIN    1078
               ENDIF                                                    URBIN    1079
C                                                                       URBIN    1080
C                                                                       URBIN    1081
            ELSEIF(SEARCH(I).EQ.'BUS NAME 2')THEN                       URBIN    1082
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1083
                  LINEAC(9:16) = STARS                                  URBIN    1084
               ELSE                                                     URBIN    1085
                  LINEAC(9:16) = CDATA(I)                               URBIN    1086
                  IF(LINEAC(9:16) .NE. CDATA(I))THEN                    URBIN    1087
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1088
               WRITE(MSG(2),9001) TNAME                                 URBIN    1089
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1090
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1091
               WRITE(MSG(5),9004) LINEAC(9:16)                          URBIN    1092
               WRITE(MSG(6),9005)                                       URBIN    1093
               CALL PRTMSG(6)                                           URBIN    1094
                     IERCNT = IERCNT + 1                                URBIN    1095
                  ENDIF                                                 URBIN    1096
               ENDIF                                                    URBIN    1097
C                                                                       URBIN    1098
C                                                                       URBIN    1099
            ELSEIF(SEARCH(I).EQ.'KV 2')THEN                             URBIN    1100
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1101
                  CKV2 = STARS                                          URBIN    1102
               ELSE                                                     URBIN    1103
                  CKV2 = CDATA(I)                                       URBIN    1104
                  IF(CKV2 .NE. CDATA(I))THEN                            URBIN    1105
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1106
               WRITE(MSG(2),9001) TNAME                                 URBIN    1107
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1108
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1109
               WRITE(MSG(5),9004) CKV2                                  URBIN    1110
               WRITE(MSG(6),9005)                                       URBIN    1111
               CALL PRTMSG(6)                                           URBIN    1112
                     IERCNT = IERCNT + 1                                URBIN    1113
                  ENDIF                                                 URBIN    1114
               ENDIF                                                    URBIN    1115
C                                                                       URBIN    1116
C                                                                       URBIN    1117
            ELSEIF(SEARCH(I).EQ.'CIRCUIT NUMBER')THEN                   URBIN    1118
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1119
                  LINEAC(17:17) = STARS                                 URBIN    1120
               ELSE                                                     URBIN    1121
                  LINEAC(17:17) = CDATA(I)                              URBIN    1122
                  IF(LINEAC(17:17) .NE. CDATA(I))THEN                   URBIN    1123
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1124
               WRITE(MSG(2),9001) TNAME                                 URBIN    1125
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1126
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1127
               WRITE(MSG(5),9004) LINEAC(17:17)                         URBIN    1128
               WRITE(MSG(6),9005)                                       URBIN    1129
               CALL PRTMSG(6)                                           URBIN    1130
                     IERCNT = IERCNT + 1                                URBIN    1131
                  ENDIF                                                 URBIN    1132
               ENDIF                                                    URBIN    1133
            ENDIF                                                       URBIN    1134
340      CONTINUE                                                       URBIN    1135
C                                                                       URBIN    1136
C---------------------------------------------------------------------  URBIN    1137
C                                                                       URBIN    1138
C        Store data.                                                    URBIN    1139
C                                                                       URBIN    1140
         IUNIPT(IUDC) = 0                                               URBIN    1141
         IUDPPT(IUDC) = 0                                               URBIN    1142
         IUDRPT(IUDC) = 0                                               URBIN    1143
         IUDSPT(IUDC) = 0                                               URBIN    1144
C                                                                       URBIN    1145
         DO 400 I = 1, JCOUNT                                           URBIN    1146
C                                                                       URBIN    1147
C                                                                       URBIN    1148
C           a)   Store print flag.                                      URBIN    1149
C                                                                       URBIN    1150
            IF(LOOK(I).EQ.'PRINT FLAG')THEN                             URBIN    1151
               UDPRNT(IUDC) = PRINT                                     URBIN    1152
C                                                                       URBIN    1153
C                                                                       URBIN    1154
C                                                                       URBIN    1155
C           b)   Store ac line.                                         URBIN    1156
C                                                                       URBIN    1157
            ELSEIF(LOOK(I).EQ.'AC LINE')THEN                            URBIN    1158
               NAME2(1:8) = LINEAC(1:8)                                 URBIN    1159
               NAME2(9:12) = CKV1(1:4)                                  URBIN    1160
               NAME2(13:20) = LINEAC(9:16)                              URBIN    1161
               NAME2(21:24) = CKV2(1:4)                                 URBIN    1162
               NAME2(25:25) = LINEAC(17:17)                             URBIN    1163
               CALL ACLINE (NAME2, LOCN1, LOCN2, LOCN)                  URBIN    1164
C                                                                       URBIN    1165
               IF(LOCN.EQ.0)THEN                                        URBIN    1166
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    1167
                     WRITE(MSG(2),9001) TNAME                           URBIN    1168
                     WRITE(MSG(3),9208) BNAME(1:LEN),NAME2              URBIN    1169
                     WRITE(MSG(4),9209)                                 URBIN    1170
                     WRITE(MSG(5),9005)                                 URBIN    1171
                     CALL PRTMSG(5)                                     URBIN    1172
                  IERCNT = IERCNT + 1                                   URBIN    1173
               ENDIF                                                    URBIN    1174
C                                                                       URBIN    1175
C              Store values in identification list.                     URBIN    1176
C                                                                       URBIN    1177
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    1178
               IF(LOCN1.EQ.0)THEN                                       URBIN    1179
                  UIDENT(IADDI) = STARS                                 URBIN    1180
               ELSE                                                     URBIN    1181
                  IUDINT(IADDI) = LOCN1                                 URBIN    1182
               ENDIF                                                    URBIN    1183
C                                                                       URBIN    1184
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    1185
               IF(LOCN2.EQ.0)THEN                                       URBIN    1186
                  UIDENT(IADDI) = STARS                                 URBIN    1187
               ELSE                                                     URBIN    1188
                  IUDINT(IADDI) = LOCN2                                 URBIN    1189
               ENDIF                                                    URBIN    1190
C                                                                       URBIN    1191
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    1192
               IF(LOCN.EQ.0)THEN                                        URBIN    1193
                  UIDENT(IADDI) = STARS                                 URBIN    1194
               ELSE                                                     URBIN    1195
                  IUDINT(IADDI) = LOCN                                  URBIN    1196
               ENDIF                                                    URBIN    1197
C                                                                       URBIN    1198
C                                                                       URBIN    1199
C                                                                       URBIN    1200
C           c)   Store ac bus name.                                     URBIN    1201
C                                                                       URBIN    1202
            ELSEIF(LOOK(I).EQ.'AC BUS NAME')THEN                        URBIN    1203
               IF(NODEAC.EQ.STARS)THEN                                  URBIN    1204
                  LOCN = 0                                              URBIN    1205
               ELSE                                                     URBIN    1206
                  NAME1(1:8) = NODEAC(1:8)                              URBIN    1207
                  NAME1(9:12) = CKV(1:4)                                URBIN    1208
                  CALL ACFIND (NAME1, NP, LOCN)                         URBIN    1209
C                                                                       URBIN    1210
                  IF(LOCN.EQ.0)THEN                                     URBIN    1211
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    1212
                     WRITE(MSG(2),9001) TNAME                           URBIN    1213
                     WRITE(MSG(3),9212) BNAME(1:LEN),NODEAC             URBIN    1214
                     WRITE(MSG(4),9213)                                 URBIN    1215
                     WRITE(MSG(5),9005)                                 URBIN    1216
                     CALL PRTMSG(5)                                     URBIN    1217
                     IERCNT = IERCNT + 1                                URBIN    1218
                  ENDIF                                                 URBIN    1219
               ENDIF                                                    URBIN    1220
C                                                                       URBIN    1221
C              Store value in identification list.                      URBIN    1222
C                                                                       URBIN    1223
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    1224
               IF(LOCN.EQ.0)THEN                                        URBIN    1225
                  UIDENT(IADDI) = STARS                                 URBIN    1226
               ELSE                                                     URBIN    1227
                  IUDINT(IADDI) = LOCN                                  URBIN    1228
               ENDIF                                                    URBIN    1229
C                                                                       URBIN    1230
            ENDIF                                                       URBIN    1231
C                                                                       URBIN    1232
400      CONTINUE                                                       URBIN    1233
      ENDIF                                                             URBIN    1234
C                                                                       URBIN    1235
C---------------------------------------------------------------------  URBIN    1236
C                                                                       URBIN    1237
C     For debugging purposes:  dump all valid data.  For invalid        URBIN    1238
C     data a not defined message will be printed.                       URBIN    1239
C                                                                       URBIN    1240
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    1241
C                                                                       URBIN    1242
         DO 420 I = 1, NUMSRC                                           URBIN    1243
            N = LENGTH(I) + 1                                           URBIN    1244
            SEARCH(I)(N:N) = ':'                                        URBIN    1245
C                                                                       URBIN    1246
            IF(TYPE(I).EQ.'CHAR')THEN                                   URBIN    1247
               IF(LDEB) THEN                                            URBIN    1248
                  WRITE (IUD6,9010) SEARCH(I), CDATA(I)                 URBIN    1249
               ELSE                                                     URBIN    1250
                  WRITE (IU16,9010) SEARCH(I), CDATA(I)                 URBIN    1251
               ENDIF                                                    URBIN    1252
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    1253
               IF(LDEB) THEN                                            URBIN    1254
                  WRITE (IUD6,9012) SEARCH(I), RDATA(I)                 URBIN    1255
               ELSE                                                     URBIN    1256
                  WRITE (IU16,9012) SEARCH(I), RDATA(I)                 URBIN    1257
               ENDIF                                                    URBIN    1258
            ELSEIF(TYPE(I).EQ.'INTE')THEN                               URBIN    1259
               IF(LDEB) THEN                                            URBIN    1260
                  WRITE (IUD6,9014) SEARCH(I), IDATA(I)                 URBIN    1261
               ELSE                                                     URBIN    1262
                  WRITE (IU16,9014) SEARCH(I), IDATA(I)                 URBIN    1263
               ENDIF                                                    URBIN    1264
            ELSEIF(TYPE(I).EQ.' ')THEN                                  URBIN    1265
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    1266
                  CALL PRTMSG(1)                                        URBIN    1267
            ENDIF                                                       URBIN    1268
C                                                                       URBIN    1269
420      CONTINUE                                                       URBIN    1270
      ENDIF                                                             URBIN    1271
C                                                                       URBIN    1272
      IF(DEFINE)THEN                                                    URBIN    1273
         IUDC = IUDC - 1                                                URBIN    1274
      ENDIF                                                             URBIN    1275
C                                                                       URBIN    1276
      RETURN                                                            URBIN    1277
C                                                                       URBIN    1278
C                                                                       URBIN    1279
C---------------------------------------------------------------------  URBIN    1280
C                                                                       URBIN    1281
      ENTRY URFRDC                                                      URBIN    1282
CD -------------------------------------------------------------------  URBIN    1283
CD                                                                      URBIN    1284
CD              *****     URFRDCD ROUTINE   *****                       URBIN    1285
CD                                                                      URBIN    1286
CD -------------------------------------------------------------------  URBIN    1287
CD                                                                      URBIN    1288
CD       PURPOSE:  Controls the reading of the udc type FROMDC data     URBIN    1289
CD                 from the input file.  Does limited error checking.   URBIN    1290
CD                 Stores valid data in the udc storage arrays.         URBIN    1291
CD                                                                      URBIN    1292
CD -------------------------------------------------------------------  URBIN    1293
C                                                                       URBIN    1294
C     Define subroutine name.                                           URBIN    1295
C                                                                       URBIN    1296
      LDEB=(JDEB(301).NE.0)                                             URBIN    1297
C                                                                       URBIN    1298
      IF(SDBG)THEN                                                      URBIN    1299
         SUBNAM = 'URFRDC ROUTINE.'                                     URBIN    1300
      ELSE                                                              URBIN    1301
         SUBNAM = ' '                                                   URBIN    1302
      END IF                                                            URBIN    1303
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN    1304
      BNAME = UDNAME(IUDC)                                              URBIN    1305
      LEN = IUDLEN(IUDC)                                                URBIN    1306
C                                                                       URBIN    1307
C     Forces an interrupted card image if an error is found.            URBIN    1308
C                                                                       URBIN    1309
      JDCOUN = IERCNT                                                   URBIN    1310
      DPRINT = .FALSE.                                                  URBIN    1311
C                                                                       URBIN    1312
      IF(EXPAND)THEN                                                    URBIN    1313
C                                                                       URBIN    1314
C        Obtain the subtype name from the saved information for this    URBIN    1315
C        structure.                                                     URBIN    1316
C                                                                       URBIN    1317
         SNAME = SBFRDC(IUDSUB(IUDC))                                   URBIN    1318
C                                                                       URBIN    1319
      ELSE                                                              URBIN    1320
C                                                                       URBIN    1321
C        Read the subtype name.                                         URBIN    1322
C                                                                       URBIN    1323
         ENDBLK = .FALSE.                                               URBIN    1324
         CALL URGETC (CDATA(1), FOUND)                                  URBIN    1325
         IF(.NOT. FOUND)THEN                                            URBIN    1326
            SNAME = STARS                                               URBIN    1327
         ELSE                                                           URBIN    1328
            SNAME = CDATA(1)                                            URBIN    1329
            IF(SNAME .NE. CDATA(1))THEN                                 URBIN    1330
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1331
               WRITE(MSG(2),9001) TNAME                                 URBIN    1332
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1333
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN    1334
               WRITE(MSG(5),9004) SNAME                                 URBIN    1335
               WRITE(MSG(6),9005)                                       URBIN    1336
               CALL PRTMSG(6)                                           URBIN    1337
               IERCNT = IERCNT + 1                                      URBIN    1338
            END IF                                                      URBIN    1339
         END IF                                                         URBIN    1340
      END IF                                                            URBIN    1341
C                                                                       URBIN    1342
C---------------------------------------------------------------------  URBIN    1343
C                                                                       URBIN    1344
C     Determine the required variables and the number number of         URBIN    1345
C     required variables needed.                                        URBIN    1346
C                                                                       URBIN    1347
C     VCONV                                                             URBIN    1348
C                                                                       URBIN    1349
      IF(SNAME.EQ.SBFRDC(IVCONV))THEN                                   URBIN    1350
         IUDSUB(IUDC) = IVCONV                                          URBIN    1351
         JCOUNT = 2                                                     URBIN    1352
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1353
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1354
C                                                                       URBIN    1355
C     ICONV                                                             URBIN    1356
C                                                                       URBIN    1357
      ELSEIF(SNAME.EQ.SBFRDC(ICONVS))THEN                               URBIN    1358
         IUDSUB(IUDC) = ICONVS                                          URBIN    1359
         JCOUNT = 2                                                     URBIN    1360
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1361
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1362
C                                                                       URBIN    1363
C     VNODE                                                             URBIN    1364
C                                                                       URBIN    1365
      ELSEIF(SNAME.EQ.SBFRDC(IVNODE))THEN                               URBIN    1366
         IUDSUB(IUDC) = IVNODE                                          URBIN    1367
         JCOUNT = 2                                                     URBIN    1368
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1369
         LOOK(2) = 'DC NODE NAME'                                       URBIN    1370
C                                                                       URBIN    1371
C     INODE                                                             URBIN    1372
C                                                                       URBIN    1373
      ELSEIF(SNAME.EQ.SBFRDC(INODES))THEN                               URBIN    1374
         IUDSUB(IUDC) = INODES                                          URBIN    1375
         JCOUNT = 2                                                     URBIN    1376
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1377
         LOOK(2) = 'DC NODE NAME'                                       URBIN    1378
C                                                                       URBIN    1379
C     ALFA                                                              URBIN    1380
C                                                                       URBIN    1381
      ELSEIF(SNAME.EQ.SBFRDC(IALFAS))THEN                               URBIN    1382
         IUDSUB(IUDC) = IALFAS                                          URBIN    1383
         JCOUNT = 2                                                     URBIN    1384
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1385
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1386
C                                                                       URBIN    1387
C     GAMA                                                              URBIN    1388
C                                                                       URBIN    1389
      ELSEIF(SNAME.EQ.SBFRDC(IGAMAS))THEN                               URBIN    1390
         IUDSUB(IUDC) = IGAMAS                                          URBIN    1391
         JCOUNT = 2                                                     URBIN    1392
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1393
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1394
C                                                                       URBIN    1395
C     PAC                                                               URBIN    1396
C                                                                       URBIN    1397
      ELSEIF(SNAME.EQ.SBFRDC(IPACS))THEN                                URBIN    1398
         IUDSUB(IUDC) = IPACS                                           URBIN    1399
         JCOUNT = 2                                                     URBIN    1400
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1401
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1402
C                                                                       URBIN    1403
C     QAC                                                               URBIN    1404
C                                                                       URBIN    1405
      ELSEIF(SNAME.EQ.SBFRDC(IQACS))THEN                                URBIN    1406
         IUDSUB(IUDC) = IQACS                                           URBIN    1407
         JCOUNT = 2                                                     URBIN    1408
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1409
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1410
C                                                                       URBIN    1411
C     VCOMM (commutation voltage)                                       URBIN    1412
C                                                                       URBIN    1413
      ELSEIF(SNAME.EQ.SBFRDC(IVCOMM))THEN                               URBIN    1414
         IUDSUB(IUDC) = IVCOMM                                          URBIN    1415
         JCOUNT = 2                                                     URBIN    1416
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1417
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1418
C                                                                       URBIN    1419
C     XC                                                                URBIN    1420
C                                                                       URBIN    1421
      ELSEIF(SNAME.EQ.SBFRDC(IXCS))THEN                                 URBIN    1422
         IUDSUB(IUDC) = IXCS                                            URBIN    1423
         JCOUNT = 2                                                     URBIN    1424
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1425
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1426
C                                                                       URBIN    1427
C     TAP                                                               URBIN    1428
C                                                                       URBIN    1429
      ELSEIF(SNAME.EQ.SBFRDC(ITAPS))THEN                                URBIN    1430
         IUDSUB(IUDC) = ITAPS                                           URBIN    1431
         JCOUNT = 2                                                     URBIN    1432
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1433
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1434
C                                                                       URBIN    1435
C     Commutation failure monitor                                       URBIN    1436
C                                                                       URBIN    1437
      ELSEIF(SNAME.EQ.SBFRDC(ICOMFL))THEN                               URBIN    1438
         IUDSUB(IUDC) = ICOMFL                                          URBIN    1439
         JCOUNT = 2                                                     URBIN    1440
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1441
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1442
C                                                                       URBIN    1443
C     Blocking monitor                                                  URBIN    1444
C                                                                       URBIN    1445
      ELSEIF(SNAME.EQ.SBFRDC(JBLOCK))THEN                               URBIN    1446
         IUDSUB(IUDC) = JBLOCK                                          URBIN    1447
         JCOUNT = 2                                                     URBIN    1448
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1449
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1450
C                                                                       URBIN    1451
C     Iline                                                             URBIN    1452
C                                                                       URBIN    1453
      ELSEIF(SNAME.EQ.SBFRDC(ILINES))THEN                               URBIN    1454
         IUDSUB(IUDC) = ILINES                                          URBIN    1455
         JCOUNT = 2                                                     URBIN    1456
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1457
         LOOK(2) = 'DC LINE'                                            URBIN    1458
C                                                                       URBIN    1459
C     I-Shunt capacitor                                                 URBIN    1460
C                                                                       URBIN    1461
      ELSEIF(SNAME.EQ.SBFRDC(ICAPS))THEN                                URBIN    1462
         IUDSUB(IUDC) = ICAPS                                           URBIN    1463
         JCOUNT = 2                                                     URBIN    1464
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1465
         LOOK(2) = 'DC LINE'                                            URBIN    1466
C                                                                       URBIN    1467
C     Pline                                                             URBIN    1468
C                                                                       URBIN    1469
      ELSEIF(SNAME.EQ.SBFRDC(IPLINE))THEN                               URBIN    1470
         IUDSUB(IUDC) = IPLINE                                          URBIN    1471
         JCOUNT = 2                                                     URBIN    1472
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1473
         LOOK(2) = 'DC LINE'                                            URBIN    1474
C                                                                       URBIN    1475
C     Bridge                                                            URBIN    1476
C                                                                       URBIN    1477
      ELSEIF(SNAME.EQ.SBFRDC(IBRDGE))THEN                               URBIN    1478
         IUDSUB(IUDC) = IBRDGE                                          URBIN    1479
         JCOUNT = 2                                                     URBIN    1480
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1481
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1482
C                                                                       URBIN    1483
C     First line capacitance.                                           URBIN    1484
C                                                                       URBIN    1485
      ELSEIF(SNAME.EQ.SBFRDC(ICL1S))THEN                                URBIN    1486
         IUDSUB(IUDC) = ICL1S                                           URBIN    1487
         JCOUNT = 2                                                     URBIN    1488
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1489
         LOOK(2) = 'DC LINE'                                            URBIN    1490
C                                                                       URBIN    1491
C     Second line capacitance.                                          URBIN    1492
C                                                                       URBIN    1493
      ELSEIF(SNAME.EQ.SBFRDC(ICL2S))THEN                                URBIN    1494
         IUDSUB(IUDC) = ICL2S                                           URBIN    1495
         JCOUNT = 2                                                     URBIN    1496
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1497
         LOOK(2) = 'DC LINE'                                            URBIN    1498
C                                                                       URBIN    1499
C     Line inductance.                                                  URBIN    1500
C                                                                       URBIN    1501
      ELSEIF(SNAME.EQ.SBFRDC(LLS))THEN                                  URBIN    1502
         IUDSUB(IUDC) = LLS                                             URBIN    1503
         JCOUNT = 2                                                     URBIN    1504
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1505
         LOOK(2) = 'DC LINE'                                            URBIN    1506
C                                                                       URBIN    1507
C     Line resistance.                                                  URBIN    1508
C                                                                       URBIN    1509
      ELSEIF(SNAME.EQ.SBFRDC(IRLS))THEN                                 URBIN    1510
         IUDSUB(IUDC) = IRLS                                            URBIN    1511
         JCOUNT = 2                                                     URBIN    1512
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1513
         LOOK(2) = 'DC LINE'                                            URBIN    1514
C                                                                       URBIN    1515
C     Run mode subtype.                                                 URBIN    1516
C                                                                       URBIN    1517
      ELSEIF(SNAME.EQ.SBFRDC(IRMODE))THEN                               URBIN    1518
         IUDSUB(IUDC) = IRMODE                                          URBIN    1519
         JCOUNT = 2                                                     URBIN    1520
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1521
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1522
C                                                                       URBIN    1523
C     Initial mode subtype.                                             URBIN    1524
C                                                                       URBIN    1525
      ELSEIF(SNAME.EQ.SBFRDC(IMODES))THEN                               URBIN    1526
         IUDSUB(IUDC) = IMODES                                          URBIN    1527
         JCOUNT = 2                                                     URBIN    1528
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1529
         LOOK(2) = 'DC CONVERTER'                                       URBIN    1530
C                                                                       URBIN    1531
C     Voltage difference.                                               URBIN    1532
C                                                                       URBIN    1533
      ELSEIF(SNAME.EQ.SBFRDC(IVDIFF))THEN                               URBIN    1534
         IUDSUB(IUDC) = IVDIFF                                          URBIN    1535
         JCOUNT = 3                                                     URBIN    1536
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1537
         LOOK(2) = 'DC NODE NAME 1'                                     URBIN    1538
         LOOK(3) = 'DC NODE NAME 2'                                     URBIN    1539
C                                                                       URBIN    1540
C     Breaker current.                                                  URBIN    1541
C                                                                       URBIN    1542
      ELSEIF(SNAME.EQ.SBFRDC(IBRKRS))THEN                               URBIN    1543
         IUDSUB(IUDC) = IBRKRS                                          URBIN    1544
         JCOUNT = 2                                                     URBIN    1545
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1546
         LOOK(2) = 'DC BREAKER'                                         URBIN    1547
C                                                                       URBIN    1548
C     Breaker status.                                                   URBIN    1549
C                                                                       URBIN    1550
      ELSEIF(SNAME.EQ.SBFRDC(ISBRKR))THEN                               URBIN    1551
         IUDSUB(IUDC) = ISBRKR                                          URBIN    1552
         JCOUNT = 2                                                     URBIN    1553
         LOOK(1) = 'PRINT FLAG'                                         URBIN    1554
         LOOK(2) = 'DC BREAKER'                                         URBIN    1555
C                                                                       URBIN    1556
C     Invalid subtype.                                                  URBIN    1557
C                                                                       URBIN    1558
      ELSE                                                              URBIN    1559
         JCOUNT = 0                                                     URBIN    1560
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1561
               WRITE(MSG(2),9001) TNAME                                 URBIN    1562
               WRITE(MSG(3),9006) BNAME(1:LEN),SNAME                    URBIN    1563
               WRITE(MSG(4),9007)                                       URBIN    1564
               WRITE(MSG(5),9005)                                       URBIN    1565
               CALL PRTMSG(5)                                           URBIN    1566
         IERCNT = IERCNT + 1                                            URBIN    1567
      END IF                                                            URBIN    1568
C                                                                       URBIN    1569
C---------------------------------------------------------------------  URBIN    1570
C                                                                       URBIN    1571
C     Based on the variables required, determine the required data      URBIN    1572
C     names, the number of searches, and the length of the data         URBIN    1573
C     names.                                                            URBIN    1574
C                                                                       URBIN    1575
      NUMSRC = 0                                                        URBIN    1576
      DO 520 I = 1, JCOUNT                                              URBIN    1577
C                                                                       URBIN    1578
C                                                                       URBIN    1579
         IF(LOOK(I).EQ.'PRINT FLAG')THEN                                URBIN    1580
            NUMSRC = NUMSRC + 1                                         URBIN    1581
            SEARCH(NUMSRC) = LOOK(I)                                    URBIN    1582
            LENGTH(NUMSRC) = 10                                         URBIN    1583
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1584
C                                                                       URBIN    1585
C                                                                       URBIN    1586
         ELSEIF(LOOK(I).EQ.'DC CONVERTER')THEN                          URBIN    1587
            NUMSRC = NUMSRC + 1                                         URBIN    1588
            SEARCH(NUMSRC) = 'DC NODE NAME 1'                           URBIN    1589
            LENGTH(NUMSRC) = 14                                         URBIN    1590
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1591
C                                                                       URBIN    1592
            NUMSRC = NUMSRC + 1                                         URBIN    1593
            SEARCH(NUMSRC) = 'DC NODE NAME 2'                           URBIN    1594
            LENGTH(NUMSRC) = 14                                         URBIN    1595
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1596
C                                                                       URBIN    1597
            NUMSRC = NUMSRC + 1                                         URBIN    1598
            SEARCH(NUMSRC) = 'AC NAME'                                  URBIN    1599
            LENGTH(NUMSRC) = 7                                          URBIN    1600
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1601
C                                                                       URBIN    1602
            NUMSRC = NUMSRC + 1                                         URBIN    1603
            SEARCH(NUMSRC) = 'KV'                                       URBIN    1604
            LENGTH(NUMSRC) = 2                                          URBIN    1605
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1606
C                                                                       URBIN    1607
            NUMSRC = NUMSRC + 1                                         URBIN    1608
            SEARCH(NUMSRC) = 'CIRCUIT NUMBER'                           URBIN    1609
            LENGTH(NUMSRC) = 14                                         URBIN    1610
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1611
C                                                                       URBIN    1612
C                                                                       URBIN    1613
         ELSEIF(LOOK(I).EQ.'DC NODE NAME')THEN                          URBIN    1614
            NUMSRC = NUMSRC + 1                                         URBIN    1615
            SEARCH(NUMSRC) = LOOK(I)                                    URBIN    1616
            LENGTH(NUMSRC) = 12                                         URBIN    1617
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1618
C                                                                       URBIN    1619
C                                                                       URBIN    1620
         ELSEIF(LOOK(I).EQ.'DC NODE NAME 1' .OR.                        URBIN    1621
     1            LOOK(I).EQ.'DC NODE NAME 2')THEN                      URBIN    1622
            NUMSRC = NUMSRC + 1                                         URBIN    1623
            SEARCH(NUMSRC) = LOOK(I)                                    URBIN    1624
            LENGTH(NUMSRC) = 14                                         URBIN    1625
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1626
C                                                                       URBIN    1627
C                                                                       URBIN    1628
         ELSEIF(LOOK(I).EQ.'DC LINE')THEN                               URBIN    1629
            NUMSRC = NUMSRC + 1                                         URBIN    1630
            SEARCH(NUMSRC) = 'DC NODE NAME 1'                           URBIN    1631
            LENGTH(NUMSRC) = 14                                         URBIN    1632
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1633
C                                                                       URBIN    1634
            NUMSRC = NUMSRC + 1                                         URBIN    1635
            SEARCH(NUMSRC) = 'DC NODE NAME 2'                           URBIN    1636
            LENGTH(NUMSRC) = 14                                         URBIN    1637
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1638
C                                                                       URBIN    1639
            NUMSRC = NUMSRC + 1                                         URBIN    1640
            SEARCH(NUMSRC) = 'CIRCUIT NUMBER'                           URBIN    1641
            LENGTH(NUMSRC) = 14                                         URBIN    1642
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1643
C                                                                       URBIN    1644
         ELSEIF(LOOK(I).EQ.'DC BREAKER')THEN                            URBIN    1645
            NUMSRC = NUMSRC + 1                                         URBIN    1646
            SEARCH(NUMSRC) = 'DC NODE NAME 1'                           URBIN    1647
            LENGTH(NUMSRC) = 14                                         URBIN    1648
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1649
C                                                                       URBIN    1650
            NUMSRC = NUMSRC + 1                                         URBIN    1651
            SEARCH(NUMSRC) = 'DC NODE NAME 2'                           URBIN    1652
            LENGTH(NUMSRC) = 14                                         URBIN    1653
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1654
C                                                                       URBIN    1655
            NUMSRC = NUMSRC + 1                                         URBIN    1656
            SEARCH(NUMSRC) = 'CIRCUIT NUMBER'                           URBIN    1657
            LENGTH(NUMSRC) = 14                                         URBIN    1658
            TYPE(NUMSRC) = 'CHAR'                                       URBIN    1659
         END IF                                                         URBIN    1660
520   CONTINUE                                                          URBIN    1661
C                                                                       URBIN    1662
C---------------------------------------------------------------------  URBIN    1663
C                                                                       URBIN    1664
C     Retrieve the necessary data from the file.                        URBIN    1665
C                                                                       URBIN    1666
      JREPEA = 0                                                        URBIN    1667
      CALL URREAD (CDATA, RDATA, IDATA, JREPEA)                         URBIN    1668
C                                                                       URBIN    1669
C---------------------------------------------------------------------  URBIN    1670
C                                                                       URBIN    1671
C     For debuging purposes:  dump block name, type name and            URBIN    1672
C     number, and subtype name and number.                              URBIN    1673
C                                                                       URBIN    1674
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN    1675
         DPRINT = .TRUE.                                                URBIN    1676
      END IF                                                            URBIN    1677
C                                                                       URBIN    1678
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    1679
         IF(LDEB) THEN                                                  URBIN    1680
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    1681
     1                      IUDSUB(IUDC)                                URBIN    1682
         ELSE                                                           URBIN    1683
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    1684
     1                      IUDSUB(IUDC)                                URBIN    1685
C                                                                       URBIN    1686
         END IF                                                         URBIN    1687
      END IF                                                            URBIN    1688
C                                                                       URBIN    1689
C---------------------------------------------------------------------  URBIN    1690
C                                                                       URBIN    1691
      IF(DEFINE)THEN                                                    URBIN    1692
C                                                                       URBIN    1693
C        Save information in the structure linked list.                 URBIN    1694
C                                                                       URBIN    1695
         CALL ADDSTR (CDATA, RDATA, IDATA)                              URBIN    1696
C                                                                       URBIN    1697
C                                                                       URBIN    1698
      ELSE                                                              URBIN    1699
C                                                                       URBIN    1700
C        Group data into the variables that are needed for storage.     URBIN    1701
C                                                                       URBIN    1702
         J = 1                                                          URBIN    1703
         DO 540 I = 1, NUMSRC                                           URBIN    1704
C                                                                       URBIN    1705
C                                                                       URBIN    1706
            JSTORE = 0                                                  URBIN    1707
            KSTORE = 0                                                  URBIN    1708
            LSTORE = 0                                                  URBIN    1709
            IF(SEARCH(I).EQ.'PRINT FLAG')THEN                           URBIN    1710
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1711
                  PRINT = .FALSE.                                       URBIN    1712
               ELSE                                                     URBIN    1713
                  IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.          URBIN    1714
     1                CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN         URBIN    1715
                     PRINT = .TRUE.                                     URBIN    1716
                  ELSE                                                  URBIN    1717
                     PRINT = .FALSE.                                    URBIN    1718
                  END IF                                                URBIN    1719
                  IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                   URBIN    1720
                     WRITE(MSG(1),9008) SUBNAM                          URBIN    1721
                     WRITE(MSG(2),9009) TNAME                           URBIN    1722
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN    1723
                     WRITE(MSG(4),9901)                                 URBIN    1724
                     CALL PRTMSG(4)                                     URBIN    1725
                  END IF                                                URBIN    1726
               END IF                                                   URBIN    1727
               J = J + 1                                                URBIN    1728
C                                                                       URBIN    1729
C                                                                       URBIN    1730
C                                                                       URBIN    1731
            ELSEIF(SEARCH(I).EQ.'DC NODE NAME 1')THEN                   URBIN    1732
C                                                                       URBIN    1733
               IF(LOOK(J).EQ.'DC CONVERTER')THEN                        URBIN    1734
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1735
                     CONVDC(1:8) = STARS                                URBIN    1736
                  ELSE                                                  URBIN    1737
                     CONVDC(1:8) = CDATA(I)                             URBIN    1738
                     IF(CONVDC(1:8) .NE. CDATA(I))THEN                  URBIN    1739
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1740
               WRITE(MSG(2),9001) TNAME                                 URBIN    1741
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1742
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1743
               WRITE(MSG(5),9004) CONVDC(1:8)                           URBIN    1744
               WRITE(MSG(6),9005)                                       URBIN    1745
               CALL PRTMSG(6)                                           URBIN    1746
                        IERCNT = IERCNT + 1                             URBIN    1747
                     END IF                                             URBIN    1748
                  END IF                                                URBIN    1749
C                                                                       URBIN    1750
               ELSEIF(LOOK(J).EQ.'DC LINE')THEN                         URBIN    1751
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1752
                     NODE1 = STARS                                      URBIN    1753
                  ELSE                                                  URBIN    1754
                     NODE1 = CDATA(I)                                   URBIN    1755
                     IF(NODE1 .NE. CDATA(I))THEN                        URBIN    1756
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1757
               WRITE(MSG(2),9001) TNAME                                 URBIN    1758
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1759
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1760
               WRITE(MSG(5),9004) NODE1                                 URBIN    1761
               WRITE(MSG(6),9005)                                       URBIN    1762
               CALL PRTMSG(6)                                           URBIN    1763
                        IERCNT = IERCNT + 1                             URBIN    1764
                     END IF                                             URBIN    1765
                  END IF                                                URBIN    1766
                  LINEDC(1:8) = NODE1                                   URBIN    1767
                  NAME(9:16) = NODE1                                    URBIN    1768
C                                                                       URBIN    1769
               ELSEIF(LOOK(J).EQ.'DC BREAKER')THEN                      URBIN    1770
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1771
                     NODE1 = STARS                                      URBIN    1772
                  ELSE                                                  URBIN    1773
                     NODE1 = CDATA(I)                                   URBIN    1774
                     IF(NODE1 .NE. CDATA(I))THEN                        URBIN    1775
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1776
               WRITE(MSG(2),9001) TNAME                                 URBIN    1777
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1778
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1779
               WRITE(MSG(5),9004) NODE1                                 URBIN    1780
               WRITE(MSG(6),9005)                                       URBIN    1781
               CALL PRTMSG(6)                                           URBIN    1782
                        IERCNT = IERCNT + 1                             URBIN    1783
                     END IF                                             URBIN    1784
                  END IF                                                URBIN    1785
                  BRKRDC(1:8) = NODE1                                   URBIN    1786
                  NAME(9:16) = NODE1                                    URBIN    1787
C                                                                       URBIN    1788
               ELSE                                                     URBIN    1789
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1790
                     NODE1 = STARS                                      URBIN    1791
                  ELSE                                                  URBIN    1792
                     NODE1 = CDATA(I)                                   URBIN    1793
                     IF(NODE1 .NE. CDATA(I))THEN                        URBIN    1794
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1795
               WRITE(MSG(2),9001) TNAME                                 URBIN    1796
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1797
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1798
               WRITE(MSG(5),9004) NODE1                                 URBIN    1799
               WRITE(MSG(6),9005)                                       URBIN    1800
               CALL PRTMSG(6)                                           URBIN    1801
                        IERCNT = IERCNT + 1                             URBIN    1802
                     END IF                                             URBIN    1803
                  END IF                                                URBIN    1804
               END IF                                                   URBIN    1805
C                                                                       URBIN    1806
C                                                                       URBIN    1807
C                                                                       URBIN    1808
            ELSEIF(SEARCH(I).EQ.'DC NODE NAME 2')THEN                   URBIN    1809
               IF(LOOK(J).EQ.'DC CONVERTER')THEN                        URBIN    1810
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1811
                     CONVDC(9:16) = STARS                               URBIN    1812
                  ELSE                                                  URBIN    1813
                     CONVDC(9:16) = CDATA(I)                            URBIN    1814
                     IF(CONVDC(9:16) .NE. CDATA(I))THEN                 URBIN    1815
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1816
               WRITE(MSG(2),9001) TNAME                                 URBIN    1817
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1818
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1819
               WRITE(MSG(5),9004) CONVDC(9:16)                          URBIN    1820
               WRITE(MSG(6),9005)                                       URBIN    1821
               CALL PRTMSG(6)                                           URBIN    1822
                        IERCNT = IERCNT + 1                             URBIN    1823
                     END IF                                             URBIN    1824
                  END IF                                                URBIN    1825
C                                                                       URBIN    1826
               ELSEIF(LOOK(J).EQ.'DC LINE')THEN                         URBIN    1827
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1828
                     NODE2 = STARS                                      URBIN    1829
                  ELSE                                                  URBIN    1830
                     NODE2 = CDATA(I)                                   URBIN    1831
                     IF(NODE2 .NE. CDATA(I))THEN                        URBIN    1832
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1833
               WRITE(MSG(2),9001) TNAME                                 URBIN    1834
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1835
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1836
               WRITE(MSG(5),9004) NODE2                                 URBIN    1837
               WRITE(MSG(6),9005)                                       URBIN    1838
               CALL PRTMSG(6)                                           URBIN    1839
                        IERCNT = IERCNT + 1                             URBIN    1840
                     END IF                                             URBIN    1841
                  END IF                                                URBIN    1842
                  LINEDC(9:16) = NODE2                                  URBIN    1843
                  NAME(1:8) = NODE2                                     URBIN    1844
C                                                                       URBIN    1845
               ELSEIF(LOOK(J).EQ.'DC BREAKER')THEN                      URBIN    1846
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1847
                     NODE2 = STARS                                      URBIN    1848
                  ELSE                                                  URBIN    1849
                     NODE2 = CDATA(I)                                   URBIN    1850
                     IF(NODE2 .NE. CDATA(I))THEN                        URBIN    1851
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1852
               WRITE(MSG(2),9001) TNAME                                 URBIN    1853
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1854
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1855
               WRITE(MSG(5),9004) NODE2                                 URBIN    1856
               WRITE(MSG(6),9005)                                       URBIN    1857
               CALL PRTMSG(6)                                           URBIN    1858
                        IERCNT = IERCNT + 1                             URBIN    1859
                     END IF                                             URBIN    1860
                  END IF                                                URBIN    1861
                  BRKRDC(9:16) = NODE2                                  URBIN    1862
                  NAME(1:8) = NODE2                                     URBIN    1863
C                                                                       URBIN    1864
               ELSE                                                     URBIN    1865
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1866
                     NODE2 = STARS                                      URBIN    1867
                  ELSE                                                  URBIN    1868
                     NODE2 = CDATA(I)                                   URBIN    1869
                     IF(NODE2 .NE. CDATA(I))THEN                        URBIN    1870
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1871
               WRITE(MSG(2),9001) TNAME                                 URBIN    1872
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1873
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1874
               WRITE(MSG(5),9004) NODE2                                 URBIN    1875
               WRITE(MSG(6),9005)                                       URBIN    1876
               CALL PRTMSG(6)                                           URBIN    1877
                        IERCNT = IERCNT + 1                             URBIN    1878
                     END IF                                             URBIN    1879
                  END IF                                                URBIN    1880
               END IF                                                   URBIN    1881
C                                                                       URBIN    1882
C                                                                       URBIN    1883
C                                                                       URBIN    1884
            ELSEIF(SEARCH(I).EQ.'AC NAME')THEN                          URBIN    1885
C                                                                       URBIN    1886
               IF(LOOK(J).EQ.'DC CONVERTER')THEN                        URBIN    1887
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1888
                     CONVDC(17:24) = STARS                              URBIN    1889
                  ELSE                                                  URBIN    1890
                     CONVDC(17:24) = CDATA(I)                           URBIN    1891
                     IF(CONVDC(17:24) .NE. CDATA(I))THEN                URBIN    1892
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1893
               WRITE(MSG(2),9001) TNAME                                 URBIN    1894
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1895
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1896
               WRITE(MSG(5),9004) CONVDC(17:24)                         URBIN    1897
               WRITE(MSG(6),9005)                                       URBIN    1898
               CALL PRTMSG(6)                                           URBIN    1899
                        IERCNT = IERCNT + 1                             URBIN    1900
                     END IF                                             URBIN    1901
                  END IF                                                URBIN    1902
               END IF                                                   URBIN    1903
C                                                                       URBIN    1904
C                                                                       URBIN    1905
C                                                                       URBIN    1906
            ELSEIF(SEARCH(I).EQ.'KV')THEN                               URBIN    1907
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1908
                  CONVDC(25:28) = STARS                                 URBIN    1909
               ELSE                                                     URBIN    1910
                  CONVDC(25:28) = CDATA(I)                              URBIN    1911
                  IF(CONVDC(25:28) .NE. CDATA(I))THEN                   URBIN    1912
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1913
               WRITE(MSG(2),9001) TNAME                                 URBIN    1914
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1915
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1916
               WRITE(MSG(5),9004) CONVDC(25:28)                         URBIN    1917
               WRITE(MSG(6),9005)                                       URBIN    1918
               CALL PRTMSG(6)                                           URBIN    1919
                     IERCNT = IERCNT + 1                                URBIN    1920
                  END IF                                                URBIN    1921
               END IF                                                   URBIN    1922
C                                                                       URBIN    1923
C                                                                       URBIN    1924
C                                                                       URBIN    1925
            ELSEIF(SEARCH(I).EQ.'CIRCUIT NUMBER')THEN                   URBIN    1926
               IF(LOOK(J).EQ.'DC CONVERTER')THEN                        URBIN    1927
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1928
                     CONVDC(29:29) = STARS                              URBIN    1929
                  ELSE                                                  URBIN    1930
                     CONVDC(29:29) = CDATA(I)                           URBIN    1931
                     IF(CONVDC(29:29) .NE. CDATA(I))THEN                URBIN    1932
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1933
               WRITE(MSG(2),9001) TNAME                                 URBIN    1934
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1935
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1936
               WRITE(MSG(5),9004) CONVDC(29:29)                         URBIN    1937
               WRITE(MSG(6),9005)                                       URBIN    1938
               CALL PRTMSG(6)                                           URBIN    1939
                        IERCNT = IERCNT + 1                             URBIN    1940
                     END IF                                             URBIN    1941
                  END IF                                                URBIN    1942
                  J = J + 1                                             URBIN    1943
C                                                                       URBIN    1944
               ELSEIF(LOOK(J).EQ.'DC LINE')THEN                         URBIN    1945
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1946
                     LINEDC(17:17) = STARS                              URBIN    1947
                     NAME(17:17) = STARS                                URBIN    1948
                  ELSE                                                  URBIN    1949
                     LINEDC(17:17) = CDATA(I)                           URBIN    1950
                     NAME(17:17) = CDATA(I)                             URBIN    1951
                     IF(LINEDC(17:17) .NE. CDATA(I))THEN                URBIN    1952
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1953
               WRITE(MSG(2),9001) TNAME                                 URBIN    1954
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1955
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1956
               WRITE(MSG(5),9004) LINEDC(17:17)                         URBIN    1957
               WRITE(MSG(6),9005)                                       URBIN    1958
               CALL PRTMSG(6)                                           URBIN    1959
                        IERCNT = IERCNT + 1                             URBIN    1960
                     END IF                                             URBIN    1961
                  END IF                                                URBIN    1962
C                                                                       URBIN    1963
               ELSEIF(LOOK(J).EQ.'DC BREAKER')THEN                      URBIN    1964
                  IF(TYPE(I).EQ.' ')THEN                                URBIN    1965
                     BRKRDC(17:17) = STARS                              URBIN    1966
                     NAME(17:17) = STARS                                URBIN    1967
                  ELSE                                                  URBIN    1968
                     BRKRDC(17:17) = CDATA(I)                           URBIN    1969
                     NAME(17:17) = CDATA(I)                             URBIN    1970
                     IF(BRKRDC(17:17) .NE. CDATA(I))THEN                URBIN    1971
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1972
               WRITE(MSG(2),9001) TNAME                                 URBIN    1973
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1974
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1975
               WRITE(MSG(5),9004) LINEDC(17:17)                         URBIN    1976
               WRITE(MSG(6),9005)                                       URBIN    1977
               CALL PRTMSG(6)                                           URBIN    1978
                        IERCNT = IERCNT + 1                             URBIN    1979
                     END IF                                             URBIN    1980
                  END IF                                                URBIN    1981
               END IF                                                   URBIN    1982
C                                                                       URBIN    1983
            ELSEIF(SEARCH(I).EQ.'DC NODE NAME')THEN                     URBIN    1984
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    1985
                  NODEDC = STARS                                        URBIN    1986
               ELSE                                                     URBIN    1987
                  NODEDC = CDATA(I)                                     URBIN    1988
                  IF(NODEDC .NE. CDATA(I))THEN                          URBIN    1989
               WRITE(MSG(1),9000) SUBNAM                                URBIN    1990
               WRITE(MSG(2),9001) TNAME                                 URBIN    1991
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    1992
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    1993
               WRITE(MSG(5),9004) NODEDC                                URBIN    1994
               WRITE(MSG(6),9005)                                       URBIN    1995
               CALL PRTMSG(6)                                           URBIN    1996
                     IERCNT = IERCNT + 1                                URBIN    1997
                  END IF                                                URBIN    1998
               END IF                                                   URBIN    1999
            END IF                                                      URBIN    2000
540         CONTINUE                                                    URBIN    2001
C                                                                       URBIN    2002
C---------------------------------------------------------------------  URBIN    2003
C                                                                       URBIN    2004
C        Store data.                                                    URBIN    2005
C                                                                       URBIN    2006
         IUNIPT(IUDC) = 0                                               URBIN    2007
         IUDPPT(IUDC) = 0                                               URBIN    2008
         IUDRPT(IUDC) = 0                                               URBIN    2009
C                                                                       URBIN    2010
         DO 700 I = 1, JCOUNT                                           URBIN    2011
            FOUND = .FALSE.                                             URBIN    2012
C                                                                       URBIN    2013
C                                                                       URBIN    2014
C           a)   Store print flag.                                      URBIN    2015
C                                                                       URBIN    2016
            IF(LOOK(I).EQ.'PRINT FLAG')THEN                             URBIN    2017
               UDPRNT(IUDC) = PRINT                                     URBIN    2018
C                                                                       URBIN    2019
C                                                                       URBIN    2020
C           b)   Store dc converter.                                    URBIN    2021
C                                                                       URBIN    2022
            ELSEIF(LOOK(I).EQ.'DC CONVERTER')THEN                       URBIN    2023
               FOUND = .FALSE.                                          URBIN    2024
               DO 560 K = 1, ICDC                                       URBIN    2025
                  IF(IDC(K) .NE. 0)THEN                                 URBIN    2026
                     JPOSN = IDC(K)                                     URBIN    2027
                     IF(CONVDC.EQ.DCCNAM(JPOSN))THEN                    URBIN    2028
                        FOUND = .TRUE.                                  URBIN    2029
                        JSTORE = JPOSN                                  URBIN    2030
                     END IF                                             URBIN    2031
                  END IF                                                URBIN    2032
560            CONTINUE                                                 URBIN    2033
               IF(.NOT. FOUND)THEN                                      URBIN    2034
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2035
                     WRITE(MSG(2),9001) TNAME                           URBIN    2036
                     WRITE(MSG(3),9310) BNAME(1:LEN)                    URBIN    2037
                     WRITE(MSG(4),9311) CONVDC                          URBIN    2038
                     WRITE(MSG(5),9320)                                 URBIN    2039
                     WRITE(MSG(6),9005)                                 URBIN    2040
                     CALL PRTMSG(6)                                     URBIN    2041
                  IERCNT = IERCNT + 1                                   URBIN    2042
                  JSTORE = 0                                            URBIN    2043
               END IF                                                   URBIN    2044
C                                                                       URBIN    2045
C                                                                       URBIN    2046
C                                                                       URBIN    2047
C           c)   Store dc line.                                         URBIN    2048
C                                                                       URBIN    2049
            ELSEIF(LOOK(I).EQ.'DC LINE')THEN                            URBIN    2050
C                                                                       URBIN    2051
               FOUND1 = .FALSE.                                         URBIN    2052
               FOUND2 = .FALSE.                                         URBIN    2053
               DO 580 K = 1, NUMNOD                                     URBIN    2054
                  IF(NODE1.EQ.IDCNOD(K))THEN                            URBIN    2055
                     KSTORE = K                                         URBIN    2056
                     FOUND1 = .TRUE.                                    URBIN    2057
                  ELSEIF(NODE1.EQ.'GROUND')THEN                         URBIN    2058
                     FOUND1 = .TRUE.                                    URBIN    2059
                  END IF                                                URBIN    2060
                  IF(NODE2.EQ.IDCNOD(K))THEN                            URBIN    2061
                     LSTORE = K                                         URBIN    2062
                     FOUND2 = .TRUE.                                    URBIN    2063
                  ELSEIF(NODE2.EQ.'GROUND')THEN                         URBIN    2064
                     FOUND2 = .TRUE.                                    URBIN    2065
                  END IF                                                URBIN    2066
580            CONTINUE                                                 URBIN    2067
               IF(.NOT. FOUND1)THEN                                     URBIN    2068
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2069
                     WRITE(MSG(2),9001) TNAME                           URBIN    2070
                     WRITE(MSG(3),9312) BNAME(1:LEN)                    URBIN    2071
                     WRITE(MSG(4),9313) NODE1                           URBIN    2072
                     WRITE(MSG(5),9005)                                 URBIN    2073
                     CALL PRTMSG(5)                                     URBIN    2074
                  IERCNT = IERCNT + 1                                   URBIN    2075
               END IF                                                   URBIN    2076
               IF(.NOT. FOUND2)THEN                                     URBIN    2077
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2078
                     WRITE(MSG(2),9001) TNAME                           URBIN    2079
                     WRITE(MSG(3),9312) BNAME(1:LEN)                    URBIN    2080
                     WRITE(MSG(4),9313) NODE2                           URBIN    2081
                     WRITE(MSG(5),9005)                                 URBIN    2082
                     CALL PRTMSG(5)                                     URBIN    2083
                  IERCNT = IERCNT + 1                                   URBIN    2084
               END IF                                                   URBIN    2085
C                                                                       URBIN    2086
               FOUND = .FALSE.                                          URBIN    2087
               DO 600 K = 1, ILDC                                       URBIN    2088
                  IF(IDCL(K) .NE. 0)THEN                                URBIN    2089
                     JPOSN = IDCL(K)                                    URBIN    2090
                     IF(LINEDC.EQ.DCLNAM(JPOSN))THEN                    URBIN    2091
                        FOUND = .TRUE.                                  URBIN    2092
                        JSTORE = JPOSN                                  URBIN    2093
                     ELSEIF(NAME(1:17).EQ.DCLNAM(JPOSN))THEN            URBIN    2094
                        FOUND = .TRUE.                                  URBIN    2095
                        JSTORE = -JPOSN                                 URBIN    2096
                     END IF                                             URBIN    2097
                  END IF                                                URBIN    2098
600            CONTINUE                                                 URBIN    2099
C                                                                       URBIN    2100
               IF(.NOT. FOUND)THEN                                      URBIN    2101
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2102
                     WRITE(MSG(2),9001) TNAME                           URBIN    2103
                     WRITE(MSG(3),9314) BNAME(1:LEN)                    URBIN    2104
                     WRITE(MSG(4),9315) LINEDC                          URBIN    2105
                     WRITE(MSG(5),9005)                                 URBIN    2106
                     CALL PRTMSG(5)                                     URBIN    2107
                  IERCNT = IERCNT + 1                                   URBIN    2108
               END IF                                                   URBIN    2109
C                                                                       URBIN    2110
C           Store dc breaker.                                           URBIN    2111
C                                                                       URBIN    2112
            ELSEIF(LOOK(I).EQ.'DC BREAKER')THEN                         URBIN    2113
C                                                                       URBIN    2114
               FOUND = .FALSE.                                          URBIN    2115
               DO 620 K = 1, IBDC                                       URBIN    2116
                  IF(IDCB(K) .NE. 0)THEN                                URBIN    2117
                     JPOSN = IDCB(K)                                    URBIN    2118
                     IF(BRKRDC.EQ.DCBNAM(JPOSN))THEN                    URBIN    2119
                        FOUND = .TRUE.                                  URBIN    2120
                        JSTORE = JPOSN                                  URBIN    2121
                     ELSEIF(NAME(1:17).EQ.DCBNAM(JPOSN))THEN            URBIN    2122
                        FOUND = .TRUE.                                  URBIN    2123
                        JSTORE = -JPOSN                                 URBIN    2124
                     END IF                                             URBIN    2125
                  END IF                                                URBIN    2126
620            CONTINUE                                                 URBIN    2127
C                                                                       URBIN    2128
               IF(.NOT. FOUND)THEN                                      URBIN    2129
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2130
                     WRITE(MSG(2),9001) TNAME                           URBIN    2131
                     WRITE(MSG(3),9324) BNAME(1:LEN)                    URBIN    2132
                     WRITE(MSG(4),9325) BRKRDC                          URBIN    2133
                     WRITE(MSG(5),9005)                                 URBIN    2134
                     CALL PRTMSG(5)                                     URBIN    2135
                  IERCNT = IERCNT + 1                                   URBIN    2136
               END IF                                                   URBIN    2137
C                                                                       URBIN    2138
C           d)   Store dc node name.                                    URBIN    2139
C                                                                       URBIN    2140
            ELSEIF(LOOK(I).EQ.'DC NODE NAME')THEN                       URBIN    2141
               FOUND = .FALSE.                                          URBIN    2142
               DO 640 K = 1, NUMNOD                                     URBIN    2143
                  IF(IDCNOD(K).EQ.NODEDC)THEN                           URBIN    2144
                     FOUND = .TRUE.                                     URBIN    2145
                     JSTORE = K                                         URBIN    2146
                  END IF                                                URBIN    2147
640            CONTINUE                                                 URBIN    2148
               IF(NODEDC.EQ.'GROUND')THEN                               URBIN    2149
                  FOUND = .TRUE.                                        URBIN    2150
               END IF                                                   URBIN    2151
               IF(.NOT. FOUND)THEN                                      URBIN    2152
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2153
                     WRITE(MSG(2),9001) TNAME                           URBIN    2154
                     WRITE(MSG(3),9312) BNAME(1:LEN)                    URBIN    2155
                     WRITE(MSG(4),9313) NODEDC                          URBIN    2156
                     WRITE(MSG(5),9005)                                 URBIN    2157
                     CALL PRTMSG(5)                                     URBIN    2158
                  IERCNT = IERCNT + 1                                   URBIN    2159
               END IF                                                   URBIN    2160
            ELSEIF(LOOK(I).EQ.'DC NODE NAME 1')THEN                     URBIN    2161
               FOUND = .FALSE.                                          URBIN    2162
               DO 660 K = 1, NUMNOD                                     URBIN    2163
                  IF(IDCNOD(K).EQ.NODE1)THEN                            URBIN    2164
                     FOUND = .TRUE.                                     URBIN    2165
                     JSTORE = K                                         URBIN    2166
                  END IF                                                URBIN    2167
660            CONTINUE                                                 URBIN    2168
               IF(NODE1.EQ.'GROUND')THEN                                URBIN    2169
                  FOUND = .TRUE.                                        URBIN    2170
               END IF                                                   URBIN    2171
               IF(.NOT. FOUND)THEN                                      URBIN    2172
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2173
                     WRITE(MSG(2),9001) TNAME                           URBIN    2174
                     WRITE(MSG(3),9312) BNAME(1:LEN)                    URBIN    2175
                     WRITE(MSG(4),9313) NODE1                           URBIN    2176
                     WRITE(MSG(5),9005)                                 URBIN    2177
                     CALL PRTMSG(5)                                     URBIN    2178
                  IERCNT = IERCNT + 1                                   URBIN    2179
               END IF                                                   URBIN    2180
            ELSEIF(LOOK(I).EQ.'DC NODE NAME 2')THEN                     URBIN    2181
               FOUND = .FALSE.                                          URBIN    2182
               DO 680 K = 1, NUMNOD                                     URBIN    2183
                  IF(IDCNOD(K).EQ.NODE2)THEN                            URBIN    2184
                     FOUND = .TRUE.                                     URBIN    2185
                     JSTORE = K                                         URBIN    2186
                  END IF                                                URBIN    2187
680            CONTINUE                                                 URBIN    2188
               IF(NODE2.EQ.'GROUND')THEN                                URBIN    2189
                  FOUND = .TRUE.                                        URBIN    2190
               END IF                                                   URBIN    2191
               IF(.NOT. FOUND)THEN                                      URBIN    2192
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2193
                     WRITE(MSG(2),9001) TNAME                           URBIN    2194
                     WRITE(MSG(3),9312) BNAME(1:LEN)                    URBIN    2195
                     WRITE(MSG(4),9313) NODE2                           URBIN    2196
                     WRITE(MSG(5),9005)                                 URBIN    2197
                     CALL PRTMSG(5)                                     URBIN    2198
                  IERCNT = IERCNT + 1                                   URBIN    2199
               END IF                                                   URBIN    2200
            END IF                                                      URBIN    2201
C                                                                       URBIN    2202
            IF(LOOK(I) .NE. 'PRINT FLAG')THEN                           URBIN    2203
C                                                                       URBIN    2204
C              Create a new link for identification linked list.        URBIN    2205
C                                                                       URBIN    2206
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    2207
               IUDINT(IADDI) = JSTORE                                   URBIN    2208
            END IF                                                      URBIN    2209
C                                                                       URBIN    2210
            IF(LOOK(I).EQ.'DC LINE')THEN                                URBIN    2211
C                                                                       URBIN    2212
C              Create a new link for identification linked list.        URBIN    2213
C                                                                       URBIN    2214
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    2215
               IUDINT(IADDI) = KSTORE                                   URBIN    2216
C                                                                       URBIN    2217
C                                                                       URBIN    2218
C              Create a new link for identification linked list.        URBIN    2219
C                                                                       URBIN    2220
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    2221
               IUDINT(IADDI) = LSTORE                                   URBIN    2222
            END IF                                                      URBIN    2223
C                                                                       URBIN    2224
C                                                                       URBIN    2225
700      CONTINUE                                                       URBIN    2226
C                                                                       URBIN    2227
         IF(SNAME.EQ.SBFRDC(IRMODE))THEN                                URBIN    2228
C                                                                       URBIN    2229
C           Add this block to the run mode list.                        URBIN    2230
C                                                                       URBIN    2231
            IF(IFXRMO.EQ.0)THEN                                         URBIN    2232
               IFXRMO = IFXFRE                                          URBIN    2233
               IFXFRE = IFXNEX(IFXFRE)                                  URBIN    2234
               IFXLSR = IFXRMO                                          URBIN    2235
            ELSE                                                        URBIN    2236
               NEW = IFXFRE                                             URBIN    2237
               IFXFRE = IFXNEX(IFXFRE)                                  URBIN    2238
               IFXNEX(IFXLSR) = NEW                                     URBIN    2239
               IFXLSR = NEW                                             URBIN    2240
            END IF                                                      URBIN    2241
C                                                                       URBIN    2242
            FXINAM(IFXLSR) = BNAME(1:LEN)                               URBIN    2243
            IFINUM(IFXLSR) = 0                                          URBIN    2244
            FXNAM1(IFXLSR) = ' '                                        URBIN    2245
            IFXNUM(IFXLSR) = JSTORE                                     URBIN    2246
            FXNAM2(IFXLSR) = ' '                                        URBIN    2247
            JFXNUM(IFXLSR) = 0                                          URBIN    2248
            FXVAL(IFXLSR) = 0.0                                         URBIN    2249
            IFXNEX(IFXLSR) = 0                                          URBIN    2250
C                                                                       URBIN    2251
         END IF                                                         URBIN    2252
      END IF                                                            URBIN    2253
C                                                                       URBIN    2254
C---------------------------------------------------------------------  URBIN    2255
C                                                                       URBIN    2256
C     For debuging purposes:  dump all valid data.  For invalid         URBIN    2257
C     data a not defined message will be printed.                       URBIN    2258
C                                                                       URBIN    2259
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    2260
C                                                                       URBIN    2261
         DO 720 I = 1, NUMSRC                                           URBIN    2262
            N = LENGTH(I) + 1                                           URBIN    2263
            SEARCH(I)(N:N) = ':'                                        URBIN    2264
            IF(TYPE(I).EQ.'CHAR')THEN                                   URBIN    2265
               IF(LDEB) THEN                                            URBIN    2266
                  WRITE (IUD6,9010) SEARCH(I), CDATA(I)                 URBIN    2267
               ELSE                                                     URBIN    2268
                  WRITE (IU16,9010) SEARCH(I), CDATA(I)                 URBIN    2269
               ENDIF                                                    URBIN    2270
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    2271
               IF(LDEB) THEN                                            URBIN    2272
                  WRITE (IUD6,9012) SEARCH(I), RDATA(I)                 URBIN    2273
               ELSE                                                     URBIN    2274
                  WRITE (IU16,9012) SEARCH(I), RDATA(I)                 URBIN    2275
               ENDIF                                                    URBIN    2276
            ELSEIF(TYPE(I).EQ.'INTE')THEN                               URBIN    2277
               IF(LDEB) THEN                                            URBIN    2278
                  WRITE (IUD6,9014) SEARCH(I), IDATA(I)                 URBIN    2279
               ELSE                                                     URBIN    2280
                  WRITE (IU16,9014) SEARCH(I), IDATA(I)                 URBIN    2281
               ENDIF                                                    URBIN    2282
            ELSEIF(TYPE(I).EQ.' ')THEN                                  URBIN    2283
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    2284
                  CALL PRTMSG(1)                                        URBIN    2285
            END IF                                                      URBIN    2286
720      CONTINUE                                                       URBIN    2287
      END IF                                                            URBIN    2288
C                                                                       URBIN    2289
      IF(DEFINE)THEN                                                    URBIN    2290
         IUDC = IUDC - 1                                                URBIN    2291
      END IF                                                            URBIN    2292
C                                                                       URBIN    2293
      RETURN                                                            URBIN    2294
C                                                                       URBIN    2295
C                                                                       URBIN    2296
C---------------------------------------------------------------------  URBIN    2297
C                                                                       URBIN    2298
      ENTRY URINTF                                                      URBIN    2299
CD -------------------------------------------------------------------  URBIN    2300
CD                                                                      URBIN    2301
CD              *****     URINTF  ROUTINE   *****                       URBIN    2302
CD                                                                      URBIN    2303
CD -------------------------------------------------------------------  URBIN    2304
CD                                                                      URBIN    2305
CD       PURPOSE:  Controls the reading of the udc type INTERFACE data  URBIN    2306
CD                 from the input file.  Does limited error checking.   URBIN    2307
CD                 Stores valid data in the udc storage arrays.         URBIN    2308
CD                                                                      URBIN    2309
CD -------------------------------------------------------------------  URBIN    2310
C                                                                       URBIN    2311
C     Define subroutine name.                                           URBIN    2312
C                                                                       URBIN    2313
      LDEB=(JDEB(301).NE.0)                                             URBIN    2314
C                                                                       URBIN    2315
      IF(SDBG)THEN                                                      URBIN    2316
         SUBNAM = 'URINTF ROUTINE.'                                     URBIN    2317
      ELSE                                                              URBIN    2318
         SUBNAM = ' '                                                   URBIN    2319
      END IF                                                            URBIN    2320
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN    2321
      BNAME = UDNAME(IUDC)                                              URBIN    2322
      LEN = IUDLEN(IUDC)                                                URBIN    2323
C                                                                       URBIN    2324
      JDCOUN = IERCNT                                                   URBIN    2325
      DPRINT = .FALSE.                                                  URBIN    2326
C                                                                       URBIN    2327
C                                                                       URBIN    2328
C                                                                       URBIN    2329
C     Initialze flags and counters.                                     URBIN    2330
C                                                                       URBIN    2331
      INIT = .FALSE.                                                    URBIN    2332
      PURPOS = .FALSE.                                                  URBIN    2333
      FDPURP = .FALSE.                                                  URBIN    2334
      FDINIT = .FALSE.                                                  URBIN    2335
      FDPUR1 = .FALSE.                                                  URBIN    2336
      FDINI1 = .FALSE.                                                  URBIN    2337
      ENDBLK = .FALSE.                                                  URBIN    2338
      IDONE=0                                                           URBIN    2339
C                                                                       URBIN    2340
C---------------------------------------------------------------------  URBIN    2341
C                                                                       URBIN    2342
C     Search data card until end of data for this type is found.        URBIN    2343
C                                                                       URBIN    2344
C                                                                       URBIN    2345
      NUMSRC = 1                                                        URBIN    2346
      SEARCH(NUMSRC) = 'PRINT FLAG'                                     URBIN    2347
      LENGTH(NUMSRC) = 10                                               URBIN    2348
      TYPE(NUMSRC) = 'CHAR'                                             URBIN    2349
      OPTNAL = .FALSE.                                                  URBIN    2350
C                                                                       URBIN    2351
C                                                                       URBIN    2352
820   IF(ENDBLK) GOTO 840                                               URBIN    2353
C                                                                       URBIN    2354
C        1)   Remove next data from the input file.                     URBIN    2355
C                                                                       URBIN    2356
         CHKSTR = .FALSE.                                               URBIN    2357
         IF(TYPE(NUMSRC).EQ.'CHAR')THEN                                 URBIN    2358
            CALL URGETC (CDATA(NUMSRC), FOUND)                          URBIN    2359
         ELSEIF(TYPE(NUMSRC).EQ.'INTE')THEN                             URBIN    2360
            CALL URGETI (IDATA(NUMSRC), CDATA(NUMSRC), FOUND)           URBIN    2361
         ELSEIF(TYPE(NUMSRC).EQ.'REAL')THEN                             URBIN    2362
            CALL URGETR (RDATA(NUMSRC), CDATA(NUMSRC), FOUND)           URBIN    2363
         ELSEIF(TYPE(NUMSRC).EQ.'RECH')THEN                             URBIN    2364
            CALL URGETX (RDATA(NUMSRC), CDATA(NUMSRC), TYPE(NUMSRC),    URBIN    2365
     1                   FOUND)                                         URBIN    2366
         END IF                                                         URBIN    2367
C                                                                       URBIN    2368
C                                                                       URBIN    2369
C        2)   Determine if data found is a valid keyword.               URBIN    2370
C                                                                       URBIN    2371
         KWORD = .FALSE.                                                URBIN    2372
         IF(FOUND.AND.TYPE(NUMSRC).EQ.'CHAR')THEN                       URBIN    2373
            IF(CDATA(NUMSRC).EQ.'VOLTAGE' .OR.                          URBIN    2374
     1          CDATA(NUMSRC).EQ.'CURRENT' .OR.                         URBIN    2375
     2          CDATA(NUMSRC).EQ.'ALPHA' .OR.                           URBIN    2376
     3          CDATA(NUMSRC).EQ.'GAMMA' .OR.                           URBIN    2377
     4          CDATA(NUMSRC).EQ.'BYPASS' .OR.                          URBIN    2378
     5          CDATA(NUMSRC).EQ.'BLOCK' .OR.                           URBIN    2379
     6          CDATA(NUMSRC).EQ.'COMFAIL' .OR.                         URBIN    2380
     7          CDATA(NUMSRC).EQ.'INITIAL')THEN                         URBIN    2381
               KWORD = .TRUE.                                           URBIN    2382
               IF(SEARCH(NUMSRC) .NE. 'KEYWORD'.AND.                    URBIN    2383
     1             SEARCH(NUMSRC) .NE. 'SUB KEYWORD')THEN               URBIN    2384
                  IF(.NOT. OPTNAL)THEN                                  URBIN    2385
C                                                                       URBIN    2386
C                    Abort current search because of error in input.    URBIN    2387
C                    Assume that a keyword was expected.                URBIN    2388
C                                                                       URBIN    2389
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2390
                     WRITE(MSG(2),9001) TNAME                           URBIN    2391
                     WRITE(MSG(3),9108) BNAME(1:LEN)                    URBIN    2392
                     WRITE(MSG(4),9402)                                 URBIN    2393
                     WRITE(MSG(5),9802) CDATA(NUMSRC)(1:32)             URBIN    2394
                     WRITE(MSG(6),9403)                                 URBIN    2395
                     WRITE(MSG(7),9005)                                 URBIN    2396
                     CALL PRTMSG(7)                                     URBIN    2397
                     IERCNT = IERCNT + 1                                URBIN    2398
                  END IF                                                URBIN    2399
                  SEARCH(NUMSRC) = 'KEYWORD'                            URBIN    2400
                  TYPE(NUMSRC) = 'CHAR'                                 URBIN    2401
                  LENGTH(NUMSRC) = 7                                    URBIN    2402
               END IF                                                   URBIN    2403
C                                                                       URBIN    2404
            ELSE                                                        URBIN    2405
               KWORD = .FALSE.                                          URBIN    2406
            END IF                                                      URBIN    2407
         END IF                                                         URBIN    2408
C                                                                       URBIN    2409
C                                                                       URBIN    2410
C        3)   Determine what data information was found and what        URBIN    2411
C             should follow it.                                         URBIN    2412
C                                                                       URBIN    2413
C        a)   A keyword is expected.                                    URBIN    2414
C                                                                       URBIN    2415
C                                                                       URBIN    2416
         IF(SEARCH(NUMSRC).EQ.'KEYWORD')THEN                            URBIN    2417
            IF(KWORD)THEN                                               URBIN    2418
C                                                                       URBIN    2419
C              Valid keyword.  Valid keywords are:  VOLTAGE, CURRENT,   URBIN    2420
C              GAMMA, ALPHA, BYPASS, BLOCK, COMFAIL, INITIAL.           URBIN    2421
C                                                                       URBIN    2422
               FDPURP = .TRUE.                                          URBIN    2423
               SEARCH(NUMSRC) = 'KEYWORD'                               URBIN    2424
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2425
               LENGTH(NUMSRC) = 7                                       URBIN    2426
C                                                                       URBIN    2427
               IF(CDATA(NUMSRC).EQ.'INITIAL')THEN                       URBIN    2428
C                                                                       URBIN    2429
C                 Begin processing initial data.                        URBIN    2430
C                                                                       URBIN    2431
                  PURPOS = .FALSE.                                      URBIN    2432
                  INIT = .TRUE.                                         URBIN    2433
C                                                                       URBIN    2434
                  IF(CDATA(NUMSRC).EQ.'BYPASS' .OR.                     URBIN    2435
     1                CDATA(NUMSRC).EQ.'BLOCK' .OR.                     URBIN    2436
     2                CDATA(NUMSRC).EQ.'COMFAIL')THEN                   URBIN    2437
C                                                                       URBIN    2438
C                    A block/parameter 1 must follow.                   URBIN    2439
C                                                                       URBIN    2440
                     NUMSRC = NUMSRC + 1                                URBIN    2441
                     OPTNAL = .TRUE.                                    URBIN    2442
                     SEARCH(NUMSRC) = 'INPUT 1'                         URBIN    2443
                     TYPE(NUMSRC) = 'RECH'                              URBIN    2444
                     LENGTH(NUMSRC) = 7                                 URBIN    2445
                  ELSE                                                  URBIN    2446
C                                                                       URBIN    2447
C                    A sub keyword must follow.                         URBIN    2448
C                                                                       URBIN    2449
                     NUMSRC = NUMSRC + 1                                URBIN    2450
                     OPTNAL = .FALSE.                                   URBIN    2451
                     SEARCH(NUMSRC) = 'SUB KEYWORD'                     URBIN    2452
                     TYPE(NUMSRC) = 'CHAR'                              URBIN    2453
                     LENGTH(NUMSRC) = 11                                URBIN    2454
                  END IF                                                URBIN    2455
C                                                                       URBIN    2456
               ELSE                                                     URBIN    2457
C                                                                       URBIN    2458
C                 Begin processing purpose data.                        URBIN    2459
C                                                                       URBIN    2460
                  PURPOS = .TRUE.                                       URBIN    2461
                  INIT = .FALSE.                                        URBIN    2462
C                                                                       URBIN    2463
C                 A block name must follow.                             URBIN    2464
C                                                                       URBIN    2465
                  OPTNAL = .FALSE.                                      URBIN    2466
                  NUMSRC = NUMSRC + 1                                   URBIN    2467
                  SEARCH(NUMSRC) = 'INPUT BLOCK'                        URBIN    2468
                  LENGTH(NUMSRC) = 11                                   URBIN    2469
                  TYPE(NUMSRC) = 'RECH'                                 URBIN    2470
               END IF                                                   URBIN    2471
C                                                                       URBIN    2472
            ELSE                                                        URBIN    2473
C                                                                       URBIN    2474
C              Invalid keyword.  Keep searching for a valid keyword.    URBIN    2475
C                                                                       URBIN    2476
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2477
                     WRITE(MSG(2),9001) TNAME                           URBIN    2478
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN    2479
                     WRITE(MSG(4),9404)                                 URBIN    2480
                     WRITE(MSG(5),9401) CDATA(NUMSRC)(1:32)             URBIN    2481
                     WRITE(MSG(6),9405)                                 URBIN    2482
                     WRITE(MSG(7),9005)                                 URBIN    2483
                     CALL PRTMSG(7)                                     URBIN    2484
               IERCNT = IERCNT + 1                                      URBIN    2485
            END IF                                                      URBIN    2486
C                                                                       URBIN    2487
C                                                                       URBIN    2488
C                                                                       URBIN    2489
C        b)   A sub keyword is expected.                                URBIN    2490
C                                                                       URBIN    2491
         ELSEIF(SEARCH(NUMSRC).EQ.'SUB KEYWORD')THEN                    URBIN    2492
            IF(KWORD.AND.CDATA(NUMSRC) .NE. 'INITIAL')THEN              URBIN    2493
C                                                                       URBIN    2494
C              Valid sub keyword.  Valid sub keywords are:  VOLTAGE,    URBIN    2495
C              CURRENT, GAMMA, and ALPHA.                               URBIN    2496
C                                                                       URBIN    2497
               FDINIT = .TRUE.                                          URBIN    2498
               SEARCH(NUMSRC) = 'SUB KEYWORD'                           URBIN    2499
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2500
               LENGTH(NUMSRC) = 11                                      URBIN    2501
C                                                                       URBIN    2502
C              A single block name or parameter may follow.  Note:      URBIN    2503
C              no operator is expected so it is the second not the      URBIN    2504
C              first block name/parameter.                              URBIN    2505
C                                                                       URBIN    2506
               OPTNAL = .TRUE.                                          URBIN    2507
               NUMSRC = NUMSRC + 1                                      URBIN    2508
               SEARCH(NUMSRC) = 'INPUT'                                 URBIN    2509
               LENGTH(NUMSRC) = 5                                       URBIN    2510
               TYPE(NUMSRC) = 'RECH'                                    URBIN    2511
C                                                                       URBIN    2512
               IF(INIT.AND.IDONE.EQ.0) THEN                             URBIN    2513
                  IDONE=IDONE+1                                         URBIN    2514
                  INIT = .FALSE.                                        URBIN    2515
                  PURPOS = .FALSE.                                      URBIN    2516
                  FDPUR1 = FDPURP                                       URBIN    2517
                  FDINI1 = FDINIT                                       URBIN    2518
                  FDPURP = .FALSE.                                      URBIN    2519
                  FDINIT = .FALSE.                                      URBIN    2520
                  NUMSR1 = NUMSRC-1                                     URBIN    2521
               ENDIF                                                    URBIN    2522
            ELSE                                                        URBIN    2523
C                                                                       URBIN    2524
C              Invalid sub keyword.  Keep searching for a valid sub     URBIN    2525
C              keyword.                                                 URBIN    2526
C                                                                       URBIN    2527
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2528
                     WRITE(MSG(2),9001) TNAME                           URBIN    2529
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN    2530
                     WRITE(MSG(4),9406) CDATA(NUMSRC)(1:32)             URBIN    2531
                     WRITE(MSG(5),9405)                                 URBIN    2532
                     WRITE(MSG(6),9005)                                 URBIN    2533
                     CALL PRTMSG(6)                                     URBIN    2534
               IERCNT = IERCNT + 1                                      URBIN    2535
            END IF                                                      URBIN    2536
C                                                                       URBIN    2537
C                                                                       URBIN    2538
         ELSE                                                           URBIN    2539
C                                                                       URBIN    2540
            IF(.NOT. (OPTNAL .OR. FOUND))THEN                           URBIN    2541
C                                                                       URBIN    2542
C              Missing required data.                                   URBIN    2543
C                                                                       URBIN    2544
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2545
                     WRITE(MSG(2),9001) TNAME                           URBIN    2546
                     WRITE(MSG(3),9108) BNAME(1:LEN)                    URBIN    2547
                     WRITE(MSG(4),9408) CDATA(NUMSRC)(1:32)             URBIN    2548
                     WRITE(MSG(5),9409)                                 URBIN    2549
                     WRITE(MSG(6),9005)                                 URBIN    2550
                     CALL PRTMSG(6)                                     URBIN    2551
               IERCNT = IERCNT + 1                                      URBIN    2552
               TYPE(NUMSRC) = ' '                                       URBIN    2553
            END IF                                                      URBIN    2554
C                                                                       URBIN    2555
C                                                                       URBIN    2556
C           c)   A print flag is expected.                              URBIN    2557
C                                                                       URBIN    2558
            IF(SEARCH(NUMSRC).EQ.'PRINT FLAG')THEN                      URBIN    2559
C                                                                       URBIN    2560
C              A dc bus name 1 must follow.                             URBIN    2561
C                                                                       URBIN    2562
               NUMSRC = NUMSRC + 1                                      URBIN    2563
               SEARCH(NUMSRC) = 'DC BUS 1'                              URBIN    2564
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2565
               LENGTH(NUMSRC) = 8                                       URBIN    2566
               OPTNAL = .FALSE.                                         URBIN    2567
C                                                                       URBIN    2568
C                                                                       URBIN    2569
C                                                                       URBIN    2570
C           d)   A dc bus name 1 is expected.                           URBIN    2571
C                                                                       URBIN    2572
            ELSEIF(SEARCH(NUMSRC).EQ.'DC BUS 1')THEN                    URBIN    2573
C                                                                       URBIN    2574
C              A dc bus name 2 must follow.                             URBIN    2575
C                                                                       URBIN    2576
               NUMSRC = NUMSRC + 1                                      URBIN    2577
               SEARCH(NUMSRC) = 'DC BUS 2'                              URBIN    2578
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2579
               LENGTH(NUMSRC) = 8                                       URBIN    2580
               OPTNAL = .FALSE.                                         URBIN    2581
C                                                                       URBIN    2582
C                                                                       URBIN    2583
C                                                                       URBIN    2584
C           e)   A dc bus name 2 is expected.                           URBIN    2585
C                                                                       URBIN    2586
            ELSEIF(SEARCH(NUMSRC).EQ.'DC BUS 2')THEN                    URBIN    2587
C                                                                       URBIN    2588
C              A ac bus name must follow.                               URBIN    2589
C                                                                       URBIN    2590
               NUMSRC = NUMSRC + 1                                      URBIN    2591
               SEARCH(NUMSRC) = 'AC BUS'                                URBIN    2592
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2593
               LENGTH(NUMSRC) = 6                                       URBIN    2594
               OPTNAL = .FALSE.                                         URBIN    2595
C                                                                       URBIN    2596
C                                                                       URBIN    2597
C                                                                       URBIN    2598
C           f)   A ac bus name is expected.                             URBIN    2599
C                                                                       URBIN    2600
            ELSEIF(SEARCH(NUMSRC).EQ.'AC BUS')THEN                      URBIN    2601
C                                                                       URBIN    2602
C              A kv value must follow.                                  URBIN    2603
C                                                                       URBIN    2604
               NUMSRC = NUMSRC + 1                                      URBIN    2605
               SEARCH(NUMSRC) = 'KV'                                    URBIN    2606
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2607
               LENGTH(NUMSRC) = 2                                       URBIN    2608
               OPTNAL = .FALSE.                                         URBIN    2609
C                                                                       URBIN    2610
C                                                                       URBIN    2611
C                                                                       URBIN    2612
C           g)   A kv value is expected.                                URBIN    2613
C                                                                       URBIN    2614
            ELSEIF(SEARCH(NUMSRC).EQ.'KV')THEN                          URBIN    2615
C                                                                       URBIN    2616
C              A circuit number must follow.                            URBIN    2617
C                                                                       URBIN    2618
               NUMSRC = NUMSRC + 1                                      URBIN    2619
               SEARCH(NUMSRC) = 'CIRCUIT NUMBER'                        URBIN    2620
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2621
               LENGTH(NUMSRC) = 14                                      URBIN    2622
               OPTNAL = .FALSE.                                         URBIN    2623
C                                                                       URBIN    2624
C                                                                       URBIN    2625
C                                                                       URBIN    2626
C           h)   A circuit number is expected.                          URBIN    2627
C                                                                       URBIN    2628
            ELSEIF(SEARCH(NUMSRC).EQ.'CIRCUIT NUMBER')THEN              URBIN    2629
C                                                                       URBIN    2630
C              A keyword may follow.                                    URBIN    2631
C                                                                       URBIN    2632
               NUMSRC = NUMSRC + 1                                      URBIN    2633
               SEARCH(NUMSRC) = 'KEYWORD'                               URBIN    2634
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2635
               LENGTH(NUMSRC) = 7                                       URBIN    2636
               OPTNAL = .TRUE.                                          URBIN    2637
C                                                                       URBIN    2638
C                                                                       URBIN    2639
C                                                                       URBIN    2640
C           i)   A block name is expected.                              URBIN    2641
C                                                                       URBIN    2642
            ELSEIF(SEARCH(NUMSRC).EQ.'INPUT BLOCK')THEN                 URBIN    2643
C                                                                       URBIN    2644
               IF(INIT)THEN                                             URBIN    2645
C                                                                       URBIN    2646
C                 A keyword may follow.                                 URBIN    2647
C                                                                       URBIN    2648
                  NUMSRC = NUMSRC + 1                                   URBIN    2649
                  SEARCH(NUMSRC) = 'KEYWORD'                            URBIN    2650
                  LENGTH(NUMSRC) = 7                                    URBIN    2651
                  TYPE(NUMSRC) = 'CHAR'                                 URBIN    2652
                  OPTNAL = .TRUE.                                       URBIN    2653
C                                                                       URBIN    2654
               ELSE                                                     URBIN    2655
C                                                                       URBIN    2656
C                 A block/parameter 1 may follow.                       URBIN    2657
C                                                                       URBIN    2658
                  NUMSRC = NUMSRC + 1                                   URBIN    2659
                  SEARCH(NUMSRC) = 'INPUT 1'                            URBIN    2660
                  LENGTH(NUMSRC) = 7                                    URBIN    2661
                  TYPE(NUMSRC) = 'RECH'                                 URBIN    2662
                  OPTNAL = .TRUE.                                       URBIN    2663
               END IF                                                   URBIN    2664
C                                                                       URBIN    2665
C                                                                       URBIN    2666
C                                                                       URBIN    2667
C           j)   A block/parameter 1 is expected.                       URBIN    2668
C                                                                       URBIN    2669
            ELSEIF(SEARCH(NUMSRC).EQ.'INPUT 1')THEN                     URBIN    2670
               IF(CDATA(NUMSRC)(1:1).EQ.'''')THEN                       URBIN    2671
                  CHKSTR = .TRUE.                                       URBIN    2672
               END IF                                                   URBIN    2673
C                                                                       URBIN    2674
C              An operator must follow.                                 URBIN    2675
C                                                                       URBIN    2676
               NUMSRC = NUMSRC + 1                                      URBIN    2677
               SEARCH(NUMSRC) = 'OPERATOR'                              URBIN    2678
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2679
               LENGTH(NUMSRC) = 8                                       URBIN    2680
               OPTNAL = .FALSE.                                         URBIN    2681
C                                                                       URBIN    2682
C                                                                       URBIN    2683
C                                                                       URBIN    2684
C           k)   A block/parameter 2 is expected.                       URBIN    2685
C                                                                       URBIN    2686
            ELSEIF(SEARCH(NUMSRC).EQ.'INPUT 2' .OR.                     URBIN    2687
     1               SEARCH(NUMSRC).EQ.'INPUT')THEN                     URBIN    2688
               IF(CDATA(NUMSRC)(1:1).EQ.'''')THEN                       URBIN    2689
                  CHKSTR = .TRUE.                                       URBIN    2690
               END IF                                                   URBIN    2691
               IF(IDONE.EQ.1) THEN                                      URBIN    2692
                  IDONE=IDONE+1                                         URBIN    2693
                  IF(SEARCH(NUMSRC-1).EQ.'SUB KEYWORD')NUMSR1=NUMSR1+1  URBIN    2694
               ENDIF                                                    URBIN    2695
C                                                                       URBIN    2696
C              A keyword may follow.                                    URBIN    2697
C                                                                       URBIN    2698
               NUMSRC = NUMSRC + 1                                      URBIN    2699
               SEARCH(NUMSRC) = 'KEYWORD'                               URBIN    2700
               LENGTH(NUMSRC) = 7                                       URBIN    2701
               TYPE(NUMSRC) = 'CHAR'                                    URBIN    2702
               OPTNAL = .TRUE.                                          URBIN    2703
C                                                                       URBIN    2704
C                                                                       URBIN    2705
C                                                                       URBIN    2706
C           l)   An operator is expected.                               URBIN    2707
C                                                                       URBIN    2708
            ELSEIF(SEARCH(NUMSRC).EQ.'OPERATOR')THEN                    URBIN    2709
C                                                                       URBIN    2710
C              Check that operator is valid.                            URBIN    2711
C                                                                       URBIN    2712
               IF(CDATA(NUMSRC).EQ.'EQ' .OR.                            URBIN    2713
     1             CDATA(NUMSRC).EQ.'NE' .OR.                           URBIN    2714
     2             CDATA(NUMSRC).EQ.'LT' .OR.                           URBIN    2715
     3             CDATA(NUMSRC).EQ.'LE' .OR.                           URBIN    2716
     4             CDATA(NUMSRC).EQ.'GT' .OR.                           URBIN    2717
     5             CDATA(NUMSRC).EQ.'GE')THEN                           URBIN    2718
                  TYPE(NUMSRC) = 'CHAR'                                 URBIN    2719
               ELSE                                                     URBIN    2720
                  TYPE(NUMSRC) = ' '                                    URBIN    2721
               END IF                                                   URBIN    2722
C                                                                       URBIN    2723
C              A block/parameter 2 must follow.                         URBIN    2724
C                                                                       URBIN    2725
               NUMSRC = NUMSRC + 1                                      URBIN    2726
               SEARCH(NUMSRC) = 'INPUT 2'                               URBIN    2727
               LENGTH(NUMSRC) = 7                                       URBIN    2728
               TYPE(NUMSRC) = 'RECH'                                    URBIN    2729
               OPTNAL = .FALSE.                                         URBIN    2730
C                                                                       URBIN    2731
            END IF                                                      URBIN    2732
         END IF                                                         URBIN    2733
C                                                                       URBIN    2734
C                                                                       URBIN    2735
C        Check if string is a mode string.                              URBIN    2736
C                                                                       URBIN    2737
         IF(CHKSTR)THEN                                                 URBIN    2738
            STRING = CDATA(NUMSRC)                                      URBIN    2739
C                                                                       URBIN    2740
C     Search the Initial and Run mode tables for string and return      URBIN    2741
C     the numeric equivalent value in RDATA.                            URBIN    2742
C                                                                       URBIN    2743
            CALL USTRNG(STRING, RDATA(NUMSRC-1),IUDC, 'IR ')            URBIN    2744
C                                                                       URBIN    2745
            IF(RDATA(NUMSRC-1) .NE. 0.0) THEN                           URBIN    2746
               TYPE(NUMSRC-1) = 'CHRE'                                  URBIN    2747
               CDATA(NUMSRC-1) = STRING                                 URBIN    2748
            END IF                                                      URBIN    2749
C                                                                       URBIN    2750
         END IF                                                         URBIN    2751
         GOTO 820                                                       URBIN    2752
840   CONTINUE                                                          URBIN    2753
C                                                                       URBIN    2754
C                                                                       URBIN    2755
C---------------------------------------------------------------------  URBIN    2756
C                                                                       URBIN    2757
      IF(.NOT. OPTNAL)THEN                                              URBIN    2758
C                                                                       URBIN    2759
C        Missing valid data that must be found.                         URBIN    2760
C                                                                       URBIN    2761
         CDATA(NUMSRC) = ' *** END OF FILE ***'                         URBIN    2762
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2763
                     WRITE(MSG(2),9001) TNAME                           URBIN    2764
                     WRITE(MSG(3),9108) BNAME(1:LEN)                    URBIN    2765
                     WRITE(MSG(4),9408) CDATA(NUMSRC)(1:32)             URBIN    2766
                     WRITE(MSG(5),9409)                                 URBIN    2767
                     WRITE(MSG(6),9005)                                 URBIN    2768
                     CALL PRTMSG(6)                                     URBIN    2769
         IERCNT = IERCNT + 1                                            URBIN    2770
      END IF                                                            URBIN    2771
C                                                                       URBIN    2772
C     Next search is never done, so number of searches is really one    URBIN    2773
C     less.                                                             URBIN    2774
C                                                                       URBIN    2775
      NUMSRC = NUMSRC - 1                                               URBIN    2776
C                                                                       URBIN    2777
      IF(.NOT. FDINI1)THEN                                              URBIN    2778
C                                                                       URBIN    2779
C        There is no initial condition designation for this UDC.        URBIN    2780
C                                                                       URBIN    2781
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2782
                     WRITE(MSG(2),9001) TNAME                           URBIN    2783
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2784
                     WRITE(MSG(4),9413)                                 URBIN    2785
                     WRITE(MSG(5),9005)                                 URBIN    2786
                     CALL PRTMSG(5)                                     URBIN    2787
         IERCNT = IERCNT + 1                                            URBIN    2788
      END IF                                                            URBIN    2789
C                                                                       URBIN    2790
C                                                                       URBIN    2791
      IF(.NOT. FDPUR1)THEN                                              URBIN    2792
C                                                                       URBIN    2793
C        There is no purpose for this UDC.                              URBIN    2794
C                                                                       URBIN    2795
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2796
                     WRITE(MSG(2),9001) TNAME                           URBIN    2797
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2798
                     WRITE(MSG(4),9414)                                 URBIN    2799
                     WRITE(MSG(5),9005)                                 URBIN    2800
                     CALL PRTMSG(5)                                     URBIN    2801
         IERCNT = IERCNT + 1                                            URBIN    2802
      END IF                                                            URBIN    2803
      IF(NUMSRC.LE.NUMSR1) GO TO 919                                    URBIN    2804
      IF(.NOT. FDINIT)THEN                                              URBIN    2805
C                                                                       URBIN    2806
C        There is no initial condition designation for this UDC.        URBIN    2807
C                                                                       URBIN    2808
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2809
                     WRITE(MSG(2),9001) TNAME                           URBIN    2810
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2811
                     WRITE(MSG(4),9410)                                 URBIN    2812
                     WRITE(MSG(5),9005)                                 URBIN    2813
                     CALL PRTMSG(5)                                     URBIN    2814
         IERCNT = IERCNT + 1                                            URBIN    2815
      END IF                                                            URBIN    2816
C                                                                       URBIN    2817
C                                                                       URBIN    2818
      IF(.NOT. FDPURP)THEN                                              URBIN    2819
C                                                                       URBIN    2820
C        There is no purpose for this UDC.                              URBIN    2821
C                                                                       URBIN    2822
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2823
                     WRITE(MSG(2),9001) TNAME                           URBIN    2824
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2825
                     WRITE(MSG(4),9411)                                 URBIN    2826
                     WRITE(MSG(5),9005)                                 URBIN    2827
                     CALL PRTMSG(5)                                     URBIN    2828
         IERCNT = IERCNT + 1                                            URBIN    2829
      END IF                                                            URBIN    2830
 919  CONTINUE                                                          URBIN    2831
C                                                                       URBIN    2832
C---------------------------------------------------------------------  URBIN    2833
C                                                                       URBIN    2834
C                                                                       URBIN    2835
C     Search file until ':' is found.                                   URBIN    2836
C                                                                       URBIN    2837
 920  IF(ENDBLK) GOTO 940                                               URBIN    2838
         CALL URGETC (WORD, FOUND)                                      URBIN    2839
         IF(FOUND.AND.NUMSRC .NE. 0)THEN                                URBIN    2840
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2841
                     WRITE(MSG(2),9001) TNAME                           URBIN    2842
                     WRITE(MSG(3),9416) BNAME(1:LEN)                    URBIN    2843
                     WRITE(MSG(4),9005)                                 URBIN    2844
                     CALL PRTMSG(4)                                     URBIN    2845
            IERCNT = IERCNT + 1                                         URBIN    2846
         END IF                                                         URBIN    2847
         GOTO 920                                                       URBIN    2848
 940  CONTINUE                                                          URBIN    2849
C                                                                       URBIN    2850
C                                                                       URBIN    2851
C---------------------------------------------------------------------  URBIN    2852
C                                                                       URBIN    2853
C                                                                       URBIN    2854
C     Check that the first INITIAL clause has a matching PURPOSE.       URBIN    2855
C                                                                       URBIN    2856
      ABLK = .FALSE.                                                    URBIN    2857
      CBLK = .FALSE.                                                    URBIN    2858
      GBLK = .FALSE.                                                    URBIN    2859
      VBLK = .FALSE.                                                    URBIN    2860
      FOUND = .FALSE.                                                   URBIN    2861
C                                                                       URBIN    2862
      DO 980 I = 1, NUMSR1                                              URBIN    2863
         IF(.NOT. FOUND)THEN                                            URBIN    2864
            IF(SEARCH(I).EQ.'KEYWORD')THEN                              URBIN    2865
               IF(CDATA(I).EQ.'VOLTAGE')THEN                            URBIN    2866
                  VBLK = .TRUE.                                         URBIN    2867
               ELSEIF(CDATA(I).EQ.'CURRENT')THEN                        URBIN    2868
                  CBLK = .TRUE.                                         URBIN    2869
               ELSEIF(CDATA(I).EQ.'ALPHA')THEN                          URBIN    2870
                 ABLK = .TRUE.                                          URBIN    2871
               ELSEIF(CDATA(I).EQ.'GAMMA')THEN                          URBIN    2872
                  GBLK = .TRUE.                                         URBIN    2873
               END IF                                                   URBIN    2874
C                                                                       URBIN    2875
            ELSEIF(SEARCH(I).EQ.'SUB KEYWORD')THEN                      URBIN    2876
               IF(CDATA(I).EQ.'VOLTAGE')THEN                            URBIN    2877
                  IF(.NOT. VBLK)THEN                                    URBIN    2878
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2879
                     WRITE(MSG(2),9001) TNAME                           URBIN    2880
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2881
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2882
                     WRITE(MSG(5),9005)                                 URBIN    2883
                     CALL PRTMSG(5)                                     URBIN    2884
                     IERCNT = IERCNT + 1                                URBIN    2885
                  ELSE                                                  URBIN    2886
                     FOUND = .TRUE.                                     URBIN    2887
                  END IF                                                URBIN    2888
               ELSEIF(CDATA(I).EQ.'CURRENT')THEN                        URBIN    2889
                  IF(.NOT. CBLK)THEN                                    URBIN    2890
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2891
                     WRITE(MSG(2),9001) TNAME                           URBIN    2892
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2893
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2894
                     WRITE(MSG(5),9005)                                 URBIN    2895
                     CALL PRTMSG(5)                                     URBIN    2896
                     IERCNT = IERCNT + 1                                URBIN    2897
                  ELSE                                                  URBIN    2898
                     FOUND = .TRUE.                                     URBIN    2899
                  END IF                                                URBIN    2900
               ELSEIF(CDATA(I).EQ.'ALPHA')THEN                          URBIN    2901
                  IF(.NOT. ABLK)THEN                                    URBIN    2902
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2903
                     WRITE(MSG(2),9001) TNAME                           URBIN    2904
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2905
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2906
                     WRITE(MSG(5),9005)                                 URBIN    2907
                     CALL PRTMSG(5)                                     URBIN    2908
                     IERCNT = IERCNT + 1                                URBIN    2909
                  ELSE                                                  URBIN    2910
                     FOUND = .TRUE.                                     URBIN    2911
                  END IF                                                URBIN    2912
               ELSEIF(CDATA(I).EQ.'GAMMA')THEN                          URBIN    2913
                  IF(.NOT. GBLK)THEN                                    URBIN    2914
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2915
                     WRITE(MSG(2),9001) TNAME                           URBIN    2916
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2917
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2918
                     WRITE(MSG(5),9005)                                 URBIN    2919
                     CALL PRTMSG(5)                                     URBIN    2920
                     IERCNT = IERCNT + 1                                URBIN    2921
                  ELSE                                                  URBIN    2922
                     FOUND = .TRUE.                                     URBIN    2923
                  END IF                                                URBIN    2924
               END IF                                                   URBIN    2925
C                                                                       URBIN    2926
               IF(FOUND)THEN                                            URBIN    2927
C                                                                       URBIN    2928
C     Convert CDATA to numeric equivalent.                              URBIN    2929
C                                                                       URBIN    2930
                  CALL USTRNG(CDATA(I), CONTRL, IUDC, 'IR ')            URBIN    2931
                  STRING = CDATA(I)                                     URBIN    2932
C                                                                       URBIN    2933
               END IF                                                   URBIN    2934
            END IF                                                      URBIN    2935
C                                                                       URBIN    2936
         END IF                                                         URBIN    2937
C                                                                       URBIN    2938
 980  CONTINUE                                                          URBIN    2939
      IF(LDEB) WRITE(IUD6,9700) NUMSR1,NUMSRC                           URBIN    2940
      IF(NUMSRC.LE.NUMSR1) GO TO 982                                    URBIN    2941
C                                                                       URBIN    2942
C                                                                       URBIN    2943
C     Check that the second INITIAL clause has a matching PURPOSE.      URBIN    2944
C                                                                       URBIN    2945
      ABLK = .FALSE.                                                    URBIN    2946
      CBLK = .FALSE.                                                    URBIN    2947
      GBLK = .FALSE.                                                    URBIN    2948
      VBLK = .FALSE.                                                    URBIN    2949
      FOUND = .FALSE.                                                   URBIN    2950
C                                                                       URBIN    2951
      DO 981 I = NUMSR1+1, NUMSRC                                       URBIN    2952
         IF(.NOT. FOUND)THEN                                            URBIN    2953
            IF(SEARCH(I).EQ.'KEYWORD')THEN                              URBIN    2954
               IF(CDATA(I).EQ.'VOLTAGE')THEN                            URBIN    2955
                  VBLK = .TRUE.                                         URBIN    2956
               ELSEIF(CDATA(I).EQ.'CURRENT')THEN                        URBIN    2957
                  CBLK = .TRUE.                                         URBIN    2958
               ELSEIF(CDATA(I).EQ.'ALPHA')THEN                          URBIN    2959
                 ABLK = .TRUE.                                          URBIN    2960
               ELSEIF(CDATA(I).EQ.'GAMMA')THEN                          URBIN    2961
                  GBLK = .TRUE.                                         URBIN    2962
               END IF                                                   URBIN    2963
C                                                                       URBIN    2964
            ELSEIF(SEARCH(I).EQ.'SUB KEYWORD')THEN                      URBIN    2965
               IF(CDATA(I).EQ.'VOLTAGE')THEN                            URBIN    2966
                  IF(.NOT. VBLK)THEN                                    URBIN    2967
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2968
                     WRITE(MSG(2),9001) TNAME                           URBIN    2969
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2970
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2971
                     WRITE(MSG(5),9005)                                 URBIN    2972
                     CALL PRTMSG(5)                                     URBIN    2973
                     IERCNT = IERCNT + 1                                URBIN    2974
                  ELSE                                                  URBIN    2975
                     FOUND = .TRUE.                                     URBIN    2976
                  END IF                                                URBIN    2977
               ELSEIF(CDATA(I).EQ.'CURRENT')THEN                        URBIN    2978
                  IF(.NOT. CBLK)THEN                                    URBIN    2979
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2980
                     WRITE(MSG(2),9001) TNAME                           URBIN    2981
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2982
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2983
                     WRITE(MSG(5),9005)                                 URBIN    2984
                     CALL PRTMSG(5)                                     URBIN    2985
                     IERCNT = IERCNT + 1                                URBIN    2986
                  ELSE                                                  URBIN    2987
                     FOUND = .TRUE.                                     URBIN    2988
                  END IF                                                URBIN    2989
               ELSEIF(CDATA(I).EQ.'ALPHA')THEN                          URBIN    2990
                  IF(.NOT. ABLK)THEN                                    URBIN    2991
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    2992
                     WRITE(MSG(2),9001) TNAME                           URBIN    2993
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    2994
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    2995
                     WRITE(MSG(5),9005)                                 URBIN    2996
                     CALL PRTMSG(5)                                     URBIN    2997
                     IERCNT = IERCNT + 1                                URBIN    2998
                  ELSE                                                  URBIN    2999
                     FOUND = .TRUE.                                     URBIN    3000
                  END IF                                                URBIN    3001
               ELSEIF(CDATA(I).EQ.'GAMMA')THEN                          URBIN    3002
                  IF(.NOT. GBLK)THEN                                    URBIN    3003
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    3004
                     WRITE(MSG(2),9001) TNAME                           URBIN    3005
                     WRITE(MSG(3),9412) BNAME(1:LEN)                    URBIN    3006
                     WRITE(MSG(4),9418) CDATA(I)(1:32)                  URBIN    3007
                     WRITE(MSG(5),9005)                                 URBIN    3008
                     CALL PRTMSG(5)                                     URBIN    3009
                     IERCNT = IERCNT + 1                                URBIN    3010
                  ELSE                                                  URBIN    3011
                     FOUND = .TRUE.                                     URBIN    3012
                  END IF                                                URBIN    3013
               END IF                                                   URBIN    3014
C                                                                       URBIN    3015
               IF(FOUND)THEN                                            URBIN    3016
C                                                                       URBIN    3017
C     Convert CDATA to numeric equivalent.                              URBIN    3018
C                                                                       URBIN    3019
                  STRING(9:16) = CDATA(I)(1:8)                          URBIN    3020
                  CALL USTRNG(STRING, CONTRL, IUDC, 'IR ')              URBIN    3021
C                                                                       URBIN    3022
               END IF                                                   URBIN    3023
            END IF                                                      URBIN    3024
C                                                                       URBIN    3025
         END IF                                                         URBIN    3026
C                                                                       URBIN    3027
 981  CONTINUE                                                          URBIN    3028
 982  CONTINUE                                                          URBIN    3029
C---------------------------------------------------------------------  URBIN    3030
C                                                                       URBIN    3031
C                                                                       URBIN    3032
C     For debugging purposes:  dump block name, type name and           URBIN    3033
C     number, and subtype name and number.                              URBIN    3034
C                                                                       URBIN    3035
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN    3036
         DPRINT = .TRUE.                                                URBIN    3037
      END IF                                                            URBIN    3038
C                                                                       URBIN    3039
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    3040
         IF(LDEB) THEN                                                  URBIN    3041
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC)         URBIN    3042
         ELSE                                                           URBIN    3043
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC)         URBIN    3044
         END IF                                                         URBIN    3045
      END IF                                                            URBIN    3046
C                                                                       URBIN    3047
      IUNIPT(IUDC) = 0                                                  URBIN    3048
      IUDPPT(IUDC) = 0                                                  URBIN    3049
      IUDRPT(IUDC) = 0                                                  URBIN    3050
C                                                                       URBIN    3051
      DO 1020 I = 1, NUMSRC                                             URBIN    3052
C                                                                       URBIN    3053
C                                                                       URBIN    3054
C                                                                       URBIN    3055
C        4)   Store valid data.                                         URBIN    3056
C                                                                       URBIN    3057
         IF(SEARCH(I).EQ.'KEYWORD')THEN                                 URBIN    3058
C                                                                       URBIN    3059
C           a)   Store keyword.                                         URBIN    3060
C                                                                       URBIN    3061
C           Create a new link to the relational linked list.            URBIN    3062
C                                                                       URBIN    3063
            IADDR = IUDRFR                                              URBIN    3064
            IUDRFR = IUDRNX(IUDRFR)                                     URBIN    3065
            IF(IUDRPT(IUDC).EQ.0)THEN                                   URBIN    3066
               IUDRPT(IUDC) = IADDR                                     URBIN    3067
            ELSE                                                        URBIN    3068
               IUDRNX(LASTR) = IADDR                                    URBIN    3069
            END IF                                                      URBIN    3070
            IUDRNX(IADDR) = 0                                           URBIN    3071
            LASTR = IADDR                                               URBIN    3072
C                                                                       URBIN    3073
C           Store valid keyword or undefined value.                     URBIN    3074
C                                                                       URBIN    3075
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3076
               UDRKW(IADDR) = STARS                                     URBIN    3077
            ELSE                                                        URBIN    3078
               UDRKW(IADDR) = CDATA(I)(1:8)                             URBIN    3079
               IF(UDRKW(IADDR) .NE. CDATA(I))THEN                       URBIN    3080
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3081
               WRITE(MSG(2),9001) TNAME                                 URBIN    3082
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3083
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3084
               WRITE(MSG(5),9004) UDRKW(IADDR)                          URBIN    3085
               WRITE(MSG(6),9005)                                       URBIN    3086
               CALL PRTMSG(6)                                           URBIN    3087
                  IERCNT = IERCNT + 1                                   URBIN    3088
               END IF                                                   URBIN    3089
            END IF                                                      URBIN    3090
C                                                                       URBIN    3091
C           Initialize the remainder of the link to blank or zero.      URBIN    3092
C                                                                       URBIN    3093
            UDRELA(IADDR) = ' '                                         URBIN    3094
            UDPRM1(IADDR) = 0.0                                         URBIN    3095
            IUDBNM(IADDR) = 0                                           URBIN    3096
            UDBLK1(IADDR) = ' '                                         URBIN    3097
            UDPRM2(IADDR) = 0.0                                         URBIN    3098
            JUDBNM(IADDR) = 0                                           URBIN    3099
            UDBLK2(IADDR) = ' '                                         URBIN    3100
C                                                                       URBIN    3101
C           Create new link for identification linked list.             URBIN    3102
C                                                                       URBIN    3103
            CALL ADDINT (IUDC, IADDI, LASTI)                            URBIN    3104
            CALL ADDPRM (IUDC, IADDP, LASTP)                            URBIN    3105
C                                                                       URBIN    3106
C                                                                       URBIN    3107
C                                                                       URBIN    3108
C           b)   Store sub keyword.                                     URBIN    3109
C                                                                       URBIN    3110
         ELSEIF(SEARCH(I).EQ.'SUB KEYWORD')THEN                         URBIN    3111
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3112
               UDRELA(IADDR) = STARS                                    URBIN    3113
            ELSE                                                        URBIN    3114
               UDRELA(IADDR) = CDATA(I)(1:8)                            URBIN    3115
               IF(UDRELA(IADDR) .NE. CDATA(I))THEN                      URBIN    3116
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3117
               WRITE(MSG(2),9001) TNAME                                 URBIN    3118
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3119
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3120
               WRITE(MSG(5),9004) UDRELA(IADDR)                         URBIN    3121
               WRITE(MSG(6),9005)                                       URBIN    3122
               CALL PRTMSG(6)                                           URBIN    3123
                  IERCNT = IERCNT + 1                                   URBIN    3124
               END IF                                                   URBIN    3125
            END IF                                                      URBIN    3126
C                                                                       URBIN    3127
C                                                                       URBIN    3128
C                                                                       URBIN    3129
C           c)   Store print flag.                                      URBIN    3130
C                                                                       URBIN    3131
         ELSEIF(SEARCH(I).EQ.'PRINT FLAG')THEN                          URBIN    3132
C                                                                       URBIN    3133
C           Store print flag.  Invalid print flag information is        URBIN    3134
C           assumed to be false.                                        URBIN    3135
C                                                                       URBIN    3136
            IF(TYPE(I) .NE. ' ')THEN                                    URBIN    3137
               IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.             URBIN    3138
     1             CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN            URBIN    3139
                  UDPRNT(IUDC) = .TRUE.                                 URBIN    3140
               ELSE                                                     URBIN    3141
                  UDPRNT(IUDC) = .FALSE.                                URBIN    3142
               END IF                                                   URBIN    3143
               IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                      URBIN    3144
                     WRITE(MSG(1),9008) SUBNAM                          URBIN    3145
                     WRITE(MSG(2),9009) TNAME                           URBIN    3146
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN    3147
                     WRITE(MSG(4),9901)                                 URBIN    3148
                     CALL PRTMSG(4)                                     URBIN    3149
               END IF                                                   URBIN    3150
            ELSE                                                        URBIN    3151
               CDATA(I) = STARS                                         URBIN    3152
               UDPRNT(IUDC) = .FALSE.                                   URBIN    3153
            END IF                                                      URBIN    3154
C                                                                       URBIN    3155
C                                                                       URBIN    3156
C                                                                       URBIN    3157
C                                                                       URBIN    3158
C           d)   Store dc name 1.                                       URBIN    3159
C                                                                       URBIN    3160
         ELSEIF(SEARCH(I).EQ.'DC BUS 1')THEN                            URBIN    3161
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3162
               NAME(1:8) = STARS                                        URBIN    3163
            ELSE                                                        URBIN    3164
               NAME(1:8) = CDATA(I)                                     URBIN    3165
               IF(NAME(1:8) .NE. CDATA(I))THEN                          URBIN    3166
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3167
               WRITE(MSG(2),9001) TNAME                                 URBIN    3168
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3169
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3170
               WRITE(MSG(5),9004) NAME(1:8)                             URBIN    3171
               WRITE(MSG(6),9005)                                       URBIN    3172
               CALL PRTMSG(6)                                           URBIN    3173
                  IERCNT = IERCNT + 1                                   URBIN    3174
               END IF                                                   URBIN    3175
            END IF                                                      URBIN    3176
C                                                                       URBIN    3177
C                                                                       URBIN    3178
C           e)   Store dc bus name 2.                                   URBIN    3179
C                                                                       URBIN    3180
         ELSEIF(SEARCH(I).EQ.'DC BUS 2')THEN                            URBIN    3181
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3182
               NAME(9:16) = STARS                                       URBIN    3183
            ELSE                                                        URBIN    3184
               NAME(9:16) = CDATA(I)                                    URBIN    3185
               IF(NAME(9:16) .NE. CDATA(I))THEN                         URBIN    3186
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3187
               WRITE(MSG(2),9001) TNAME                                 URBIN    3188
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3189
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3190
               WRITE(MSG(5),9004) NAME(9:16)                            URBIN    3191
               WRITE(MSG(6),9005)                                       URBIN    3192
               CALL PRTMSG(6)                                           URBIN    3193
                  IERCNT = IERCNT + 1                                   URBIN    3194
               END IF                                                   URBIN    3195
            END IF                                                      URBIN    3196
C                                                                       URBIN    3197
C                                                                       URBIN    3198
C           f)   Store ac bus name.                                     URBIN    3199
C                                                                       URBIN    3200
         ELSEIF(SEARCH(I).EQ.'AC BUS')THEN                              URBIN    3201
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3202
               NAME(17:24) = STARS                                      URBIN    3203
            ELSE                                                        URBIN    3204
               NAME(17:24) = CDATA(I)                                   URBIN    3205
               IF(NAME(17:24) .NE. CDATA(I))THEN                        URBIN    3206
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3207
               WRITE(MSG(2),9001) TNAME                                 URBIN    3208
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3209
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3210
               WRITE(MSG(5),9004) NAME(17:24)                           URBIN    3211
               WRITE(MSG(6),9005)                                       URBIN    3212
               CALL PRTMSG(6)                                           URBIN    3213
                  IERCNT = IERCNT + 1                                   URBIN    3214
               END IF                                                   URBIN    3215
            END IF                                                      URBIN    3216
C                                                                       URBIN    3217
C                                                                       URBIN    3218
C           g)   Store kv value.                                        URBIN    3219
C                                                                       URBIN    3220
         ELSEIF(SEARCH(I).EQ.'KV')THEN                                  URBIN    3221
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3222
               NAME(25:28) = STARS                                      URBIN    3223
            ELSE                                                        URBIN    3224
               NAME(25:28) = CDATA(I)                                   URBIN    3225
            END IF                                                      URBIN    3226
C                                                                       URBIN    3227
C                                                                       URBIN    3228
C           h)   Store circuit number.                                  URBIN    3229
C                                                                       URBIN    3230
         ELSEIF(SEARCH(I).EQ.'CIRCUIT NUMBER')THEN                      URBIN    3231
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3232
               NAME(29:29) = STARS                                      URBIN    3233
            ELSE                                                        URBIN    3234
               NAME(29:29) = CDATA(I)                                   URBIN    3235
               IF(NAME(29:29) .NE. CDATA(I))THEN                        URBIN    3236
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3237
               WRITE(MSG(2),9001) TNAME                                 URBIN    3238
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3239
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3240
               WRITE(MSG(5),9004) NAME(29:29)                           URBIN    3241
               WRITE(MSG(6),9005)                                       URBIN    3242
               CALL PRTMSG(6)                                           URBIN    3243
                  IERCNT = IERCNT + 1                                   URBIN    3244
               END IF                                                   URBIN    3245
            END IF                                                      URBIN    3246
C                                                                       URBIN    3247
            FOUND = .FALSE.                                             URBIN    3248
            JPOSN = 0                                                   URBIN    3249
            DO 1000 K = 1, ICDC                                         URBIN    3250
               IF(IDC(K) .NE. 0)THEN                                    URBIN    3251
                  JPOSN = IDC(K)                                        URBIN    3252
                  IF(NAME.EQ.DCCNAM(JPOSN))THEN                         URBIN    3253
                     FOUND = .TRUE.                                     URBIN    3254
                     JSTORE = JPOSN                                     URBIN    3255
                  END IF                                                URBIN    3256
               END IF                                                   URBIN    3257
1000        CONTINUE                                                    URBIN    3258
            IF(FOUND)THEN                                               URBIN    3259
               IF(IFXINT.EQ.0)THEN                                      URBIN    3260
                  IFXINT = IFXFRE                                       URBIN    3261
                  IFXFRE = IFXNEX(IFXFRE)                               URBIN    3262
                  IFXLST = IFXINT                                       URBIN    3263
               ELSE                                                     URBIN    3264
                  NEW = IFXFRE                                          URBIN    3265
                  IFXFRE = IFXNEX(IFXFRE)                               URBIN    3266
                  IFXNEX(IFXLST) = NEW                                  URBIN    3267
                  IFXLST = NEW                                          URBIN    3268
               END IF                                                   URBIN    3269
C                                                                       URBIN    3270
               IFXNUM(IFXLST) = JSTORE                                  URBIN    3271
               FXNAM1(IFXLST) = ' '                                     URBIN    3272
               JFXNUM(IFXLST) = INT(CONTRL)                             URBIN    3273
               FXNAM2(IFXLST) = ' '                                     URBIN    3274
               IFXNEX(IFXLST) = 0                                       URBIN    3275
            END IF                                                      URBIN    3276
            IF(.NOT. FOUND)THEN                                         URBIN    3277
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    3278
                     WRITE(MSG(2),9001) TNAME                           URBIN    3279
                     WRITE(MSG(3),9426) BNAME(1:LEN)                    URBIN    3280
                     WRITE(MSG(4),9427) NAME(1:29)                      URBIN    3281
                     WRITE(MSG(5),9428)                                 URBIN    3282
                     WRITE(MSG(6),9005)                                 URBIN    3283
                     CALL PRTMSG(6)                                     URBIN    3284
               IERCNT = IERCNT + 1                                      URBIN    3285
               JSTORE = 0                                               URBIN    3286
           END IF                                                       URBIN    3287
C                                                                       URBIN    3288
C           Create new link for identification linked list.             URBIN    3289
C                                                                       URBIN    3290
            CALL ADDINT (IUDC, IADDI, LASTI)                            URBIN    3291
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3292
               IUDINT(IADDI) = 0                                        URBIN    3293
            ELSE                                                        URBIN    3294
               IUDINT(IADDI) = JSTORE                                   URBIN    3295
            END IF                                                      URBIN    3296
C                                                                       URBIN    3297
C                                                                       URBIN    3298
C                                                                       URBIN    3299
C           i)   Store block name.                                      URBIN    3300
C                                                                       URBIN    3301
         ELSEIF(SEARCH(I).EQ.'INPUT BLOCK')THEN                         URBIN    3302
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3303
               UIDENT(IADDI) = STARS                                    URBIN    3304
            ELSEIF(TYPE(I).EQ.'CHAR')THEN                               URBIN    3305
               UIDENT(IADDI) = CDATA(I)                                 URBIN    3306
               IF(UIDENT(IADDI) .NE. CDATA(I))THEN                      URBIN    3307
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3308
               WRITE(MSG(2),9001) TNAME                                 URBIN    3309
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3310
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3311
               WRITE(MSG(5),9004) UIDENT(IADDI)                         URBIN    3312
               WRITE(MSG(6),9005)                                       URBIN    3313
               CALL PRTMSG(6)                                           URBIN    3314
                  IERCNT = IERCNT + 1                                   URBIN    3315
               END IF                                                   URBIN    3316
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    3317
               UDPARM(IADDP) = RDATA(I)                                 URBIN    3318
            END IF                                                      URBIN    3319
C                                                                       URBIN    3320
C                                                                       URBIN    3321
C                                                                       URBIN    3322
C           j)   Store input 1.                                         URBIN    3323
C                                                                       URBIN    3324
         ELSEIF(SEARCH(I).EQ.'INPUT 1')THEN                             URBIN    3325
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3326
               UDBLK1(IADDR) = STARS                                    URBIN    3327
            ELSEIF(TYPE(I).EQ.'REAL' .OR. TYPE(I).EQ.'CHRE')THEN        URBIN    3328
               UDPRM1(IADDR) = RDATA(I)                                 URBIN    3329
               IUDBNM(IADDR) = -99                                      URBIN    3330
            ELSEIF(TYPE(I).EQ.'CHAR')THEN                               URBIN    3331
               UDBLK1(IADDR) = CDATA(I)                                 URBIN    3332
               IF(UDBLK1(IADDR) .NE. CDATA(I))THEN                      URBIN    3333
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3334
               WRITE(MSG(2),9001) TNAME                                 URBIN    3335
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3336
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3337
               WRITE(MSG(5),9004) UDBLK1(IADDR)                         URBIN    3338
               WRITE(MSG(6),9005)                                       URBIN    3339
               CALL PRTMSG(6)                                           URBIN    3340
                  IERCNT = IERCNT + 1                                   URBIN    3341
               END IF                                                   URBIN    3342
            END IF                                                      URBIN    3343
C                                                                       URBIN    3344
C                                                                       URBIN    3345
C           k)   Store input 2 or input.                                URBIN    3346
C                                                                       URBIN    3347
         ELSEIF(SEARCH(I).EQ.'INPUT 2' .OR.                             URBIN    3348
     1            SEARCH(I).EQ.'INPUT')THEN                             URBIN    3349
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3350
               UDBLK2(IADDR) = STARS                                    URBIN    3351
            ELSEIF(TYPE(I).EQ.'REAL' .OR. TYPE(I).EQ.'CHRE')THEN        URBIN    3352
               UDPRM2(IADDR) = RDATA(I)                                 URBIN    3353
               JUDBNM(IADDR) = -99                                      URBIN    3354
            ELSEIF(TYPE(I).EQ.'CHAR')THEN                               URBIN    3355
               UDBLK2(IADDR) = CDATA(I)                                 URBIN    3356
               IF(UDBLK2(IADDR) .NE. CDATA(I))THEN                      URBIN    3357
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3358
               WRITE(MSG(2),9001) TNAME                                 URBIN    3359
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3360
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3361
               WRITE(MSG(5),9004) UDBLK2(IADDR)                         URBIN    3362
               WRITE(MSG(6),9005)                                       URBIN    3363
               CALL PRTMSG(6)                                           URBIN    3364
                  IERCNT = IERCNT + 1                                   URBIN    3365
               END IF                                                   URBIN    3366
            END IF                                                      URBIN    3367
C                                                                       URBIN    3368
C                                                                       URBIN    3369
C                                                                       URBIN    3370
C           l)   Store operator.                                        URBIN    3371
C                                                                       URBIN    3372
         ELSEIF(SEARCH(I).EQ.'OPERATOR')THEN                            URBIN    3373
            IF(TYPE(I).EQ.' ')THEN                                      URBIN    3374
               UDRELA(IADDR) = STARS                                    URBIN    3375
            ELSE                                                        URBIN    3376
               UDRELA(IADDR) = CDATA(I)(1:2)                            URBIN    3377
               IF(UDRELA(IADDR) .NE. CDATA(I))THEN                      URBIN    3378
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3379
               WRITE(MSG(2),9001) TNAME                                 URBIN    3380
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3381
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3382
               WRITE(MSG(5),9004) UDRELA(IADDR)                         URBIN    3383
               WRITE(MSG(6),9005)                                       URBIN    3384
               CALL PRTMSG(6)                                           URBIN    3385
                  IERCNT = IERCNT + 1                                   URBIN    3386
               END IF                                                   URBIN    3387
            END IF                                                      URBIN    3388
         END IF                                                         URBIN    3389
C                                                                       URBIN    3390
C                                                                       URBIN    3391
C                                                                       URBIN    3392
C        For debugging purposes:  dump all valid data.  For             URBIN    3393
C        invalid data a not defined message will be printed.            URBIN    3394
C                                                                       URBIN    3395
         IF(LDEB .OR. DPRINT)THEN                                       URBIN    3396
            N = LENGTH(I) + 1                                           URBIN    3397
            IF(SEARCH(I).EQ.'KEYWORD')THEN                              URBIN    3398
               INDENT = .TRUE.                                          URBIN    3399
            ELSE                                                        URBIN    3400
               INDENT = .FALSE.                                         URBIN    3401
            END IF                                                      URBIN    3402
C                                                                       URBIN    3403
            SEARCH(I)(N:N) = ':'                                        URBIN    3404
            IF(TYPE(I).EQ.'CHAR' .OR. TYPE(I).EQ.'CHRE')THEN            URBIN    3405
               IF(INDENT)THEN                                           URBIN    3406
                  IF(LDEB) THEN                                         URBIN    3407
                     WRITE (IUD6,9010) SEARCH(I), CDATA(I)              URBIN    3408
                  ELSE                                                  URBIN    3409
                     WRITE (IU16,9010) SEARCH(I), CDATA(I)              URBIN    3410
                  ENDIF                                                 URBIN    3411
               ELSE                                                     URBIN    3412
                  IF(LDEB) THEN                                         URBIN    3413
                     WRITE (IU16,9430) SEARCH(I), CDATA(I)              URBIN    3414
                  ELSE                                                  URBIN    3415
                     WRITE (IUD6,9430) SEARCH(I), CDATA(I)              URBIN    3416
                  ENDIF                                                 URBIN    3417
               END IF                                                   URBIN    3418
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    3419
               IF(LDEB) THEN                                            URBIN    3420
                  WRITE (IUD6,9432) SEARCH(I), RDATA(I)                 URBIN    3421
               ELSE                                                     URBIN    3422
                  WRITE (IU16,9432) SEARCH(I), RDATA(I)                 URBIN    3423
               ENDIF                                                    URBIN    3424
            ELSEIF(TYPE(I).EQ.'INTE')THEN                               URBIN    3425
               IF(LDEB) THEN                                            URBIN    3426
                  WRITE (IUD6,9434) SEARCH(I), IDATA(I)                 URBIN    3427
               ELSE                                                     URBIN    3428
                  WRITE (IU16,9434) SEARCH(I), IDATA(I)                 URBIN    3429
               ENDIF                                                    URBIN    3430
            ELSEIF(TYPE(I).EQ.' ')THEN                                  URBIN    3431
               IF(INDENT)THEN                                           URBIN    3432
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    3433
                  CALL PRTMSG(1)                                        URBIN    3434
               ELSE                                                     URBIN    3435
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    3436
                  CALL PRTMSG(1)                                        URBIN    3437
               END IF                                                   URBIN    3438
            END IF                                                      URBIN    3439
         END IF                                                         URBIN    3440
1020  CONTINUE                                                          URBIN    3441
C                                                                       URBIN    3442
      RETURN                                                            URBIN    3443
C                                                                       URBIN    3444
C                                                                       URBIN    3445
C---------------------------------------------------------------------  URBIN    3446
C                                                                       URBIN    3447
      ENTRY URMLTP                                                      URBIN    3448
CD -------------------------------------------------------------------  URBIN    3449
CD                                                                      URBIN    3450
CD              *****     URMLTP  ROUTINE   *****                       URBIN    3451
CD                                                                      URBIN    3452
CD -------------------------------------------------------------------  URBIN    3453
CD                                                                      URBIN    3454
CD       PURPOSE:  Controls the reading of the udc type MULTIPLE data   URBIN    3455
CD                 from the input file.  Does limited error checking.   URBIN    3456
CD                 Stores valid data in the udc storage arrays.         URBIN    3457
CD                                                                      URBIN    3458
CD -------------------------------------------------------------------  URBIN    3459
C                                                                       URBIN    3460
C     Define subroutine name.                                           URBIN    3461
C                                                                       URBIN    3462
      LDEB=(JDEB(310).NE.0)                                             URBIN    3463
C                                                                       URBIN    3464
      IF(SDBG)THEN                                                      URBIN    3465
         SUBNAM = 'URMLTP ROUTINE.'                                     URBIN    3466
      ELSE                                                              URBIN    3467
         SUBNAM = ' '                                                   URBIN    3468
      END IF                                                            URBIN    3469
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN    3470
      BNAME = UDNAME(IUDC)                                              URBIN    3471
      LEN = IUDLEN(IUDC)                                                URBIN    3472
C                                                                       URBIN    3473
C     Forces an interrupted card image if an error is found.            URBIN    3474
C                                                                       URBIN    3475
      JDCOUN = IERCNT                                                   URBIN    3476
      DPRINT = .FALSE.                                                  URBIN    3477
C                                                                       URBIN    3478
      IF(EXPAND)THEN                                                    URBIN    3479
C                                                                       URBIN    3480
C        Obtain the subtype name from the saved information for this    URBIN    3481
C        structure.                                                     URBIN    3482
C                                                                       URBIN    3483
         SNAME = SBMLTP(IUDSUB(IUDC))                                   URBIN    3484
C                                                                       URBIN    3485
      ELSE                                                              URBIN    3486
C                                                                       URBIN    3487
C        Read the subtype name.                                         URBIN    3488
C                                                                       URBIN    3489
         ENDBLK = .FALSE.                                               URBIN    3490
         CALL URGETC (CDATA(1), FOUND)                                  URBIN    3491
         IF(.NOT. FOUND)THEN                                            URBIN    3492
            SNAME = STARS                                               URBIN    3493
         ELSE                                                           URBIN    3494
            SNAME = CDATA(1)                                            URBIN    3495
            IF(SNAME .NE. CDATA(1))THEN                                 URBIN    3496
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3497
               WRITE(MSG(2),9001) TNAME                                 URBIN    3498
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3499
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN    3500
               WRITE(MSG(5),9004) SNAME                                 URBIN    3501
               WRITE(MSG(6),9005)                                       URBIN    3502
               CALL PRTMSG(6)                                           URBIN    3503
               IERCNT = IERCNT + 1                                      URBIN    3504
            END IF                                                      URBIN    3505
         END IF                                                         URBIN    3506
      END IF                                                            URBIN    3507
C                                                                       URBIN    3508
C--------------------------------------------------------------------   URBIN    3509
C                                                                       URBIN    3510
C     Determine the required data names and the number of searches      URBIN    3511
C     required.                                                         URBIN    3512
C                                                                       URBIN    3513
      JREPEA = 0                                                        URBIN    3514
C                                                                       URBIN    3515
C     Multiple add function.                                            URBIN    3516
C                                                                       URBIN    3517
      IF(SNAME.EQ.SBMLTP(ISUMS))THEN                                    URBIN    3518
         IUDSUB(IUDC) = ISUMS                                           URBIN    3519
         NUMSRC = 2                                                     URBIN    3520
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    3521
         SEARCH(2) = 'INPUT'                                            URBIN    3522
         JREPEA = 1                                                     URBIN    3523
C                                                                       URBIN    3524
C     Multiple minimum function.                                        URBIN    3525
C                                                                       URBIN    3526
      ELSEIF(SNAME.EQ.SBMLTP(MINS))THEN                                 URBIN    3527
         IUDSUB(IUDC) = MINS                                            URBIN    3528
         NUMSRC = 2                                                     URBIN    3529
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    3530
         SEARCH(2) = 'INPUT'                                            URBIN    3531
         JREPEA = 1                                                     URBIN    3532
C                                                                       URBIN    3533
C     Multiple maximum function.                                        URBIN    3534
C                                                                       URBIN    3535
      ELSEIF(SNAME.EQ.SBMLTP(MAXS))THEN                                 URBIN    3536
         IUDSUB(IUDC) = MAXS                                            URBIN    3537
         NUMSRC = 2                                                     URBIN    3538
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    3539
         SEARCH(2) = 'INPUT'                                            URBIN    3540
         JREPEA = 1                                                     URBIN    3541
C                                                                       URBIN    3542
C     Multiple summer function.                                         URBIN    3543
C                                                                       URBIN    3544
      ELSEIF(SNAME.EQ.SBMLTP(ISUMR))THEN                                URBIN    3545
         IUDSUB(IUDC) = ISUMR                                           URBIN    3546
         NUMSRC = 3                                                     URBIN    3547
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    3548
         SEARCH(2) = 'INPUT'                                            URBIN    3549
         SEARCH(3) = 'GAIN'                                             URBIN    3550
         JREPEA = 2                                                     URBIN    3551
C                                                                       URBIN    3552
C     Invalid type.                                                     URBIN    3553
C                                                                       URBIN    3554
      ELSE                                                              URBIN    3555
         IUDSUB(IUDC) = 0                                               URBIN    3556
         NUMSRC = 0                                                     URBIN    3557
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3558
               WRITE(MSG(2),9001) TNAME                                 URBIN    3559
               WRITE(MSG(3),9006) BNAME(1:LEN),SNAME                    URBIN    3560
               WRITE(MSG(4),9007)                                       URBIN    3561
               WRITE(MSG(5),9005)                                       URBIN    3562
               CALL PRTMSG(5)                                           URBIN    3563
         IERCNT = IERCNT + 1                                            URBIN    3564
      END IF                                                            URBIN    3565
C                                                                       URBIN    3566
C---------------------------------------------------------------------  URBIN    3567
C                                                                       URBIN    3568
C     Based on the data names required, determine the type of searches, URBIN    3569
C     and length of data names.                                         URBIN    3570
C                                                                       URBIN    3571
      DO 1120 I = 1, NUMSRC                                             URBIN    3572
         IF(SEARCH(I).EQ.'PRINT FLAG')THEN                              URBIN    3573
            TYPE(I) = 'CHAR'                                            URBIN    3574
            LENGTH(I) = 10                                              URBIN    3575
         ELSEIF(SEARCH(I).EQ.'INPUT')THEN                               URBIN    3576
            TYPE(I) = 'RECH'                                            URBIN    3577
            LENGTH(I) = 5                                               URBIN    3578
         ELSEIF(SEARCH(I).EQ.'GAIN')THEN                                URBIN    3579
            TYPE(I) = 'REAL'                                            URBIN    3580
            LENGTH(I) = 4                                               URBIN    3581
         END IF                                                         URBIN    3582
1120  CONTINUE                                                          URBIN    3583
C                                                                       URBIN    3584
C                                                                       URBIN    3585
C---------------------------------------------------------------------  URBIN    3586
C                                                                       URBIN    3587
C     Retrieve the necessary data from the input file.                  URBIN    3588
C                                                                       URBIN    3589
      CALL URREAD (CDATA, RDATA, IDATA, JREPEA)                         URBIN    3590
C                                                                       URBIN    3591
C---------------------------------------------------------------------  URBIN    3592
C                                                                       URBIN    3593
C     For debugging purposes:  dump block name, type name and           URBIN    3594
C     number, and subtype and number.                                   URBIN    3595
C                                                                       URBIN    3596
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN    3597
         DPRINT = .TRUE.                                                URBIN    3598
      END IF                                                            URBIN    3599
C                                                                       URBIN    3600
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    3601
         IF(LDEB) THEN                                                  URBIN    3602
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    3603
     1                      IUDSUB(IUDC)                                URBIN    3604
         ELSE                                                           URBIN    3605
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    3606
     1                      IUDSUB(IUDC)                                URBIN    3607
         ENDIF                                                          URBIN    3608
      END IF                                                            URBIN    3609
C                                                                       URBIN    3610
C---------------------------------------------------------------------  URBIN    3611
C                                                                       URBIN    3612
      IF(DEFINE)THEN                                                    URBIN    3613
C                                                                       URBIN    3614
C        Save information in the structure linked list.                 URBIN    3615
C                                                                       URBIN    3616
         CALL ADDSTR (CDATA, RDATA, IDATA)                              URBIN    3617
C                                                                       URBIN    3618
C                                                                       URBIN    3619
      ELSE                                                              URBIN    3620
C        Store valid data.                                              URBIN    3621
C                                                                       URBIN    3622
         IUNIPT(IUDC) = 0                                               URBIN    3623
         IUDPPT(IUDC) = 0                                               URBIN    3624
         IUDRPT(IUDC) = 0                                               URBIN    3625
C                                                                       URBIN    3626
         DO 1140 I = 1, NUMSRC                                          URBIN    3627
C                                                                       URBIN    3628
C                                                                       URBIN    3629
C           a)   Store print flag.                                      URBIN    3630
C                                                                       URBIN    3631
            IF(SEARCH(I).EQ.'PRINT FLAG')THEN                           URBIN    3632
C                                                                       URBIN    3633
C              Invalid print flag is assumed to be false.               URBIN    3634
C                                                                       URBIN    3635
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN    3636
                  IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.          URBIN    3637
     1                CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN         URBIN    3638
                     UDPRNT(IUDC) = .TRUE.                              URBIN    3639
                  ELSE                                                  URBIN    3640
                     UDPRNT(IUDC) = .FALSE.                             URBIN    3641
                  END IF                                                URBIN    3642
                  IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                   URBIN    3643
                     WRITE(MSG(1),9008) SUBNAM                          URBIN    3644
                     WRITE(MSG(2),9009) TNAME                           URBIN    3645
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN    3646
                     WRITE(MSG(4),9901)                                 URBIN    3647
                     CALL PRTMSG(4)                                     URBIN    3648
                  END IF                                                URBIN    3649
               ELSE                                                     URBIN    3650
                  CDATA(I) = STARS                                      URBIN    3651
                  UDPRNT(IUDC) = .FALSE.                                URBIN    3652
               END IF                                                   URBIN    3653
C                                                                       URBIN    3654
C                                                                       URBIN    3655
C                                                                       URBIN    3656
C           b)   Store input.                                           URBIN    3657
C                                                                       URBIN    3658
            ELSEIF(SEARCH(I).EQ.'INPUT')THEN                            URBIN    3659
C                                                                       URBIN    3660
C              Create new link for identification linked list, and      URBIN    3661
C              parameter linked list.                                   URBIN    3662
C                                                                       URBIN    3663
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    3664
               CALL ADDPRM (IUDC, IADDP, LASTP)                         URBIN    3665
C                                                                       URBIN    3666
C              Store valid or undefined input values.                   URBIN    3667
C                                                                       URBIN    3668
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    3669
                  UIDENT(IADDI) = STARS                                 URBIN    3670
               ELSEIF(TYPE(I).EQ.'CHAR')THEN                            URBIN    3671
                  IF(EXPAND.AND.CDATA(I)(1:1).EQ.'.')THEN               URBIN    3672
C                                                                       URBIN    3673
C                    Expand the block name if it begins with "."        URBIN    3674
C                                                                       URBIN    3675
                     UIDENT(IADDI) = SRNAME(1:ISRLEN)                   URBIN    3676
                     UIDENT(IADDI)(ISRLEN+1:17) = CDATA(I)              URBIN    3677
                     CDATA(I) = UIDENT(IADDI)                           URBIN    3678
                  ELSE                                                  URBIN    3679
                     UIDENT(IADDI) = CDATA(I)                           URBIN    3680
                     IF(UIDENT(IADDI) .NE. CDATA(I))THEN                URBIN    3681
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3682
               WRITE(MSG(2),9001) TNAME                                 URBIN    3683
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3684
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    3685
               WRITE(MSG(5),9004) UIDENT(IADDI)                         URBIN    3686
               WRITE(MSG(6),9005)                                       URBIN    3687
               CALL PRTMSG(6)                                           URBIN    3688
                        IERCNT = IERCNT + 1                             URBIN    3689
                     END IF                                             URBIN    3690
                  END IF                                                URBIN    3691
               ELSEIF(TYPE(I).EQ.'REAL')THEN                            URBIN    3692
                  UDPARM(IADDP) = RDATA(I)                              URBIN    3693
               END IF                                                   URBIN    3694
C                                                                       URBIN    3695
C                                                                       URBIN    3696
C                                                                       URBIN    3697
C           c)   Store gain value.                                      URBIN    3698
C                                                                       URBIN    3699
            ELSEIF(SEARCH(I).EQ.'GAIN')THEN                             URBIN    3700
C                                                                       URBIN    3701
C              Create new link for parameter linked list.               URBIN    3702
C                                                                       URBIN    3703
               CALL ADDPRM (IUDC, IADDP, LASTP)                         URBIN    3704
C                                                                       URBIN    3705
C              Store valid or undefined gain values.                    URBIN    3706
C                                                                       URBIN    3707
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    3708
                  UDPARM(IADDP) = 0.0                                   URBIN    3709
               ELSEIF(TYPE(I).EQ.'REAL')THEN                            URBIN    3710
                  UDPARM(IADDP) = RDATA(I)                              URBIN    3711
               END IF                                                   URBIN    3712
C                                                                       URBIN    3713
            END IF                                                      URBIN    3714
1140     CONTINUE                                                       URBIN    3715
      END IF                                                            URBIN    3716
C                                                                       URBIN    3717
C---------------------------------------------------------------------  URBIN    3718
C                                                                       URBIN    3719
C     For debugging purposes:  dump all valid data.  For invalid        URBIN    3720
C     data a not defined message will be printed.                       URBIN    3721
C                                                                       URBIN    3722
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    3723
         DO 1160 I = 1, NUMSRC                                          URBIN    3724
            N = LENGTH(I) + 1                                           URBIN    3725
            SEARCH(I)(N:N) = ':'                                        URBIN    3726
            IF(TYPE(I).EQ.'CHAR')THEN                                   URBIN    3727
               IF(LDEB) THEN                                            URBIN    3728
                  WRITE (IUD6,9010) SEARCH(I), CDATA(I)                 URBIN    3729
               ELSE                                                     URBIN    3730
                  WRITE (IU16,9010) SEARCH(I), CDATA(I)                 URBIN    3731
               ENDIF                                                    URBIN    3732
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    3733
               IF(LDEB) THEN                                            URBIN    3734
                  WRITE (IUD6,9012) SEARCH(I), RDATA(I)                 URBIN    3735
               ELSE                                                     URBIN    3736
                  WRITE (IU16,9012) SEARCH(I), RDATA(I)                 URBIN    3737
               ENDIF                                                    URBIN    3738
            ELSEIF(TYPE(I).EQ.'INTE')THEN                               URBIN    3739
               IF(LDEB) THEN                                            URBIN    3740
                  WRITE (IUD6,9014) SEARCH(I), IDATA(I)                 URBIN    3741
               ELSE                                                     URBIN    3742
                  WRITE (IU16,9014) SEARCH(I), IDATA(I)                 URBIN    3743
               ENDIF                                                    URBIN    3744
            ELSEIF(TYPE(I).EQ.' ')THEN                                  URBIN    3745
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    3746
                  CALL PRTMSG(1)                                        URBIN    3747
            END IF                                                      URBIN    3748
1160     CONTINUE                                                       URBIN    3749
      END IF                                                            URBIN    3750
C                                                                       URBIN    3751
      IF(DEFINE)THEN                                                    URBIN    3752
         IUDC = IUDC - 1                                                URBIN    3753
      END IF                                                            URBIN    3754
C                                                                       URBIN    3755
      RETURN                                                            URBIN    3756
C                                                                       URBIN    3757
C                                                                       URBIN    3758
C---------------------------------------------------------------------  URBIN    3759
C                                                                       URBIN    3760
      ENTRY URSBLK                                                      URBIN    3761
CD -------------------------------------------------------------------  URBIN    3762
CD                                                                      URBIN    3763
CD              *****     URSBLK  ROUTINE   *****                       URBIN    3764
CD                                                                      URBIN    3765
CD -------------------------------------------------------------------  URBIN    3766
CD                                                                      URBIN    3767
CD       PURPOSE:  Controls the reading of the udc type SBLOCK data     URBIN    3768
CD                 from the input file.  Does limited error checking.   URBIN    3769
CD                 Stores valid data in the udc storage arrays.         URBIN    3770
CD                                                                      URBIN    3771
CD -------------------------------------------------------------------  URBIN    3772
C                                                                       URBIN    3773
C     Define subroutine name.                                           URBIN    3774
C                                                                       URBIN    3775
      LDEB=(JDEB(301).NE.0)                                             URBIN    3776
C                                                                       URBIN    3777
      IF(SDBG)THEN                                                      URBIN    3778
        SUBNAM = 'URSBLK ROUTINE.'                                      URBIN    3779
      ELSE                                                              URBIN    3780
        SUBNAM = ' '                                                    URBIN    3781
      ENDIF                                                             URBIN    3782
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN    3783
      BNAME = UDNAME(IUDC)                                              URBIN    3784
      LEN = IUDLEN(IUDC)                                                URBIN    3785
C                                                                       URBIN    3786
C     Forces an interrupted card image if an error is found.            URBIN    3787
C                                                                       URBIN    3788
      JDCOUN = IERCNT                                                   URBIN    3789
      DPRINT = .FALSE.                                                  URBIN    3790
C                                                                       URBIN    3791
      IF(EXPAND)THEN                                                    URBIN    3792
C                                                                       URBIN    3793
C        Obtain the subtype name from the saved information for this    URBIN    3794
C        STRUCURE.                                                      URBIN    3795
C                                                                       URBIN    3796
         SNAME = SBSBLK(IUDSUB(IUDC))                                   URBIN    3797
C                                                                       URBIN    3798
      ELSE                                                              URBIN    3799
C                                                                       URBIN    3800
C        Read the subtype name.                                         URBIN    3801
C                                                                       URBIN    3802
         ENDBLK = .FALSE.                                               URBIN    3803
         CALL URGETC (CDATA(1), FOUND)                                  URBIN    3804
         IF(.NOT. FOUND)THEN                                            URBIN    3805
            SNAME = STARS                                               URBIN    3806
         ELSE                                                           URBIN    3807
            SNAME = CDATA(1)                                            URBIN    3808
            IF(SNAME .NE. CDATA(1))THEN                                 URBIN    3809
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3810
               WRITE(MSG(2),9001) TNAME                                 URBIN    3811
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    3812
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN    3813
               WRITE(MSG(5),9004) SNAME                                 URBIN    3814
               WRITE(MSG(6),9005)                                       URBIN    3815
               CALL PRTMSG(6)                                           URBIN    3816
               IERCNT = IERCNT + 1                                      URBIN    3817
            ENDIF                                                       URBIN    3818
         ENDIF                                                          URBIN    3819
      ENDIF                                                             URBIN    3820
C                                                                       URBIN    3821
C---------------------------------------------------------------------  URBIN    3822
C                                                                       URBIN    3823
C     Determine the required data names and the number of searches      URBIN    3824
C     required.                                                         URBIN    3825
C                                                                       URBIN    3826
      JREPEA = 0                                                        URBIN    3827
C                                                                       URBIN    3828
      IF(SNAME.EQ.SBSBLK(LIMITS))THEN                                   URBIN    3829
         IUDSUB(IUDC) = LIMITS                                          URBIN    3830
         NUMSRC = 6                                                     URBIN    3831
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    3832
         SEARCH(2) = 'INPUT BLOCK'                                      URBIN    3833
         SEARCH(3) = 'LOW LIMIT'                                        URBIN    3834
         SEARCH(4) = 'HIGH LIMIT'                                       URBIN    3835
         SEARCH(5) = 'NUMBER'                                           URBIN    3836
         SEARCH(6) = 'PARAMETER'                                        URBIN    3837
         JREPEA = 1                                                     URBIN    3838
C                                                                       URBIN    3839
      ELSEIF(SNAME.EQ.SBSBLK(NORMLS))THEN                               URBIN    3840
         IUDSUB(IUDC) = NORMLS                                          URBIN    3841
         NUMSRC = 4                                                     URBIN    3842
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    3843
         SEARCH(2) = 'INPUT BLOCK'                                      URBIN    3844
         SEARCH(3) = 'NUMBER'                                           URBIN    3845
         SEARCH(4) = 'PARAMETER'                                        URBIN    3846
         JREPEA = 1                                                     URBIN    3847
C                                                                       URBIN    3848
C     Invalid subtype.                                                  URBIN    3849
C                                                                       URBIN    3850
      ELSE                                                              URBIN    3851
         IUDSUB(IUDC) = 0                                               URBIN    3852
         NUMSRC = 0                                                     URBIN    3853
               WRITE(MSG(1),9000) SUBNAM                                URBIN    3854
               WRITE(MSG(2),9001) TNAME                                 URBIN    3855
               WRITE(MSG(3),9006) BNAME(1:LEN),SNAME                    URBIN    3856
               WRITE(MSG(4),9007)                                       URBIN    3857
               WRITE(MSG(5),9005)                                       URBIN    3858
               CALL PRTMSG(5)                                           URBIN    3859
         IERCNT = IERCNT + 1                                            URBIN    3860
      ENDIF                                                             URBIN    3861
C                                                                       URBIN    3862
C                                                                       URBIN    3863
C---------------------------------------------------------------------  URBIN    3864
C                                                                       URBIN    3865
C     Based on the data names required, determine the type of searches, URBIN    3866
C     and length of data names.                                         URBIN    3867
C                                                                       URBIN    3868
      DO 1220 I = 1, NUMSRC                                             URBIN    3869
         IF(SEARCH(I).EQ.'PRINT FLAG')THEN                              URBIN    3870
            TYPE(I) = 'CHAR'                                            URBIN    3871
            LENGTH(I) = 10                                              URBIN    3872
         ELSEIF(SEARCH(I).EQ.'INPUT BLOCK')THEN                         URBIN    3873
            TYPE(I) = 'CHAR'                                            URBIN    3874
            LENGTH(I) = 11                                              URBIN    3875
         ELSEIF(SEARCH(I).EQ.'NUMBER')THEN                              URBIN    3876
            TYPE(I) = 'INTE'                                            URBIN    3877
            LENGTH(I) = 6                                               URBIN    3878
            NUM = I                                                     URBIN    3879
         ELSEIF(SEARCH(I).EQ.'PARAMETER')THEN                           URBIN    3880
            TYPE(I) = 'REAL'                                            URBIN    3881
            LENGTH(I) = 9                                               URBIN    3882
         ELSEIF(SEARCH(I).EQ.'LOW LIMIT')THEN                           URBIN    3883
            TYPE(I) = 'RECH'                                            URBIN    3884
            LENGTH(I) = 9                                               URBIN    3885
         ELSEIF(SEARCH(I).EQ.'HIGH LIMIT')THEN                          URBIN    3886
            TYPE(I) = 'RECH'                                            URBIN    3887
            LENGTH(I) = 10                                              URBIN    3888
         ENDIF                                                          URBIN    3889
1220  CONTINUE                                                          URBIN    3890
C                                                                       URBIN    3891
C---------------------------------------------------------------------  URBIN    3892
C                                                                       URBIN    3893
C     Retrieve the necessary data from the file.                        URBIN    3894
C                                                                       URBIN    3895
      CALL URREAD (CDATA, RDATA, IDATA, JREPEA)                         URBIN    3896
C                                                                       URBIN    3897
C                                                                       URBIN    3898
C     Check that the number of parameters expected were read.           URBIN    3899
C                                                                       URBIN    3900
      IF(NUMSRC .NE. 0)THEN                                             URBIN    3901
         IF(TYPE(NUM).EQ.' ')THEN                                       URBIN    3902
            NUMBER = 0                                                  URBIN    3903
         ELSE                                                           URBIN    3904
            NUMBER = 2 * (IDATA(NUM) + 1)                               URBIN    3905
            IF(NUMBER .NE. NUMSRC - NUM)THEN                            URBIN    3906
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    3907
                     WRITE(MSG(2),9001) TNAME                           URBIN    3908
                     WRITE(MSG(3),9104) BNAME(1:LEN)                    URBIN    3909
                     WRITE(MSG(4),9606)                                 URBIN    3910
                     WRITE(MSG(5),9005)                                 URBIN    3911
                     CALL PRTMSG(5)                                     URBIN    3912
            ENDIF                                                       URBIN    3913
         ENDIF                                                          URBIN    3914
      ENDIF                                                             URBIN    3915
C                                                                       URBIN    3916
C---------------------------------------------------------------------  URBIN    3917
C                                                                       URBIN    3918
C     For debugging purposes:  dump block name, type name and           URBIN    3919
C     number, and subtype and number.                                   URBIN    3920
C                                                                       URBIN    3921
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN    3922
         DPRINT = .TRUE.                                                URBIN    3923
      ENDIF                                                             URBIN    3924
C                                                                       URBIN    3925
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    3926
         IF(LDEB) THEN                                                  URBIN    3927
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    3928
     1                      IUDSUB(IUDC)                                URBIN    3929
         ELSE                                                           URBIN    3930
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    3931
     1                      IUDSUB(IUDC)                                URBIN    3932
         ENDIF                                                          URBIN    3933
      ENDIF                                                             URBIN    3934
C                                                                       URBIN    3935
C---------------------------------------------------------------------  URBIN    3936
C                                                                       URBIN    3937
      IF(DEFINE)THEN                                                    URBIN    3938
C                                                                       URBIN    3939
C        Save information in the structure linked list.                 URBIN    3940
C                                                                       URBIN    3941
         CALL ADDSTR (CDATA, RDATA, IDATA)                              URBIN    3942
C                                                                       URBIN    3943
      ELSE                                                              URBIN    3944
C                                                                       URBIN    3945
C        Store valid data.                                              URBIN    3946
C                                                                       URBIN    3947
         IUNIPT(IUDC) = 0                                               URBIN    3948
         IUDPPT(IUDC) = 0                                               URBIN    3949
         IUDRPT(IUDC) = 0                                               URBIN    3950
         IUDSPT(IUDC) = 0                                               URBIN    3951
C                                                                       URBIN    3952
         DO 1240 I = 1, NUMSRC                                          URBIN    3953
C                                                                       URBIN    3954
C                                                                       URBIN    3955
C              a)   Store print flag.                                   URBIN    3956
C                                                                       URBIN    3957
            IF(SEARCH(I).EQ.'PRINT FLAG')THEN                           URBIN    3958
C                                                                       URBIN    3959
C              Invalid print flag is assumed to be false.               URBIN    3960
C                                                                       URBIN    3961
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN    3962
                  IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.          URBIN    3963
     1                CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN         URBIN    3964
                     UDPRNT(IUDC) = .TRUE.                              URBIN    3965
                  ELSE                                                  URBIN    3966
                     UDPRNT(IUDC) = .FALSE.                             URBIN    3967
                  ENDIF                                                 URBIN    3968
                  IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                   URBIN    3969
                     WRITE(MSG(1),9008) SUBNAM                          URBIN    3970
                     WRITE(MSG(2),9009) TNAME                           URBIN    3971
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN    3972
                     WRITE(MSG(4),9901)                                 URBIN    3973
                     CALL PRTMSG(4)                                     URBIN    3974
                  ENDIF                                                 URBIN    3975
               ELSE                                                     URBIN    3976
                  CDATA(I) = STARS                                      URBIN    3977
                  UDPRNT(IUDC) = .FALSE.                                URBIN    3978
               ENDIF                                                    URBIN    3979
C                                                                       URBIN    3980
C                                                                       URBIN    3981
C                                                                       URBIN    3982
C              b)   Store input.                                        URBIN    3983
C                                                                       URBIN    3984
            ELSEIF(SEARCH(I).EQ.'INPUT BLOCK')THEN                      URBIN    3985
C                                                                       URBIN    3986
C              Create a new link for the identification linked list.    URBIN    3987
C                                                                       URBIN    3988
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    3989
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    3990
                  UIDENT(IADDI) = STARS                                 URBIN    3991
               ELSEIF(EXPAND.AND.CDATA(I)(1:1).EQ.'.')THEN              URBIN    3992
C                                                                       URBIN    3993
C                 Expand the block name if it begins with "."           URBIN    3994
C                                                                       URBIN    3995
                  UIDENT(IADDI) = SRNAME(1:ISRLEN)                      URBIN    3996
                  UIDENT(IADDI)(ISRLEN+1:17) = CDATA(I)                 URBIN    3997
                  CDATA(I) = UIDENT(IADDI)                              URBIN    3998
               ELSE                                                     URBIN    3999
                  UIDENT(IADDI) = CDATA(I)                              URBIN    4000
                  IF(UIDENT(IADDI) .NE. CDATA(I))THEN                   URBIN    4001
               WRITE(MSG(1),9000) SUBNAM                                URBIN    4002
               WRITE(MSG(2),9001) TNAME                                 URBIN    4003
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    4004
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    4005
               WRITE(MSG(5),9004) UIDENT(IADDI)                         URBIN    4006
               WRITE(MSG(6),9005)                                       URBIN    4007
               CALL PRTMSG(6)                                           URBIN    4008
                     IERCNT = IERCNT + 1                                URBIN    4009
                  ENDIF                                                 URBIN    4010
               ENDIF                                                    URBIN    4011
C                                                                       URBIN    4012
C                                                                       URBIN    4013
C                                                                       URBIN    4014
C              c)   Store order number.                                 URBIN    4015
C                                                                       URBIN    4016
            ELSEIF(SEARCH(I).EQ.'NUMBER')THEN                           URBIN    4017
C                                                                       URBIN    4018
C              Create a new link for the identification linked list.    URBIN    4019
C                                                                       URBIN    4020
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    4021
               IF(TYPE(I).EQ.' ')THEN                                   URBIN    4022
                  UIDENT(IADDI) = STARS                                 URBIN    4023
               ELSE                                                     URBIN    4024
                  IUDINT(IADDI) = IDATA(I)                              URBIN    4025
               ENDIF                                                    URBIN    4026
C                                                                       URBIN    4027
C                                                                       URBIN    4028
C                                                                       URBIN    4029
C              d)   Store parameter.                                    URBIN    4030
C                                                                       URBIN    4031
            ELSEIF(SEARCH(I).EQ.'PARAMETER')THEN                        URBIN    4032
C                                                                       URBIN    4033
C              Create a new link to the parameter linked list.          URBIN    4034
C                                                                       URBIN    4035
               CALL ADDPRM (IUDC, IADDP, LASTP)                         URBIN    4036
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN    4037
                  UDPARM(IADDP) = RDATA(I)                              URBIN    4038
               ENDIF                                                    URBIN    4039
C                                                                       URBIN    4040
C              e)  Store low limit and high limit.                      URBIN    4041
C                                                                       URBIN    4042
            ELSEIF(SEARCH(I).EQ.'LOW LIMIT' .OR.                        URBIN    4043
     1               SEARCH(I).EQ.'HIGH LIMIT')THEN                     URBIN    4044
C                                                                       URBIN    4045
C              Create a new link to the parameter and identification    URBIN    4046
C              linked lists.                                            URBIN    4047
C                                                                       URBIN    4048
               CALL ADDPRM (IUDC, IADDP, LASTP)                         URBIN    4049
               CALL ADDINT (IUDC, IADDI, LASTI)                         URBIN    4050
               IF(TYPE(I).EQ.'REAL')THEN                                URBIN    4051
                  UDPARM(IADDP) = RDATA(I)                              URBIN    4052
               ELSEIF(TYPE(I).EQ.'CHAR')THEN                            URBIN    4053
                  IF(EXPAND.AND.CDATA(I)(1:1).EQ.'.')THEN               URBIN    4054
C                                                                       URBIN    4055
C                    Expand the block name if it begins with "."        URBIN    4056
C                                                                       URBIN    4057
                     UIDENT(IADDI) = SRNAME(1:ISRLEN)                   URBIN    4058
                     UIDENT(IADDI)(ISRLEN+1:17) = CDATA(I)              URBIN    4059
                     CDATA(I) = UIDENT(IADDI)                           URBIN    4060
                  ELSE                                                  URBIN    4061
                     UIDENT(IADDI) = CDATA(I)                           URBIN    4062
                     IF(UIDENT(IADDI) .NE. CDATA(I))THEN                URBIN    4063
               WRITE(MSG(1),9000) SUBNAM                                URBIN    4064
               WRITE(MSG(2),9001) TNAME                                 URBIN    4065
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    4066
               WRITE(MSG(4),9003) CDATA(I)(1:32)                        URBIN    4067
               WRITE(MSG(5),9004) UIDENT(IADDI)                         URBIN    4068
               WRITE(MSG(6),9005)                                       URBIN    4069
               CALL PRTMSG(6)                                           URBIN    4070
                        IERCNT = IERCNT + 1                             URBIN    4071
                    ENDIF                                               URBIN    4072
                 ENDIF                                                  URBIN    4073
               ELSE                                                     URBIN    4074
                  UIDENT(IADDI) = STARS                                 URBIN    4075
               ENDIF                                                    URBIN    4076
            ENDIF                                                       URBIN    4077
1240     CONTINUE                                                       URBIN    4078
      ENDIF                                                             URBIN    4079
C                                                                       URBIN    4080
C---------------------------------------------------------------------  URBIN    4081
C                                                                       URBIN    4082
C     For debugging purposes:  dump all valid data.  For invalid        URBIN    4083
C     data a not defined message will be printed.                       URBIN    4084
C                                                                       URBIN    4085
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    4086
         DO 1260 I = 1, NUMSRC                                          URBIN    4087
            N = LENGTH(I) + 1                                           URBIN    4088
            SEARCH(I)(N:N) = ':'                                        URBIN    4089
            IF(TYPE(I).EQ.'CHAR')THEN                                   URBIN    4090
               IF(LDEB) THEN                                            URBIN    4091
                  WRITE (IUD6,9010) SEARCH(I), CDATA(I)                 URBIN    4092
               ELSE                                                     URBIN    4093
                  WRITE (IU16,9010) SEARCH(I), CDATA(I)                 URBIN    4094
               ENDIF                                                    URBIN    4095
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    4096
               IF(LDEB) THEN                                            URBIN    4097
                  WRITE (IUD6,9012) SEARCH(I), RDATA(I)                 URBIN    4098
               ELSE                                                     URBIN    4099
                  WRITE (IU16,9012) SEARCH(I), RDATA(I)                 URBIN    4100
               ENDIF                                                    URBIN    4101
            ELSEIF(TYPE(I).EQ.'INTE')THEN                               URBIN    4102
               IF(LDEB) THEN                                            URBIN    4103
                  WRITE (IUD6,9014) SEARCH(I), IDATA(I)                 URBIN    4104
               ELSE                                                     URBIN    4105
                  WRITE (IU16,9014) SEARCH(I), IDATA(I)                 URBIN    4106
               ENDIF                                                    URBIN    4107
            ELSEIF(TYPE(I).EQ.' ')THEN                                  URBIN    4108
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    4109
                  CALL PRTMSG(1)                                        URBIN    4110
            ENDIF                                                       URBIN    4111
1260     CONTINUE                                                       URBIN    4112
      ENDIF                                                             URBIN    4113
C                                                                       URBIN    4114
      IF(.NOT.DEFINE) THEN                                              URBIN    4115
         IF(UDPARM(IADDP).EQ.0.0)THEN                                   URBIN    4116
                     WRITE(MSG(1),9000) SUBNAM                          URBIN    4117
                     WRITE(MSG(2),9001) TNAME                           URBIN    4118
                     WRITE(MSG(3),9622) BNAME(1:LEN)                    URBIN    4119
                     WRITE(MSG(4),9623)                                 URBIN    4120
                     WRITE(MSG(5),9624)                                 URBIN    4121
                     CALL PRTMSG(5)                                     URBIN    4122
            IERCNT = IERCNT + 1                                         URBIN    4123
         ENDIF                                                          URBIN    4124
      ENDIF                                                             URBIN    4125
C                                                                       URBIN    4126
      IF(DEFINE)THEN                                                    URBIN    4127
         IUDC = IUDC - 1                                                URBIN    4128
      ENDIF                                                             URBIN    4129
C                                                                       URBIN    4130
      RETURN                                                            URBIN    4131
C                                                                       URBIN    4132
C                                                                       URBIN    4133
C---------------------------------------------------------------------  URBIN    4134
C                                                                       URBIN    4135
      ENTRY URSRCE                                                      URBIN    4136
CD -------------------------------------------------------------------  URBIN    4137
CD                                                                      URBIN    4138
CD              *****     URSRCE  ROUTINE   *****                       URBIN    4139
CD                                                                      URBIN    4140
CD -------------------------------------------------------------------  URBIN    4141
CD                                                                      URBIN    4142
CD       PURPOSE:  Controls the reading of the udc type SOURCE data     URBIN    4143
CD                 from the input file.  Does limited error checking.   URBIN    4144
CD                 Stores valid data in the udc storage arrays.         URBIN    4145
CD                                                                      URBIN    4146
CD -------------------------------------------------------------------  URBIN    4147
C                                                                       URBIN    4148
C     Define the subroutine name.                                       URBIN    4149
C                                                                       URBIN    4150
      LDEB=(JDEB(301).NE.0)                                             URBIN    4151
C                                                                       URBIN    4152
      IF(SDBG)THEN                                                      URBIN    4153
         SUBNAM = 'URSRCE ROUTINE.'                                     URBIN    4154
      ELSE                                                              URBIN    4155
         SUBNAM = ' '                                                   URBIN    4156
      END IF                                                            URBIN    4157
      TNAME = TPNAME(IUDTYP(IUDC))                                      URBIN    4158
      BNAME = UDNAME(IUDC)                                              URBIN    4159
      LEN = IUDLEN(IUDC)                                                URBIN    4160
C                                                                       URBIN    4161
C     Forces an interrupted card image if an error is found.            URBIN    4162
C                                                                       URBIN    4163
      JDCOUN = IERCNT                                                   URBIN    4164
      DPRINT = .FALSE.                                                  URBIN    4165
C                                                                       URBIN    4166
      IF(EXPAND)THEN                                                    URBIN    4167
C                                                                       URBIN    4168
C        Obtain the subtype name from the saved information for this    URBIN    4169
C        structure.                                                     URBIN    4170
C                                                                       URBIN    4171
         SNAME = SBSRCE(IUDSUB(IUDC))                                   URBIN    4172
C                                                                       URBIN    4173
      ELSE                                                              URBIN    4174
C                                                                       URBIN    4175
C        Read the subtype name.                                         URBIN    4176
C                                                                       URBIN    4177
         ENDBLK = .FALSE.                                               URBIN    4178
         CALL URGETC (CDATA(1), FOUND)                                  URBIN    4179
         IF(.NOT. FOUND)THEN                                            URBIN    4180
            SNAME = STARS                                               URBIN    4181
         ELSE                                                           URBIN    4182
            SNAME = CDATA(1)                                            URBIN    4183
            IF(SNAME .NE. CDATA(1))THEN                                 URBIN    4184
               WRITE(MSG(1),9000) SUBNAM                                URBIN    4185
               WRITE(MSG(2),9001) TNAME                                 URBIN    4186
               WRITE(MSG(3),9002) BNAME(1:LEN)                          URBIN    4187
               WRITE(MSG(4),9003) CDATA(1)(1:32)                        URBIN    4188
               WRITE(MSG(5),9004) SNAME                                 URBIN    4189
               WRITE(MSG(6),9005)                                       URBIN    4190
               CALL PRTMSG(6)                                           URBIN    4191
               IERCNT = IERCNT + 1                                      URBIN    4192
            END IF                                                      URBIN    4193
         END IF                                                         URBIN    4194
      END IF                                                            URBIN    4195
C                                                                       URBIN    4196
C---------------------------------------------------------------------  URBIN    4197
C                                                                       URBIN    4198
C     Determine the required data names and the number of searches      URBIN    4199
C     required.                                                         URBIN    4200
C                                                                       URBIN    4201
C     Fixed DC value.                                                   URBIN    4202
C                                                                       URBIN    4203
      IF(SNAME.EQ.SBSRCE(IDCS))THEN                                     URBIN    4204
         IUDSUB(IUDC) = IDCS                                            URBIN    4205
         NUMSRC = 3                                                     URBIN    4206
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    4207
         SEARCH(2) = 'AMPLITUDE'                                        URBIN    4208
         SEARCH(3) = 'START TIME'                                       URBIN    4209
C                                                                       URBIN    4210
C     Sinusoidal.                                                       URBIN    4211
C                                                                       URBIN    4212
      ELSEIF(SNAME.EQ.SBSRCE(ISINS))THEN                                URBIN    4213
         IUDSUB(IUDC) = ISINS                                           URBIN    4214
         NUMSRC = 5                                                     URBIN    4215
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    4216
         SEARCH(2) = 'AMPLITUDE'                                        URBIN    4217
         SEARCH(3) = 'FREQUENCY'                                        URBIN    4218
         SEARCH(4) = 'PHASE'                                            URBIN    4219
         SEARCH(5) = 'START TIME'                                       URBIN    4220
C                                                                       URBIN    4221
C     Ramp function.                                                    URBIN    4222
C                                                                       URBIN    4223
      ELSEIF(SNAME.EQ.SBSRCE(IRAMPS))THEN                               URBIN    4224
         IUDSUB(IUDC) = IRAMPS                                          URBIN    4225
         NUMSRC = 3                                                     URBIN    4226
         SEARCH(1) = 'PRINT FLAG'                                       URBIN    4227
         SEARCH(2) = 'RAMP RATE'                                        URBIN    4228
         SEARCH(3) = 'START TIME'                                       URBIN    4229
C                                                                       URBIN    4230
C     Simulation time clock.                                            URBIN    4231
C                                                                       URBIN    4232
      ELSEIF(SNAME.EQ.SBSRCE(ITIMES))THEN                               URBIN    4233
         IUDSUB(IUDC) = ITIMES                                          URBIN    4234
         NUMSRC = 0                                                     URBIN    4235
C                                                                       URBIN    4236
C     AC solution time step delta(t).                                   URBIN    4237
C                                                                       URBIN    4238
      ELSEIF(SNAME.EQ.SBSRCE(IDTACS))THEN                               URBIN    4239
         IUDSUB(IUDC) = IDTACS                                          URBIN    4240
         NUMSRC = 0                                                     URBIN    4241
C                                                                       URBIN    4242
C     DC solution time step sigma(t).                                   URBIN    4243
C                                                                       URBIN    4244
      ELSEIF(SNAME.EQ.SBSRCE(IDTDCS))THEN                               URBIN    4245
         IUDSUB(IUDC) = IDTDCS                                          URBIN    4246
         NUMSRC = 0                                                     URBIN    4247
C                                                                       URBIN    4248
C     DC control solution time step sigma(t).                           URBIN    4249
C                                                                       URBIN    4250
      ELSEIF(SNAME.EQ.SBSRCE(IDTCCS))THEN                               URBIN    4251
         IUDSUB(IUDC) = IDTCCS                                          URBIN    4252
         NUMSRC = 0                                                     URBIN    4253
C                                                                       URBIN    4254
C     Invalid subtype.                                                  URBIN    4255
C                                                                       URBIN    4256
      ELSE                                                              URBIN    4257
         IUDSUB(IUDC) = 0                                               URBIN    4258
         NUMSRC = 0                                                     URBIN    4259
               WRITE(MSG(1),9000) SUBNAM                                URBIN    4260
               WRITE(MSG(2),9001) TNAME                                 URBIN    4261
               WRITE(MSG(3),9006) BNAME(1:LEN),SNAME                    URBIN    4262
               WRITE(MSG(4),9007)                                       URBIN    4263
               WRITE(MSG(5),9005)                                       URBIN    4264
               CALL PRTMSG(5)                                           URBIN    4265
         IERCNT = IERCNT + 1                                            URBIN    4266
      END IF                                                            URBIN    4267
C                                                                       URBIN    4268
C---------------------------------------------------------------------  URBIN    4269
C                                                                       URBIN    4270
C     Based on the data names required, determine the type of searches, URBIN    4271
C     and length of data names.                                         URBIN    4272
C                                                                       URBIN    4273
      DO 1320 I = 1, NUMSRC                                             URBIN    4274
         IF(SEARCH(I).EQ.'PRINT FLAG')THEN                              URBIN    4275
            TYPE(I) = 'CHAR'                                            URBIN    4276
            LENGTH(I) = 10                                              URBIN    4277
         ELSEIF(SEARCH(I).EQ.'START TIME')THEN                          URBIN    4278
            TYPE(I) = 'REAL'                                            URBIN    4279
            LENGTH(I) = 10                                              URBIN    4280
         ELSEIF(SEARCH(I).EQ.'AMPLITUDE' .OR.                           URBIN    4281
     1            SEARCH(I).EQ.'FREQUENCY' .OR.                         URBIN    4282
     2            SEARCH(I).EQ.'RAMP RATE')THEN                         URBIN    4283
            TYPE(I) = 'REAL'                                            URBIN    4284
            LENGTH(I) = 9                                               URBIN    4285
         ELSEIF(SEARCH(I).EQ.'PHASE')THEN                               URBIN    4286
            TYPE(I) = 'REAL'                                            URBIN    4287
            LENGTH(I) = 5                                               URBIN    4288
         END IF                                                         URBIN    4289
1320    CONTINUE                                                        URBIN    4290
C                                                                       URBIN    4291
C---------------------------------------------------------------------  URBIN    4292
C                                                                       URBIN    4293
C     Retrieve the necessary data from the file.                        URBIN    4294
C                                                                       URBIN    4295
      JREPEA = 0                                                        URBIN    4296
      CALL URREAD (CDATA, RDATA, IDATA, JREPEA)                         URBIN    4297
C                                                                       URBIN    4298
C---------------------------------------------------------------------  URBIN    4299
C                                                                       URBIN    4300
C     For debugging purposes:  dump block name, type name and           URBIN    4301
C     number, and subtype name and number.                              URBIN    4302
C                                                                       URBIN    4303
      IF(JDCOUN .NE. IERCNT)THEN                                        URBIN    4304
         DPRINT = .TRUE.                                                URBIN    4305
      END IF                                                            URBIN    4306
C                                                                       URBIN    4307
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    4308
         IF(LDEB) THEN                                                  URBIN    4309
            WRITE (IUD6,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    4310
     1                      IUDSUB(IUDC)                                URBIN    4311
         ELSE                                                           URBIN    4312
            WRITE (IU16,9116) BNAME(1:LEN), TNAME, IUDTYP(IUDC), SNAME, URBIN    4313
     1                      IUDSUB(IUDC)                                URBIN    4314
         ENDIF                                                          URBIN    4315
      END IF                                                            URBIN    4316
C                                                                       URBIN    4317
C---------------------------------------------------------------------  URBIN    4318
C                                                                       URBIN    4319
      IF(DEFINE)THEN                                                    URBIN    4320
C                                                                       URBIN    4321
C        Save information in the structure linked list.                 URBIN    4322
C                                                                       URBIN    4323
         CALL ADDSTR (CDATA, RDATA, IDATA)                              URBIN    4324
C                                                                       URBIN    4325
C                                                                       URBIN    4326
      ELSE                                                              URBIN    4327
C                                                                       URBIN    4328
C        Store valid data.                                              URBIN    4329
C                                                                       URBIN    4330
         IUDPPT(IUDC) = 0                                               URBIN    4331
         IUNIPT(IUDC) = 0                                               URBIN    4332
         IUDRPT(IUDC) = 0                                               URBIN    4333
C                                                                       URBIN    4334
         IF(NUMSRC.EQ.0)THEN                                            URBIN    4335
            UDPRNT(IUDC) = .FALSE.                                      URBIN    4336
         END IF                                                         URBIN    4337
C                                                                       URBIN    4338
         DO 1340 I = 1, NUMSRC                                          URBIN    4339
C                                                                       URBIN    4340
C                                                                       URBIN    4341
C           a)   Store print flag.                                      URBIN    4342
C                                                                       URBIN    4343
            IF(SEARCH(I).EQ.'PRINT FLAG')THEN                           URBIN    4344
C                                                                       URBIN    4345
C              Invalid print flag is assumed to be false.               URBIN    4346
C                                                                       URBIN    4347
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN    4348
                  IF(CDATA(I).EQ.'1' .OR. CDATA(I).EQ.'T' .OR.          URBIN    4349
     1                CDATA(I).EQ.'P' .OR. CDATA(I).EQ.'Y')THEN         URBIN    4350
                     UDPRNT(IUDC) = .TRUE.                              URBIN    4351
                  ELSE                                                  URBIN    4352
                     UDPRNT(IUDC) = .FALSE.                             URBIN    4353
                  END IF                                                URBIN    4354
                  IF(CDATA(I)(1:1) .NE. CDATA(I))THEN                   URBIN    4355
                     WRITE(MSG(1),9008) SUBNAM                          URBIN    4356
                     WRITE(MSG(2),9009) TNAME                           URBIN    4357
                     WRITE(MSG(3),9900) BNAME(1:LEN),CDATA(I)(1:32)     URBIN    4358
                     WRITE(MSG(4),9901)                                 URBIN    4359
                     CALL PRTMSG(4)                                     URBIN    4360
                  END IF                                                URBIN    4361
               ELSE                                                     URBIN    4362
                  CDATA(I) = STARS                                      URBIN    4363
                  UDPRNT(IUDC) = .FALSE.                                URBIN    4364
               END IF                                                   URBIN    4365
C                                                                       URBIN    4366
C                                                                       URBIN    4367
C                                                                       URBIN    4368
C           b)   Store amplitude, start time, frequency, phase, or      URBIN    4369
C                ramp rate.                                             URBIN    4370
C                                                                       URBIN    4371
            ELSEIF(SEARCH(I).EQ.'AMPLITUDE' .OR.                        URBIN    4372
     1               SEARCH(I).EQ.'START TIME' .OR.                     URBIN    4373
     2               SEARCH(I).EQ.'FREQUENCY' .OR.                      URBIN    4374
     3               SEARCH(I).EQ.'PHASE' .OR.                          URBIN    4375
     4               SEARCH(I).EQ.'RAMP RATE')THEN                      URBIN    4376
C                                                                       URBIN    4377
C              Create new link for parameter linked list.               URBIN    4378
C                                                                       URBIN    4379
               CALL ADDPRM (IUDC, IADDP, LASTP)                         URBIN    4380
               IF(TYPE(I) .NE. ' ')THEN                                 URBIN    4381
                  UDPARM(IADDP) = RDATA(I)                              URBIN    4382
               END IF                                                   URBIN    4383
            END IF                                                      URBIN    4384
1340     CONTINUE                                                       URBIN    4385
      END IF                                                            URBIN    4386
C                                                                       URBIN    4387
C---------------------------------------------------------------------  URBIN    4388
C                                                                       URBIN    4389
C     For debugging purposes:  dump all valid data.  For invalid        URBIN    4390
C     data a not defined message will be printed.                       URBIN    4391
C                                                                       URBIN    4392
      IF(LDEB .OR. DPRINT)THEN                                          URBIN    4393
         DO 1360 I = 1, NUMSRC                                          URBIN    4394
            N = LENGTH(I) + 1                                           URBIN    4395
            SEARCH(I)(N:N) = ':'                                        URBIN    4396
            IF(TYPE(I).EQ.'CHAR')THEN                                   URBIN    4397
               IF(LDEB) THEN                                            URBIN    4398
                  WRITE (IUD6,9010) SEARCH(I), CDATA(I)                 URBIN    4399
               ELSE                                                     URBIN    4400
                  WRITE (IU16,9010) SEARCH(I), CDATA(I)                 URBIN    4401
               ENDIF                                                    URBIN    4402
            ELSEIF(TYPE(I).EQ.'REAL')THEN                               URBIN    4403
               IF(LDEB) THEN                                            URBIN    4404
                  WRITE (IUD6,9012) SEARCH(I), RDATA(I)                 URBIN    4405
               ELSE                                                     URBIN    4406
                  WRITE (IU16,9012) SEARCH(I), RDATA(I)                 URBIN    4407
               ENDIF                                                    URBIN    4408
            ELSEIF(TYPE(I).EQ.'INTE')THEN                               URBIN    4409
               IF(LDEB) THEN                                            URBIN    4410
                  WRITE (IUD6,9014) SEARCH(I), IDATA(I)                 URBIN    4411
               ELSE                                                     URBIN    4412
                  WRITE (IU16,9014) SEARCH(I), IDATA(I)                 URBIN    4413
               ENDIF                                                    URBIN    4414
            ELSEIF(TYPE(I).EQ.' ')THEN                                  URBIN    4415
                  WRITE (MSG(1),9016) SEARCH(I)                         URBIN    4416
                  CALL PRTMSG(1)                                        URBIN    4417
            END IF                                                      URBIN    4418
1360     CONTINUE                                                       URBIN    4419
      END IF                                                            URBIN    4420
C                                                                       URBIN    4421
      IF(DEFINE)THEN                                                    URBIN    4422
         IUDC = IUDC - 1                                                URBIN    4423
      END IF                                                            URBIN    4424
C                                                                       URBIN    4425
      RETURN                                                            URBIN    4426
C                                                                       URBIN    4427
9000  FORMAT(' *** ERROR', 5X, A)                                       URBIN    4428
9001  FORMAT(11X,'DURING THE READING OF UDC "', A, '" BLOCKS, BLOCK')   URBIN    4429
9002  FORMAT(11X,'"',A,'" DEFINITION CONTAINS A CHARACTER STRING OF')   URBIN    4430
9003  FORMAT(11X,'"',A,'", WHICH IS CHANGED TO')                        URBIN    4431
9004  FORMAT(11X,'"',A,'" WHEN USED BY THE PROGRAM.')                   URBIN    4432
9005  FORMAT(11X,'CHECK YOUR UDC INPUT FILE FOR ERRORS.')               URBIN    4433
9006  FORMAT(11X,'"',A,'" HAS AN INVALID SUBTYPE OF "',A,'".')          URBIN    4434
9007  FORMAT(11X                                                        URBIN    4435
     *,'ALL DATA IS IGNORED UNTIL NEXT UDC BLOCK DEFINITION.')          URBIN    4436
9008  FORMAT(' *** WARNING', 5X, A)                                     URBIN    4437
9009  FORMAT(14X,'DURING THE READING OF UDC "',A,'" BLOCKS, BLOCK')     URBIN    4438
9900  FORMAT(14X,'"',A,'" HAS A PRINT FLAG OF "',A,'"')                 URBIN    4439
9901  FORMAT(14X,'IS THIS AN ERROR IN THE UDC INPUT FILE?')             URBIN    4440
9010  FORMAT (5X, A, 5X, A)                                             URBIN    4441
9012  FORMAT (5X, A, 5X, F15.6)                                         URBIN    4442
9014  FORMAT (5X, A, 5X, I10)                                           URBIN    4443
9016  FORMAT(' *** WARNING ',A,' NOT DEFINED')                          URBIN    4444
9104  FORMAT(11X,'"',A,'" HAS INVALID DATA.')                           URBIN    4445
9105  FORMAT(11X,'UNABLE TO FIND DATA FOR "',A,'".')                    URBIN    4446
9108  FORMAT(11X,'"',A,'" IS MISSING DATA.')                            URBIN    4447
9112  FORMAT(11X,'"',A,'" CONTAINS EXTRA DATA.  DID YOU FORGET A ":"?') URBIN    4448
9116  FORMAT(/,1X,'UDC BLOCK: ', A,                                     URBIN    4449
     1      /, 5X, 'TYPE:     ', A, 10X, 'TYPE NUMBER:     ', I2,       URBIN    4450
     2:,    /, 5X, 'SUBTYPE:  ', A, 10X, 'SUBTYPE NUMBER:  ', I2,       URBIN    4451
     3:,    /, 5X, 'PRINT FLAG:', A)                                    URBIN    4452
9118  FORMAT(5X,A,I10)                                                  URBIN    4453
9120  FORMAT(5X, A, I2,':', 5X, A)                                      URBIN    4454
9122  FORMAT(11X,'"',A,'" (SUBTYPE "',A,'") HAS ',I2,' OUTPUTS.')       URBIN    4455
9123  FORMAT(11X,'A PREVIOUS DEFINITION OF THIS SUBTYPE HAS ',I2        URBIN    4456
     *,' OUTPUTS.')                                                     URBIN    4457
9124  FORMAT(11X,'DURING THE READING OF UDC "',A,'" BLOCKS THE')        URBIN    4458
9125  FORMAT(11X,'MAXIMUM NUMBER OF FORTRAN ',A,' (',I3,')')            URBIN    4459
9902  FORMAT(11X,'HAS BEEN EXCEEDED.')                                  URBIN    4460
9126  FORMAT(11X,'DURING THE READING OF UDC BLOCKS, A STRUCTURE')       URBIN    4461
9127  FORMAT(11X,'DEFINITION CONTAINS A BLOCK, "',A                     URBIN    4462
     *,'" OF TYPE "FORTRAN".')                                          URBIN    4463
9128  FORMAT(11X,'THIS TYPE CANNOT BE USED WITHIN A STRUCTURE.')        URBIN    4464
9208  FORMAT(11X,'"',A,'" USES AN UNDEFINED AC LINE OF "',A,'".')       URBIN    4465
9209  FORMAT(11X,'THIS AC LINE IS NOT DEFINED IN THE AC SYSTEM.')       URBIN    4466
9212  FORMAT(11X,'"',A,'" USES AN UNDEFINED AC BUS OF "',A,'".')        URBIN    4467
9213  FORMAT(11X,'THIS AC BUS IS NOT DEFINED IN THE AC SYSTEM.')        URBIN    4468
9310  FORMAT(11X,'"',A,'" CONTAINS AN UNDEFINED DC CONVERTER NAME')     URBIN    4469
9311  FORMAT(11X,'OF "',A,'".  THIS CONVERTER IS NOT')                  URBIN    4470
9320  FORMAT(11X,'DEFINED IN THE DC SYSTEM.')                           URBIN    4471
9312  FORMAT(11X,'"',A,'" USES AN UNDEFINED DC NODE NAME OF')           URBIN    4472
9313  FORMAT(11X,'"',A                                                  URBIN    4473
     *,'".  THIS DC NODE IS NOT DEFINED IN THE DC SYSTEM.')             URBIN    4474
9314  FORMAT(11X,'"',A,'" USES AN UNDEFINED DC LINE OF')                URBIN    4475
9315  FORMAT(11X,'"',A                                                  URBIN    4476
     *,'".  THIS DC LINE IS NOT DEFINED IN THE DC SYSTEM.')             URBIN    4477
9324  FORMAT(11X,'"',A,'" USES AN UNDEFINED DC BREAKER NAMED')          URBIN    4478
9325  FORMAT(11X,'"',A                                                  URBIN    4479
     *,'".  THIS DC BREAKER IS NOT DEFINED IN THE DC SYSTEM.')          URBIN    4480
9402  FORMAT(11X,'WAS NOT FOUND INSTEAD THE KEYWORD')                   URBIN    4481
9802  FORMAT(11X,'"', A,'" WAS FOUND.')                                 URBIN    4482
9403  FORMAT(11X,'THE PROGRAM ASSUMES THAT A KEYWORD WAS EXPECTED.')    URBIN    4483
9404  FORMAT(11X,'FOUND AN INVALID KEYWORD OF ')                        URBIN    4484
9401  FORMAT(11X,'"',A,'".')                                            URBIN    4485
9405  FORMAT(11X,'THE PROGRAM KEEPS SEARCHING FOR A VALID KEYWORD.')    URBIN    4486
9406  FORMAT(11X,'FOUND AN INVALID SUBKEYWORD OF "',A,'".')             URBIN    4487
9408  FORMAT(11X,'"',A,'" WAS NOT FOUND INSTEAD THE DATA,')             URBIN    4488
9409  FORMAT(11X,'"',A,'" WAS FOUND.')                                  URBIN    4489
9412  FORMAT(11X,'"',A,'" HAS AN INCOMPLETE DEFINITION.')               URBIN    4490
9410  FORMAT(11X,'THERE IS NO 2ND INITIAL DATA FOR THIS BLOCK.')        URBIN    4491
9411  FORMAT(11X,'THERE IS NO 2ND PURPOSE DATA FOR THIS BLOCK.')        URBIN    4492
9413  FORMAT(11X,'THERE IS NO INITIAL DATA FOR THIS BLOCK.')            URBIN    4493
9414  FORMAT(11X,'THERE IS NO PURPOSE DATA FOR THIS BLOCK.')            URBIN    4494
9416  FORMAT(11X,'"',A,'" CONTAINS EXTRA DATA.  DID YOU FORGET A ":"?') URBIN    4495
9418  FORMAT(11X,'THERE IS NO PURPOSE DATA FOR "',A,'".')               URBIN    4496
9426  FORMAT(11X,'"',A,'" CONTAINS AN UNDEFINED DC CONVERTER NAME OF')  URBIN    4497
9427  FORMAT(11X,'"',A,'".')                                            URBIN    4498
9428  FORMAT(11X,'THIS CONVERTER IS NOT DEFINED IN THE DC SYSTEM.')     URBIN    4499
9430  FORMAT (10X, A, 5X, A)                                            URBIN    4500
9432  FORMAT (10X, A, 5X, F15.6)                                        URBIN    4501
9434  FORMAT (10X, A, 5X, I10)                                          URBIN    4502
9606  FORMAT(11X,'THE NUMBER OF PARAMETERS DOES NOT AGREE WITH THE'     URBIN    4503
     *,' NUMBER SPECIFIED.')                                            URBIN    4504
9622  FORMAT(11X,'"',A,'" HAS BEEN MISUSED.  THIS BLOCK TYPE')          URBIN    4505
9623  FORMAT(11X,'WAS NOT INTENDED TO REPRESENT AN INTEGRATOR.')        URBIN    4506
9624  FORMAT(11X,'CHANGE YOUR UDC INPUT FILE.')                         URBIN    4507
9700  FORMAT(11X,'NUMSR1,NUMSRC: ',2I5)                                 URBIN    4508
C                                                                       URBIN    4509
C---------------------------------------------------------------------  URBIN    4510
C                                                                       URBIN    4511
      END                                                               URBIN    4512
