In ApplinX Framework, it is possible to transfer files from the client to the host or from the host to the client, using the FTP dialog screens. The HTML emulation contains a link in the footer that opens an FTP Web dialog box.
To upload/download files using the FTP option, you need to configure a number of parameters in the Framework Configuration Editor.
FTP Configuration:
Open a new browser and run your Web application.
Click on the Framework Configuration link. The Configuration Editor will be displayed.
Expand the FTP node.
Select the Host type.
Enter the Host address.
Click
to save your changes.Click
to return to the Web application.When working with an application which is not an HTML emulation, add an element such as a link or a button which when clicked will call the gx_openFtpDialog() JavaScript function (in an HTML emulation this is built-in).
Refer to Using FTP to Upload Files and Using FTP to Download Files.
To work with an application which is not an HTML emulation, add an
element, such as a link or a button, to your master page
(template.jsp/template.master.cs) or to any generated page. Place it in a
suitable location. Set the link to call gx_openFtpDialog();
.
<input type="button" id="FTPtButton" value="FTP" onClick="gx_openFtpDialog();" />
To upload files:
Configure the FTP parameters as detailed in FTP Configuration.
Open the ApplinX HTML Emulation and run your Web application.
Click on the upload image to display the Upload dialog box.
Click on the
button. The File Upload screen will be displayed.Enter the User name and Password (mandatory).
Enter the name of the file you would like to upload (Remote file). (Mandatory).
Click
to enter the location and file name of the uploaded file.Fill in the host property fields (these fields are optional and differ according to the configured host):
Select the data representation type: ASCII, EBCDIC, IMAGE, DBCS_EBCDIC, EBCS_EBCDIC or CCSID.
Select the structure of the data that is to be transferred: File or Record.
Select the mode Stream or Block to determine whether records are transmitted record-by-record or as a continuous stream of bytes.
Select the data representation type: ASCII, EBCDIC, IMAGE, UNICODE 2 B or UNICODE 2 L.
In the Record format field, specify the type of records in the data set: Fixed, Variable or Undefined.
In the LRECL field, specify the logical record length (in bytes).
In the Block size field specify the physical length of the data (in bytes).
In the Primary field specify the number of tracks or blocks initially allocated to the data set.
In the Secondary field specify the number of tracks or blocks if the primary allocation is exceeded.
It is possible to enter a user defined command in the Command field.
Click
. The upload process may take some time and is dependant on the size of the file and the connection.A message will be displayed indicating that the upload was successfully completed. If there is a failure when uploading the file, an error message will appear.
To download:
Configure the FTP parameters as detailed in FTP Configuration.
Open the ApplinX HTML Emulation and run your Web application.
Click on the download image to display the Download dialog box.
Click on the
button. The File Download screen will be displayed.Enter the User name and Password (mandatory).
Enter the path and file name of the source file that is to be downloaded (mandatory).
Fill in the host property fields (these fields are optional and differ according to the configured host):
Select the data representation type: ASCII, EBCDIC, IMAGE, DBCS_EBCDIC, EBCS_EBCDIC or CCSID.
Select the structure of the data that is to be transferred: File or Record.
Select the mode Stream or Block to determine whether records are transmitted record-by-record or as a continuous stream of bytes.
Select the data representation type: ASCII, EBCDIC, IMAGE, UNICODE 2 B or UNICODE 2 L.
In the Record format field, specify the type of records in the data set: Fixed, Variable or Undefined.
In the LRECL field, specify the logical record length (in bytes).
In the Block size field specify the physical length of the data (in bytes).
In the Primary field specify the number of tracks or blocks initially allocated to the data set.
In the Secondary field specify the number of tracks or blocks if the primary allocation is exceeded.
It is possible to enter a user defined command in the Command field.
When the file is a text file, it is possible to determine whether you would like to convert the downloaded file to Windows text mode, DOS text mode or Linux text mode.
Click
. The Windows File Download window will be displayed enabling you to save or open the file. If there is a failure when downloading the file, an error message will appear.