Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How To Buy
eLink Information Integrator Doc Home | eLink Information Integrator User Guide | Previous Topic | Next Topic | Contents | Index

Additional Information Integrator Tools

This section describes additional command line tools that are available with BEA eLink Information Integrator. The following topics are covered:

- Defining the IIRESET Service

- Converting Data Integration Option Formats to MFL

- Using the sendBuf Utility

- Using the ud32 Utility

- Using the NNFie Utility

- Using APITEST

- Using MSGTEST

- Using the NNRIE Utility

Defining the IIRESET Service

BEA eLink Information Integrator includes a service called IIRESET. This service is used to remove all cached information and reload this information from the database.

The procedures for defining the IIRESET service are the same as defining any other service (see Defining a SERVICE Section for more information). The syntax for defining the IIRESET service in the Information Integrator configuration file is as follows:

Listing A-1 Syntax for the IIRESET service

>     *SERVICE

>       NAME=IIRESET

>       APPL_NAME=DUMMY

>       INPUT_FORMAT=DUMMY

The following parameters must be defined in the SERVICE section for the IIRESET service:

NAME

  IIRESET, to indicate that the IIRESET service is being advertised.

APPLICATION_NAME

  The name of the application associated with this service.

INPUT_FORMAT

  The input format required for this application.

Converting Data Integration Option Formats to MFL

Information Integrator provides a utility called fgf2mfl to convert Data Integration Option FML group formats and meta-type information formats to MFL. This allows you to use these formats with the MsgDefAdmin utility provided with Information Integrator (refer to Using MsgDefAdmin for more information).

The fgf2mfl utility has the following syntax:

fgf2mfl [-f | -m] <filename>

where

-f

  Indicates that <filename> is a FML group format file.

-m

  Indicates that <filename> is a meta-type information format file.

<filename>

  Name of the Data Integration Option file that you want to convert to MFL.

If you invoke fgf2mfl without specifying a flag, fgf2mfl attempts to determine the file type from the filename extension. For example, an extension of .fgf specifies an FML group format, and an extension of .mti specifies a meta type format.

Using the sendBuf Utility

The sendBuf utility allows you to test Information Integrator by sending various typed buffers and displaying the returned value.

To use sendBuf, you create a script file defining the buffer and containing the commands you want to execute using any text editor. To define the buffer, you use the $buffertype parameter. The commands you can specify are as follows:

- $invoke service specifies a service to be executed

- $enqueue sends the buffer to the specified eLink Platform queue

- $post event posts the buffer to the eLink Platform event broker

Listing 7-16 shows a sample script file.

Listing 7-16 Sample sendBuf Script File

>     $buffertype=fml32
>     NAME=Pete
>     AGE=24
>     $invoke service=CalcBirthday
>     $enqueue qspace=QSPACE queue=TESTQ1
>     $post event=LowInventory
>     $buffer type=string value="Now is the time"
>     $invoke service=ProcString
>     $buffer type=carray value="@./myfile.data"
>     $invoke service=ProcCarray

The syntax for the script file is as follows:

>     $buffer type=buffer_type [value=buffer_value]
>     $invoke service=service_name
>     $enqueue qspace=qspace queue=queue_name
>     $post event=event_broker_name

where

buffer_type

  is the buffer type (FML, FML32, STRING, CARRAY)

buffer_value

  is the value to be placed in the buffer. This is only used for STRING and CARRAY buffer types.

service_name

  is the name of the service you want to invoke

qspace

  is the qspace where you want to place the buffer

queue_name

  is the name of the eLink Platform queue where you want to place the buffer

event_broker_name

  is the name of the eLink Platform event broker where you want to post the buffer

  Note: If the buffer type is FML or FML32, you also need to define a name/value pair for the buffer. For example:

  $buffer type=FML
  NAME="John Doe"
  RATE=22.66

To run the sendBuf utility, type the following at a command prompt:

>     sendbuf script_file_name

where

script_file_name

  is the name of the script file you created.

Using the ud32 Utility

ud32 is a client program delivered with the BEA eLink Platform system that reads input consisting of text representation of FML buffers. You can use ud32 for ad hoc queries and updates to the IISERVER. It creates an FML32 buffer, makes a service call with the buffer, receives a reply (also in an FML32 buffer) from the service call, and displays the results on screen or in a file in text format. ud32 builds an FML32-type buffer with the FML fields and values that you represent in text format, makes a service call to the identified service in the buffer, and waits for the reply. The reply then comes back in FML32 format as a report.

