      SUBROUTINE GTDDEV(DEV)
      LOGICAL*1 DEV(100)
      INTEGER I, OTOC
      COMMON / CSCLUN / LUNDAT(6)
      LOGICAL*1 BBUF(12)
      INTEGER LUNDAT
      EQUIVALENCE (LUNDAT(1), BBUF(1))
      CALL ASNLUN(7, 2HSY, 0)
      CALL GETLUN(7, LUNDAT)
      DEV(1) = BBUF(1)
      DEV(2) = BBUF(2)
      BBUF(4) = 0
      I = 3 + OTOC(LUNDAT(2), DEV(3), 3)
      CALL CHCOPY(58, DEV, I)
      RETURN
      END
      SUBROUTINE GWDIR(BUF, DTYPE)
      LOGICAL*1 BUF(100)
      INTEGER DTYPE, LENGTH, I
      CALL GTDDEV(BUF)
      I = LENGTH(BUF) + 1
      CALL GTDDIR(BUF(I))
      IF(.NOT.(DTYPE .EQ. 5))GOTO 23000
      CALL MKPATH(BUF, BUF)
23000 CONTINUE
      CALL FOLD(BUF)
      RETURN
      END
      INTEGER FUNCTION OPENDR(STRNG, DESC)
      INTEGER DESC, DSC(6)
      INTEGER INDEX, LENGTH, NXTLUN, DOPEN
      LOGICAL*1 STRNG(100), FILE(40)
      COMMON / CDIREC / DIRLUN, DFDB, LSTFID(3), DIRDEV, DIRUNT, DIRECT(
     *16), DIRFIL(20)
      INTEGER DIRLUN
      INTEGER DFDB
      INTEGER LSTFID
      INTEGER DIRDEV
      INTEGER DIRUNT
      LOGICAL*1 DIRECT
      LOGICAL*1 DIRFIL
      COMMON / IO / LASTC(6), FDB(6), LFN(6), CHTYPE(6), MODE(6), FILETP
     *(6), FILENM(40, 6), BUFFER(400, 6)
      INTEGER LASTC
      INTEGER FDB
      LOGICAL*1 LFN
      LOGICAL*1 CHTYPE
      LOGICAL*1 MODE
      LOGICAL*1 FILETP
      LOGICAL*1 FILENM
      LOGICAL*1 BUFFER
      LOGICAL*1 STARS(6)
      DATA STARS(1)/42/,STARS(2)/46/,STARS(3)/42/,STARS(4)/59/,STARS(5)/
     *42/,STARS(6)/0/
      IF(.NOT.(DFDB .NE. 0))GOTO 23002
      OPENDR = -3
      RETURN
23002 CONTINUE
      CALL MKLOCL(STRNG, FILE)
      IF(.NOT.(INDEX(FILE, 93) .NE. LENGTH(FILE)))GOTO 23004
      DESC = -3
      GOTO 23005
23004 CONTINUE
      IF(.NOT.(NXTLUN(DIRLUN) .EQ. -3))GOTO 23006
      DESC = -3
      GOTO 23007
23006 CONTINUE
      CALL SCOPY(FILE, 1, DIRECT, 1)
      CALL CONCAT(DIRECT, STARS, FILE)
      CALL UPPER(FILE)
      CALL DSCBLD(DSC, FILE)
      DESC = DOPEN(DIRLUN, DSC, DIRDEV, DIRUNT, DFDB)
      IF(.NOT.(DESC .EQ. 0))GOTO 23008
      LFN(DIRLUN) = 1
      FDB(DIRLUN) = DFDB
      LSTFID(1) = 0
      DIRFIL(1) = 0
      DESC = - (DIRLUN + 20)
      GOTO 23009
23008 CONTINUE
      DFDB = 0
