Export messages from queues

Note: Before performing any of the tasks described in this section, carry out the procedure described in Configuring the Sequential Data Facility.
Use the Sequential Data Facility (SDF) to export FIN messages from an IBM MQ queue and store the data in a file.
Note: Messages on a queue that cannot be exported by SDF will be skipped during export. This applies, for example, to messages which do not contain any payload.
  1. Ensure that the applications that consume the output data use the formats described in Data formats used by SDF.
  2. Ensure that the message delivery sequence (MsgDeliverySequence) of the source queue is explicitly set to strict FIFO sequence.
  3. Check the pre-requisite options or variables depending on how SDF is carried out:
    • Running on the command line
      File creation mask
      Set the file creation mask for files created through SDF.

      Example: umask 033

      Java home directory
      Locate the home directory of your Java 1.8 or later installation
      IBM MQ Java™ library directory
      Add the IBM MQ Java libraries to the CLASSPATH.

      Example: export CLASSPATH=/usr/mqm/java/lib/com.ibm.mq.jar:$CLASSPATH

      Path to IBM Financial Transaction Manager for SWIFT Services installation directory
      Identify the path to the SDF code.

      Example: /opt/IBM/ftm/swift/v324/run/classes

      The following example shows how the values can be specified when carrying out the SDF.

      prompt> umask 033
      prompt> export CLASSPATH=/usr/mqm/java/lib/com.ibm.mq.jar:$CLASSPATH
      prompt> java
              -cp $CLASSPATH:/opt/IBM/ftm/swift/v324/run/classes/CmdLineOpt.jar:
                             /opt/IBM/ftm/swift/v324/run/classes/dni.xmlsupport.jar:
                             /opt/IBM/ftm/swift/v324/run/classes/dnqcbsdf.jar
              com.ibm.dnq.sdf.DnqcbSdf
              -export my.file
              -queue ABC ... 
      
    • Shell script dnqsdf
      Before issuing the dnqsdf command, you must have run your FTM SWIFT profile, for example:
      . /var/ftm/swift/v324/run/dniprofile
  4. Run the export task (either directly using Java on the command line or through a shell script) as needed.