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: 4648
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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