<OUTPUT-FORMATS> - Intergraph I-Data Integrator - Help - Hexagon PPM

SmartPlant Isometrics I-Data Integrator Help

Language
English
Product
Intergraph I-Data Integrator
Search by Category
Help
I-Data Integrator Version
7.1(2014R1)

Contains data specific to each output format. The general syntax of the data is shown below.

<FORMAT attribute=”value” />

The <OUTPUT-FORMATS> section can include the tags listed below.

<ACCESS>

<ACCESS TEMPLATE="APP.PATH\TEMPLATE.MDB" OUTPUT="XMAT"/>

The <ACCESS> tag can have two attributes:

  • TEMPLATE specifies the template database used to create the output. The template database can hold pre-configured reports. You can use the APP.PATH string to specify the installed location of I-Data Integrator.

  • OUTPUT specifies the name for the output Access database. The default name is Materials.mdb.

<EXCEL>

<EXCEL TEMPLATE="APP.PATH\TEMPLATE.XLS" OUTPUT="MATERIAL"/>

The <EXCEL> tag can have two attributes:

  • TEMPLATE specifies the template spreadsheet used to create the output. You can use the APP.PATH string to specify the installed location of .

  • OUTPUT specifies the name for the output Excel spreadsheet. The default name is Materials.xls.

<DELIMITED>

<DELIMITED DELIMITER="TAB" EXTENSION="B"/>
<DELIMITED DELIMITER=";" QUOTECHAR="&apos;" />

The <DELIMITED> tag can have three attributes.

  • DELIMITER specifies the delimiter character. The default is “ ; ”. To specify a Tab character as the delimiter, use DELIMITER="TAB".

  • EXTENSION specifies the default extension to use for the delimited files. The default is .csv. This can be overridden for different recordsets in the <OUTPUT-CONTROLS> section.

  • QUOTECHAR specifies an option quote character. If used, all fields are prefixed and suffixed with the specified character. To specify certain characters as quote characters, you can use special XML strings as shown in the list below.

Character

XML Syntax

Double quote ( " )

&quot;

Single quote ( ' )

&apos;

Left angle bracket ( < )

&lt;

Right angle bracket ( > )

&gt;

<MASTER-DETAIL>

The delimited format can also contain a special set of tags that control the output of a “master/detail” type file. In this type of file, one record from the Master recordset is followed by all the records from the Detail recordset that meet a criteria, usually that they share a value with the Master recordset.

For example, you can merge the records from the Pipelines and Components recordsets as follows:

Pipeline 1

Components for pipeline 1

Pipeline 2

Components for pipeline 2

Pipeline 3

Components for pipeline 3

You must enclose the data between the <MASTER-DETAIL> tags, as shown in the example.

<MASTER-DETAIL
MASTER="SRECORDS"
DETAIL="VRECORDS"
HEADER= "K,DOW,ABS-TRAIN 6,104146,Spoolgen,v4,CUSTOMER-EXAMPLE.CSV,6/02/2002"
CRITERIA="PIPELINE-REFERENCE = MASTER.[LINE]"
SUPPRESS-DETAIL-FIELDS="PIPELINE-REFERENCE,Geandert"  >
</MASTER-DETAIL>

There can be any number of <MASTER-DETAIL> tags within the <DELIMITED> tag. Its attributes are listed below.

  • DETAIL specifies the name of the recordset supplying the detail records.

  • HEADER specifies a string that is output as the first line of the file. It is an optional attribute.

    The HEADER attribute can contain the macros listed below, which the software can substitute at run time.

    • $DATE - Current system date

    • $TIME - Current system time.

    • $APP.TITLE - Title of the executable, such as I-Data Integrator.

    • $APP.EXENAME - Name of the I-Data executable, such as I-Data Integrator.

    • $APP.MAJOR - Major revision number.

    • $APP.MINOR - Minor revision number.

    • $APP.REVISION - Revision version number.

HEADER= "&quot;K&quot;,&quot;DOW&quot;,&quot;ABS-TRAIN 6&quot;,&quot;104146&quot;,&quot;$APP.TITLE $APP.MAJOR.$APP.MINOR.$APP.REVISION&quot;,&quot;v4&quot;,&quot;$DATE ($TIME)&quot;,"

produces the following output:

"K","DOW","ABS-TRAIN 6","104146","I-Data Integrator 3.2.4","V4","29/08/2002 (16:39:55)",

The HEADER line is output exactly as specified, with the exception of the macro substitutions. It is not affected by the QUOTECHAR and DELIMITER attributes for a delimited file output.

  • CRITERIA defines the way in which the Master and Detail recordsets are linked. It consists of a string that contains a condition. The special syntax, MASTER.[fieldname], is used to indicate that the value of the specified field in the current MASTER row is to be substituted in the criteria string.

  • SUPPRESS-DETAIL-FIELDS specifies a comma delimited list of fields in the Detail recordset that are not to be output. Usually, the common field is suppressed.

  • <MASTER-DETAIL> output impacts only the specified Master recordset and has no effect on whether the Detail recordset is output as normal.

  • The Detail recordset can appear as a Master recordset in another <MASTER-DETAIL> tag if it is required to nest the output to more than one level.

<FIXED>

<FIXED RECORDSET="COMPONENTS" EXTENSION="STB">
<!-- FIELDS contain constant characters or fields - as taken from the -->
<!-- specified recordset -->
<FIELD START="1"   LENGTH="1"    CONTENTS="|" />
<FIELD START="2"   LENGTH="20"   CONTENTS="PIPELINE" />
<FIELD START="22"  LENGTH="1"    CONTENTS="|" />
<FIELD START="23"  LENGTH="20"   CONTENTS="ITEM-CODE" />
<FIELD START="43"  LENGTH="1"    CONTENTS="|" />
<FIELD START="44"  LENGTH="30"   CONTENTS="QTY" />
<FIELD START="75"  LENGTH="1"    CONTENTS="|" />
</FIXED>

The <FIXED> tag specifies the format for a fixed format output file. It contains two attributes.

  • RECORDSET specifies the name of the recordset that is used as the source of the data to be written to the fixed format text file. In the case of fixed text output only, the recordset is only written out if a <FIXED> tag occurs in the configuration file, with the RECORDSET attribute set to the name of the recordset to be output.

  • EXTENSION specifies the file extension. The default is .txt.

    Each <FIXED> tag must contain one or more <FIELD> tags. These tags specify the start position (the START attribute), length (the LENGTH attribute) and contents (the CONTENT attribute) of each column.