View previous topic :: View next topic
|
Author |
Message |
venkatatcts
New User
Joined: 16 Mar 2009 Posts: 55 Location: India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|