Extending the sample
This scenario explains how to add TLOG extensions in the message sets for ACE, GSA and SA applications.
You might also find this useful if you want to modify the message sets and POSLog XSLTs according to your
requirements. This scenario explains how to define a custom transaction record in the TLOG message sets.
In this scenario, a custom transaction record named 11_GG will be defined in the TLOG ACE, GSA and SA message
sets according to the specification below:
<TransactionRecord Name="11_GG" Description="Custom Transaction Record">
<TLogField><Name>StringType</Name><Type>PD</Type><Length>1</Length></TLogField>
<TLogField><Name>SubStringType</Name><Type>Pack</Type><Length>1</Length></TLogField>
<TLogField><Name>CustomField1</Name><Type>PD</Type><Length>4</Length></TLogField>
<TLogField><Name>CustomField2</Name><Type>PD</Type><Length>4</Length></TLogField>
<TLogField><Name>CustomField3</Name><Type>PD</Type><Length>4</Length></TLogField>
<TLogField><Name>CustomField4</Name><Type>ASCII</Type><Length>4</Length></TLogField>
</TransactionRecord>
** PD - Packed Decimal
- The first section shows how the custom transaction records can be added in the TLOG ACE message set.
- The second section shows how the custom transaction records can be added in the TLOG GSA and SA message sets.
- The third section shows how the fields can be added in a transaction record according to the specification.
- The fourth section shows how the messages for the new extensions are transformed to POSLog.
Defining the transaction records in the TLOG ACE message set
To define the custom transaction records in the TLOG ACE message set, do the following:
- Select 'Elements and Attributes' in ETTP_TLOG_messages_custom_ACE.mxsd.
- Right click 'Elements and Attributes' and select 'Add Global Element'. A new global element named
'globalElement' is created.
- Rename the global element to '11_GG'.
- Set the type of 'globalElement' to 'Complex Type' and Composition to ''.
- Set the logical and physical properties of the global element:
- Select the {Local complexType} under the the globalElement 11_GG.
- Go to Properties page.
- Set LogicalProperties->ComplexType->LocalGroup->Composition to 'sequence'.
- Set PhysicalProperties->TLOGRAW->ComplexType->FieldIdentification->DataElementSeparation to
'All Elements Delimited'.
- Set PhysicalProperties->TLOGRAW->ComplexType->FieldIdentification-Delimiter to ":".
- Set PhysicalProperties->TLOGRAW->ComplexType->FieldIdentification-Suppress Absent Element Delimiters
to 'Never'.
- Define the fields in the transaction record (as described in the section below) according to the
specification.
- Add the element reference to the transaction record 11_GG in the group custom11:
- Select the group custom11 and right click.
- Click 'Add Element Reference'.
- Select transaction record '11_GG' to be added.
If IBM ships an updated TLOG ACE message set in the future, you do not have to redefine your custom transaction
records. Take a copy of the ETTP_TLOG_messages_custom_ACE.mxsd and drop it into the message set folder of the
updated TLOG ACE message set.
Defining the transaction records in the TLOG GSA and SA message sets
To define the custom transaction records in the TLOG GSA and SA message sets, do the following:
- Add a global element to ETTP_TLOG_messages_IBM_<GSA|SA>.mxsd.
- Select 'Elements and Attributes' in ETTP_TLOG_messages_custom.mxsd.
- Right click 'Elements and Attributes' and select 'Add Global Element'. A new global element
named 'globalElement' is created.
- Rename the global element to '11_GG'.
- Set the type of 'globalElement' to 'Complex Type' and Composition to ''.
- Set the logical and physical properties of the global element:
- Select the {Local complexType} under the the globalElement 11_GG.
- Go to Properties page.
- Set LogicalProperties->ComplexType->LocalGroup->Composition to 'sequence'.
- Set PhysicalProperties->TLOGRAW->ComplexType->FieldIdentification->DataElementSeparation to
'All Elements Delimited'.
- Set PhysicalProperties->TLOGRAW->ComplexType->FieldIdentification-Delimiter to ":".
- Set PhysicalProperties->TLOGRAW->ComplexType->FieldIdentification-Suppress Absent Element Delimiters
to 'Never'.
- Define the fields in the transaction record (as described in the next section below) according to the
specification.
- Add the element reference to the transaction record 11_GG at the appropriate place in
ETTP_TLOG_messages_IBM_<GSA|SA>.mxsd.
Defining fields in the transaction record
To define the fields in the transaction record in the TLOG ACE, GSA and SA message sets, do the following:
- Select the transaction record (11_GG in this case) under 'Elements and Attributes' in
ETTP_TLOG_messages_custom.mxsd.
- Right click the transaction record 11_GG.
- Click 'Add Local Element'. A new local element named 'localElement' is created.
- Rename the local element and set it to 'CustomField1'.
- Set the properties of the local element 'CustomField1':
- Select the local element 'CustomField1'.
- Go to Properties page.
- Set LogicalProperties->Local Element->Type to 'decimal'.
- Set LogicalProperties->Local Element->MinOccurs to 0, if the field is optional.
- Set LogicalProperties->Local Element->MaxOccurs to -1, if the field can be repeated infinite number
of times.
- Set PhysicalProperties->TLOGRAW->Local Element->PhysicalType to 'TLOG Specific'.
- Set PhysicalProperties->TLOGRAW->Local Element->Length to '4'.
- Repeat steps 2 - 5 to define the remaining fields CustomField2, CustomField3, CustomField4 of the
transaction record 11_GG.
Modifying POSLog XSLTs
A set of XSLTs are used by the TLOG sample to transform ACE, GSA and SA messages to POSLog. These XSLTs
can be found at either '<Toolkit Workspace>\ETTP_EXAMPLE\XSLT\POSLogV2.1'or
'<Toolkit Workspace>\ETTP_EXAMPLE_V1\XSLT\POSLogV1.0'. The newly defined transaction-records/fields
will not be transformed to POSLog unless these XSLTs are modified to process the new transaction-records/fields.
You can write your own transformation rules to map the fields from ACE, GSA and SA messages to the
corresponding POSLog.
Back to sample home