View previous topic :: View next topic
|
Author |
Message |
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
I need the logic of "CONVERT ABSOLUTE DAYS TO A GREGORIAN DATE" in cobol (tunned code).
Please let me know the tunned logic its good for me.
Thanks in advance. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Vicky,
Quote: |
CONVERT ABSOLUTE DAYS TO A GREGORIAN DATE |
It dint get what 'absolute days' stand for? Could you show some examples and little more explanation for your requirement. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Check it out if you meant to convert it in Gregorian Format from a standard date format YYYYMMDD.
DATE-OF-INTEGER |
|
Back to top |
|
|
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
Thx for help
But if using the above function cpu time will consume more so that i have to write logic for the above function. Please let me know the logic for conversation from Days to Gregorian(CCYYMMDD) .
Thanks in advance |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
But if using the above function cpu time will consume more so that i have to write logic for the above function. |
Sorry, but it is hard for me to understand- how significantly is it going to improve performance if you replace that function with a code, if at all it is improving. Ofcourse, I could be wrong. |
|
Back to top |
|
|
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
Hi all,
Please let me know any other simple logic and less cpu time consumation.
Thanks in advance. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
FUNCTION DATE-OF-INTEGER (under the covers) issues a BALR (CALL) to an LE Callable Service routine.
One of the benefits of the LE Date routines are their use of internal tables, which significantly reduces CPU consumption. The other benefit is that LE will return a bad feedback-code when an invalid days-value is found, whereas the FUNCTION equvilent will always crash and burn.
As others have said, the CPU used by LE as opposed to in-line code is nearly immeasurable and really not worth worrying about.
If this is a Batch program and this date-conversion is used extensively in the given program, then (in HOUSEKEEPING) establish addressability to the actual LE routine, via a PROCEDURE-POINTER and then use the first 4-bytes of this PROCEDURE-POINTER value in subsequents CALLS. Using this technique can reduce CPU as well.
HTH....
Regards,
Bill |
|
Back to top |
|
|
|