Record Level Data in CSV

I just need to learn and record the compatible level data of Comma Separated Values (CSV). For example, if I will get a flat data format, through this 1'SQL', 'ABC' 2 'SQL', 'DEF' 3 'PP', 'BGC'. Through this, I have to learn this PL a kind of files. If PL type as "ABC' then I'm doing any processing and writing 'PL', registration as well. After RIC in writing the record pointer will be given at the end of file, but for the second reading of my guide must be 'DEF'. How I can set my guide on 2 different levels in the same flat data to read and write? Any suggestions? Thank you.
