I assumed the time stamp was in a format like STCKE which is really just an integer - so it doesn’t have the rollover issue.
Cheers, Martin Sent from my iPad On 28 Mar 2019, at 17:18, Sri h Kolusu <skol...@us.ibm.com> wrote: >> Kolusu, I would like one little tweak, if you please - is it possible to >> get the timestamp fresh on each record, instead of using the same > timestamp >> value for all of them? >> > > Bill, > > Unfortunately DFSORT cannot get a fresh timestamp on each record. As far as > I know even DB2 does not give you fresh timestamp on each record. > > If you want a unique value of timestamp, then I can show you as to what > Martin Packer suggested. Here are the updated control cards for generating > unique timestamp. > > //SYSIN DD * > OPTION COPY > INREC BUILD=(DATE5) > > OUTFIL REPEAT=1000000, > IFOUTLEN=100, $ LRECL=100 > IFTHEN=(WHEN=INIT, > OVERLAY=(101:SEQNUM,6,ZD,START=0, > 108:12,2,ZD,MUL,+3600,ADD, $ HH * 3600 + > 15,2,ZD,MUL,+0060,ADD, MM * 0060 + > 18,2,ZD,M11,LENGTH=8, SS > 117:21,6,ZD,ADD,101,6,ZD, $ INCR MICROSEC > M11,LENGTH=6, > 124:117,6,CHANGE=(1,C'000000',C'1'), $ ADJUST BY 1 > NOMATCH=(C'0'))), > > IFTHEN=(WHEN=GROUP,BEGIN=(124,1,CH,EQ,C'1'), > PUSH=(124:124,1)), > > IFTHEN=(WHEN=INIT, > OVERLAY=(108:108,8,ZD,ADD,124,1,ZD, $ INCR HHMMSS > M11,LENGTH=8)), > IFTHEN=(WHEN=INIT, > OVERLAY=(SEQNUM,9,ZD,START=100000001,INCR=8, $ SEQ INCR BY 8 > 108,8,ZD,DIV,+3600,EDIT=(TT), $ HH > (108,8,ZD,MOD,+3600),DIV,+60,EDIT=(TT), $ MM > ((108,8,ZD,MOD,+3600),MOD,+60),EDIT=(TT), $ SS > 117,6, $ MICROSEC > SEQNUM,7,PD,START=31,INCR=14, $ PACKED FIELD 1 > C'STATIC TEXT - 01', $ STATIC TEXT > SEQNUM,8,PD,START=23003,INCR=2, $ PACKED FIELD 2 > C'STATIC TEXT - 02', $ STATIC TEXT > SEQNUM,10,PD,START=0, $ PACKED FIELD 3 > C'END OF THE GEN')) $ STATIC TEXT > //* > >>> IFTHEN overwrite the last few bytes of the timestamp with an > incrementing value. > Kind of like a pipeline. Though, when I explained what he'd built to Frank > Yaeger he didn't respond as a plumber would. :-) > > Martin, > > You need to watch out for the wrap. Lets say the current timestamp had > > 2019-03-28-08.46.57.999244 > > So you would end with zero's in microseconds on the 756 records. > > 2019-03-28-08.46.58.000000 > > For this record you need to increment the SECONDS portion by 1. You also > need to watch out if addition resulted in 60 and then adjust the minutes > and validate it again and adjust the hours. May be that is the reason Frank > did not respond. :) > > Look at the above control cards to see how we need to handle. > > 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 >Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN