Do not use on any
shared computer
July 24, 2008 07:47pm pdt
null
[x]
Attachment Details

Parse text file???

Tags: u4038
I have the following text file below that I need to parse out certain records.

I just need the records that have astrisks(*) and the word "PRD1" in them, but exclude the ones that havethe word(s):  "CONSOLE" or  "OPSMVS_NO_WTOR_REPLY" or "RACFAFF" or "RACFAFP" or start with a "DT2" or start with a "AL0" or a "#" character in the record.

InputFile.txt
 
99
5 Jan 2007    07:32:47    CANXMQ    DEV2 ********************************
Program terminated by operating system. ABEND code = U1213

5 Jan 2007    07:32:50    CANXMQ    DEV2 ********************************
IEF450I CANXMQ CANXMQ - ABEND=S0C4 U0000 REASON=00000011

5 Jan 2007    07:32:50    CANXMQ    DEV2 ********************************
Actual ABEND location = 9A2CC194

5 Jan 2007    09:01:30    CN00005N    DEV2 ********************************
IEF450I CN00005N DHC01 HCDSUTL - ABEND=S000 U1060 REASON=00000000

5 Jan 2007    09:16:28    AV78082D    PRD1 ********************************
IEF450I AV78082D AAVW8D AV82PR1 - ABEND=S000 U4038 REASON=00000001

5 Jan 2007    10:22:00    AV78082D    PRD1 ********************************
IEF450I AV78082D AAVW8D AV82PR1 - ABEND=S000 U4038 REASON=00000001

5 Jan 2007    10:46:32    OPSMVS_NO_WTOR_REPLY    PRD1 ********************************
CHECK OPSLOG FOR A WTOR THAT WAS NOT REPLIED TO. 10:46:32 MPCTMSGS

5 Jan 2007    11:12:11    AL02672N    PRD1 ********************************
IEF453I AL02672N - JOB FAILED - JCL ERROR - TIME=11.12.11

5 Jan 2007    11:13:23    P#AL001    PRD1 ********************************
INSUFFICIENT ACCESS AUTHORITY

5 Jan 2007    11:26:32    CONSOLE    PRD1 ********************************
IAT4801 JOB ZZ00101A (JOB00719) EXPRESS CANCELED BY INTERPRETER DSP

01/05/07     12:05:07     BEL0475     <<<<<<<<<<<<<<<<---------->>>>>>>>>>>>>>>

5 Jan 2007    13:34:18    CANXMQ    DEV2 ********************************
Program terminated by operating system. ABEND code = U1213

5 Jan 2007    13:34:22    CANXMQ    DEV2 ********************************
Actual ABEND location = 9A2CC194

5 Jan 2007    13:34:23    CANXMQ    DEV2 ********************************
IEF450I CANXMQ CANXMQ - ABEND=S0C4 U0000 REASON=00000011

5 Jan 2007    14:01:07    DT22222    TST2 ********************************
IEF450I DT22222 STEP04 - ABEND=S000 U1060 REASON=00000000

5 Jan 2007    14:10:51    DT22224    PRD1 ********************************
IEFC452I DT22224 - JOB NOT RUN - JCL ERROR

5 Jan 2007    14:10:51    CONSOLE    PRD1 ********************************
IAT4801 JOB DT22224  (JOB00325) EXPRESS CANCELED BY INTERPRETER DSP

5 Jan 2007    14:45:50    FM00035    PRD1 ********************************
IEF450I FM00035 DFM70 FM35PRC - ABEND=S000 U4038 REASON=00000001

5 Jan 2007    15:06:37    P#AL001    PRD1 ********************************
INSUFFICIENT ACCESS AUTHORITY

5 Jan 2007    18:38:33    RACFAFF    PRD1 ********************************
IEFC452I RACFAFF - JOB NOT RUN - JCL ERROR

5 Jan 2007    18:39:01    RACFAFP    PRD1 ********************************
IEFC452I RACFAFP - JOB NOT RUN - JCL ERROR


So, with the InputFile.txt above I should end up with this desired output of only 3 records.

5 Jan 2007    09:16:28    AV78082D    PRD1 ********************************
5 Jan 2007    10:22:00    AV78082D    PRD1 ********************************
5 Jan 2007    14:45:50    FM00035    PRD1 ********************************


thanks



Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Programming
Question Asked By: rkckjk
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
Views: 39
Translate:
Loading Advertisement...
 
[+][-]Accepted Solution by ozo

Rank: Genius

Accepted Solution by ozo:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by rkckjk
Author Comment by rkckjk:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34