This document covers the following topics:
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.
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:
%+
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.
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.
You can upload and download fields in the following formats:
Alphanumeric
Unicode
Binary
Decimal
Floating point
Integer
Logical
Packed
See also: Supported Field Formats.
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.
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 |
|
||||||||||
Names | Natural field names. |
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
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. |
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
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 |
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.
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.
To abort data transfer
From the
menu, choose .Or:
Choose the following toolbar button: