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
 
Sorting a 9's complement by comparing a column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sorting a 9's complement by comparing a column
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 Moderator


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

PostPosted: Tue Nov 17, 2009 2:04 am    Post subject:
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    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 Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

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