Sort a file based on a field whose position is not fixed
Page 1 of 1
Sort a file based on a field whose position is not fixed
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.
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
Similar topics
» Selection based on part of char field
» Difference between DEF and BASED ADDR
» Recall File Names in PS File
» Combining two sort cards
» what are different options to sort records?
» Difference between DEF and BASED ADDR
» Recall File Names in PS File
» Combining two sort cards
» what are different options to sort records?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum