Command iso8583.initmessage

The command iso8583.initmessage is used to start mounting an ISO8583 message.


  1. format [string]
    Format of the message to be mounted, which can be ASCII or BCD.
  2. id [string]
    Message identifier (4 digits), for example: 0800, 0200, 0400.
  3. variablemessage [string]
    Variable that stores the message being mounted.
  4. variablereturn [integer]
    Result of the operation, where:
    • 0: message successfully started
    • -801: invalid parameter
    • -803: buffer overrun


In the example above, the function initISO8583Message was created in order to perform the following steps:

1. Start mounting the ISO8583 message.

2. Insert the value in the fields of each corresponding bit, according to the specification on the bitmap.

3. Finish the ISO8583 message.

This procedure must be performed after validating the file bitmap.dat and after initializing the field table through the command iso8583.initfieldtable.

To better illustrate the process of building an ISO8583 message using the POSXML language, the bits BIT41 and BIT64 were included, and they are going to be added to the message through the command iso8583.putfield after starting the ISO8583 message through the command iso8583.initmessage.

If no error occurs during the message initialization or while adding fields, the message is finished through the command iso8583.endmessage.

If no error occurs while starting up the message or while inserting the fields, the message is finished using the command iso8583.endmessage