• Home
  • Services
    • Consultancy
    • Custom Software Solutions
    • Systems Adminsitration
    • SCM
      • Clearcase
      • Multisite
      • Clearquest
      • Release Managment
      • CVS
    • Web Applications
    • Customers
  • Publications
    • Clearcase
      • Triggers
      • Open Source Builds
    • Clearquest
      • Clearquest Daemon
      • DB Conversions
    • Systems Admin
      • Unix/Linux
      • Windows
    • Scripting
      • Perl
      • PHP
      • ECRDig
  • About
    • Services
    • Our People
    • Our Philosophy
    • Contact Us
 

ClearSCM Inc.

You are viewing an unstyled version of this page. Either your browser does not support Cascading Style Sheets (CSS) or CSS styling has been disabled.

listsynlists

Lists Dynamic Lists present in the database

1 #!cqperl
2 ################################################################################
3 #
4 # File:         listdynlists
5 # Description:  This script lists the dynamic lists in the database...
6 #
7 # Author:       Andrew@DeFaria.com
8 # Created:      Fri Sep 23 17:27:58 PDT 2005
9 # Language:     Perl
10 #
11 # (c) Copyright 2005, Andrew@DeFaria.com, all rights reserved
12 #
13 ################################################################################
14 use strict;
15 use warnings;
16 use CQPerlExt;
17 use File::Spec;
18
19 our ($me, $separator);
20
21 my ($abs_path, $lib_path);
22
23 BEGIN {
24   # Extract relative path and basename from script name.
25   $0 =~ /(.*)[\/\\](.*)/;
26
27   $abs_path   = (!defined $1) ? "." : File::Spec->rel2abs ($1);
28   $me         = (!defined $2) ? $0  : $2;
29   $me         =~ s/\.pl$//;
30
31   # Remove .pl for Perl scripts that have that extension
32   $me         =~ s/\.pl$//;
33
34   # Define the path separator
35   $separator  = ($^O =~ /MSWin/) ? "\\" : "/";
36
37   # Setup paths
38   $lib_path   = "$abs_path" . $separator . ".." . $separator . "lib";
39
40   # Add the appropriate path to our modules to @INC array.
41   unshift (@INC, "$abs_path");
42   unshift (@INC, "$lib_path");
43 } # BEGIN
44
45 use PQA;
46 use Display;
47
48 my @dynamic_lists = (
49   "Advanced_Feature",
50   "Board_Revision",
51   "HUT",
52   "HUT_Revision",
53   "OS",
54   "OS_Service_Pack",
55   "Other_HUT",
56   "Project",
57   "Reported_By",
58   "Software",
59   "Visibility",
60 );
61
62 my $to_db_connection_name       = "2005.02.00";
63 my $controller                  = StartSession "Cont", $to_db_connection_name;
64
65 foreach (@dynamic_lists) {
66   display "\nDynamic List: $_";
67   my @values = @{$controller->GetListMembers ($_)};
68   my $i = 0;
69
70   foreach (@values) {
71     display "\t" . ++$i . ") $_";
72   } # foreach
73 } # foreach
74
75 EndSession $controller;

Last modified: March 28 2008 @ 8:48 am
Copyright © 2009, ClearSCM Inc. - All rights reserved