Package org.tn5250j.sql
Class AS400Xtfr
- java.lang.Object
-
- org.tn5250j.sql.AS400Xtfr
-
public class AS400Xtfr extends java.lang.Object
-
-
Method Summary
Modifier and Type Method Description voidaddFTPStatusListener(FTPStatusListener listener)Add a FTPStatusListener to the listener list.booleanconnect(java.lang.String host)Set up ftp sockets and connect to an as400voiddisconnect()Send quit command to ftp server and close connectionsjava.lang.StringgetFieldName(int which)Convenience method to return the name of a fieldbooleangetFile(java.lang.String remoteFile, java.lang.String localFile, java.lang.String statement, boolean useInternal)Transfer the file information to an output fileintgetNumberOfFields()Returns the number of fields in the File Field Definition array of fields returned from the DSPFFD commandbooleanisConnected()returns whether or not the system is connected to an AS400 or notbooleanisFieldSelected(int which)Returns whether a field is selected for output or notbooleanisFieldsSelected()Returns whether there are any fields selected or notbooleanlogin(java.lang.String user, java.lang.String passWord)Send the user id and password to the connected hostvoidremoveFTPStatusListener(FTPStatusListener listener)Remove a FTPStatusListener from the listener list.protected voidselectAll()Select all the fields for outputprotected voidselectNone()Unselect all fields for output.voidsetDecimalChar(char dec)voidsetFieldSelected(int which, boolean value)Convenience method to select or unselect a field for outputvoidsetOutputFilter(OutputFilterInterface o)
-
-
-
Constructor Detail
-
AS400Xtfr
public AS400Xtfr(tnvt v)
-
-
Method Detail
-
setOutputFilter
public void setOutputFilter(OutputFilterInterface o)
-
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 namepassWord- 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- numbervalue- 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- filelocalFile- filestatement- some textuseInternal- flag- Returns:
- flag
-
-