delete

Purpose

The OAMS Administration Utility delete command is used to delete messages in the outbound application-message store (OAMS). Unless explicitly requested using the -delforce action, the delete command will only delete entries from the outbound application-message store that do not contain a PDE in FIN block 5 or have a status which is not ack.
Required access rights: Users who want to delete OAMS entries require:
  • Membership in user group DNILPP
  • The following database privileges:
    • CONNECT on database
    • SELECT, INSERT, and UPDATE on database table DNF_LTSS
    • SELECT and DELETE on database table DNF_OAMS
    • SELECT on database table DNI_CCTRL if the data integrity framework is active
    To grant these privileges:
    GRANT CONNECT ON DATABASE TO userid;
    GRANT SELECT,INSERT,UPDATE ON schema.DNF_LTSS TO 
          userid;
    GRANT SELECT,DELETE ON schema.DNF_OAMS TO userid;
    GRANT SELECT ON schema.DNI_CCTRL TO userid;
  • The IBM® MQ permissions as described in Granting IBM MQ authorization
Predefined roles that provide required access rights: None

Format

Read syntax diagramSkip visual syntax diagramdnfcaoma -act deldelforce -dname -snschema -ltltname -msgallmsg idstatus -rxnumber
To display command help:
Read syntax diagramSkip visual syntax diagramdnfcaoma -help -h -? -actdeldelforce

Parameters

The parameters for the OAMS Administration Utility can be specified in any order.
-act
The action to be performed. Possible values:
del
Deletes one or more records which satisfy the criteria specified by parameters -lt and -msg and that are allowed to be deleted. Records are only deleted if the following conditions are set:
  • The message body does not contain a PDE trailer in FIN block 5
  • The value in the Status field is not ack.
delforce
Deletes one or more records that satisfy the criteria specified by parameters -lt and -msg. This option overrides the check for PDE and status fields.
-d
Name of the runtime database.
-sn
Schema name of the Db2® tables in the runtime database.
-lt
Logical Terminal (LT) name. The value cannot contain wildcard characters.
-msg
Indicates to which FIN messages the command applies. Possible values:
all
The command applies to all messages that are to be processed by the specified LT. This is the default.
msg id
The command applies only to the message with the specified IBM MQ message ID. This ID must be specified in hexadecimal representation, for example:
-msg c3e2d840d8f2c2404040404040404040bb3833a25973f963
You can display the message ID of messages by specifying the action parameter -act list as described for the list command.
status
The command applies only to messages that have the specified status. Possible values:
ack
Sent and acknowledged.
error
Unable to be processed by the SWIFTNet FIN daemon (SFD).
proc
Currently being sent (in process).
wait
Waiting to be sent.
-rx
Number of records per transaction. The default is 50. For more information, see Transaction processing.
-help (or -h or -?)
Show the help text that describes the parameters.
Notes:
  • All logical terminals that have the same destination as the LT for which you want to delete messages must be closed. The delete request is not processed if any of these LTs is not closed.
  • Parameters -keystore and -passphrase are deprecated. They are still accepted but not evaluated.

Delete command output

A list of the deleted messages is displayed, for example:

 ⋮         
          Status: wait
        LT group: XXXXUSNY_GRP
      Session ID: A
Protocol Version: 3  
      Message ID: c3e2d840d8f2c2404040404040404040bb3833a25973f963
 External Msg ID: -
         Deleted: Yes
          Reason: -
The following fields provide information about the deletion:
Element Description
Deleted Indicates whether a message was deleted.
Reason This field indicates the reason why the message was not deleted. Possible reasons:
  • PDE in FIN block 5
  • Message sent and acknowledged (ACKed)
  • A general database problem
For details about the other fields displayed, see List command output.

Examples

The following command deletes all the messages for LT XXXXUSNYA that have a message body that does not contain a PDE in block 5 and the value in the Status field is not ack:
dnfcaoma -d DNIDBRUN -sn DNI -act del -lt XXXXUSNYA -msg all > file.out
If you specify the parameter -act delforce, no checking is performed and all records in the OAMS are deleted for which both:
  • The message would be sent by the LT specified by parameter -lt
  • The record fulfills the criteria specified by parameter -msg