1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
8 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9 <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
12 <title>Status for Andrew DeFaria: ecrdesc</title>
14 <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15 <link rel="prev" href="http://defaria.com/blogs/Status/archives/000272.html" title="Files4ecr" />
16 <link rel="next" href="http://defaria.com/blogs/Status/archives/000274.html" title="TOT Build succeeds" />
22 <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
26 <div id="container-inner" class="pkg">
29 <div id="banner-inner" class="pkg">
30 <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31 <h2 id="banner-description">Searchable status reports and work log</h2>
36 <div id="pagebody-inner" class="pkg">
38 <div id="alpha-inner" class="pkg">
40 <p class="content-nav">
41 <a href="http://defaria.com/blogs/Status/archives/000272.html">« Files4ecr</a> |
42 <a href="http://defaria.com/blogs/Status/">Main</a>
43 | <a href="http://defaria.com/blogs/Status/archives/000274.html">TOT Build succeeds »</a>
47 <div class="entry" id="entry-273">
48 <h3 class="entry-header">ecrdesc</h3>
49 <div class="entry-content">
50 <div class="entry-body">
51 <p>Well I played around with this a little more and came up with a Perl script that will dump ECR descriptions fairly easy. From what I understand that's mostly what we want access to from a Linux box (though I could envision wanting other things perhaps in the future). The problem as I see it is that this script will only run on lynx12. It should be runnable from any machine really however you would need to install the DBD module for Informix for Perl access. Unfortunately this requires at least an Informix Client SDK and that's not free! :-(</p>
53 <div id="more" class="entry-more">
54 <p>Here's the simple script (currently at lynx12:/tmp/ecrdesc.pl):</p>
56 <div class="code"><pre>
58 ################################################################################
61 # Description: This script will dump out the description for the ECR #(s)
63 # Author: Andrew@DeFaria.com
64 # Created: Fri Jan 7 15:35:13 PST 2005
67 # (c) Copyright 2005, LynxWorks Inc., all rights reserved
69 ################################################################################
76 # Called when a database error has occurred
79 my $statement = shift;
81 print $msg . "\nError #" . $DB->err . " " . $DB->errstr . "\n";
83 if (defined $statement) {
84 print "SQL Statement: $statement\n";
90 # Connect to database. Note this is using anonymous access (read only)
91 $DB = DBI->connect("DBI:Informix:lynxmigr1")
92 or DBError "Unable to open database";
94 # Loop through ECR #s from the command line
95 foreach my $ecr (@ARGV) {
96 print "ECR #: $ecr\n";
98 my $statement = "select description from defect where pkey=\"$ecr\"";
99 my $sth = $DB->prepare ($statement)
100 or DBError "Unable to prepare statement", $statement;
103 or DBError "Unable to execute statement", $statement;
105 # Defect records are unique per pkey (AKA ECR) there for there will
106 # only be one entry in @row. Also the description is returned as one
108 my @row = $sth->fetchrow_array;
111 # @row is empty if there was no ECR by that number
112 print "Nothing found!\n";
115 print "Description:\n" . "-" x 80 . "\n" . $desc . "\n" . "-" x 80 . "\n";
125 <p class="entry-footer">
126 <span class="post-footers">Posted by on January 7, 2005 4:03 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000273.html">Permalink</a>