#if defined(W32) || defined(UNX)
   .Remote file access.

    #if defined(W32)
      .UNC notation is available between Windows for shared files.

       ex). \\server/ip-addr\shared-folder\...\file-name
            If password required to login, use explorer or
            net use \\server command.
            ex) net use \\server1\folder1 password /user:domainname\userid
       WindoswXP configuration has IdleTimeout(Default 15 min) and
       maximum logon user count(XP-Home:5, XP-Pro:10),
       confirm it by "net config server" cmd.
       Timeout can be set by ""net config server /autodisconnect:" cmd.
       Network search may be cause of delays of getting file.
       To check server name use "net view" cmd.
       "net view \\server" lists shared folders.

       Try to inactivate WebClient service if connection time is too long.
       (I do not know why but this dose not occur if share-name is 1 byte drive letter)
       If WebClient is active, Windows try to use HTTP port(80).
       Under the condition of server firewall deny the request,
       long time-out-delay takes place.
       (To invalidate WebClient service,
          ControlPnel-->Management-->Service, Select WebClient and set invalid.)
       You may set accept/reject port:80 on server side to avoid timeout wait.

       Special treatment to UNC notation.
         All UNC format has psuedo drive "\:".
         You can set current-drive and current-path by CD cmd or "." line cmd
         on dir-list.
         e.g) After "cd \\server\dir",
              \:abc is \\server\dir\abc, \:\abc is \\server\abc.
              After \: if once CD setting completed,
              ("." line cmd set both current drive and path)
              xyz is \\server\dir\xyz.
         Current-drive is not saved, but
         current-dir setting for \: is saved and effective on the next session.
         /R cmdline option recovers current drive for also drive "\:".

         Undoable delete dir-list line cmd("d" and "/") renames the file
         at the remote dir for later undo operation if "OPT UNDEL" is on.
         Actual deletion takes place at session termination.

     Followings are about remote access to Unx from Windows/Unx.

    #endif //W32

      .Access remote file by remoteID registered on hosts file.
       Default hosts fiel is xehosts on work directory(::xehosts).
       ex). edit file1.txt in home dir on 192.168.2.15 by "e a1:file1.txt"
            with hosts file has following line
         a1 192.168.2.15  user001 pswdpswd

    #ifdef LNX

        For the case you have no privilege to mount shared resource,
        register remote (Samba or Windows) server in ::xehosts.
          ex)  "w764  192.168.8.22 usrskt pswd  share=sharename
        share parameter means to use smbclient(Linux version)/JCIFS(Android version)  to access the remote system.
        Android version's NODe cmd without password option is used for asynchronous connection test.
          NODe hodtID
        Samba is faster than FTP.
        At first confirm connectablility to Samba Server by
          smbclient -L hostname hostname: ip-address or name on /etc/hosts
        Check ::xeftplog if it dose not work.
        ::xeftplog is written by "xe -ftpw" cmd.

    #endif //LNX

      .password in the line is encrypt if edit and saved by xe.
       For more safety, use NODe cmd to set volatile password
       which is not saved to ::xehost and effective in the session.
         NODe host-ID password (ex. "nod ftpsvr1 CabZyx")
      .undo line cmd of dirlist is not yet supported except for TSO.
      .Use Samba(smbclient) to access Windows from Linux.
       (Register the host on xehost with SHARE= parameter.)
       OR
         mount Windows share like as
           mkdir /WinDriveE
           mount -t cifs //192.168.1.12/E /WinDriveE -o username=yourname
         Now you can access Windows share name by "xe /WinDriveE"
      .SUBmit cmd for remote file is executed locally except TSO file.
       TSO file is executed on the system.
      .XPRrint cmd for remote file prints locally.
      .command line parameter for ftp.
          /Fx[t][:hosts]  :x=0:FTP is not used, x=1:FTP avail(without log)
                           x=w:output ftplog, x=a:ftplog by append mode.
                          :t:debug option not to delete temp file for ftp get.
                          :hosts:hosts filename for xe.
          Default is /F1:xehosts(xehosts on work directory)
      .hosts file format.
       -write comment after #
         except for puTTY option.
           #@PSFTP=  : PSFTP command  if psftp is not on PATH environment.
           #@SSH=all : means the following lien's default SSH option is SSH=Y.
           To comment out these line specify as following.
             ##@PSFTP=~/psftp
             ##@SSH=all
       -operand is remoteid, remote address, userID, password in this sequence
        with space delimiter.
       -remoteid is 2 to 8 byte. CaseSensitive except for TSO system.
       -remote address is ip-address or host name on native hosts file.
        you can use URL format.dress or host name on native hosts file.
       -if password is not required, code "" in the position.
       -optional parameter following password.(keyword=value format)
        HOME=/xxx/yyy    :home dir
        TZ=[-]xxx/yyy    :time zone. ex) TZ=-0900
                          File date is exchanged by GMT, but in Japan
                          AIX is set to GMT=JST. So TZ=0000 should be
                          specified.
        DBCS={EUC|SJIS|  :required when ls subcmd of ftp output is Japanese.
             cp930|cp939| cp930 and cp939 is for the case remote is TSO(Japanese).
             OTHER}       user external converter such as ICU.(See "EBCDIC translation")
        TSO=portNo[opts] :specify portNumber if target is TSO
                          opts: R:destination is not TurnkeyMVS but Real Mainframe.
                                S:On TurnkeyMVS, use not sub tool of TurnkeyMVS but TSO SUBMIT cmd.
                          ex) TSO=23R, TSO=3270S
        LS="xx"/NLST     :specify FTP sub cmd correspond to unix cmd "ls -la".
                          default is "dir". use this option when FTP server dose not support dir subcmd.
                          LS=NLST means LS="ls -la".
                          (I heard RFC defines that ls subcmd returns file name only.)
        ICMD="cmds"      :specify FTP subcmds issued just after login.
                          insert "\n" if the string contains multiple commands.
                          When the case FTP server is configured to reject passive mode
                          and FTP client default is passive mode,
                          you can login successfully but transfer cmd such as ls will fail
                          with "no route to host".
                          ICMD=passive toggles passive and active mode.
        SSH={Y|N}        :use PSFTP as FTP client(Y) or not(N)
        SHARE=sharname   :shared resource name. specify when the remote is Samba server or Windows.
        P=portNo         :specify port number other than SSH default(22) if needed.

