Command Line Usage
In addition to the above MIMB Web Application UI, Windows DOS or Linux shell scripts can also be built using the MIMB command line utility (bin\MIMB.bat on Windows, and bin/MIMB.sh on Linux) which has the following parameters:
$MIMB_HOME/MIMB.sh -?
[{ -? | --? | /? | --help }] Asking for help
[{ -l | --logFile }] <string> log file: stderr by default
[{ -r | --request }] <string> request XML File
[{ -y | --reply }] <string> reply XML File
[{ -i | --import }] <string> import bridge name: CaErwin3Erx, ...
[{ -f | --from }] <string> file or directory to import from
[{ -o | --importOption }]... <string> import bridge option: name=value
[{ -e | --export }] <string> export bridge name: IbmRationalRose98, ...
[{ -t | --to }] <string> file or directory to export to
[{ -p | --exportOption }]... <string> export bridge option: name=value
[{ -c | --consistency }] <int> validation level <Deprecated>: 0, 1 ,2
[{ -v | --validation }] <string> validation level: NONE, BASIC, ADVANCED
[{ -X | --pid }] print process ID in the first output line of STDOUT
[{ -d | --download }] download bridge drivers
[{ -ts | --troubleshooting }] <string> generate a troubleshooting package in the specified directory
There are two ways to invoke MIMB from the command line. The first one is to explicitly provide parameters for the import and export, for example:
SET IMPORT=-i CaErwin9Xml
SET IMPORT=%IMPORT% -o "File=c:\MetaIntegration\data\MIMB\MyErwinModel.xml"
SET IMPORT=%IMPORT% -o "Import UDPs=As metadata, migrate default values"
SET EXPORT=-e MetaIntegrationXml
SET EXPORT=%EXPORT% -p "File=c:\MetaIntegration\data\MIMB\MyErwinModel.xlsx"
call C:\MetaIntegration\bin\MIMB.bat %IMPORT% %EXPORT%
The above method has all the benefits of scripting with parameters but has the disadvantage of fighting with encoding and special characters on the command line script. The alternative is to store all the MIMB import/export parameters within an MIMB request XML file.
These MIMB request XML files can be generated automatically from the MIMB application UI as follows.
First, you need to edit: c:\MetaIntegration\conf\conf.properties
in order to uncomment/set: M_CONVERSATION_DIRECTORY=c:\MetaIntegration\data\MIMB
where the xml files will be generated (make sure the directory exists).
Then, use the MIMB UI to perform the desired import and export.
The MIMB import request should have been saved as a file such as RunMimbExtendedRequest_19_8309388477083505776.xml
which contains:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<RunMimbExtendedRequest commandLineFile="" language="" logLevel="" resetCache="" userIdentity="0-0-0-0-0-0-0-1_localhost" validationLevel="BASIC">
<Import bridgeDisplayName="CaErwin9Xml" bridgeIdentifier="CaErwin9Xml" disableLog="false" userIdentity="">
<BridgeParameter bridgeParameterIdentifier="File" clientSpecifiedText="c:\MetaIntegration\data\MIMB\MyErwinModel.xml">c:\MetaIntegration\data\MIMB\MyErwinModel.xml</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import UDPs" clientSpecifiedText="As metadata, migrate default values">As metadata, migrate default values</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import relationship name" clientSpecifiedText="From relationship name">From relationship name</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import column order from" clientSpecifiedText="Physical order">Physical order</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import owner schemas" clientSpecifiedText="True">True</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import diagrams" clientSpecifiedText="Current view">Current view</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Move entities to subject areas" clientSpecifiedText="False">False</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Miscellaneous" clientSpecifiedText="" />
</Import>
<Export bridgeDisplayName="MIMB Intermediate Step" bridgeIdentifier="MetaIntegrationXml" disableLog="true" userIdentity="">
<BridgeParameter bridgeParameterIdentifier="File" clientSpecifiedText="">C:\MetaIntegration\bin\..\data\temp\tmp7589450715673988911_\mimb4731148277136809612.xml</BridgeParameter>
</Export>
</RunMimbExtendedRequest>
The MIMB export request should have been saved as a file such as RunMimbExtendedRequest_22_2010863314972480997.xml
which contains:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<RunMimbExtendedRequest commandLineFile="" language="" logLevel="6" resetCache="" userIdentity="0-0-0-0-0-0-0-1_localhost" validationLevel="NONE">
<Import bridgeDisplayName="MIMB Intermediate Step" bridgeIdentifier="MetaIntegrationXml" disableLog="true" userIdentity="">
<BridgeParameter bridgeParameterIdentifier="File" clientSpecifiedText="">C:\MetaIntegration\bin\..\data\temp\tmp7589450715673988911_\mimb4731148277136809612.xml</BridgeParameter>
</Import>
<Export bridgeDisplayName="MicrosoftExcel" bridgeIdentifier="MicrosoftExcel" disableLog="false" userIdentity="">
<BridgeParameter bridgeParameterIdentifier="File" clientSpecifiedText="c:\MetaIntegration\data\MIMB\MyErwinModel.xlsx">c:\MetaIntegration\data\MIMB\MyErwinModel.xlsx</BridgeParameter>
</Export>
</RunMimbExtendedRequest>
Then a c:\MetaIntegration\data\MIMB\MyMIMBRequest.xml can be easily created by copying the import section of the first request and the export section of the second request as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<RunMimbExtendedRequest commandLineFile="" language="" logLevel="6" resetCache="" userIdentity="0-0-0-0-0-0-0-1_localhost" validationLevel="NONE">
<Import bridgeDisplayName="CaErwin9Xml" bridgeIdentifier="CaErwin9Xml" disableLog="false" userIdentity="">
<BridgeParameter bridgeParameterIdentifier="File" clientSpecifiedText="c:\MetaIntegration\data\MIMB\MyErwinModel.xml">c:\MetaIntegration\data\MIMB\MyErwinModel.xml</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import UDPs" clientSpecifiedText="As metadata, migrate default values">As metadata, migrate default values</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import relationship name" clientSpecifiedText="From relationship name">From relationship name</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import column order from" clientSpecifiedText="Physical order">Physical order</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import owner schemas" clientSpecifiedText="True">True</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Import diagrams" clientSpecifiedText="Current view">Current view</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Move entities to subject areas" clientSpecifiedText="False">False</BridgeParameter>
<BridgeParameter bridgeParameterIdentifier="Miscellaneous" clientSpecifiedText="" />
</Import>
<Export bridgeDisplayName="MicrosoftExcel" bridgeIdentifier="MicrosoftExcel" disableLog="false" userIdentity="">
<BridgeParameter bridgeParameterIdentifier="File" clientSpecifiedText="c:\MetaIntegration\data\MIMB\MyErwinModel.xlsx">c:\MetaIntegration\data\MIMB\MyErwinModel.xlsx</BridgeParameter>
</Export>
</RunMimbExtendedRequest>
Finally, run:
C:\MetaIntegration\bin\MIMB.bat -r myMIMBRequest.xml -y myMIMBReply.xml