      SUBROUTINE PLU.CAT.PATHS(P1,P2,DST)
*PIC-LAN
*
*ALL
*PC
*N
*
*
*
*
      INCLUDE SYS.TYPE.INCLUDE
*
      P2.DRV = ''
      P2.ROOT = ''
*
      IF P2[1,2] MATCHES '1A:' THEN
         P2.DRV = P2[1,2]
         P2 = P2[3,BIG.STR]
      END
      IF P2[1,1] = '/' THEN
         P2.ROOT = '/'
         P2 = P2[2,BIG.STR]
      END
*
      IF P2.DRV <> '' AND P2.ROOT <> '' THEN
         DST = P2.DRV : P2.ROOT : P2
         RETURN
      END
*
      P1.DRV = ''
      P1.ROOT = ''
*
      IF P1[1,2] MATCHES '1A:' THEN
         P1.DRV = P1[1,2]
         P1 = P1[3,BIG.STR]
      END
      IF P1[1,1] = '/' THEN
         P1.ROOT = '/'
         P1 = P1[2,BIG.STR]
      END
*
      IF P2.DRV <> '' AND P2.DRV <> P1.DRV THEN
         DST = P2.DRV : P2.ROOT : P2
         RETURN
      END
*
      IF P2.DRV = '' THEN P2.DRV = P1.DRV
*
      IF P2.ROOT <> '' THEN
         DST = P2.DRV : P2.ROOT : P2
         RETURN
      END
*
      PP1 = ''
      FOR I = 1 TO DCOUNT(P1,'/')
         PP1<I> = FIELD(P1,'/',I)
      NEXT I
      FOR I = 1 TO DCOUNT(PP1,AM)
         IF PP1<I> = '' THEN
            PP1 = DELETE(PP1,I,0,0)
         END
      NEXT I
*
      PP2 = ''
      FOR I = 1 TO DCOUNT(P2,'/')
         PP2<I> = FIELD(P2,'/',I)
      NEXT I
      FOR I = 1 TO DCOUNT(PP2,AM)
         IF PP2<I> = '' THEN
            PP2 = DELETE(PP2,I,0,0)
         END
      NEXT I
*
      N = DCOUNT(PP1,AM)
*
      FOR I = 1 TO DCOUNT(PP2,AM)
         BEGIN CASE
            CASE PP2<I> = '.'
            CASE PP2<I> = '..'
               IF N > 0 THEN
                  PP1 = DELETE(PP1,N,0,0)
                  N = N - 1
               END
            CASE YES
               PP1<-1> = PP2<I>
               N = N + 1
         END CASE
      NEXT I
*
      DST = P1.DRV : P1.ROOT : PL_REPL(PP1,AM,'/')
      DST = PL_REPL(DST,'//','/')
*
      RETURN
   END
