View previous topic :: View next topic
|
Author |
Message |
nagarajan.dharani
New User
Joined: 27 Dec 2006 Posts: 36 Location: Chennai
|
|
|
|
Hi,
Can someone help me for the following requirement.
I need to create a 80-byte file that contains current timestamp in the record.
There should be only one record in the output file with the current timestamp left justified.
The format should be yyyy-mm-dd-hh.mm.ss.nnnnnn (26-characters length)
For example 2008-03-03-10.33.12.539574 is a valid time stamp.
Can this be done through sort? Please help me in this.
Thanks,
Dharani |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
nagarajan.dharani
New User
Joined: 27 Dec 2006 Posts: 36 Location: Chennai
|
|
|
|
Hi Kevin,
I saw that previous topic before and created the following JCL.
//STEP005 EXEC PGM=SORT
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(DATE4,C'.000000')
/*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Inputfile
//SORTOUT DD DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// DCB=(RECFM=FB,LRECL=80),
// SPACE=(TRK,(1,1),RLSE),
// DSN=OUTPUTFILE
The input file had one record as below
FFFFFFFFFFFF
In this job the output was like as below
2008-03-04-01.42.49.000000
But I want a output like
2008-03-03-10.33.12.539574 (with the last six digits of nano seconds)
Could you please let me know if there is any way of doing this.
Thanks,
Dharani |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
nagarajan.dharani wrote: |
But I want a output like
2008-03-03-10.33.12.539574 (with the last six digits of nano seconds) |
I think that the best you can get from sort is hundredths of a second (hhmmssxx)..... |
|
Back to top |
|
|
|