IMPORT PRINT command

Used to define ACL tables from Print Image (Report) files.

Syntax

IMPORT PRINT TO table import_filename FROM source_filename 
<SERVER profile_name> character_set_value <code_page_number>
{[record_syntax] [field_syntax] <...n>} <...n>

 

record_syntax ::=
RECORD name
recType lines transparent [test_syntax]<...n>

 

test_syntax ::=
TEST inc match_type AT line, start, logic range text

 

field_syntax ::=
FIELD name type AT value SIZE value DEC decimals WID view_width 
PIC format AS label

Parameters

TO table

Specifies the name of the ACL table to import the data into.

import_filename

Specifies the name of the ACL data file. The import_filename parameter must be specified as a quoted string with a .FIL file extension (e.g., "Invoices.FIL").

If you do not want to create the .FIL file in the same directory as the ACL project, you can specify an absolute or relative file path to an existing folder to write the .FIL file to.

For example: "C:\data\Invoices.FIL" or "data\Invoices.FIL"

FROM source_filename

Specifies the name of the source data file. This parameter must be specified as a quoted string.

If the source data file is not located in the same directory as the ACL project, you must use an absolute path (e.g., "C:\data\source_filename") or a relative path (e.g., "data\source_filename") to specify the file location.

SERVER profile_name

Optional. Specifies the server profile name for the ACL Server where the data you want to import is located.

character_set_value

Specifies the character set used to encode the Print Image (Report) file. The following values are supported:

  • 0 – ASCII

  • 1 – EBCDIC

  • 2 – Unicode

  • 3 – Encoded text

code_page_number

If you specified 3 (Encoded text) for the character_set_value parameter, you must also enter a code page number.

FIELD name type

Specifies the name and data type of the field. For information on the values you can enter for the type parameter, see Identifiers for field data types.

AT value

Specifies the start position for the field in the data file.

DEC value

Specifies the number of decimals.

WID value

Specifies the length of the field in the ACL table layout.

PIC value

Specifies the format for date and numeric fields. For numeric fields the format specifies how the values should be displayed. For date fields, the format specifies how dates are stored and should be read from the data source.

AS value

Specifies the display label (alternate column title) for the field in the ACL view. The AS parameter is required when you are defining a field. If you want the display label to be the same as the field name, you can enter a blank value using the following syntax: AS "". Make sure there is no space between the two double quotation marks.

Example

The following example defines a header record and detail record to import data from a Print Image (Report) file that contains inventory information to an ACL table called Inventory.

IMPORT PRINT TO Report "Report.FIL" FROM "Report.txt" 0 
RECORD "Detail" 0 1 0 TEST 0 0 AT 1,59,59 7 "." 
FIELD "Field_1" X AT 1,6 SIZE 9,1 DEC 0 WID 9 PIC "" AS "Item ID" 
FIELD "Field_2" C AT 1,16 SIZE 24,1 DEC 0 WID 24 PIC "" AS "Item Desc."
FIELD "Field_3" N AT 1,40 SIZE 10,1 DEC 0 WID 10 PIC "" AS "On Hand"
FIELD "Field_4" N AT 1,50 SIZE 12,1 DEC 2 WID 12 PIC "" AS "Cost"
FIELD "Field_5" N AT 1,62 SIZE 12,1 DEC 2 WID 12 PIC "" AS "Total"
RECORD "Header1" 1 1 0 TEST 0 0 AT 1,17,0 7 ":"
FIELD "Field_6" C AT 1,19 SIZE 2,1 DEC 0 WID 2 PIC "" AS "Prod Class"
FIELD "Field_7" C AT 1,24 SIZE 31,1 DEC 0 WID 31 PIC "" AS "Prod Description" 


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback