IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sorting a 9's complement by comparing a column


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venkatatcts

New User


Joined: 16 Mar 2009
Posts: 55
Location: India

PostPosted: Sat Nov 14, 2009 1:33 pm
Reply with quote

Hi,

There is a file in which the 2 to 7 column is policy number. In that 16 to 29 is time stamp in 9's complement. For a policy normally 12 records will be there but in some cases it will be 24 . In that instance i have to copy only latest 12 timestamp records.

Here is the sample records...

00365043AA00005 90908277717825
00365043AA00105 90908277717825
00365043CA00005 90908277717825
00365043CB00005 90908277717825
00365043CC00005 90908277717825
00365043CL00005 90908277717825
00365043CP00005 90908277717825
00365043CX00005 90908277717825
00365043HA00005 90908277717825
00365043PA00105 90908277717825
00365043PB00005 90908277717825
00365043TA00105 90908277717825
00365043AA00009 90908377999997
00365043AA00109 90908377999997
00365043CA00009 90908377999997
00365043CB00009 90908377999997
00365043CC00009 90908377999997
00365043CL00009 90908377999997
00365043CL00009 90908377999997
00365043CP00009 90908377999997
00365043CX00009 90908377999997
00365043HA00009 90908377999997
00365043PA00109 90908377999997
00365043PB00009 90908377999997
00365043TA00109 90908377999997


The output will be:


00365043AA00005 90908277717825
00365043AA00105 90908277717825
00365043CA00005 90908277717825
00365043CB00005 90908277717825
00365043CC00005 90908277717825
00365043CL00005 90908277717825
00365043CP00005 90908277717825
00365043CX00005 90908277717825
00365043HA00005 90908277717825
00365043PA00105 90908277717825
00365043PB00005 90908277717825
00365043TA00105 90908277717825

Thanks in Advance
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Nov 17, 2009 2:04 am
Reply with quote

Quote:
There is a file in which the 2 to 7 column is policy number


This doesn't seem to correspond to your input example. What exactly is the policy number in the first three records?

Quote:
In that 16 to 29 is time stamp in 9's complement.


Again, this doesn't seem to correspond to your input example. What exactly is the timestamp in the first three records?

Quote:
i have to copy only latest 12 timestamp records.


What do you mean by "latest" - highest? lowest? Please give an example of several different timestamps and indicate which is the latest.

Also, what is the RECFM and LRECL of your input file?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top