First 8 bytes in input file is jobname (position 1 - 8)
Next 12 bytes is actual start time of the job in format (YYYYMMDDHHMM) (position 9 - 20)
Next 12 bytes is actual end time of the job in format (YYYYMMDDHHMM)
(position 21-32)
Output file: (LRECL - 30 , RECFM - FB)
Code:
XXXXXXXX201209250121
yyyyyyyy201209250640
Output file includes 2 fields
1. first field is jobname - (position 1- 8)
2. second field is actual run time ( actual end time - actual start time)
I assume that the "date" part you want on the output is that of the end of the run? Rather than the date part being subtracted? But that you want the difference in hours and minutes (not bothered about seconds?) even if start on one day, end on a different one?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
madishpa,
If you are just waiting around for an answer, you'll need to at least provide the output from this step, so we can see what level of the product you have.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
dbzTHEdinosauer wrote:
Bill Woodger wrote:
Did you look at the link provided?
why? he wants his customized solution,
and does not want to wade thru any extraneous verbiage.
Add a private message too.
madishpa wrote:
I would convert hours and miutes in to seconds before subtraction. If the start and end dates falls on the same day, this works.
Your sample data has only HHMM for time , why would you convert the time into seconds format? You just need to convert it into minutes.
Assuming that the date-time at position 21 is always greater or equal to the date-time at position 9 , the following DFSORT JCL will give you the desired results
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
madishpa,
Please do not PM anyone for assistance. If this happens again, there will be a Warning for you.
I notice that you have not even thanked Kolusu for the solution provided.
You did not use the Code tags, and made a mistake with your sample data which you'd have spotted easily if you had use the Code tags and Preview. This was corrected for you.
You mis-described your requirement.
You have been here long enough to know that all of the above you should have been done differently.
Next time, please, do not repeat any of these mistakes.