Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

First off, I hope these readmore tags work. Well, I am sure they will work. I hope the formatin of my log will pass into the readmore tags correctly. If not, "Hello, Nodereaper. Hope you are doing well today."

I am having a time trying to come up with the best solution for an auditing issue. I am needing to parse through a list log created by a VSE system. It is in the readmore tags at the bottom.

I am needing to create a script that will parse through this log and let me know of all the jobs that completed with or without satisfactory return codes or abends along with times. I have considered a list of jobs in a text file that can be accessed. I have also considered the possibilty of using <STDIN> user input to search the log and return a file containing the start of the job through the end of the job, showing only the console messages in that partition.

I know that this is possible with Perl, but like most Perl hackers, I want efficiency. I have considered using a pattern match for the start of a particular job and then use "sysread" and "seek" to parse out the console messages for that particular partition. (For anyone not familiar with partitions and console messages on a VSE system. The partition is labeled by the "BG", "P1", "Y1", or just about any two alphanumeric characters right after the message number or count.)

The only issue is that I will need to continue my search on the next line following the pattern match for any other jobs that are listed in my search. For example, if I know that the jobs "TPDELDFN" and "TPCOPY" both run on the 30th of Sept, my search would pick up "TPDELDFN" and begin searching and printing all lines containing the partition "P1" until an "EOJ" pattern match, but it would miss the "TPCOPY" job running in partition "BG" if the search would not continue back at line 631.

I have also thought about separating all the different partitions and then searching them individually since only one job at a time can run in a partition, but of course this seems like a time consuming process and very difficult since the number of partitions can vary per day and not all jobs run in static partition. I have also ruled out the possibility of searching this entire log, which is usually close to 3,000 KB and approximately 20,000+ lines, for each individual job due to time constraints.

Any ideas or directions on where and how I could go about this would be appreciated. Thanks. blacksmith

