SDF environment variables
When you issue the Sequential
Data Facility command, you can omit parameters by setting SDF environment variables. However,
command parameters override environment variables. If a SDF environment variable is set
and you specify the corresponding command parameter, the value specified by the parameter is
used. Table 1 summarizes which
environment variable corresponds to which command parameter.
| Environment variable | Command parameter |
|---|---|
| DNQ_CB_ALC | -alloc |
| DNQ_CB_AN | -appl |
| DNQ_CB_CMX | -commit_cnt |
| DNQ_CB_CQN | -cntrl |
| DNQ_CB_IN | -instance |
| DNQ_CB_MQC | -channel |
| DNQ_CB_MQH | -host |
| DNQ_CB_MQI | -queue |
| DNQ_CB_MQM | -qmgr |
| DNQ_CB_MQP | -port |
| DNQ_CB_MSD | -msd |
| DNQ_CB_OU | -ou |
| DNQ_CB_PRI | -priority |
| DNQ_CB_QMI | -tqmgr |
| DNQ_CB_QMR | -rqmgr |
| DNQ_CB_REP | -replace |
| DNQ_CB_RTQ | -reply |
| DNQ_CB_SDI | -import |
| DNQ_CB_SDO | -export |
| DNQ_CB_UN | -user |
| DNQ_CB_VAL | -valid |
- DNQ_CB_IN
- This variable specifies the name of the FTM SWIFT instance that contains the OU on behalf of which the messages are to be processed.
- DNQ_CB_OU
- This variable specifies one of the following values:
- For an import task, 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.
- For an export task, the name of the organizational unit (OU) which is stored in the ComIbmDni.OU field of the MQRFH2 header of each of the messages that are to be exported from the source queue. If the source queue contains one or more messages that specifies a different OU, those messages will not be exported.
- DNQ_CB_MQM
- This variable specifies the name of the primary queue manager:
- For the import task, this is the queue manager of the control queue.
- For the export task, this is the queue manager of the control and source queue.
- DNQ_CB_MQC
- Channel name.
- DNQ_CB_MQH
- Host name.
- DNQ_CB_MQP
- TCP/IP port number.
- DNQ_CB_MQC
- This variable specifies the name of the channel to a primary queue manager that is connected by means of an MQ Client. However, in a z/OS® environment, such a connection is not allowed, so do not specify this parameter.
- DNQ_CB_MQH
- This variable specifies the host name of the remote IBM® MQ server on which the primary queue manager runs. If a channel is specified, this parameter is mandatory; otherwise, this parameter is ignored.
- DNQ_CB_MQP
- This variable specifies the TCP/IP port number of the remote IBM MQ server on which the primary queue manager runs. If a channel is specified, this parameter is mandatory; otherwise, this parameter is ignored. The default is 1414.
- DNQ_CB_CQN
- This variable specifies the name of the control queue. This queue must be available when the import or export task is started.
- DNQ_CB_CMX
- This variable specifies the maximum size, in number of messages, of an 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 default is 1000.
- DNQ_CB_SDI
- The input source for an import task, which can
be:
- The name, either fully qualified or relative to the current directory, of a file in the file-system. This file must be encoded using the IBM-850 (ASCII) character set. Use the -charset option to define a different encoding.
- A data set name. The data must be encoded in IBM-1047 character set, unless the -charset
option is used to explicitly define the encoding. A name can be:
- The fully qualified name of a data set, for example
//'DSNAME'. Note that, depending on the shell and the way SDF is started, it might be necessary to escape the single quotes. The simplest approach is to place the entire name within double quotation marks ("). Alternatively, these characters can be escaped by preceding each with a backslash (\). For example: (//\'DSNAME\'). - The relative qualified name of a data set, for example
//DSNAME. - The fully qualified name of a PDS member, for example
PDS(MEMBER). The member name must have at least 2 and no more than 8 characters.
- The fully qualified name of a data set, for example
- DNQ_CB_QMI
- For an import task, this variable specifies 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 default is the primary queue manager.
- DNQ_CB_MQI
- For an import task, this variable specifies the name of the target queue. For an export task, the variable specifies the name of the source queue from which messages are exported.
- DNQ_CB_QMR
- For an import task, this variable specifies the queue manager for the reply-to queue specified by the DNQ_CB_RTQ variable. The default is the primary queue manager, which is set by the environment variable DNQ_CB_MQM.
- DNQ_CB_RTQ
- This variable specifies the name of the reply-to queue for each imported message.
- DNQ_CB_MSD
- For an import task, this variable specifies the value that is to be placed in the Msd field of the mcd folder of the MQRFH2 header of each imported message. The default is to create no mcd folder.
- DNQ_CB_AN
- For an import task, this variable specifies the value that will be set as ComIbmDni.Dnf.FIN.ApplicationInformation.Application value in the MQRFH2 header of each of the FTM SWIFT messages that it creates when importing FIN messages to the target queue. For more information about this field, see Outbound (to the SIPN) FIN message structure.
- DNQ_CB_UN
- For an import task, this variable specifies the value that will be set as ComIbmDni.Dnf.FIN.ApplicationInformation.User value in the MQRFH2 header of each of the FTM SWIFT messages that it creates when importing FIN messages to the target queue. For more information about this field, see Outbound (to the SIPN) FIN message structure.
- DNQ_CB_VAL
- For an import task, this variable specifies how the ComIbmDni.Dnf.FIN.MessageValid field
of the MQRFH2 header of each of the FTM SWIFT messages will be set:
- When DNQ_CB_VAL=1, the value of the MessageValid field is set to Yes. This flags each message as being valid, which suppresses any subsequent message validation steps.
- When DNQ_CB_VAL is set to anything other than 1, the value of the MessageValid field is set to No. This is the default.
- DNQ_CB_PRI
- For an import task, this variable specifies 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 default is 5.
- DNQ_CB_SDO
- The target output for an export task, which can
be:
- The name, either fully qualified or relative to the current directory, of a file in the file-system. This file will be encoded using the IBM-850 (ASCII) character set, unless the -charset option is used to define a different encoding.
- A data set name. The data will be encoded in IBM-1047 character set, unless the -charset
option is used to explicitly define the encoding. A name can be:
- The fully qualified name of a data set, for example
//'DSNAME'. Note that, depending on the shell and the way SDF is started, it might be necessary to escape the single quotes. The simplest approach is to place the entire name within double quotation marks ("). Alternatively, these characters can be escaped by preceding each with a backslash (\). For example: (//\'DSNAME\'). - The relative qualified name of a data set, for example
//DSNAME. - The fully qualified name of a PDS member, for example
PDS(MEMBER). The member name must have at least 2 and no more than 8 characters.
- The fully qualified name of a data set, for example
- DNQ_CB_ALC
- This variable applies only if the output stream of an export task is a physical sequential (PS) data set; it is ignored for all other types of output files. For an export task, this variable specifies an allocation command for the output data set. For more information, refer to Allocating data sets dynamically.
- DNQ_CB_REP
- For an export task, this variable specifies whether the output file is to be overwritten if it
exists, that is, whether the original contents of the existing output file are to be deleted and
replaced by the output data:
- When DNQ_CB_REP=1, the output file is to be overwritten if it already exists.
- When DNQ_CB_REP is set to anything other than 1, the output file is not overwritten if it exists. This is the default.
The following example shows an excerpt of a shell script which defines some environment
variables and then calls the SDF for an import task. The file name and target queue are specified
using command line
parameters:
...
#-----------------------------------------------------------------------------
# Set environment variables, then call the Sequential Data Facility
#-----------------------------------------------------------------------------
export DNQ_CB_IN=INST1 # instance
export DNQ_CB_OU=BANK_A # organizational unit
export DNQ_CB_MQM=QM_ABC # primary queue manager
export DNQ_CB_CQN=CQ # SDF control queue
export DNQ_CB_RTQ=ABC.REPL # reply-to queue
java com.ibm.dnq.sdf.DnqcbSdf -import file.rje -queue INST1.BANK_A.SDFIN