23009 CONTINUE
23007 CONTINUE
23005 CONTINUE
      OPENDR = DESC
      RETURN
      END
      SUBROUTINE CLOSDR(DESC)
      INTEGER DESC
      COMMON / CDIREC / DIRLUN, DFDB, LSTFID(3), DIRDEV, DIRUNT, DIRECT(
     *16), DIRFIL(20)
      INTEGER DIRLUN
      INTEGER DFDB
      INTEGER LSTFID
      INTEGER DIRDEV
      INTEGER DIRUNT
      LOGICAL*1 DIRECT
      LOGICAL*1 DIRFIL
      COMMON / IO / LASTC(6), FDB(6), LFN(6), CHTYPE(6), MODE(6), FILETP
     *(6), FILENM(40, 6), BUFFER(400, 6)
      INTEGER LASTC
      INTEGER FDB
      LOGICAL*1 LFN
      LOGICAL*1 CHTYPE
      LOGICAL*1 MODE
      LOGICAL*1 FILETP
      LOGICAL*1 FILENM
      LOGICAL*1 BUFFER
      LSTFID(1) = 0
      DIRFIL(1) = 0
      DFDB = 0
      LFN(DIRLUN) = 0
      RETURN
      END
      INTEGER FUNCTION GDRPRM(DESC, FILE)
      LOGICAL*1 FILE(100)
      INTEGER DESC, BUF(5), I, J, JUNK
      INTEGER DFIND, OTOC
      COMMON / CDIREC / DIRLUN, DFDB, LSTFID(3), DIRDEV, DIRUNT, DIRECT(
     *16), DIRFIL(20)
      INTEGER DIRLUN
      INTEGER DFDB
      INTEGER LSTFID
      INTEGER DIRDEV
      INTEGER DIRUNT
      LOGICAL*1 DIRECT
      LOGICAL*1 DIRFIL
      IF(.NOT.(DFIND(DFDB, BUF, LSTFID) .EQ. -1))GOTO 23010
      GDRPRM = -1
      GOTO 23011
23010 CONTINUE
      I = 1
      CALL R50ASC(9, BUF(1), FILE(I))
23012 IF(.NOT.(FILE(I) .NE. 32 .AND. I .LE. 9))GOTO 23013
      I = I + 1
      GOTO 23012
23013 CONTINUE
      CALL CHCOPY(46, FILE, I)
      CALL R50ASC(3, BUF(4), FILE(I))
      J=1
23014 IF(.NOT.(FILE(I) .NE. 32 .AND. J .LE. 3))GOTO 23016
      I = I + 1
23015 J=J+1
      GOTO 23014
23016 CONTINUE
      CALL CHCOPY(59, FILE, I)
      JUNK = OTOC(BUF(5), FILE(I), 6)
      CALL FOLD(FILE)
      CALL SCOPY(FILE, 1, DIRFIL, 1)
      CALL DNOISE(FILE)
      GDRPRM = 0
23011 CONTINUE
      RETURN
      END
      SUBROUTINE GDRAUX(DESC, FILE, AUX, DATE)
      INTEGER DESC, FIDSW
      LOGICAL*1 FILE(100), AUX(100), DATE(100)
      INTEGER EQUAL, I, DSC(6), F11HDR
      LOGICAL*1 HBUF(512)
      COMMON / CDIREC / DIRLUN, DFDB, LSTFID(3), DIRDEV, DIRUNT, DIRECT(
     *16), DIRFIL(20)
      INTEGER DIRLUN
      INTEGER DFDB
      INTEGER LSTFID
      INTEGER DIRDEV
      INTEGER DIRUNT
      LOGICAL*1 DIRECT
      LOGICAL*1 DIRFIL
      CALL SCOPY(FILE, 1, HBUF, 1)
      CALL FOLD(HBUF)
      CALL NOISE(HBUF)
      IF(.NOT.(EQUAL(HBUF, DIRFIL) .EQ. 0))GOTO 23017
      I = 1
      CALL STCOPY(DIRECT, 1, HBUF, I)
      CALL SCOPY(FILE, 1, HBUF, I)
      CALL UPPER(HBUF)
      CALL DSCBLD(DSC, HBUF)
      FIDSW = 0
      GOTO 23018
23017 CONTINUE
      FIDSW = 1
23018 CONTINUE
      IF(.NOT.(F11HDR(7, DIRDEV, DIRUNT, FIDSW, LSTFID, DSC, HBUF) .EQ. 
     *-3))GOTO 23019
      CALL SCOPY(22HRead access violation!, 1, AUX, 1)
      I=1
23021 IF(.NOT.(I .LE. 11))GOTO 23023
      DATE(I) = 32
23022 I=I+1
      GOTO 23021
23023 CONTINUE
      DATE(I) = 0
      GOTO 23020
23019 CONTINUE
      CALL GETAUX(HBUF, AUX, DATE)