Sample data follows:
612 F1 0001 1Q34I RDR WAITING FOR WORK ON 00C + 11:18:10 09/30/2002 613 BG 0001 1Q47I BG AR400C 38157 FROM LOCAL U='LICKE ' +, TIME=11:18:10 11:18:10 09/30/2002 614 BG 0000 // JOB AR400C MOVE A PROGRAM TO PRODUCTION LIBRARY + 11:18:10 09/30/2002 DATE 09/30/2002, CLOCK 11/18/10 + 11:18:10 09/30/2002 615 BG 0000 EOJ AR400C MAX.RETURN CODE=0000 + 11:18:11 09/30/2002 DATE 09/30/2002, CLOCK 11/18/11, DURATION 00/00/01 + 11:18:11 09/30/2002 616 BG 0001 1Q34I BG WAITING FOR WORK + 11:18:11 09/30/2002 617 BG 0001 1Q47I BG TPCOPY 38159 FROM (02TP) U='TPASCHAL +', 11:18:57 09/30/2002 TIME=11:18:57 + 11:18:57 09/30/2002 618 BG 0000 // JOB TPCOPY + 11:18:57 09/30/2002 DATE 09/30/2002, CLOCK 11/18/57 + 11:18:57 09/30/2002 619 BG 0000 * STEP SORT COPY DISK + 11:18:57 09/30/2002 620 BG-0000 // PAUSE PLEASE MOUNT THE 'CONCORD.DATA' TAPE (09/11/02 +) 11:18:57 09/30/2002 621 0 + 11:19:03 09/30/2002 98JG 622 BG 0000 ILU323I J1 TPCOPY COPY COMPLETE, IN 94, OUT 94 + 11:19:06 09/30/2002 623 BG 0000 EOJ TPCOPY MAX.RETURN CODE=0000 + 11:19:07 09/30/2002 DATE 09/30/2002, CLOCK 11/19/07, DURATION 00/00/10 + 11:19:07 09/30/2002 624 BG 0001 1Q34I BG WAITING FOR WORK + 11:19:07 09/30/2002 625 MTC RUN,381 + 11:19:22 09/30/2002 98JG 626 AR 0015 1I40I READY + 11:19:22 09/30/2002 98JG 627 P1 0052 1T20I SYS006 HAS BEEN ASSIGNED TO X'FEE' (PERM) + 11:20:32 09/30/2002 628 P1 0052 1T20I SYS008 HAS BEEN ASSIGNED TO X'FED' (PERM) + 11:20:32 09/30/2002 629 P1 0001 1Q47I P1 TPDELDFN 38160 FROM (02TP) U='TPASCH + ', 11:20:32 09/30/2002 TIME=11:20:32 + 11:20:32 09/30/2002 630 P1 0052 // JOB TPDELDFN + 11:20:32 09/30/2002 DATE 09/30/2002, CLOCK 11/20/32 + 11:20:32 09/30/2002 631 P1 0052 EP017 EPIC SYSTEM IS ACTIVE IN THIS PARTITION + 11:20:33 09/30/2002 632 P1 0052 1T20I SYS006 HAS BEEN ASSIGNED TO X'FEE' (PERM) + 11:20:35 09/30/2002 633 P1 0001 1Q3EI DYNAMIC CLASS 'P' WAITING FOR WORK + 11:20:35 09/30/2002 634 F4 0163 TVCE64022I - TASK WAS FORCED - TASK NO. 8782 + 11:21:22 09/30/2002 635 F4 0163 DFHFC0300 PRODCICS (FP40 T30B) PURGE DEFERRED DUE TO IN +COMPLETE I/O 11:21:22 09/30/2002 OPERATION ON VSAM FILE 'FPHIST '. + 11:21:22 09/30/2002 636 F4 0163 DFHFC0305 PRODCICS MESSAGE DFHFC0300 FILE 'FPHIST ' DS +NAME 'FP. 11:21:22 09/30/2002 OPTIONS SPECIFIED: NEW + 10/01/2002 PAGE 19 COUNT MESSAGE TEXT + CLOCK DATE CONSOLE MEMBER.HISTORY'. + 11:21:22 09/30/2002 637 BG 0001 1Q47I BG TPCOPY 38161 FROM (02TP) U='TPASCHAL +', 11:22:24 09/30/2002 TIME=11:22:24 + 11:22:24 09/30/2002 638 BG 0000 // JOB TPCOPY + 11:22:24 09/30/2002 DATE 09/30/2002, CLOCK 11/22/24 + 11:22:24 09/30/2002 639 BG 0000 * STEP SORT COPY DISK + 11:22:24 09/30/2002 640 BG-0000 // PAUSE PLEASE MOUNT THE 'CONCORD.DATA' TAPE (09/12/02 +) 11:22:24 09/30/2002 641 0 + 11:24:42 09/30/2002 98JG 642 BG 0000 ILU323I J1 TPCOPY COPY COMPLETE, IN 94, OUT 94 + 11:24:48 09/30/2002 643 BG 0000 EOJ TPCOPY MAX.RETURN CODE=0000 + 11:24:48 09/30/2002 DATE 09/30/2002, CLOCK 11/24/48, DURATION 00/02/23 + 11:24:48 09/30/2002 644 BG 0001 1Q34I BG WAITING FOR WORK + 11:24:48 09/30/2002 645 F4 0163 TVCE64022I - TASK WAS FORCED - TASK NO. 12528 + 11:25:32 09/30/2002 646 F4 0163 DFHFC0300 PRODCICS (FP40 T30B) PURGE DEFERRED DUE TO IN +COMPLETE I/O 11:25:32 09/30/2002 OPERATION ON VSAM FILE 'FPHIST '. + 11:25:32 09/30/2002 647 F4 0163 DFHFC0305 PRODCICS MESSAGE DFHFC0300 FILE 'FPHIST ' DS +NAME 'FP. 11:25:32 09/30/2002 MEMBER.HISTORY'. + 11:25:32 09/30/2002 648 Y1 0052 EOJ TPDELDFN MAX.RETURN CODE=0008 + 11:25:42 09/30/2002 DATE 09/30/2002, CLOCK 11/25/42, DURATION 00/05/10 + 11:25:42 09/30/2002 649 Y1 0052 1T20I SYS008 HAS BEEN ASSIGNED TO X'FED' (PERM) + 11:25:42 09/30/2002 650 Y1 0001 1Q47I Y1 DITE02KL 38163 FROM (02KL) , TIME=11:25:42 + 11:25:42 09/30/2002 651 Y1 0052 // JOB DITE02KL DITTO/FS + 11:25:42 09/30/2002 DATE 09/30/2002, CLOCK 11/25/42 + 11:25:42 09/30/2002 652 Y1 0052 EP017 EPIC SYSTEM IS ACTIVE IN THIS PARTITION + 11:26:00 09/30/2002 653 Y1 0052 EOJ DITE02KL MAX.RETURN CODE=0000 + 11:26:13 09/30/2002 DATE 09/30/2002, CLOCK 11/26/13, DURATION 00/00/31 + 11:26:13 09/30/2002 654 Y1 0001 1Q3EI DYNAMIC CLASS 'Y' WAITING FOR WORK + 11:26:14 09/30/2002 655 X2 0171 APT933I PSFDEED PSFX2 DEED3 PRINTER INFORMATION, DEV=43 +32, ADDR=10.53. 11:27:00 09/30/2002 24.32, CPUID=FF01561A20660000, ATTACH=PSF + 11:27:00 09/30/2002 656 F1 0001 1QY2I DEVICE DEED3 WAITING FOR WORK, DDS=SYSPSFX2 + 11:27:08 09/30/2002 657 F1 0001 1QY2I DEVICE DEED3 WAITING FOR WORK, DDS=SYSPSFX2 + 11:27:19 09/30/2002 658 Y1 0052 1T20I SYS006 HAS BEEN ASSIGNED TO X'FEE' (PERM) + 11:27:29 09/30/2002

Edited: ~Mon Oct 21 23:29:58 2002 (GMT) by footpad: Added <CODE> tags for legibility, per Consideration


In reply to Daily Log Audit (regex issue) by blacksmith

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2022-01-27 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (71 votes). Check out past polls.

    Notices?