      SUBROUTINE PLHOST.IMPORT(HOSTFILE,CONV,SRC)
*PIC-LAN
*
*MVBASE D3 UV UD JB QM
*PC
*N
*
*
*
*
      INCLUDE SYS.TYPE.INCLUDE
*
      INCLUDE PL.COMMON
      INCLUDE PL.COMMON.DEFS
      INCLUDE PL.DEFS
      INCLUDE PLIP.COMMON
      INCLUDE PLW.COMMON
*
      IF INDEX(HOSTFILE,'..',1) THEN
         SRC = ''
         RETURN
      END
*
      CALL PLU.HOSTDIR(HOSTFILE,FILE.PATH,FILE.NAME,FILE.EXT,SRC)
      IF SRC = '' THEN RETURN
*
      OPEN 'WWW.CTRL,LOCK' TO LOCK.FD ELSE CALL PLXX.STOP(201,'WWW.CTRL,LOCK')
      READVU DUMMY FROM LOCK.FD , 'HOST.IMPORT' , 1 ELSE NULL
*
      PL_HOSTOPEN FILE.HANDLE FROM FILE.PATH : FILE.NAME ELSE
         SRC = ''
         RELEASE LOCK.FD , 'HOST.IMPORT'
         RETURN
      END
*
      X = ''
      XX = ''
      XXX = ''
      EOF = NO
      LOOP UNTIL EOF DO
         BEGIN CASE
            CASE CONV = ''
               PL_HOSTREAD S FROM FILE.HANDLE ELSE
                  EOF = YES
               END
            CASE CONV = 'A'
               PL_HOSTREADA S FROM FILE.HANDLE ELSE
                  EOF = YES
               END
            CASE CONV = 'X'
               PL_HOSTREADX S FROM FILE.HANDLE ELSE
                  EOF = YES
               END
            CASE YES
               PL_HOSTCLOSE FILE.HANDLE ELSE NULL
               RETURN
         END CASE
         IF NOT(EOF) THEN
            IF S = '' THEN
               EOF = YES
            END ELSE
               IF LEN(XXX) > 200000 THEN
                  XX = XX : XXX
                  XXX = ''
                  IF LEN(XX) > 1000000 THEN
                     X = X : XX
                     XX = ''
                  END
               END
               XXX = XXX : S
            END
         END
      REPEAT
*
      IF CONV = '' OR CONV = 'A' THEN
         IF XXX[LEN(XXX),1] = CHAR(26) THEN
            XXX = XXX[1,LEN(XXX)-1]
         END
      END
*
      SRC = X : XX : XXX
*
      PL_HOSTCLOSE FILE.HANDLE ELSE NULL
*
      RELEASE LOCK.FD , 'HOST.IMPORT'
*
      RETURN
   END