23020 CONTINUE
      RETURN
      END
      SUBROUTINE DIRBRK(STRNG, DEV, GROUP, MEMBER)
      LOGICAL*1 STRNG(100), DEV(100)
      INTEGER GROUP, MEMBER, CTOO, I
      I=1
23024 IF(.NOT.(STRNG(I) .NE. 91))GOTO 23026
      DEV(I) = STRNG(I)
23025 I=I+1
      GOTO 23024
23026 CONTINUE
      DEV(I) = 0
      I = I + 1
      GROUP = CTOO(STRNG, I)
      I = I + 1
      MEMBER = CTOO(STRNG, I)
      RETURN
      END
      SUBROUTINE GETAUX(HBUF, AUX, DATE)
      LOGICAL*1 AUX(100), DATE(100), HBUF(512)
      INTEGER GROUP, MEMBER, PROTEC, I, J, ITOCF, EOF, MASKIT, MASK(16)
      LOGICAL*1 IDATE(14)
      DATA MASK/1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096,
     * 8192, 16384
     *,"100000/
      CALL DECNFO(HBUF, IDATE, GROUP, MEMBER, PROTEC, EOF)
      J = 1
      I=5
23027 IF(.NOT.(I .LE. 16))GOTO 23029
      IF(.NOT.(MASK(I) .EQ. MASKIT(1, MASK(I), PROTEC)))GOTO 23030
      AUX(J) = 45
      GOTO 23031
23030 CONTINUE
      IF(.NOT.(MOD(I, 4) .EQ. 1))GOTO 23032
      AUX(J) = 114
      GOTO 23033
23032 CONTINUE
      IF(.NOT.(MOD(I, 4) .EQ. 2))GOTO 23034
      AUX(J) = 119
      GOTO 23035
23034 CONTINUE
      IF(.NOT.(MOD(I, 4) .EQ. 3))GOTO 23036
      AUX(J) = 101
      GOTO 23037
23036 CONTINUE
      AUX(J) = 100
23037 CONTINUE
23035 CONTINUE
23033 CONTINUE
23031 CONTINUE
      IF(.NOT.(MOD(I, 4) .EQ. 0 .AND. I .LT. 16))GOTO 23038
      J = J + 1
      AUX(J) = 124
23038 CONTINUE
      J = J + 1
23028 I=I+1
      GOTO 23027
23029 CONTINUE
      CALL STCOPY(2H  , 1, AUX, J)
      CALL XCOPY(IDATE(1), 2, AUX, J)
      CALL XCOPY(45, 1, AUX, J)
      CALL XCOPY(IDATE(3), 3, AUX, J)
      CALL XCOPY(45, 1, AUX, J)
      CALL XCOPY(IDATE(6), 2, AUX, J)
      CALL XCOPY(32, 1, AUX, J)
      CALL XCOPY(IDATE(8), 2, AUX, J)
      CALL XCOPY(58, 1, AUX, J)
      CALL XCOPY(IDATE(10), 2, AUX, J)
      CALL XCOPY(58, 1, AUX, J)
      CALL XCOPY(IDATE(12), 2, AUX, J)
      CALL SRTTIM(IDATE, DATE)
      CALL STCOPY(2H  , 1, AUX, J)
      J = J + ITOCF(EOF, 7, 32, AUX(J), 8)
      CALL STCOPY(2H  , 1, AUX, J)
      CALL FMTUIC(GROUP, MEMBER, IDATE)
      CALL RESUIC(IDATE, IDATE)
      CALL SCOPY(IDATE, 1, AUX, J)
      CALL FOLD(AUX)
      RETURN
      END
      SUBROUTINE DECNFO(DBUF, DATE, GROUP, MEMBER, PROTEC, EOF)
      INTEGER DESC, FILEID, GROUP, MEMBER, PROTEC, EOF
      LOGICAL*1 DATE(100), DBUF(512)
      INTEGER REVISE, IDOFF, FREE
      CALL CPYBYT(DBUF(1), IDOFF, 1, 0)
      REVISE = 2 * IDOFF + 13
      CALL CPYBYT(DBUF(REVISE), DATE, 13, 0)
      CALL CPYBYT(DBUF(10), GROUP, 1, 0)
      CALL CPYBYT(DBUF(9), MEMBER, 1, 0)
      CALL CPYBYT(DBUF(11), PROTEC, 2, -1)
      CALL CPYBYT(DBUF(25), EOF, 2, -1)
      CALL CPYBYT(DBUF(27), FREE, 2, -1)
      IF(.NOT.(FREE .LE. 0))GOTO 23040
      EOF = EOF - 1
