Sort a file based on a field whose position is not fixed

Go down

Sort a file based on a field whose position is not fixed

Post  kasthuri on Sun Jan 27, 2013 5:23 pm

Hi,

I need to sort a file which contains XML records using DFSORT. The record contains a tag like <CRTS>2012-09-26-01.01.01.000000</CRTS>. I need to sort and filter records based on this timestamp value. Being an XML, the position of this <CRTS> tag keeps varying.
Input file Specifications
RECFM=FB, LRECL=80

Sample data:

Code:
AAAAAAAAAAA<CRTS>2012-09-26-02.01.01.000000</CRTS>BBBBBBBBBBBB
XXXXXXXX<CRTS>2012-09-26-01.01.01.000000</CRTS>HHHHHHHHHHHHH
CCCCCCC<CRTS>2012-02-26-03.01.01.000000</CRTS>BBBBBBBBB


I need to include only records which are within 90 days from current date.

Please let me know how this can be done. If there is a similar post which has already been answered, please let me know.

kasthuri

Posts : 212
Join date : 2013-01-27

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum