?
Solved

Need assistance searching and isolating various word segments

Posted on 2008-10-17
3
Medium Priority
?
737 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

741 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