Kourier Integrator Online Help
KT.FILEUSAGE {FILE_NAME} {USING DICTIONARY_FILE} {OVERWRITING}
This command can be used to analyze the physical structure of a file and compare it to the data defining dictionaries (D-type) for that file. The output of this command is written to the KT_SCHEMA file and may be displayed using the DEMO_KTSCHEMA export.
A record is written for each attribute of a file using an item-id of the source file name, an asterisk and the attribute number (e.g. CUSTOMER*1). Each record contains a copy of the information in the D-type dictionary for the attribute such as the dictionary name, type, conversion, columnar heading, format, structure code and association; the number of source file records that have a non-null attributes, values or sub-values; and the suggested data types, structure code and data length for the attribute.
This command is normally used as part of the process of moving multi-valued data to Microsoft SQL Server.
FILE_NAME |
The name of the file to analyze. This parameter should be omitted if you are running KT.FILEUSAGE against an active select list (see example 3), otherwise it is a required parameter. |
USING DICTIONARY_FILE |
If this optional clause is included, it specifies the file to be used as the dictionary instead of the default dictionary associated with the file being analyzed. |
OVERWRITING |
Overwrites existing records in the KT_SCHEMA file. If this command line option is not used and information exists for a file a prompt is displayed before overwriting the existing data. |
>KT.FILEUSAGE AR-INVOICE
AR-INVOICE
26 records analyzed in 0.251 seconds.
In this example, the file AR INVOICE is analyzed and the information about this file is written to the KT_SCHEMA file.
>KT.FILEUSAGE AR-INVOICE
Overwrite AR-INVOICE (Y,N=<CR>,A): Y
AR-INVOICE
26 records analyzed in 0.251 seconds.
In this example, the file AR-INVOICE is analyzed. Since information had been previously written to the KT_SCHEMA file about the AR-INVOICE file the command prompts for the overwrite option. Valid answers are Y for yes, N for no, or A for yes to all.
>GET-LIST FILES
5 record(s) selected to SELECT list #0.
>KT.FILEUSAGE
AR-INVOICE
26 records analyzed in 0.261 seconds.
ARLI
29 records analyzed in 0.190 seconds.
CUSTOMER
62 records analyzed in 0.260 seconds.
CUSTOMER-CLASS
4 records analyzed in 0.271 seconds.
SALESREP
3 records analyzed in 0.140 seconds..FILEUSAGE AR-INVOICE
Overwrite AR-INVOICE (Y,N=<CR>,A): Y
AR-INVOICE
26 records analyzed in 0.251 seconds.
In this example, an active select list of files was analyzed and the information about these files is written to the KT_SCHEMA file.