Dirceu Bimonti Ivo,

I sent you the JCL which meets your requirements along with time 
arithmetic and handle dates to subtract a day if the time - offset results 
in a negative number. 

Please let me know if you have any more questions.


Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on 
06/29/2017 10:45:52 AM:

> From: Dirceu Bimonti Ivo <dirceu....@dxc.com>
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 06/29/2017 10:46 AM
> Subject: DFSORT to deal with IMS Date/Time
> Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>
> 
> Hi,
> 
> Could use some inputs from DFSORT experts. I have this job to sort 
> IMS Log Records using an specific criteria, does what it should, I 
> just can't get the date/time to display correctly. This is an 
> example of what it looks like:
> 
> +----+----+----+----+----+----+----+----+----+----+-----+-----+
> | +0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 | +10 | +11 |
> +----+----+----+----+----+----+----+----+----+----+-----+-----+
> | YY | YY | DD | DF | HH | MM | SS | TH | MI | JU | A Q | Q $ |
> +----+----+----+----+----+----+----+----+----+----+-----+-----+
> 
> 2017170F  13361016 8394020D
> 
> Translates to 2017.170 13:36:10.168394 UTC -5. Part I am failing is 
> the QQ$, which is the offset from UTC in quarter of hour, so x'20D' 
> means 20 quarter of hour, negative, or -5 hours. I should be 
> subtracting this from the HH field, using something like this:
> 
> OUTREC FIELDS=(1,4,                   * RDW 
>                89,1,PD,SUB,           * Hour 
>                (95,2,PD,DIV,+4),      * UTC Offset 
>                C' ')                  * End of Record
> 
> It does not work because the offset 89 (HH) is not PD, so one digit 
> gets converted to the sign digit instead and the math will be off. 
> While looking for a solution to this, I realized that even if it 
> worked, suppose the record had HH=01 and UTC=-4, I would get a 
> negative time instead of wrapping back to 09 PM.
> 
> So, question finally, any way to maybe convert this to a SMF or TOD 
> format and properly parse using one of the DATE functions from 
> DFSORT instead ? Could probably do this writing a program, it is 
> just easier to quickly change the sort parameters or what you want 
> printed in the report using DFSORT than actually changing your program.
> 
> Thanks in advance.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to