tags:

views:

128

answers:

2

I have two files : first file contains jobname and start time which looks like below:

ZPUDA13V STARTED - TIME=00.13.30
ZPUDM00V STARTED - TIME=03.26.54
ZPUDM01V STARTED - TIME=03.26.54
ZPUDM02V STARTED - TIME=03.26.54
ZPUDM03V STARTED - TIME=03.26.56

and the second file contains jobname and Endtime which looks like below:

ZPUDA13V ENDED - TIME=00.13.37
ZPUDM00V ENDED - TIME=03.27.38
ZPUDM01V ENDED - TIME=03.27.34
ZPUDM02V ENDED - TIME=03.27.29
ZPUDM03V ENDED - TIME=03.27.27

Now I am trying to combine these two files to get the report like JOBNAME START TIME ENDTIME.I have used ICETOOL to get the report If I get JOBNAME START TIME ,ENDTIME is SPACES .If I get Endtime ,JOBNAME START TIME gets spaces. Please let me know how to code the outrec fields as I have coded with almost all possibilites to get the desired one.But still my output is not the same as I required

+2  A: 

I have no idea what ICETOOL is (nor the inclination to even look it up in Google :-) but this is a classic COBOL data processing task.

Based on your simple data input, the algorithm would be:

for every record S in startfile:
    for every record E in endfile:
        if S.jobnname = E.jobname:
            ouput S.jobname S.time E.time
            next S
        endif
    endfor
endfor

However, you may need to take into account the fact that:

  • multiple jobs of the same name may run during the day (multiple entries in the file).
  • multiple jobs of the same name may run at the same time.

You could get around the first problem by ensuring the E record was the one immediately following the S record (based on time). The second problem is a doozy.

If you're running on z/OS (and you probably are, given the job names), have you considered using information from the SMF records to do this collection and analysis. I'm pretty certain SMF type 30 records hold everything you need.

And assuming this is a mainframe question, here's a shameless plug for a book one of my friends at work has written, check out What On Earth is a Mainframe? by David Stephens (ISBN-13 = 978-1409225355).

paxdiablo
A: 

Hi GustlyWind,

Why not use easytreive to get the report that you wanted.

Grekoz