IBM Support

How to get IBM DOORS Database directory IDs using the DXL script?

Question & Answer


Question

What is the procedure to create an indented list of the unique identifiers for the IBM Rational DOORS database contents?

Answer

To create an indented list of the unique identifiers for the DOORS database in a text file, run the script below in the DXL editor window.

In the DOORS database explore window:

  1. Click Tools > Edit DXL... to open the DXL editor
  2. Paste the contents of the script below to the DXL input window
  3. Click Run to execute the script:


    // this dxl outputs an indented list of a database hierarchy that includes directory index numbers
    // Leave topfoldername as "/" to print out the whole database hierarchy
    // Change it to some folder name to print out the hierarchy under a specific database location
    string topfoldername = "/"
    // Put your desired output file name here...
    string filename = "c:\\hlist.txt"

    Stream outfile = write(filename)

    void listIndices(Folder parent, int level)
    {
    Item i
    int n
    Folder f
    for i in parent do {
    f = folder(i)
    for (n=0; n<level; n++) outfile << "| "
    outfile << (uniqueID i) " " (name i) ""
    if (!null f) {
    outfile << "/\n"
    listIndices(f,level+1)
    }
    else {
    outfile << "\n"
    }
    }
    }

    if (null outfile) print "Failed to open " filename "\n"
    else listIndices(folder topfoldername, 0)


Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

[{"Product":{"code":"SSKR2T","label":"IBM Engineering Requirements Management DOORS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF027","label":"Solaris"},{"code":"PF016","label":"Linux"},{"code":"PF010","label":"HP-UX"}],"Version":"9.4;9.5;9.5.1;9.6;9.6.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
01 May 2020

UID

swg21404740