Class AS400Xtfr


  • public class AS400Xtfr
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      AS400Xtfr​(tnvt v)  
    • Method Summary

      Modifier and Type Method Description
      void addFTPStatusListener​(FTPStatusListener listener)
      Add a FTPStatusListener to the listener list.
      boolean connect​(java.lang.String host)
      Set up ftp sockets and connect to an as400
      void disconnect()
      Send quit command to ftp server and close connections
      java.lang.String getFieldName​(int which)
      Convenience method to return the name of a field
      boolean getFile​(java.lang.String remoteFile, java.lang.String localFile, java.lang.String statement, boolean useInternal)
      Transfer the file information to an output file
      int getNumberOfFields()
      Returns the number of fields in the File Field Definition array of fields returned from the DSPFFD command
      boolean isConnected()
      returns whether or not the system is connected to an AS400 or not
      boolean isFieldSelected​(int which)
      Returns whether a field is selected for output or not
      boolean isFieldsSelected()
      Returns whether there are any fields selected or not
      boolean login​(java.lang.String user, java.lang.String passWord)
      Send the user id and password to the connected host
      void removeFTPStatusListener​(FTPStatusListener listener)
      Remove a FTPStatusListener from the listener list.
      protected void selectAll()
      Select all the fields for output
      protected void selectNone()
      Unselect all fields for output.
      void setDecimalChar​(char dec)  
      void setFieldSelected​(int which, boolean value)
      Convenience method to select or unselect a field for output
      void setOutputFilter​(OutputFilterInterface o)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AS400Xtfr

        public AS400Xtfr​(tnvt v)
    • Method Detail

      • setDecimalChar

        public void setDecimalChar​(char dec)
      • connect

        public boolean connect​(java.lang.String host)
        Set up ftp sockets and connect to an as400
        Parameters:
        host - a hostname
        Returns:
        flag
      • disconnect

        public void disconnect()
        Send quit command to ftp server and close connections
      • isConnected

        public boolean isConnected()
        returns whether or not the system is connected to an AS400 or not
        Returns:
        flag
      • addFTPStatusListener

        public void addFTPStatusListener​(FTPStatusListener listener)
        Add a FTPStatusListener to the listener list.
        Parameters:
        listener - The FTPStatusListener to be added
      • removeFTPStatusListener

        public void removeFTPStatusListener​(FTPStatusListener listener)
        Remove a FTPStatusListener from the listener list.
        Parameters:
        listener - The FTPStatusListener to be removed
      • login

        public boolean login​(java.lang.String user,
                             java.lang.String passWord)
        Send the user id and password to the connected host
        Parameters:
        user - The user name
        passWord - The password of the user
        Returns:
        flag
      • isFieldSelected

        public boolean isFieldSelected​(int which)
        Returns whether a field is selected for output or not
        Parameters:
        which - number of the field to check
        Returns:
        flag
      • selectAll

        protected void selectAll()
        Select all the fields for output
      • selectNone

        protected void selectNone()
        Unselect all fields for output. This is a convenience method to unselect all fields for a file that will only need to output a couple of fields
      • isFieldsSelected

        public boolean isFieldsSelected()
        Returns whether there are any fields selected or not
        Returns:
        flag
      • setFieldSelected

        public void setFieldSelected​(int which,
                                     boolean value)
        Convenience method to select or unselect a field for output
        Parameters:
        which - number
        value - flag
      • getFieldName

        public java.lang.String getFieldName​(int which)
        Convenience method to return the name of a field
        Parameters:
        which - number
        Returns:
        string
      • getNumberOfFields

        public int getNumberOfFields()
        Returns the number of fields in the File Field Definition array of fields returned from the DSPFFD command
        Returns:
        number
      • getFile

        public boolean getFile​(java.lang.String remoteFile,
                               java.lang.String localFile,
                               java.lang.String statement,
                               boolean useInternal)
        Transfer the file information to an output file
        Parameters:
        remoteFile - file
        localFile - file
        statement - some text
        useInternal - flag
        Returns:
        flag