23040 CONTINUE
      RETURN
      END
      SUBROUTINE CPYBYT(IN, OUT, N, TRMN8R)
      LOGICAL*1 IN(100), OUT(100), TRMN8R
      INTEGER N
      INTEGER I
      I=1
23042 IF(.NOT.(I .LE. N))GOTO 23044
      OUT(I) = IN(I)
23043 I=I+1
      GOTO 23042
23044 CONTINUE
      IF(.NOT.(TRMN8R .GE. 0))GOTO 23045
      OUT(I) = TRMN8R
23045 CONTINUE
      RETURN
      END
      SUBROUTINE XCOPY(IN, N, OUT, J)
      INTEGER N, J
      LOGICAL*1 IN(100), OUT(100)
      INTEGER I
      I=1
23047 IF(.NOT.(I .LE. N))GOTO 23049
      OUT(J) = IN(I)
      J = J + 1
23048 I=I+1
      GOTO 23047
23049 CONTINUE
      RETURN
      END
      SUBROUTINE SRTTIM(IN, OUT)
      LOGICAL*1 IN(100), OUT(100)
      LOGICAL*1 MONTH(4, 12), BUF(4), NUMBER(13)
      INTEGER I, J, EQUAL
      DATA MONTH/106,97,110,0,102,101,98,0,109,97,114,0, 97,112,114,0,10
     *9,97,121,0,106,117,110,0, 106,117,108,0,97,117,103,0,115,101,112,0
     *, 111,99,116,0,110,111,118,0,100,101,99,0/
      DATA NUMBER/97,98,99,100,101,102, 103,104,105,106,107,108, 109/
      J = 1
      CALL XCOPY(IN(3), 3, BUF, J)
      BUF(J) = 0
      CALL FOLD(BUF)
      J = 1
      CALL XCOPY(IN(6), 2, OUT, J)
      I=1
23050 IF(.NOT.(I .LE. 12))GOTO 23052
      IF(.NOT.(EQUAL(BUF, MONTH(1, I)) .EQ. 1))GOTO 23053
      GOTO 23052
23053 CONTINUE
23051 I=I+1
      GOTO 23050
23052 CONTINUE
      CALL CHCOPY(NUMBER(I), OUT, J)
      CALL XCOPY(IN(1), 2, OUT, J)
      CALL SCOPY(IN, 8, OUT, J)
      CALL FOLD(OUT)
      RETURN
      END
      INTEGER FUNCTION CWDIR(STRNG)
      LOGICAL*1 STRNG(100), OUT(40), TEMP(10)
      INTEGER I, OPENDR, DESC
      CALL MKLOCL(STRNG, OUT)
      IF(.NOT.(OPENDR(OUT, DESC) .NE. -3))GOTO 23055
      CALL CLOSDR(DESC)
      I = 1
      CALL JCOPYS(OUT, I, 58, TEMP)
      CALL CHDDEV(TEMP)
      CALL JCOPYS(OUT, I, 93, TEMP)
      CALL CHDDIR(TEMP)
      CWDIR = 0
      GOTO 23056
23055 CONTINUE
      CWDIR = -3
23056 CONTINUE
      RETURN
      END
      SUBROUTINE MKLOCL(IN, OUT)
      INTEGER I, J, TYPE, LENGTH
      LOGICAL*1 IN(100), OUT(100), TEMP(40)
      CALL RESTIL(IN, OUT)
      IF(.NOT.(OUT(1) .EQ. 47))GOTO 23057
      J = 1
      I = 1
      IF(.NOT.(TYPE(OUT(2)) .NE. 2))GOTO 23059
      I=2
23061 IF(.NOT.(OUT(I) .NE. 47 .AND. OUT(I) .NE. 0))GOTO 23063
      CALL CHCOPY(OUT(I), TEMP, J)
23062 I=I+1
      GOTO 23061
23063 CONTINUE
      CALL CHCOPY(58, TEMP, J)
      GOTO 23060
23059 CONTINUE
      CALL GTDDEV(TEMP)
      J = LENGTH(TEMP) + 1
23060 CONTINUE
      IF(.NOT.(OUT(I) .EQ. 47))GOTO 23064
      CALL CHCOPY(91, TEMP, J)
      I=I+1
