Version 4.5.2
 —  Terminal Emulation  —

General Data Transfer Information

This document covers the following topics:


Natural Data Transfer

You can transfer data between Natural applications on host systems and your PC. Data is compressed before being transferred to or from the host. Fewer buffers are thus transferred and the transfer is faster.

Your Natural administrator has to define the data transfer in the Natural parameter module (in the section where the work files and the printers are defined). If you display the work file definition using the Natural command SYSFILE WORK, the work files listed as PC are set for data transfer with Entire Connection.

Before you can use any data transfer function, you must tell Natural that you are an Entire Connection user. This is required only once per session. However, if your system administrator has set the parameter PC=ON in the Natural parameter module on the host, no further steps are required.

Start of instruction set To tell Natural that you are an Entire Connection user

Top of page

What can be Transferred?

Download

You can download the following from a host:

See also: Supported File Formats.

Upload

You can upload the following to a host:

See also: Supported File Formats.

Field Formats

You can upload and download fields in the following formats:

See also: Supported Field Formats.

Top of page

Format Files

When the Create format file check box is marked in the user properties, a format file (extension ncf) is automatically created when you download data. Format files can also be created using the Format Converter.

The setting of the parameter Disable data transfer enhancements decides whether the new field formats as of Natural Version 4.1 for Mainframes and Natural Version 6.1 for UNIX are supported or not. It also influences the content of the format file. This parameter is specified on the Data Transfer property page of the Session Properties dialog box. See Session Properties in the Overview of Object Properties.

New Format Files

If the new field formats as of Natural Version 4.1 for Mainframes and Natural Version 6.1 for UNIX are supported, the format file is written in a new form. It contains the following information:

Information Description
File name Name of the target file.
Status Transfer/conversion status.
Start Transfer/conversion start date and time.
End Transfer/conversion end date and time.
Protocol Version of the internal protocol.
Records Number of records transferred/converted.
User ID User ID of the host user.
Library Name of the Natural library from which the download program was started.
Program Name of the Natural download program.
Code Page Encoding of the data. This can be UTF-16, UTF-8 (if the NCF file was created by a download with Natural for UNIX) or a Windows code page.
Translate Information on the translation code pages is written as a support hint into the NCF file. This allows to recognize whether the Natural code page on the mainframe conforms with the code page that is the base for the Entire Connection EBCDIC/ASCII translation table. For example, "1140/1140" is written into the NCF file if the code page are conform. If the code pages are not conform, a warning is issued, for example, "1140/273 Translation code pages mismatch!". If the NCF file was created by a download with Natural for UNIX, the value here is "Not applicable".
Buffers Number of transfer buffers used.
Globals Decimal character, delimiter and repeat character. Entire Connection uses these characters internally. The values are defined by the Globals setting in Natural. The value for the decimal character is also used for the decimal character in the format file.
Format
The format string consists of the elements supported as of Natural Version 4.1 for Mainframes and Natural Version 6.1 for UNIX. See Supported Field Formats below. The elements are separated by a delimiter (see the table below).

The following characters are used in the format string:

Character
Description
. Decimal character.
, Delimiter.
/ Repeat character. The repeat character is followed by the number of repetitions. Example: N10.7/100.
Names Natural field names.

Sample Format File

File name: C:\temp\my_file.ncd
Status   : Terminated Successfully
Start    : 12/05/2007 11:58:07
End      : 12/05/2007 11:58:07
Protocol : 2  
Records  : 3        
UserID   : XYZ      
Library  : XYZ      
Program  : PCWRITE 
Code Page: UTF-16
Translate: 1140/273 Translation code pages mismatch!
Buffers  : 2   
Globals  : .,=
Format   : N7.3/4,A100,I2,F4,L,N7.3,
Names    : 
           N
           N
           N
           N
           A
           I
           F
           L
           N

Old Format Files

If the data transfer enhancements have been disabled, the format file is written in the same way as with Entire Connection Version 4.3.1 or earlier. It contains the following information:

Information Description
File name Name of the target file.
Status Transfer/conversion status.
Start Transfer/conversion start date and time.
End Transfer/conversion end date and time.
Records Number of records transferred/converted.
User ID User ID of the host user.
Library Name of the Natural library from which the download program was started.
Program Name of the Natural download program.
Buffers Number of transfer buffers used.
Globals Decimal character, delimiter and repeat character. Entire Connection uses these characters internally. The values are defined by the Globals setting in Natural. The value for the decimal character is also used for the decimal character in the format file.
Format Hexadecimal format. See the table below.
Names Natural field names.

The format string may consist of the following elements:

Format Description
Ax Alphanumeric data where x is a two-digit hexadecimal number between 01 and FD.
Bx Binary data where x is a two-digit hexadecimal number between 01 and 7F.
F4 Floating point data with 8 characters.
F8 Floating point data with 16 characters.
Ix Integer data where x is 1, 2 or 4.
L Logical data (no length specified in format string).
Nx.y Numeric data where x is a two-digit hexadecimal number between 01 and 1B. y is a one-digit hexadecimal number between 0 and 7. The sum of x and y must not be greater than 29.
Px.y Packed data where x is a two-digit hexadecimal number between 01 and 1B. y is a one-digit hexadecimal number between 0 and 7. The sum of x and y must not be greater than 29.
Rx Repeat the next format x times where x is a two-digit hexadecimal number between 02 and FF. Example: R03A04 stands for A04A04A04.

Format String Example

A01A04A0AA14I2I4N07.0N10.4N00.2B04F4LP06.2P07.0R03A01A14R03I2I4

The above string contains the following:

A1, A4, A10, A20, I2, I4, N7, N16.4, N0.2, B4, F4, L, P6.2, P7, A1, A1, A1, I2, I2, I2, I4

Top of page

Supported File Formats

You can download data directly to and upload directly from files in any of the data formats supported by Entire Connection. The format is identified by the extension of the file to be downloaded or uploaded.

The following formats are supported:

Format Extension
ASCII *.ncd or any other extension not included in this table (for example, *.txt).

When records are downloaded to ASCII format, trailing blanks at the end of downloaded records are removed. If you want to keep trailing blanks, you must specify this in the session properties.

Basic *.prn
Binary Any binary file with any extension. The transfer format for Natural is a record with a single binary field.
dBase III *.dbf

You can download field names as column labels to dBase and Lotus files. However, you cannot upload column labels.

Data Interchange Format *.dif
Encryption *.enc
Excel *.xls or *.xlsx (depending on the Excel version)
HTML *.htm or *.html. This is a specific HTML format that can also be opened with Excel.
IBM-compatible COBOL *.ncc
Lotus without labels *.wks or *.wk1
Lotus with labels *.wkl
Multiplan *.mpn
XML *.xml

Top of page

Supported Field Formats

The following formats are supported:

Format Description
Ax Alphanumeric format where x is a digit between 1 and 253.
Ay Alphanumeric format where y is a digit greater than 253. Can only be used with file formats HTML, XML, ASCII and COBOL. The maximum value which can be specified depends on your Natural version. See the Natural documentation for further information.
Bx Binary format where x is a digit between 1 and the maximum value. The maximum value which can be specified depends on your Natural version. See the Natural documentation for further information.
F4 Floating point format with 4 bytes.
F8 Floating point format with 8 bytes.
Ix Integer format where x is 1, 2 or 4.
L Logical format (true or false).
Nx.0 Numeric format where x is a digit between 1 and 29.
Nx.y Decimal format where x is a digit between 1 and 29. y must be less than or equal to 7. The sum of x and y must not be greater than 29.
Px.0 Packed format where x is a digit between 1 and 29.
Px.y Packed decimal format where x is a digit between 1 and 29. y must be less than or equal to 7. The sum of x and y must not be greater than 29.
Ux Unicode format where x is a digit between 1 and 253.
Uy Unicode format where y is a digit greater than 253. Can only be used with file formats HTML, XML, ASCII and COBOL. The maximum value which can be specified depends on your Natural version. See the Natural documentation for further information.

For further information on field formats, see the Natural documentation.

Top of page

Aborting Data Transfer

You can abort the current upload or download of data. This is useful, for example, if you notice that you are downloading the wrong file.

Start of instruction set To abort data transfer

Top of page