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

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:

  1. Select 'Elements and Attributes' in ETTP_TLOG_messages_custom_ACE.mxsd.
  2. Right click 'Elements and Attributes' and select 'Add Global Element'. A new global element named 'globalElement' is created.
  3. Rename the global element to '11_GG'.
  4. Set the type of 'globalElement' to 'Complex Type' and Composition to ''.
  5. Set the logical and physical properties of the global element:
  6. Define the fields in the transaction record (as described in the section below) according to the specification.
  7. Add the element reference to the transaction record 11_GG in the group custom11:

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:

  1. Add a global element to ETTP_TLOG_messages_IBM_<GSA|SA>.mxsd.
  2. Rename the global element to '11_GG'.
  3. Set the type of 'globalElement' to 'Complex Type' and Composition to ''.
  4. Set the logical and physical properties of the global element:
  5. Define the fields in the transaction record (as described in the next section below) according to the specification.
  6. 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:

  1. Select the transaction record (11_GG in this case) under 'Elements and Attributes' in ETTP_TLOG_messages_custom.mxsd.
  2. Right click the transaction record 11_GG.
  3. Click 'Add Local Element'. A new local element named 'localElement' is created.
  4. Rename the local element and set it to 'CustomField1'.
  5. Set the properties of the local element 'CustomField1':
  6. 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