Solved

Need assistance searching and isolating various word segments

Posted on 2008-10-17
3
730 Views
Last Modified: 2008-11-10
I'm still somewhat new to C# and could really use some help on how to start out writing a routine when trying to pull out and concatenate strings.
We have numerous software distributions that store huge log files on a share. Some log file sizes are very small, like 24 kb, and others can be as large as 2 Gig.
I believe I would use the System.IO Class to help me do this.

If you look at one of the tidbits of data written below in the "Attach Code Snippet" window, I'm trying to figure out how to write a routine that accesses the filename = "MCAFEE.DLP_VSXP2K_EPE_I^2.2.16.0.1.log" and then have it strip out specific words and create an Short error message.
Example for below would be:

If "Current software package status = 'ICE--E' And "Operation" = 'unsuccessful'
      And "DISSE0198I User program exit" = '0' And "AcceptPackage.exe" And "DISSE0442I             Execution of user program 'during_install" And "failed" Then

      /* Based on items in search, create a Short Error message */
       ShrtErrorMsg = "Application install failed wscript.exe execution"
Else      
      "Write some other error message based on conditions".

Thanks in advance for your help experts.
Wally

=================
 
Software Package: "MCAFEE.DLP_VSXP2K_EPE_I^2.2.16.0.1"
Operation:         install
Mode:              not-transactional,not-undoable | force
Time:              2008-08-20 22:16:45
Log File:          rtxinv00:/banktools/rtxinv00/tivoli/logs/sd4/MCAFEE.DLP_VSXP2K_EPE_I^2.2.16.0.1.log
=================
B00163683C7EA:
 
DISSE0155I Distribution ID: `1380625589.289673'
 
DISSE0029I Current software package status is 'IC--E'.
 
DISSE0005E Operation unsuccessful.
 
DISSE0442I Execution of user program 'during_install - C:\WINNT\system32\wscript.exe ('C:\Program Files\Bank of America\Utilities\Temp_PreInstallCheck\PreInstallCheck.vbs' /i /verbose "/package:McAfee DLP" "/version:2.2.16.0" "/build:1" "/owner:EPE")' completed with result: 'success'. 
 
DISSE0198I User program exit code: 0 
 
DISSE0197E Execution of user program 'during_install - C:\Program Files\Bank of America\Utilities\Temp_UtilsDir\AcceptPackage.exe (/t:5 /MD:1  "/PN:MCAFEE.DLP_VSXP2K_EPE_I^2.2.16.0.1" "/PD:McAfee DLP 2.2.16.0 Build 1 Install"  "/MM:\cr** McAfee DLP 2.2.16.0 Build 1 Install **\n\nInstallation will now begin.\n\nYour computer WILL REBOOT upon completion.\n\nPlease SAVE your work and CLOSE any open applications.\n\nEstimated installation time is approximately 15 minutes.\n\nThank You." "/AM:** McAfee DLP 2.2.16.0 Build 1 Install **\n\n\cbThis package WILL REBOOT your workstation upon successful completion.\cl\n\nEstimated installation time is approximately 15 minutes.\n\nTo receive this update now, SAVE your work, CLOSE all open applications and click 'Install'.\n\nTo receive this update later, click 'Defer'.  If you defer the update, it may become mandatory at the next attempt.\n\nThank you.")' failed. 
 
DISSE0198I User program exit code: 1

Open in new window

0
Comment
Question by:wally_davis
  • 2
3 Comments
 
LVL 6

Expert Comment

by:RishadanPort
ID: 22746045
Before I answer any of these questions, may I ask why you are doing this?
0
 

Author Comment

by:wally_davis
ID: 22759570
My goal it to take common errors or any new errors, retrieve them and then send them to a table called Errors. We would eventully like to start building logic around specific error conditions to come up with a simplified error message to another table. This will enable us to provide best troubleshooting steps.
0
 

Accepted Solution

by:
wally_davis earned 0 total points
ID: 22888311
Person never responded, please remove this question.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question