View previous topic :: View next topic |
Author |
Message |
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Mon Aug 09, 2010 4:45 am Post subject: Absolute time |
|
|
I need to convert absolute time to normal time format.
For Example:
Absolute time format: +003328884900000
is there any sort card to convert by using icetool or sort.....? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Aug 09, 2010 10:00 am Post subject: |
|
|
puttu,
Sort products do NOT have any built in functions to convert the absolute time to normal time format.
However we can use arithmetic functions( add, mul , div) and get the desired results if we are talking about TIME only. Is the absolute time derived from CICS? or something else?
Show us an example of translated time values for the given input. what does +003328884900000 translate to? _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Tue Aug 10, 2010 3:17 am Post subject: |
|
|
hi frank,
Please fine the below details:
Absolute time will be : 003490047734520
and expected output time : 2010080605421843 |
|
Back to top |
|
|
expat Intermediate
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Tue Aug 10, 2010 5:00 am Post subject: |
|
|
puttu
Please show a little respect here, it is kolusu that has responded to your request, and not Frank.
What is the algorithm for converting from one to other. You give us two values but absolutely no ideas on how one is converted to the other. _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Tue Aug 10, 2010 5:07 am Post subject: |
|
|
My apologies for specifying frank name instaed of kolusu....
Rgds,
Puttu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Aug 10, 2010 10:18 am Post subject: |
|
|
puttu,
Sort products DO NOT have the ability to convert an absolute time into a DATE and Time representation. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Tue Aug 10, 2010 10:50 am Post subject: |
|
|
kolusu,
is there any way to convert in cobol program...?
if so... please send me the details..... |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Tue Aug 10, 2010 3:21 pm Post subject: |
|
|
Where did the posted "absolute time" originate? From a database table, a systerm data area (control block), an external file, etc. . .? _________________ All the best,
di |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Tue Aug 10, 2010 3:27 pm Post subject: |
|
|
hi,
i'm getting absolute time from cics.
i need to convert into normal date & time format (2010080818162345)
is there any way to do in cobol program..? |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Tue Aug 10, 2010 3:46 pm Post subject: |
|
|
See if this will help:
Code: | 01 WS-WORK-FIELDS.
05 WS-ABSOLUTE-TIME PIC S9(15) COMP-3.
05 WS-MMDDYY PIC X(08).
05 WS-HHMMSS PIC X(08).
EXEC CICS
ASKTIME ABSTIME(WS-ABSOLUTE-TIME)
END-EXEC.
EXEC CICS
FORMATTIME ABSTIME(WS-ABSOLUTE-TIME)
MMDDYY(WS-MMDDYY)
DATESEP
TIME(WS-HHMMSS)
TIMESEP
END-EXEC. |
I have no way to test this, but maybe it will do what you need. . . _________________ All the best,
di |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
|
Back to top |
|
|
RonB Beginner
Joined: 02 Dec 2002 Posts: 93 Topics: 0 Location: Orlando, FL
|
Posted: Tue Aug 10, 2010 4:29 pm Post subject: |
|
|
@Papadi,
Both CEEDATM and CEESECS are based on the number of SECONDS relative to 00:00:00 14 October 1582.
CICS ABSTIME is based on the number of MILLISECONDS relative to 00:00:00 01 Jan 1900.
Trying to convert ABSTIME using CEEDATM or CEESECS or any combination thereof can only lead to trouble. _________________ A computer once beat me at chess, but it was no match for me at kick boxing. |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Aug 11, 2010 6:07 pm Post subject: |
|
|
Quote: |
Trying to convert ABSTIME using CEEDATM or CEESECS or any combination thereof can only lead to trouble.
| Yup - it was not my intention to suggest "mixing the bag". Only one way or the other should be used. . . _________________ All the best,
di |
|
Back to top |
|
|
|
|