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

  • Set the parameter PC=ON when invoking Natural (this parameter can also be sent to the host using a procedure file).

    Or:
    Enter the following Natural terminal command in any unprotected input field:

    %+

What can be Transferred?

Download

You can download the following from a host:

  • Data into a PC data format

  • Data in report form retaining the report format

  • Data directly to a printer

  • Data into encrypted form

  • Natural data definition modules (DDMs)

  • Natural source code

  • Natural object code

See also: Supported File Formats.

Upload

You can upload the following to a host:

  • Data from a PC data format

  • Binary data (for example, executable programs)

  • Text data with printable characters

  • Data in encrypted form

  • Natural data definition modules (DDMs)

  • Natural source code

  • Natural object code

See also: Supported File Formats.

Field Formats

You can upload and download fields in the following formats:

  • Alphanumeric

  • Unicode

  • Binary

  • Decimal

  • Floating point

  • Integer

  • Logical

  • Packed

See also: Supported Field Formats.

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.

A format file 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

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
XML *.xml

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.

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

  • From the Utilities menu, choose Cancel Transfer.

    Or:
    Choose the following toolbar button:

    Cancel Transfer

Auditing Data Transfer

If the Audit data transfer check box is marked in the user properties, Entire Connection writes data transfer information to the log file <username>.log.

The log file contains the following information:

  • Transfer start date and time

  • Transfer end date and time

  • Name of the target file

  • Transfer status

  • Number of transferred records

  • Hexadecimal format

  • Number of used transfer buffers

  • User ID of the host user.

  • Name of the Natural library from which the download program was started

  • Name of Natural program that was used to download data

Example

05/10/2007 09:45:37 Started download of file D:\tmp\Employees.ncd
05/10/2007 09:45:37 Ended   download of file D:\tmp\Employees.ncd; Statistics follow:
05/10/2007 09:45:37          File name: D:\tmp\Employees.ncd
05/10/2007 09:45:37          Status   : Terminated Successfully
05/10/2007 09:45:37          Records  : 220      
05/10/2007 09:45:37          Format   : R02A14
05/10/2007 09:45:37          Buffers  : 3   
05/10/2007 09:45:37          UserID   : USER1     
05/10/2007 09:45:37          Library  : USER1     
05/10/2007 09:45:37          Program  : WPC3    
05/10/2007 09:45:37        End of statistics for download of file D:\tmp\Employees.ncd