For example, suppose you write a small file that contains the following text.

>       service name=.tmib and ta_operation=get, TACLASSES=T_SERVER

When you type this file into ud32, you receive an FML output buffer listing all the data in the system about the servers.

For more information on the ud32 utility, refer to the eLink Platform documentation.

Using the NNFie Utility

NNFie exports format definitions from a database to an export file and imports from the export file into a database. The Unix command for running NNFie is as follows:

>     NNFie

Note: To use NNFie, Unix users must have write permissions to the current directory.

The NT command for running NNFie.exe is as follows:

>     NNFie.exe

The export file for NNFie is not interchangeable with the files created by the GUI. NNFie, NNRie, and sqlsvses.cfg must be in the same directory as NNFie.

Warning: Do not name components the same with only a change in case to identify them. For example, do not name one format "f1" and another format "F1". You must make each item unique using something other than case differences.

Note: File names (including absolute paths) for both import and export must be no longer than 255 characters.

Listing 7-17 shows the syntax for the NNFie command

Listing 7-17 Syntax for NNFie

>     NNFie
>      ((-C <command file name>)
>      (-i <import file name> [-T] [ -o|-g|-n|-4]
>      [-s <session name>])

>      (-e <export file name> [-m <format name>+] [-q "comment"]
>      [-Q <Comment file name>] [-w <number>] [-s <session name>])
>      (-t <import file name> [-s <session name>])
>      (-I <import file name> [-s <session name>]))

In the above example:

[ ] represents optional
() represents grouping
| represents XOR
+ represents one or more
<> means replace with user-provided data

You must keep the NNFie options in the correct position. For example, the following command is correct:

>     >nnfie -e myfile -m myformatname -s nnfie

The following command is incorrect because of the position of the options:

>     >nnfie -e my file -s nnfie -m myformatname

Table 7-5 lists the NNFie options and their definitions.

####

Table 7-5 NNFie Options

Name | Mandatory/Optional | Description
--- | --- | ---
-C [<command file>] | Optional | Alternate command file name; default file is NNFie.cmd. If this option is provided, NNFie reads command line options from a file instead of the command line. Note: Command line option -C puts import/export command options in a text file. Do not use quotation marks around names (e.g., format name, session name, etc.) in the text file. Also, do not use back slashes in command lines.
-i [<import file>] | Mandatory for Import | This parameter is required to import data from the named file and is mutually exclusive from -e. The named file default is NNFie.exp. If you use the command line option -i, then the following options are available to you: [-T] [ -o|-g|-n|-4]. These additional options are described below the parameters table.
-e [<export file>] | Mandatory for Export | This parameter is required to export data from the named file and is mutually exclusive from -i. The named file default is NNFie.exp. If you use the command line option -e, then the following options are available to you: -q, -Q, -w, and -m. These additional options are described below the parameters table.
-s [<session name>] | Optional | Name of session in sqlsvses.cfg. Defaults to NNFie.
-I<import file name> | Mandatory | Writes description of all conflicts in import file to NNFie.log.
-t <import file name> | Mandatory | Writes an inventory of the import file to NNFie.log.

NNFie Import Syntax

Listing 7-18 shows the syntax for executing an import command.

Listing 7-18 Syntax for NNFie Import

>     $ NNFie -i [<file name>] [-s <session name>]

NNFie stores error messages in the NNFie.log file. If a component fails to import, the line containing an error from the export file is written to NNFie.err.

Table 7-6 lists the NNFie import options and their definitions.

####

Table 7-6 NNFie Import Options

Import Options | Mandatory/Optional | Description
--- | --- | ---
-T | Optional | Loads import file as one transaction. If an import failure for one component is detected, then the entire import is rolled back. The default behavior is a transaction boundary for each component.
-o | Optional | Overwrites all conflicts and replaces all components of same name with those in the export file.
-g | Optional | Ignores all conflicts and uses existing component definitions.
-n | Optional | Implements the interactive conflict resolution option. NNFie defaults to -n if no options are selected.
-4 | Optional | Use R4_0 conflict resolution if a component in the export file conflicts with current data in the database. Do not import the new component but flag it in the error file and do not import any components that rely on the conflicting component.

