Sequential Data Facility command

Purpose

The Sequential Data Facility (SDF) supports the import of FIN messages from an input file as well as the export of FIN messages from queues. SDF will generate the required FTM SWIFT ComIbmDni folder information in the MQRFH2 header for messages loaded. Messages exported from a queue will be stored in FIN format only - the ComIbmDni information is not saved.

Use the -template option to import FIN messages as templates in Message Entry and Repair. For information about template import service, refer to Template import service.

Format

Read syntax diagramSkip visual syntax diagram dnqsdf Action Options MQ client Additional
Action
Read syntax diagramSkip visual syntax diagram -help  -? -import filename -export filename -version
Options
Read syntax diagramSkip visual syntax diagram1  -instance -in -i instance  -ou ou  -qmgr primary_qm  -queue target_queue  -cntrl control_queue  -tqmgrtarget_qm  -reply2 replyto_queue  -rqmgrreplyto_qm -applapplication_name -userapplication_user -valid
MQ client
Read syntax diagramSkip visual syntax diagram -channelname -hosthost_name -port1414 -portnumber -ciphersuitename -truststorefilename -fips
Additional
Read syntax diagramSkip visual syntax diagram -commit_cnt1000 -commit_cntnumber -new -priority5 -prioritynumber -msdvalue -v1 -v0 -v2 -v3 -v4 -replace -repl -keep -templatequeue;desc;desc;LTmap -formatfmt -charsetname -defsetmsgset
Notes:
  • 1 Options can also be set using environment variables. In this case, mandatory options will become optional.
  • 2 The -reply option is mandatory only for import tasks.

Parameters

-import filename

The parameter specifies the name, either fully qualified or relative to the current directory, of a file in the file-system used for import. This file must be encoded using the IBM-850 (ASCII) character set. Use the -charset option to define a different encoding.

The value can also be set by the environment variable DNQ_CB_SDI.

-export filename

The parameter specifies the name, either fully qualified or relative to the current directory, of a file in the file-system into which the SWIFT FIN messages are to be placed. This file must be encoded using the IBM-850 (ASCII) character set. Use the -charset option to define a different encoding.

The value can also be set by the environment variable DNQ_CB_SDO.

-help or -?
Display a short overview of the command options.
-version
Display SDF version and environment information.
-instance instance
The name of the FTM SWIFT instance that contains the OU on behalf of which the messages are to be processed. It is used to determine the names of the queues involved in the processing.

The value can also be set by the environment variable DNQ_CB_IN.

-ou ou
The name of the organizational unit (OU) that will be stored in the ComIbmDni.OU field of the MQRFH2 header of each of the FTM SWIFT messages that it creates when importing FIN messages to the target queue.

The value can also be set by the environment variable DNQ_CB_OU.

-qmgr primary_qm
The name of the primary queue manager. For the import task, this is the queue manager of the control queue. This queue manager can be connected either directly or by means of an MQ Client. If it is connected by means of an MQ Client, the channel name, host name, and port number must also be set, either explicitly or by means of environment variables.

The value can also be set by the environment variable DNQ_CB_MQM.

-cntrl control_queue
The name of the control queue. This queue must be available when the import operation is started.

The value can also be set by the environment variable DNQ_CB_CQN.

-tqmgr target_qm
The name of the queue manager of the target queue. This queue manager and the primary queue manager must both be members of the same IBM® MQ network.

The value can also be set by the environment variable DNQ_CB_QMI. If -tqmgr parameter or DNQ_CB_QMI is not set, the default is the primary queue manager, which is specified by means of the -qmgr parameter or the environment variable DNQ_CB_MQM.

-queue target_queue
The name of the target queue.

The value can also be set by the environment variable DNQ_CB_MQI.

-rqmgr replyto_qm
Specifies the queue manager for the reply-to queue.

The value can also be set by the environment variable DNQ_CB_QMR. If -rqmgr parameter or DNQ_CB_QMR is not set, the default is the primary queue manager, which is specified by means of the -qmgr parameter or the environment variable DNQ_CB_MQM.

-reply replyto_queue
The name of the reply-to queue for each imported message.

The value can also be set by the environment variable DNQ_CB_RTQ.

-commit_cnt number
The maximum size, in number of messages, of an internal unit of work. Each time this threshold is reached, the SDF commits the processed messages as one unit of work. If a task is restarted after a recoverable error, only those messages that were not yet committed must be reprocessed. When the number of expected restart situations is low, a higher commit count results in improved performance. However, in most situations the default is adequate and this parameter does not need to be specified.

The value can also be set by the environment variable DNQ_CB_CMX. The default value is 1000.

-new
Normally, before an import task runs, the SDF checks whether a control message indicates that the task corresponds to a previously interrupted task. If so, it restarts the task from the checkpoint specified in the control message. The -new parameter forces the SDF to ignore such control information and to start as a new task. This might be necessary when the SDF is unable to synchronize the messages in the input file with the checkpoint specified in the control message.
Note: If messages were already imported from an input file and put into the target queue, and if the import task is then started again as a new task, some messages might be imported a second time.
-keep
By default, the exported messages are deleted from the source queue after they were successfully written to the output file. This parameter specifies that the exported messages are not to be deleted from the source queue.
-replace or -repl
Specifies that the output file is to be overwritten if it exists. That is, the original contents are to be deleted and replaced by the output data.

The value can also be set by the environment variable DNQ_CB_REP.

-appl application_name
The name that the SDF is to specify in the ComIbmDni.Dnf.FIN.ApplicationInformation.Application field of the MQRFH2 header of each of the FTM SWIFT messages that it creates when importing FIN messages to the target queue.

The value can also be set by the environment variable DNQ_CB_AN.

-user application_user
The name that the SDF is to specify in the ComIbmDni.Dnf.FIN.ApplicationInformation.User field of the MQRFH2 header of each of the FTM SWIFT messages that it creates when importing FIN messages to the target queue.

The value can also be set by the environment variable DNQ_CB_UN.

-valid
This parameter causes the SDF to set the value of the ComIbmDni.Dnf.FIN.MessageValid field of the MQRFH2 header to Yes for each of the FTM SWIFT messages that it creates when importing FIN messages to the target queue. This flags each message as being valid, and suppresses any subsequent message validation steps.

The value can also be set by the environment variable DNQ_CB_VAL.

-channel name
Whether the primary queue manager is connected directly or by means of an MQ Client and, if by means of an MQ Client, the name of the channel to that queue manager:
  • If a channel is not specified, the SDF connects to the primary queue manager directly. The host name and port number are ignored.
  • If a channel is specified, the SDF connects to the primary queue manager by means of an MQ Client. A host name and port number must also be specified.

The value can also be set by the environment variable DNQ_CB_MQC.

-host host_name
The host name of the remote IBM MQ server on which the queue manager runs. If a channel name is specified, this parameter is mandatory; otherwise, this parameter is ignored.

The value can also be set by the environment variable DNQ_CB_MQH.

-port number
The port number of the remote IBM MQ server on which the queue manager runs. If a channel name is specified, this parameter is mandatory; otherwise, this parameter is ignored.

The value can also be set by the environment variable DNQ_CB_MQP. The default value is 1414.

-ciphersuite name
The name of the SSL cipher suite to be used in client connections to the IBM MQ server on which the queue manager runs. Use the name of the SSL cipher suite that matches the SSL definition for the channel name used. Refer to the IBM MQ documentation, SSL CipherSpecs and CipherSuites in MQ classes for Java, for more information on cipher suite naming.
-truststore filename
The file name of a trust store which contains the certificate information of the IBM MQ queue manager. Refer to the IBM MQ documentation, Configuring SSL security, for details on how to set up SSL/TLS connections and certificate information.
-fips
Use the -fips parameter to enable Federal Information Processing Standards (FIPS) conforming SSL/TLS operations.
-priority number
The priority assigned to each of the FTM SWIFT messages that the SDF creates when importing FIN messages to the target queue. The value can be a number from 0 (low priority) to 9 (high priority).

The value can also be set by the environment variable DNQ_CB_PRI. The default value is 5.

-msd value
By default, an import task does not create an mcd folder in the MQRFH2 of an imported message. When the -msd parameter is specified, the import task adds the following folder to the MQRFH2:
<mcd><Msd>value</Msd></mcd>
where value represents the value specified for the -msd parameter.

The value can also be set by the environment variable DNQ_CB_MSD. The default is to create no mcd folder.

-vx
The level of detail of the processing information that the SDF prints to the standard output device (stdout):
-v0 or -v1
A few lines that indicate whether the SDF operation completed successfully and, if not, the nature of the error.
-v2 or greater
Similar information as -v0 or -v1, but with additional processing information.
-format fmt
The format parameter explicitly defines the format for input or export files that the SDF should recognize. The following formats are supported for files.
Value
Description
RJE
In an RJE stream, FIN messages are encoded in ASCII and separated by a dollar ($) character.
CRLF
Individual FIN messages are delimited using CRLF sequences.
SDI
MERVA SDI format (import). Supported for IMPORT only.
SDO
MERVA SDO format (export). Supported for EXPORT only.
If no explicit format is given (option -format not used), SDF will try to detect the format to be used based on some known data characteristics. SDF will accept either the '$' (dollar) character or a CRLF sequence as record delimiter for import files. For export files, SDF will use RJE format if no -format option is used.
-charset name
The name specifies the character set name that should be used for input or output data encoding. If the option is not specified, SDF will assume the following character sets depending on the input format:
Format Character set name
File UTF-8
File (first byte in file is 0xC0) IBM1047_LF
-defset msgset
The FTM SWIFT message definition set name which is set in the FTM SWIFT ComIbmDni folder of the MQRFH2 header for messages loaded. The definition set name will not be set unless -defset is defined.
-template queue or
-template queue;description or
-template queue;description;LTmap
The -template option can be used to create the required template import control information for FIN messages to be imported as templates. The target MER template queue name will be set to queue. The optional description settings can be used to define which text should be generated for the imported template. The description allows the following substitution definitions:
Substitution definition Description
%t Message type
%[0][l]d Running number within job. The optional settings add information about the formatting of the number:
  • [0]=padding with zero (0)
  • [l]=length
%s SWIFT reference SW20 field (or field 20C)
If no description is given, the running number of the job will be used as description text. Definitions can also be combined as shown in the examples below. The examples assume a FIN message type FIN199, the value 187 as record position within the input file and the string TRN as SW20 field value. The template queue name is MyTempl:
Option used                      Template description
-template MyTempl;ABC        ->  ABC
-template MyTempl;%t         ->  FIN199
-template MyTempl;%d         ->  187
-template MyTempl;%05d       ->  00187
-template MyTempl;%s         ->  TRN
-template MyTempl;ABC_%s:%d  ->  ABC_TRN:187

The LTmap value is used to overwrite FIN sender address information within the templates before storing the message in the queue. By defining the LTmap value, the same templates can be loaded with different sender address information. The LTmap is a BIC12 value.

For a list of return codes, refer to SDF return codes.

Examples

  1. Export messages from queue ASC.SDF.TEST to the file SDF.FILE:
    dnqsdf -export sdf.file -queue ASC.SDF.TEST 
    -qmgr Q467 -instance INST1 -reply sdf.reply
    -OU OU1

    After the task is finished, messages similar to this will be displayed:

    IBM Financial Transaction Manager for SWIFT Services - Version 3.0
    Sequential Data Facility (SDF)
    (C) Copyright IBM Corporation. 2017
    
    DNQB2009I SDF message export starts at 2017-02-17 11:20:42
              Input from: 'Q467(asc.sdf.test)'
              Output to.: 'sdf.file', OU: 'OU1'
    DNQB0009I SDF EXPORT task 2017-02-17 11:20:42 completed successfully
    DNQB2010I 482 messages exported
  2. Load templates into the input queue of the template import service:
    dnqsdf -import file.rje -queue INST1.OU3.DNQ_K_TPLFIN
    -template FIN1Create;%s;IBMCDEFFCXXX -v2 -qmgr QB6 -instance INST1
    -OU OU3
  3. Load a file using an IBM MQ channel connection:
    dnqsdf -import file.rje -queue INST1.OU5.DNQ_K_TPLFIN
    -channel SYSTEM.DEF.SVRCONN  -port 1433 -host aix.ibm.com 
    -v2 -qmgr QB6 -instance INST1
    -OU OU5
The SDF issues event messages to the event log of the OU, for example:
DNQB0001I SDF IMPORT rje_sample.txt to Q3C(SDF.INPUT.QUEUE) starts at 2017-05-25 14:03:54
DNQB0009I SDF IMPORT task 2017-05-25 14:03:54 completed successfully
If any a problem occurred, SDF will try to issue an event with the returncode as long as event messages can be created:
DNQB0008E SDF IMPORT task 2017-05-25 14:03:54 failed, RC 4