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 or data set.
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.7 or later installation

      Example: /local/java/a70/J7.0

      Data set support library
      Add the directory containing the JZOS support library for Java to your CLASSPATH:

      Example: export CLASSPATH=/local/java/a70/J7.0/lib/s390:$CLASSPATH

      IBM MQ Java™ library directory
      Add the IBM MQ Java libraries to the CLASSPATH.

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

      Path to FTM SWIFT Message Management installation directory
      Identify the path to the SDF code.

      Example: /usr/lpp/IBM/ftmswift/v300/run/classes

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

      prompt> umask 033
      prompt> export CLASSPATH=/usr/lpp/mqm/V7R1M0/java/lib/com.ibm.mq.jar:
              /local/java/a70/J7.0/lib/s390:$CLASSPATH
      prompt> /local/java/a70/J7.0/bin/java
              -cp $CLASSPATH:/usr/lpp/IBM/ftmswift/v300/run/classes/dnqcbsdf.jar
              com.ibm.dbq.sdf.DnqcbSdf
              -export my.file
              -queue ABC ... 
      
    • Shell script dnqsdf

      Ensure that the environment variables required for export are enabled and defined. Also check that the correct Java and IBM MQ settings are activated in the script.

  4. Run the export task (either directly using Java on the command line or through a shell script) as needed.