23066 IF(.NOT.(OUT(I) .NE. 47 .AND. OUT(I) .NE. 0))GOTO 23068
      CALL CHCOPY(OUT(I), TEMP, J)
23067 I=I+1
      GOTO 23066
23068 CONTINUE
      CALL CHCOPY(93, TEMP, J)
      IF(.NOT.(OUT(I) .EQ. 47))GOTO 23069
      CALL STCOPY(OUT, I+1, TEMP, J)
23069 CONTINUE
23064 CONTINUE
      TEMP(J) = 0
      GOTO 23058
23057 CONTINUE
      CALL SCOPY(OUT, 1, TEMP, 1)
23058 CONTINUE
      CALL RESDEF(TEMP, OUT)
      RETURN
      END
      SUBROUTINE RESDEF(IN, OUT)
      LOGICAL*1 IN(100), OUT(100)
      INTEGER INDEX, I, J, LENGTH
      I = 1
      OUT(1) = 0
      IF(.NOT.(IN(I) .NE. 0))GOTO 23071
      IF(.NOT.(INDEX(IN, 58) .GT. 0))GOTO 23073
      CALL JCOPYS(IN, I, 58, OUT)
      GOTO 23074
23073 CONTINUE
      CALL GTDDEV(OUT)
23074 CONTINUE
      IF(.NOT.(IN(I) .NE. 0))GOTO 23075
      J = LENGTH(OUT) + 1
      IF(.NOT.(IN(I) .EQ. 91 .AND. INDEX(IN, 93) .GT. 0))GOTO 23077
      CALL JCOPYS(IN, I, 93, OUT(J))
      GOTO 23078
23077 CONTINUE
      CALL GTDDIR(OUT(J))
23078 CONTINUE
      IF(.NOT.(IN(I) .NE. 0))GOTO 23079
      J = LENGTH(OUT) + 1
      CALL SCOPY(IN, I, OUT, J)
23079 CONTINUE
23075 CONTINUE
23071 CONTINUE
      CALL FOLD(OUT)
      RETURN
      END
      SUBROUTINE JCOPYS(STRNG, I, C, OUT)
      LOGICAL*1 STRNG(100), OUT(100), C
      INTEGER I, J
      J=1
23081 IF(.NOT.(STRNG(I) .NE. C .AND. STRNG(I) .NE. 0))GOTO 23083
      OUT(J) = STRNG(I)
      I = I + 1
23082 J=J+1
      GOTO 23081
23083 CONTINUE
      IF(.NOT.(STRNG(I) .EQ. C))GOTO 23084
      OUT(J) = C
      J = J + 1
      I = I + 1
23084 CONTINUE
      OUT(J) = 0
      RETURN
      END
      SUBROUTINE CHDDEV(DEV)
      LOGICAL*1 DEV(100)
      INTEGER I, JUNK, SSPAWN
      COMMON / CDRSCR / MCRBUF(80), PID(7)
      LOGICAL*1 MCRBUF
      LOGICAL*1 PID
      I = 1
      CALL STCOPY(4HASN , 1, MCRBUF, I)
      CALL STCOPY(DEV, 1, MCRBUF, I)
      CALL SCOPY(5H=SY0:, 1, MCRBUF, I)
      JUNK = SSPAWN(5Hlocal, MCRBUF, PID, 119)
      RETURN
      END
      SUBROUTINE CHDDIR(DIR)
      LOGICAL*1 DIR(100)
      INTEGER DSC(2), LENGTH, I, JUNK, SSPAWN
      COMMON / CDRSCR / MCRBUF(80), PID(7)
      LOGICAL*1 MCRBUF
      LOGICAL*1 PID
      DSC(1) = LENGTH(DIR)
      IF(.NOT.(DSC(1) .GT. 0))GOTO 23086
      CALL GETADR(DSC(2), DIR)
      CALL STDDIR(DSC)
      I = 1
      CALL STCOPY(9HSET /UIC=, 1, MCRBUF, I)
      CALL SCOPY(DIR, 1, MCRBUF, I)
      JUNK = SSPAWN(5Hlocal, MCRBUF, PID, 119)
