Extract File Formats

Types of Extract File Format

You can define an Extract file with LDL+ logic in one of the following formats:

The form of the Extract File layout is determined when the Report is generated (not dynamically at run time), and it applies throughout the Report.

Defining an Extract File in Report Frame Format

This form is useful when you want to transfer data in and out of an application. To write the contents of a Frame to an Extract file (in a format defined by the Frame layout), use the Extract command, specifying the Frame. You can set up a Frame particularly for this purpose, if required. This type of Extract file can be used by all programs (including external programs).

Defining an Extract File in Ispec Format

This form is useful when you want to perform operations internal to your application (such as sorting data without using Profiles). The format of the data record is determined by the structure of the Ispec or event specified in the LDL+ logic. To write Ispec data to an Extract file (in internal Ispec format), use the Extract logic command, specifying an Ispec name.

Any one Extract file can contain either of the following (but not both):

Defining an Extract File in Mapper Format

Mapper format might be used with both Report Frame and Ispec formats by using the optional Mapper qualifier in LDL+ logic when reading or writing an Extract file. When used during writing of an Extract file spaces between attributes are removed, and the columns are TAB delimited. Mapper format writes records to the extract file in Business Information Server format.

The frame specified as qualifier is the frame used to provide header records for the extract file. The header included in an extracted frame is that specified by the first Extract logic statement for that file. If the Business Information Server header contains a variable, an error occurs during the execution of the Extract logic statement. Business Information Server header information can be added to the extract file after it is created.

Within your Report, you might include the following logic to extract a Report Frame.

Extract frame Mapper AS x RetainAs file

The frame value is your required Report Frame number, x is the one-character Extract file designator (A through Z), and file is the name of the Business Information Server-format output file.

If you want to extract a Report Frame to a predefined Business Information Server header record use the following logic.

Extract frame Mapper header AS x RetainAs file

Note: If the Business Information Server header contains an attribute, then an error occurs.

You can also extract all the attributes of one Component, or all the attributes of one or more Event records, as for standard (non-Business Information Server) Extract files.

Numeric Attributes in Extract Files

Numeric attributes extracted as part of a Report Frame might have a different format from those extracted as part of an Ispec record.

The default for numeric items in Report Frames is COBOL type DISPLAY. This can be changed to COMP by adding the BCD (Binary Coded Decimal) Data Attribute to the Report properties.

Numeric attributes in Ispecs are always COMP.