vspacer
 
vspacer
 

Kintana Script : Command Scripts

 

Purpose

The basic script in this file is a swiss-army-knife that can be re-configured for many queries.

Used to list all command scripts in use by enabled objects it can be used to get your scripts out of Kintana into a flat file that makes it possible for you to:


*Search your scripts by keyword e.g.: for objects using particular variables
*Review your scripts en-mass for consistency with standards. You can edit the scripts in an external editor, then re-import them to Kintana
*Archive 'snaphots' of your script stock into your version control system so you can compare a current Kintana script with a previous version

The listing can be copied to a flat file or excel spreadsheet.

Tested

With HP PPM (Project and Portfolio Management) Kintana v6.0.

Usage

Paste the following script into SQL Runner

Omit the comment unless you're using a PL-SQL editor.
SQL Runner only supports select statements and you'll get a KNTA-10648 error.

List
-- List Command Scripts
select dot.object_type_name,
       nc.command_seq,
       nc.command_name,
       nc.enabled_flag,
       nc.condition,
       ncs.step_seq,
       ncs.command
from KDLV_OBJECT_TYPES dot,
     KNTA_COMMANDS nc,
     KNTA_COMMAND_STEPS ncs
where dot.enabled_flag = 'Y'
  and dot.object_type_id = nc.parent_id
  and nc.command_id = ncs.command_id
  order by dot.object_type_name, nc.command_seq, ncs.step_seq
Search
-- List some subset of your command code
select dot.object_type_name,
       nc.command_seq,
       nc.command_name,
       --nc.enabled_flag,
       --nc.condition,
       ncs.step_seq,
       ncs.command
from KDLV_OBJECT_TYPES dot,
     KNTA_COMMANDS nc,
     KNTA_COMMAND_STEPS ncs
where dot.enabled_flag = 'Y'
  and dot.object_type_id = nc.parent_id
  and nc.command_id = ncs.command_id
-- Locate command steps with similar names
-- and nc.command_name like '%Check%'
-- Locate command steps which contain a specific directive
-- For example:
-- and ncs.command like '%.env%'  -- steps with environment file loads
-- and ncs.command like '%mv%'    -- Steps with 'mv' commands
-- and ncs.command like 'sc_%'    -- Steps with special command code
-- Locate steps controlled by a specific condition
-- and nc.condition like '%PROD%'
-- Exclude retired objects with curly bracketed names
-- and dot.object_type_name not like '%{%'
order by dot.object_type_name
Output
OBJECT_TYPE_NAME CMD  COMMAND_NAME             STEP  COMMAND
                 SEQ                           SEQ
---------------- ---  ----------------------   ----  --------
C++ Library Set    1  C++ Library Set Object    1   # Updated:
C++ Library Set    1  C++ Library Set Object    2   # 02/05/2005 Dave Goodall
C++ Library Set    1  C++ Library Set Object    3
C++ Library Set    1  C++ Library Set Object    4   # Context:
C++ Library Set    1  C++ Library Set Object    5   # - The C libraries are..

To extract the output, click on the [Open as Text] button.

This opens a text window from which you can copy and paste.

Download

KintanaScripts.zip (79 Kb)

Kintana™, 'Mercury IT Governance™', 'HP PPM (Project and Portfolio Management)™
are trademarks of ChainLink, Mercury Interactive Corporation, and Hewlett Packard Corporation respectively.


   


Back to top | ZDS Home | This article updated November 18, 2008.