sample)

    ###################################################################
    #sample hosts file for xe
    #
    #format
    #
    #@PSFTP=g:\src\putty060\psftp.exe   #specify PSFTP command string if psftp.exe is not on %PATH%
    ##@PSFTP=/home3/putty-0.62/unix/psftp #(Linux sample)
    ##@PSFTP=~/psftp                    #This is comment because this line data dose not start by "#@xxx" pattern.
    #@SSH=all                           #specify to use PSFTP as default for the following destination after this lines.
    ##@SSH=all                          #This is a sample of comment out of #@xxx statement
    #
    # RemoteID  RemoteAddress UserID  Password [option] #Comment
    #   option:HomeDir     :ex. HOME=/tmp/myhome
    #                           HOME='herc01.source.asm' (default Dataset of MVS)
    #         :TimeZone    :ex. TZ=-0900
    #         :DBCS        :ex. DBCS=EUC     :Remote codepage=JapaneseEUC
    #                           DBCS=SJIS    :Remote codepage=ShiftJIS(Japanese)
    #                           DBCS=CP930   :Remote is TSO and use Japanese katakana extension
    #                           DBCS=CP939   :Remote is TSO and use Japanese English lower case letter extension
    #                           DBCS=OTHER   :Remote is TSO and use the converter other than CP939/CP930.
    #                                         (specify charset by CHARSET_CFG parm on xe3270.cfg)
    #         :TSO=portno  :ex. TSO=3270       TurnkeyMVS destination port may be 3270
    #                           TSO=3270S      "S" is submit option(use TSO SUBMIT cmd)
    #                                          without "S", use sub tool of TurnkeyMVS
    #                           TSO=23R        R means target is Real MVS(TSO/E through tn3270))
    #                                          (use TSO SUBMIT cmd.)
    #         :LS="xx"/NLST:ex. LS=NLST        specify any "list directory" cmd string(max 12 byte).
    #                                          default is dir, NLST means "ls -la".
    #         :ICMD="cmds" :ex. ICMD="passive" specify cmd to be issued after opened session
    #                                          insert "\n" between commands when multiple.
    #         :SSH={Y|N}   :ex. SSH=Y          use PSFTP for this destination. "N":use FTP.
    #         :SHARE=name  :ex. SHARE=disk1    use smbclient to this destination(SAMBA server/Windows).
    #Sample
    # a1 192.168.2.5  mizumaki machi TZ=0900
    # hm localhost    herc01   ""        TSO=3270 home='herc01.maclib.asm'
    # t6 S390T6       PURPLE   PSWDPSWD  TSO=23R  home='SAK01.TEST.ASM',DBCS=CP939
    # h390  Linux390  user1    PSWD1     SSH=Y
    # w64   SmbSvr      user1    ""      SHARE=d
    # w7p   192.168.2.12 w7user pswd     share=p
    # gcty  ftp.geocities.jp ybbusr pswd SSH=N
    # centos7r localhost root pswd SSH=Y P=2222
    ###################################################################

    (Note) Because using ftp to access remote, proper environment setup is required.
           DNS may cause slow response because xe open session each access.
           To avoid DNS reference, register your local address on remote /etc/hosts.
           And confirm resolve sequence of /etc/host.conf is host then DNS
           like as "order hosts,bind".

          .vsftp on FC12.

           "dir" cmd for /home may fail by "226 Transfer done (but failed to open directory)."
           SELinux may protect /home. See syslog(/var/log/messages.
             ... avc: denied { read } for ... comm="vsftpd" name="home" ...
           Current configuration status is shown by "getsebool -a".
           To allow to list /home,enter "setsebool -P ftp_home_dir 1".
           Even if ftp_home_dir is off, LS=NLST option on xehosts file will enable
           to get the attribute of sub-dir of /home if "ls -la" cmd return the entry "."(current dir).
           And configure to chroot to out of home dir.
           These depends on your system.

          .Tiny FTP v0.52d(By Mr. H.Nomura)
           When remote is TinyFTP daemon, adjust the configuration as following.
             Setup->System Setup->reconnection  "connection check interval":OFF
             Setup->User   Setup->prohibit      all "directory operation" OFF
             Setup->User   Setup->name          "use password":ON
             Setup->User   Setup->file          "allow all files":ON to access out of the home-dir.
           "e hostname:/" cmd access the home-dir.

          .PSFTP of puTTY. (SSH2 was tested under v063)
            Followings are additional option for PSFTP.

            #@PSFTP=g:\src\putty060\psftp.exe
                Use when psftp is not on PATH environment variable.
                Additional option will be specified. Default is shown on ::xeftplog.
                (::xeftplog is written when xe starts with -fw command line option)
            #@SSH=all
                Set ssh=Y as default for the destination after this line.
            dest1 192.168.2.5  user pswd  ssh=Y
                Specify ssh=Y(use PSFTP) or ssh=N(use FTP) for each destination.
                If missing, #@SSH= is applied as default.
          (Note)
            .Specify like as ##@PSFTP=... to comment out.
            .At first SSH connection to the destination, use native psftp command on console window
             to save host-key in cache.(ex. psftp -l USER -pw PSWD)
             (You may be requested reply of "yes/no" to cache SSH key, it could not reply from xe)
             -xe use -batch option of psftp, but Windows version will hang up if no host-key
              is in cache. Linux version end with error, so xe display the error reason.
            .psftp current version dose not display slink information on dir-list.
            .::xehost update is effective from the next session.

#endif