Flat Files Queries

Hi All,
I want to know two things in flat files.

1)Is there any way to check duplicate records in a flat file.

2)For example if we have 0000304000 i want to extract 30 , whichever position it comes.How can we acheive this?

Detailed explanation of the problem:

Error messages / full error message screenshot / log file:

Question related to a free trial, or to a production (customer) instance?

Hi Amruth,

please provide your wM version.

What would be the business use case for the questions you have asked?
This would help us to provide better assistance.