23086 CONTINUE
      RETURN
      END
      SUBROUTINE MKPATH(IN, OUT)
      LOGICAL*1 IN(100), OUT(100), TEMP(40)
      INTEGER I, J
      CALL MKLOCL(IN, TEMP)
      OUT(1) = 0
      IF(.NOT.(TEMP(1) .NE. 0))GOTO 23088
      J = 1
      CALL CHCOPY(47, OUT, J)
      I=1
23090 IF(.NOT.(TEMP(I) .NE. 58))GOTO 23092
      CALL CHCOPY(TEMP(I), OUT, J)
23091 I=I+1
      GOTO 23090
23092 CONTINUE
      I = I + 1
      IF(.NOT.(TEMP(I) .EQ. 91))GOTO 23093
      CALL CHCOPY(47, OUT, J)
      I=I+1
23095 IF(.NOT.(TEMP(I) .NE. 93))GOTO 23097
      CALL CHCOPY(TEMP(I), OUT, J)
23096 I=I+1
      GOTO 23095
23097 CONTINUE
      I = I + 1
      IF(.NOT.(TEMP(I) .NE. 0))GOTO 23098
      CALL CHCOPY(47, OUT, J)
      CALL STCOPY(TEMP, I, OUT, J)
23098 CONTINUE
23093 CONTINUE
      OUT(J) = 0
