Why did you post this question if that's not the solution you're looking for?
I don't really see how this question relates to the other question.
I've asked you some questions in the other thread since it isn't clear what you want to do exactly. I can't take that other thread any further until you answer the questions and clarify what you want to do.
I have reason to post this question. Actually as I said I need to read a record if it has any condition met in the previous record. Once we read the next record what actually we need to do is we need to format the record in a desired manner and we need the unformatted record too. So I thought of implementing that like first I will write the formatted record to a temporary dataset1 and unformatted record to another temporay dataset2. After that I will take the first formatted record from the temporary dataset1 and write it to the actual output dataset and after that first unformatted record from the temporary dataset 2 and write it as second record of actual output dataset.