File Transfer


File Download

The Natural Availability Server supports the Natural statement DOWNLOAD PC FILE and transfers the file's content to the browser.

The data file can be downloaded in a format compatible with Entire Connection, or as a CSV file to be opened, for instance, in Microsoft Excel®.

You can configure the default format for the downloaded file via the DOWNLOAD PC FILE statement, using the following properties in the application.properties file:

Property name

Description

Required

Default and Optional Values

com.softwareag.natural.client.config.data-transfer.data-content-file-format

Defines the format used to save the data file.

no

Optional values:

csv (default)
Plain

com.softwareag.natural.client.config.data-transfer.data-content-expected-behavior

Defines the handling of the data file.

no

Optional values:

Print
Download (default)

File Upload

The Natural Availability Server supports the Natural statement UPLOAD PC FILE and transfers the file's content to Natural.

The uploaded data file can be in a format compatible with Entire Connection, or as a CSV file that matches the previously downloaded file.

  • An upload dialog opens, when the host expects to receive a file.

  • Select the file to upload.

Note:
The dialog will stay open, if the uploaded file does not match the required format, followed by an error message. You may repeat, and select a suitable file.

Report Printing

The Natural Availability Server supports the statement Natural PRINT and transfers the file's content to the browser to be printed.

The content of the report can be addressed to a printer installed on the client machine or saved to be processed later.

You can configure the default behavior for the PRINT statement using the following properties:

Property name

Description

Required

Default and Optional Values

com.softwareag.natural.client.config.data-transfer.report-content-expected-behavior

Defines the handling of the report file.

no

Optional values:

Print (default)
Download

com.softwareag.natural.client.config.data-transfer.report-content-file-format

Defines the format used to save the report file.

no

Optional values:

csv
Plain (default)

Automatic Download Property

The browser can handle the download process automatically if a filename is defined in the Natural program using the SET PCFILE command.

To start the download automatically, define the following property:

Property name

Description

Required

Default and Optional Values

com.softwareag.natural.client.config.data-transfer.automatic-download

Defines whether the download will start automatically, or if a download dialog allows the user to configure the behavior for the file.

no

false (default)
true

Note:
This property affects the DOWNLOAD PC and PRINT statements differently.

  • DOWNLOAD PC FILE statement

    If the property is set to "true" the download starts automatically.

  • PRINT statement

    The content transfers automatically to the client and opens the print dialog.