23088 CONTINUE
      RETURN
      END
      SUBROUTINE RESUIC(UIC, VALUE)
      LOGICAL*1 UIC(100), VALUE(100), NAME(40), BUF(400), DEFN(40)
      INTEGER INIT, I, LENGTH, INT, OPEN, JUNK, GETWRD, LOOKUP, GETLIN
      DATA INIT/1/
      IF(.NOT.(INIT .EQ. 1))GOTO 23100
      CALL ADRFIL(NAME)
      CALL TBINIT
      INT = OPEN(NAME, 1)
      IF(.NOT.(INT .EQ. -3))GOTO 23102
      CALL REMARK(23Hcannot open user's file)
      GOTO 23103
23102 CONTINUE
23104 IF(.NOT.(GETLIN(BUF, INT) .NE. -1))GOTO 23105
      I = 1
      JUNK = GETWRD(BUF, I, DEFN)
      JUNK = GETWRD(BUF, I, NAME)
      JUNK = GETWRD(BUF, I, NAME)
      CALL INSTAL(NAME, DEFN)
      GOTO 23104
23105 CONTINUE
      CALL CLOSE(INT)
23103 CONTINUE
      INIT = 0
23100 CONTINUE
      IF(.NOT.(LOOKUP(UIC, VALUE) .EQ. 0))GOTO 23106
      CALL SCOPY(UIC, 1, VALUE, 1)
23106 CONTINUE
      RETURN
      END
      INTEGER FUNCTION ITOCF(N, W, FC, BUF, SIZE)
      LOGICAL*1 BUF(100), FC
      INTEGER W, SIZE, M, ITOC, I, LENGTH, N
      COMMON / CFMTBF / TEMP(20)
      LOGICAL*1 TEMP
      M = W - ITOC(N, TEMP, 20)
      I=1
23108 IF(.NOT.(I .LE. M))GOTO 23110
      BUF(I) = FC
23109 I=I+1
      GOTO 23108
23110 CONTINUE
      CALL SCOPY(TEMP, 1, BUF, I)
      ITOCF = LENGTH(BUF)
      RETURN
      END
      SUBROUTINE RESTIL(PATH, OUT)
      LOGICAL*1 PATH(100), OUT(100), TOKEN(40), BUF(81)
      INTEGER I, JUNK, KEY, J, FOUND, FDB, N, DSC(6)
      INTEGER GTFTOK, EQUAL, LENGTH, OPENF, GETS, GETWRD
      LOGICAL*1 BIN(4)
      LOGICAL*1 USR(4)
      LOGICAL*1 TMP(4)
      LOGICAL*1 LPR(4)
      LOGICAL*1 MAIL(5)
      LOGICAL*1 MAN(4)
      DATA BIN(1)/98/,BIN(2)/105/,BIN(3)/110/,BIN(4)/0/
      DATA USR(1)/117/,USR(2)/115/,USR(3)/114/,USR(4)/0/
      DATA TMP(1)/116/,TMP(2)/109/,TMP(3)/112/,TMP(4)/0/
      DATA LPR(1)/108/,LPR(2)/112/,LPR(3)/114/,LPR(4)/0/
      DATA MAIL(1)/109/,MAIL(2)/97/,MAIL(3)/105/,MAIL(4)/108/,MAIL(5)/0/
      DATA MAN(1)/109/,MAN(2)/97/,MAN(3)/110/,MAN(4)/0/
      IF(.NOT.(PATH(1) .NE. 126))GOTO 23111
      CALL SCOPY(PATH, 1, OUT, 1)
      GOTO 23112
23111 CONTINUE
      I = 2
      JUNK = GTFTOK(PATH, I, TOKEN)
      CALL FOLD(TOKEN)
      IF(.NOT.(EQUAL(TOKEN, BIN) .EQ. 1))GOTO 23113
      KEY = 1
      GOTO 23114
23113 CONTINUE
      IF(.NOT.(EQUAL(TOKEN, USR) .EQ. 1))GOTO 23115
      KEY = 2
      GOTO 23116
23115 CONTINUE
      IF(.NOT.(EQUAL(TOKEN, TMP) .EQ. 1))GOTO 23117
      KEY = 3
      GOTO 23118
23117 CONTINUE
      IF(.NOT.(EQUAL(TOKEN, LPR) .EQ. 1))GOTO 23119
      KEY = 4
      GOTO 23120
23119 CONTINUE
      IF(.NOT.(EQUAL(TOKEN, MAIL) .EQ. 1))GOTO 23121
      KEY = 5
      GOTO 23122
23121 CONTINUE
      IF(.NOT.(EQUAL(TOKEN, MAN) .EQ. 1))GOTO 23123
      KEY = 6
      GOTO 23124
23123 CONTINUE
      KEY = -3
23124 CONTINUE
23122 CONTINUE
23120 CONTINUE
23118 CONTINUE
23116 CONTINUE
23114 CONTINUE
      IF(.NOT.(KEY .NE. -3))GOTO 23125
      CALL GETDIR(KEY, 6, TOKEN)
      GOTO 23126
23125 CONTINUE
      CALL ADRFIL(BUF)
      CALL UPPER(BUF)
      FOUND = 0
      CALL DSCBLD(DSC, BUF)
      IF(.NOT.(OPENF(7, DSC, 0, 2, 1, -1, FDB) .NE. -3))GOTO 23127
      N=GETS(FDB, BUF, 80)
23129 IF(.NOT.(N .GE. 0))GOTO 23131
      BUF(N+1) = 0
      J = 1
      JUNK = GETWRD(BUF, J, OUT)
      IF(.NOT.(EQUAL(OUT, TOKEN) .EQ. 1))GOTO 23132
      JUNK = GETWRD(BUF, J, TOKEN)
      FOUND = 1
      GOTO 23131
23132 CONTINUE
23130 N=GETS(FDB, BUF, 80)
      GOTO 23129
23131 CONTINUE
      CALL CLOSEF(FDB)
23127 CONTINUE
      IF(.NOT.(FOUND .EQ. 0))GOTO 23134
      TOKEN(1) = 0
23134 CONTINUE
23126 CONTINUE
      J = 1
      CALL STCOPY(TOKEN, 1, OUT, J)
      IF(.NOT.(PATH(I) .EQ. 47))GOTO 23136
      I = I + 1
23136 CONTINUE
      CALL SCOPY(PATH, I, OUT, J)
23112 CONTINUE
      RETURN
      END
      SUBROUTINE DNOISE(FILE)
      LOGICAL*1 FILE(100)
      INTEGER I
      INTEGER INDEX, EQUAL
      I = INDEX(FILE, 59)
      IF(.NOT.(EQUAL(FILE(I), 2H;1) .EQ. 1))GOTO 23138
      FILE(I) = 0
      I = INDEX(FILE, 46)
      IF(.NOT.(FILE(I+1) .EQ. 0))GOTO 23140
      FILE(I) = 0
23140 CONTINUE
23138 CONTINUE
      RETURN
      END
      SUBROUTINE NOISE(FILE)
      LOGICAL*1 FILE(100)
      INTEGER INDEX
      IF(.NOT.(INDEX(FILE, 46) .EQ. 0))GOTO 23142
      CALL CONCAT(FILE, 1H., FILE)
23142 CONTINUE
      IF(.NOT.(INDEX(FILE, 59) .EQ. 0))GOTO 23144
      CALL CONCAT(FILE, 2H;1, FILE)
23144 CONTINUE
      RETURN
      END
