Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Getting timestamp using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
nagarajan.dharani

New User


Joined: 27 Dec 2006
Posts: 36
Location: Chennai

PostPosted: Mon Mar 03, 2008 9:06 pm    Post subject: Getting timestamp using sort
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Mon Mar 03, 2008 9:10 pm    Post subject: Reply to: Getting timestamp using sort
Reply with quote

Did you already look at this previous topic?
Back to top
View user's profile Send private message
nagarajan.dharani

New User


Joined: 27 Dec 2006
Posts: 36
Location: Chennai

PostPosted: Tue Mar 04, 2008 12:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Mar 04, 2008 7:27 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us