>> I want to format a STCK/TOD with microseconds, but I found only the method 
>> to format it with hundredths of a second:

Stefan,

Here is a brief description of how to get the microseconds portion from TOD 
using DFSORT. Since you haven’t provided the complete DFSORT cards, I assumed 
that you want to put the microseconds part in position 180.  We first 
initialize it with zeros and then we overlay it with the actual value.


//********************************************************************
//* The SMF TOD has microseconds also in it. DFSORT formats do not   *
//* support microsecond format. so in order to get the microseconds  *
//* print the 8-byte TOD value in hex. Now take the left 13 hex      *
//* characters and append a zero Infront. You can now use Unhex      *
//* function to convert this back to a binary value. once we have    *
//* the binary value all we need to do is divide by 1,000,000        *
//* The remainder of that division is the microsecond value          *
//*                                                                  *
//********************************************************************

INREC BUILD=(001,04,                         # RDW
             009,08,                         # JOBNAME
             X,                              # SPACE
             ..all other fields
             393,08,DC1,EDIT=(TTTT-TT-TT),   # TOD TO DATE
             X,                              # SPACE
             393,08,TC1,EDIT=(TT:TT:TT),     # TOD TO TIME
             C'.',                           # DOT
             180:6X,                         # MICRO SECONDS
             X,                              # SPACE
             200:C'0',                       # ZERO
             393,08,HEX)                     # TOD TO HEX


  OUTREC OVERLAY=(220:200,14,TRAN=UNHEX,
                  180:220,7,BI,+1000000,M11,LENGTH=6)
/*

Further if you have any questions, please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to