This document describes the tasks that must be accomplished to allow download and upload.
In order to download and upload data, a work file must be designated as a PC file.
To download reports, a printer must be designated as a PC printer.
To display your current work file settings, invoke the Configuration Utility and from the menu, choose . A screen similar to the following appears:
+-------------------------------- Work Files ---------------------------------+ | Entire Connection protocol mode..... (ECPMOD) ON | | Entire Connection local NCF protocol (NCFVERS) 2 | | PC support.......................... (PC) OFF | | Max. work file number............... (WORK) 32 | | Alternate sort work file names...... (TMPSORTUNIQ) OFF | | Work file open on first access...... (WFOPFA) ON | | Close | | Number Name Attributes Mode Type | | ------ ----------------------------------- ---------- ----- -------------- | | 1 Auto Default | | 2 Auto Default | | 3 Auto Default | | 4 Auto Default | | 5 Auto Default | | 6 Auto Default | | 7 Auto Default | | 8 Auto Default | | 9 Auto Default | | 10 Auto Default | | 11 Auto Default | | 12 Auto Default | | 13 Auto Default | ON or OFF |
To display the printer settings, invoke the Configuration Utility and proceed as follows:
From the
menu, choose . A screen similar to the following appears:+---------------------------- Device Assignments -----------------------------+ | Logical Close Line Page Max | | Device Mode Size Size Page Physical Output Device | | -------- ----- ---- ---- ----- ------------------------------------------- | | VIDEO Auto 80 24 32767 VIDEO D | | LPT1 Auto 80 66 32767 LPT1 D | | LPT2 Auto 80 66 32767 LPT1 D | | LPT3 Auto 80 66 32767 LPT1 D | | LPT4 Auto 80 66 32767 LPT1 D | | LPT5 Auto 80 66 32767 LPT1 D | | LPT6 Auto 80 66 32767 LPT1 D | | LPT7 Auto 80 66 32767 LPT1 D | | LPT8 Auto 80 66 32767 LPT1 D | | LPT9 Auto 80 66 32767 LPT1 D | | LPT10 Auto 80 66 32767 LPT1 D | | LPT11 Auto 80 66 32767 LPT1 D | +-----------------------------------------------------------------------------+ Physical (D)evice, (E)ntire Connection, (F)ile. Use [PF2] for selection list |
From the
menu, choose . A screen similar to the following appears:+------------ Report Assignments -------------+ | Override default report number (MAINPR) 0 | | | | Report Device Profile | | ------ -------- ------- | | 0 VIDEO | | 1 LPT1 | | 2 LPT1 | | 3 LPT1 | | 4 LPT1 | | 5 LPT1 | | 6 LPT1 | | 7 LPT1 | | 8 LPT1 | | 9 LPT1 | +---------------------------------------------+ |
See Device/Report Assignments in the Configuration Utility documentation for further information.
To download or upload from/to the PC, the corresponding work file
must be defined as type TRANSFER
. This can be done statically by
an entry in the Configuration
Utility or also during runtime with the
DEFINE WORK FILE
statement.
From the TRANSFER
must be defined.
If a download/upload takes place with the selected number of the work file, then the PC transfer is activated and an Entire Connection dialog box appears in which you specify the download destination on the PC or the file that is to be uploaded from the PC.
If the work file shall get a new definition during runtime, then the
Natural statement DEFINE WORK
FILE
must be defined before executing the download/upload
sequence.
The work file type TRANSFER
must be used. Example:
DEFINE WORK FILE 1 'PC' TYPE 'TRANSFER'
To download data to a logical printer by writing reports, a static entry is required in the Configuration Utility which defines the setting of the logical printer.
The allocation of a report to this logical printer can then also be
done during runtime with the DEFINE
PRINTER
statement.
The following definition of the logical printer must always be done statically in the Configuration Utility in order to configure a printer that sends the output data to an Entire Connection terminal:
From the
menu, choose . On the resulting screen, select the desired logical printer device (one of LPT1 to LPT3) and set the device destination of the physical output device to "E" (send data to an Entire Connection terminal).In a second step that can also be done during runtime, a report is allocated to the previously defined logical printer device:
From the
menu, choose . On the resulting screen, set the previously defined logical printer device (for example, LPT1) for the desired report number.If a download takes place with the selected printer number, the PC transfer is activated and an Entire Connection dialog box appears in which you specify the download destination on the PC.
The allocation of the desired report number to the previously
defined logical printer device can also be done during runtime. The Natural
statement DEFINE
PRINTER
must then be defined before executing the download
sequence.
As an output parameter, the name of the previously defined logical printer device must be used (the following example uses the name "LPT1").
DEFINE PRINTER (7) OUTPUT 'LPT1'
To upload and download data to/from a PC, the PC connection must be active. You activate the PC connection from Linux.
To activate the PC connection
Use the Natural terminal command
%+
.
Or:
Invoke Natural with the dynamic parameter
PC=ON
.
Or:
Use the SET CONTROL
'+'
statement in a Natural program.
With the terminal command %+
, you can
also set an additional option:
Option | Description |
---|---|
%+N |
The PC connection is activated. In addition, no field names are sent when downloading or uploading data. |
If you attempt to upload or download data without the PC connection being activated, a message appears indicating that the PC connection is not active.
If you enter %+
and the PC connection is
already active, a message appears indicating that the PC connection is already
active.
To deactivate the PC connection
Use the Natural terminal command
%-
.
Or:
Use the SET CONTROL
'-'
statement in a Natural program.