Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
Posted: Wed Mar 01, 2017 11:14 am Post subject: CICS formattime for ABSTIME
I used
CECI ASKTIME ABSTIME
i got the following value
(+003697357462808)
Then i have used the following command
CECI FORMATTIME ABSTIME(+003697357462808)
So it returns DATESTRING(Wed, 01 Mar 2017 11:44:22 GMT) & RFC1123
is hilited in white. So the default format is RFC1123 I guess.
Is this understanding correct
What i understand is abstime is number of milliseconds since 00:00 on 1 January 1900 overloaded by
local time running MVS STCK macro
So after 29/03/17, considering UK geography,(I.E DAYLIGHT SAVINGS will be on), if the time is 7:00 AM GMT, it will show 8:00AM BST, pls help me with the following queries, I have used a futuristic abstime
CECI ABSTIME(+003708357462808)
CECI FORMATTIME ABSTIME(+003708357462808)
DATESTRING( 'Thu, 06 Jul 2017 19:17:42 GMT ' )
TIME('201742 ')
Is this right. 'Thu, 06 Jul 2017 19:17:42 GMT' value is got by doing a CECI now. Time(201742 ) is the what I think the Time( )will have
Now DFHC LENGTH 8 BYTES S9(15) COMP-3
CECI CONVERTTIME ABSTIME(&DFHC)
DATESTRING( 'Thu, 06 Jul 2017 20:17:42 GMT ' )
Would consider the time 'Thu, 06 Jul 2017 20:17:42 GMT as GMT & hence the converttime will provide
abstime 3708361062808 (I.E ADDING 3600000 TO 003708357462808)
Is this understanding right _________________ deepa
And when you read it you will find goodies like below that will clear your doubts. Pay attention to the bold text where it warns you about getting incorrect results.
CICS Command Summary wrote:
If you are using the DATESTRING option, first run the ASKTIME ABSTIME command to obtain a value for the ABSTIME option. If the value for the ABSTIME option is from any other source, the architected date and time stamp string that is returned by the FORMATTIME command might be incorrect.
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
Posted: Thu Mar 02, 2017 1:04 am Post subject:
Please correct my understanding
After 29/03/17, considering UK geography,(I.E DAYLIGHT SAVINGS will be on), if the time is 7:00 AM GMT, it will show 8:00AM BST
So after providing ABSTIME, FORMATTIME commands, say I formulate a DATESTRING using the date,time in DATE(data-area) & TIME(data-area) of the FORMATTIME command
The datestring is in RFC1123 Format like 'Thu, 06 Jul 2017 19:17:42 GMT
Here I feel it may be wrong to convert a formattime output i.e a BST TIME to a GMT format, since 19:17:42 is a BST & it is actually 18:17:42 GMT. Is this understanding correct
Then I use the CONVERTTIME command with this datestring to fetch the ABSTIME
So I think the CONVERTTIME command would fetch the ABSTIME equivalent of 'Thu, 06 Jul 2017 19:17:42 GMT i.e 20:17:42 BST Is this understanding correct _________________ deepa
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Mar 02, 2017 12:00 pm Post subject:
deepa12,
Did you even bother reading the documentation link I gave earlier? And for the 2nd time , You are NOT guaranteed to get the correct results based on your FUTURISTIC abstime values
You have several options to get UK time.(not for the futuristic calculations you make)
1.Use STRINGFORMAT(RFC3339) which gives you the timezone in UTC plus the offset.
2. Use the STRINGZONE(LOCAL) which will give you the local time where ever your machine is running. _________________ Kolusu
www.linkedin.com/in/kolusu
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum