Dirceu Bimonti Ivo,

DFSORT can convert the SMF date and time formats and even perform time 
arithmetic. Is IMSLOG data similar to SMF data?  Can you send me a sample 
input data may be 10 records (to my personal email id)  which would save 
the recreation of input data. Also show a sample of your desired output 
for those 10 sample records.


Thanks,
Kolusu



From:   Dirceu Bimonti Ivo <[email protected]>
To:     [email protected]
Date:   06/29/2017 10:46 AM
Subject:        DFSORT to deal with IMS Date/Time
Sent by:        IBM Mainframe Discussion List <[email protected]>



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 [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

Reply via email to