View previous topic :: View next topic
|
Author |
Message |
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
Hello All,
I have a dataset to be sorted on Timestamp field.
Please let me know If we have any Sort condition which can do my requirement....
I searched in the forum to get the details.. Unfortunately i did not find any posts on filtering on Timestamps.
Awaiting for your responses.
Thanks,
Sravani. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Please provide following details
1. RECFM & LRECL of the file
2. Sample Input & Output |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I don't know what you are having trouble with.
Code: |
SORT FIELDS=(start-of-timestamp,length-of-timestamp,CH,A) |
EDIT: Looking again, you mention "filtering". As well as what Sai has asked for, please do let us know what processing you want to achieve "filtering" and "sorting" and anything else you need, all in one go, as clear as possible. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Whatever way the Timestamp is encoded, it's in a YYYYMMDDHHmmSSuuuuuu format and you can sort it as character. |
|
Back to top |
|
|
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
Bill Woodger wrote: |
I don't know what you are having trouble with.
Code: |
SORT FIELDS=(start-of-timestamp,length-of-timestamp,CH,A) |
EDIT: Looking again, you mention "filtering". As well as what Sai has asked for, please do let us know what processing you want to achieve "filtering" and "sorting" and anything else you need, all in one go, as clear as possible. |
Really Apologize Bill without testing posting in the forum...
I was thinking we will have some specific datatype to be specified like ZD,PD etc...
It is working with my data and i got the below output.
Code: |
9800061450279939|00000|2012-04-12-07.04.06.082316
9800061436508169|00000|2012-04-12-02.27.06.687805
9800067605664179|00000|2012-04-12-02.08.01.801228
9800042819731503|00001|2012-04-12-01.50.29.697251
9800067600132987|00000|2012-04-12-01.36.11.369361
9800060896021324|00000|2012-04-12-01.32.32.610814
9800067606617945|00000|2012-04-12-01.14.41.054780
9800029874359507|00000|2012-04-12-00.47.38.617897
9800061374828596|00000|2012-04-12-00.23.06.477832
9800061381222424|00000|2012-04-12-00.16.12.320081
9800061976728249|00010|2012-04-12-00.14.04.382675
9800062033907522|00000|2012-04-12-00.09.22.249470
9800062155232588|00010|2012-04-12-00.08.36.091684
9800021445056204|00000|2012-04-12-00.08.07.528737 |
Thanks alot for leting me know.
Sravani. |
|
Back to top |
|
|
|