MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CICS formattime for ABSTIME

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Wed Mar 01, 2017 11:14 am    Post subject: CICS formattime for ABSTIME Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Wed Mar 01, 2017 12:01 pm    Post subject: Reply with quote

deepa12,

what's up with your weird titles for the topics? I have been editing them and despite an earlier private discussion, you continue to do the same?

what exactly does re. mean for ? Does re. mean regarding or reply ?

Either way I would really appreciate if you can STOP using chat language on a professional board.

deepa12 wrote:
I have used a futuristic abstime
CECI ABSTIME(+003708357462808)


The first thing you need to do is READ the manual and re-read it again until you understand it.

Here is the documentation for CICS FORMATTIME

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.

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Thu Mar 02, 2017 1:04 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Thu Mar 02, 2017 12:00 pm    Post subject: Reply with quote

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 bonk

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 - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group