Command—createentity for COBOL Files - trillium_discovery - trillium_quality - Latest

Trillium DQ Repository Administrator Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Version
Latest
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium DQ Repository Administrator Guide
Copyright
2024
First publish date
2008
Last updated
2024-10-18
Published on
2024-10-18T15:31:00.219841

You can create a dynamic entity using a COBOL flat file that has a companion COBOL copybook (schema).

Before you issue the createentity command, create a loader connection for the COBOL data source. The loader connection specifies where the data source files are located and allows the createentity command to connect to the data source and initiate the entity creation process. (For information about creating a loader connection, see Loader Connections).

Copybook and data file directories do not need to be specified when they are referenced within the loader connection set up by the repository administrator.

Syntax

createentity <loader_connection> datafile <filename> schemafile <copybook_filename>

where,

<loader_connection>

Name assigned by the repository administrator to the loader connection.

<filename>

Name of the COBOL flat file that contains the data.

<copybook_filename>

Name of the schema file that corresponds to the COBOL flat file you specified as the data file.

Optional Parameters

Parameter

Description

username <user_name>

User ID required to validate the connection to the data source. Use this parameter only if a login name and password are required.

Do not use the username and password parameters if the mtb_admin user is the data file owner.

password <password>

Password required to validate the connection to the data source. Use this parameter only if a login name and password are required.

jobname <job_name>

Job ID or name of the data load job.

charset <value>

Indicates the character encoding used by the COBOL data and copybook files; the options are EBCDIC or ASCII.

endian <value>

Indicates the byte order. The options are big (for Big Endian) and little (for Little Endian).

packed <value>

Indicates the structure of the data. Set to 1 if you want to treat unsigned comp-3 fields as comp-6.

align <value>

Indicates one- or two-byte data alignment. The options are one and two.

redefines <value>

Indicates how to manage REDEFINES clauses in a copybook. The options are all and first.

Type all to account for all REDEFINES clauses in a copybook. If this option is selected and the system encounters a REDEFINES clause, it removes the REDEFINES clause and keeps both representations of the data in the copybook. The data file will be populated to match the copybook. 

Type first to ignore all REDEFINES clauses in the copybook.

terminator <value>

Indicates how records in the data file are terminated. The options are lf (linefeed), cr (carriage return), crlf (linefeed and carriage return), and none.

Typically, COBOL data files are fixed length and have no record delimiter. However, if COBOL data is exported from the original application and transferred into other file systems (especially UNIX), they could contain record delimiters added by the export or transfer process.

If the file originated from:

  Windows, type crlf

  UNIX, type lf

  IBM mainframe, type none.

encoding <value>

Indicates the character encoding used by the data file. The options are EBCDIC and ASCII.

EBCDIC data is translated into a correct ASCII representation on load. Generally, UNIX COBOL files will be ASCII and IBM mainframe data will be EBCDIC.

ational <value>

National character encoding used by the data file.

If your COBOL copybooks define national data items holding Unicode strings (such as PIC clause containing N and USAGE NATIONAL) or your compiler options from the data source are set to NSYMBOL (NATIONAL) or CODEPAGE, you should specify the National Character encoding standard of the data source.

columns <names>

Indicates the names of the columns from which to import data.

skip <number>

The number of rows to skip before starting to import data rows. All rows after the skipped rows will be loaded to the repository. For example, if your file has 300 rows and you select to skip the first 99, the system will load 200 rows, starting with the 100th row.

first <number>

Number of records from the beginning of the file to load (for example, the first 1000 records).

random <percentage>

Indicates the degree to which you want to randomly sample a percentage of records from the file.

Example

This command uses a loader connection named cobolconn, provides a username and password to access the data directories, and then loads data from three columns in the testcp932.dat data file.

createentity cobolconn username radmin password serverheaven encoding cp932 datafile q34fin95.dat schemafile q34fin95.cpy columns {{Ref Id} Source Amount}

When multiple columns are represented within a space-delimited line of column names, be sure to enclose them in braces ({}). If a column name contains whitespace, enclose the column name in braces ({}) also.