One of the most frequently posed scenario based DataStage interview questions and answers, be ready for this conceptual question. First we look at the file name and how many Is there a record with wc - l filename is counted  Then first check if the file name has a header and footer, If unavailable, then use following Unix commands  when we use wc -l filename, it will give count, suppose for example there are 1000 records  Ans1: Head -3 filename.txt >Target1.txt  Ans2: Tail -3 filename.txt >Target3.txt  Ans3: sed -n '4,997p' filename >Target2.txt