Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Convert ABSOLUTE days to a GREGORIAN DATE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Convert ABSOLUTE days to a GREGORIAN DATE
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: 1439
Location: Bangalore,India

PostPosted: Fri Feb 15, 2008 11:37 am    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Fri Feb 15, 2008 11:51 am    Post subject: Reply to: CONVERT ABSOLUTE DAYS TO A GREGORIAN DATE
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Fri Feb 15, 2008 1:13 pm    Post subject: Reply to: Convert ABSOLUTE days to a GREGORIAN DATE
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 15, 2008 5:57 pm    Post subject: Convert ABSOLUTE days to a GREGORIAN DATE
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us