CICS formattime for ABSTIME
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> CICS and Middleware

#1: CICS formattime for ABSTIME Author: deepa12Location: chennai PostPosted: Wed Mar 01, 2017 11:14 am
    —
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

#2:  Author: kolusuLocation: San Jose PostPosted: Wed Mar 01, 2017 12:01 pm
    —
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.

#3:  Author: deepa12Location: chennai PostPosted: Thu Mar 02, 2017 1:04 am
    —
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

#4:  Author: kolusuLocation: San Jose PostPosted: Thu Mar 02, 2017 12:00 pm
    —
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.



MVSFORUMS.com -> CICS and Middleware


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group