NNFie Export Syntax

Listing 7-19 shows the syntax for executing the command to export an entire database.

Listing 7-19 Syntax for NNFie Export (entire database)

>     $ NNFie -e [<export file name>] [-s <session name>]

Listing 7-20 shows the syntax for executing the command to export a single format.

Listing 7-20 Syntax for NNFie Export (single format)

>     $ NNFie -e [<export file name>] [-m <format name>] ] [-s <session name>]

Listing 7-21 shows the syntax for executing the command to export multiple formats.

Listing 7-21 Syntax for NNFie Export (multiple formats)

>     $ NNFie -e [<export file name>] [-m <format name> <format name> ...] ] [-s <session name>]

Table 7-7 lists the NNFie export options and their definitions.

####

Table 7-7 NNFie Export Options

Export Options | Mandatory/Optional | Description
--- | --- | ---
-q | Optional | Adds comments within quotes to top of the export file.
-Q | Optional | Adds contents of <comment file> to top of export file.
-w | Optional | Sets maximum line length in export file. Default value is 80.
-m [<message type>] | Optional | Specifies the message type to export. By default, exports all messages types within the specified application group.

Using APITEST

The apitest executable outputs the structure and contents of a message parsed by the Information Integrator server.

The syntax for apitest is as follows:

Listing 7-22 Syntax for APITEST

>     apitest[-d[<filename>]]

>     -d :parse debug on

The -d [filename] parameter sets debugging mode to parse for this run of apitest. [filename] specifies an optional file where debug information is written. If [filename] is not specified, debug information is written to the screen (STDOUT).

To run apitest:

1. At the command line prompt, type apitest.

2. At the prompt, Enter the input file name:, type the name of the file in this directory that contains the message to be parsed and reformatted.

3. At the prompt, Enter the input format name:, type the name of the input format that will be read from the NNF-FMT table in the database identified in the sqlsvses.cfg file.

Using MSGTEST

The msgtest executable uses input and output formats, delimiters, and other control information read from the database to parse and reformat an input message read from a file. The information needed by msgtest must be placed in the database using the Formatter graphical user interface.

Listing 7-23 Syntax for MSGTEST

>     msgtest[-li][-lo][-if][-nv][-d[<filename>][-dcp]
>     [-dcm][-dco]]

>     -li:		loud input
>     -lo:		loud output
>     -lf:		loud formatted value
>     -nv:		no validation
>     -d:		debug on (debug parse only if  -dcp and -dcm and
>     		-dco not specified)
>     -dcp:		debug parse on
>     -dcm:		debug map on
>     -dco:		debug output on

The -d [filename] parameter sets debugging mode to parse for this run of msgtest. [filename] specifies an optional file where debug information is written. If [filename] is not specified, debug information is written to the screen (STDOUT).

To run msgtest:

1. At the command line prompt, type msgtest.

2. At the prompt, Enter the input file name:, type the name of the file in this directory that contains the message to be parsed and reformatted.

3. At the prompt, Enter the output file name:, type the name of the file that will contain the reformatted message.

4. At the prompt, Enter the input format name:, type the name of the input format that will be read from the NNF-FMT table in the database identified in the sqlsvses.cfg file.

5. At the prompt, Enter the output format name:, type the name of the output format that will be read from the NNF_FMT table in the database identified in $msgtest<myFormatterTest.txt>.

To run msgtest more than once using the same information, create a text file. Listing 7-24 shows an example command line using a msgtest text file.

Listing 7-24 Syntax for calling a MSGTEST text file

>     $ msgtest<myFormatterTest.txt>

The file myFormatterTest.txt contains:

ascii_string

  The input file name containing the message.

output_AS1

  The output file name that will contain the translated message.

AS_IF

  The input format to be read from the database.

AS_NA1_OF

  The output format to be read from the database.

Configuration File

Before running test executables, verify that the sqlsvses.cfg file includes the database name and server name information used to execute this program. This file must also be in the same directory as the executable program.

For test executables, the session name to be entered in the sqlsvses.cfg file is new_format_demo.

Listing 7-25 Syntax for new_format_demo

>     new_format_demo:MyServerName:MyUserName:MyPasswordName:
>     MyDatabaseName

