Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Required to get the record based on the time stamp

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

New User


Joined: 07 Sep 2010
Posts: 22
Location: hyderabad

PostPosted: Fri Apr 03, 2015 4:33 pm    Post subject: Required to get the record based on the time stamp
Reply with quote

Hello,

I have a input file like below.

15972014-12-17-14.10.00.000000
15972014-12-17-15.10.00.000000
15972014-12-18-14.10.28.000000
15002014-12-18-14.10.28.000000
15002014-12-18-14.10.20.000000
15002014-12-19-14.10.20.000000

Here 1-4 position is my key. Based on my key value, need to pull ONE record which is having latest time stamp.

Output file:
15972014-12-18-14.10.28.000000
15002014-12-19-14.10.20.000000


Please help me how to achieve this by using SORT
Back to top
View user's profile Send private message

daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 683
Location: Pennsylvania

PostPosted: Fri Apr 03, 2015 5:31 pm    Post subject:
Reply with quote

Step 1 - Sort on the entire date/timestamp descending

Step 2 - Sort on positions 1-4 descending using equals and sum fields=none

Check the manual for syntax if needed.
Back to top
View user's profile Send private message
somapradeep1

New User


Joined: 07 Sep 2010
Posts: 22
Location: hyderabad

PostPosted: Fri Apr 03, 2015 6:00 pm    Post subject:
Reply with quote

Running two steps on same data makes performance issue on huge data. So trying to make it in a single step
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 683
Location: Pennsylvania

PostPosted: Fri Apr 03, 2015 6:14 pm    Post subject:
Reply with quote

How huge are you taking? One million records, two million?

I do not know of anyway of doing it in a single step.

Good luck.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 401
Location: USA

PostPosted: Fri Apr 03, 2015 7:07 pm    Post subject: Reply to: Required to get the record based on the time stamp
Reply with quote

Did you, by any slightest of a chance, make an effort to read the DFSORT manual?

This shouldn't take much time if you read WHEN=GROUP and use a KEYBEGIN (even if you are reading it for the first time).

Please Read the Manual, Try it and then post here what you tried and failed to get.

.
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
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us