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
 

 

Can we do sort on Timestamp filed

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

New User


Joined: 07 Dec 2011
Posts: 26
Location: India

PostPosted: Mon Apr 16, 2012 7:12 pm    Post subject: Can we do sort on Timestamp filed
Reply with quote

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

saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Mon Apr 16, 2012 7:18 pm    Post subject:
Reply with quote

Please provide following details

1. RECFM & LRECL of the file
2. Sample Input & Output
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Apr 16, 2012 7:20 pm    Post subject: Reply to: Can we do sort on Timestamp filed???????
Reply with quote

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

Senior Member


Joined: 07 Feb 2009
Posts: 1018
Location: Oostende, Belgium

PostPosted: Mon Apr 16, 2012 7:22 pm    Post subject:
Reply with quote

Whatever way the Timestamp is encoded, it's in a YYYYMMDDHHmmSSuuuuuu format and you can sort it as character.
Back to top
View user's profile Send private message
sravz chinnu

New User


Joined: 07 Dec 2011
Posts: 26
Location: India

PostPosted: Mon Apr 16, 2012 7:43 pm    Post subject: Re: Reply to: Can we do sort on Timestamp filed???????
Reply with quote

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
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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