Using the NNRIE Utility

NNRie is a command line tool that you can use to export rule definitions and orphan subscriptions (subscriptions that are not associated with a rule) from a database to a file and to import the exported file into a database. To use NNRie, Unix users must have write permissions to the current directory. Listing A-2 shows the syntax for NNRie.

Listing A-2 Syntax for NNRie

>     NNRie  ((-C [<command file name>] |
>            -V |
>            (-i <import file name>|-e <export file name>
>            [[[-a <appname> [...]] [-m <msgname>] [...]] [-r
>          <rulename>] 	[...]] [-S <subsname>] [...]]
>            [-T [<trace file name>] ]
>            [-l [<conflict report file name>] ]
>            [-t [<inventory report file name>] ]
>            [-f [<failure file name>] ]
>            [-s <session name>]
>            [-o]
>            [-c <database configuration file name>])))

Table A-1 lists NNRie options and their definitions.

####

Table A-1 NNRie Options

Name | Mandatory/Optional | Description
--- | --- | ---
-C [<command file>] | Optional | Alternate command file. The default is NNRie.cmd. If this option is provided, NNRie reads command line options from a file instead of a command line. If -C is present, NNRie expects the other parameters to be in the command file named in the same format as the command line.
-V (version) | Optional | Shows program version information only and does no processing.
-i [<import file>] | Mandatory for Import | Indicates the program should import data from the named file. This parameter is required to import data and is mutually exclusive with -e. This parameter may be followed by the name of a file that contains the import data. The referenced file must have been created with the NNRie -e option. The default file name is NNRie.exp.
-e [<export file>] | Mandatory for Export | Indicates the program should export to the named file. This parameter is required to export data, and is mutually exclusive with -i. This parameter may be followed by the name of a file to hold the export data. The default file name is NNRie.exp.
-s <session name> | Optional | The session name corresponding to the session identifier in the configuration file (See the -c option below). The default session tag is "nnrmie".
-o (overwrite flag) | Optional | The default behavior is off (do not overwrite). If this parameter is present during export, it overwrites the export file. If this parameter is present during import, and a rule or subscription defined in the import file already exists in the importing database, the old rule is overwritten with the new definition if you have update permission. If you do not have update permission, an error is noted and the rule is replaced. If not overwriting rules, any rule that cannot be processed because it already exists in the importing database is noted.
-c <config file> | Optional | Indicates the name of the configuration file the program should read to load its session data for access to a database. The default configuration file is sqlsvses.cfg.
-a <application group> | Optional | Identifies the application group to export. If a value for this parameter is not identified, all application groups are exported. This parameter can be repeated as many times as necessary to define multiple application groups to export.
-m <message type> | Optional | Specifies the message type to export. This parameter also requires the -a parameter to be set. The default behavior is to export all message types within the specified application group. This parameter can be repeated as many times as necessary to define multiple message types within the same application group.
-S <subscription name> | Optional | Specifies the name of the subscription to export. This parameter also requires the -e, -a, and -m parameters to be set. This parameter can be repeated as many times as necessary to export multiple subscriptions.
-r <rule name> | Optional | Specifies the name of the rule to export. This parameter also requires the -a and -m parameters to be set. The default behavior is to export all rules within the specified application group and message type. This parameter can be repeated as many times as necessary to define multiple rules within the same application group and message type.
-t [<inventory filename>] | Optional | Creates an inventory of an export file in NNRie.log (does no processing).
-T [<trace file name>] | Optional | Specifies the name of the trace file. Default trace file is NNRieT.log.
-O | Optional | Completely overwrites imported message types (import only). The default behavior is off (do not overwrite).
-l [<conflict report filename>] | Optional | Reports on any import conflicts. The default behavior is off (does no processing). Default file is NNRie.log.
-g | Optional | Ignore and do not import any conflicting rules and subscriptions.
-n | Optional | Implement interactive conflict resolution. The default behavior is on. MVS default is off.
-q <comments in double quotes> | Optional | Includes comments in an export file.
-Q <comments file name> | Optional | Includes a file of comments in an export file. No default.
-f [<failure file>] | Optional | Specifies the failure file that contains lines not imported. The default file is NNRie.err.

Note: If there are no -a, -m, -r, or -S options, the entire database exports.

NNRie Import Syntax

