Now the requirement is as follows;
1.Need to extract only the files which start with &CMSFN, this file can be of any character.
2. Dont want to extract the entire row.
3.This name can start anywhere in the PDS.

Now the requirement is as follows;
1.Need to extract only the files which start with &CMSFN, this file can be of any character.
2. Dont want to extract the entire row.
3.This name can start anywhere in the PDS.

Now, what does "this file can be of any character" mean?
Do you mean PDS member when you wrote "name can start anywhere in the PDS"?

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

The length of the file name is variable so fixlen is fetching unwanted variables as well.

I don't understand how your ENDAT=C'''' relates to the question you asked and the example you showed. The names don't have an apostrophe at the end in your example. I gave you a DFSORT job that worked based on the example you showed. If you had shown a different example, I would have given you a DFSORT job that worked for that example.

Quote:

So STARTAT is also DFSORT syntax?

PARSE has been available with DFSORT since I first "invented" it in April, 2006.

Please in the future:
1) Don't post in the DFSORT Forum if you're not using DFSORT.
2) Post examples and explanations that match what you're actually trying to do.