IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Convert ABSOLUTE days to a GREGORIAN DATE


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Feb 15, 2008 10:39 am
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Feb 15, 2008 11:37 am
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Feb 15, 2008 11:51 am
Reply with quote

Check it out if you meant to convert it in Gregorian Format from a standard date format YYYYMMDD.

DATE-OF-INTEGER
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Feb 15, 2008 1:08 pm
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Feb 15, 2008 1:13 pm
Reply with quote

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. icon_smile.gif
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Feb 15, 2008 5:38 pm
Reply with quote

Hi all,

Please let me know any other simple logic and less cpu time consumation.

Thanks in advance.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 15, 2008 5:57 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top