Ravi,
Conversion of GMT time to EST is quite simple. You just need to subtract 5
hours (18,000 seconds) from the time field. But remember when you subtract
you need to subtract 1 day from the date also for the times ranging from
midnight (00:00:00) to 5 AM (05:00:00). Since you haven't provided any
kind of details of SMF records you are working with I am going to just
show you an example of how it can be done.
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
20160131 23:59:59 << SAME DAY |
20160201 04:59:59 << PREVIOUS DAY|
20160202 13:24:51 << SAME DAY |
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(81:(15,2,ZD,MUL,+3600,ADD, $ HH * 3600 +
18,2,ZD,MUL,+0060,ADD, $ MM * 0060 +
21,2,ZD),SUB,+18000,ZD,LENGTH=8)), $ SS - 18000
IFTHEN=(WHEN=(81,8,ZD,LT,0), $ IF Negative
OVERLAY=(81:81,8,ZD,ADD,+86400,ZD,LENGTH=8, $ ADD 24 HOURS
41:01,8,Y4T,SUBDAYS,+1,TOGREG=Y4T)) $ SUBTRACT 1 DAY
OUTREC IFOUTLEN=80,IFTHEN=(WHEN=INIT,
OVERLAY=(51:81,8,ZD,DIV,+3600,EDIT=(TT), $ HH
C':', $ COLON
(81,8,ZD,MOD,+3600),
DIV,+60,EDIT=(TT), $ MM
C':', $ COLON
((81,8,ZD,MOD,+3600),
MOD,+60),EDIT=(TT))) $ SS
//*
The output from this job is (notice the 2nd record and the date value in
position 41
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
20160131 23:59:59 << SAME DAY | 18:59:59
20160201 04:59:59 << PREVIOUS DAY|20160131 23:59:59
20160202 13:24:51 << SAME DAY | 08:24:51
Further if you have any questions please let me know
Thanks,
Kolusu
DFSORT Development
IBM Corporation
From: Ravi Gaur <[email protected]>
To: [email protected]
Date: 02/02/2016 06:57 AM
Subject: DFSORT - SMF Records - GMT To EST
Sent by: IBM Mainframe Discussion List <[email protected]>
Does somebody got a quick example of time conversion for SMF Records from
GMT to EST or any other timezone based on input parms...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN