Setting environment variables for the CLI
Before you can use the CLI, you must set environment
variables that determine:
- Queue managers
- Use the environment variables with names of the form DNI_QM_instance to specify the queue manager that is associated with each instance. For example, if instance INST1 uses the queue manager QM1 and instance INST2 uses the queue manager QM2, set the following environment variables:
export DNI_QM_INST1=QM1 export DNI_QM_INST2=QM2 - Default instance
- To
set the default instance, use the environment variable DNI_I. For
example, to set the instance to INST1, specify:
export DNI_I=INST1 - Default OU
- To
set the default OU, use the environment variable DNI_OU. For example,
to set the OU to BANKA, specify:
export DNI_OU=BANKA - Default service
- To
set the default service addressed when a command is entered, use the
environment variable DNI_S. For example, to set the service to DNI_SECADM,
specify:
export DNI_S=DNI_SECADM - Default code page for command-file mode
- To set the default code page that the CLI uses for data conversion
in a command-file mode, use the environment variable DNI_CPCF. For
example, to set the code page to IBM-273, specify:
export DNI_CPCF=IBM-273Note: Command files delivered with FTM SWIFT usually require code page IBM-1047. - Timeout interval
- The
default timeout interval (in milliseconds per command) that the CLI
waits for a response before it issues an error message is 20000 milliseconds
(20 seconds). To set a different timeout interval, use the environment
variable DNI_TO. For example, to set the timeout interval to 1 second
specify:
export DNI_TO=1000 - Date and time formatting
- The CLI
displays event timestamp information according to the dates and times stored in the product, usually
stored as Universal Time Code (UTC) values. For display of event timestamps, the formatting of these
dates and times can be adjusted using the environment variable DNI_FMT, which allows three different
modes:
Example 1: To switch off date and time formatting, specifyValue Description ON The UTC timestamp is displayed in local format, for example MM/DD/YY h:mm:ss AM/PM. This is the default. OFF The timestamp is displayed as UTC value using the format YYYY-MM-DD hh:mm:ss. LOCAL The UTC timestamp is converted to the local timezone and then displayed in local format. export DNI_FMT=OFFwhich formats the output like the following:
Example 2: To format UTC event timestamps using local format (here: en_US), specify... DNFF4004I 2021-05-01 21:01:44 OU1 DNF_FSM LT 'PTSADEJJA': Signal SIGINT received by SFD client process.export DNI_FMT=ONwhich formats the output like the following:
Example 3: To format UTC event timestamps converted to local timezone (here: UTC+0200), specify... DNFF4004I 5/1/21 9:01:44 PM OU1 DNF_FSM LT 'PTSADEJJA': Signal SIGINT received by SFD client process.export DNI_FMT=LOCALwhich formats the output like the following:... DNFF4004I 5/1/21 11:01:44 PM OU1 DNF_FSM LT 'PTSADEJJA': Signal SIGINT received by SFD client process. - Language environment
-
To set your language and region codes, use the LANG environment variables. See Languages and regions for a list of all supported codes. For example, to set the language code to English and the region code to United States, specify:
export LANG=en_USThe language environment of a CLI environment is independent of the language environment used by FTM SWIFT. For example, FTM SWIFT might be installed in an environment that uses the German language and region codes (de_DE), but your CLI language environment might be set to en_CA, allowing you to enter and display the date, time, and numbers in Canadian English format.
During
the customization procedure described in Preparing a user profile for each runtime system on which a broker runs, the following profile, which sets the CLI
environment variables, was generated:
/var/ftmswift_v324/run/dniprofile To
create and use your own, customized copy of this profile: