Modeling ISO 8583 data by using DFDL
View Details

IBM Knowledge Center

Learn how to model ISO 8583 data by using Data Format Description Language (DFDL).
Back To Gallery

Import projects

Click Import and a shared library is imported into your workspace.

Library ISO8583 contains a set of DFDL schemas that model ISO8583 1987 messages with 'packed' bitmaps.

The ISO8583_1987.xsd schema models the overall ISO 8583 message using a set of re-usable types defined in the ISO8583Types.xsd. The ISO8583Format.xsd schema defines suitable default values for DFDL properties.

Exploring the schemas

The ISO8583 library is shown in the Application Development view of your workspace.

The ISO8583_1987.xsd schema opens in the DFDL editor. If it does not open, double-click the DFDL schema to open it in the editor.

The ISO8583_1987 message is highlighted and models an ISO 8583 message with 'packed' bitmaps. The main editor view shows the logical components of the message such as elements and sequences. You can explore the ISO8583_1987 message structure by expanding the elements.

The physical rendering of each logical component is described by the DFDL properties in the Representation Properties tab. DFDL properties can either be specified locally on the component, or can be inherited from pre-defined sets of DFDL properties. Inherited properties have an icon shown next to them, and hovering over the icon reveals where the property is defined. In this schema, inherited properties are obtained from the ISO8583Format.xsd schema.

The presence or absence of each element in the message is given by a corresponding bit in one of the bitmaps. The DFDL Occurs Count Kind property for each element is set to 'expression', and the DFDL Occurs Count property is a DFDL expression that refers to the corresponding bit in the bitmap. You can see this if you select any of the child elements with a numeric suffix, and scroll down the Representation Properties tab until you reach the 'Occurrences' section. The bitmaps themselves can be viewed by expanding the Bitmaps_Group group reference. The secondary bitmap is itself optional and its presence or absence is given by Bit001.

You will be test parsing example ISO 8583 data using the ISO8583_1987 message. The test parsing takes place entirely within the DFDL editor, so there is no message flow in this tutorial and no Deploy step. Before test parsing, switch to the DFDL Test perspective by clicking Window > Open Perspective and then clicking DFDL Test. (Alternatively, you can use the toolbar icon ).

Tip: If this Tutorial Steps View disappears when you switch perspectives, use the Window > Show View menu option to add it back.

Follow these steps to complete the tutorial

The ISO8583_1987.xsd DFDL schema is open in the DFDL editor. The ISO8583_1987 message should be highlighted in green.

  1. Test parse an example data file:
    1. Click the Test Parse Model button in the DFDL editor toolbar. The Test Parse Model window opens.
    2. In the Message section, select ISO8583_1987.
    3. In the Parser Input section, select Content from a data file then click Browse.
    4. Select the ISO8583_1987_Test_Data_1.txt file from ISO8583_1987 then click OK.
    5. Set the Encoding to ASCII.
    6. Click OK. If asked to confirm switching to the DFDL Test perspective, click Yes.
  2. The results of the test parse are displayed. You should see the message Parsing completed successfully. You can dismiss this message.
  3. You can view the parsed data file in the DFDL Test - Parse view. The results of the parse can be viewed in the DFDL Test - Logical Instance view, as a tree or as XML. You can view a log of the parser actions in the DFDL Test - Trace view.
  4. Test serialize the logical instance that resulted from the parse:
    1. Click the Test Serialize Model button in the DFDL editor toolbar. The Test Serialize Model window opens.
    2. In the Serializer Input section, select Content from a DFDL Test - Logical Instance.
    3. Set the Encoding to ASCII.
    4. Click OK.
  5. The results of the test serialize are displayed. You should see the message Serialization completed successfully. You can dismiss this message.
  6. You can view the serialized data file in the DFDL Test - Serialize view. You can view a log of the serializer actions in the DFDL Test - Trace view.
  7. Repeat steps 1 through 6 for the ISO8583_1987_Test_Data_2.txt example data file. This is an example of message type 0200.
  8. As an alternative to the toolbar buttons, you can also test from the DFDL Test - Parse and DFDL Test - Serialize views, using the Browse button to select a data source and the green play icon to run the DFDL parser or serializer.

The supplied DFDL schemas will parse ISO 8583 1987 messages with 'packed' bitmaps. If you need to parse 1993 messages, or messages with 'unpacked' bitmaps, there are suitable DFDL schemas in the ISO8583 repository of the DFDLSchemas organization on GitHub.

The shared library can be deployed to an integration node for use by message flows.