CL TimeStamp Duration

70 pts.
Tags:
CL batch program
CL Procedure
Hi, I have to compute the duration it takes to execute a batch process. So I need to compute the difference between Start Time & End Time and display it in HH:MM:SS format. So is there any command in CL which can compute the time difference? Thanks

Answer Wiki

Thanks. We'll let you know when a new response is added.

As far as I know, there isn’t a native CL command that will calculate durations. So you could do it the harder way and write your own logic in CL to do this. Or a more robust, reliable and flexible way would be to create a procedure in a service program that could be bound by reference to your CL program (which would need to be ILE CL). RPG IV has great native functions for date and timestamp handling such as durations. ILE COBOL also has these (and possibly C and C++).

The procedure in the proposed service program could receive the two timestamps as input and return the duration to your CL program. And by being in a service program, it would be available for use by other programs as well.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Yorkshireman
    I can't improve that answer. However, you could provide a function which writes out the timestamp to a file, and thus provides a history of the batch processes over time. call it 'stamp' with 1 parameter - start or end. make it ILE, bind it to the batch process, at the beginning call stamp start writes current timestamp to file with 'Start' attribute at ehe end call stamp end - you can calculate the durations off line fromthe process, add them uyp and avergage them over time and do the whole nine yards. add a process name and job number to the file and you can time anything on the system . . .
    5,580 pointsBadges:
    report
  • YuVa47
    Hi, You can also look at this document: http://www.mcpressonline.com/programming/cl/the-cl-corner-so-youre-looking-for-a-date.html
    1,300 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following