Solved

Need assistance searching and isolating various word segments

Posted on 2008-10-17
3
735 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

737 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