On Thu, 4 Feb 2016 10:37:53 -0700, Sri h Kolusu wrote: >>>And Ravi has clarified that he wants the technique to be aware of >Daylight Saving Time. And I recall the rules in the U.S. changed in 2006. > And more >recently in the Nation of Samoa. >Sigh. DFSORT (and DB2) ought to be savvy to: > https://www.iana.org/time-zones > >(Java knows this. Linux knows this. ... ) > >Paul, > > I am not sure as to what your gripe is but it is really sad to see you >complain on every bit of DFSORT when you don't realize the full potential >of its capability. May be it is time for your shop to pay for a training >class on DFSORT and I will be more than happy to show you its full >potential. Here is a small sample Job that calculates the Day light >savings begin date and end date and then adjust the offset according to >them and as well as gives the option for the user to pick whatever time >zone he wants these calculations to be based on. If the user does not pass >a time zone then it defaults to PST. > >And just for your record, according to "National Institute of Standards >and Technology" the DST rules are changed in 2007. > >http://www.nist.gov/pml/div688/dst.cfm > Thanks for the correction. I was close. And the important point is that today's rules don't cover even the last several years, within the relevance of DB2 (though perhaps not SMF) data.
Your example shows me that DFSORT is not the best tool for the job; it can be done, but like Samuel Johnson's dog, it is surprising that it is done at all. Time conversion functions should be modular, outside DFSORT, and available to all applications. Hmmm... Your example covers 4 time zones, all in the contiguous USA. And I don't see that it accounts for the 2007 change. Alaska and Hawaii add two more. And Hawaii and Arizona don't observe Daylight saving time. Not Samoa? USA only? What does the "I" in IBM stand for? I wonder whether the IANA database could be extracted and formatted as a canned procedure for DFSORT? Again, I don't believe DFSORT (the Swiss Army Knife utility, probably Turing-complete) is the proper venue in which to solve this problem, but z/OS ought to provide a solution. STCKCONV and CONVTOD are hot the answer; their capabilities are pathetic. I mentioned Java. Not realistic. It produces correct answers, but performance is abysmal. Thanks again, gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
