KeyQueueOperation

The sample process uses the WriteQueue and ReadQueue activities to send and receive data from an IBM i keyed data queue.

Configuring the Activities to Read and Write Messages
  1. Add the Timer, WriteQueue, CallProgram, ReadQueue, Log, and WriteFile activities.
  2. Provide the IBMi Connection, Data Queue name for the WriteQueue activity.
  3. Click Verify Queue to retrieve the data queue description. The description indicates that the data queue is a keyed data queue and gives the length of the key and data.

  4. On the Advanced tab of the WriteQueue activity, add the Schema details for the input message of the data queue.

  5. On the Input tab of the WriteQueue activity, populate the key value along with the other input fields. Since the data queue is defined with a key length of 5, the value entered is 11111.

  6. For the ReadQueue activity, provide the IBMi Connection and Data Queue name. Click Verify Queue to retrieve the queue description, which should match the description seen previously. Again, since this queue has a key length of 5, the key value is specified as 11111.

  7. On the Advanced tab of the ReadQueue activity, add the Schema details for the input message of the data queue.

  8. On the Input tab of the Log activity, construct a message to be logged based on the output of the ReadQueue activity.

  9. On the Input tab of the WriteFile activity, construct a message to be written to a file based on the output of the ReadQueue activity.

Expected Results

After running or debugging the KeyQueueOperation process, the AS400KPUB data queue receives input from WriteQueue activity and the ReadQueue activity reads messages from same data queue with key value 11111.