# S390DSCV.def: Collects Oracle Discoverer Information # $Id: S390DSCV.def,v 1.16 2009/08/08 10:29:05 mschenke Exp $ # ARCS: $Header: /u02/webapps/workbench/cvs/RDA_4/src/scripting/lib/modules/S390DSCV.def,v 1.16 2009/08/08 10:29:05 mschenke Exp $ # # Change History # 20090707 DEM Collect error.txt file. =head1 NAME S390DSCV - Collects Information for Oracle Discoverer =head1 DESCRIPTION This module collects information for Oracle Discoverer. Produced reports are regrouped under C. =cut echo tput('bold'),'Processing Discoverer module ...',tput('off') # Initialization var $ORACLE_HOME = getSetting('ORACLE_HOME') var $MAX = getSetting('DISCO_LOG_MAX',20) var $DISCOVERER_HOME = catDir($ORACLE_HOME,'discoverer') var $MNU = '1:Oracle Discoverer' var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $VER = 'Version:\w+\s+[\d\.]+' # Collect the Oracle Discoverer information if or(getSetting('ASIT_IN_USE'),testDir('d',catDir($ORACLE_HOME,'rcu'))) {# Abort collection when merged if getSetting('ASIT_MERGE',true) {echo "PDA collection performed by the ASIT module" return } # Collect the generic information pretoc $MNU pretoc '1+:Oracle Home' run DSCVinfo(true) unpretoc # Load the common macros var ($CNT,%DUP) = (0) run DSCVr11() # Collect the data for each instance var $hom = catDir(getSetting('ASIT_INSTANCE_HOME','')) var %cmp loop $ins (get_instances($hom,'ASIT_INSTANCES')) {# Get the instance name and the relevant instance components var $dir = catDir($hom,$ins) var $dsc = get_components(\%cmp,$dir,$ins,'^PreferenceServer$') # Skip instances without relevant components next !keys(%cmp) # Treat relevant components debug ' Inside DSCV module, analyzing instance ',$dsc if isTocCreated(true) pretoc '%SPLIT%' else pretoc $MNU pretoc "1+:'",$dsc,"' Instance" call collect_dscv_instance($dsc,$dir,\%cmp) unpretoc 2 } } else {# Collect the generic information pretoc $MNU run DSCVinfo(false) # Load the common macros run library() =head2 Configuration Files Gathers configuration files. =cut debug ' Inside DSCV module, getting configuration file' var $fil = catFile($ORACLE_HOME,'config','ias.properties') var $ver = undef if testFile('f',$fil) {if grepFile($fil,'10\.1') var $ver = '10' elsif grepFile($fil,'9\.0') var $ver = '9' } if $ver {pretoc '2:Configuration File' if match($ver,'10') call sort_files(3,0,\ catFile($DISCOVERER_HOME,'.reg_key.dc'),\ catFile($DISCOVERER_HOME,'discwb.sh'),\ catFile($DISCOVERER_HOME,'util','pref.txt'),\ catFile($DISCOVERER_HOME,'config','configuration.xml')) elsif match($ver,'9') call sort_files(3,0,\ catFile($DISCOVERER_HOME,'.reg_key.dc'),\ catFile($DISCOVERER_HOME,'discwb.sh'),\ catFile($DISCOVERER_HOME,'util','pref.txt'),\ catFile($ORACLE_HOME,'j2ee','OC4J_BI_Forms','applications',\ 'discoverer','web','plus_files','xsl','plus_config.xml')) unpretoc } =head2 Log Files Gathers the most recent Oracle Discoverer logs. =cut debug ' Inside DSCV module, getting log files' pretoc '2:Log Files' var $cnt = $MAX if expr('>',$cnt,0) {var $dir = catDir($DISCOVERER_HOME,'logs') loop $nam (grepDir($dir,'\.xml$','it')) {call cat_report($dir,$nam,'log_') decr $cnt break !$cnt } } call cat_report(catDir($DISCOVERER_HOME,'util'),'error.txt') unpretoc } =head2 not_found - Not found Used as a warning when no Oracle Discoverer files are found. =cut if !isTocCreated(true) {debug ' Inside DSCV module, no file found' report not_found write 'No Oracle Discoverer files were found and all files were optional. \ This does not mean there was necessarily a problem with RDA, but it \ should be investigated.' toc $MNU toc '2:[[',getFile(),'][rda_report][Not found]]' } =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 4.4: Gurmakh Dev, Steve Fitzgerald. =item RDA 4.10: John Whitaker. =item RDA 4.15: Greg Cook, Andrew Salt. =item RDA 4.17: Sarath Babu, Gianluca Carosi, Evelene Raechel. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002-2009, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut