Solved

Need assistance searching and isolating various word segments

Posted on 2008-10-17
3
728 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
Comment Utility
Before I answer any of these questions, may I ask why you are doing this?
0
 

Author Comment

by:wally_davis
Comment Utility
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
Comment Utility
Person never responded, please remove this question.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

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…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now