Stefan,

I just realized that you are actually missing the arithmetic operator MOD 
(which gives the remainder after the divide).  I also realized that you have 
TEMP fields(unhex of TOD) in between which you really don’t need in the final 
output. So I put the temp fields at the end of build (position 450 on wards)

You need to change it slightly to ensure the temp fields are at the end.

So please change your IFTHEN=(WHEN=NONE to the following. ( I roughly 
calculated that your NONE condition is building around 445 bytes. So, I chose 
position 450 to put the hex values and then use position 470 to convert the 
value to binary and then get the microseconds correctly.  I highlighted the 
changes in RED.

        IFTHEN=(WHEN=NONE,
                BUILD=(1,8,C'{',
                       C'"MFSOURCETYPE":"CSFA",',
                       C'"TRNSTCK":"',
                       393,8,DC1,EDIT=(TTTT-TT-TT),C'T',
                       393,8,TC1,EDIT=(TT:TT:TT),
                       C'.',
                       C'MICROS',
                       C'+0000:00',C'",',
                       C'"ELAMICS":"',
                       (517,8,BI,SUB,393,8,BI),DIV,+4096,C'",',
                       C'"TRNARVD":"',117,4,TRAN=HEX,C'",',
                       C'"TRNARVTH":"',587,4,TRAN=HEX,C'",',
                       C'"TRNIMSID":"',25,4,C'",',
                       C'"TRNSMFID":"',29,4,C'",',
                       C'"TRNJOBNM":"',37,8,C'",',
                       C'"TRNPSBNM":"',61,8,C'",',
                       C'"TRNCODE":"',69,8,C'",',
                       C'"TRNESSID":"',77,4,C'",',
                       C'"TRNLTERM":"',125,8,C'",',
                       C'"TRNTCPU":"',
                       509,8,BI,DIV,+4096,EDIT=(TTTT.TTTTTT),C'",',
                       C'"TRNSTCKE":"',
                       517,8,DC1,EDIT=(TTTT-TT-TT),C'T',
                       517,8,TC4,EDIT=(TT:TT:TT.TT),C'+0000:00',C'",',
                        C'"UOW":"',615,32,TRAN=HEX,C'",',
                        C'}',
                        450:C'0',393,8,HEX))

  OUTREC IFTHEN=(WHEN=(09,16,CH,EQ,C'{"MFSOURCETYPE":'),
              OVERLAY=(470:450,14,TRAN=UNHEX,
                       063:450,07,BI,MOD,+10000000,M11,LENGTH=6,
                       450:17X,
                       470:07X))

  OUTFIL BUILD=(9,1100,SQZ=(SHIFT=LEFT))
/*

Thanks,
Kolusu
DFSORT Development
IBM Corporation



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