Listing 7-26 shows the syntax for importing a rule.

Listing 7-26 Syntax for importing a rule

>     $ NNRie -i [<file name>] [-s <session name>]

If the file fails to import, an error message is generated and NNRie errors out.

NNRie Export Syntax

Listing 7-27 shows the syntax for exporting an entire database.

Listing 7-27 Syntax for exporting an entire database

>     $ NNRie -e [<export file name>] [-s <session name>]

Listing 7-28 shows the syntax for exporting a single application group.

Listing 7-28 Syntax for exporting a single application group

>     $ NNRie -e [-a <app group name>]

The application group name exports and then each message type within the application group exports. The message type export includes all subscriptions and rules in the specific application group/message type. This procedure is followed for each application group if multiple application group names are given.

Listing 7-29 shows the syntax for exporting a message type for an application group.

Listing 7-29 Syntax for exporting a message type for an application group

>     $ NNRie -e [-a <app group name>][-m <msgtype name>]

The application group name and message type name exports, then the rules export with the links to subscriptions. All subscriptions in the application group/message type export, whether they are linked to rules or not. If multiple message type names are given, the subscriptions and rules for each message type export.

Listing 7-30 shows the syntax for exporting a single application group.

Listing 7-30 Syntax for exporting a single rule

>     $ NNRie -e [-a <app group name>] [-m <msgtype name>] [-r <rule name>]

The rule's application group name and message type name exports. All subscriptions linked to the rule export with permissions, actions, and options and then the rule information exports with permissions, expressions, and links to subscriptions. If multiple rule names are given, the subscriptions linked to each rule export with no duplicates, and then the rules export.

Listing 7-31 shows the syntax for exporting a single application group.

Listing 7-31 Syntax for exporting more than one rule

>     $ NNRie -e [-a <app group name>][-m <msgtype name>][-r <rule name> <rule name>...]

Listing 7-32 shows the syntax for exporting a single subscription.

Listing 7-32 Syntax for exporting a single subscription

>     $ NNRie -e [-a <app group name>][-m <msgtype name>][-S <subscription name>]

No rule information exports. The application group and message type name information exports and then the subscription information exports without the rule name. If multiple subscriptions are given, each subscription exports.

Command Line Functions

The NNRie command line functions are described below.

To overwrite component by component, enter the following syntax:

>     NNRie -i <filename> -o

To run the batch Ignore/Skip conflict resolution, enter the following:

>     NNRie -i <filename> -g

To run the interactive conflict resolution option, enter the following:

>     NNRie -i <filename> -n

To run the "check only", conflict reporting only option, enter the following:

>     NNRie -i <filename> -l (Writes to NNRie.log)
>     NNRie -i <filename> -l MyCLog.txt (Writes to MyCLog.txt)

To import and totally overwrite the application group message type pair in the database, enter the following syntax:

>     NNRie -i NNRie.exp -O

To trace the command that is about to be executed and save to a log file, enter the following:

>     NNRie -i NNRie.exp -T (Writes to NNRieT.log)
>     NNRie -i NNRie.exp -T trace.log (Writes to trace.log)

To produce an inventory of an export file, enter the following:

>     NNRie -t NNRie.exp (Writes to NNRie.log)
>     NNRie -i NNRie.exp -t inv.log (Writes to inv.log)

To add comments to the header of the Export file, enter the following:

>     NNRie -e <filename> -q "additional comment between quotes"

To add a file of comments to the header of the Export file, enter the following:

>     NNRie -e <filename> -Q <comment file>

To implement the batch Overwrite conflict resolution, enter:

>     NNRie -i <filename> -o

To implement the batch Ignore/Skip conflict resolution, the syntax is:

>     NNRie -i <filename> -g

To implement the interactive conflict resolution option, the syntax is:

>     NNRie -i <filename> -n

To implement the conflict report option, the syntax is:

>     NNRie -i <filename> -l <optional filename>

If no conflict resolution option is chosen, the interactive resolution is used as the default.

The user should be able to replace an entire application group/message type pair by entering the following command:

>     NNRie -i NNRie.exp -O

This command deletes each message type from the database that it encounters in the import file and all the rules and subscriptions under it before importing new information. If it fails to delete because of rights violations or other problems, it returns an error message and does not import the new information.

Copyright © 2000 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.